mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-09-05 11:37:28 -04:00
Various cleanup
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/Enhancements/randomizer/draw.h"
|
||||
#include "soh/Enhancements/Holiday/Fredomato.h"
|
||||
#include "soh/ResourceManagerHelpers.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -543,7 +543,9 @@ u16 func_80A6F810(PlayState* play, Actor* thisx) {
|
||||
return 0x5058;
|
||||
}
|
||||
case ENHY_TYPE_BOB_18:
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (CVarGetInteger("gHoliday.Fredomato.TreeChopper", 0)) {
|
||||
return 0x505e;
|
||||
} else if (!LINK_IS_ADULT) {
|
||||
return (Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ? 0x505F : ((Flags_GetInfTable(INFTABLE_163)) ? 0x505E : 0x505D);
|
||||
} else {
|
||||
return (this->unk_330 & 0x800) ? 0x5062 : ((Flags_GetInfTable(INFTABLE_164)) ? 0x5061 : 0x5060);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "z_en_wood02.h"
|
||||
#include "objects/object_wood02/object_wood02.h"
|
||||
#include "soh/Enhancements/Holiday/Fredomato.h"
|
||||
|
||||
#define FLAGS 0
|
||||
|
||||
@@ -368,7 +369,9 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) {
|
||||
dropsSpawnPt = this->actor.world.pos;
|
||||
dropsSpawnPt.y += 200.0f;
|
||||
|
||||
if ((this->unk_14C >= 0) && (this->unk_14C < 0x64) && (CVarGetInteger(CVAR_ENHANCEMENT("TreesDropSticks"), 0)) && !(INV_CONTENT(ITEM_STICK) == ITEM_NONE)) {
|
||||
if (HandleTreeBonk(&this->actor)) {
|
||||
// no-op
|
||||
} else if ((this->unk_14C >= 0) && (this->unk_14C < 0x64) && (CVarGetInteger(CVAR_ENHANCEMENT("TreesDropSticks"), 0)) && !(INV_CONTENT(ITEM_STICK) == ITEM_NONE)) {
|
||||
(numDrops = (Rand_ZeroOne() * 4));
|
||||
for (i = 0; i < numDrops; ++i) {
|
||||
Item_DropCollectible(play, &dropsSpawnPt, ITEM00_STICK);
|
||||
|
||||
@@ -6265,11 +6265,16 @@ s32 func_8083BBA0(Player* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void Player_SetupRoll(Player* this, PlayState* play) {
|
||||
if (!GameInteractor_Should(VB_PLAYER_ROLL, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Player_SetupAction(play, this, Player_Action_Roll, 0);
|
||||
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime,
|
||||
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_landing_roll, this->modelAnimType),
|
||||
1.25f * sWaterSpeedFactor);
|
||||
gSaveContext.sohStats.count[COUNT_ROLLS]++;
|
||||
GameInteractor_ExecuteOnPlayerRoll();
|
||||
}
|
||||
|
||||
s32 Player_TryRoll(Player* this, PlayState* play) {
|
||||
@@ -8554,6 +8559,16 @@ void Player_Action_808414F8(Player* this, PlayState* play) {
|
||||
}
|
||||
|
||||
Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play);
|
||||
|
||||
int32_t giSpeedModifier = GameInteractor_RunSpeedModifier();
|
||||
if (giSpeedModifier != 0) {
|
||||
if (giSpeedModifier > 0) {
|
||||
speedTarget *= giSpeedModifier;
|
||||
} else {
|
||||
speedTarget /= abs(giSpeedModifier);
|
||||
}
|
||||
}
|
||||
|
||||
sp2C = func_8083FD78(this, &speedTarget, &yawTarget, play);
|
||||
|
||||
if (sp2C >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user