Skip to content

Commit dab9a41

Browse files
committed
remove redundant check
1 parent b93d30e commit dab9a41

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

code/weapon/weapons.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4093,9 +4093,8 @@ void find_homing_object(object *weapon_objp, int num)
40934093
continue;
40944094

40954095
homing_object_team = obj_team(objp);
4096-
bool can_lock_on_ship = objp->type != OBJ_SHIP || weapon_allowed_lock_restriction_object(wip, objp);
40974096
bool can_attack = weapon_has_iff_restrictions(wip) || iff_x_attacks_y(wp->team, homing_object_team);
4098-
if (can_lock_on_ship && can_attack)
4097+
if (weapon_allowed_lock_restriction_object(wip, objp) && can_attack)
40994098
{
41004099
if ( objp->type == OBJ_SHIP )
41014100
{

0 commit comments

Comments
 (0)