From c003d328cb0f8bf6b7ecd3ff2cbfa512c3cf8c0d Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 6 Jan 2016 16:50:35 +1000 Subject: [PATCH] Make sure smoke effects can't be spammed too much --- qcsrc/common/vehicles/sv_vehicles.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2