diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-18 01:38:43 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-18 01:38:43 +0000 |
| commit | 4ad19387e4d91af5d85953bcc45096f2618f6887 (patch) | |
| tree | 8f8fe0b72c947c2b93e4655c9f249c4cf683a6fc /src/game/client/gc_render_obj.cpp | |
| parent | a3714edde118763b4784c63f098700f10132653c (diff) | |
| download | zcatch-4ad19387e4d91af5d85953bcc45096f2618f6887.tar.gz zcatch-4ad19387e4d91af5d85953bcc45096f2618f6887.zip | |
fixed flag jerkiness when capturing and returning
Diffstat (limited to 'src/game/client/gc_render_obj.cpp')
| -rw-r--r-- | src/game/client/gc_render_obj.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/client/gc_render_obj.cpp b/src/game/client/gc_render_obj.cpp index ca82ee27..450d07d9 100644 --- a/src/game/client/gc_render_obj.cpp +++ b/src/game/client/gc_render_obj.cpp @@ -136,12 +136,15 @@ void render_flag(const NETOBJ_FLAG *prev, const NETOBJ_FLAG *current) gfx_quads_setrotation(angle); vec2 pos = mix(vec2(prev->x, prev->y), vec2(current->x, current->y), client_intratick()); + + // make sure that the flag isn't interpolated between capture and return + if(prev->carried_by != current->carried_by) + pos = vec2(current->x, current->y); + // make sure to use predicted position if we are the carrier if(netobjects.local_info && current->carried_by == netobjects.local_info->cid) pos = local_character_pos; - //gfx_setcolor(current->team ? 0 : 1,0,current->team ? 1 : 0,1); - //draw_sprite(pos.x, pos.y, size); gfx_quads_draw(pos.x, pos.y-size*0.75f, size, size*2); gfx_quads_end(); } |