Skip to content

Commit 78abbf8

Browse files
authored
Merge pull request scp-fs2open#1625 from Flip-Sandwich/master
Fixes electronics flag behavior with shockwaves
2 parents 4de3451 + 4797b29 commit 78abbf8

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

code/weapon/weapons.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6007,12 +6007,7 @@ void weapon_do_area_effect(object *wobjp, shockwave_create_info *sci, vec3d *pos
60076007

60086008
} // end for
60096009

6010-
// if this weapon has the "Electronics" flag set, then disrupt subsystems in sphere
6011-
if ( (other_obj != NULL) && (wip->wi_flags[Weapon::Info_Flags::Electronics]) ) {
6012-
if ( other_obj->type == OBJ_SHIP ) {
6013-
weapon_do_electronics_effect(other_obj, pos, Weapons[wobjp->instance].weapon_info_index);
6014-
}
6015-
}
6010+
60166011
}
60176012

60186013
// ----------------------------------------------------------------------
@@ -6263,6 +6258,13 @@ void weapon_hit( object * weapon_obj, object * other_obj, vec3d * hitpos, int qu
62636258
emp_apply(&weapon_obj->pos, wip->shockwave.inner_rad, wip->shockwave.outer_rad, wip->emp_intensity, wip->emp_time, (wip->wi_flags[Weapon::Info_Flags::Use_emp_time_for_capship_turrets]) != 0);
62646259
}
62656260

6261+
// if this weapon has the "Electronics" flag set, then disrupt subsystems in sphere
6262+
if ((other_obj != NULL) && (wip->wi_flags[Weapon::Info_Flags::Electronics])) {
6263+
if (other_obj->type == OBJ_SHIP) {
6264+
weapon_do_electronics_effect(other_obj, &weapon_obj->pos, Weapons[weapon_obj->instance].weapon_info_index);
6265+
}
6266+
}
6267+
62666268
// spawn weapons - note the change from FS 1 multiplayer.
62676269
if (wip->wi_flags[Weapon::Info_Flags::Spawn]){
62686270
if (!((wip->wi_flags[Weapon::Info_Flags::Dont_spawn_if_shot]) && (Weapons[num].weapon_flags[Weapon::Weapon_Flags::Destroyed_by_weapon]))){ // prevent spawning of children if shot down and the dont spawn if shot flag is set (DahBlount)

0 commit comments

Comments
 (0)