Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

tmod.tmodBuggy


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
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
class tmodBuggy extends VehicleClasses.VehicleBuggy config(tribesmodSettings);


var config int roverHealth;


simulated function PostBeginPlay() {
    
    SetProperties();
    SaveConfig();
}


simulated function SetProperties()
{
    local tmodBuggy Rover;
    
    foreach AllActors(class'tmodBuggy', Rover)
    {
        Rover.Health = roverHealth;
    }
}

simulated function bool canArmorOccupy(VehiclePositionType position, Character character)
{
    if (character.armorClass == None)
    {
        warn(character.name $ "'s armor class is none");
        return true;
    }
    if((character.ArmorClass == class'EquipmentClasses.ArmorHeavy') && (position == VP_DRIVER))
        // changed this to true for easy testing
        return false;
    else
        return true;
    
}

simulated function bool canCharacterRespawnAt()
{
    // cannot respawn if there is a driver
    if (clientPositions[0].occupant != None)
        return false;

    return super.canCharacterRespawnAt();
}

function int canOccupy(Character character, VehiclePositionType position, array<VehiclePositionType> secondaryPositions, out byte promptIndex)
{
    local int returnCode;

    returnCode = super.canOccupy(character, position, secondaryPositions, promptIndex);

    if(returnCode != -1 && team() != character.team()){
        
        team().removeVehicleRespawn(self);
        setTeam(character.team());
        team().addVehicleRespawn(self);
    }
    return returnCode;
}

function enableAbandonmentDestruction(float periodSeconds)
{
}   
    
defaultproperties
{
    gunnerWeaponClass=None
    roverHealth=1500
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: po 8.1.2018 22:01:56.000 - Creation time: st 23.5.2018 00:10:47.718 - Created with UnCodeX