]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changed sv_gameplayfix_delayprojectiles to also delay think functions on
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 Mar 2009 20:27:15 +0000 (20:27 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 Mar 2009 20:27:15 +0000 (20:27 +0000)
newly spawned entities, not just movement

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8800 d7cf8633-e32d-0410-b094-e92efae38249

sv_phys.c

index 45d43e36884b75fb37807c42afe9c6f48f613f28..b05dee1750357a9f33d1b2963e15f5a5ade124ac 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -2100,10 +2100,16 @@ void SV_Physics_Step (prvm_edict_t *ent)
 
 static void SV_Physics_Entity (prvm_edict_t *ent)
 {
-       // don't run a move on newly spawned projectiles as it messes up movement
-       // interpolation and rocket trails
+       // don't run think/move on newly spawned projectiles as it messes up
+       // movement interpolation and rocket trails, and is inconsistent with
+       // respect to entities spawned in the same frame
+       // (if an ent spawns a higher numbered ent, it moves in the same frame,
+       //  but if it spawns a lower numbered ent, it doesn't - this never moves
+       //  ents in the first frame regardless)
        qboolean runmove = ent->priv.server->move;
        ent->priv.server->move = true;
+       if (!runmove && sv_gameplayfix_delayprojectiles.integer)
+               return;
        switch ((int) ent->fields.server->movetype)
        {
        case MOVETYPE_PUSH:
@@ -2140,7 +2146,7 @@ static void SV_Physics_Entity (prvm_edict_t *ent)
        case MOVETYPE_FLYMISSILE:
        case MOVETYPE_FLY:
                // regular thinking
-               if (SV_RunThink (ent) && (runmove || !sv_gameplayfix_delayprojectiles.integer))
+               if (SV_RunThink (ent))
                        SV_Physics_Toss (ent);
                break;
        default: