2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-08-27 03:02:18 +00:00
|
|
|
|
2019-09-22 21:52:05 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <optional>
|
|
|
|
|
|
|
|
#include "Runtime/CToken.hpp"
|
|
|
|
#include "Runtime/Weapon/CWeapon.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CAABox.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2017-08-27 03:02:18 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2017-08-27 03:02:18 +00:00
|
|
|
|
2018-09-09 01:13:56 +00:00
|
|
|
class CElementGen;
|
2018-12-08 05:30:43 +00:00
|
|
|
class CBomb : public CWeapon {
|
|
|
|
|
2019-06-21 06:02:56 +00:00
|
|
|
zeus::CVector3f x158_velocity;
|
|
|
|
zeus::CVector3f x164_acceleration;
|
2018-12-08 05:30:43 +00:00
|
|
|
zeus::CVector3f x170_prevLocation;
|
|
|
|
float x17c_fuseTime;
|
|
|
|
std::unique_ptr<CElementGen> x180_particle1;
|
|
|
|
std::unique_ptr<CElementGen> x184_particle2;
|
|
|
|
TUniqueId x188_lightId = kInvalidUniqueId;
|
2019-07-16 15:54:07 +00:00
|
|
|
const CGenDescription* x18c_particle2Obj;
|
2018-12-08 05:30:43 +00:00
|
|
|
bool x190_24_isNotDetonated : 1;
|
2019-07-16 15:54:07 +00:00
|
|
|
bool x190_25_beingDragged : 1;
|
2018-12-08 05:30:43 +00:00
|
|
|
bool x190_26_disableFuse : 1;
|
2018-09-09 01:13:56 +00:00
|
|
|
|
2017-08-27 03:02:18 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CBomb(const TCachedToken<CGenDescription>& particle1, const TCachedToken<CGenDescription>& particle2, TUniqueId uid,
|
|
|
|
TAreaId aid, TUniqueId playerId, float f1, const zeus::CTransform& xf, const CDamageInfo& dInfo);
|
2018-09-09 01:13:56 +00:00
|
|
|
|
2019-08-09 12:45:18 +00:00
|
|
|
void Accept(IVisitor&) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
|
|
void Think(float, CStateManager&) override;
|
|
|
|
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override;
|
|
|
|
void Render(const CStateManager&) const override {}
|
|
|
|
void Touch(CActor&, CStateManager&) override;
|
2018-12-08 05:30:43 +00:00
|
|
|
void Explode(const zeus::CVector3f&, CStateManager&);
|
|
|
|
void UpdateLight(float, CStateManager&);
|
2019-08-09 12:45:18 +00:00
|
|
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
2019-06-21 06:02:56 +00:00
|
|
|
void SetVelocityWR(const zeus::CVector3f& vel) { x158_velocity = vel; }
|
|
|
|
void SetConstantAccelerationWR(const zeus::CVector3f& acc) { x164_acceleration = acc; }
|
2019-07-16 15:54:07 +00:00
|
|
|
void SetFuseDisabled(bool b) { x190_26_disableFuse = false; }
|
|
|
|
void SetIsBeingDragged(bool b) { x190_25_beingDragged = b; }
|
|
|
|
bool IsBeingDragged() const { return x190_25_beingDragged; }
|
2017-08-27 03:02:18 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|