]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/race/sv_race.qc
Revert "Record player race move time in PlayerPreThink so it can be recorded while...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / race / sv_race.qc
index c87384c94bc3377c45f27fa6d7ac422585c6657f..a69a435227785f7172f65558155049abaddbbc4e 100644 (file)
@@ -128,26 +128,16 @@ MUTATOR_HOOKFUNCTION(rc, AbortSpeedrun)
                race_PreparePlayer(player); // nice try
 }
 
-MUTATOR_HOOKFUNCTION(rc, PlayerPreThink)
+MUTATOR_HOOKFUNCTION(rc, PlayerPhysics)
 {
        entity player = M_ARGV(0, entity);
+       float dt = M_ARGV(1, float);
 
-       if(!IS_PLAYER(player))
-               return;
-
-       // we need to perform this in PlayerPreThink as PlayerPhysics may not be called (vehicle support)
-       float dt = frametime;
        player.race_movetime_frac += dt;
        float f = floor(player.race_movetime_frac);
        player.race_movetime_frac -= f;
        player.race_movetime_count += f;
        player.race_movetime = player.race_movetime_frac + player.race_movetime_count;
-}
-
-MUTATOR_HOOKFUNCTION(rc, PlayerPhysics)
-{
-       entity player = M_ARGV(0, entity);
-       //float dt = M_ARGV(1, float);
 
 #ifdef SVQC
        if(IS_PLAYER(player))