summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_active.c3
-rw-r--r--src/game/g_client.c3
-rw-r--r--src/game/g_misc.c1
3 files changed, 6 insertions, 1 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index e22ecb1f..0ebb30ec 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -484,6 +484,8 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
// Save results of pmove
VectorCopy( client->ps.origin, ent->s.pos.trBase );
VectorCopy( client->ps.origin, ent->r.currentOrigin );
+ VectorCopy( client->ps.viewangles, ent->r.currentAngles );
+ VectorCopy( client->ps.viewangles, ent->s.pos.trBase );
G_TouchTriggers( ent );
trap_UnlinkEntity( ent );
@@ -1559,6 +1561,7 @@ void ClientThink_real( gentity_t *ent )
if( ent->client->ps.eventSequence != oldEventSequence )
ent->eventTime = level.time;
+ VectorCopy( ent->client->ps.viewangles, ent->r.currentAngles );
if( g_smoothClients.integer )
BG_PlayerStateToEntityStateExtraPolate( &ent->client->ps, &ent->s, ent->client->ps.commandTime, qtrue );
else
diff --git a/src/game/g_client.c b/src/game/g_client.c
index b8fb8055..5c355652 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1482,11 +1482,12 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
ent->client->pers.cmd.serverTime = level.time;
ClientThink( ent-g_entities );
+ VectorCopy( ent->client->ps.viewangles, ent->r.currentAngles );
+ VectorCopy( ent->client->ps.origin, ent->r.currentOrigin );
// positively link the client, even if the command times are weird
if( client->sess.spectatorState == SPECTATOR_NOT )
{
BG_PlayerStateToEntityState( &client->ps, &ent->s, qtrue );
- VectorCopy( ent->client->ps.origin, ent->r.currentOrigin );
trap_LinkEntity( ent );
}
diff --git a/src/game/g_misc.c b/src/game/g_misc.c
index 87b13c7a..8c667ad4 100644
--- a/src/game/g_misc.c
+++ b/src/game/g_misc.c
@@ -102,6 +102,7 @@ void TeleportPlayer( gentity_t *player, vec3_t origin, vec3_t angles, float spee
// use the precise origin for linking
VectorCopy( player->client->ps.origin, player->r.currentOrigin );
+ VectorCopy( player->client->ps.viewangles, player->r.currentAngles );
if( player->client->sess.spectatorState == SPECTATOR_NOT )
{