// metal impact effect
// used in qcsrc/server/mutators/sandbox.qc: pointparticles(particleeffectnum("impact_metal"), self.origin, '0 0 0', 1);
effect impact_metal
-countabsolute 1
+count 1
type alphastatic
tex 0 8
size 3 6
// stone impact effect
// used in qcsrc/server/mutators/sandbox.qc: pointparticles(particleeffectnum("impact_stone"), self.origin, '0 0 0', 1);
effect impact_stone
-countabsolute 1
+count 1
type alphastatic
tex 0 8
size 3 6
// debris
effect impact_stone
notunderwater
-count 2
+count 1
type alphastatic
tex 66 68
color 0x000000 0x886644
// wood impact effect
// used in qcsrc/server/mutators/sandbox.qc: pointparticles(particleeffectnum("impact_wood"), self.origin, '0 0 0', 1);
effect impact_wood
-countabsolute 1
+count 1
type alphastatic
tex 0 8
size 3 6
// flesh impact effect
// used in qcsrc/server/mutators/sandbox.qc: pointparticles(particleeffectnum("impact_flesh"), self.origin, '0 0 0', 1);
effect impact_flesh
-countabsolute 0.5
+count 0.5
type alphastatic
tex 0 8
size 8 12
// make particle count and sound volume depend on impact speed
float intensity;
intensity = vlen(self.velocity) + vlen(other.velocity);
- if(intensity) // check this first to avoid divisions by 0
+ if(intensity) // avoid divisions by 0
intensity /= 2; // average the two velocities
if not(intensity >= autocvar_g_sandbox_object_material_velocity_min)
return; // impact not strong enough to do anything
// now offset intensity and apply it to the effects
+ intensity -= autocvar_g_sandbox_object_material_velocity_min; // start from minimum velocity, not actual velocity
intensity = bound(0, intensity * autocvar_g_sandbox_object_material_velocity_factor, 1);
switch(self.material)