Exemplo n.º 1
0
 protected override void Impact(Thing hitThing)
 {
     if (hitThing != null)
     {
         int        damageAmountBase = this.def.projectile.damageAmountBase;
         DamageInfo damageInfo       = new DamageInfo(this.dmgdef, damageAmountBase, this.launcher, this.ExactRotation.eulerAngles.y, null, null);
         hitThing.TakeDamage(damageInfo);
         Pawn pawn = hitThing as Pawn;
         if (pawn != null)
         {
             hitThing.TakeDamage(new DamageInfo(dmgdef, 0, this.launcher, null, null));
             MoteMaker.ThrowLightningGlow(base.Position.ToVector3Shifted(), 1F);
             MoteMaker.TryThrowMicroSparks(base.Position.ToVector3Shifted());
             if (pawn.IsColonist)
             {
                 Messages.Message(pawn.Name.first + " " + " " + pawn.Name.last + " was vaporized.", MessageSound.Negative);
             }
             pawn.DeSpawn();
         }
     }
     else
     {
         MoteMaker.MakeShotHitDirt(this.ExactPosition);
     }
     this.Destroy();
 }
Exemplo n.º 2
0
 protected override void Impact(Thing hitThing)
 {
     if (hitThing != null)
     {
         int        damageAmountBase = this.def.projectile.damageAmountBase;
         DamageInfo damageInfo       = new DamageInfo(this.dmgdef, damageAmountBase, this.launcher, this.ExactRotation.eulerAngles.y, null, null);
         hitThing.TakeDamage(damageInfo);
         Pawn pawn = hitThing as Pawn;
         if (pawn != null && !pawn.healthTracker.Downed)
         {
             hitThing.TakeDamage(new DamageInfo(dmgdef, 0, this.launcher, null, null));
             pawn.healthTracker.ForceDowned();
             if (pawn.def.race.humanoid)
             {
                 //pawn.health = UnityEngine.Random.Range(80, 99);
             }
         }
     }
     else
     {
         MoteMaker.MakeShotHitDirt(this.ExactPosition);
     }
     this.Destroy(0);
 }