X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fsandbox.qc;h=a5d925d103e4d5224a34df74ef1e89b345883caf;hb=5b22584122d4354ab7819853d0fa5219d14d832e;hp=273e25e3f959df6da6bb578f1c921035aef79a5b;hpb=716ff3ef08bec1385bfa04c0470ce7c332cb01e7;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index 273e25e3f..a5d925d10 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -10,7 +10,7 @@ float object_count; .float touch_timer; void sandbox_ObjectFunction_Touch() -{ +{SELFPARAM(); // apply material impact effects if(!self.material) @@ -35,7 +35,7 @@ void sandbox_ObjectFunction_Touch() } void sandbox_ObjectFunction_Think() -{ +{SELFPARAM(); entity e; // decide if and how this object can be grabbed @@ -61,12 +61,12 @@ void sandbox_ObjectFunction_Think() self.nextthink = time; - CSQCMODEL_AUTOUPDATE(); + CSQCMODEL_AUTOUPDATE(self); } .float old_solid, old_movetype; entity sandbox_ObjectEdit_Get(float permissions) -{ +{SELFPARAM(); // Returns the traced entity if the player can edit it, and world if not. // If permissions if false, the object is returned regardless of editing rights. // Attached objects are SOLID_NOT and do not get traced. @@ -140,7 +140,7 @@ void sandbox_ObjectAttach_Remove(entity e) } entity sandbox_ObjectSpawn(float database) -{ +{SELFPARAM(); // spawn a new object with default properties entity e, oldself; @@ -181,7 +181,7 @@ entity sandbox_ObjectSpawn(float database) oldself = self; self = e; - CSQCMODEL_AUTOINIT(); + CSQCMODEL_AUTOINIT(self); self = oldself; object_count += 1; @@ -424,7 +424,7 @@ void sandbox_Database_Load() } MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) -{ +{SELFPARAM(); if(MUTATOR_RETURNVALUE) // command was already handled? return false; if(cmd_name == "g_sandbox")