实体
抛射物 CProjectileInfo
火箭手雷等抛射物槽
CProjectileInfo.h
火箭、手雷等抛射物槽。上限 MAX_PROJECTILES / MAX_PROJECTILE_INFOS(默认 32)。
添加抛射物
AddProjectile
creator / 类型 / 位置 / 力 / 方向 / 目标。
static bool AddProjectile(CEntity* creator, eWeaponType eWeaponType, CVector posn,
float force, CVector* direction, CEntity* victim);取信息 / 列表
GetProjectileInfo / ms_apProjectile
static CProjectileInfo* GetProjectileInfo(int infoId);
static CProjectile** ms_apProjectile;
extern CProjectileInfo* gaProjectileInfo;移除
RemoveProjectile / RemoveAllProjectiles
static void RemoveProjectile(CProjectileInfo* projectileInfo, CProjectile* projectileObject);
static void RemoveAllProjectiles();
static void RemoveDetonatorProjectiles();
static bool RemoveIfThisIsAProjectile(CObject* object);范围查询
IsProjectileInRange
盒内是否有弹,可选销毁。
static bool IsProjectileInRange(float x1, float y1, float z1, float x2, float y2, float z2, bool bDestroy);更新
Update / RemoveFXSystem
游戏帧内调用;ASI 少直接 Update。
static void Update();
static void RemoveFXSystem(unsigned char bInstantly);