X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fclient.qc;h=d706f8107313d65e8951fb674b9799186bd18fc7;hp=01b5055cdb8ba509a57444c80db5ea7b9f671a72;hb=bc50c2d7ca3e0a44ed1712400ef8e170e6df8210;hpb=63b6be263ca5233c13a047ed20950494b53602ba diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 01b5055cdb..d706f81073 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -152,10 +152,15 @@ void ClientData_Detach(entity this) void ClientData_Touch(entity e) { - CS(e).clientdata.SendFlags = 1; + entity cd = CS(e).clientdata; + if (cd) { cd.SendFlags = 1; } // make it spectatable - FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != e && IS_SPEC(it) && it.enemy == e, { CS(it).clientdata.SendFlags = 1; }); + FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != e && IS_SPEC(it) && it.enemy == e, + { + entity cd = CS(it).clientdata; + if (cd) { cd.SendFlags = 1; } + }); } void SetSpectatee(entity this, entity spectatee); @@ -1343,8 +1348,8 @@ void ClientDisconnect(entity this) MUTATOR_CALLHOOK(ClientDisconnect, this); - if (CS(this).netname_previous) strunzone(CS(this).netname_previous); // needs to be before the CS entity is removed! - if (CS(this).weaponorder_byimpulse) strunzone(CS(this).weaponorder_byimpulse); + strfree(CS(this).netname_previous); // needs to be before the CS entity is removed! + strfree(CS(this).weaponorder_byimpulse); ClientState_detach(this); Portal_ClearAll(this); @@ -1364,7 +1369,7 @@ void ClientDisconnect(entity this) bot_relinkplayerlist(); - if (this.clientstatus) strunzone(this.clientstatus); + strfree(this.clientstatus); if (this.personal) delete(this.personal); this.playerid = 0; @@ -1487,7 +1492,7 @@ void player_powerups(entity this) Fire_ApplyDamage(this); Fire_ApplyEffect(this); - if (!g_instagib) + if (!autocvar_g_instagib) { if (this.items & ITEM_Strength.m_itemid) { @@ -2474,8 +2479,7 @@ void PlayerPreThink (entity this) } if (!assume_unchanged && autocvar_sv_eventlog) GameLogEcho(strcat(":name:", ftos(this.playerid), ":", playername(this, false))); - if (CS(this).netname_previous) strunzone(CS(this).netname_previous); - CS(this).netname_previous = strzone(this.netname); + strcpy(CS(this).netname_previous, this.netname); } // version nagging