]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
clear the client->weaponmodel cache on level change
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 21 Nov 2005 18:14:56 +0000 (18:14 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 21 Nov 2005 18:14:56 +0000 (18:14 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5813 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index ac4d6df35da4fcacac2aacaa60e23ad7d7320ba0..9fc9dd2203ca3fc22a98564dccc65172b809f813 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -291,6 +291,10 @@ void SV_SendServerinfo (client_t *client)
        // edicts get reallocated on level changes, so we need to update it here
        client->edict = PRVM_EDICT_NUM((client - svs.clients) + 1);
 
+       // clear cached stuff that depends on the level
+       client->weaponmodel[0] = 0;
+       client->weaponmodelindex = 0;
+
        // if client is a botclient coming from a level change, we need to set up
        // client info that normally requires networking
        if (!client->netconnection)