metaforce/Runtime/Weapon/CPlayerGun.cpp

108 lines
2.7 KiB
C++
Raw Normal View History

#include "CPlayerGun.hpp"
2016-08-17 20:05:23 +00:00
#include "Particle/CGenDescription.hpp"
#include "GameGlobalObjects.hpp"
namespace urde
{
static const zeus::CVector3f sGunScale(2.f);
CPlayerGun::CPlayerGun(TUniqueId id)
2016-08-21 00:04:50 +00:00
: x0_lights(8, zeus::CVector3f{-30.f, 0.f, 30.f}, 4, 4, 0, 0, 0, 0.1f), x538_thisId(id),
x550_camBob(CPlayerCameraBob::ECameraBobType::One,
zeus::CVector2f(CPlayerCameraBob::kCameraBobExtentX, CPlayerCameraBob::kCameraBobExtentY),
CPlayerCameraBob::kCameraBobPeriod),
x678_morph(g_tweakPlayerGun->GetGunTransformTime(), g_tweakPlayerGun->GetHoloHoldTime()),
x6c8_(zeus::CVector3f(-0.29329199f, 0.f, -0.2481945f),
zeus::CVector3f(0.29329199f, 1.292392f, 0.2481945f)),
x6e0_rightHandModel(CAnimRes(g_tweakGunRes->xc_rightHand, 0, zeus::CVector3f(3.f), 0, true))
{
x354_bombFuseTime = g_tweakPlayerGun->GetBombFuseTime();
x358_bombDropDelayTime = g_tweakPlayerGun->GetBombDropDelayTime();
x668_aimVerticalSpeed = g_tweakPlayerGun->GetAimVerticalSpeed();
x66c_aimHorizontalSpeed = g_tweakPlayerGun->GetAimHorizontalSpeed();
x73c_gunMotion = std::make_unique<CGunMotion>(g_tweakGunRes->x4_gunMotion, sGunScale);
x740_grappleArm = std::make_unique<CGrappleArm>(sGunScale);
x744_auxWeapon = std::make_unique<CAuxWeapon>(id);
x832_31_ = true;
2017-07-20 06:04:40 +00:00
x833_24_isFidgeting = true;
x833_30_ = true;
x6e0_rightHandModel.SetSortThermal(true);
/* TODO: Finish */
}
2017-08-13 05:26:14 +00:00
void CPlayerGun::AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&)
2017-06-12 04:23:34 +00:00
{
}
void CPlayerGun::AsyncLoadSuit(CStateManager& mgr)
{
x72c_currentBeam->AsyncLoadSuitArm(mgr);
x740_grappleArm->AsyncLoadSuit(mgr);
}
2017-07-31 05:19:05 +00:00
void CPlayerGun::TouchModel(const CStateManager& stateMgr)
2017-02-18 02:19:50 +00:00
{
}
void CPlayerGun::DamageRumble(const zeus::CVector3f& location, float damage, const CStateManager& mgr)
{
x398_damageAmt = damage;
x3dc_damageLocation = location;
}
2017-07-16 06:13:37 +00:00
void CPlayerGun::ProcessInput(const CFinalInput& input, CStateManager& mgr)
{
}
2017-07-17 03:04:14 +00:00
void CPlayerGun::ResetIdle(CStateManager& mgr)
{
}
void CPlayerGun::CancelFiring(CStateManager& mgr)
{
}
2017-07-23 23:45:04 +00:00
float CPlayerGun::GetBeamVelocity() const
{
if (x72c_currentBeam->IsLoaded())
return x72c_currentBeam->GetVelocityInfo().GetVelocity(x330_chargeWeaponIdx).y;
return 10.f;
}
2017-08-16 05:34:02 +00:00
void CPlayerGun::Update(float grappleSwingT, float cameraBobT, float dt, CStateManager& mgr)
{
}
2017-07-31 05:19:05 +00:00
void CPlayerGun::PreRender(const CStateManager& mgr, const zeus::CFrustum& frustum, const zeus::CVector3f& camPos)
{
}
void CPlayerGun::Render(const CStateManager& mgr, const zeus::CVector3f& pos, const CModelFlags& flags) const
{
}
void CPlayerGun::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const
{
}
2017-08-16 05:34:02 +00:00
TUniqueId CPlayerGun::DropPowerBomb(CStateManager& mgr)
{
return {};
}
}