2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-08-14 21:11:44 +00:00
|
|
|
|
2019-09-23 19:00:23 +00:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "Runtime/Graphics/Shaders/CAABoxShader.hpp"
|
|
|
|
#include "Runtime/Weapon/CGunWeapon.hpp"
|
2016-08-14 21:11:44 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
|
|
|
|
|
|
|
class CPhazonBeam final : public CGunWeapon {
|
|
|
|
TCachedToken<CModel> x21c_phazonVeins;
|
|
|
|
std::unique_ptr<CModelData> x224_phazonVeinsData;
|
|
|
|
TCachedToken<CGenDescription> x228_phazon2nd1;
|
|
|
|
std::unique_ptr<CElementGen> x234_chargeFxGen;
|
|
|
|
zeus::CAABox x238_aaBoxScale;
|
|
|
|
zeus::CAABox x250_aaBoxTranslate;
|
|
|
|
float x268_clipWipeScale = 0.f;
|
|
|
|
float x26c_clipWipeTranslate = 0.f;
|
|
|
|
float x270_indirectAlpha = 1.f;
|
2020-04-20 04:57:50 +00:00
|
|
|
bool x274_24_loaded : 1 = false;
|
|
|
|
bool x274_25_clipWipeActive : 1 = true;
|
|
|
|
bool x274_26_veinsAlphaActive : 1 = false;
|
|
|
|
bool x274_27_phazonVeinsIdx : 1 = false;
|
2018-12-08 05:30:43 +00:00
|
|
|
float x278_fireTime = 1.f / 3.f;
|
2020-04-05 12:29:43 +00:00
|
|
|
CAABoxShader m_aaboxShaderScale{true};
|
|
|
|
CAABoxShader m_aaboxShaderTranslate{true};
|
2018-12-08 05:30:43 +00:00
|
|
|
void ReInitVariables();
|
2020-04-05 12:29:43 +00:00
|
|
|
void DrawClipScaleCube();
|
|
|
|
void DrawClipTranslateCube();
|
2016-08-14 21:11:44 +00:00
|
|
|
|
2017-08-22 03:20:22 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CPhazonBeam(CAssetId characterId, EWeaponType type, TUniqueId playerId, EMaterialTypes playerMaterial,
|
|
|
|
const zeus::CVector3f& scale);
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr);
|
|
|
|
bool IsFiring() const { return x278_fireTime < 1.f / 6.f; }
|
|
|
|
void SetClipWipeActive(bool b) { x274_25_clipWipeActive = b; }
|
|
|
|
void SetVeinsAlphaActive(bool b) { x274_26_veinsAlphaActive = b; }
|
|
|
|
void StopBeam(CStateManager& mgr, bool b1);
|
|
|
|
void UpdateBeam(float dt, const zeus::CTransform& targetXf, const zeus::CVector3f& localBeamPos, CStateManager& mgr);
|
|
|
|
void CreateBeam(CStateManager& mgr);
|
2017-09-07 03:55:31 +00:00
|
|
|
|
2019-08-09 12:45:18 +00:00
|
|
|
void PreRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) override;
|
|
|
|
void PostRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) override;
|
|
|
|
void UpdateGunFx(bool shotSmoke, float dt, const CStateManager& mgr, const zeus::CTransform& xf) override;
|
2018-12-08 05:30:43 +00:00
|
|
|
void Fire(bool underwater, float dt, EChargeState chargeState, const zeus::CTransform& xf, CStateManager& mgr,
|
2019-08-09 12:45:18 +00:00
|
|
|
TUniqueId homingTarget, float chargeFactor1, float chargeFactor2) override;
|
|
|
|
void Update(float dt, CStateManager& mgr) override;
|
|
|
|
void Load(CStateManager& mgr, bool subtypeBasePose) override;
|
|
|
|
void Unload(CStateManager& mgr) override;
|
|
|
|
bool IsLoaded() const override;
|
2018-12-08 05:30:43 +00:00
|
|
|
void Draw(bool drawSuitArm, const CStateManager& mgr, const zeus::CTransform& xf, const CModelFlags& flags,
|
2020-04-05 12:29:43 +00:00
|
|
|
const CActorLights* lights) override;
|
2019-08-09 12:45:18 +00:00
|
|
|
void DrawMuzzleFx(const CStateManager& mgr) const override;
|
2016-08-14 21:11:44 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|