Advertisement
MageKing17

aiturret.cpp.patch

Feb 7th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.84 KB | None | 0 0
  1. Index: code/ai/aiturret.cpp
  2. ===================================================================
  3. --- code/ai/aiturret.cpp    (revision 11238)
  4. +++ code/ai/aiturret.cpp    (working copy)
  5. @@ -1870,8 +1870,18 @@
  6.             fire_info.turret = turret;
  7.  
  8.             // fire a beam weapon
  9. -           beam_fire(&fire_info);
  10. +           weapon_objnum = beam_fire(&fire_info);
  11.  
  12. +           if (weapon_objnum != -1) {
  13. +               objp = &Objects[weapon_objnum];
  14. +
  15. +               parent_ship->last_fired_turret = turret;
  16. +               turret->last_fired_weapon_info_index = turret_weapon_class;
  17. +
  18. +               Script_system.SetHookObjects(3, "Ship", &Objects[parent_objnum], "Weapon", objp, "Target", &Objects[turret->turret_enemy_objnum]);
  19. +               Script_system.RunCondition(CHA_ONTURRETFIRED, 0, NULL, &Objects[parent_objnum]);
  20. +           }
  21. +
  22.             turret->flags |= SSF_HAS_FIRED; //set fired flag for scripting -nike
  23.             return true;
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement