OnPlayerDeath
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnPlayerDeath( BasePlayer instance, HitInfo info )
{
Puts( "OnPlayerDeath works!" );
}
Location
- BasePlayer::Die(HitInfo info)
csharp
//---
Vector3 vector = new Vector3(UnityEngine.Random.Range(-2f, 2f), 0.2f, UnityEngine.Random.Range(-2f, 2f));
this.Belt.DropActive(this.GetDropPosition(), this.GetInheritedDropVelocity() + vector.normalized * 3f);
}
if (!this.WoundInsteadOfDying(info))
{
if (Interface.CallHook("OnPlayerDeath", this, info) != null)
{
return;
}
SleepingBag.OnPlayerDeath(this);
base.Die(info);
//---