From 96ad454ed0b43c19326ec362c27628272ba85d4c Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Sat, 20 Mar 2021 19:32:13 -0500 Subject: [PATCH] Fixed no ammo missile crash and possibly fixed death loop --- scripts/shoot_missile.gml | 2 +- scripts/sv6_load.gml | 2 ++ scripts/update_variables.gml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/shoot_missile.gml b/scripts/shoot_missile.gml index b88ccbc..6d249be 100644 --- a/scripts/shoot_missile.gml +++ b/scripts/shoot_missile.gml @@ -58,7 +58,7 @@ if (global.currentweapon == 2 && global.smissiles == 0) global.currentweapon = 1 if (global.currentweapon == 1 && global.missiles == 0) global.currentweapon = 0; if(instance_exists(oClient) && missileX != 0 && missileY != 0){ - if(ds_list_size(oClient.roomListData) >= 0){ + if(ds_list_size(oClient.roomListData) > 0){ var size, type, alignment; size = 1024; type = buffer_grow; diff --git a/scripts/sv6_load.gml b/scripts/sv6_load.gml index 7e6f2f9..1c57fd0 100644 --- a/scripts/sv6_load.gml +++ b/scripts/sv6_load.gml @@ -90,3 +90,5 @@ if (header != "[AM2R SaveData V7.0]") { } // if (header != "[AM2R SaveData V7.0]") else + +if(instance_exists(oClient)) refill_heath_ammo(); diff --git a/scripts/update_variables.gml b/scripts/update_variables.gml index 09a11f7..be27203 100644 --- a/scripts/update_variables.gml +++ b/scripts/update_variables.gml @@ -568,7 +568,7 @@ switch(argument0){ if(instance_exists(oCharacter)){ if(oCharacter.state != oCharacter.SAVINGFX && oCharacter.state != oCharacter.SAVINGSHIPFX && oCharacter.state != oCharacter.SAVINGSHIP && oCharacter.state != oCharacter.SAVING){ global.onlineList[# 1, i] = global.onlineReceived[# 1, i]; - } else if(oCharacter.state == oCharacter.SAVINGFX || oCharacter.state == oCharacter.SAVINGSHIPFX || oCharacter.state == oCharacter.SAVINGSHIP || oCharacter.state == oCharacter.SAVING){ + } else if(oCharacter.state == oCharacter.SAVINGFX || oCharacter.state == oCharacter.SAVINGSHIPFX || oCharacter.state == oCharacter.SAVINGSHIP || oCharacter.state == oCharacter.SAVING || (oCharacter.state == oCharacter.IDLE && oCharacter.juststarted > 0)){ if(global.playerhealth != global.maxhealth){ refill_heath_ammo(); }