Guys, besides hitinfo.Weapon, hitinfo.damageAmount and hitinfo.damageType, I would like to know with more options do we have inside OnEntityAttacked.
Sorry to disturb you with this, but I couldnt use a decompiler yet.
OnEntityAttacked
Discussion in 'Rust Development' started by TheRotAG, Dec 17, 2014.
-
Code:
public class HitInfo { // Fields public DamageTypeList damageTypes; public bool DidHit; public bool DoHitEffects; public uint HitBone; public BaseEntity HitEntity; public uint HitMaterial; public Vector3 HitNormalLocal; public Vector3 HitNormalWorld; public uint HitPart; public Vector3 HitPositionLocal; public Vector3 HitPositionWorld; public BaseEntity Initiator; public bool IsPredicting; public PhysicMaterial material; public Vector3 PointEnd; public Vector3 PointStart; public Connection Predicted; public int ProjectileID; public float resourceGatherProficiency; public AttackEntity Weapon; // Methods public HitInfo(); public HitInfo(BaseEntity attacker, DamageType type, float damageAmount, Vector3 vhitPosition); public void AddDamage(DamageType type, float amount); public void LoadFromAttack(Attack attack); // Properties public bool hasDamage { get; } }
-
Thanks Mughisi!
Do u know how could I call DamageTypeList and its damageTypes? Tried several times without success... -
Look into my r-deathmessages