Показать сообщение отдельно
Старый 27.11.2015, 18:53   #215
Vasya
Звичайна людина на Землі
 
Аватар для Vasya
 
Регистрация: 06.11.2011
Адрес: Україна, м.Київ, Печерський район, вул. Кіквідзе
Сообщений: 8,055
Радость

Или же такая конструкция:
PHP код:
// Source File Name:   RocketX7homing_Langstrecken.java

package com.maddox.il2.objects.weapons;

import com.maddox.JGP.*;
import com.maddox.JGP.Point3d;
import com.maddox.JGP.Vector3d;
import com.maddox.il2.ai.World;
import com.maddox.il2.ai.*;
import com.maddox.il2.ai.air.*;
import com.maddox.il2.engine.*;
import com.maddox.il2.fm.FlightModel;
import com.maddox.il2.fm.RealFlightModel;
import com.maddox.il2.game.Main3D;
import com.maddox.il2.game.Selector;
import com.maddox.il2.objects.air.Aircraft;
import com.maddox.il2.objects.air.TypeX4Carrier;
import com.maddox.rts.*;

// Referenced classes of package com.maddox.il2.objects.weapons:
//            RocketX4_F

public class RocketX7homing_Langstrecken extends RocketX4_F
{

    public 
boolean interpolateStep()
    {
        
float f Time.tickLenFs();
        
float f1 = (float)getSpeed((Vector3d)null);
        
f1 += (320F f1) * 0.1F f;
        
pos.getAbs(p, or);
        
v.set(1.0D0.0D0.0D);
        or.
transform(v);
        
v.scale(f1);
        
setSpeed(v);
        
p.+= v.* (double)f;
        
p.+= v.* (double)f;
        
p.+= v.* (double)f;
        if(
isNet() && isNetMirror())
        {
            
pos.setAbs(p, or);
            return 
false;
        }
        if(
Time.current() > tStart 350L)
            if(
victim == null || !Actor.isValid(victim))
            {
                
victim NearestTargets.getEnemy(0, -1p10000DgetOwner().getArmy());
            } else
            {
                
victim.pos.getAbs(pT);
                
pT.sub(p);
                or.
transformInv(pT);
                 if(
pT.0.0D)
                {
                    if(
pT.0.10000000000000001D)
                        
deltaAzimuth = -1F;
                    if(
pT.< -0.10000000000000001D)
                        
deltaAzimuth 1.0F;
                    if(
pT.< -0.10000000000000001D)
                        
deltaTangage = -1F;
                    if(
pT.0.10000000000000001D)
                        
deltaTangage 1.0F;
                    or.
increment(45F deltaAzimuth45F deltaTangage720F f);
                    
deltaAzimuth deltaTangage 0.0F;
                } else
                {
                    
victim null;
                }
            }
        
pos.setAbs(p, or);
        return 
false;
    }
        

    public 
RocketX7homing_Langstrecken()
    {
        
evasive false;
        
victim null;
        
fm null;
        
tStart 0L;
        
deltaAzimuth 0.0F;
        
deltaTangage 0.0F;
        
victim null;
    }

    public 
RocketX7homing_Langstrecken(Actor actorNetChannel netchannelint iPoint3d point3dOrient orientfloat f)
    {
        
evasive false;
        
victim null;
        
fm null;
        
tStart 0L;
        
net = new RocketX4_F.Mirror(thisnetchanneli);
        
pos.setAbs(point3dorient);
        
pos.reset();
        
pos.setBase(actor, (Hook)nulltrue);
        
doStart(-1F);
        
v.set(1.0D0.0D0.0D);
        
orient.transform(v);
        
v.scale(f);
        
setSpeed(v);
        
collide(false);
    }

    public 
void start(float fint i)
    {
        
Actor actor pos.base();
        if(
isValid(actor) && (actor instanceof Aircraft))
        {
            if(
actor.isNetMirror())
            {
                
destroy();
                return;
            }
            
net = new RocketX4_F.Master(this);
        }
        
doStart(f);
    }

    private 
void doStart(float f)
    {
        
super.start(-1F0);
        
fm = ((Aircraft)getOwner()).FM;
        
tStart Time.current();
        if(
Config.isUSE_RENDER())
            
flame.drawing(true);
        
pos.getAbs(p, or);
        or.
setYPR(or.getYaw(), or.getPitch(), 0.0F);
        
pos.setAbs(p, or);
        if(
isNet() && isNetMirror())
            return;
        if(
Config.isUSE_RENDER())
        {
            
breakSounds();
            
Eff3DActor.setIntesity(super.smoke0.0F);
            
Eff3DActor.setIntesity(super.sprite0.0F);
            
super.flame.drawing(false);
            
super.light.light.setEmit(0.0F0.0F);
        }               
    }

    protected 
void doExplosion(Actor actorString s)
    {
        
super.pos.getTime(Time.current(), p);
        
MsgExplosion.send(actorspgetOwner(), 45F1.0F1400F);
        
super.doExplosion(actors);
    }

    protected 
void doExplosionAir()
    {
        
super.pos.getTime(Time.current(), p);
        
MsgExplosion.send((Actor)null, (String)nullpgetOwner(), 45F1.0F1400F);
        
super.doExplosionAir();
    }

    static 
java.lang.Class _mthclass$(java.lang.String s)
    {
        
java.lang.Class class1;
        try
        {
            
class1 java.lang.Class.forName(s);
        }
        catch(
java.lang.ClassNotFoundException classnotfoundexception)
        {
            throw new 
NoClassDefFoundError(classnotfoundexception.getMessage());
        }
        return 
class1;
    }
    
    private 
FlightModel fm;
    private static 
Orient or = new Orient();
    private static 
Point3d p = new Point3d();
    private static 
Point3d pT = new Point3d();
    private static 
Vector3d v = new Vector3d();
    private 
long tStart;
    private 
float deltaAzimuth;
    private 
float deltaTangage;
    private 
float deltaX;
    private 
Actor victim;
    private 
boolean evasive;
    private static 
AirGroup airgroup null;
    private static 
Pilot pilot null;

    static 
    {
        Class 
class1 com.maddox.il2.objects.weapons.RocketX7homing_Langstrecken.class;                
        
Property.set(class1"timeLife"400F);
        
Property.set(class1"timeFire"200F);
        
Property.set(class1"radius"58F);        
        
Property.set(class1"force"15712F);
        
Property.set(class1"power"17.5F);
        
Property.set(class1"powerType"1);
        
Property.set(class1"kalibr"0.22F);
        
Property.set(class1"massa"90F);
        
Property.set(class1"massaEnd"67.5F);
        
Spawn.add(class1, new RocketX4_F.SPAWN());
    }


Последний раз редактировалось Vasya; 28.11.2015 в 08:20.
Vasya на форуме   Ответить с цитированием