mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-06-13 14:07:25 -04:00
19 lines
719 B
C++
19 lines
719 B
C++
#include <libultraship/bridge.h>
|
|
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
|
#include "soh/ShipInit.hpp"
|
|
|
|
// Dying or using Din's Fire in the Outside Temple of Time area crashes the game.
|
|
// In vanilla this can never happen, but with CrowdControl, Sail, Unrestricted Items
|
|
// and others this *can* happen. Because it checks for a camId of -1, this code path
|
|
// shouldn't ever influence vanilla play regardless.
|
|
void RegisterFixOutsideTotCrash() {
|
|
COND_VB_SHOULD(VB_SHOULD_LOAD_BG_IMAGE, true, {
|
|
int32_t* camId = va_arg(args, int*);
|
|
if (*camId == -1) {
|
|
*should = false;
|
|
}
|
|
});
|
|
}
|
|
|
|
static RegisterShipInitFunc initFunc(RegisterFixOutsideTotCrash, { "" });
|