Fix Tornado Defense boss firing missiles too frequently (#306)

Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
Co-authored-by: Darío <538504+DarioSamo@users.noreply.github.com>
This commit is contained in:
Hyper
2025-02-07 20:11:25 +00:00
committed by GitHub
parent 88df0e08b7
commit e1edd5f35d
7 changed files with 147 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CExStageBoss
{
public:
class CStateBase;
class CStateBattle;
class CExStageBossStateContext
{
public:
SWA_INSERT_PADDING(0x14C);
be<float> m_SplineProgress;
SWA_INSERT_PADDING(0x0C);
be<float> m_SplineSpeed;
SWA_INSERT_PADDING(0x28);
be<float> m_Field188;
be<float> m_Field18C;
SWA_INSERT_PADDING(0x21);
bool m_IsBattleStart;
SWA_INSERT_PADDING(0x36E);
be<float> m_Field520;
};
};
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_SplineProgress, 0x14C);
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_SplineSpeed, 0x15C);
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_Field188, 0x188);
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_Field18C, 0x18C);
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_IsBattleStart, 0x1B1);
SWA_ASSERT_OFFSETOF(CExStageBoss::CExStageBossStateContext, m_Field520, 0x520);
}

View File

@@ -0,0 +1,9 @@
#pragma once
#include <SWA.inl>
#include "SWA/ExtraStage/Tails/Enemy/Boss/ExStageBoss.h"
namespace SWA
{
class CExStageBoss::CStateBase : public Hedgehog::Universe::CStateMachineBase::CStateBase {};
}

View File

@@ -0,0 +1,18 @@
#pragma once
#include <SWA.inl>
#include "SWA/ExtraStage/Tails/Enemy/Boss/ExStageBoss.h"
namespace SWA
{
class CExStageBoss::CStateBattle : public CExStageBoss::CStateBase
{
public:
SWA_INSERT_PADDING(0x08);
be<float> m_Field68;
be<float> m_FramesSinceLastMissile;
};
SWA_ASSERT_OFFSETOF(CExStageBoss::CStateBattle, m_Field68, 0x68);
SWA_ASSERT_OFFSETOF(CExStageBoss::CStateBattle, m_FramesSinceLastMissile, 0x6C);
}

View File

@@ -0,0 +1,35 @@
#pragma once
#include <SWA.inl>
namespace SWA
{
class CExPlayerTails
{
public:
class CExPlayerTailsStateContext
{
public:
SWA_INSERT_PADDING(0x1F8);
be<float> m_SplineBossStart;
be<float> m_SplineEnd;
SWA_INSERT_PADDING(0x30);
be<float> m_SplineProgress;
SWA_INSERT_PADDING(0x10);
xpointer<void> m_Field244;
SWA_INSERT_PADDING(0x18);
be<float> m_SplineSpeed;
SWA_INSERT_PADDING(0x0C);
be<uint32_t> m_State; // 0 - Intro; 1 - Boss Intro; 3 - Boss
};
class CStateBase : public Hedgehog::Universe::CStateMachineBase::CStateBase {};
};
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_SplineBossStart, 0x1F8);
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_SplineEnd, 0x1FC);
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_SplineProgress, 0x230);
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_Field244, 0x244);
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_SplineSpeed, 0x260);
SWA_ASSERT_OFFSETOF(CExPlayerTails::CExPlayerTailsStateContext, m_State, 0x270);
}