diff --git a/config/symbols.yml b/config/symbols.yml index 6af08e1..3f01dee 100644 --- a/config/symbols.yml +++ b/config/symbols.yml @@ -5595,7 +5595,7 @@ global: 0x80c834e8: danCountdownDone 0x80c834f8: evt_dan_start_countdown 0x80c83528: danCheckKeyInMapBbox - 0x80c83618: danCheckKeyEnemyInMapBbox + 0x80c83618: danCheckEnemyInMapBbox 0x80c83744: evt_dan_handle_key_failsafe 0x80c8387c: evt_dan_handle_chest_room_dokans_and_doors 0x80c83928: evt_dan_get_chest_room_item diff --git a/rel/dan.c b/rel/dan.c index 3813d7b..7bf2916 100644 --- a/rel/dan.c +++ b/rel/dan.c @@ -662,7 +662,7 @@ bool danCheckKeyInMapBbox() return false; } -bool danCheckKeyEnemyInMapBbox() +bool danCheckEnemyInMapBbox() { // Get the enemy list NPCWork * npcWp = npcGetWorkPtr(); @@ -680,7 +680,7 @@ bool danCheckKeyEnemyInMapBbox() min.y += 5.0f; min.z += 5.0f; - // Check whether any NPC is an enemy with the key within valid coordinates + // Check whether any NPC is within valid coordinates s32 npcCount = npcWp->num; s32 i; for (i = 0; i < npcCount; i++, npc++) @@ -710,7 +710,7 @@ s32 evt_dan_handle_key_failsafe(EvtEntry * entry, bool isFirstCall) // Check whether the key exists anywhere if ( - !danCheckKeyEnemyInMapBbox() && !danCheckKeyInMapBbox() && + !danCheckEnemyInMapBbox() && !danCheckKeyInMapBbox() && !pouchCheckHaveItem(ITEM_ID_KEY_DAN_KEY) && !pouchCheckHaveItem(ITEM_ID_KEY_URA_DAN_KEY) && !itemCheckForId(ITEM_ID_KEY_DAN_KEY) && !itemCheckForId(ITEM_ID_KEY_URA_DAN_KEY) ) diff --git a/spm-headers/include/spm/rel/dan.h b/spm-headers/include/spm/rel/dan.h index 0ecbc70..14e7139 100644 --- a/spm-headers/include/spm/rel/dan.h +++ b/spm-headers/include/spm/rel/dan.h @@ -206,9 +206,9 @@ EVT_DECLARE_USER_FUNC(evt_dan_start_countdown, 0) bool danCheckKeyInMapBbox(); /* - Returns whether an enemy holding the key exists within the map boundaries + Returns whether any enemy exists within the map boundaries */ -bool danCheckKeyEnemyInMapBbox(); +bool danCheckEnemyInMapBbox(); /* user_func that runs endlessly in a parallel script to spawn the key at the door diff --git a/spm-headers/linker/spm.eu0.lst b/spm-headers/linker/spm.eu0.lst index b5a3b9e..e233fad 100644 --- a/spm-headers/linker/spm.eu0.lst +++ b/spm-headers/linker/spm.eu0.lst @@ -696,7 +696,7 @@ 1,1,3dbec:danCountdownDone 1,1,3dbfc:evt_dan_start_countdown 1,1,3dc2c:danCheckKeyInMapBbox -1,1,3dd1c:danCheckKeyEnemyInMapBbox +1,1,3dd1c:danCheckEnemyInMapBbox 1,1,3de48:evt_dan_handle_key_failsafe 1,1,3df80:evt_dan_handle_chest_room_dokans_and_doors 1,1,3e02c:evt_dan_get_chest_room_item diff --git a/spm-headers/linker/spm.jp0.lst b/spm-headers/linker/spm.jp0.lst index 1a5bdda..d5dcb84 100644 --- a/spm-headers/linker/spm.jp0.lst +++ b/spm-headers/linker/spm.jp0.lst @@ -400,7 +400,7 @@ 1,1,3d438:danCountdownDone 1,1,3d448:evt_dan_start_countdown 1,1,3d478:danCheckKeyInMapBbox -1,1,3d568:danCheckKeyEnemyInMapBbox +1,1,3d568:danCheckEnemyInMapBbox 1,1,3d694:evt_dan_handle_key_failsafe 1,1,3d7cc:evt_dan_handle_chest_room_dokans_and_doors 1,1,3d878:evt_dan_get_chest_room_item diff --git a/spm-headers/linker/spm.jp1.lst b/spm-headers/linker/spm.jp1.lst index f4925e2..b211f65 100644 --- a/spm-headers/linker/spm.jp1.lst +++ b/spm-headers/linker/spm.jp1.lst @@ -400,7 +400,7 @@ 1,1,3d438:danCountdownDone 1,1,3d448:evt_dan_start_countdown 1,1,3d478:danCheckKeyInMapBbox -1,1,3d568:danCheckKeyEnemyInMapBbox +1,1,3d568:danCheckEnemyInMapBbox 1,1,3d694:evt_dan_handle_key_failsafe 1,1,3d7cc:evt_dan_handle_chest_room_dokans_and_doors 1,1,3d878:evt_dan_get_chest_room_item diff --git a/spm-headers/linker/spm.kr0.lst b/spm-headers/linker/spm.kr0.lst index f2eb6a7..f046725 100644 --- a/spm-headers/linker/spm.kr0.lst +++ b/spm-headers/linker/spm.kr0.lst @@ -390,7 +390,7 @@ 1,1,3dd0c:danCountdownDone 1,1,3dd1c:evt_dan_start_countdown 1,1,3dd4c:danCheckKeyInMapBbox -1,1,3de3c:danCheckKeyEnemyInMapBbox +1,1,3de3c:danCheckEnemyInMapBbox 1,1,3df68:evt_dan_handle_key_failsafe 1,1,3e0a0:evt_dan_handle_chest_room_dokans_and_doors 1,1,3e14c:evt_dan_get_chest_room_item diff --git a/spm-headers/linker/spm.us0.lst b/spm-headers/linker/spm.us0.lst index 3f09501..8e62f0d 100644 --- a/spm-headers/linker/spm.us0.lst +++ b/spm-headers/linker/spm.us0.lst @@ -400,7 +400,7 @@ 1,1,3d438:danCountdownDone 1,1,3d448:evt_dan_start_countdown 1,1,3d478:danCheckKeyInMapBbox -1,1,3d568:danCheckKeyEnemyInMapBbox +1,1,3d568:danCheckEnemyInMapBbox 1,1,3d694:evt_dan_handle_key_failsafe 1,1,3d7cc:evt_dan_handle_chest_room_dokans_and_doors 1,1,3d878:evt_dan_get_chest_room_item diff --git a/spm-headers/linker/spm.us1.lst b/spm-headers/linker/spm.us1.lst index 0b701fe..1c1b490 100644 --- a/spm-headers/linker/spm.us1.lst +++ b/spm-headers/linker/spm.us1.lst @@ -400,7 +400,7 @@ 1,1,3d438:danCountdownDone 1,1,3d448:evt_dan_start_countdown 1,1,3d478:danCheckKeyInMapBbox -1,1,3d568:danCheckKeyEnemyInMapBbox +1,1,3d568:danCheckEnemyInMapBbox 1,1,3d694:evt_dan_handle_key_failsafe 1,1,3d7cc:evt_dan_handle_chest_room_dokans_and_doors 1,1,3d878:evt_dan_get_chest_room_item diff --git a/spm-headers/linker/spm.us2.lst b/spm-headers/linker/spm.us2.lst index 9dd446d..556ffb1 100644 --- a/spm-headers/linker/spm.us2.lst +++ b/spm-headers/linker/spm.us2.lst @@ -400,7 +400,7 @@ 1,1,3d494:danCountdownDone 1,1,3d4a4:evt_dan_start_countdown 1,1,3d4d4:danCheckKeyInMapBbox -1,1,3d5c4:danCheckKeyEnemyInMapBbox +1,1,3d5c4:danCheckEnemyInMapBbox 1,1,3d6f0:evt_dan_handle_key_failsafe 1,1,3d828:evt_dan_handle_chest_room_dokans_and_doors 1,1,3d8d4:evt_dan_get_chest_room_item