Skip to content

Commit 184a583

Browse files
committed
Merge pull request #459 from MageKing17/bugfix/support-subsystem-repair
Fix support subsystem repair rate (for real this time).
2 parents fd66a43 + 039359e commit 184a583

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

code/ship/ship.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13686,14 +13686,12 @@ int ship_do_rearm_frame( object *objp, float frametime )
1368613686
}
1368713687

1368813688
// figure out repairs for subsystems
13689-
if(repair_allocated > 0) {
13690-
if(sip->sup_subsys_repair_rate == 0.0f)
13691-
repair_allocated = 0.0f;
13692-
else if(sip->sup_hull_repair_rate == 0.0f)
13693-
repair_allocated = shipp->ship_max_hull_strength * frametime * sip->sup_subsys_repair_rate;
13694-
else if(!(sip->sup_hull_repair_rate == sip->sup_subsys_repair_rate))
13695-
repair_allocated = repair_allocated * sip->sup_subsys_repair_rate / sip->sup_hull_repair_rate;
13696-
}
13689+
if(sip->sup_subsys_repair_rate == 0.0f)
13690+
repair_allocated = 0.0f;
13691+
else if(sip->sup_hull_repair_rate == 0.0f)
13692+
repair_allocated = shipp->ship_max_hull_strength * frametime * sip->sup_subsys_repair_rate;
13693+
else if(!(sip->sup_hull_repair_rate == sip->sup_subsys_repair_rate))
13694+
repair_allocated = repair_allocated * sip->sup_subsys_repair_rate / sip->sup_hull_repair_rate;
1369713695

1369813696
// check the subsystems of the ship.
1369913697
subsys_all_ok = 1;

0 commit comments

Comments
 (0)