mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 00:27:43 +00:00
CThardus: Fix knee collider, attempt to fix healthbar
This commit is contained in:
@@ -28,7 +28,12 @@ void CDestroyableRock::PreRender(CStateManager& mgr, const zeus::CFrustum& frust
|
||||
if (mgr.GetPlayerState()->GetActiveVisor(mgr) == CPlayerState::EPlayerVisor::Thermal) {
|
||||
xb4_drawFlags = CModelFlags(0, 0, 1, zeus::skWhite);
|
||||
} else {
|
||||
if (x330_.r() >= 1.f && x330_.g() >= 1.f && x330_.b() >= 1.f) {
|
||||
u8 r;
|
||||
u8 g;
|
||||
u8 b;
|
||||
u8 a;
|
||||
x330_.toRGBA8(r, g, b, a);
|
||||
if ((r & g & b) == 0xFF) {
|
||||
xb4_drawFlags = CModelFlags(0, 0, 3, zeus::skWhite);
|
||||
} else {
|
||||
x330_.a() = 1.f;
|
||||
@@ -40,13 +45,16 @@ void CDestroyableRock::PreRender(CStateManager& mgr, const zeus::CFrustum& frust
|
||||
CActor::PreRender(mgr, frustum);
|
||||
}
|
||||
void CDestroyableRock::Think(float dt, CStateManager& mgr) {
|
||||
if (!GetActive())
|
||||
if (!GetActive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
float damageMag = x32c_thermalMag;
|
||||
if (x324_ > 0.f) {
|
||||
x324_ = zeus::max(0.f, x324_ - dt);
|
||||
x330_ = zeus::CColor::lerp(zeus::skBlack, zeus::CColor(0.5, 0.f, 0.f, 1.f), x324_);
|
||||
x324_ = std::max(0.f, x324_ - dt);
|
||||
zeus::CColor tmpColor = zeus::CColor(0.5, 0.f, 0.f, 1.f);
|
||||
// TODO: Use skBlack once CModelFlags is properly reverse engineered
|
||||
x330_ = zeus::CColor::lerp(/*zeus::skBlack*/ zeus::skWhite, tmpColor, x324_);
|
||||
damageMag = ((x335_usePhazonModel ? 0.5f : 0.25f) * x324_) + damageMag;
|
||||
}
|
||||
xd0_damageMag = damageMag;
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
void Think(float dt, CStateManager& mgr) override;
|
||||
|
||||
float GetThrmalMag() const { return x324_; }
|
||||
float Get_x324() const { return x324_; }
|
||||
void SetThermalMag(float val) { x32c_thermalMag = val; }
|
||||
void SetIsCold(bool v) { x334_isCold = v; }
|
||||
bool IsUsingPhazonModel() const { return x335_usePhazonModel; }
|
||||
|
||||
Reference in New Issue
Block a user