]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/world.qc
Make sv_gameplayfix_delayprojectiles match the engine's behaviour of only running...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / world.qc
index c9fec23b8e3a8e313920bd6879be2454580e569f..c37998545ff8c7dabd7d87152d06dbd2ef313195 100644 (file)
@@ -2067,7 +2067,6 @@ void RunThink(entity this)
 }
 
 bool autocvar_sv_freezenonclients;
-bool autocvar_sv_gameplayfix_delayprojectiles = false;
 void Physics_Frame()
 {
        if(autocvar_sv_freezenonclients)
@@ -2075,7 +2074,7 @@ void Physics_Frame()
 
        IL_EACH(g_moveables, true,
        {
-               if(IS_CLIENT(it) || it.classname == "" || it.move_movetype == MOVETYPE_PHYSICS)
+               if(IS_CLIENT(it) || it.move_movetype == MOVETYPE_PHYSICS)
                        continue;
 
                //set_movetype(it, it.move_movetype);
@@ -2098,9 +2097,11 @@ void Physics_Frame()
        if(autocvar_sv_gameplayfix_delayprojectiles >= 0)
                return;
 
+       // make a second pass to see if any ents spawned this frame and make
+       // sure they run their move/think. this is verified by checking .move_time, which will never be 0 if the entity has moved
        IL_EACH(g_moveables, it.move_qcphysics,
        {
-               if(IS_CLIENT(it) || it.classname == "" || it.move_movetype == MOVETYPE_NONE)
+               if(IS_CLIENT(it) || it.move_time || it.move_movetype == MOVETYPE_NONE || it.move_movetype == MOVETYPE_PHYSICS)
                        continue;
                Movetype_Physics_NoMatchTicrate(it, PHYS_INPUT_TIMELENGTH, false);
        });