From: havoc Date: Mon, 5 Aug 2002 11:11:52 +0000 (+0000) Subject: fix view_ofs when dead (negative viewheight) X-Git-Tag: RELEASE_0_2_0_RC1~373 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=791b65b452170fbf9e53631ddc9d51f417221ce4;p=xonotic%2Fdarkplaces.git fix view_ofs when dead (negative viewheight) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2198 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_main.c b/sv_main.c index 3f17d411..edb04036 100644 --- a/sv_main.c +++ b/sv_main.c @@ -889,7 +889,10 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg) // applies the view_ofs[2], so we have to only send the fractional part // of view_ofs[2], undoing what the client will redo) VectorCopy (testeye, testorigin); - testorigin[2] -= (float) ((int)(clent->v.view_ofs[2]) & 255); + e = (int) clent->v.view_ofs[2] & 255; + if (e >= 128) + e -= 256; + testorigin[2] -= (float) e; EntityFrame_Clear(&entityframe, testorigin); culled_pvs = 0;