]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_lms.qc
Fix flag passing
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_lms.qc
index d0ef8e1d432aa7b42e566f71c0810bfc67f55c0b..adfd6eb6a76648b90ddb9f0b33413ec3dae01038 100644 (file)
@@ -86,7 +86,7 @@ int WinningCondition_LMS()
 
        int l = LMS_NewPlayerLives();
 
-       head = find(world, classname, STR_PLAYER);
+       head = find(NULL, classname, STR_PLAYER);
        if(head)
                have_player = true;
        head2 = find(head, classname, STR_PLAYER);
@@ -156,15 +156,12 @@ MUTATOR_HOOKFUNCTION(lms, reset_map_global)
 {
        lms_lowest_lives = 999;
        lms_next_place = player_count;
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(lms, reset_map_players)
 {
        if(restart_mapalreadyrestarted || (time < game_starttime))
        FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(PlayerScore_Add(it, SP_LMS_LIVES, LMS_NewPlayerLives())));
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(lms, PutClientInServer)
@@ -185,7 +182,6 @@ MUTATOR_HOOKFUNCTION(lms, PlayerDies)
        entity frag_target = M_ARGV(2, entity);
        
        frag_target.respawn_flags |= RESPAWN_FORCE;
-       return false;
 }
 
 void lms_RemovePlayer(entity player)
@@ -198,9 +194,9 @@ void lms_RemovePlayer(entity player)
 
        if(player.killcount != FRAGS_SPECTATOR)
                if(PlayerScore_Add(player, SP_LMS_RANK, 0) > 0 && player.lms_spectate_warning != 2)
-                       Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_LMS_NOLIVES, player.netname);
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_LMS_NOLIVES, player.netname);
                else
-                       Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_LMS_FORFEIT, player.netname);
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_LMS_FORFEIT, player.netname);
 }
 
 MUTATOR_HOOKFUNCTION(lms, ClientDisconnect)
@@ -287,8 +283,6 @@ MUTATOR_HOOKFUNCTION(lms, SetStartItems)
        start_ammo_cells   = warmup_start_ammo_cells   = cvar("g_lms_start_ammo_cells");
        start_ammo_plasma  = warmup_start_ammo_plasma  = cvar("g_lms_start_ammo_plasma");
        start_ammo_fuel    = warmup_start_ammo_fuel    = cvar("g_lms_start_ammo_fuel");
-
-       return false;
 }
 
 MUTATOR_HOOKFUNCTION(lms, ForbidPlayerScore_Clear)
@@ -400,7 +394,6 @@ MUTATOR_HOOKFUNCTION(lms, AddPlayerScore)
        if(gameover)
        if(M_ARGV(0, int) == SP_LMS_RANK) // score field
                return true; // allow writing to this field in intermission as it is needed for newly joining players
-       return false;
 }
 
 // scoreboard stuff