metaforce/Runtime/Weapon/CProjectileInfo.hpp

30 lines
1.1 KiB
C++
Raw Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2018-06-04 12:30:04 -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 {
TCachedToken<CWeaponDescription> x0_weaponDescription;
2018-12-07 21:30:43 -08:00
CDamageInfo xc_damageInfo;
2018-06-04 12:30:04 -07:00
public:
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,
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; }
TCachedToken<CWeaponDescription>& Token() { return x0_weaponDescription; }
2018-06-04 12:30:04 -07:00
};
2021-04-10 01:42:06 -07:00
} // namespace metaforce