diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-10-14 12:11:42 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-10-14 12:11:42 +0000 |
| commit | 4484948a6d4e12485c5b54ecf0e9e6d92b749d1a (patch) | |
| tree | 88ef98544626de24605a54a5c461f9075a84b08c /src/game/client/gameclient.cpp | |
| parent | 3544db49270f6d99c8b2126f294d38267e2899cb (diff) | |
| download | zcatch-4484948a6d4e12485c5b54ecf0e9e6d92b749d1a.tar.gz zcatch-4484948a6d4e12485c5b54ecf0e9e6d92b749d1a.zip | |
updated the demo recorder
Diffstat (limited to 'src/game/client/gameclient.cpp')
| -rw-r--r-- | src/game/client/gameclient.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 7c9a1ed6..22800a7a 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -303,7 +303,7 @@ void GAMECLIENT::on_reset() void GAMECLIENT::update_local_character_pos() { - if(config.cl_predict) + if(config.cl_predict && client_state() != CLIENTSTATE_DEMOPLAYBACK) { if(!snap.local_character || (snap.local_character->health < 0) || (snap.gameobj && snap.gameobj->game_over)) { @@ -328,7 +328,7 @@ static void evolve(NETOBJ_CHARACTER *character, int tick) mem_zero(&tempcore, sizeof(tempcore)); tempcore.world = &tempworld; tempcore.read(character); - //tempcore.input.direction = character->wanted_direction; + while(character->tick < tick) { character->tick++; @@ -343,21 +343,6 @@ static void evolve(NETOBJ_CHARACTER *character, int tick) void GAMECLIENT::on_render() { - // perform dead reckoning - // TODO: move this to a betterlocation - /* - for(int i = 0; i < MAX_CLIENTS; i++) - { - if(!snap.characters[i].active) - continue; - - // perform dead reckoning - if(snap.characters[i].prev.tick) - evolve(&snap.characters[i].prev, client_prevtick()); - if(snap.characters[i].cur.tick) - evolve(&snap.characters[i].cur, client_tick()); - }*/ - // update the local character position update_local_character_pos(); @@ -621,9 +606,6 @@ void GAMECLIENT::on_snapshot() } } - if(client_state() == CLIENTSTATE_DEMOPLAYBACK) - gameclient.snap.spectate = true; - // setup local pointers if(snap.local_cid >= 0) { |