cityrp.vehicledamage
Vehicle contact damage rules.
- Servercityrp.vehicledamage.scaleSlowContact(victim, damageInfo, vehicle) → booleanSource ☍
-
Replace contact damage below
Minimum Run Over Speed, scaling from zero at rest up toMaximum Contact Damage. Replaced rather than scaled because a parked vehicle's physics resolving against a player reports impulses past a lethal value, so the incoming number says nothing about how hard they were hit.Callers must skip run over handling when this returns true, and both damage hooks must call it: the
EntityTakeDamageone bails out beforehand on build servers and for godmoded, knocked out or seated victims.Parameters
- victimPlayerThe player taking the damage.
- damageInfoCTakeDamageInfoThe damage being dealt. Rewritten when the vehicle is too slow.
- vehicleEntity?Vehicle behind the damage, saving a lookup when the caller has it.
Returns
- booleanWhether the damage was replaced with a slow contact value.
- Servercityrp.vehicledamageSource ☍
-
Main table for vehicle contact damage rules.