// When we get here, we have at least two players who are actually LIVING,
// now check if the top two players have equal score.
// When we get here, we have at least two players who are actually LIVING,
// now check if the top two players have equal score.
}
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())));
}
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())));
- TRANSMUTE(Observer, self);
- Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_LMS_NOLIVES);
+ TRANSMUTE(Observer, player);
+ Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_LMS_NOLIVES);
if(player.killcount != FRAGS_SPECTATOR)
if(PlayerScore_Add(player, SP_LMS_RANK, 0) > 0 && player.lms_spectate_warning != 2)
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);
- Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_LMS_FORFEIT, player.netname);
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_LMS_FORFEIT, player.netname);
return true; // prevent team reset
}
MUTATOR_HOOKFUNCTION(lms, ClientConnect)
return true; // prevent team reset
}
MUTATOR_HOOKFUNCTION(lms, ClientConnect)
- PlayerScore_Add(self, SP_LMS_RANK, 666);
- self.frags = FRAGS_SPECTATOR;
+ PlayerScore_Add(player, SP_LMS_RANK, 666);
+ player.frags = FRAGS_SPECTATOR;
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");
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");
StartItem(this, ITEM_ExtraLife);
}
MUTATOR_HOOKFUNCTION(lms, OnEntityPreSpawn)
StartItem(this, ITEM_ExtraLife);
}
MUTATOR_HOOKFUNCTION(lms, OnEntityPreSpawn)
- e.spawnflags = self.spawnflags;
- e.noalign = self.noalign;
- setorigin(e, self.origin);
+ e.spawnflags = ent.spawnflags;
+ e.noalign = ent.noalign;
+ setorigin(e, ent.origin);
-{SELFPARAM();
- if(self.itemdef == ITEM_ExtraLife)
+{
+ entity item = M_ARGV(0, entity);
+ entity toucher = M_ARGV(1, entity);
+
+ if(item.itemdef == ITEM_ExtraLife)
- Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES);
- PlayerScore_Add(other, SP_LMS_LIVES, autocvar_g_lms_extra_lives);
+ Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_EXTRALIVES);
+ PlayerScore_Add(toucher, SP_LMS_LIVES, autocvar_g_lms_extra_lives);
MUTATOR_HOOKFUNCTION(lms, Bot_FixCount, CBC_ORDER_EXCLUSIVE)
{
FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(
MUTATOR_HOOKFUNCTION(lms, Bot_FixCount, CBC_ORDER_EXCLUSIVE)
{
FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(
- PlayerScore_Add(self, SP_LMS_RANK, 666 - PlayerScore_Add(self, SP_LMS_RANK, 0));
+ PlayerScore_Add(player, SP_LMS_RANK, 666 - PlayerScore_Add(player, SP_LMS_RANK, 0));
- self.lms_spectate_warning = 1;
- sprint(self, "WARNING: you won't be able to enter the game again after spectating in LMS. Use the same command again to spectate anyway.\n");
+ player.lms_spectate_warning = 1;
+ sprint(player, "WARNING: you won't be able to enter the game again after spectating in LMS. Use the same command again to spectate anyway.\n");