From 7547c661945c578157a931235e93311ccbebd381 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 2 Mar 2017 01:32:46 +1000 Subject: [PATCH] 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) --- qcsrc/common/ent_cs.qc | 4 ++++ qcsrc/server/client.qh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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) -- 2.39.2