bool joinAllowed(entity this)
{
- if (this.version_mismatch) return false;
+ if (CS(this).version_mismatch) return false;
if (!nJoinAllowed(this, this)) return false;
if (teamplay && lockteams) return false;
if (ShowTeamSelection(this)) return false;
if (PHYS_INPUT_BUTTON_JUMP(this) && joinAllowed(this)) {
this.flags &= ~FL_JUMPRELEASED;
this.flags |= FL_SPAWNING;
- } else if(PHYS_INPUT_BUTTON_ATCK(this) && !this.version_mismatch) {
+ } else if(PHYS_INPUT_BUTTON_ATCK(this) && !CS(this).version_mismatch) {
this.flags &= ~FL_JUMPRELEASED;
if(SpectateNext(this)) {
TRANSMUTE(Spectator, this);
ATTRIB(Client, active_minigame, entity, this.active_minigame);
ATTRIB(Client, taunt_soundtime, float, this.taunt_soundtime);
ATTRIB(Client, killcount, int, this.killcount);
+ ATTRIB(Client, version_mismatch, bool, this.version_mismatch);
METHOD(Client, m_unwind, bool(Client this));
if (caller.version < autocvar_gameversion_min || caller.version > autocvar_gameversion_max)
{
- caller.version_mismatch = 1;
+ CS(caller).version_mismatch = true;
ClientKill_TeamChange(caller, -2); // observe
}
else if (autocvar_g_campaign || autocvar_g_balance_teams)
.float cvar_cl_voice_directional;
.float cvar_cl_voice_directional_taunt_attenuation;
-.float version_mismatch;
-
int autocvar__independent_players;
bool independent_players;
#define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players)
string GetClientVersionMessage(entity this)
{
- if (this.version_mismatch) {
+ if (CS(this).version_mismatch) {
if(this.version < autocvar_gameversion) {
return strcat("This is Xonotic ", autocvar_g_xonoticversion,
"\n^3Your client version is outdated.\n\n\n### YOU WON'T BE ABLE TO PLAY ON THIS SERVER ###\n\n\nPlease update!!!^8");