TRANSMUTE(Player, this);
- this.wasplayer = true;
+ CS(this).wasplayer = true;
this.iscreature = true;
this.teleportable = TELEPORT_NORMAL;
if(!this.damagedbycontents)
.bool team_selected;
bool ShowTeamSelection(entity this)
{
- if(!teamplay || autocvar_g_campaign || autocvar_g_balance_teams || this.team_selected || (this.wasplayer && autocvar_g_changeteam_banned) || this.team_forced > 0)
+ if(!teamplay || autocvar_g_campaign || autocvar_g_balance_teams || this.team_selected || (CS(this).wasplayer && autocvar_g_changeteam_banned) || this.team_forced > 0)
return false;
stuffcmd(this, "menu_showteamselect\n");
return true;
ATTRIB(Client, specialcommand_pos, int, this.specialcommand_pos);
ATTRIB(Client, hitplotfh, int, this.hitplotfh);
ATTRIB(Client, clientdata, entity, this.clientdata);
+ ATTRIB(Client, wasplayer, bool, this.wasplayer);
METHOD(Client, m_unwind, bool(Client this));
{
sprint(caller, "^7You already are on that team.\n");
}
- else if (caller.wasplayer && autocvar_g_changeteam_banned)
+ else if (CS(caller).wasplayer && autocvar_g_changeteam_banned)
{
sprint(caller, "^1You cannot change team, forbidden by the server.\n");
}
//vector debug_shotorg; // if non-zero, overrides the shot origin of all weapons
-.float wasplayer;
+.bool wasplayer;
float servertime, serverprevtime, serverframetime;
return;
}
- if((autocvar_g_campaign) || (autocvar_g_changeteam_banned && this.wasplayer)) {
+ if((autocvar_g_campaign) || (autocvar_g_changeteam_banned && CS(this).wasplayer)) {
Send_Notification(NOTIF_ONE, this, MSG_INFO, INFO_TEAMCHANGE_NOTALLOWED);
return; // changing teams is not allowed
}