From: Mario Date: Wed, 1 Mar 2017 15:32:46 +0000 (+1000) Subject: Unzone and reset netname & model to null when removing entcs (potential fix for the... X-Git-Tag: xonotic-v0.8.2~160 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7547c661945c578157a931235e93311ccbebd381;p=xonotic%2Fxonotic-data.pk3dir.git Unzone and reset netname & model to null when removing entcs (potential fix for the bot names in spectator list bug), also re-hardcode reference to mega erebus (fixes fopen warning) --- diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index 419bbb6a1..f308530d5 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -154,6 +154,10 @@ MACRO_END int n = this.sv_entnum; entity e = entcs_receiver(n); entcs_receiver(n, NULL); + if (e.netname) strunzone(e.netname); + e.netname = string_null; + if (e.model) strunzone(e.model); + e.model = string_null; if (e != this) delete(e); } diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 37e5eeb94..c2317aff0 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -53,7 +53,7 @@ CLASS(Client, Object) CONSTRUCT(Client); this.netname = name; this.netaddress = "local"; - this.playermodel = cvar_defstring("sv_defaultplayermodel"); + this.playermodel = "models/player/megaerebus.iqm"; } ENDCLASS(Client)