Skip to content

Commit f464b30

Browse files
authored
update regen rates and autoaim fov on ship class change (#5029)
1 parent 0fb6b2a commit f464b30

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

code/ship/ship.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10955,6 +10955,12 @@ void change_ship_type(int n, int ship_type, int by_sexp)
1095510955
Assert(sp->ship_max_hull_strength > 0.0f);
1095610956
Assert(objp->hull_strength > 0.0f);
1095710957

10958+
// set regen rates
10959+
sp->max_weapon_regen_per_second = sip->max_weapon_regen_per_second;
10960+
sp->max_shield_regen_per_second = sip->max_shield_regen_per_second;
10961+
10962+
sp->autoaim_fov = sip->autoaim_fov;
10963+
1095810964
// Mantis 2763: moved down to have access to the right ship_max_shield_strength value
1095910965
// make sure that shields are disabled/enabled if they need to be - Chief1983
1096010966
if (!Fred_running) {

0 commit comments

Comments
 (0)