Ejemplo n.º 1
0
        public InstantHitWeapon(World world, WeaponType type, Target target, Actor origin, uint id) : base(world, type, target, origin, id)
        {
            projectile = (InstantHitProjectile)type.Projectile;

            var diff = Position - TargetPosition;

            if (diff.FlatDist > type.MaxRange * RangeModifier)
            {
                var angle = diff.FlatAngle;
                TargetPosition = clampToMaxRange(Position, angle);
                Target         = new Target(TargetPosition, 0);
            }
        }
Ejemplo n.º 2
0
 public InstantHitWeapon(World world, WeaponInit init) : base(world, init)
 {
     projectile = (InstantHitProjectile)Type.Projectile;
 }