private void Hit(int damage) { if (this.ignoreHit) { this.ignoreHit = false; return; } if (base.entity.IsAttached() && BoltNetwork.isRunning) { HitCorpse hitCorpse = HitCorpse.Create(GlobalTargets.Everyone); hitCorpse.Entity = base.entity; hitCorpse.Damage = this.Health - damage; hitCorpse.creepyCorpse = true; hitCorpse.Send(); } this.DoLocalCut(this.Health - damage); }
private void Hit(int damage) { if (!this.animator) { this.animator = base.transform.GetComponentInParent <Animator>(); } if (this.animator && this.animator.GetCurrentAnimatorStateInfo(0).shortNameHash == Scene.animHash.nooseTrapDeathHash) { return; } if (this.ignoreHit) { this.ignoreHit = false; return; } if (this.infected) { LocalPlayer.Stats.BloodInfection.TryGetInfected(); } if (base.entity.IsAttached()) { HitCorpse hitCorpse = HitCorpse.Create(GlobalTargets.OnlyServer); hitCorpse.Entity = base.entity; hitCorpse.Damage = damage; hitCorpse.BodyPartIndex = base.GetComponentInParent <CoopSliceAndDiceMutant>().GetBodyPartIndex(this); hitCorpse.Send(); if (!base.entity.isOwner) { this.DoLocalCut(this.Health - damage); } } else { this.DoLocalCut(this.Health - damage); } }
private void Hit(int damage) { if (this.ignoreHit) { this.ignoreHit = false; return; } if (this.infected) { LocalPlayer.Stats.BloodInfection.TryGetInfected(); } if (this.entity.IsAttached()) { HitCorpse hitCorpse = HitCorpse.Create(GlobalTargets.OnlyServer); hitCorpse.Entity = this.entity; hitCorpse.Damage = damage; hitCorpse.BodyPartIndex = base.GetComponentInParent <CoopSliceAndDiceMutant>().GetBodyPartIndex(this); hitCorpse.Send(); } else { this.DoLocalCut(this.Health - damage); } }