Skip to content

Commit 8dfb158

Browse files
committed
Set the view angle using the function for intermissioon
1 parent 0e2383e commit 8dfb158

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

code/game/g_active.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,17 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) {
403403
else
404404
client->ps.pm_type = PM_LIMITEDSPECTATOR;
405405
// RR2DO2
406-
client->ps.speed = 440; //keeg recon speed
406+
client->ps.speed = 800; //keeg recon speed -- ensi: faster yet
407+
408+
if (client->noclip && client->ps.pm_type != PM_LIMITEDSPECTATOR)
409+
client->ps.pm_type = PM_NOCLIP;
407410

408411
// set up for pmove
409412
memset (&pm, 0, sizeof(pm));
410413
pm.ps = &client->ps;
411414
pm.cmd = *ucmd;
412415
pm.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY; // spectators can fly through bodies
413416
pm.trace = trap_TraceNoEnts;
414-
// pm.trace = trap_Trace;
415417
pm.pointcontents = trap_PointContents;
416418

417419
// Golliwog: Prevent firing during ceasefire
@@ -1162,16 +1164,24 @@ void ClientThink_real( gentity_t *ent ) {
11621164
pm.cmd = *ucmd;
11631165

11641166
pm.trace = G_Q3F_ForceFieldTrace;
1165-
if ( pm.ps->pm_type == PM_DEAD ) {
1167+
switch ( pm.ps->pm_type ) {
1168+
case PM_DEAD:
11661169
pm.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY;
11671170
// DHM-Nerve added:: EF_DEAD is checked for in Pmove functions, but wasn't being set
11681171
// until after Pmove
11691172
pm.ps->eFlags |= EF_DEAD;
11701173
// dhm-Nerve end
1171-
} else if ( pm.ps->pm_type == PM_SPECTATOR || pm.ps->pm_type == PM_ADMINSPECTATOR ) {
1174+
break;
1175+
case PM_SPECTATOR:
1176+
case PM_ADMINSPECTATOR:
11721177
pm.trace = trap_TraceNoEnts;
1173-
} else {
1178+
break;
1179+
case PM_NOCLIP:
1180+
pm.tracemask = MASK_PLAYERSOLID & ~CONTENTS_BODY;
1181+
break;
1182+
default:
11741183
pm.tracemask = MASK_PLAYERSOLID;
1184+
break;
11751185
}
11761186

11771187
pm.pointcontents = trap_PointContents;

code/game/g_bot_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2825,7 +2825,7 @@ class ETFInterface:public IEngineInterface
28252825
trap_GetUserinfo(pEnt->s.clientNum, userinfo, MAX_INFO_STRING);
28262826
Info_SetValueForKey(userinfo, "name", pMsg->m_NewName);
28272827
trap_SetUserinfo(pEnt->s.clientNum, userinfo);
2828-
ClientUserinfoChanged(pEnt->s.clientNum, "name change");
2828+
ClientUserinfoChanged(pEnt->s.clientNum, "name change", qtrue);
28292829
}
28302830
break;
28312831
}

code/game/g_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ void MoveClientToIntermission( gentity_t *ent ) {
13061306
// move to the spot
13071307
VectorCopy( level.intermission_origin, ent->s.origin );
13081308
VectorCopy( level.intermission_origin, ent->client->ps.origin );
1309-
VectorCopy (level.intermission_angle, ent->client->ps.viewangles);
1309+
SetClientViewAngle( ent, level.intermission_angle );
13101310
ent->client->ps.pm_type = PM_INTERMISSION;
13111311

13121312
// clean up powerup info

0 commit comments

Comments
 (0)