]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 2a1168eae017978fe7f56d72004bda716fc49344..1ffb45178d86684bbabd7f9c86cce1a8507d1229 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));