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

@ -576,7 +576,7 @@ TUniqueId CPlayerGun::GetTargetId(CStateManager& mgr) {
ret = mgr.GetPlayer()->GetOrbitNextTargetId();
if (ret != kInvalidUniqueId) {
const CActor* act = TCastToConstPtr<CActor>(mgr.GetObjectById(ret));
const CActor* act = TCastToConstPtr< CActor >(mgr.GetObjectById(ret));
if (act != nullptr) {
if (!act->GetMaterialList().HasMaterial(kMT_Target)) {
ret = kInvalidUniqueId;
@ -585,10 +585,20 @@ TUniqueId CPlayerGun::GetTargetId(CStateManager& mgr) {
}
return ret;
}
}
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) {}