# SFVehicle.SFTank

00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 |
    //=============================================================================
    // Spatial Fear
    // Name: SFTank
    // Description: A vehicle class with Tank-like behavior; can turn without velocity
    //
    // Author: Gert Jen Peltenburg
    //=============================================================================
    class SFTank expands SFVehicle;

    // Tank uses forward/backward and strafe controls for control of the vehicle.
    // Lookup and turn can be used for other SFVehicles, or for looking around.

    simulated function InterpretControls(bool bJustFired,bool bFire,bool bJustAltFired,bool bAltFire,
                               float aVehicleSpeedControl,float aTurretTurn,float aVehicleTurn,
                               float aVehicleUp,float aTurretUp,bool bJustJumped,bool bJustDucked)
    {
     local float NewDesiredSpeed;

     if(aVehicleTurn<0)
      controlinputYaw = (aVehicleTurn/16384.0)*YawLeftRate;
     else
      controlinputYaw = (aVehicleTurn/16384.0)*YawRightRate;

     NewDesiredSpeed = 0;

     if(aVehicleSpeedControl<0)
      NewDesiredSpeed = MinSpeed/16384.0*abs(aVehicleSpeedControl);

     if(aVehicleSpeedControl>0)
      NewDesiredSpeed = MaxSpeed/16384.0*abs(aVehicleSpeedControl);

     DesiredSpeed = NewDesiredSpeed;
    }

    defaultproperties
    {
         bBot_ShowVehicleLocation=True
         Armor=100
         InitialHitPoints=100
         FullHitPoints=100
         PhysicsFlatBottom=True
         Elasticity=0.000000
         RepairTime=0.000000
         EncroachDamage=50
         bDamageTriggered=True
    }

class file time: 12/7/2003 3:58:26 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX