You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: code/scripting/hook_conditions.cpp
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -249,7 +249,9 @@ HOOK_CONDITIONS_END
249
249
250
250
HOOK_CONDITIONS_START(WeaponUsedConditions)
251
251
HOOK_CONDITION_SHIPP(WeaponUsedConditions, "that fired the weapon.", user_shipp);
252
-
HOOK_CONDITION(WeaponUsedConditions, "Weapon class", "Specifies the class of the weapon that was fired.", weaponclass, conditionParseWeaponClass, std::equal_to<int>());
252
+
HOOK_CONDITION(WeaponUsedConditions, "Weapon class", "Specifies the class of the weapon that was fired.", weaponclasses, conditionParseWeaponClass, [](const SCP_vector<int>& weaponclass_list, constint& weaponclass) -> bool {
Copy file name to clipboardExpand all lines: code/ship/ship.cpp
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12537,18 +12537,22 @@ int ship_fire_primary(object * obj, int force, bool rollback_shot)
12537
12537
if (objp == Player_obj && Player_ai->target_objnum != -1)
12538
12538
target = &Objects[Player_ai->target_objnum];
12539
12539
12540
+
SCP_vector<int> firedWeapons;
12541
+
12540
12542
for (int bank = 0; bank < MAX_SHIP_PRIMARY_BANKS; bank++) {
12541
-
if(banks_fired & (1 << bank))
12543
+
if(banks_fired & (1 << bank)) {
12542
12544
//Start Animation in Forced mode: Always restart it from its initial position rather than just flip it to FWD motion if it was still moving. This is to make it work best for uses like recoil.
0 commit comments