mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
disable crawl speed increase if MQ Spirit boulder exists
This commit is contained in:
parent
237dcfec74
commit
88b578dd02
1 changed files with 12 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
#include <libultraship/bridge.h>
|
#include <libultraship/bridge.h>
|
||||||
|
#include "soh/ResourceManagerHelpers.h"
|
||||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||||
#include "soh/ShipInit.hpp"
|
#include "soh/ShipInit.hpp"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
@ -102,8 +103,17 @@ void CrawlSpeed_Register() {
|
||||||
|
|
||||||
COND_VB_SHOULD(VB_CRAWL_SPEED_INCREASE, shouldRegister, {
|
COND_VB_SHOULD(VB_CRAWL_SPEED_INCREASE, shouldRegister, {
|
||||||
Player* player = GET_PLAYER(gPlayState);
|
Player* player = GET_PLAYER(gPlayState);
|
||||||
|
bool isMQ = ResourceMgr_IsGameMasterQuest();
|
||||||
|
bool boulderExists = !Flags_GetSwitch(gPlayState, 5);
|
||||||
|
bool excludeSpiritMQBoulder =
|
||||||
|
(gPlayState->sceneNum == SCENE_SPIRIT_TEMPLE && player->actor.world.pos.z < -545.0f &&
|
||||||
|
player->actor.world.pos.z > -630.0f && isMQ && boulderExists);
|
||||||
|
if (excludeSpiritMQBoulder) {
|
||||||
|
*should = true;
|
||||||
|
} else {
|
||||||
IncreaseCrawlSpeed(player, gPlayState);
|
IncreaseCrawlSpeed(player, gPlayState);
|
||||||
*should = false;
|
*should = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue