From 97f9ed7a81d2b5c061880d8dbafb0d4638c1d347 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 23 Aug 2019 15:18:43 +0200 Subject: [PATCH] Fix server needlessly respawning PlayerState and Inventory entities (without deleting old entities) every time a player respawns --- qcsrc/common/state.qc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qcsrc/common/state.qc b/qcsrc/common/state.qc index 2a1168eae0..1ffb45178d 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)); -- 2.39.2