From: havoc Date: Mon, 21 Nov 2005 18:14:56 +0000 (+0000) Subject: clear the client->weaponmodel cache on level change X-Git-Tag: xonotic-v0.1.0preview~4471 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=03b6189abb43f36b8d795f3699617549893cd225;p=xonotic%2Fdarkplaces.git clear the client->weaponmodel cache on level change git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5813 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_main.c b/sv_main.c index ac4d6df3..9fc9dd22 100644 --- 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)