PHP Code:
if(CloneOwnerIndex[client]!=-1 && GetClientTeam(client)==BossTeam) //Switch clones back to the other team after they die
{
CloneOwnerIndex[client]=-1;
FF2_SetFF2flags(client, FF2_GetFF2flags(client) & ~FF2FLAG_CLASSTIMERDISABLED);
ChangeClientTeam(client, (BossTeam==_:TFTeam_Blue) ? (_:TFTeam_Red) : (_:TFTeam_Blue));
}
These lines from
ff2_1st_set_abilities haven't check for TF_DEATHFLAG_DEADRINGER, it causes boss been switched to another team when the boss activates dead ringer and gets shot from other team.
Just add a check for it.
PHP Code:
if(!(GetEventInt(event, "death_flags") & TF_DEATHFLAG_DEADRINGER) && CloneOwnerIndex[client]!=-1 && GetClientTeam(client)==BossTeam) //Switch clones back to the other team after they die
{
CloneOwnerIndex[client]=-1;
FF2_SetFF2flags(client, FF2_GetFF2flags(client) & ~FF2FLAG_CLASSTIMERDISABLED);
ChangeClientTeam(client, (BossTeam==_:TFTeam_Blue) ? (_:TFTeam_Red) : (_:TFTeam_Blue));
}