diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-08-14 16:34:42 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-08-14 16:34:42 +0200 |
commit | b0f1fbb585a40e0efc78576ddbc5cd53c9bc221b (patch) | |
tree | a201238486261e69aa9f3de850706f8dea4dbb33 | |
parent | 5c5bfbdb941aa00fb1c9ec0b751943678924fbea (diff) |
Add more extrapolation debugging.
-rw-r--r-- | src/game/g_active.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index d1c9745..99cf1a8 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -1643,7 +1643,7 @@ static void ClientExtrapolate(gentity_t *ent) VectorMA(pos2->origin, time_since, dxdt, ent->s.pos.trBase); - if (g_debugExtrapolation.integer) { + if (g_debugExtrapolation.integer & 1) { Com_Printf("Extrapolated player %i:\n", (int)(ent - g_entities)); Com_Printf(" pos1=(%f, %f, %f) at t=%i, t'=%i\n", pos1->origin[0], pos1->origin[1], pos1->origin[2], @@ -2280,6 +2280,13 @@ void ClientEndFrame( gentity_t *ent ) if( ent->client->extrapolate ) ClientExtrapolate( ent ); + if( g_debugExtrapolation.integer & 2 ) + { + Com_Printf("player %i: (%f, %f, %f)%s\n", (int)(ent - g_entities), + ent->s.pos.trBase[0], ent->s.pos.trBase[1], ent->s.pos.trBase[2], + ( ent->client->extrapolate ? "(extrapolated)" : "")); + } + // This flag will go down as soon as a client frame is received. // If a frame isn't received then it'll stay up and trigger extrapolation. ent->client->extrapolate = qtrue; |