mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-08-08 15:39:05 +00:00
CFlaahgra: Fix UpdateHeadDamageVulnerability
This commit is contained in:
parent
161a287ae3
commit
1bfb699b48
@ -596,12 +596,12 @@ void CFlaahgra::CalculateFallDirection() {
|
|||||||
|
|
||||||
float curDist = FLT_MIN;
|
float curDist = FLT_MIN;
|
||||||
for (const zeus::CVector3f& v : vec) {
|
for (const zeus::CVector3f& v : vec) {
|
||||||
if (right.dot(v) <= 0.f) {
|
if (right.dot(v) < 0.f) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
float dist = front.dot(v);
|
float dist = front.dot(v);
|
||||||
if (curDist < dist) {
|
if (dist > curDist) {
|
||||||
x894_fallDirection = v;
|
x894_fallDirection = v;
|
||||||
curDist = dist;
|
curDist = dist;
|
||||||
}
|
}
|
||||||
@ -630,7 +630,7 @@ bool CFlaahgra::ShouldAttack(CStateManager& mgr, float) {
|
|||||||
|
|
||||||
void CFlaahgra::UpdateHeadDamageVulnerability(CStateManager& mgr, bool b) {
|
void CFlaahgra::UpdateHeadDamageVulnerability(CStateManager& mgr, bool b) {
|
||||||
if (TCastToPtr<CCollisionActor> head = mgr.ObjectById(x80c_headActor)) {
|
if (TCastToPtr<CCollisionActor> head = mgr.ObjectById(x80c_headActor)) {
|
||||||
head->SetDamageVulnerability(b ? *GetDamageVulnerability() : x56c_.x10_);
|
head->SetDamageVulnerability(b ? x56c_.x10_ : *GetDamageVulnerability());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user