]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/vote.qc
Clean up some SELFPARAMs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / vote.qc
index e19ef52e87dbef2d05ca7d5a5fc0ec96cd3e43f6..a7d31b0613c17f829a9eab8eb2e20499b220ea7f 100644 (file)
@@ -333,8 +333,6 @@ void VoteThink()
 // Resets the state of all clients, items, weapons, waypoints, ... of the map.
 void reset_map(bool dorespawn)
 {
-       SELFPARAM();
-
        if (time <= game_starttime && round_handler_IsActive()) round_handler_Reset(game_starttime);
 
        MUTATOR_CALLHOOK(reset_map_global);
@@ -351,7 +349,7 @@ void reset_map(bool dorespawn)
 
        // Waypoints and assault start come LAST
        FOREACH_ENTITY_ORDERED(IS_NOT_A_CLIENT(it), {
-               if (it.reset2) WITHSELF(it, it.reset2());
+               if (it.reset2) it.reset2(it);
        });
 
        FOREACH_CLIENT(IS_PLAYER(it) && STAT(FROZEN, it), LAMBDA(WITHSELF(it, Unfreeze(it))));
@@ -389,9 +387,8 @@ void reset_map(bool dorespawn)
 }
 
 // Restarts the map after the countdown is over (and cvar sv_ready_restart_after_countdown is set)
-void ReadyRestart_think()
+void ReadyRestart_think(entity this)
 {
-       SELFPARAM();
        restart_mapalreadyrestarted = true;
        reset_map(true);
        Score_ClearAll();
@@ -441,7 +438,7 @@ void ReadyRestart_force()
        if (autocvar_sv_ready_restart_after_countdown)
        {
                entity restart_timer = new_pure(restart_timer);
-               restart_timer.think = ReadyRestart_think;
+               setthink(restart_timer, ReadyRestart_think);
                restart_timer.nextthink = game_starttime;
        }