mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 09:47:43 +00:00
Complete C*Projectile construction chain, add CScriptBeam
This commit is contained in:
32
Runtime/Weapon/CGameProjectile.cpp
Normal file
32
Runtime/Weapon/CGameProjectile.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "Weapon/CGameProjectile.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
CGameProjectile::CGameProjectile(bool active, const TToken<CWeaponDescription>&, const std::string& name,
|
||||
EWeaponType wType, const zeus::CTransform& xf, EMaterialTypes matType,
|
||||
const CDamageInfo& dInfo, TUniqueId owner, TAreaId aid, TUniqueId uid, TUniqueId,
|
||||
u32 w1, bool b2, const zeus::CVector3f&,
|
||||
const rstl::optional_object<TLockedToken<CGenDescription>>&, s16, bool b3)
|
||||
: CWeapon(owner, aid, uid, active, wType, name, xf,
|
||||
CMaterialFilter(
|
||||
CMaterialList(EMaterialTypes::Fifty, matType),
|
||||
CMaterialList(EMaterialTypes::ThirtyFive, EMaterialTypes::Eighteen, matType, EMaterialTypes::Nineteen),
|
||||
CMaterialFilter::EFilterType::Three),
|
||||
CMaterialList(), dInfo, EProjectileAttrib(w1) | GetBeamAttribType(wType), CModelData::CModelDataNull())
|
||||
{
|
||||
}
|
||||
|
||||
CWeapon::EProjectileAttrib CGameProjectile::GetBeamAttribType(EWeaponType wType)
|
||||
{
|
||||
if (wType == EWeaponType::Ice)
|
||||
return EProjectileAttrib::Ice;
|
||||
else if (wType == EWeaponType::Wave)
|
||||
return EProjectileAttrib::Wave;
|
||||
else if (wType == EWeaponType::Plasma)
|
||||
return EProjectileAttrib::Plasma;
|
||||
else if (wType == EWeaponType::Phazon)
|
||||
return EProjectileAttrib::Phazon;
|
||||
|
||||
return EProjectileAttrib::None;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user