]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
modified PRYDON_CLIENTCURSOR extension to reset cursor_trace_ent to world if the...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 1 Dec 2004 21:49:46 +0000 (21:49 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 1 Dec 2004 21:49:46 +0000 (21:49 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4814 d7cf8633-e32d-0410-b094-e92efae38249

sv_user.c

index 77102a6925df5bd6b3fd9193a183dc62e09f9989..dec9d6c13868b153e1e228500156bff014e7079c 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -689,6 +689,10 @@ void SV_ReadClientMove (usercmd_t *move)
                move->cursor_impact[1] = MSG_ReadFloat();
                move->cursor_impact[2] = MSG_ReadFloat();
                move->cursor_entitynumber = MSG_ReadShort();
+               // as requested by FrikaC, cursor_trace_ent is reset to world if the
+               // entity is free at time of receipt
+               if (EDICT_NUM(move->cursor_entitynumber)->e->freed)
+                       move->cursor_entitynumber = 0;
                if (msg_badread) Con_Printf("SV_ReadClientMessage: badread at %s:%i\n", __FILE__, __LINE__);
        }
        if ((val = GETEDICTFIELDVALUE(host_client->edict, eval_cursor_screen))) VectorCopy(move->cursor_screen, val->vector);