OnPlayerCorpseSpawned
Usage
- No return behavior
Example Autogenerated
csharp
private void OnPlayerCorpseSpawned( BasePlayer instance, PlayerCorpse enumerator )
{
Puts( "OnPlayerCorpseSpawned works!" );
}
Location
- BasePlayer::CreateCorpse(BasePlayer/PlayerFlags flagsOnDeath, UnityEngine.Vector3 posOnDeath, UnityEngine.Quaternion rotOnDeath, System.Collections.Generic.List`1<TriggerBase> triggersOnDeath, bool forceServerSide)
csharp
//---
if (this.lifeStory != null)
{
num += Mathf.Clamp(Mathf.FloorToInt(this.lifeStory.secondsAlive / 180f), 0, 20);
}
arg_1FB_0.containedItems.Add(new ItemAmount(ItemManager.FindItemDefinition("fat.animal"), (float)num));
Interface.CallHook("OnPlayerCorpseSpawned", this, playerCorpse);
return playerCorpse;
}
}
return null;
}