Skip to content

Commit

Permalink
fix: Potential array issue with self-healing ships (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
OH296 authored and EttyKitty committed Jan 25, 2025
1 parent 4b48958 commit b35a92c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion objects/obj_controller/Alarm_5.gml
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,8 @@ for(var c=0; c<11; c++){
// STC Bonuses
if (obj_controller.stc_ships>=6){
//self healing ships logic
for(var v=0; v<array_length(obj_ini.ship_hp); v++){
for (var v=0; v<array_length(obj_ini.ship_hp); v++){
if (obj_ini.ship[v]=="" || obj_ini.ship_hp[v]<0) then continue;
if (obj_ini.ship_hp[v]<obj_ini.ship_maxhp[v]){
var _max = obj_ini.ship_maxhp[v];
obj_ini.ship_hp[v] = min(_max,obj_ini.ship_hp[v]+round(_max*0.06));
Expand Down

0 comments on commit b35a92c

Please sign in to comment.