Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

# tmod.tmodDefaultBuggy

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

    class tmodDefaultBuggy extends VehicleClasses.VehicleBuggy config(tribesmodSettings);

    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))
            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
    {
        Health=850
        gunnerWeaponClass=Class'AntiAircraftWeapon'
    }

Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
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.724 - Created with UnCodeX