Skip to content

OnPlayerCorpseSpawn ​

Usage ​

  • Return a non-null value to override default behavior

Example Autogenerated ​

csharp
private object OnPlayerCorpseSpawn( BasePlayer instance )
{
    Puts( "OnPlayerCorpseSpawn works!" );
    return null;
}

Location ​

  • BasePlayer::CreateCorpse(BasePlayer.PlayerFlags flagsOnDeath, UnityEngine.Vector3 posOnDeath, UnityEngine.Quaternion rotOnDeath, List<TriggerBase> triggersOnDeath, bool forceServerSide)
csharp
public virtual BaseCorpse CreateCorpse(PlayerFlags flagsOnDeath, Vector3 posOnDeath, Quaternion rotOnDeath, List<TriggerBase> triggersOnDeath, bool forceServerSide = false)
{
	if (Interface.CallHook("OnPlayerCorpseSpawn", this) != null)
	{
		return null;
	}
	using (TimeWarning.New("Create corpse"))
	{
//---

Released under the MIT License.