Fix server needlessly respawning PlayerState and Inventory entities (without deleting...
authorterencehill <piuntn@gmail.com>
Fri, 23 Aug 2019 13:18:43 +0000 (15:18 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 23 Aug 2019 13:18:43 +0000 (15:18 +0200)
qcsrc/common/state.qc

index 2a1168e..1ffb451 100644 (file)
@@ -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));