OnCrateLaptopAttack
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnCrateLaptopAttack( HackableLockedCrate instance, HitInfo info )
{
Puts( "OnCrateLaptopAttack works!" );
}
Location
- HackableLockedCrate::OnAttacked(HitInfo info)
csharp
//---
{
if (base.isServer)
{
if (StringPool.Get(info.HitBone) == "laptopcollision")
{
if (Interface.CallHook("OnCrateLaptopAttack", this, info) != null)
{
return;
}
Effect.server.Run(this.shockEffect.resourcePath, info.HitPositionWorld, Vector3.up, null, false, null);
this.hackSeconds -= 8f * (info.damageTypes.Total() / 50f);
//---