45 {
46
47
48 bool do_glow = true;
49
50 if ( IsDamageDestroyed() )
51 {
52 do_glow = false;
53 }
54 else
55 {
56 int id = InventorySlots.HEADGEAR;
57 InventoryLocation IL = new InventoryLocation();
58 GetInventory().GetCurrentInventoryLocation( IL );
59
61 int id_cargo = IL.
GetIdx();
62
63 if ( id == id_2)
64 do_glow = false;
65
66 if ( id_cargo != -1 )
67 do_glow = false;
68 }
69
70 SetPilotLight(do_glow);
71 }
proto native int GetSlot()
returns slot id if current type is Attachment
proto native int GetIdx()
returns index of cargo if current type is Cargo / ProxyCargo