Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: code/ai/aiturret.cpp
- ===================================================================
- --- code/ai/aiturret.cpp (revision 11238)
- +++ code/ai/aiturret.cpp (working copy)
- @@ -1870,8 +1870,18 @@
- fire_info.turret = turret;
- // fire a beam weapon
- - beam_fire(&fire_info);
- + weapon_objnum = beam_fire(&fire_info);
- + if (weapon_objnum != -1) {
- + objp = &Objects[weapon_objnum];
- +
- + parent_ship->last_fired_turret = turret;
- + turret->last_fired_weapon_info_index = turret_weapon_class;
- +
- + Script_system.SetHookObjects(3, "Ship", &Objects[parent_objnum], "Weapon", objp, "Target", &Objects[turret->turret_enemy_objnum]);
- + Script_system.RunCondition(CHA_ONTURRETFIRED, 0, NULL, &Objects[parent_objnum]);
- + }
- +
- turret->flags |= SSF_HAS_FIRED; //set fired flag for scripting -nike
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement