From: terencehill Date: Fri, 23 Aug 2019 13:18:43 +0000 (+0200) Subject: Fix server needlessly respawning PlayerState and Inventory entities (without deleting... X-Git-Tag: xonotic-v0.8.5~1375 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=97f9ed7a81d2b5c061880d8dbafb0d4638c1d347;p=xonotic%2Fxonotic-data.pk3dir.git Fix server needlessly respawning PlayerState and Inventory entities (without deleting old entities) every time a player respawns --- diff --git a/qcsrc/common/state.qc b/qcsrc/common/state.qc index 2a1168eae..1ffb45178 100644 --- a/qcsrc/common/state.qc +++ b/qcsrc/common/state.qc @@ -5,6 +5,9 @@ void Inventory_delete(entity this); void PlayerState_attach(entity this) { + if (PS(this)) + return; + this._ps = NEW(PlayerState, this); Inventory_new(PS(this));