void CA_RoundStart()
{
- allowed_to_spawn = boolean(warmup_stage);
+ allowed_to_spawn = boolean(warmup_stage);
}
bool CA_CheckTeams()
MUTATOR_HOOKFUNCTION(ca, PlayerSpawn)
{
- entity player = M_ARGV(0, entity);
+ entity player = M_ARGV(0, entity);
player.caplayer = 1;
if (!warmup_stage)
MUTATOR_HOOKFUNCTION(ca, ClientConnect)
{
- entity player = M_ARGV(0, entity);
+ entity player = M_ARGV(0, entity);
TRANSMUTE(Observer, player);
return true;
void ca_LastPlayerForTeam_Notify(entity this)
{
- if (round_handler_IsActive())
- if (round_handler_IsRoundStarted())
+ if (!warmup_stage && round_handler_IsActive() && round_handler_IsRoundStarted())
{
entity pl = ca_LastPlayerForTeam(this);
if (pl)
}
frag_target.respawn_flags |= RESPAWN_FORCE;
if (!warmup_stage)
+ {
eliminatedPlayers.SendFlags |= 1;
- if(IS_BOT_CLIENT(frag_target))
- bot_clear(frag_target);
+ if (IS_BOT_CLIENT(frag_target))
+ bot_clear(frag_target);
+ }
return true;
}
MUTATOR_HOOKFUNCTION(ca, ClientDisconnect)
{
- entity player = M_ARGV(0, entity);
+ entity player = M_ARGV(0, entity);
if (player.caplayer == 1)
ca_LastPlayerForTeam_Notify(player);
MUTATOR_HOOKFUNCTION(ca, MakePlayerObserver)
{
- entity player = M_ARGV(0, entity);
+ entity player = M_ARGV(0, entity);
if (!IS_DEAD(player))
ca_LastPlayerForTeam_Notify(player);
MUTATOR_HOOKFUNCTION(ca, FilterItem)
{
- entity item = M_ARGV(0, entity);
+ entity item = M_ARGV(0, entity);
if (autocvar_g_powerups <= 0)
if (item.flags & FL_POWERUP)
MUTATOR_HOOKFUNCTION(ca, SpectateSet)
{
- entity client = M_ARGV(0, entity);
- entity targ = M_ARGV(1, entity);
+ entity client = M_ARGV(0, entity);
+ entity targ = M_ARGV(1, entity);
if (!autocvar_g_ca_spectate_enemies && client.caplayer)
if (DIFF_TEAM(targ, client))
MUTATOR_HOOKFUNCTION(ca, SpectateNext)
{
- entity client = M_ARGV(0, entity);
+ entity client = M_ARGV(0, entity);
if (!autocvar_g_ca_spectate_enemies && client.caplayer)
{
MUTATOR_HOOKFUNCTION(ca, SpectatePrev)
{
- entity client = M_ARGV(0, entity);
- entity targ = M_ARGV(1, entity);
- entity first = M_ARGV(2, entity);
+ entity client = M_ARGV(0, entity);
+ entity targ = M_ARGV(1, entity);
+ entity first = M_ARGV(2, entity);
if (!autocvar_g_ca_spectate_enemies && client.caplayer)
{
MUTATOR_HOOKFUNCTION(ca, ClientCommand_Spectate)
{
- entity player = M_ARGV(0, entity);
+ entity player = M_ARGV(0, entity);
if (player.caplayer)
{