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

UnrealShare.VRikersGame


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
//=============================================================================
// VRikersGame.
//
// no default weapon
//
//=============================================================================
class VRikersGame expands UnrealGameInfo;

event playerpawn Login
(
    string[32] Portal,
    string[120] Options,
    out string[80] Error,
    class<playerpawn> SpawnClass
)
{
    local PlayerPawn NewPlayer;
    NewPlayer = Super.Login(Portal, Options, Error, SpawnClass);
    if ( (NewPlayer != None)
        && (NewPlayer.Health == NewPlayer.Default.Health)  )
    {
        NewPlayer.PlayerRestartState = 'PlayerWaking';
        NewPlayer.ViewRotation.Pitch = 16384;
        NewPlayer.Health = 12;
    }
    return NewPlayer;
}

function bool RestartPlayer(pawn aPlayer)   
{
    local bool result;

    result = Super.RestartPlayer(aPlayer);
    if ( result )
    {
        aPlayer.Health = 12;
        aPlayer.ViewRotation.Pitch = 16384;
    }
    return result;
}

function int ReduceDamage(int Damage, name DamageType, pawn injured, pawn instigatedBy)
{
    // no friendly fire always in coop
    if ( (instigatedBy != None) 
        && instigatedBy.bIsPlayer && injured.bIsPlayer && (instigatedBy != injured) )
        return 0;

    return Super.ReduceDamage(Damage, DamageType, injured, instigatedBy);
}

function AddDefaultInventory(pawn PlayerPawn)
{
    return;
}

function bool PickupQuery(Pawn Other, Inventory item)
{
    if ( item.IsA('DispersionPistol') )
        DefaultWeapon = class'DispersionPistol';
    return Super.PickupQuery(Other, item);
}

defaultproperties
{
     bHumansOnly=True
     DefaultWeapon=None
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sun 21/2/2010 23:48:40.000 - Creation time: Sun 21/2/2010 23:49:54.363 - Created with UnCodeX