From: Mario Date: Wed, 6 Jan 2016 06:50:35 +0000 (+1000) Subject: Make sure smoke effects can't be spammed too much X-Git-Tag: xonotic-v0.8.2~1273 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c003d328cb0f8bf6b7ecd3ff2cbfa512c3cf8c0d;p=xonotic%2Fxonotic-data.pk3dir.git Make sure smoke effects can't be spammed too much --- diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 0c1574e2e..6224eca65 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -615,8 +615,8 @@ void vehicles_painframe(entity this) if(this.pain_frame < time) { float _ftmp = myhealth / 50; - this.pain_frame = time + 0.1 + (random() * 0.5 * _ftmp); - pointparticles(EFFECT_SMOKE_SMALL, (this.origin + (randomvec() * 80)), '0 0 0', 1); + this.pain_frame = time + max(0.1, 0.1 + (random() * 0.5 * _ftmp)); + Send_Effect(EFFECT_SMOKE_SMALL, (this.origin + (randomvec() * 80)), '0 0 0', 1); if(this.vehicle_flags & VHF_DMGSHAKE) this.velocity += randomvec() * 30;