X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Fsandbox%2Fsandbox.qc;h=cb930785921ebc0f0f760c3010f1d8c071d71c02;hb=678388b78fdaad89fc8218dadf7007432b4153c3;hp=bc4cb67752feeac8a1a9ee406446a8f4665b347d;hpb=8f04c35701fab23cf21732a4f69c02a78507dd62;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/sandbox/sandbox.qc b/qcsrc/common/mutators/mutator/sandbox/sandbox.qc index bc4cb6775..cb9307859 100644 --- a/qcsrc/common/mutators/mutator/sandbox/sandbox.qc +++ b/qcsrc/common/mutators/mutator/sandbox/sandbox.qc @@ -34,7 +34,7 @@ float object_count; .string material; .float touch_timer; -void sandbox_ObjectFunction_Touch(entity this) +void sandbox_ObjectFunction_Touch(entity this, entity toucher) { // apply material impact effects @@ -46,7 +46,7 @@ void sandbox_ObjectFunction_Touch(entity this) // make particle count and sound volume depend on impact speed float intensity; - intensity = vlen(this.velocity) + vlen(other.velocity); + intensity = vlen(this.velocity) + vlen(toucher.velocity); if(intensity) // avoid divisions by 0 intensity /= 2; // average the two velocities if (!(intensity >= autocvar_g_sandbox_object_material_velocity_min))