mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 17:04:55 +00:00
Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde
This commit is contained in:
@@ -36,7 +36,7 @@ CAi::CAi(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& i
|
||||
}
|
||||
|
||||
if (x90_actorLights)
|
||||
x260_damageVulnerability.SetX38_25(true);
|
||||
x90_actorLights->SetCastShadows(true);
|
||||
}
|
||||
|
||||
void CAi::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr)
|
||||
|
||||
@@ -34,9 +34,7 @@ class CDamageVulnerability
|
||||
EVulnerability x2c_enemyWp3Lava;
|
||||
EVulnerability x30_enemyWp4;
|
||||
EVulnerability x34_unk1;
|
||||
/* FIXME: What's going on here? */
|
||||
EVulnerability x38_unk2;
|
||||
bool x38_25 : 1;
|
||||
|
||||
EVulnerability x3c_chargedPower;
|
||||
EVulnerability x40_chargedIce;
|
||||
@@ -80,7 +78,6 @@ public:
|
||||
static const CDamageVulnerability& ImmuneVulnerabilty() { return sImmuneVulnerability; }
|
||||
static const CDamageVulnerability& ReflectVulnerabilty() { return sReflectVulnerability; }
|
||||
static const CDamageVulnerability& PasshThroughVulnerabilty() { return sPassThroughVulnerability; }
|
||||
void SetX38_25(bool) { x38_25 = true; }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ public:
|
||||
void SetEnableBurnDeath(bool b) { x81_28_enableBurnDeath = b; }
|
||||
void SetEnableExplodeDeath(bool b) { x81_29_enableExplodeDeath = b; }
|
||||
void SetEnableLaggedBurnDeath(bool b) { x81_30_enableLaggedBurnDeath = b; }
|
||||
void SetX81_31(bool b) { x81_31_ = b; }
|
||||
void SetX82_24(bool b) { x82_24_ = b; }
|
||||
void SetLocomotionDuringElectrocution(bool b) { x82_26_locomotionDuringElectrocution = b; }
|
||||
const KnockBackParms& GetActiveParms() const { return x4_activeParms; }
|
||||
|
||||
@@ -1026,6 +1026,16 @@ void CPatterned::TryLoopReaction(CStateManager& mgr, int arg)
|
||||
x450_bodyController->GetCommandMgr().DeliverCmd(CBCLoopReactionCmd(pas::EReactionType(arg)));
|
||||
}
|
||||
|
||||
void CPatterned::TryProjectileAttack(CStateManager&, int arg)
|
||||
{
|
||||
x450_bodyController->GetCommandMgr().DeliverCmd(CBCProjectileAttackCmd(pas::ESeverity(arg), x2e0_destPos, false));
|
||||
}
|
||||
|
||||
void CPatterned::TryGenerate(CStateManager& mgr, int arg)
|
||||
{
|
||||
x450_bodyController->GetCommandMgr().DeliverCmd(CBCGenerateCmd(pas::EGenerateType(arg), x2e0_destPos, true));
|
||||
}
|
||||
|
||||
void CPatterned::BuildBodyController(EBodyType bodyType)
|
||||
{
|
||||
if (x450_bodyController)
|
||||
|
||||
@@ -381,6 +381,8 @@ public:
|
||||
|
||||
void TryCommand(CStateManager& mgr, pas::EAnimationState state, CPatternedTryFunc func, int arg);
|
||||
void TryLoopReaction(CStateManager& mgr, int arg);
|
||||
void TryProjectileAttack(CStateManager& mgr, int arg);
|
||||
void TryGenerate(CStateManager& mgr, int arg);
|
||||
|
||||
virtual bool KnockbackWhenFrozen() const { return true; }
|
||||
virtual void MassiveDeath(CStateManager& mgr);
|
||||
@@ -422,6 +424,12 @@ public:
|
||||
bool CanLongJump() const { return x328_26_longJump; }
|
||||
bool IsMakingBigStrike() const { return x402_28_isMakingBigStrike; }
|
||||
|
||||
void SetKeepInThermalVisor()
|
||||
{
|
||||
x403_24_keepThermalVisorState = true;
|
||||
xe6_27_thermalVisorFlags = 1 | 2;
|
||||
}
|
||||
|
||||
//region Casting Functions
|
||||
|
||||
template <class T>
|
||||
|
||||
@@ -59,13 +59,13 @@ public:
|
||||
CPatternedInfo(CInputStream& in, u32 pcount);
|
||||
static std::pair<bool, u32> HasCorrectParameterCount(CInputStream& in);
|
||||
|
||||
CAnimationParameters& GetAnimationParameters() { return xec_animParams; }
|
||||
const CAnimationParameters& GetAnimationParameters() const { return xec_animParams; }
|
||||
|
||||
float GetDetectionHeightRange() const { return x10_detectionHeightRange; }
|
||||
float GetHalfExtent() const { return xc4_halfExtent; }
|
||||
float GetHeight() const { return xc8_height; }
|
||||
u32 GetPathfindingIndex() const { return x10c_pathfindingIndex; }
|
||||
const CHealthInfo& GetHealthInfo() const { return x54_healthInfo; }
|
||||
CAnimationParameters& GetAnimationParameters() { return xec_animParams; }
|
||||
const CAnimationParameters& GetAnimationParameters() const { return xec_animParams; }
|
||||
u32 GetPathfindingIndex() const { return x10c_pathfindingIndex; }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -689,6 +689,7 @@ public:
|
||||
EPlayerOrbitRequest GetOrbitRequest() const { return x30c_orbitRequest; }
|
||||
bool IsShowingCrosshairs() const { return x9c4_25_showCrosshairs; }
|
||||
bool IsSidewaysDashing() const { return x37c_sidewaysDashing; }
|
||||
void Set_X590(bool b) { x590_ = b; }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
#include "CScriptSound.hpp"
|
||||
#include "CScriptSpawnPoint.hpp"
|
||||
#include "CScriptSpecialFunction.hpp"
|
||||
#include "MP1/World/CSpankWeed.hpp"
|
||||
#include "MP1/World/CBabygoth.hpp"
|
||||
#include "MP1/World/CEyeball.hpp"
|
||||
#include "CScriptSteam.hpp"
|
||||
@@ -86,6 +87,7 @@
|
||||
#include "CScriptWorldTeleporter.hpp"
|
||||
#include "CScriptDebugCameraWaypoint.hpp"
|
||||
#include "CScriptSpiderBallAttractionSurface.hpp"
|
||||
#include "MP1/World/CPuddleToadGamma.hpp"
|
||||
#include "CScriptSpindleCamera.hpp"
|
||||
#include "MP1/World/CAtomicAlpha.hpp"
|
||||
#include "CSimplePool.hpp"
|
||||
@@ -1723,7 +1725,34 @@ CEntity* ScriptLoader::LoadSpiderBallAttractionSurface(CStateManager& mgr, CInpu
|
||||
|
||||
CEntity* ScriptLoader::LoadPuddleToadGamma(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
|
||||
{
|
||||
return nullptr;
|
||||
if (!EnsurePropertyCount(propCount, 17, "PuddleToadGamma"))
|
||||
return nullptr;
|
||||
|
||||
std::string name = mgr.HashInstanceName(in);
|
||||
CPatterned::EFlavorType flavor = CPatterned::EFlavorType(in.readUint32Big());
|
||||
zeus::CTransform xf = LoadEditorTransform(in);
|
||||
zeus::CVector3f scale = zeus::CVector3f::ReadBig(in);
|
||||
auto pair = CPatternedInfo::HasCorrectParameterCount(in);
|
||||
if (!pair.first)
|
||||
return nullptr;
|
||||
|
||||
CPatternedInfo pInfo(in, pair.second);
|
||||
CActorParameters actParms = LoadActorParameters(in);
|
||||
float f1 = in.readFloatBig();
|
||||
float f2 = in.readFloatBig();
|
||||
float f3 = in.readFloatBig();
|
||||
zeus::CVector3f vec = zeus::CVector3f::ReadBig(in);
|
||||
float f4 = in.readFloatBig();
|
||||
float f5 = in.readFloatBig();
|
||||
float f6 = in.readFloatBig();
|
||||
CDamageInfo dInfo1(in);
|
||||
CDamageInfo dInfo2(in);
|
||||
CAssetId collisionData(in);
|
||||
const CAnimationParameters& animParms = pInfo.GetAnimationParameters();
|
||||
CModelData mData(CAnimRes(animParms.GetACSFile(), animParms.GetCharacter(), scale,
|
||||
animParms.GetInitialAnimation(), true));
|
||||
return new MP1::CPuddleToadGamma(mgr.AllocateUniqueId(), name, flavor, info, xf, std::move(mData), pInfo, actParms,
|
||||
f1, f2, f3, vec, f4, f5, f6, dInfo1, dInfo2, collisionData);
|
||||
}
|
||||
|
||||
CEntity* ScriptLoader::LoadDistanceFog(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
|
||||
@@ -1879,7 +1908,29 @@ CEntity* ScriptLoader::LoadSpecialFunction(CStateManager& mgr, CInputStream& in,
|
||||
|
||||
CEntity* ScriptLoader::LoadSpankWeed(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
|
||||
{
|
||||
return nullptr;
|
||||
if (!EnsurePropertyCount(propCount, 11, "SpankWeed"))
|
||||
return nullptr;
|
||||
SScaledActorHead aHead = LoadScaledActorHead(in, mgr);
|
||||
auto pair = CPatternedInfo::HasCorrectParameterCount(in);
|
||||
if (!pair.first)
|
||||
return nullptr;
|
||||
|
||||
CPatternedInfo pInfo(in, pair.second);
|
||||
CActorParameters actParms = LoadActorParameters(in);
|
||||
in.readBool();
|
||||
float f1 = in.readFloatBig();
|
||||
float f2 = in.readFloatBig();
|
||||
float f3 = in.readFloatBig();
|
||||
float f4 = in.readFloatBig();
|
||||
|
||||
const CAnimationParameters& animParms = pInfo.GetAnimationParameters();
|
||||
if (!animParms.GetACSFile().IsValid())
|
||||
return nullptr;
|
||||
|
||||
CModelData mData(CAnimRes(animParms.GetACSFile(), animParms.GetCharacter(), aHead.x40_scale,
|
||||
animParms.GetInitialAnimation(), true));
|
||||
return new MP1::CSpankWeed(mgr.AllocateUniqueId(), aHead.x0_name, info, aHead.x10_transform, std::move(mData),
|
||||
actParms, pInfo, f1, f2, f3, f4);
|
||||
}
|
||||
|
||||
CEntity* ScriptLoader::LoadParasite(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
|
||||
|
||||
Reference in New Issue
Block a user