Add CGunMorph::CGunMorph

This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-06 20:03:33 +03:00
parent e25205bd69
commit 7fac18cc48
No known key found for this signature in database
GPG Key ID: E224F951761145F8
1 changed files with 18 additions and 8 deletions

View File

@ -574,21 +574,31 @@ TUniqueId CPlayerGun::GetTargetId(CStateManager& mgr) {
TUniqueId ret = mgr.GetPlayer()->GetOrbitTargetId(); TUniqueId ret = mgr.GetPlayer()->GetOrbitTargetId();
if (x832_26_comboFiring && ret == kInvalidUniqueId && x310_currentBeam == CPlayerState::kBI_Wave) if (x832_26_comboFiring && ret == kInvalidUniqueId && x310_currentBeam == CPlayerState::kBI_Wave)
ret = mgr.GetPlayer()->GetOrbitNextTargetId(); ret = mgr.GetPlayer()->GetOrbitNextTargetId();
if (ret != kInvalidUniqueId) { if (ret != kInvalidUniqueId) {
const CActor* act = TCastToConstPtr<CActor>(mgr.GetObjectById(ret)); const CActor* act = TCastToConstPtr< CActor >(mgr.GetObjectById(ret));
if (act != nullptr) { if (act != nullptr) {
if (!act->GetMaterialList().HasMaterial(kMT_Target)) { if (!act->GetMaterialList().HasMaterial(kMT_Target)) {
ret = kInvalidUniqueId; ret = kInvalidUniqueId;
} }
} }
} }
return ret; return ret;
} }
CPlayerGun::CGunMorph::CGunMorph(float gunTransformTime, float holoHoldTime) CPlayerGun::CGunMorph::CGunMorph(float gunTransformTime, float holoHoldTime)
: x4_gunTransformTime(gunTransformTime), x10_holoHoldTime(fabs(holoHoldTime)) {} : x0_yLerp(0.f)
, x4_gunTransformTime(CMath::Sign(gunTransformTime))
, x8_remTime(0.f)
, xc_speed(0.1f)
, x10_holoHoldTime(fabs(holoHoldTime))
, x14_remHoldTime(2.f)
, x18_transitionFactor(1.f)
, x1c_dir(kD_Done)
, x20_gunState(kGS_OutWipeDone)
, x24_24_morphing(false)
, x24_25_weaponChanged(false) {}
void CPlayerGun::CGunMorph::StartWipe(CPlayerGun::CGunMorph::EDir) {} void CPlayerGun::CGunMorph::StartWipe(CPlayerGun::CGunMorph::EDir) {}