11 [
Attribute(
"10",
desc:
"Min. weight that can set off this trigger when applied to it. [kg]")]
15 override void EOnContact(IEntity owner, IEntity other, Contact contact)
20 Physics otherPhysics = other.GetPhysics();
24 float otherMass = otherPhysics.GetMass();
28 VehicleWheeledSimulation vehicleSimulation = VehicleWheeledSimulation.Cast(other.FindComponent(VehicleWheeledSimulation));
29 if (vehicleSimulation)
30 otherMass /= vehicleSimulation.WheelCount();
34 VehicleWheeledSimulation_SA vehicleSimulation = VehicleWheeledSimulation_SA.Cast(other.FindComponent(VehicleWheeledSimulation_SA));
35 if (vehicleSimulation)
36 otherMass /= vehicleSimulation.WheelCount();
45 if (!baseTriggerComponent)
65 super.ActivateTrigger();
68 RplComponent rplComponent = RplComponent.Cast(owner.FindComponent(RplComponent));
69 if (!rplComponent || rplComponent.IsProxy())
72 SetEventMask(owner, EntityEvent.CONTACT);
76 override event protected void EOnInit(IEntity owner)