]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
also don't call PostThink on disconnected clients ;)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 Oct 2009 18:35:00 +0000 (18:35 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 Oct 2009 18:35:00 +0000 (18:35 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9303 d7cf8633-e32d-0410-b094-e92efae38249

sv_phys.c

index 6a2979cac23ea64486b92f5da968027c597e3ef3..15355fd409bc8c8c91fab282b9177651484a80f0 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -2731,6 +2731,10 @@ static void SV_Physics_ClientEntity_PreThink(prvm_edict_t *ent)
 
 static void SV_Physics_ClientEntity_PostThink(prvm_edict_t *ent)
 {
+       // don't do physics on disconnected clients, FrikBot relies on this
+       if (!host_client->spawned)
+               return;
+
        // make sure the velocity is sane (not a NaN)
        SV_CheckVelocity(ent);