else
stuffcmd(self, "set _teams_available 0\n");
- if(g_arena || g_ca)
- {
- self.classname = "observer";
- if(g_arena)
- Spawnqueue_Insert(self);
- }
-
attach_entcs();
bot_relinkplayerlist();
CSQCMODEL_AUTOINIT();
self.model_randomizer = random();
-
- if(clienttype(self) != CLIENTTYPE_REAL)
- return;
-
- sv_notice_join();
-
- MUTATOR_CALLHOOK(ClientConnect);
+
+ if(clienttype(self) == CLIENTTYPE_REAL)
+ sv_notice_join();
+
+ MUTATOR_CALLHOOK(ClientConnect);
}
/*
=============
return 1;
}
+MUTATOR_HOOKFUNCTION(arena_ClientConnect)
+{
+ self.classname = "observer";
+ Spawnqueue_Insert(self);
+ return 1;
+}
+
MUTATOR_HOOKFUNCTION(arena_PlayerSpawn)
{
Spawnqueue_Remove(self);
MUTATOR_HOOK(reset_map_players, arena_reset_map_players, CBC_ORDER_ANY);
MUTATOR_HOOK(MakePlayerObserver, arena_MakePlayerObserver, CBC_ORDER_ANY);
MUTATOR_HOOK(PutClientInServer, arena_PutClientInServer, CBC_ORDER_ANY);
+ MUTATOR_HOOK(ClientConnect, arena_ClientConnect, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerSpawn, arena_PlayerSpawn, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerPreThink, arena_PlayerPreThink, CBC_ORDER_ANY);
MUTATOR_HOOK(ForbidPlayerScore_Clear, arena_ForbidPlayerScore_Clear, CBC_ORDER_ANY);
return 1;
}
+MUTATOR_HOOKFUNCTION(ca_ClientConnect)
+{
+ self.classname = "observer";
+ return 1;
+}
+
MUTATOR_HOOKFUNCTION(ca_reset_map_global)
{
allowed_to_spawn = TRUE;
MUTATOR_HOOK(PlayerSpawn, ca_PlayerSpawn, CBC_ORDER_ANY);
MUTATOR_HOOK(PutClientInServer, ca_PutClientInServer, CBC_ORDER_ANY);
MUTATOR_HOOK(MakePlayerObserver, ca_MakePlayerObserver, CBC_ORDER_ANY);
+ MUTATOR_HOOK(ClientConnect, ca_ClientConnect, 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);
MUTATOR_HOOKFUNCTION(superspec_ClientConnect)
{
+ if(clienttype(self) != CLIENTTYPE_REAL)
+ return FALSE;
+
string fn = "superspec-local.options";
float fh;