}
MUTATOR_HOOKFUNCTION(ca_PlayerSpawn)
-{
+{SELFPARAM();
self.caplayer = 1;
if(!warmup_stage)
eliminatedPlayers.SendFlags |= 1;
}
MUTATOR_HOOKFUNCTION(ca_PutClientInServer)
-{
+{SELFPARAM();
if(!allowed_to_spawn)
if(IS_PLAYER(self)) // this is true even when player is trying to join
{
}
MUTATOR_HOOKFUNCTION(ca_reset_map_players)
-{
- FOR_EACH_CLIENT(self)
+{SELFPARAM();
+ entity e;
+ FOR_EACH_CLIENT(e)
{
+ setself(e);
self.killcount = 0;
if(!self.caplayer && IS_BOT_CLIENT(self))
{
}
MUTATOR_HOOKFUNCTION(ca_ClientConnect)
-{
+{SELFPARAM();
self.classname = "observer";
return 1;
}
}
entity ca_LastPlayerForTeam()
-{
+{SELFPARAM();
entity pl, last_pl = world;
FOR_EACH_PLAYER(pl)
{
}
MUTATOR_HOOKFUNCTION(ca_PlayerDies)
-{
+{SELFPARAM();
ca_LastPlayerForTeam_Notify();
if(!allowed_to_spawn)
self.respawn_flags = RESPAWN_SILENT;
}
MUTATOR_HOOKFUNCTION(ca_ClientDisconnect)
-{
+{SELFPARAM();
if(self.caplayer == 1)
ca_LastPlayerForTeam_Notify();
return 1;
}
MUTATOR_HOOKFUNCTION(ca_MakePlayerObserver)
-{
+{SELFPARAM();
if(self.caplayer == 1)
ca_LastPlayerForTeam_Notify();
if(self.killindicator_teamchange == -2)
}
MUTATOR_HOOKFUNCTION(ca_FilterItem)
-{
+{SELFPARAM();
if(autocvar_g_powerups <= 0)
if(self.flags & FL_POWERUP)
return true;
return true;
}
+MUTATOR_HOOKFUNCTION(ca_CountFrags)
+{
+ // announce remaining frags
+ return true;
+}
+
void ca_Initialize()
{
allowed_to_spawn = true;
MUTATOR_HOOK(FilterItem, ca_FilterItem, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerDamage_SplitHealthArmor, ca_PlayerDamage_SplitHealthArmor, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerRegen, ca_PlayerRegen, CBC_ORDER_ANY);
+ MUTATOR_HOOK(Scores_CountFragsRemaining, ca_CountFrags, CBC_ORDER_ANY);
MUTATOR_ONADD
{
MUTATOR_ONREMOVE
{
- print("This is a game type and it cannot be removed at runtime.");
+ LOG_INFO("This is a game type and it cannot be removed at runtime.");
return -1;
}