From 3c6eba44e4fce80faabaf188fb13044b648c7f05 Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Wed, 3 Feb 2021 16:21:36 -0600 Subject: [PATCH] Various fixes --- objects/oClient.object.gmx | 11 +++++++++++ objects/oDoor.object.gmx | 31 +++++++++++-------------------- objects/oMusicV2.object.gmx | 6 ++++++ objects/oScanning.object.gmx | 2 +- scripts/draw_character_ext.gml | 5 +++-- scripts/update_variables.gml | 32 ++++++++++++++++++++++++++++++++ 6 files changed, 64 insertions(+), 23 deletions(-) diff --git a/objects/oClient.object.gmx b/objects/oClient.object.gmx index 4765f0e5..751ecabe 100644 --- a/objects/oClient.object.gmx +++ b/objects/oClient.object.gmx @@ -1523,6 +1523,17 @@ switch(type_event){ var clientMapX = buffer_read(_buffer, buffer_s16); var clientMapY = buffer_read(_buffer, buffer_s16); var findsocket = ds_list_find_index(roomList, clientID); + if(instance_exists(oCharacter)){ + if(clientRoom == rm_death){ + if(oCharacter.state != oCharacter.DEFEATED){ + oCharacter.alarm[0] = 6; + oCharacter.state = oCharacter.DEFEATED; + mus_current_fadeout(); + sfx_stop_all(); + } + } + } + if(clientRoom == room && global.clientID != clientID){ sameRoom = true; } else if(clientRoom != room && global.clientID != clientID && (clientRoom != rm_options && clientRoom != itemroom && clientRoom != subscreenroom && clientRoom != maproom && clientRoom != rm_subscreen)){ diff --git a/objects/oDoor.object.gmx b/objects/oDoor.object.gmx index 5ae3d72c..5d56a913 100644 --- a/objects/oDoor.object.gmx +++ b/objects/oDoor.object.gmx @@ -212,46 +212,37 @@ if (open == 0) { if(room == rm_a7b05){ if(instance_number(oMonster) == 0){ - if(lock == 4){ - lock = 0; - open = 1; - } + event_user(3); } } if(room == rm_a7b06){ if(instance_number(oMonster) == 0){ - if(lock == 4){ - lock = 0; - open = 1; - } + event_user(3); + } +} + +if(room == rm_a7b06A){ + if(instance_number(oMonster) == 0){ + event_user(3); } } if(room == rm_a7b07){ if(instance_number(oMonster) == 0){ - if(lock == 4){ - lock = 0; - open = 1; - } + event_user(3); } } if(room == rm_a7b08){ if(instance_number(oMonster) == 0){ - if(lock == 4){ - lock = 0; - open = 1; - } + event_user(3); } } if(room == rm_a7b08A){ if(instance_number(oMonster) == 0){ - if(lock == 4){ - lock = 0; - open = 1; - } + event_user(3); } } diff --git a/objects/oMusicV2.object.gmx b/objects/oMusicV2.object.gmx index ddb8464f..e638cefb 100644 --- a/objects/oMusicV2.object.gmx +++ b/objects/oMusicV2.object.gmx @@ -160,6 +160,8 @@ if (!instance_exists(oQueenFireball) && !sfx_isplaying(musQueen3)) { mus_play(musQueen3); oMusicV2.bossbgm = musQueen3; + mus_stop(musQueen); + mus_stop(musQueen2); } } else @@ -195,6 +197,8 @@ if (!instance_exists(oQueenFireball) && !sfx_isplaying(musQueen2)) { mus_play(musQueen2); oMusicV2.bossbgm = musQueen2; + mus_stop(musQueen); + mus_stop(musQueen3); } } else @@ -227,6 +231,8 @@ else if (instance_exists(oQueen) || global.ingame == false) { mus_play(musQueen); oMusicV2.bossbgm = musQueen; + mus_stop(musQueen2); + mus_stop(musQueen3); } } else alarm[5] = 1; diff --git a/objects/oScanning.object.gmx b/objects/oScanning.object.gmx index 9b931080..e781cfad 100644 --- a/objects/oScanning.object.gmx +++ b/objects/oScanning.object.gmx @@ -28,7 +28,7 @@ image_alpha = 0; image_speed = 0.25; fadeout = 0; -xoffset = 3; +xoffset = 10; yoffset = 232; moreThanOne = false; diff --git a/scripts/draw_character_ext.gml b/scripts/draw_character_ext.gml index 0fc2a902..e4c4954d 100644 --- a/scripts/draw_character_ext.gml +++ b/scripts/draw_character_ext.gml @@ -28,8 +28,9 @@ if(oControl.mod_fusion){ draw_sprite_ext(argument0, argument14, argument1, argument2, argument10, 1, 0, argument11, argument12); draw_sprite_ext(argument3, argument14, argument1 + argument4, argument2 + argument5, argument10, 1, 0, argument11, argument12); -shader_reset(); -pal_swap_reset(); +pal_swap_set(sPalMultitroidNew, ID, false); if (argument13 == 1) { draw_sprite_ext(argument6, argument14, argument1 + argument7, argument2 + argument8, argument10, 1, argument9, argument11, argument12); } +shader_reset(); +pal_swap_reset(); \ No newline at end of file diff --git a/scripts/update_variables.gml b/scripts/update_variables.gml index e506eafa..4d5b62c6 100644 --- a/scripts/update_variables.gml +++ b/scripts/update_variables.gml @@ -156,6 +156,22 @@ switch(argument0){ if(global.onlineReceived[# 2, i] == 13 && global.receivedClientID != global.clientID){ global.spacejump = global.onlineReceived[# 1, i]; + if(sfx_isplaying(sndSpinJump)){ + sfx_stop(sndSpinJump); + } + + if(sfx_isplaying(sndSpaceJump)){ + sfx_stop(sndSpaceJump); + } + + if(sfx_isplaying(sndScrewAttack)){ + sfx_stop(sndScrewAttack); + } + + if(sfx_isplaying(sndSpaceScrewAttack)){ + sfx_stop(sndSpaceScrewAttack); + } + if(global.spacejumpPrev != global.spacejump){ global.spacejumpPrev = global.spacejump; } @@ -170,6 +186,22 @@ switch(argument0){ if(global.onlineReceived[# 2, i] == 14 && global.receivedClientID != global.clientID){ global.screwattack = global.onlineReceived[# 1, i]; + if(sfx_isplaying(sndSpinJump)){ + sfx_stop(sndSpinJump); + } + + if(sfx_isplaying(sndSpaceJump)){ + sfx_stop(sndSpaceJump); + } + + if(sfx_isplaying(sndScrewAttack)){ + sfx_stop(sndScrewAttack); + } + + if(sfx_isplaying(sndSpaceScrewAttack)){ + sfx_stop(sndSpaceScrewAttack); + } + if(global.screwattackPrev != global.screwattack){ global.screwattackPrev = global.screwattack; }