MUTATOR_HOOKFUNCTION(br, MakePlayerObserver)
{
entity player = M_ARGV(0, entity);
+ bool is_forced = M_ARGV(1, bool);
+
+ if(is_forced && IN_SQUAD(player))
+ {
+ br_SquadMember_Remove(player);
+ br_SquadUpdateInfo();
+ }
if(IN_SQUAD(player))
{
player.velocity = player.br_drop_velocity;
player.angles = player.br_drop_angles;
- if(IN_SQUAD(player) && (IS_REAL_CLIENT(player) || br_SquadIsBotsOnly(player.br_squad)))
+ if(IN_SQUAD(player) && ((IS_REAL_CLIENT(player) && (player.br_drop_launch == 2)) || br_SquadIsBotsOnly(player.br_squad)))
{
player.br_squad.br_squad_drop_leader = player;
UpdatePlayerSounds(e);
}
-.bool would_spectate;
+bool SpectateNext(entity this);
/** putting a client as observer in the server */
void PutObserverInServer(entity this, bool is_forced)
// force members of alive squads to spectate another squadmate
if(IS_REAL_CLIENT(this) && IN_SQUAD(this) && !this.br_squad.br_squad_dead)
- this.would_spectate = true;
+ {
+ SpectateNext(this);
+ TRANSMUTE(Spectator, this);
+ }
}
int player_getspecies(entity this)
return true;
}
+.bool would_spectate;
// merged SpectatorThink and ObserverThink (old names are here so you can grep for them)
void ObserverOrSpectatorThink(entity this)
{