2016-12-22 19:57:21 +00:00
|
|
|
#ifndef __URDE_CGAMEPROJECTILE_HPP__
|
|
|
|
#define __URDE_CGAMEPROJECTILE_HPP__
|
|
|
|
|
|
|
|
#include "Collision/CMaterialList.hpp"
|
|
|
|
#include "Weapon/CWeaponMode.hpp"
|
|
|
|
#include "Weapon/CWeapon.hpp"
|
|
|
|
#include "World/CDamageInfo.hpp"
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "CToken.hpp"
|
2017-05-18 10:58:15 +00:00
|
|
|
#include "Weapon/CProjectileWeapon.hpp"
|
2016-12-22 19:57:21 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CGenDescription;
|
|
|
|
class CWeaponDescription;
|
|
|
|
class CGameProjectile : public CWeapon
|
|
|
|
{
|
2017-05-18 10:58:15 +00:00
|
|
|
//CProjectileWeapon x170_;
|
2017-09-10 00:36:21 +00:00
|
|
|
TUniqueId x2c0_homingTargetId;
|
2017-05-18 10:58:15 +00:00
|
|
|
TUniqueId x2c8_projectileLight;
|
|
|
|
u32 x2cc_;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x2e4_24_ : 1;
|
|
|
|
bool x2e4_25_ : 1;
|
2017-09-05 03:00:19 +00:00
|
|
|
bool x2e4_26_waterUpdate : 1;
|
|
|
|
bool x2e4_27_inWater : 1;
|
2017-05-18 10:58:15 +00:00
|
|
|
bool x2e4_28_ : 1;
|
|
|
|
};
|
|
|
|
};
|
2016-12-22 19:57:21 +00:00
|
|
|
public:
|
2017-11-13 06:19:18 +00:00
|
|
|
CGameProjectile(bool active, const TToken<CWeaponDescription>&, std::string_view name,
|
2017-09-05 03:00:19 +00:00
|
|
|
EWeaponType wType, const zeus::CTransform& xf, EMaterialTypes matType,
|
|
|
|
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
|
|
|
TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater, const zeus::CVector3f& scale,
|
|
|
|
const rstl::optional_object<TLockedToken<CGenDescription>>& particle, s16 s1, bool b3);
|
2016-12-22 19:57:21 +00:00
|
|
|
|
2017-01-15 03:59:37 +00:00
|
|
|
virtual void Accept(IVisitor &visitor);
|
2017-05-18 10:58:15 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager &);
|
2016-12-22 19:57:21 +00:00
|
|
|
static EProjectileAttrib GetBeamAttribType(EWeaponType wType);
|
2017-05-18 10:58:15 +00:00
|
|
|
void DeleteProjectileLight(CStateManager&);
|
2017-11-13 06:19:18 +00:00
|
|
|
void CreateProjectileLight(std::string_view, const CLight&, CStateManager&);
|
2017-05-18 10:58:15 +00:00
|
|
|
void Chase(float, CStateManager&);
|
2017-08-13 05:26:14 +00:00
|
|
|
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
|
|
|
const CWeaponMode&, int) const
|
|
|
|
{ return EWeaponCollisionResponseTypes::Projectile; }
|
2017-09-10 00:36:21 +00:00
|
|
|
TUniqueId GetHomingTargetId() const { return x2c0_homingTargetId; }
|
2016-12-22 19:57:21 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CGAMEPROJECTILE_HPP__
|