mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-04-28 13:17:58 +03:00
also detect underwater switch
This commit is contained in:
parent
a96adc4a9a
commit
b4c9265920
1 changed files with 9 additions and 4 deletions
|
@ -211,11 +211,16 @@ void RegisterOnInterfaceUpdateHook() {
|
|||
if ((actor->id == ACTOR_EN_ELF && actor->params == FAIRY_NAVI) ||
|
||||
actor->id == ACTOR_SHOT_SUN)
|
||||
continue;
|
||||
if (actor->id == ACTOR_EN_ITEM00 && (player->stateFlags1 & PLAYER_STATE1_IN_WATER) &&
|
||||
player->currentBoots != PLAYER_BOOTS_IRON && actor->xzDistToPlayer < 40 &&
|
||||
if (actor->xzDistToPlayer < 40 && (player->stateFlags1 & PLAYER_STATE1_IN_WATER) &&
|
||||
player->currentBoots != PLAYER_BOOTS_IRON &&
|
||||
actor->world.pos.z < player->actor.world.pos.z) {
|
||||
SpeechSynthesizer::Instance->Speak("item below", "en-US");
|
||||
goto spoke;
|
||||
if (actor->id == ACTOR_EN_ITEM00) {
|
||||
SpeechSynthesizer::Instance->Speak("item below", "en-US");
|
||||
goto spoke;
|
||||
} else if (actor->id == ACTOR_OBJ_SWITCH) {
|
||||
SpeechSynthesizer::Instance->Speak("switch below", "en-US");
|
||||
goto spoke;
|
||||
}
|
||||
}
|
||||
u16 reverseYaw = (actor->yawTowardsPlayer + 0x8000) - player->actor.world.rot.y;
|
||||
if ((reverseYaw < 0x2000 || reverseYaw > 0xE000) && actor->xyzDistToPlayerSq < minDist) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue