mirror of https://github.com/AxioDL/metaforce.git
Update hecl, various fixes
This commit is contained in:
parent
533b8775d4
commit
9255f0eeb0
|
@ -219,7 +219,11 @@ void CActor::OnScanStateChanged(EScanState state, CStateManager& mgr)
|
|||
|
||||
zeus::CAABox CActor::GetSortingBounds(const CStateManager&) const { return x9c_renderBounds; }
|
||||
|
||||
void CActor::DoUserAnimEvent(CStateManager&, CInt32POINode&, EUserEventType, float dt) {}
|
||||
void CActor::DoUserAnimEvent(CStateManager&, CInt32POINode&, EUserEventType event, float)
|
||||
{
|
||||
if (event == EUserEventType::LoopedSoundStop)
|
||||
RemoveEmitter();
|
||||
}
|
||||
|
||||
void CActor::RemoveMaterial(EMaterialTypes t1, EMaterialTypes t2, EMaterialTypes t3, EMaterialTypes t4,
|
||||
CStateManager& mgr)
|
||||
|
@ -234,7 +238,11 @@ void CActor::RemoveMaterial(EMaterialTypes t1, EMaterialTypes t2, EMaterialTypes
|
|||
RemoveMaterial(t2, t3, mgr);
|
||||
}
|
||||
|
||||
void CActor::RemoveMaterial(EMaterialTypes t1, EMaterialTypes t2, CStateManager& mgr) { x68_material.Remove(t1); }
|
||||
void CActor::RemoveMaterial(EMaterialTypes t1, EMaterialTypes t2, CStateManager& mgr)
|
||||
{
|
||||
x68_material.Remove(t1);
|
||||
RemoveMaterial(t2, mgr);
|
||||
}
|
||||
|
||||
void CActor::RemoveMaterial(EMaterialTypes t, CStateManager& mgr)
|
||||
{
|
||||
|
|
|
@ -31,9 +31,7 @@ void CScriptCameraHint::Accept(IVisitor& visitor)
|
|||
void CScriptCameraHint::InitializeInArea(CStateManager& mgr)
|
||||
{
|
||||
x164_delegatedCamera = kInvalidUniqueId;
|
||||
for (CEntity* e : mgr.GetAllObjectList())
|
||||
{
|
||||
if (TCastToPtr<CEntity> ent = e)
|
||||
for (CEntity* ent : mgr.GetAllObjectList())
|
||||
{
|
||||
for (const SConnection& conn : ent->GetConnectionList())
|
||||
{
|
||||
|
@ -63,7 +61,6 @@ void CScriptCameraHint::InitializeInArea(CStateManager& mgr)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CScriptCameraHint::AddHelper(TUniqueId id)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ void CScriptControllerAction::Accept(IVisitor& visitor)
|
|||
visitor.Visit(this);
|
||||
}
|
||||
|
||||
void CScriptControllerAction::Think(float dt, CStateManager& stateMgr)
|
||||
void CScriptControllerAction::Think(float, CStateManager& stateMgr)
|
||||
{
|
||||
bool oldPressed = x3c_26_pressed;
|
||||
if (x3c_24_mapScreenResponse)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#include "CScriptDebris.hpp"
|
||||
#include "Collision/CCollisionInfoList.hpp"
|
||||
#include "Particle/CElementGen.hpp"
|
||||
#include "TCastTo.hpp"
|
||||
|
||||
namespace urde
|
||||
|
@ -11,8 +13,8 @@ CScriptDebris::CScriptDebris(TUniqueId uid, std::string_view name, const CEntity
|
|||
: CPhysicsActor(uid, active, name, info, xf, std::move(mData),
|
||||
CMaterialList(EMaterialTypes::Solid, EMaterialTypes::Debris),
|
||||
mData.GetBounds(xf.getRotation()), SMoverData(f2), aParams, 0.3f, 0.1f)
|
||||
{
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
CScriptDebris::CScriptDebris(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
|
||||
|
@ -34,4 +36,25 @@ void CScriptDebris::Accept(IVisitor& visitor)
|
|||
visitor.Visit(this);
|
||||
}
|
||||
|
||||
rstl::optional_object<zeus::CAABox> CScriptDebris::GetTouchBounds() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
void CScriptDebris::CollidedWith(TUniqueId, const CCollisionInfoList& colList, CStateManager&)
|
||||
{
|
||||
if (colList.GetCount() == 0)
|
||||
return;
|
||||
|
||||
if (x282_24_)
|
||||
{
|
||||
x274_ = x270_;
|
||||
SetVelocityWR(zeus::CVector3f::skZero);
|
||||
}
|
||||
else
|
||||
{
|
||||
x2c8_collisionNormal = colList.GetItem(0).GetNormalLeft();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
namespace urde
|
||||
{
|
||||
class CElementGen;
|
||||
class CScriptDebris : public CPhysicsActor
|
||||
{
|
||||
public:
|
||||
|
@ -17,6 +18,14 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
|
||||
float x270_;
|
||||
float x274_;
|
||||
bool x282_24_ : 1;
|
||||
zeus::CVector3f x2c8_collisionNormal;
|
||||
std::unique_ptr<CElementGen> x2d4_;
|
||||
std::unique_ptr<CElementGen> x2d8_;
|
||||
std::unique_ptr<CElementGen> x2dc_;
|
||||
TReservedAverage<float, 8> x2e0_;
|
||||
public:
|
||||
CScriptDebris(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
|
||||
|
@ -31,6 +40,9 @@ public:
|
|||
bool, bool, bool, bool);
|
||||
|
||||
void Accept(IVisitor& visitor);
|
||||
rstl::optional_object<zeus::CAABox> GetTouchBounds() const;
|
||||
|
||||
void CollidedWith(TUniqueId uid, const CCollisionInfoList&, CStateManager&);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit 6b3abdd21acc0274c0bedff5d6cbd3bea3f21730
|
||||
Subproject commit 3a8dc560c3c8d92826f0c5d214f5027884ddab9f
|
Loading…
Reference in New Issue