14 {
15 if (player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS)
16 return false;
17
18 BoatScript boat = BoatScript.Cast(target.GetObject());
19 if (!boat)
20 return false;
21
22 if (
GetGame().IsDedicatedServer())
23 return true;
24
25 string damageZone = "";
26 array<string> selections = new array<string>();
27 boat.GetActionComponentNameList(target.GetComponentIndex(), selections);
28
29 foreach (string selection : selections)
30 {
31 if (boat && DamageSystem.GetDamageZoneFromComponentName(boat, selection, damageZone))
32 {
33 if (damageZone == "Engine")
34 continue;
35
36 int zoneHP = boat.GetHealthLevel(damageZone);
37 if (zoneHP > GameConstants.STATE_WORN && zoneHP < GameConstants.STATE_RUINED)
38 {
40 return true;
41 }
42 }
43 }
44
45 return false;
46 }
string m_CurrentDamageZone
proto native CGame GetGame()