X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=sv_phys.c;h=d46cef4539fd037f0a486aa0c676d9ac17ef52a2;hb=e62db3c2c5912dfdae790f97bed7791487dee34c;hp=abd6005532fa9c6255b0d4b9a6f00627582e1950;hpb=3374a19d5db1cf85de8cd59b4ff4035dc04d6199;p=xonotic%2Fdarkplaces.git 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);