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

Engine.PlayerReplicationInfo


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
00073
00074
00075
00076
00077
00078
00079
00080
00081
//=============================================================================
// PlayerReplicationInfo.
//=============================================================================
class PlayerReplicationInfo expands ReplicationInfo
    native nativereplication;

var string              PlayerName;     // Player name, or blank if none.
var string              OldName;        // Temporary value.
var int                 PlayerID;       // Unique id number.
var string              TeamName;       // Team name, or blank if none.
var byte                Team;           // Player Team, 255 = None for player.
var int                 TeamID;         // Player position in team.
var float               Score;          // Player's current score.
var float               Deaths;         // Number of player's deaths.
var class<VoicePack>    VoiceType;
var Decoration          HasFlag;
var int                 Ping;
var byte                PacketLoss;
var bool                bIsFemale;
var bool                bIsABot;
var bool                bFeigningDeath;
var bool                bIsSpectator;
var bool                bWaitingPlayer;
var bool                bAdmin;
var Texture             TalkTexture;
var ZoneInfo            PlayerZone;
var LocationID          PlayerLocation;

// Time elapsed.
var int                 StartTime;
var int                 TimeAcc;

replication
{
    // Things the server should send to the client.
    reliable if ( Role == ROLE_Authority )
        PlayerName, OldName, PlayerID, TeamName, Team, TeamID, Score, Deaths, VoiceType,
        HasFlag, Ping, PacketLoss, bIsFemale, bIsABot, bFeigningDeath, bIsSpectator, bWaitingPlayer,
        bAdmin, TalkTexture, PlayerZone, PlayerLocation, StartTime;
}

function PostBeginPlay()
{
    StartTime = Level.TimeSeconds;
    Timer();
    SetTimer(2.0, true);
    bIsFemale = Pawn(Owner).bIsFemale;
}
                    
function Timer()
{
    local float MinDist, Dist;
    local LocationID L;

    MinDist = 1000000;
    PlayerLocation = None;
    if ( PlayerZone != None )
        for ( L=PlayerZone.LocationID; L!=None; L=L.NextLocation )
        {
            Dist = VSize(Owner.Location - L.Location);
            if ( (Dist < L.Radius) && (Dist < MinDist) )
            {
                PlayerLocation = L;
                MinDist = Dist;
            }
        }
    if ( FRand() < 0.65 )
        return;

    if (PlayerPawn(Owner) != None)
        Ping = int(PlayerPawn(Owner).ConsoleCommand("GETPING"));
    if (PlayerPawn(Owner) != None)
        PacketLoss = int(PlayerPawn(Owner).ConsoleCommand("GETLOSS"));
}

defaultproperties
{
     Team=255
     NetUpdateFrequency=2.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Do 19.5.2005 19:42:12.000 - Creation time: Fr 7.6.2013 13:15:53.885 - Created with UnCodeX