Adds Static Explosion Radius Enhancement

This commit is contained in:
splemb 2023-01-01 21:20:37 +00:00
parent ab104623a7
commit 27342d6c14
3 changed files with 10 additions and 2 deletions

View File

@ -173,6 +173,7 @@ const std::vector<const char*> enhancementsCvars = {
"gBombchuBowlingNoBigCucco",
"gBombchuBowlingAmmunition",
"gCreditsFix",
"gStaticExplosionRadius"
};
const std::vector<const char*> randomizerCvars = {

View File

@ -396,6 +396,8 @@ namespace GameMenuBar {
UIWidgets::Tooltip("Makes nuts explode bombs, similar to how they interact with bombchus. This does not affect bombflowers.");
UIWidgets::PaddedEnhancementCheckbox("Equip Multiple Arrows at Once", "gSeparateArrows", true, false);
UIWidgets::Tooltip("Allow the bow and magic arrows to be equipped at the same time on different slots");
UIWidgets::PaddedEnhancementCheckbox("Static Explosion Radius", "gStaticExplosionRadius", true, false);
UIWidgets::Tooltip("Explosions are now a static size, like in Majora's Mask and OoT3D. Makes bombchu hovering much easier.");
ImGui::EndMenu();
}

View File

@ -175,9 +175,14 @@ void EnBom_Explode(EnBom* this, PlayState* play) {
if (this->explosionCollider.elements[0].dim.modelSphere.radius == 0) {
this->actor.flags |= ACTOR_FLAG_5;
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96);
}
}
this->explosionCollider.elements[0].dim.worldSphere.radius += this->actor.shape.rot.z + 8;
if (CVar_GetS32("gStaticExplosionRadius", 1)) {
this->explosionCollider.elements[0].dim.worldSphere.radius = 40;
} else {
this->explosionCollider.elements[0].dim.worldSphere.radius += this->actor.shape.rot.z + 8;
}
if (this->actor.params == BOMB_EXPLOSION) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->explosionCollider.base);