mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-27 08:11:50 -05:00
[Fix} Small Crowd Control fixes (#2061)
This commit is contained in:
parent
1a9898b918
commit
d3bfc102fe
@ -458,7 +458,7 @@ CrowdControl::EffectResult CrowdControl::ExecuteEffect(std::string effectId, uin
|
|||||||
if (dryRun == 0) CMD_EXECUTE(fmt::format("defense_modifier {}", value));
|
if (dryRun == 0) CMD_EXECUTE(fmt::format("defense_modifier {}", value));
|
||||||
return EffectResult::Success;
|
return EffectResult::Success;
|
||||||
} else if (effectId == EFFECT_DAMAGE) {
|
} else if (effectId == EFFECT_DAMAGE) {
|
||||||
if ((gSaveContext.healthCapacity - 0x10) <= 0) {
|
if ((gSaveContext.health - (16 * value)) <= 0) {
|
||||||
return EffectResult::Failure;
|
return EffectResult::Failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,6 +482,14 @@ bool CrowdControl::SpawnEnemy(std::string effectId) {
|
|||||||
if (effectId == EFFECT_SPAWN_WALLMASTER) {
|
if (effectId == EFFECT_SPAWN_WALLMASTER) {
|
||||||
enemyId = 17;
|
enemyId = 17;
|
||||||
} else if (effectId == EFFECT_SPAWN_ARWING) {
|
} else if (effectId == EFFECT_SPAWN_ARWING) {
|
||||||
|
// Don't allow Arwings in certain areas because they cause issues.
|
||||||
|
// Locations: King dodongo room, Morpha room, Twinrova room, Ganondorf room, Fishing pond, Ganon's room
|
||||||
|
// TODO: Swap this to disabling the option in CC options menu instead.
|
||||||
|
if (gPlayState->sceneNum == SCENE_DDAN_BOSS || gPlayState->sceneNum == SCENE_MIZUSIN_BS ||
|
||||||
|
gPlayState->sceneNum == SCENE_JYASINBOSS || gPlayState->sceneNum == SCENE_GANON_BOSS ||
|
||||||
|
gPlayState->sceneNum == SCENE_TURIBORI || gPlayState->sceneNum == SCENE_GANON_DEMO) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
enemyId = 315;
|
enemyId = 315;
|
||||||
enemyParams = 1;
|
enemyParams = 1;
|
||||||
posYOffset = 100;
|
posYOffset = 100;
|
||||||
|
@ -1631,7 +1631,7 @@ namespace GameMenuBar {
|
|||||||
ImGui::PopStyleColor(1);
|
ImGui::PopStyleColor(1);
|
||||||
#ifdef ENABLE_CROWD_CONTROL
|
#ifdef ENABLE_CROWD_CONTROL
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Crowd Control", "gCrowdControl", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Crowd Control", "gCrowdControl", true, false);
|
||||||
UIWidgets::Tooltip("Requires a full SoH restart to take effect!\n\nEnables CrowdControl. Will attempt to connect to the local Crowd Control server.");
|
UIWidgets::Tooltip("Will attempt to connect to the Crowd Control server. Check out crowdcontrol.live for more information.");
|
||||||
|
|
||||||
if (CVar_GetS32("gCrowdControl", 0)) {
|
if (CVar_GetS32("gCrowdControl", 0)) {
|
||||||
CrowdControl::Instance->Enable();
|
CrowdControl::Instance->Enable();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user