2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2018-06-04 12:30:04 -07:00
|
|
|
|
2019-09-23 12:00:23 -07:00
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
|
|
#include "Runtime/Particle/CWeaponDescription.hpp"
|
|
|
|
#include "Runtime/World/CDamageInfo.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2018-06-04 12:30:04 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2018-06-04 12:30:04 -07:00
|
|
|
class CPlayer;
|
2018-12-07 21:30:43 -08:00
|
|
|
class CProjectileInfo {
|
2020-03-12 16:30:33 -07:00
|
|
|
TCachedToken<CWeaponDescription> x0_weaponDescription;
|
2018-12-07 21:30:43 -08:00
|
|
|
CDamageInfo xc_damageInfo;
|
|
|
|
|
2018-06-04 12:30:04 -07:00
|
|
|
public:
|
2020-03-25 18:25:11 -07:00
|
|
|
explicit CProjectileInfo(CInputStream&);
|
2018-12-07 21:30:43 -08:00
|
|
|
CProjectileInfo(CAssetId, const CDamageInfo&);
|
2018-06-04 12:30:04 -07:00
|
|
|
|
2018-12-12 23:39:16 -08:00
|
|
|
float GetProjectileSpeed() const;
|
|
|
|
static zeus::CVector3f PredictInterceptPos(const zeus::CVector3f& gunPos, const zeus::CVector3f& aimPos,
|
|
|
|
const CPlayer& player, bool gravity, float speed, float dt);
|
|
|
|
zeus::CVector3f PredictInterceptPos(const zeus::CVector3f& gunPos, const zeus::CVector3f& aimPos,
|
2019-08-14 03:04:11 -07:00
|
|
|
const CPlayer& player, bool gravity, float dt) const;
|
2018-06-04 12:30:04 -07:00
|
|
|
|
2019-02-17 21:47:46 -08:00
|
|
|
const CDamageInfo& GetDamage() const { return xc_damageInfo; }
|
2019-11-12 12:25:21 -08:00
|
|
|
void SetDamage(const CDamageInfo& damageInfo) { xc_damageInfo = damageInfo; }
|
2020-03-12 16:30:33 -07:00
|
|
|
TCachedToken<CWeaponDescription>& Token() { return x0_weaponDescription; }
|
2018-06-04 12:30:04 -07:00
|
|
|
};
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|