void PutClientInServer (void)
{
if(clienttype(self) == CLIENTTYPE_BOT)
- {
self.classname = "player";
- if(g_ca)
- self.caplayer = 1;
- }
else if(clienttype(self) == CLIENTTYPE_REAL)
{
msg_entity = self;
if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0)
self.classname = "observer";
}
-
- if((g_arena && !self.spawned) || (g_ca && !allowed_to_spawn))
+ else if(g_arena && !self.spawned)
self.classname = "observer";
+ MUTATOR_CALLHOOK(PutClientInServer);
+
if(gameover)
self.classname = "observer";
MUTATOR_HOOKABLE(MakePlayerObserver);
// called when a player becomes observer, after shared setup
+MUTATOR_HOOKABLE(PutClientInServer);
+ entity self; // client wanting to spawn
+
MUTATOR_HOOKABLE(PlayerSpawn);
entity spawn_spot; // spot that was used, or world
// called when a player spawns as player, after shared setup, before his weapon is chosen (so items may be changed in here)
return 1;
}
+MUTATOR_HOOKFUNCTION(ca_PutClientInServer)
+{
+ if(clienttype(self) == CLIENTTYPE_BOT)
+ self.caplayer = TRUE;
+ if(!allowed_to_spawn)
+ self.classname = "observer";
+ return 1;
+}
+
MUTATOR_HOOKFUNCTION(ca_reset_map_players)
{
FOR_EACH_CLIENT(self)
{
return 1;
}
+
MUTATOR_HOOKFUNCTION(ca_ForbidThrowCurrentWeapon)
{
return 1;
MUTATOR_DEFINITION(gamemode_ca)
{
MUTATOR_HOOK(PlayerSpawn, ca_PlayerSpawn, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PutClientInServer, ca_PutClientInServer, CBC_ORDER_ANY);
MUTATOR_HOOK(reset_map_global, ca_reset_map_global, CBC_ORDER_ANY);
MUTATOR_HOOK(reset_map_players, ca_reset_map_players, CBC_ORDER_ANY);
MUTATOR_HOOK(GetTeamCount, ca_GetTeamCount, CBC_ORDER_EXCLUSIVE);
leadlimit_override = autocvar_g_ca_point_leadlimit;
MUTATOR_ADD(gamemode_ca);
}
+
if(g_keyhunt)
{
ActivateTeamplay();