Beispiel #1
0
 private void HandleAgentPunishment(Agent agent)
 {
     if (GameNetwork.IsSessionActive)
     {
         if (!GameNetwork.IsServer)
         {
             return;
         }
         Blow b = new Blow(agent.Index);
         b.WeaponRecord.FillAsMeleeBlow((ItemObject)null, (WeaponComponentData)null, -1, (sbyte)0);
         b.DamageType               = DamageTypes.Blunt;
         b.BaseMagnitude            = 10000f;
         b.WeaponRecord.WeaponClass = WeaponClass.Undefined;
         b.Position = agent.Position;
         agent.Die(b);
     }
     else
     {
         this.Mission.RetreatMission();
     }
 }
 public KillingBlow(
     Blow b,
     Vec3 ragdollImpulsePoint,
     Vec3 ragdollImpulseAmount,
     int deathAction,
     int weaponItemKind,
     Agent.KillInfo overrideKillInfo = Agent.KillInfo.Invalid)
 {
     this.RagdollImpulseLocalPoint = ragdollImpulsePoint;
     this.RagdollImpulseAmount     = ragdollImpulseAmount;
     this.DeathAction             = deathAction;
     this.OverrideKillInfo        = overrideKillInfo;
     this.DamageType              = b.DamageType;
     this.AttackType              = b.AttackType;
     this.OwnerId                 = b.OwnerId;
     this.BoneIndex               = b.BoneIndex;
     this.WeaponClass             = (int)b.WeaponRecord.WeaponClass;
     this.BlowPosition            = b.Position;
     this.WeaponRecordWeaponFlags = b.WeaponRecord.WeaponFlags;
     this.WeaponItemKind          = weaponItemKind;
     this.InflictedDamage         = b.InflictedDamage;
     this.IsMissile               = b.IsMissile;
     this.IsValid                 = true;
 }