实体

物体 CObject

物体血量、伤害、绳索与门

CObject.h · 继承 CPhysical

逻辑帧改;drawing 只读。

创建与类型

CObject / m_nObjectType

也可用 Command 创建后 CPools::GetObject

CObject();
CObject(int32_t modelId, bool bCreate);
unsigned char m_nObjectType; // OBJECT_MISSION 等

血量与缩放

m_fHealth / m_fScale
float m_fHealth;
float m_fScale;
// m_nObjectFlags bitfield

伤害与爆炸

ObjectDamage / Explode / TryToExplode
void ObjectDamage(float damage, CVector* fxOrigin, CVector* fxDirection, CEntity* damager, eWeaponType weaponType);
void Explode();
bool TryToExplode();
void ObjectFireDamage(float damage, CEntity* damager);

可锁定目标

SetObjectTargettable / CanBeTargetted
void SetObjectTargettable(unsigned char targetable);
bool CanBeTargetted();

门行为

LockDoor / ResetDoorAngle
void LockDoor();
void ResetDoorAngle();
float m_fDoorStartAngle;

绳索

GetRopeHeight / SetRopeHeight
float GetRopeHeight();
void SetRopeHeight(float height);
CEntity* GetObjectCarriedWithRope();
void ReleaseObjectCarriedWithRope();

重映射贴图

SetRemapTexture
void SetRemapTexture(RwTexture* remapTexture, short txdIndex);

On this page