From: havoc Date: Sun, 13 Sep 2009 02:21:04 +0000 (+0000) Subject: implemented sv_gameplayfix_delayprojectiles -1 (force move on first X-Git-Tag: xonotic-v0.1.0preview~1447 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e62db3c2c5912dfdae790f97bed7791487dee34c;p=xonotic%2Fdarkplaces.git implemented sv_gameplayfix_delayprojectiles -1 (force move on first frame, even if spawned in earlier entity slot) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9185 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_phys.c b/sv_phys.c index abd60055..d46cef45 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -2251,7 +2251,7 @@ static void SV_Physics_Entity (prvm_edict_t *ent) // ents in the first frame regardless) qboolean runmove = ent->priv.server->move; ent->priv.server->move = true; - if (!runmove && sv_gameplayfix_delayprojectiles.integer) + if (!runmove && sv_gameplayfix_delayprojectiles.integer > 0) return; switch ((int) ent->fields.server->movetype) { @@ -2487,9 +2487,17 @@ void SV_Physics (void) // run physics on all the non-client entities if (!sv_freezenonclients.integer) + { for (;i < prog->num_edicts;i++, ent = PRVM_NEXT_EDICT(ent)) if (!ent->priv.server->free) SV_Physics_Entity(ent); + // make a second pass to see if any ents spawned this frame and make + // sure they run their move/think + if (sv_gameplayfix_delayprojectiles.integer < 0) + for (i = svs.maxclients + 1, ent = PRVM_EDICT_NUM(i);i < prog->num_edicts;i++, ent = PRVM_NEXT_EDICT(ent)) + if (!ent->priv.server->move && !ent->priv.server->free) + SV_Physics_Entity(ent); + } if (prog->globals.server->force_retouch > 0) prog->globals.server->force_retouch = max(0, prog->globals.server->force_retouch - 1);