23 {
24 if (player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS)
25 return false;
26
28 if (!car)
29 {
30 return false;
31 }
32
34 {
35 return true;
36 }
37
39 {
40 string damageZone = "";
41 array<string> selections = new array<string>();
42 car.GetActionComponentNameList(target.GetComponentIndex(), selections);
43
44 foreach (string selection : selections)
45 {
46
47 if (car && DamageSystem.GetDamageZoneFromComponentName(car, selection, damageZone))
48 {
49 if (damageZone == "Engine")
50 continue;
51
52 int zoneHP = car.GetHealthLevel(damageZone);
53 if (zoneHP > GameConstants.STATE_WORN && zoneHP < GameConstants.STATE_RUINED)
54 {
57
58
59 WoodenPlank plank = WoodenPlank.Cast(item);
60 Fabric tarp = Fabric.Cast(item);
61
62
63 if ((tarp || plank) && (damageZone != "BackWood" && damageZone != "BackTarp"))
64 return false;
65
66 return true;
67 }
68 }
69 }
70 }
71
72 return false;
73 }
int m_LastValidComponentIndex
string m_CurrentDamageZone
proto native CGame GetGame()