Prepare fixtures
This commit is contained in:
parent
797e5ea192
commit
9c94356263
6021 changed files with 722805 additions and 22 deletions
11
kf_sources/XGame/Classes/AimedAttachment.uc
Normal file
11
kf_sources/XGame/Classes/AimedAttachment.uc
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
class AimedAttachment extends Actor
|
||||
native;
|
||||
|
||||
var() Vector BaseOffset;
|
||||
var() Vector AimedOffset;
|
||||
var() float DownwardBias;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
RemoteRole=ROLE_DumbProxy
|
||||
}
|
||||
19
kf_sources/XGame/Classes/AttractCamera.uc
Normal file
19
kf_sources/XGame/Classes/AttractCamera.uc
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//=============================================================================
|
||||
// Attract-mode camera points
|
||||
// Copyright 2001 Digital Extremes - All Rights Reserved.
|
||||
// Confidential.
|
||||
//=============================================================================
|
||||
|
||||
class AttractCamera extends Keypoint;
|
||||
|
||||
var() float ViewAngle;
|
||||
var() float MinZoomDist;
|
||||
var() float MaxZoomDist;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bStasis=true
|
||||
ViewAngle=100
|
||||
MinZoomDist=600
|
||||
MaxZoomDist=1200
|
||||
}
|
||||
146
kf_sources/XGame/Classes/BloodRites.uc
Normal file
146
kf_sources/XGame/Classes/BloodRites.uc
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
//==============================================================================
|
||||
// Single Player Challenge Game code
|
||||
// A blood rite challenge is a challenge against an whole team. The prize is a
|
||||
// exchange of team mates.
|
||||
//
|
||||
// Written by Michiel Hendriks
|
||||
// (c) 2003, Epic Games, Inc. All Rights Reserved
|
||||
//==============================================================================
|
||||
|
||||
class BloodRites extends ChallengeGame;
|
||||
|
||||
/** menu to display when we lost out team mate */
|
||||
var string UntradeMenu;
|
||||
/** The trade menu */
|
||||
var string TradeMenu;
|
||||
/** entry fee multiplicator of the bot's price */
|
||||
var float ChalFeeMultiply;
|
||||
|
||||
/**
|
||||
We have two special events: TRADE and UNTRADE
|
||||
Both have the arguments <teamname> <playername>
|
||||
In case of TRADE you get a player to add to your team, unless your team is
|
||||
already full, then you have to remove one firts.
|
||||
UNTRADE will just give you the message that a team mate has been removed
|
||||
from your team.
|
||||
*/
|
||||
static function HandleSpecialEvent(UT2K4GameProfile GP, array<string> SpecialEvent, out array<TriString> GUIPages)
|
||||
{
|
||||
local class<UT2K4TeamRoster> ETI;
|
||||
local array<string> NewTeamRoster;
|
||||
local int i;
|
||||
|
||||
if (SpecialEvent[0] == "TRADE")
|
||||
{
|
||||
GUIPages.length = GUIPages.length+1;
|
||||
GUIPages[GUIPages.length-1].GUIPage = default.TradeMenu;
|
||||
GUIPages[GUIPages.length-1].Param1 = SpecialEvent[1];
|
||||
GUIPages[GUIPages.length-1].Param2 = SpecialEvent[2];
|
||||
|
||||
// remove the player from that team
|
||||
if (!GP.GetAltTeamRoster(SpecialEvent[1], NewTeamRoster))
|
||||
{
|
||||
ETI = class<UT2K4TeamRoster>(DynamicLoadObject(SpecialEvent[1], class'Class'));
|
||||
if (ETI != none) NewTeamRoster = ETI.default.RosterNames;
|
||||
else Warn("Some Nali cow ate the enemy team class");
|
||||
}
|
||||
for (i = 0; i < NewTeamRoster.length; i++)
|
||||
{
|
||||
if (NewTeamRoster[i] ~= SpecialEvent[2])
|
||||
{
|
||||
NewTeamRoster.remove(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
GP.SetAltTeamRoster(SpecialEvent[1], NewTeamRoster);
|
||||
// update bot stats
|
||||
i = GP.GetBotPosition(SpecialEvent[2]);
|
||||
if (i > -1)
|
||||
{
|
||||
GP.BotStats[i].Health = 100;
|
||||
GP.BotStats[i].TeamId = -1;
|
||||
// refund entry fee
|
||||
GP.Balance += GP.BotStats[i].Price*default.ChalFeeMultiply;
|
||||
}
|
||||
}
|
||||
else if (SpecialEvent[0] == "UNTRADE")
|
||||
{
|
||||
GUIPages.length = GUIPages.length+1;
|
||||
GUIPages[GUIPages.length-1].GUIPage = default.UnTradeMenu;
|
||||
GUIPages[GUIPages.length-1].Param1 = SpecialEvent[1];
|
||||
GUIPages[GUIPages.length-1].Param2 = SpecialEvent[2];
|
||||
// remove the player from our team
|
||||
GP.ReleaseTeammate(SpecialEvent[2]);
|
||||
// add it to the enemy team
|
||||
if (!GP.GetAltTeamRoster(SpecialEvent[1], NewTeamRoster))
|
||||
{
|
||||
ETI = class<UT2K4TeamRoster>(DynamicLoadObject(SpecialEvent[1], class'Class'));
|
||||
if (ETI != none) NewTeamRoster = ETI.default.RosterNames;
|
||||
else Warn("Some Nali cow ate the enemy team class");
|
||||
}
|
||||
if (NewTeamRoster.length == 0)
|
||||
{
|
||||
NewTeamRoster.length = NewTeamRoster.length+1;
|
||||
NewTeamRoster[NewTeamRoster.length-1] = SpecialEvent[2];
|
||||
// update bot stats
|
||||
i = GP.GetBotPosition(SpecialEvent[2]);
|
||||
if (i > -1)
|
||||
{
|
||||
GP.BotStats[i].Health = 100;
|
||||
GP.BotStats[i].TeamId = GP.GetTeamPosition(SpecialEvent[1]);
|
||||
}
|
||||
}
|
||||
GP.SetAltTeamRoster(SpecialEvent[1], NewTeamRoster);
|
||||
}
|
||||
}
|
||||
|
||||
/** when we where challenged the SpecialEvent logic goes the other way around */
|
||||
static function PostRegisterGame(UT2K4GameProfile GP, GameInfo currentGame, PlayerReplicationInfo PRI)
|
||||
{
|
||||
// do the switch
|
||||
if (GP.bGotChallenged)
|
||||
{
|
||||
if (!GP.bWonMatch) GP.SpecialEvent $= ";"$GP.ChallengeInfo.SpecialEvent;
|
||||
else {
|
||||
// remove the UNTRADE
|
||||
GP.SpecialEvent = repl(GP.SpecialEvent, GP.ChallengeInfo.SpecialEvent, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static function AddHistoryRecord(UT2K4GameProfile GP, int offset, GameInfo Game, PlayerReplicationInfo PRI, UT2K4MatchInfo MI)
|
||||
{
|
||||
super.AddHistoryRecord(GP, offset, game, PRI, MI);
|
||||
|
||||
}
|
||||
|
||||
static function bool canChallenge(optional UT2K4GameProfile GP)
|
||||
{
|
||||
if (GP == none) return true;
|
||||
return GP.completedLadder(GP.UT2K4GameLadder.default.LID_TDM);
|
||||
}
|
||||
|
||||
static function bool payTeamMates(UT2K4GameProfile GP)
|
||||
{
|
||||
return ! GP.bGotChallenged;
|
||||
}
|
||||
|
||||
static function StartChallenge(UT2K4GameProfile GP, LevelInfo myLevel)
|
||||
{
|
||||
GP.SpecialEvent = "";
|
||||
if (GP.bGotChallenged) GP.SpecialEvent = GP.ChallengeInfo.SpecialEvent; // so you can't chicken out
|
||||
GP.bIsChallenge = true;
|
||||
GP.Balance -= GP.ChallengeInfo.EntryFee;
|
||||
GP.ChallengeGameClass = default.class;
|
||||
GP.StartNewMatch ( -1, myLevel );
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
ChallengeName="Bloodrites"
|
||||
ChallengeDescription="Challenge an enemy team for one for their team mates."
|
||||
ChallengeMenu="GUI2K4.UT2K4SP_CGBloodRites"
|
||||
TradeMenu="GUI2K4.UT2K4SP_CGBRTrade"
|
||||
UntradeMenu="GUI2K4.UT2K4SP_CGBRUntrade"
|
||||
ChalFeeMultiply=3
|
||||
}
|
||||
61
kf_sources/XGame/Classes/BodyEffect.uc
Normal file
61
kf_sources/XGame/Classes/BodyEffect.uc
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
class BodyEffect extends Effects;
|
||||
|
||||
var class<DamageType> DamageType;
|
||||
var vector HitLoc;
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
local ColorModifier Alpha;
|
||||
local float frame, rate;
|
||||
local name seq;
|
||||
|
||||
Super.PostBeginPlay();
|
||||
LinkMesh(Owner.Mesh);
|
||||
Owner.GetAnimParams( 0, seq, frame, rate );
|
||||
PlayAnim(seq, 0, 0);
|
||||
SetAnimFrame(frame);
|
||||
StopAnimating();
|
||||
Alpha = ColorModifier(Level.ObjectPool.AllocateObject(class'ColorModifier'));
|
||||
Alpha.Material = Skins[0];
|
||||
Alpha.AlphaBlend = true;
|
||||
Alpha.RenderTwoSided = true;
|
||||
Alpha.Color.A = 128;
|
||||
Skins[0] = Alpha;
|
||||
Skins[1] = Alpha;
|
||||
Skins[2] = Alpha;
|
||||
}
|
||||
|
||||
simulated function Tick(float deltaTime)
|
||||
{
|
||||
SetDrawScale(DrawScale * (1 + 0.5*DeltaTime));
|
||||
ColorModifier(Skins[0]).Color.A = int(128.f * (LifeSpan / default.LifeSpan));
|
||||
}
|
||||
|
||||
simulated function Destroyed()
|
||||
{
|
||||
if ( xPawn(Owner) != None )
|
||||
{
|
||||
xPawn(Owner).bFrozenBody = false;
|
||||
xPawn(Owner).PlayDyingAnimation(DamageType, HitLoc);
|
||||
}
|
||||
Level.ObjectPool.FreeObject(Skins[0]);
|
||||
Skins[0] = None;
|
||||
Skins[1] = None;
|
||||
Skins[2] = None;
|
||||
Super.Destroyed();
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
RemoteRole==ROLE_None
|
||||
Physics=PHYS_None
|
||||
ScaleGlow=+1.0
|
||||
bCollideActors=false
|
||||
bCollideWorld=false
|
||||
DrawType=DT_Mesh
|
||||
LifeSpan=0.65
|
||||
// ifndef _RO_
|
||||
// Skins(0)=Material'XGameShaders.PlayerShaders.LinkHit'
|
||||
// Skins(1)=Material'XGameShaders.PlayerShaders.LinkHit'
|
||||
// Skins(2)=Material'XGameShaders.PlayerShaders.LinkHit'
|
||||
}
|
||||
10
kf_sources/XGame/Classes/CachePlayers.uc
Normal file
10
kf_sources/XGame/Classes/CachePlayers.uc
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
class CachePlayers extends xUtil
|
||||
native;
|
||||
|
||||
var array<PlayerRecord> Records;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
SectionName="Public"
|
||||
FileExtension="upl"
|
||||
}
|
||||
99
kf_sources/XGame/Classes/ChallengeGame.uc
Normal file
99
kf_sources/XGame/Classes/ChallengeGame.uc
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
//==============================================================================
|
||||
// Single Player Challenge Game code - base class
|
||||
//
|
||||
// Written by Michiel Hendriks
|
||||
// (c) 2003, Epic Games, Inc. All Rights Reserved
|
||||
//==============================================================================
|
||||
|
||||
class ChallengeGame extends Object abstract;
|
||||
|
||||
/** name of this challenge */
|
||||
var localized string ChallengeName;
|
||||
/** description of the challenge */
|
||||
var localized string ChallengeDescription;
|
||||
var localized string msgGotChallenged, msgWeChallenged, msgFor;
|
||||
|
||||
/** the challenge configuration menu */
|
||||
var string ChallengeMenu;
|
||||
|
||||
struct TriString
|
||||
{
|
||||
var string GUIPage;
|
||||
var string Param1, Param2;
|
||||
};
|
||||
|
||||
/** called from GameProfile.RegisterGame() before anything is processed */
|
||||
static function PreRegisterGame(UT2K4GameProfile GP, GameInfo currentGame, PlayerReplicationInfo PRI)
|
||||
{
|
||||
}
|
||||
|
||||
/** called from GameProfile.RegisterGame() after everything is processed */
|
||||
static function PostRegisterGame(UT2K4GameProfile GP, GameInfo currentGame, PlayerReplicationInfo PRI)
|
||||
{
|
||||
}
|
||||
|
||||
/** start this challenge */
|
||||
static function StartChallenge(UT2K4GameProfile GP, LevelInfo myLevel)
|
||||
{
|
||||
GP.SpecialEvent = "";
|
||||
GP.bIsChallenge = true;
|
||||
GP.Balance -= GP.ChallengeInfo.EntryFee;
|
||||
GP.ChallengeGameClass = default.class;
|
||||
GP.StartNewMatch ( -1, myLevel );
|
||||
}
|
||||
|
||||
/**
|
||||
called when the game was a challenge game and was not one of the default special events.
|
||||
Fill the GUIPages array with pages you want to be opened after this special event has been processed.
|
||||
Yes I know this method sucks, but it was the best I could come up with without a lot of changes in the current system.
|
||||
*/
|
||||
static function HandleSpecialEvent(UT2K4GameProfile GP, array<string> SpecialEvent, out array<TriString> GUIPages)
|
||||
{
|
||||
}
|
||||
|
||||
/** Handle match requirements, return false if a requirement has not been met */
|
||||
static function bool HandleRequirements(UT2K4GameProfile GP, array<string> SpecialEvent, out array<TriString> GUIPages)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
will be called after the default info has been added to the history record.
|
||||
override this to change or append additional into.
|
||||
*/
|
||||
static function AddHistoryRecord(UT2K4GameProfile GP, int offset, GameInfo Game, PlayerReplicationInfo PRI, UT2K4MatchInfo MI)
|
||||
{
|
||||
if (GP.bGotChallenged) GP.FightHistory[offset].MatchExtra = default.msgGotChallenged;
|
||||
else GP.FightHistory[offset].MatchExtra = default.msgWeChallenged;
|
||||
if (GP.ChallengeVariable != "") GP.FightHistory[offset].MatchExtra @= default.msgFor@GP.ChallengeVariable;
|
||||
}
|
||||
|
||||
/**
|
||||
Return true when this challenge game can be used to challenge the player
|
||||
*/
|
||||
static function bool canChallenge(optional UT2K4GameProfile GP)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** return true when the team mates should be payed */
|
||||
static function bool payTeamMates(UT2K4GameProfile GP)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
Return true when a team mate _may_ be injured, this does not mean a team mate will be injured.
|
||||
By default only challenged that where initiated by the player may have a team mate injured.
|
||||
*/
|
||||
static function bool injureTeamMate(UT2K4GameProfile GP)
|
||||
{
|
||||
return !GP.bGotChallenged;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
msgGotChallenged="We got challenged"
|
||||
msgWeChallenged="We challenged"
|
||||
msgFor="for"
|
||||
}
|
||||
94
kf_sources/XGame/Classes/Combo.uc
Normal file
94
kf_sources/XGame/Classes/Combo.uc
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
class Combo extends Info;
|
||||
|
||||
// ifndef _RO_
|
||||
//#exec OBJ LOAD FILE=GameSounds.uax
|
||||
|
||||
var localized string ExecMessage;
|
||||
var float AdrenalineCost;
|
||||
var float Duration;
|
||||
var Sound ActivateSound;
|
||||
var Material Icon;
|
||||
var class<xEmitter> ActivationEffectClass;
|
||||
var sound ComboAnnouncement; // OBSOLETE
|
||||
var name ComboAnnouncementName;
|
||||
var int keys[4];
|
||||
var class<SpeciesType> species;
|
||||
|
||||
// CK_Up = 1;
|
||||
// CK_Down = 2;
|
||||
// CK_Left = 4;
|
||||
// CK_Right = 8;
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
local xPawn P;
|
||||
|
||||
P = xPawn(Owner);
|
||||
if (P == None)
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
if (ActivateSound != None)
|
||||
PlaySound(ActivateSound, SLOT_None, 2*TransientSoundVolume);
|
||||
|
||||
if (ActivationEffectClass != None)
|
||||
Spawn(ActivationEffectClass, P,, P.Location, P.Rotation); // it's responsible for killing itself
|
||||
|
||||
StartEffect(P);
|
||||
}
|
||||
|
||||
// called when Adrenaline has been drained empty
|
||||
function AdrenalineEmpty()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
function Destroyed()
|
||||
{
|
||||
local xPawn P;
|
||||
P = xPawn(Owner);
|
||||
|
||||
if (P != None)
|
||||
{
|
||||
StopEffect(P);
|
||||
|
||||
if (P.CurrentCombo == self)
|
||||
P.CurrentCombo = None;
|
||||
}
|
||||
}
|
||||
|
||||
function StartEffect(xPawn P);
|
||||
function StopEffect(xPawn P);
|
||||
|
||||
simulated function Tick(float DeltaTime)
|
||||
{
|
||||
local Pawn P;
|
||||
|
||||
P = Pawn(Owner);
|
||||
|
||||
if ( (P == None) || (P.Controller == None) )
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
if ( (P.Controller.PlayerReplicationInfo != None) && (P.Controller.PlayerReplicationInfo.HasFlag != None) )
|
||||
DeltaTime *= 2;
|
||||
P.Controller.Adrenaline -= AdrenalineCost*DeltaTime/Duration;
|
||||
if (P.Controller.Adrenaline <= 0.0)
|
||||
{
|
||||
P.Controller.Adrenaline = 0.0;
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Duration=30
|
||||
AdrenalineCost=100
|
||||
// ifndef _RO_
|
||||
//ActivateSound=Sound'GameSounds.ComboActivated'
|
||||
// Temp commented out - Ramm
|
||||
//ActivationEffectClass=class'xEffects.ComboActivation'
|
||||
}
|
||||
40
kf_sources/XGame/Classes/CustomLadderInfo.uc
Normal file
40
kf_sources/XGame/Classes/CustomLadderInfo.uc
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
//==============================================================================
|
||||
// Base class for custom ladders
|
||||
//
|
||||
// Written by Michiel Hendriks
|
||||
// (c) 2003, Epic Games, Inc. All Rights Reserved
|
||||
//==============================================================================
|
||||
|
||||
class CustomLadderInfo extends Object abstract;
|
||||
|
||||
var string LadderName;
|
||||
var localized array<string> EntryLabels;
|
||||
var array<UT2K4MatchInfo> Matches;
|
||||
|
||||
/**
|
||||
called when the game was a challenge game and was not one of the default special events.
|
||||
Fill the GUIPages array with pages you want to be opened after this special event has been processed.
|
||||
Yes I know this method sucks, but it was the best I could come up with without a lot of changes in the current system.
|
||||
*/
|
||||
static function HandleSpecialEvent(UT2K4GameProfile GP, array<string> SpecialEvent, out array<ChallengeGame.TriString> GUIPages)
|
||||
{
|
||||
}
|
||||
|
||||
/** Handle match requirements, return false if a requirement has not been met */
|
||||
static function bool HandleRequirements(UT2K4GameProfile GP, array<string> SpecialEvent, out array<ChallengeGame.TriString> GUIPages)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
will be called after the default info has been added to the history record.
|
||||
override this to change or append additional into.
|
||||
*/
|
||||
static function AddHistoryRecord(UT2K4GameProfile GP, int offset, GameInfo Game, PlayerReplicationInfo PRI, UT2K4MatchInfo MI)
|
||||
{
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
LadderName="Custom Ladder"
|
||||
}
|
||||
82
kf_sources/XGame/Classes/DMRosterConfigured.uc
Normal file
82
kf_sources/XGame/Classes/DMRosterConfigured.uc
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
class DMRosterConfigured extends xDMRoster;
|
||||
|
||||
/* this class used for configured instant action or multiplayer games with bots
|
||||
*/
|
||||
var config array<string> Characters;
|
||||
|
||||
function Initialize(int TeamBots)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Roster.Length; i++ )
|
||||
Roster[i].PrecacheRosterFor(self);
|
||||
}
|
||||
|
||||
function int OverrideInitialBots(int N, UnrealTeamInfo T)
|
||||
{
|
||||
return Roster.Length;
|
||||
}
|
||||
|
||||
function bool AllBotsSpawned()
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Roster.Length; i++ )
|
||||
if ( !Roster[i].bTaken )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Characters.Length; i++ )
|
||||
RosterNames[i] = Characters[i];
|
||||
Super.PostBeginPlay();
|
||||
}
|
||||
|
||||
static function SetCharacters(array<string> Chars)
|
||||
{
|
||||
default.Characters = Chars;
|
||||
}
|
||||
|
||||
static function AddCharacter(string CharName)
|
||||
{
|
||||
local int i;
|
||||
|
||||
i = FindCharIndex(CharName);
|
||||
if ( i == -1 )
|
||||
default.Characters[default.Characters.Length] = CharName;
|
||||
}
|
||||
|
||||
static function RemoveCharacter(int Index, int Count)
|
||||
{
|
||||
if ( Index < 0 || Index >= default.Characters.Length )
|
||||
return;
|
||||
|
||||
if ( Count < 0 )
|
||||
Count = default.Characters.Length;
|
||||
|
||||
default.Characters.Remove(Index, Min(Count, default.Characters.Length - Index));
|
||||
}
|
||||
|
||||
static function int FindCharIndex(string CharName)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i = 0; i < default.Characters.Length; i++ )
|
||||
if ( default.Characters[i] ~= CharName )
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static function GetAllCharacters(out array<string> Chars)
|
||||
{
|
||||
Chars = default.Characters;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
5
kf_sources/XGame/Classes/DecoText.uc
Normal file
5
kf_sources/XGame/Classes/DecoText.uc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class DecoText extends Object
|
||||
native;
|
||||
|
||||
var() String TextName;
|
||||
var() array<String> Rows;
|
||||
94
kf_sources/XGame/Classes/DestroyableTrigger.uc
Normal file
94
kf_sources/XGame/Classes/DestroyableTrigger.uc
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
//=============================================================================
|
||||
// for tutorial
|
||||
//=============================================================================
|
||||
class DestroyableTrigger extends Actor;
|
||||
|
||||
var() Name DamageTypeName;
|
||||
var() bool bActive;
|
||||
var int StartHealth;
|
||||
var() int Health;
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
StartHealth = Health;
|
||||
}
|
||||
|
||||
function SpawnEffects()
|
||||
{
|
||||
// if _RO_
|
||||
// Spawn(class'NewExplosionA',,,Location+VRand()*Vect(50,50,50));
|
||||
// Spawn(class'NewExplosionA',,,Location+VRand()*Vect(50,50,50));
|
||||
// Spawn(class'WallSparks',,,Location+VRand()*Vect(50,50,50));
|
||||
// Spawn(class'WallSparks',,,Location+VRand()*Vect(50,50,50));
|
||||
// Spawn(class'WallSparks',,,Location+VRand()*Vect(50,50,50));
|
||||
// Spawn(class'WallSparks',,,Location+VRand()*Vect(50,50,50));
|
||||
// Spawn(class'ExplosionCrap',,, Location, Rotation);
|
||||
}
|
||||
|
||||
function DoHitEffect()
|
||||
{
|
||||
// if _RO_
|
||||
//Spawn(class'WallSparks',,,Location+VRand()*Vect(50,50,50));
|
||||
}
|
||||
|
||||
function TakeDamage( int Damage, Pawn instigatedBy, Vector hitlocation,
|
||||
Vector momentum, class<DamageType> damageType, optional int HitIndex)
|
||||
{
|
||||
if( !bActive || (DamageTypeName != 'None' && DamageTypeName != damageType.Name) )
|
||||
return;
|
||||
|
||||
if( Health <= 0 )
|
||||
return;
|
||||
|
||||
Health -= Damage;
|
||||
|
||||
if ( (Health <= 0) )
|
||||
{
|
||||
// Broadcast the Trigger message to all matching actors.
|
||||
TriggerEvent(Event, self, instigatedBy);
|
||||
SpawnEffects();
|
||||
SetCollision(false,false);
|
||||
bProjTarget = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
DoHitEffect();
|
||||
}
|
||||
}
|
||||
|
||||
/* Reset()
|
||||
reset actor to initial state - used when restarting level without reloading.
|
||||
*/
|
||||
function Reset()
|
||||
{
|
||||
SetCollision(true,true);
|
||||
bProjTarget = true;
|
||||
Health = StartHealth;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bUnlit=false
|
||||
bHidden=false
|
||||
bStasis=false
|
||||
bStatic=false
|
||||
bCollideActors=true
|
||||
bCollideWorld=true
|
||||
bNetNotify=true
|
||||
bBlockKarma=true
|
||||
bBlockActors=true
|
||||
bProjTarget=true
|
||||
bBlockZeroExtentTraces=true
|
||||
bBlockNonZeroExtentTraces=true
|
||||
bUseCylinderCollision=false
|
||||
bCanBeDamaged=true
|
||||
|
||||
bActive=false
|
||||
Health=30
|
||||
Mass=100.000000
|
||||
NetUpdateFrequency=5
|
||||
RemoteRole=ROLE_None
|
||||
}
|
||||
|
||||
|
||||
48
kf_sources/XGame/Classes/LandMine.uc
Normal file
48
kf_sources/XGame/Classes/LandMine.uc
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
// ====================================================================
|
||||
// A land mine. Blows up players who touch it and chucks their bodies into the air
|
||||
//
|
||||
// Written by Matt Oelfke
|
||||
// (C) 2003, Epic Games, Inc. All Rights Reserved
|
||||
// ====================================================================
|
||||
class LandMine extends Triggers
|
||||
placeable;
|
||||
|
||||
var() vector ChuckVelocity;
|
||||
var() class<DamageType> DamageType;
|
||||
var() class<Emitter> BlowupEffect;
|
||||
var() Sound BlowupSound;
|
||||
|
||||
function Touch(Actor Other)
|
||||
{
|
||||
if (Pawn(Other) != None)
|
||||
{
|
||||
Other.PendingTouch = self;
|
||||
PendingTouch = Other;
|
||||
}
|
||||
}
|
||||
|
||||
function PostTouch(Actor Other)
|
||||
{
|
||||
local Pawn P;
|
||||
|
||||
P = Pawn(Other);
|
||||
if (P != None)
|
||||
{
|
||||
PlaySound(BlowupSound,,3.0*TransientSoundVolume);
|
||||
spawn(BlowupEffect,,,P.Location - P.CollisionHeight * vect(0,0,1));
|
||||
P.AddVelocity(ChuckVelocity);
|
||||
P.Died(None, DamageType, P.Location);
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
CollisionRadius=100.f
|
||||
CollisionHeight=50.f
|
||||
ChuckVelocity=(X=0,Y=0,Z=1000)
|
||||
DamageType=class'DamageType'
|
||||
// Temp commented out - Ramm
|
||||
BlowupEffect=none//class'XEffects.LandMineExplosion'
|
||||
// ifndef _RO_
|
||||
//BlowupSound=sound'WeaponSounds.BExplosion3'
|
||||
}
|
||||
18
kf_sources/XGame/Classes/LavaVolume.uc
Normal file
18
kf_sources/XGame/Classes/LavaVolume.uc
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
class LavaVolume extends PhysicsVolume;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DamagePerSec=40
|
||||
DamageType=class'FellLava'
|
||||
bPainCausing=True
|
||||
bWaterVolume=false
|
||||
bDestructive=True
|
||||
bNoInventory=true
|
||||
ViewFog=(X=0.5859375,Y=0.1953125,Z=0.078125)
|
||||
FluidFriction=+00004.000000
|
||||
LocationName="in lava"
|
||||
KExtraLinearDamping=0.8
|
||||
KExtraAngularDamping=0.1
|
||||
RemoteRole=ROLE_None
|
||||
bNoDelete=true
|
||||
}
|
||||
16
kf_sources/XGame/Classes/ManoEMano.uc
Normal file
16
kf_sources/XGame/Classes/ManoEMano.uc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
//==============================================================================
|
||||
// Single Player Challenge Game code
|
||||
// 1 vs 1 challenge against the team leader
|
||||
//
|
||||
// Written by Michiel Hendriks
|
||||
// (c) 2003, Epic Games, Inc. All Rights Reserved
|
||||
//==============================================================================
|
||||
|
||||
class ManoEMano extends ChallengeGame;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
ChallengeName="Head to Head"
|
||||
ChallengeDescription="A 1 vs 1 match against another team leader."
|
||||
ChallengeMenu="GUI2K4.UT2K4SP_CGManoEMano"
|
||||
}
|
||||
26
kf_sources/XGame/Classes/PlayerLight.uc
Normal file
26
kf_sources/XGame/Classes/PlayerLight.uc
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
//=============================================================================
|
||||
// PlayerLight.
|
||||
//=============================================================================
|
||||
class PlayerLight extends ScaledSprite;
|
||||
|
||||
var() float ExtinguishTime;
|
||||
|
||||
singular function BaseChange();
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bHardAttach=true
|
||||
bHidden=false
|
||||
DrawType=DT_Sprite
|
||||
Style=STY_Additive
|
||||
bStatic=false
|
||||
DrawScale=0.15
|
||||
RemoteRole=ROLE_None
|
||||
|
||||
bStasis=false
|
||||
bShouldBaseAtStartup=false
|
||||
Mass=0.0
|
||||
bCollideActors=false
|
||||
|
||||
ExtinguishTime=1.5
|
||||
}
|
||||
45
kf_sources/XGame/Classes/PlayerRecordClass.uc
Normal file
45
kf_sources/XGame/Classes/PlayerRecordClass.uc
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
class PlayerRecordClass extends Object
|
||||
abstract
|
||||
dependsOn(xUtil);
|
||||
|
||||
/*
|
||||
PLAYERRECORDCLASS
|
||||
Use PlayerRecordClass to push down player skins and meshes from the server.
|
||||
For example, if the Reaper clan was running a server, and had their own clan skin, in ReaperSkin.utx, here's what they'd need to do:
|
||||
|
||||
Create a new ReaperMod.u file, with the class Reaper in it. The package name must be the class name with "mod" appended. Reaper is a subclass of PlayerRecordClass, with
|
||||
all the default properties set appropriately to setup up the character. Clan members will have to edit their user.ini file,
|
||||
to change their character in the [DefaultPlayer] section, or have a .upl file with the same character definition.
|
||||
|
||||
The server will need to have both ReaperSkin and ReaperMod in its serverpackages.
|
||||
*/
|
||||
|
||||
var() class<SpeciesType> Species; // Species
|
||||
var() String MeshName; // Mesh type
|
||||
var() String BodySkinName; // Body texture name
|
||||
var() String FaceSkinName; // Face texture name
|
||||
var() Material Portrait; // Menu picture
|
||||
var() String TextName; // Decotext reference
|
||||
var() String VoiceClassName; // voice pack class name - overrides species default
|
||||
var() string Sex;
|
||||
var() string Menu; // info for menu displaying characters
|
||||
var() string Skeleton; // skeleton mesh, if it differs from the species default
|
||||
var() string Ragdoll;
|
||||
|
||||
simulated static function xUtil.PlayerRecord FillPlayerRecord()
|
||||
{
|
||||
local xUtil.PlayerRecord PRE;
|
||||
|
||||
PRE.Species = Default.Species;
|
||||
PRE.MeshName = Default.MeshName;
|
||||
PRE.BodySkinName = Default.BodySkinName;
|
||||
PRE.FaceSkinName = Default.FaceSkinName;
|
||||
PRE.Portrait = Default.Portrait;
|
||||
PRE.TextName = Default.TextName;
|
||||
PRE.VoiceClassName = Default.VoiceClassName;
|
||||
PRE.Sex = Default.Sex;
|
||||
PRE.Menu = Default.Menu;
|
||||
PRE.Skeleton = Default.Skeleton;
|
||||
PRE.Ragdoll = Default.Ragdoll;
|
||||
return PRE;
|
||||
}
|
||||
68
kf_sources/XGame/Classes/ProjectileSpawner.uc
Normal file
68
kf_sources/XGame/Classes/ProjectileSpawner.uc
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
|
||||
class ProjectileSpawner extends Actor
|
||||
placeable;
|
||||
|
||||
var() float ProjectileSpeed;
|
||||
var() float SpawnRateMin;
|
||||
var() float SpawnRateMax;
|
||||
var() class<xEmitter> TrailEmitter;
|
||||
var() class<xEmitter> ExplosionEmitter;
|
||||
var() Mesh ProjectileMesh;
|
||||
var() float ProjectileMeshScale;
|
||||
var() Sound SpawnSound;
|
||||
var() Sound ExplosionSound;
|
||||
var() float Damage;
|
||||
var() float DamageRadius;
|
||||
var() class<DamageType> DamageType;
|
||||
var() float ProjectileLifeSpan;
|
||||
var() float RandomStartDelay;
|
||||
var() bool GravityAffected;
|
||||
|
||||
replication
|
||||
{
|
||||
reliable if( bNetInitial && Role==ROLE_Authority )
|
||||
ExplosionEmitter, TrailEmitter, ProjectileMesh, ExplosionSound, ProjectileMeshScale, ProjectileLifeSpan;
|
||||
}
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
if (SpawnRateMin > 0)
|
||||
SetTimer(1.0/SpawnRateMin+RandomStartDelay*FRand(), false);
|
||||
}
|
||||
|
||||
function Timer()
|
||||
{
|
||||
SpawnProjectile();
|
||||
if (SpawnRateMin > 0 && SpawnRateMax > 0)
|
||||
SetTimer(1.0/RandRange(SpawnRateMin, SpawnRateMax), false);
|
||||
}
|
||||
|
||||
function SpawnProjectile()
|
||||
{
|
||||
local SpawnerProjectile Proj;
|
||||
|
||||
Proj = Spawn(class'SpawnerProjectile', self,, Location, Rotation);
|
||||
Proj.Spawner = self;
|
||||
|
||||
if (SpawnSound != None)
|
||||
{
|
||||
PlaySound(SpawnSound);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Trigger(Actor Other, Pawn EventInstigator)
|
||||
{
|
||||
SpawnProjectile();
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
RemoteRole=ROLE_None
|
||||
Texture=S_Emitter
|
||||
bHidden=true
|
||||
bDirectional=true
|
||||
ProjectileLifeSpan=10.0
|
||||
SpawnRateMin=1.0
|
||||
SpawnRateMax=1.0
|
||||
}
|
||||
16
kf_sources/XGame/Classes/SPECIES_Human.uc
Normal file
16
kf_sources/XGame/Classes/SPECIES_Human.uc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
class SPECIES_Human extends SpeciesType
|
||||
abstract;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
MaleVoice="XGame.MercMaleVoice"
|
||||
FemaleVoice="XGame.MercFemaleVoice"
|
||||
// if _RO_
|
||||
//GibGroup="xEffects.xPawnGibGroup"
|
||||
MaleRagSkelName="Male2"
|
||||
FemaleRagSkelName="Female2"
|
||||
//FemaleSkeleton="HumanFemaleA.Skeleton_Female"
|
||||
//MaleSkeleton="HumanMaleA.SkeletonMale"
|
||||
MaleSoundGroup="XGame.xEgyptMaleSoundGroup"
|
||||
FemaleSoundGroup="XGame.xEgyptFemaleSoundGroup"
|
||||
}
|
||||
106
kf_sources/XGame/Classes/SpawnerProjectile.uc
Normal file
106
kf_sources/XGame/Classes/SpawnerProjectile.uc
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
|
||||
class SpawnerProjectile extends Projectile;
|
||||
|
||||
var xEmitter Trail;
|
||||
var ProjectileSpawner Spawner;
|
||||
|
||||
replication
|
||||
{
|
||||
reliable if( Role==ROLE_Authority )
|
||||
Spawner;
|
||||
}
|
||||
|
||||
simulated function Destroyed()
|
||||
{
|
||||
if (Trail != None)
|
||||
{
|
||||
if (Trail.mRegen)
|
||||
Trail.mRegen = false;
|
||||
else
|
||||
Trail.Destroy();
|
||||
}
|
||||
Super.Destroyed();
|
||||
}
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
|
||||
Spawner = ProjectileSpawner(Owner);
|
||||
Speed = Spawner.ProjectileSpeed;
|
||||
MaxSpeed = Spawner.ProjectileSpeed;
|
||||
Velocity = Speed * Vector(Rotation);
|
||||
if (Spawner.GravityAffected)
|
||||
SetPhysics(PHYS_Falling);
|
||||
|
||||
if (Level.NetMode != NM_DedicatedServer)
|
||||
{
|
||||
//PostNetBeginPlay();
|
||||
}
|
||||
}
|
||||
|
||||
simulated function PostNetBeginPlay()
|
||||
{
|
||||
if (Spawner == None)
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Spawner.ProjectileLifeSpan > 0)
|
||||
LifeSpan = Spawner.ProjectileLifeSpan;
|
||||
|
||||
if (Spawner.ProjectileMesh != None)
|
||||
{
|
||||
SetDrawType(DT_Mesh);
|
||||
LinkMesh(Spawner.ProjectileMesh);
|
||||
SetDrawScale(Spawner.ProjectileMeshScale);
|
||||
}
|
||||
|
||||
if (Spawner.TrailEmitter != None)
|
||||
{
|
||||
Trail = Spawn(Spawner.TrailEmitter, self,, Location, Rotation);
|
||||
Trail.RemoteRole = ROLE_None;
|
||||
Trail.SetPhysics(PHYS_Trailer);
|
||||
Trail.bTrailerSameRotation = true;
|
||||
}
|
||||
}
|
||||
|
||||
simulated function ProcessTouch (Actor Other, vector HitLocation)
|
||||
{
|
||||
if (Role == ROLE_Authority && Spawner.DamageRadius == 0 && Spawner.Damage > 0)
|
||||
{
|
||||
Other.TakeDamage(Spawner.Damage, None, HitLocation, Vect(0,0,0), Spawner.DamageType);
|
||||
}
|
||||
|
||||
Explode(HitLocation, Normal(HitLocation-Other.Location));
|
||||
}
|
||||
|
||||
simulated function Explode(vector HitLocation, vector HitNormal)
|
||||
{
|
||||
local xEmitter Exp;
|
||||
|
||||
if (Role == ROLE_Authority && Spawner.DamageRadius > 0 && Spawner.Damage > 0)
|
||||
{
|
||||
HurtRadius(Spawner.Damage, Spawner.DamageRadius, Spawner.DamageType, 0, HitLocation);
|
||||
}
|
||||
|
||||
if (Spawner.ExplosionEmitter != None && Level.NetMode != NM_DedicatedServer)
|
||||
{
|
||||
Exp = Spawn(Spawner.ExplosionEmitter,,, HitLocation+HitNormal*8, Rotator(HitNormal));
|
||||
Exp.RemoteRole = ROLE_None;
|
||||
}
|
||||
|
||||
Destroy();
|
||||
}
|
||||
|
||||
simulated function Landed( vector HitNormal )
|
||||
{
|
||||
HitWall( HitNormal, None );
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DrawType=DT_None;
|
||||
LifeSpan=30.0;
|
||||
}
|
||||
433
kf_sources/XGame/Classes/SpeciesType.uc
Normal file
433
kf_sources/XGame/Classes/SpeciesType.uc
Normal file
|
|
@ -0,0 +1,433 @@
|
|||
class SpeciesType extends Object
|
||||
abstract
|
||||
native;
|
||||
|
||||
// if _RO_
|
||||
//#EXEC OBJ LOAD FILE=UT2004Weapons.utx
|
||||
|
||||
var string MaleVoice;
|
||||
var string FemaleVoice;
|
||||
// if _RO_
|
||||
//var string GibGroup;
|
||||
var string MaleRagSkelName;
|
||||
var string FemaleRagSkelName;
|
||||
var string FemaleSkeleton;
|
||||
var string MaleSkeleton;
|
||||
var string MaleSoundGroup;
|
||||
var string FemaleSoundGroup;
|
||||
var string PawnClassName;
|
||||
var localized string SpeciesName; // human readable name, for menus
|
||||
var int RaceNum;
|
||||
var int DMTeam; // team color used in DM
|
||||
|
||||
var name TauntAnims[16];
|
||||
var localized string TauntAnimNames[16];
|
||||
|
||||
var float AirControl, GroundSpeed, WaterSpeed, JumpZ, ReceivedDamageScaling, DamageScaling, AccelRate, WalkingPct,CrouchedPct,DodgeSpeedFactor, DodgeSpeedZ;
|
||||
|
||||
static function string GetVoiceType( bool bIsFemale, LevelInfo Level )
|
||||
{
|
||||
if ( bIsFemale )
|
||||
{
|
||||
if ( Level.bLowSoundDetail )
|
||||
return "XGame.JuggFemaleVoice";
|
||||
else
|
||||
return Default.FemaleVoice;
|
||||
}
|
||||
|
||||
if ( Level.bLowSoundDetail )
|
||||
return "XGame.JuggMaleVoice";
|
||||
else
|
||||
return Default.MaleVoice;
|
||||
}
|
||||
|
||||
static function LoadResources( xUtil.PlayerRecord rec, LevelInfo Level, PlayerReplicationInfo PRI, int TeamNum )
|
||||
{
|
||||
local string BodySkinName, VoiceType, SkelName, FaceSkinName;
|
||||
local Material NewBodySkin, NewFaceSkin, TeamFaceSkin;
|
||||
local class<VoicePack> VoiceClass;
|
||||
// if _RO_
|
||||
//local class<xPawnGibGroup> GibGroupClass;
|
||||
local mesh customskel;
|
||||
|
||||
if ( (Level.NetMode != NM_DedicatedServer) && class'DeathMatch'.default.bForceDefaultCharacter )
|
||||
return;
|
||||
DynamicLoadObject(rec.MeshName,class'Mesh');
|
||||
|
||||
if ( (Level.NetMode != NM_DedicatedServer) && (rec.Skeleton != "") )
|
||||
customskel = mesh(DynamicLoadObject(rec.Skeleton,class'Mesh'));
|
||||
|
||||
if ( rec.Sex ~= "Female" )
|
||||
{
|
||||
SkelName = Default.FemaleSkeleton;
|
||||
if ( Level.bLowSoundDetail )
|
||||
DynamicLoadObject("XGame.xJuggFemaleSoundGroup", class'Class');
|
||||
else
|
||||
DynamicLoadObject(Default.FemaleSoundGroup, class'Class');
|
||||
}
|
||||
else
|
||||
{
|
||||
SkelName = Default.MaleSkeleton;
|
||||
if ( Level.bLowSoundDetail )
|
||||
DynamicLoadObject("XGame.xJuggMaleSoundGroup", class'Class');
|
||||
else
|
||||
DynamicLoadObject(Default.MaleSoundGroup, class'Class');
|
||||
}
|
||||
if ( Level.NetMode == NM_DedicatedServer )
|
||||
{
|
||||
if ( rec.Sex ~= "Female" )
|
||||
VoiceClass = class<VoicePack>(DynamicLoadObject("XGame.JuggFemaleVoice",class'Class'));
|
||||
else
|
||||
VoiceClass = class<VoicePack>(DynamicLoadObject("XGame.JuggMaleVoice",class'Class'));
|
||||
if ( PRI != None )
|
||||
PRI.VoiceType = VoiceClass;
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !Level.bLowSoundDetail && (rec.VoiceClassName != "") )
|
||||
{
|
||||
VoiceType = rec.VoiceClassName;
|
||||
VoiceClass = class<VoicePack>(DynamicLoadObject(VoiceType,class'Class'));
|
||||
}
|
||||
if ( VoiceClass == None )
|
||||
{
|
||||
VoiceType = GetVoiceType(rec.Sex ~= "Female", Level);
|
||||
class<VoicePack>(DynamicLoadObject(VoiceType,class'Class'));
|
||||
}
|
||||
|
||||
if ( (CustomSkel == None) && (SkelName != "") )
|
||||
DynamicLoadObject(SkelName,class'Mesh');
|
||||
|
||||
NewFaceSkin = Material(DynamicLoadObject(rec.FaceSkinName, class'Material'));
|
||||
|
||||
if ( (TeamNum == 255) && (Level.GRI != None) && Level.GRI.bForceTeamSkins )
|
||||
TeamNum = Default.DMTeam;
|
||||
if ( (TeamNum != 255) && ((Level.GRI == None) || !Level.GRI.bNoTeamSkins) )
|
||||
{
|
||||
if ( class'DMMutator'.Default.bBrightSkins && (Left(rec.BodySkinName,12) ~= "PlayerSkins.") )
|
||||
{
|
||||
BodySkinName = "Bright"$rec.BodySkinName$"_"$TeamNum$"B";
|
||||
NewBodySkin = Material(DynamicLoadObject(BodySkinName, class'Material',true));
|
||||
}
|
||||
if ( NewBodySkin == None )
|
||||
{
|
||||
BodySkinName = rec.BodySkinName$"_"$TeamNum;
|
||||
NewBodySkin = Material(DynamicLoadObject(BodySkinName, class'Material'));
|
||||
|
||||
// allow team head skins with new skins
|
||||
if ( rec.TeamFace )
|
||||
{
|
||||
FaceSkinName = rec.FaceSkinName$"_"$TeamNum;
|
||||
TeamFaceSkin = Material(DynamicLoadObject(FaceSkinName, class'Material'));
|
||||
if ( TeamFaceSkin != None )
|
||||
NewFaceSkin = TeamFaceSkin;
|
||||
}
|
||||
}
|
||||
if ( NewBodySkin == None )
|
||||
{
|
||||
log("TeamSkin not found "$NewBodySkin);
|
||||
NewBodySkin = Material(DynamicLoadObject(rec.BodySkinName, class'Material'));
|
||||
}
|
||||
}
|
||||
else
|
||||
NewBodySkin = Material(DynamicLoadObject(rec.BodySkinName, class'Material'));
|
||||
|
||||
// Xan hack
|
||||
if ( Rec.BodySkinName ~= "UT2004PlayerSkins.XanMk3V2_Body" )
|
||||
DynamicLoadObject("UT2004PlayerSkins.XanMk3V2_abdomen", class'Material');
|
||||
|
||||
Level.AddPrecacheMaterial(NewBodySkin);
|
||||
Level.AddPrecacheMaterial(NewFaceSkin);
|
||||
Level.AddPrecacheMaterial(rec.Portrait);
|
||||
// if _RO_
|
||||
//GibGroupClass = class<xPawnGibGroup>(DynamicLoadObject(Default.GibGroup, class'Class'));
|
||||
//GibGroupClass.static.PrecacheContent(Level);
|
||||
}
|
||||
|
||||
static function int ModifyReceivedDamage( int Damage, pawn injured, pawn instigatedBy, vector HitLocation, vector Momentum, class<DamageType> DamageType )
|
||||
{
|
||||
return Damage * Default.ReceivedDamageScaling;
|
||||
}
|
||||
|
||||
static function int ModifyImpartedDamage( int Damage, pawn injured, pawn instigatedBy, vector HitLocation, vector Momentum, class<DamageType> DamageType )
|
||||
{
|
||||
return Damage * Default.DamageScaling;
|
||||
}
|
||||
|
||||
static function ModifyPawn(Pawn P)
|
||||
{
|
||||
P.AirControl = P.Default.AirControl * Default.AirControl;
|
||||
P.GroundSpeed = P.Default.GroundSpeed * Default.GroundSpeed;
|
||||
P.WaterSpeed = P.Default.WaterSpeed * Default.WaterSpeed;
|
||||
P.JumpZ = P.Default.JumpZ * Default.JumpZ;
|
||||
P.AccelRate = P.Default.AccelRate * Default.AccelRate;
|
||||
P.WalkingPct = P.Default.WalkingPct * Default.WalkingPct;
|
||||
P.CrouchedPct = P.Default.CrouchedPct * Default.CrouchedPct;
|
||||
P.DodgeSpeedFactor = P.Default.DodgeSpeedFactor * Default.DodgeSpeedFactor;
|
||||
P.DodgeSpeedZ = P.Default.DodgeSpeedZ * Default.DodgeSpeedZ;
|
||||
}
|
||||
|
||||
static function string GetRagSkelName(string MeshName)
|
||||
{
|
||||
if(InStr(MeshName, "Female") >= 0)
|
||||
return Default.FemaleRagSkelName;
|
||||
|
||||
return Default.MaleRagSkelName;
|
||||
}
|
||||
|
||||
static function SetTeamSkin(xPawn P, xUtil.PlayerRecord rec, int TeamNum)
|
||||
{
|
||||
local string BodySkinName, FaceSkinName;
|
||||
local Material NewBodySkin, TeamFaceSkin, NewFaceSkin;
|
||||
|
||||
NewFaceSkin = Material(DynamicLoadObject(rec.FaceSkinName, class'Material'));
|
||||
P.TeamSkin = TeamNum;
|
||||
P.bClearWeaponOffsets = rec.ZeroWeaponOffsets;
|
||||
|
||||
// Temp commented out - Ramm
|
||||
/*if ( TeamNum == 0 )
|
||||
P.Texture = Texture'RedMarker_t';
|
||||
else
|
||||
P.Texture = Texture'BlueMarker_t';*/
|
||||
|
||||
if ( (TeamNum != 255) && ((P.Level.GRI == None) || !P.Level.GRI.bNoTeamSkins) )
|
||||
{
|
||||
if ( class'DMMutator'.Default.bBrightSkins && (Left(rec.BodySkinName,12) ~= "PlayerSkins.") )
|
||||
{
|
||||
BodySkinName = "Bright"$rec.BodySkinName$"_"$TeamNum$"B";
|
||||
NewBodySkin = Material(DynamicLoadObject(BodySkinName, class'Material',true));
|
||||
if ( NewBodySkin != None )
|
||||
P.AmbientGlow = 0.5 * P.Default.AmbientGlow;
|
||||
}
|
||||
if ( NewBodySkin == None )
|
||||
{
|
||||
BodySkinName = rec.BodySkinName$"_"$TeamNum;
|
||||
NewBodySkin = Material(DynamicLoadObject(BodySkinName, class'Material'));
|
||||
|
||||
// allow team head skins with new skins
|
||||
if ( rec.TeamFace )
|
||||
{
|
||||
FaceSkinName = rec.FaceSkinName$"_"$TeamNum;
|
||||
TeamFaceSkin = Material(DynamicLoadObject(FaceSkinName, class'Material'));
|
||||
if ( TeamFaceSkin != None )
|
||||
NewFaceSkin = TeamFaceSkin;
|
||||
}
|
||||
}
|
||||
if ( NewBodySkin == None )
|
||||
{
|
||||
log("TeamSkin not found "$NewBodySkin$" for "$P.Mesh);
|
||||
NewBodySkin = Material(DynamicLoadObject(rec.BodySkinName, class'Material'));
|
||||
}
|
||||
P.Skins[0] = NewBodySkin;
|
||||
}
|
||||
else
|
||||
P.Skins[0] = Material(DynamicLoadObject(rec.BodySkinName, class'Material'));
|
||||
|
||||
P.Skins[1] = NewFaceSkin;
|
||||
}
|
||||
|
||||
// Modified this function so we could use pawns instead of xpawns
|
||||
static function bool Setup(Pawn P, xUtil.PlayerRecord rec)
|
||||
{
|
||||
local mesh NewMesh, customskel;
|
||||
local string VoiceType, SkelName;
|
||||
local class<VoicePack> VoiceClass;
|
||||
local int TeamNum, i,j;
|
||||
local XPawn XP;
|
||||
|
||||
// Cast the pawn to an XPawn
|
||||
XP = XPawn(P);
|
||||
|
||||
if ( XP == none )
|
||||
{
|
||||
log("SpeciesType setup error.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( XP.bAlreadySetup )
|
||||
{
|
||||
// make sure correct teamskin
|
||||
if ( XP.Level.NetMode == NM_Client )
|
||||
{
|
||||
if ( (XP.PlayerReplicationInfo != None) && (XP.PlayerReplicationInfo.Team != None) )
|
||||
TeamNum = XP.PlayerReplicationInfo.Team.TeamIndex;
|
||||
else if ( (XP.DrivenVehicle != None) && (XP.DrivenVehicle.PlayerReplicationInfo != None) && (XP.DrivenVehicle.PlayerReplicationInfo.Team != None) )
|
||||
TeamNum = XP.DrivenVehicle.PlayerReplicationInfo.Team.TeamIndex;
|
||||
if ( XP.TeamSkin == TeamNum )
|
||||
return true;
|
||||
|
||||
SetTeamSkin(XP,rec,TeamNum);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
NewMesh = Mesh(DynamicLoadObject(rec.MeshName,class'Mesh'));
|
||||
if ( NewMesh == None )
|
||||
{
|
||||
log("Failed to load player mesh "$rec.MeshName);
|
||||
return false;
|
||||
}
|
||||
|
||||
XP.bAlreadySetup = true;
|
||||
XP.LinkMesh(NewMesh);
|
||||
XP.AssignInitialPose();
|
||||
|
||||
XP.bIsFemale = ( rec.Sex ~= "Female" );
|
||||
if ( XP.PlayerReplicationInfo != None )
|
||||
XP.PlayerReplicationInfo.bIsFemale = XP.bIsFemale;
|
||||
if ( (XP.Level.NetMode != NM_DedicatedServer) && (rec.Skeleton != "") )
|
||||
customskel = mesh(DynamicLoadObject(rec.Skeleton,class'Mesh'));
|
||||
|
||||
if ( XP.bIsFemale )
|
||||
{
|
||||
SkelName = Default.FemaleSkeleton;
|
||||
if ( XP.Level.bLowSoundDetail )
|
||||
XP.SoundGroupClass = class<xPawnSoundGroup>(DynamicLoadObject("XGame.xJuggFemaleSoundGroup", class'Class'));
|
||||
else
|
||||
XP.SoundGroupClass = class<xPawnSoundGroup>(DynamicLoadObject(Default.FemaleSoundGroup, class'Class'));
|
||||
}
|
||||
else
|
||||
{
|
||||
SkelName = Default.MaleSkeleton;
|
||||
if ( XP.Level.bLowSoundDetail )
|
||||
XP.SoundGroupClass = class<xPawnSoundGroup>(DynamicLoadObject("XGame.xJuggMaleSoundGroup", class'Class'));
|
||||
else
|
||||
XP.SoundGroupClass = class<xPawnSoundGroup>(DynamicLoadObject(Default.MaleSoundGroup, class'Class'));
|
||||
}
|
||||
|
||||
if ( XP.Level.NetMode != NM_DedicatedServer )
|
||||
{
|
||||
if ( CustomSkel != None )
|
||||
XP.SkeletonMesh = CustomSkel;
|
||||
else if ( SkelName != "" )
|
||||
XP.SkeletonMesh = mesh(DynamicLoadObject(SkelName,class'Mesh'));
|
||||
|
||||
TeamNum = 255;
|
||||
if ( (XP.PlayerReplicationInfo != None) && (XP.PlayerReplicationInfo.Team != None) )
|
||||
TeamNum = XP.PlayerReplicationInfo.Team.TeamIndex;
|
||||
else if ( (XP.DrivenVehicle != None) && (XP.DrivenVehicle.PlayerReplicationInfo != None) && (XP.DrivenVehicle.PlayerReplicationInfo.Team != None) )
|
||||
TeamNum = XP.DrivenVehicle.PlayerReplicationInfo.Team.TeamIndex;
|
||||
else if ( (XP.Level.GRI != None) && XP.Level.GRI.bForceTeamSkins )
|
||||
TeamNum = Default.DMTeam;
|
||||
|
||||
SetTeamSkin(XP,rec,TeamNum);
|
||||
|
||||
if ( rec.UseSpecular && (XP.Level.DetailMode!=DM_Low) )
|
||||
{
|
||||
// ifndef _RO_
|
||||
//XP.HighDetailOverlay = Material'UT2004Weapons.WeaponShader';
|
||||
// Xan hack
|
||||
if ( Rec.BodySkinName ~= "UT2004PlayerSkins.XanMk3V2_Body" )
|
||||
XP.Skins[2] = Material(DynamicLoadObject("UT2004PlayerSkins.XanMk3V2_abdomen", class'Material'));
|
||||
}
|
||||
}
|
||||
// if _RO_
|
||||
//XP.GibGroupClass = class<xPawnGibGroup>(DynamicLoadObject(Default.GibGroup, class'Class'));
|
||||
|
||||
if ( XP.Level.NetMode == NM_DedicatedServer )
|
||||
{
|
||||
if ( rec.Sex ~= "Female" )
|
||||
VoiceType = "XGame.JuggFemaleVoice";
|
||||
else
|
||||
VoiceType = "XGame.JuggMaleVoice";
|
||||
VoiceClass = class<VoicePack>(DynamicLoadObject(VoiceType,class'Class'));
|
||||
XP.VoiceType = VoiceType;
|
||||
if ( XP.PlayerReplicationInfo != None )
|
||||
XP.PlayerReplicationInfo.VoiceType = VoiceClass;
|
||||
XP.VoiceClass = class<TeamVoicePack>(VoiceClass);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !XP.Level.bLowSoundDetail )
|
||||
{
|
||||
if ( (XP.PlayerReplicationInfo != None) && (XP.PlayerReplicationInfo.VoiceTypeName != "") )
|
||||
VoiceType = XP.PlayerReplicationInfo.VoiceTypeName;
|
||||
else
|
||||
VoiceType = rec.VoiceClassName;
|
||||
if ( VoiceType != "" )
|
||||
VoiceClass = class<VoicePack>(DynamicLoadObject(VoiceType,class'Class'));
|
||||
}
|
||||
if ( VoiceClass == None )
|
||||
{
|
||||
VoiceType = GetVoiceType(XP.bIsFemale, XP.Level);
|
||||
VoiceClass = class<VoicePack>(DynamicLoadObject(VoiceType,class'Class'));
|
||||
}
|
||||
XP.VoiceType = VoiceType;
|
||||
if ( XP.PlayerReplicationInfo != None )
|
||||
XP.PlayerReplicationInfo.VoiceType = VoiceClass;
|
||||
XP.VoiceClass = class<TeamVoicePack>(VoiceClass);
|
||||
}
|
||||
|
||||
// add unique taunts
|
||||
for ( i=0; i<16; i++ )
|
||||
if ( Default.TauntAnims[i] != '' )
|
||||
{
|
||||
j = XP.TauntAnims.Length;
|
||||
XP.TauntAnims[j] = Default.TauntAnims[i];
|
||||
XP.TauntAnimNames[j] = Default.TauntAnimNames[i];
|
||||
if ( j == 15 )
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static function int GetOffsetForSequence(name Sequence)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<16; i++ )
|
||||
{
|
||||
if ( Default.TauntAnims[i] == '' )
|
||||
return -1;
|
||||
if ( Default.TauntAnims[i] == Sequence )
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
AirControl=+1.0
|
||||
GroundSpeed=+1.0
|
||||
WaterSpeed=+1.0
|
||||
JumpZ=+1.0
|
||||
ReceivedDamageScaling=+1.0
|
||||
DamageScaling=+1.0
|
||||
AccelRate=+1.0
|
||||
WalkingPct=+1.0
|
||||
CrouchedPct=+1.0
|
||||
DodgeSpeedFactor=+1.0
|
||||
DodgeSpeedZ=+1.0
|
||||
PawnClassName="xGame.xPawn"
|
||||
SpeciesName="Human"
|
||||
|
||||
TauntAnims(0)=gesture_point
|
||||
TauntAnimNames(0)="Point"
|
||||
|
||||
TauntAnims(1)=gesture_beckon
|
||||
TauntAnimNames(1)="Beckon"
|
||||
|
||||
TauntAnims(2)=gesture_halt
|
||||
TauntAnimNames(2)="Halt"
|
||||
|
||||
TauntAnims(3)=gesture_cheer
|
||||
TauntAnimNames(3)="Cheer"
|
||||
|
||||
TauntAnims(4)=PThrust
|
||||
TauntAnimNames(4)="Pelvic Thrust"
|
||||
|
||||
TauntAnims(5)=AssSmack
|
||||
TauntAnimNames(5)="Ass Smack"
|
||||
|
||||
TauntAnims(6)=ThroatCut
|
||||
TauntAnimNames(6)="Throat Cut"
|
||||
|
||||
TauntAnims(7)=Specific_1
|
||||
TauntAnimNames(7)="Unique"
|
||||
|
||||
TauntAnims(8)=Gesture_Taunt01
|
||||
TauntAnimNames(8)="Team Taunt"
|
||||
|
||||
TauntAnims(9)=Idle_Character01
|
||||
TauntAnimNames(9)="Team Idle"
|
||||
}
|
||||
82
kf_sources/XGame/Classes/TeamBlueConfigured.uc
Normal file
82
kf_sources/XGame/Classes/TeamBlueConfigured.uc
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
class TeamBlueConfigured extends xTeamRoster;
|
||||
|
||||
/* this class used for configured instant action or multiplayer games with bots
|
||||
*/
|
||||
var config array<string> Characters;
|
||||
|
||||
function Initialize(int TeamBots)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Roster.Length; i++ )
|
||||
Roster[i].PrecacheRosterFor(self);
|
||||
}
|
||||
|
||||
function int OverrideInitialBots(int N, UnrealTeamInfo T)
|
||||
{
|
||||
return Roster.Length + T.Roster.Length;
|
||||
}
|
||||
|
||||
function bool AllBotsSpawned()
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Roster.Length; i++ )
|
||||
if ( !Roster[i].bTaken )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Characters.Length; i++ )
|
||||
RosterNames[i] = Characters[i];
|
||||
Super.PostBeginPlay();
|
||||
}
|
||||
|
||||
static function SetCharacters(array<string> Chars)
|
||||
{
|
||||
default.Characters = Chars;
|
||||
}
|
||||
|
||||
static function AddCharacter(string CharName)
|
||||
{
|
||||
local int i;
|
||||
|
||||
i = FindCharIndex(CharName);
|
||||
if ( i == -1 )
|
||||
default.Characters[default.Characters.Length] = CharName;
|
||||
}
|
||||
|
||||
static function RemoveCharacter(int Index, int Count)
|
||||
{
|
||||
if ( Index < 0 || Index >= default.Characters.Length )
|
||||
return;
|
||||
|
||||
if ( Count < 0 )
|
||||
Count = default.Characters.Length;
|
||||
|
||||
default.Characters.Remove(Index, Min(Count, default.Characters.Length - Index));
|
||||
}
|
||||
|
||||
static function int FindCharIndex(string CharName)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i = 0; i < default.Characters.Length; i++ )
|
||||
if ( default.Characters[i] ~= CharName )
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static function GetAllCharacters(out array<string> Chars)
|
||||
{
|
||||
Chars = default.Characters;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
82
kf_sources/XGame/Classes/TeamRedConfigured.uc
Normal file
82
kf_sources/XGame/Classes/TeamRedConfigured.uc
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
class TeamRedConfigured extends xTeamRoster;
|
||||
|
||||
/* this class used for configured instant action or multiplayer games with bots
|
||||
*/
|
||||
var config array<string> Characters;
|
||||
|
||||
function Initialize(int TeamBots)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Roster.Length; i++ )
|
||||
Roster[i].PrecacheRosterFor(self);
|
||||
}
|
||||
|
||||
function int OverrideInitialBots(int N, UnrealTeamInfo T)
|
||||
{
|
||||
return Roster.Length + T.Roster.Length;
|
||||
}
|
||||
|
||||
function bool AllBotsSpawned()
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Roster.Length; i++ )
|
||||
if ( !Roster[i].bTaken )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Characters.Length; i++ )
|
||||
RosterNames[i] = Characters[i];
|
||||
Super.PostBeginPlay();
|
||||
}
|
||||
|
||||
static function SetCharacters(array<string> Chars)
|
||||
{
|
||||
default.Characters = Chars;
|
||||
}
|
||||
|
||||
static function AddCharacter(string CharName)
|
||||
{
|
||||
local int i;
|
||||
|
||||
i = FindCharIndex(CharName);
|
||||
if ( i == -1 )
|
||||
default.Characters[default.Characters.Length] = CharName;
|
||||
}
|
||||
|
||||
static function RemoveCharacter(int Index, int Count)
|
||||
{
|
||||
if ( Index < 0 || Index >= default.Characters.Length )
|
||||
return;
|
||||
|
||||
if ( Count < 0 )
|
||||
Count = default.Characters.Length;
|
||||
|
||||
default.Characters.Remove(Index, Min(Count, default.Characters.Length - Index));
|
||||
}
|
||||
|
||||
static function int FindCharIndex(string CharName)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i = 0; i < default.Characters.Length; i++ )
|
||||
if ( default.Characters[i] ~= CharName )
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static function GetAllCharacters(out array<string> Chars)
|
||||
{
|
||||
Chars = default.Characters;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
25
kf_sources/XGame/Classes/UDamageTimer.uc
Normal file
25
kf_sources/XGame/Classes/UDamageTimer.uc
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
class UDamageTimer extends Info;
|
||||
|
||||
// ifndef _RO_
|
||||
//#exec OBJ LOAD FILE=PickupSounds.uax
|
||||
|
||||
var int SoundCount;
|
||||
|
||||
function Timer()
|
||||
{
|
||||
if ( Pawn(Owner) == None )
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
if ( SoundCount < 4 )
|
||||
{
|
||||
SoundCount++;
|
||||
// ifndef _RO_
|
||||
//Pawn(Owner).PlaySound(Sound'PickupSounds.UDamagePickUp', SLOT_None, 1.5*Pawn(Owner).TransientSoundVolume,,1000,1.0);
|
||||
SetTimer(0.75,false);
|
||||
return;
|
||||
}
|
||||
Pawn(Owner).DisableUDamage();
|
||||
Destroy();
|
||||
}
|
||||
57
kf_sources/XGame/Classes/UT2003GameProfile.uc
Normal file
57
kf_sources/XGame/Classes/UT2003GameProfile.uc
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
|
||||
class UT2003GameProfile extends GameProfile;
|
||||
|
||||
/*
|
||||
* This class is a concrete subclass of GameProfile that
|
||||
* refers directly to the UT2003 ladder.
|
||||
*
|
||||
* author: capps 8/20/02
|
||||
*/
|
||||
|
||||
// completely overrides GameProfile
|
||||
function ContinueSinglePlayerGame(LevelInfo level, optional bool bReplace)
|
||||
{
|
||||
local Controller C;
|
||||
local PlayerController PC;
|
||||
|
||||
// set character, player in current game
|
||||
PC = none;
|
||||
for ( C=level.ControllerList; C!=None; C=C.NextController )
|
||||
{
|
||||
if ( PlayerController(C) != None ) {
|
||||
PC = PlayerController(C);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( PC == none ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (level.game.SavePackage(PackageName)) {
|
||||
Log("SINGLEPLAYER UT2003GameProfile::ContinueSinglePlayerGame() saved profile.");
|
||||
} else {
|
||||
Log("SINGLEPLAYER UT2003GameProfile::ContinueSinglePlayerGame() save profile FAILED.");
|
||||
}
|
||||
|
||||
PC.ConsoleCommand("disconnect");
|
||||
if ( bReplace )
|
||||
PC.Player.GUIController.ReplaceMenu("xInterface.UT2SinglePlayerMain");
|
||||
else
|
||||
PC.Player.GUIController.OpenMenu("xInterface.UT2SinglePlayerMain");
|
||||
}
|
||||
|
||||
|
||||
defaultproperties {
|
||||
GameLadderName="xGame.UT2003LadderInfo"
|
||||
LadderRung(0)=1 // skips the tutorial and goes straight to trainingday
|
||||
Playerteam(0)=""
|
||||
Playerteam(1)=""
|
||||
Playerteam(2)=""
|
||||
Playerteam(3)=""
|
||||
Playerteam(4)=""
|
||||
Playerteam(5)=""
|
||||
Playerteam(6)=""
|
||||
// ifndef _RO_
|
||||
//TeamSymbolName="TeamSymbols_UT2003.sym01"
|
||||
SalaryCap=3500
|
||||
}
|
||||
379
kf_sources/XGame/Classes/UT2003LadderInfo.uc
Normal file
379
kf_sources/XGame/Classes/UT2003LadderInfo.uc
Normal file
|
|
@ -0,0 +1,379 @@
|
|||
class UT2003LadderInfo extends LadderInfo;
|
||||
|
||||
/*
|
||||
* This class contains the single player ladder for UT2003 PC.
|
||||
* See Engine.LadderInfo for details.
|
||||
*
|
||||
* created by: Capps 8/20/02
|
||||
*/
|
||||
|
||||
// These are listed again here for convenience; they appear in Engine.LadderInfo
|
||||
//const DMLadderIndex = 0;
|
||||
//const TDMLadderIndex = 1;
|
||||
//const DOMLadderIndex = 2;
|
||||
//const CTFLadderIndex = 3;
|
||||
//const BRLadderIndex = 4;
|
||||
//const ChampionshipLadderIndex = 5;
|
||||
|
||||
defaultproperties {
|
||||
|
||||
/////////////////////////////// DM LADDER /////////////////////////////
|
||||
OpenNextLadderAtRung(0)=5
|
||||
Begin Object Class=MatchInfo Name=DM0
|
||||
LevelName="TUT-DM"
|
||||
MenuName="Deathmatch Tutorial"
|
||||
EnemyTeamName="xGame.DMRosterTrainingDay"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=0.0
|
||||
GoalScore=10
|
||||
NumBots=0
|
||||
GameType="xGame.xDeathmatch"
|
||||
URLString="?Quickstart=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=DM1
|
||||
LevelName="DM-TrainingDay"
|
||||
EnemyTeamName="xGame.DMRosterTrainingDay"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=-0.3
|
||||
GoalScore=10
|
||||
NumBots=1
|
||||
GameType="xGame.xDeathmatch"
|
||||
URLString="?WeaponStay=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=DM2
|
||||
LevelName="DM-Gael"
|
||||
EnemyTeamName="xGame.DMRosterGael"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=0.2
|
||||
GoalScore=10
|
||||
NumBots=1
|
||||
GameType="xGame.xDeathmatch"
|
||||
URLString="?WeaponStay=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=DM3
|
||||
LevelName="DM-Leviathan"
|
||||
EnemyTeamName="xGame.DMRosterLeviathan"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=0.5
|
||||
GoalScore=15
|
||||
NumBots=2
|
||||
GameType="xGame.xDeathmatch"
|
||||
URLString="?WeaponStay=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=DM4
|
||||
LevelName="DM-Oceanic"
|
||||
EnemyTeamName="xGame.DMRosterOceanic"
|
||||
SpecialEvent="DRAFT"
|
||||
DifficultyModifier=0.1 // very tough map at high skill levels
|
||||
GoalScore=15
|
||||
NumBots=4
|
||||
URLString="?WeaponStay=true"
|
||||
GameType="xGame.xDeathmatch"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=DM5
|
||||
LevelName="DM-Phobos2"
|
||||
EnemyTeamName="xGame.DMRosterBeatTeam"
|
||||
SpecialEvent="TDM OPENED"
|
||||
DifficultyModifier=0.5
|
||||
GoalScore=20
|
||||
NumBots=7
|
||||
URLString="?WeaponStay=true"
|
||||
GameType="xGame.xDeathmatch"
|
||||
End Object
|
||||
DMMatches(0)=MatchInfo'DM0'
|
||||
DMMatches(1)=MatchInfo'DM1'
|
||||
DMMatches(2)=MatchInfo'DM2'
|
||||
DMMatches(3)=MatchInfo'DM3'
|
||||
DMMatches(4)=MatchInfo'DM4'
|
||||
DMMatches(5)=MatchInfo'DM5'
|
||||
|
||||
/////////////////////////////// TDM LADDER ////////////////////////////
|
||||
/*
|
||||
TDM1 Insidious 2v2 first to 10
|
||||
TDM2 Curse 2v2 first to 15
|
||||
TDM3 Antalus 3v3 first to 15
|
||||
TDM4 Plunge 4v4 first to 20
|
||||
TDM5 Asbestos 4v4 first to 20
|
||||
TDM6 Tokara 5v5 first to 25
|
||||
*/
|
||||
|
||||
OpenNextLadderAtRung(1)=3
|
||||
Begin Object Class=MatchInfo Name=TDM1
|
||||
LevelName="DM-Insidious"
|
||||
EnemyTeamName="xGame.TeamSupernova"
|
||||
SpecialEvent="TRADE Remus"
|
||||
DifficultyModifier=0.5
|
||||
GoalScore=10
|
||||
NumBots=3
|
||||
GameType="xGame.xTeamGame"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=TDM2
|
||||
LevelName="DM-Curse3"
|
||||
EnemyTeamName="xGame.TeamCrusaders"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=0.75
|
||||
GoalScore=15
|
||||
NumBots=7
|
||||
GameType="xGame.xTeamGame"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=TDM3
|
||||
LevelName="DM-Antalus"
|
||||
EnemyTeamName="xGame.TeamSunBlades"
|
||||
SpecialEvent="TRADE Cannonball"
|
||||
DifficultyModifier=1.0
|
||||
GoalScore=15
|
||||
NumBots=7
|
||||
GameType="xGame.xTeamGame"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=TDM4
|
||||
LevelName="DM-Plunge"
|
||||
EnemyTeamName="xGame.TeamDragonBreath"
|
||||
SpecialEvent="DOM OPENED"
|
||||
DifficultyModifier=1.25
|
||||
GoalScore=20
|
||||
NumBots=7
|
||||
GameType="xGame.xTeamGame"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=TDM5
|
||||
LevelName="DM-Asbestos"
|
||||
EnemyTeamName="xGame.TeamBoneCrushers"
|
||||
SpecialEvent="TRADE Horus"
|
||||
DifficultyModifier=1.5
|
||||
GoalScore=20
|
||||
NumBots=9
|
||||
GameType="xGame.xTeamGame"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=TDM6
|
||||
LevelName="DM-TokaraForest"
|
||||
EnemyTeamName="xGame.TeamVenom"
|
||||
SpecialEvent="TDM COMPLETE"
|
||||
DifficultyModifier=2.0
|
||||
GoalScore=25
|
||||
NumBots=9
|
||||
GameType="xGame.xTeamGame"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
TDMMatches(0)=MatchInfo'TDM1'
|
||||
TDMMatches(1)=MatchInfo'TDM2'
|
||||
TDMMatches(2)=MatchInfo'TDM3'
|
||||
TDMMatches(3)=MatchInfo'TDM4'
|
||||
TDMMatches(4)=MatchInfo'TDM5'
|
||||
TDMMatches(5)=MatchInfo'TDM6'
|
||||
|
||||
/////////////////////////////// DOM LADDER ////////////////////////////
|
||||
OpenNextLadderAtRung(2)=2
|
||||
|
||||
Begin Object Class=MatchInfo Name=DOM1
|
||||
LevelName="DOM-ScorchedEarth"
|
||||
EnemyTeamName="xGame.TeamWarCry"
|
||||
SpecialEvent="TRADE Damarus"
|
||||
DifficultyModifier=0.5
|
||||
GoalScore=3
|
||||
NumBots=5
|
||||
GameType="xGame.xDoubleDom"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=DOM2
|
||||
LevelName="DOM-Core"
|
||||
EnemyTeamName="xGame.TeamBoneCrushers"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=0.75
|
||||
GoalScore=3
|
||||
NumBots=5
|
||||
GameType="xGame.xDoubleDom"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=DOM3
|
||||
LevelName="DOM-SepukkuGorge"
|
||||
EnemyTeamName="xGame.TeamFirestorm"
|
||||
SpecialEvent="CTF OPENED"
|
||||
DifficultyModifier=1.25
|
||||
GoalScore=3
|
||||
NumBots=9
|
||||
GameType="xGame.xDoubleDom"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=DOM4
|
||||
LevelName="DOM-Suntemple"
|
||||
EnemyTeamName="xGame.TeamApocalypse"
|
||||
SpecialEvent="TRADE Faraleth"
|
||||
DifficultyModifier=1.75
|
||||
GoalScore=4
|
||||
NumBots=9
|
||||
GameType="xGame.xDoubleDom"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=DOM5
|
||||
LevelName="DOM-Outrigger"
|
||||
EnemyTeamName="xGame.TeamBlackLegion"
|
||||
SpecialEvent="DOM COMPLETE"
|
||||
DifficultyModifier=2.0
|
||||
GoalScore=4
|
||||
NumBots=9
|
||||
GameType="xGame.xDoubleDom"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
|
||||
DOMMatches(0)=MatchInfo'DOM1'
|
||||
DOMMatches(1)=MatchInfo'DOM2'
|
||||
DOMMatches(2)=MatchInfo'DOM3'
|
||||
DOMMatches(3)=MatchInfo'DOM4'
|
||||
DOMMatches(4)=MatchInfo'DOM5'
|
||||
/////////////////////////////// CTF LADDER ////////////////////////////
|
||||
OpenNextLadderAtRung(3)=3
|
||||
Begin Object Class=MatchInfo Name=CTF1
|
||||
LevelName="CTF-Maul"
|
||||
EnemyTeamName="xGame.TeamNightstalkers"
|
||||
SpecialEvent="TRADE Subversa"
|
||||
DifficultyModifier=0.5
|
||||
GoalScore=3
|
||||
GameType="xGame.xCTFGame"
|
||||
NumBots=5
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=CTF2
|
||||
LevelName="CTF-Citadel"
|
||||
EnemyTeamName="xGame.TeamVenom"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=1.0
|
||||
GoalScore=3
|
||||
GameType="xGame.xCTFGame"
|
||||
NumBots=7
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=CTF3
|
||||
LevelName="CTF-Chrome"
|
||||
EnemyTeamName="xGame.TeamBlackLegion"
|
||||
SpecialEvent="TRADE Lilith"
|
||||
DifficultyModifier=1.25
|
||||
GoalScore=3
|
||||
GameType="xGame.xCTFGame"
|
||||
NumBots=7
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=CTF4
|
||||
LevelName="CTF-Geothermal"
|
||||
EnemyTeamName="xGame.TeamBloodFists"
|
||||
SpecialEvent="BR OPENED"
|
||||
DifficultyModifier=1.75
|
||||
GoalScore=4
|
||||
GameType="xGame.xCTFGame"
|
||||
NumBots=7
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=CTF5
|
||||
LevelName="CTF-Lostfaith"
|
||||
EnemyTeamName="xGame.TeamIronGuard"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=2.0
|
||||
GoalScore=4
|
||||
GameType="xGame.xCTFGame"
|
||||
NumBots=9
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=CTF6
|
||||
LevelName="CTF-Face3"
|
||||
EnemyTeamName="xGame.TeamColdSteel"
|
||||
SpecialEvent="CTF COMPLETE"
|
||||
DifficultyModifier=2.5
|
||||
GoalScore=4
|
||||
GameType="xGame.xCTFGame"
|
||||
NumBots=9
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
CTFMatches(0)=MatchInfo'CTF1'
|
||||
CTFMatches(1)=MatchInfo'CTF2'
|
||||
CTFMatches(2)=MatchInfo'CTF3'
|
||||
CTFMatches(3)=MatchInfo'CTF4'
|
||||
CTFMatches(4)=MatchInfo'CTF5'
|
||||
CTFMatches(5)=MatchInfo'CTF6'
|
||||
/////////////////////////////// BR LADDER /////////////////////////////
|
||||
OpenNextLadderAtRung(4)=2
|
||||
|
||||
Begin Object Class=MatchInfo Name=BR1
|
||||
LevelName="BR-TwinTombs"
|
||||
EnemyTeamName="xGame.TeamVenom"
|
||||
SpecialEvent="TRADE Syzygy"
|
||||
DifficultyModifier=0.75
|
||||
GoalScore=15
|
||||
GameType="xGame.xBombingRun"
|
||||
NumBots=5
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=BR2
|
||||
LevelName="BR-Disclosure"
|
||||
EnemyTeamName="xGame.TeamBlackLegion"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=1.0
|
||||
GoalScore=15
|
||||
GameType="xGame.xBombingRun"
|
||||
NumBots=7
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=BR3
|
||||
LevelName="BR-Bifrost"
|
||||
EnemyTeamName="xGame.TeamColdSteel"
|
||||
SpecialEvent="TRADE Corrosion"
|
||||
DifficultyModifier=1.5
|
||||
GoalScore=20
|
||||
GameType="xGame.xBombingRun"
|
||||
NumBots=7
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=BR4
|
||||
LevelName="BR-Anubis"
|
||||
EnemyTeamName="xGame.TeamBloodFists"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=2.0
|
||||
GoalScore=20
|
||||
GameType="xGame.xBombingRun"
|
||||
NumBots=9
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=BR5
|
||||
LevelName="BR-Skyline"
|
||||
EnemyTeamName="xGame.TeamPainMachine"
|
||||
SpecialEvent="BR COMPLETE"
|
||||
DifficultyModifier=2.5
|
||||
GoalScore=20
|
||||
GameType="xGame.xBombingRun"
|
||||
NumBots=9
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
|
||||
BRMatches(0)=MatchInfo'BR1'
|
||||
BRMatches(1)=MatchInfo'BR2'
|
||||
BRMatches(2)=MatchInfo'BR3'
|
||||
BRMatches(3)=MatchInfo'BR4'
|
||||
BRMatches(4)=MatchInfo'BR5'
|
||||
/////////////////////////////// CHAMPIONSHIP LADDER //////////////////////////
|
||||
Begin Object Class=MatchInfo Name=CHAMP1
|
||||
LevelName="DM-Compressed"
|
||||
MenuName="Tournament Semi-Final"
|
||||
EnemyTeamName="xGame.ChampRosterSemiFinal"
|
||||
SpecialEvent=""
|
||||
DifficultyModifier=2.75
|
||||
GoalScore=20
|
||||
NumBots=5
|
||||
GameType="xGame.xTeamGame"
|
||||
URLString="?TeamScreen=true"
|
||||
End Object
|
||||
Begin Object Class=MatchInfo Name=CHAMP2
|
||||
LevelName="DM-1on1-Serpentine"
|
||||
MenuName="Tournament Final"
|
||||
EnemyTeamName="xGame.ChampRosterFinal"
|
||||
SpecialEvent="CHAMPIONSHIP COMPLETE"
|
||||
DifficultyModifier=0.0
|
||||
GoalScore=10
|
||||
NumBots=1
|
||||
GameType="xGame.BossDM"
|
||||
URLString="?TeamScreen=false"
|
||||
End Object
|
||||
ChampionshipMatches(0)=MatchInfo'CHAMP1'
|
||||
ChampionshipMatches(1)=MatchInfo'CHAMP2'
|
||||
}
|
||||
65
kf_sources/XGame/Classes/UT2K4DMRoster.uc
Normal file
65
kf_sources/XGame/Classes/UT2K4DMRoster.uc
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
//==============================================================================
|
||||
// Roster for single player DM games, Players are selected randomly
|
||||
// Roster consist from unknown players from: Juggs, Mercs and Egypt
|
||||
//
|
||||
// Written by Michiel Hendriks
|
||||
// (c) 2003, Epic Games, Inc. All Rights Reserved
|
||||
//==============================================================================
|
||||
|
||||
class UT2K4DMRoster extends xDMRoster config;
|
||||
|
||||
/** To create the same team in the loading screen and actual game */
|
||||
var config array<string> UsedBots;
|
||||
var array<string> BotList;
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
if (UsedBots.Length != 0) RosterNames = UsedBots;
|
||||
Super.PostBeginPlay();
|
||||
}
|
||||
|
||||
function PreInitialize(int TeamBots)
|
||||
{
|
||||
local int i;
|
||||
Roster.Length = 0;
|
||||
UsedBots.Length = 0;
|
||||
for (i = 0; i < TeamBots; i++)
|
||||
{
|
||||
AddPlayerFromList();
|
||||
}
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
function AddPlayerFromList()
|
||||
{
|
||||
local int i, n;
|
||||
rand(BotList.length); // for randomness' sake
|
||||
i = rand(BotList.length);
|
||||
n = roster.length;
|
||||
Roster.Length = n+1;
|
||||
UsedBots.Length = n+1;
|
||||
Roster[n] = class'xRosterEntry'.static.CreateRosterEntryCharacter(BotList[i]);
|
||||
Roster[n].PrecacheRosterFor(self);
|
||||
UsedBots[n] = BotList[i];
|
||||
BotList.Remove(i, 1);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
TeamName="Death Match"
|
||||
// Juggs
|
||||
BotList(0)="Avalanche"
|
||||
BotList(1)="Sorrow"
|
||||
BotList(2)="Perdition"
|
||||
BotList(3)="Vengeance"
|
||||
// Mercs
|
||||
BotList(4)="Stargazer"
|
||||
BotList(5)="Phantom"
|
||||
BotList(6)="Kain"
|
||||
BotList(7)="Silhouette"
|
||||
// Egypt
|
||||
BotList(8)="Sphinx"
|
||||
BotList(9)="Natron"
|
||||
BotList(10)="Nafiret"
|
||||
BotList(11)="Tranquility"
|
||||
}
|
||||
1744
kf_sources/XGame/Classes/UT2K4GameProfile.uc
Normal file
1744
kf_sources/XGame/Classes/UT2K4GameProfile.uc
Normal file
File diff suppressed because it is too large
Load diff
1014
kf_sources/XGame/Classes/UT2K4LadderInfo.uc
Normal file
1014
kf_sources/XGame/Classes/UT2K4LadderInfo.uc
Normal file
File diff suppressed because it is too large
Load diff
43
kf_sources/XGame/Classes/UT2K4MatchInfo.uc
Normal file
43
kf_sources/XGame/Classes/UT2K4MatchInfo.uc
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
//==============================================================================
|
||||
// Additonal Match Info for UT2004 Ladder games
|
||||
//
|
||||
// Written by Michiel Hendriks
|
||||
// (c) 2003, Epic Games, Inc. All Rights Reserved
|
||||
//==============================================================================
|
||||
|
||||
class UT2K4MatchInfo extends MatchInfo;
|
||||
|
||||
/**
|
||||
Custom thumbnails, to override default behavior
|
||||
*/
|
||||
var Material ThumbnailActive, ThumbnailInActive;
|
||||
|
||||
/** alternative maps to use */
|
||||
var array<string> AltLevels;
|
||||
/**
|
||||
this number of entries in the AltLevels array has a higher priority,
|
||||
this means that only these will be randomly selected
|
||||
*/
|
||||
var byte Priority;
|
||||
|
||||
/** prize money you win */
|
||||
var int PrizeMoney;
|
||||
|
||||
/** Fee to pay when you want to enter this match */
|
||||
var int EntryFee;
|
||||
|
||||
/** a string with requirement information, parsed in UT2K4SP_Main and called from UT2K4SP_TabLadderBase */
|
||||
var string Requirements;
|
||||
|
||||
/** if > 0 a time limit is set on the match */
|
||||
var float TimeLimit;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
ThumbnailActive=none
|
||||
ThumbnailInActive=none
|
||||
Priority=0
|
||||
PrizeMoney=0
|
||||
EntryFee=0
|
||||
TimeLimit=0
|
||||
}
|
||||
14
kf_sources/XGame/Classes/UT2K4RosterGroup.uc
Normal file
14
kf_sources/XGame/Classes/UT2K4RosterGroup.uc
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
//==============================================================================
|
||||
// Roster Group, a collection of rosters, used in Single Player to group the
|
||||
// diffirent enemy teams into difficulty levels
|
||||
//
|
||||
// Written by Michiel Hendriks
|
||||
// (c) 2003, Epic Games, Inc. All Rights Reserved
|
||||
//==============================================================================
|
||||
|
||||
class UT2K4RosterGroup extends Object abstract;
|
||||
|
||||
/** all team rosters */
|
||||
var array<string> Rosters;
|
||||
/** the difficulty of this roster */
|
||||
var int Difficulty;
|
||||
64
kf_sources/XGame/Classes/UT2K4TeamRoster.uc
Normal file
64
kf_sources/XGame/Classes/UT2K4TeamRoster.uc
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
//==============================================================================
|
||||
// Team Roster, UT2K4 style
|
||||
// Note: the first name in the RosterNames array is considered the Team Leader
|
||||
//
|
||||
// Written by Michiel Hendriks
|
||||
// (c) 2003, Epic Games, Inc. All Rights Reserved
|
||||
//==============================================================================
|
||||
|
||||
class UT2K4TeamRoster extends xTeamRoster abstract;
|
||||
|
||||
/** Description */
|
||||
var localized string TeamDescription;
|
||||
/** Team voiceover */
|
||||
var sound VoiceOver;
|
||||
/** Only the team name */
|
||||
var sound TeamNameSound;
|
||||
/** Difficulty level */
|
||||
var int TeamLevel;
|
||||
/** The team leader, if this is empty the first RosterNames is used */
|
||||
var string TeamLeader;
|
||||
|
||||
/** If TeamBots == 1 use the team leader, else use the default behavior */
|
||||
function Initialize(int TeamBots)
|
||||
{
|
||||
local array<string> RosterOverride;
|
||||
local int i;
|
||||
if (UT2K4GameProfile(Level.Game.CurrentGameProfile) != none)
|
||||
{
|
||||
if (UT2K4GameProfile(Level.Game.CurrentGameProfile).GetAltTeamRoster(string(class), RosterOverride))
|
||||
{
|
||||
RosterNames = RosterOverride;
|
||||
Roster.Length = RosterNames.length;
|
||||
for ( i = 0; i < RosterNames.Length; i++ )
|
||||
{
|
||||
Roster[i] = class'xRosterEntry'.Static.CreateRosterEntryCharacter(RosterNames[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (TeamBots != 1)
|
||||
{
|
||||
Super.Initialize(TeamBots);
|
||||
return;
|
||||
}
|
||||
// else pick the team leader
|
||||
if (TeamLeader == "") TeamLeader = RosterNames[0];
|
||||
Roster.Length = 1;
|
||||
Roster[0] = class'xRosterEntry'.Static.CreateRosterEntryCharacter(TeamLeader);
|
||||
Roster[0].PrecacheRosterFor(self);
|
||||
}
|
||||
|
||||
function bool AddToTeam(Controller Other)
|
||||
{
|
||||
local SquadAI DMSquad;
|
||||
// if a team game use the default routine
|
||||
if (TeamGame(Level.Game) != none) return Super.AddToTeam(Other);
|
||||
// otherwise add fake squads
|
||||
if ( Bot(Other) != None )
|
||||
{
|
||||
DMSquad = spawn(DeathMatch(Level.Game).DMSquadClass);
|
||||
DMSquad.AddBot(Bot(Other));
|
||||
}
|
||||
Other.PlayerReplicationInfo.Team = None;
|
||||
return true;
|
||||
}
|
||||
54
kf_sources/XGame/Classes/index.html
Normal file
54
kf_sources/XGame/Classes/index.html
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<html>
|
||||
<head><title>Index of /kf_sources/XGame/Classes/</title></head>
|
||||
<body>
|
||||
<h1>Index of /kf_sources/XGame/Classes/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="AimedAttachment.uc">AimedAttachment.uc</a> 06-Oct-2019 10:27 190
|
||||
<a href="AttractCamera.uc">AttractCamera.uc</a> 06-Oct-2019 10:28 493
|
||||
<a href="BloodRites.uc">BloodRites.uc</a> 06-Oct-2019 10:27 4802
|
||||
<a href="BodyEffect.uc">BodyEffect.uc</a> 06-Oct-2019 10:27 1443
|
||||
<a href="CachePlayers.uc">CachePlayers.uc</a> 06-Oct-2019 10:27 155
|
||||
<a href="ChallengeGame.uc">ChallengeGame.uc</a> 06-Oct-2019 10:27 3304
|
||||
<a href="Combo.uc">Combo.uc</a> 06-Oct-2019 10:27 2001
|
||||
<a href="CustomLadderInfo.uc">CustomLadderInfo.uc</a> 06-Oct-2019 10:27 1475
|
||||
<a href="DMRosterConfigured.uc">DMRosterConfigured.uc</a> 06-Oct-2019 10:27 1572
|
||||
<a href="DecoText.uc">DecoText.uc</a> 06-Oct-2019 10:27 97
|
||||
<a href="DestroyableTrigger.uc">DestroyableTrigger.uc</a> 06-Oct-2019 10:27 2278
|
||||
<a href="LandMine.uc">LandMine.uc</a> 06-Oct-2019 10:27 1205
|
||||
<a href="LavaVolume.uc">LavaVolume.uc</a> 06-Oct-2019 10:27 395
|
||||
<a href="ManoEMano.uc">ManoEMano.uc</a> 06-Oct-2019 10:27 548
|
||||
<a href="PlayerLight.uc">PlayerLight.uc</a> 06-Oct-2019 10:27 584
|
||||
<a href="PlayerRecordClass.uc">PlayerRecordClass.uc</a> 06-Oct-2019 10:27 2093
|
||||
<a href="ProjectileSpawner.uc">ProjectileSpawner.uc</a> 06-Oct-2019 10:27 1524
|
||||
<a href="SPECIES_Human.uc">SPECIES_Human.uc</a> 06-Oct-2019 10:27 448
|
||||
<a href="SpawnerProjectile.uc">SpawnerProjectile.uc</a> 06-Oct-2019 10:27 2450
|
||||
<a href="SpeciesType.uc">SpeciesType.uc</a> 06-Oct-2019 10:27 13454
|
||||
<a href="TeamBlueConfigured.uc">TeamBlueConfigured.uc</a> 06-Oct-2019 10:27 1592
|
||||
<a href="TeamRedConfigured.uc">TeamRedConfigured.uc</a> 06-Oct-2019 10:27 1591
|
||||
<a href="UDamageTimer.uc">UDamageTimer.uc</a> 06-Oct-2019 10:28 479
|
||||
<a href="UT2003GameProfile.uc">UT2003GameProfile.uc</a> 06-Oct-2019 10:28 1415
|
||||
<a href="UT2003LadderInfo.uc">UT2003LadderInfo.uc</a> 06-Oct-2019 10:27 10637
|
||||
<a href="UT2K4DMRoster.uc">UT2K4DMRoster.uc</a> 06-Oct-2019 10:27 1613
|
||||
<a href="UT2K4GameProfile.uc">UT2K4GameProfile.uc</a> 06-Oct-2019 10:27 51259
|
||||
<a href="UT2K4LadderInfo.uc">UT2K4LadderInfo.uc</a> 06-Oct-2019 10:27 28943
|
||||
<a href="UT2K4MatchInfo.uc">UT2K4MatchInfo.uc</a> 06-Oct-2019 10:27 1136
|
||||
<a href="UT2K4RosterGroup.uc">UT2K4RosterGroup.uc</a> 06-Oct-2019 10:27 541
|
||||
<a href="UT2K4TeamRoster.uc">UT2K4TeamRoster.uc</a> 06-Oct-2019 10:27 1987
|
||||
<a href="xBot.uc">xBot.uc</a> 06-Oct-2019 10:27 707
|
||||
<a href="xDMRoster.uc">xDMRoster.uc</a> 06-Oct-2019 10:27 2653
|
||||
<a href="xDeathMessage.uc">xDeathMessage.uc</a> 06-Oct-2019 10:27 3783
|
||||
<a href="xFallingVolume.uc">xFallingVolume.uc</a> 06-Oct-2019 10:27 272
|
||||
<a href="xKicker.uc">xKicker.uc</a> 06-Oct-2019 10:27 1413
|
||||
<a href="xKillerMessagePlus.uc">xKillerMessagePlus.uc</a> 06-Oct-2019 10:27 742
|
||||
<a href="xMutatorList.uc">xMutatorList.uc</a> 06-Oct-2019 10:27 1008
|
||||
<a href="xPawn.uc">xPawn.uc</a> 06-Oct-2019 10:27 75585
|
||||
<a href="xPawnSoundGroup.uc">xPawnSoundGroup.uc</a> 06-Oct-2019 10:27 857
|
||||
<a href="xPlayer.uc">xPlayer.uc</a> 06-Oct-2019 10:27 27650
|
||||
<a href="xPlayerReplicationInfo.uc">xPlayerReplicationInfo.uc</a> 06-Oct-2019 10:27 1115
|
||||
<a href="xRosterEntry.uc">xRosterEntry.uc</a> 06-Oct-2019 10:27 2348
|
||||
<a href="xTeamRoster.uc">xTeamRoster.uc</a> 06-Oct-2019 10:27 3244
|
||||
<a href="xUtil.uc">xUtil.uc</a> 06-Oct-2019 10:27 15357
|
||||
<a href="xVictimMessage.uc">xVictimMessage.uc</a> 06-Oct-2019 10:27 700
|
||||
<a href="xVoicePack.uc">xVoicePack.uc</a> 06-Oct-2019 10:27 4842
|
||||
<a href="xWeaponAttachment.uc">xWeaponAttachment.uc</a> 06-Oct-2019 10:27 2378
|
||||
</pre><hr></body>
|
||||
</html>
|
||||
31
kf_sources/XGame/Classes/xBot.uc
Normal file
31
kf_sources/XGame/Classes/xBot.uc
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
class xBot extends Bot
|
||||
DependsOn(xUtil);
|
||||
|
||||
var() xUtil.PlayerRecord PawnSetupRecord;
|
||||
|
||||
function SetPawnClass(string inClass, string inCharacter)
|
||||
{
|
||||
local class<xPawn> pClass;
|
||||
|
||||
if ( inClass != "" )
|
||||
{
|
||||
pClass = class<xPawn>(DynamicLoadObject(inClass, class'Class'));
|
||||
if (pClass != None)
|
||||
PawnClass = pClass;
|
||||
}
|
||||
|
||||
PawnSetupRecord = class'xUtil'.static.FindPlayerRecord(inCharacter);
|
||||
PlayerReplicationInfo.SetCharacterName(inCharacter);
|
||||
}
|
||||
|
||||
function Possess(Pawn aPawn)
|
||||
{
|
||||
Super.Possess(aPawn);
|
||||
if ( xPawn(aPawn) != None )
|
||||
xPawn(aPawn).Setup(PawnSetupRecord);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
PlayerReplicationInfoClass=Class'xGame.xPlayerReplicationInfo'
|
||||
}
|
||||
99
kf_sources/XGame/Classes/xDMRoster.uc
Normal file
99
kf_sources/XGame/Classes/xDMRoster.uc
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
class xDMRoster extends DMRoster
|
||||
DependsOn(xUtil);
|
||||
|
||||
function Initialize(int TeamBots)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=Roster.Length; i<TeamBots; i++ )
|
||||
AddRandomPlayer();
|
||||
|
||||
for ( i=0; i<TeamBots; i++ )
|
||||
Roster[i].PrecacheRosterFor(self);
|
||||
}
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
local array<xUtil.PlayerRecord> PlayerRecords;
|
||||
local int i,j;
|
||||
|
||||
Super.PostBeginPlay();
|
||||
|
||||
// add RosterNames to roster
|
||||
class'xUtil'.static.GetPlayerList(PlayerRecords);
|
||||
for ( i=0; i<RosterNames.Length; i++ )
|
||||
{
|
||||
j = Roster.Length;
|
||||
Roster.Length = Roster.Length + 1;
|
||||
Roster[j] = class'xRosterEntry'.Static.CreateRosterEntryCharacter(RosterNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function RosterEntry GetRandomPlayer()
|
||||
{
|
||||
local array<xUtil.PlayerRecord> PlayerRecords;
|
||||
local int RND,i, num;
|
||||
local int max, total;
|
||||
|
||||
class'xUtil'.static.GetPlayerList(PlayerRecords);
|
||||
for ( i=0; i<PlayerRecords.Length; i++ )
|
||||
max += PlayerRecords[i].BotUse;
|
||||
RND = Rand(Max);
|
||||
|
||||
for ( i=0; i<PlayerRecords.Length; i++ )
|
||||
{
|
||||
total += PlayerRecords[i].BotUse;
|
||||
if ( total >= RND )
|
||||
break;
|
||||
}
|
||||
|
||||
num = i;
|
||||
|
||||
if ( AvailableRecord(PlayerRecords[num].Menu) && !AlreadyExistsEntry(PlayerRecords[num].DefaultName,true) )
|
||||
return class'xRosterEntry'.Static.CreateRosterEntry(num);
|
||||
|
||||
for ( i=num; i<PlayerRecords.Length; i++ )
|
||||
if ( AvailableRecord(PlayerRecords[i].Menu) && (PlayerRecords[i].BotUse > 0) && !AlreadyExistsEntry(PlayerRecords[i].DefaultName,true) )
|
||||
return class'xRosterEntry'.Static.CreateRosterEntry(i);
|
||||
|
||||
for ( i=0; i<num; i++ )
|
||||
if ( AvailableRecord(PlayerRecords[i].Menu) && (PlayerRecords[i].BotUse > 0) && !AlreadyExistsEntry(PlayerRecords[i].DefaultName,true) )
|
||||
return class'xRosterEntry'.Static.CreateRosterEntry(i);
|
||||
|
||||
return GetNamedBot("Jakob");
|
||||
}
|
||||
|
||||
function bool AvailableRecord(string MenuString)
|
||||
{
|
||||
return ( (MenuString ~= "DUP") || (MenuString ~= "SP") || (MenuString ~= "") || (MenuString ~= "UNLOCK") );
|
||||
}
|
||||
|
||||
function RosterEntry GetNamedBot(string botName)
|
||||
{
|
||||
local array<xUtil.PlayerRecord> PlayerRecords;
|
||||
local xUtil.PlayerRecord PR;
|
||||
|
||||
class'xUtil'.static.GetPlayerList(PlayerRecords);
|
||||
PR = class'xUtil'.static.FindPlayerRecord(botName);
|
||||
return class'xRosterEntry'.Static.CreateRosterEntry(PR.RecordIndex);
|
||||
}
|
||||
|
||||
function bool AlreadyExistsEntry(string CharacterName, bool bNoRecursion)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Roster.Length; i++ )
|
||||
if ( (xRosterEntry(Roster[i]) != None) && (xRosterEntry(Roster[i]).PlayerName == CharacterName) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function bool BelongsOnTeam(class<Pawn> PawnClass)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
127
kf_sources/XGame/Classes/xDeathMessage.uc
Normal file
127
kf_sources/XGame/Classes/xDeathMessage.uc
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
//
|
||||
// A Death Message.
|
||||
//
|
||||
// Switch 0: Kill
|
||||
// RelatedPRI_1 is the Killer.
|
||||
// RelatedPRI_2 is the Victim.
|
||||
// OptionalObject is the DamageType Class.
|
||||
//
|
||||
|
||||
class xDeathMessage extends LocalMessage
|
||||
config(user);
|
||||
|
||||
var(Message) localized string KilledString, SomeoneString;
|
||||
var config bool bNoConsoleDeathMessages;
|
||||
|
||||
static function color GetConsoleColor( PlayerReplicationInfo RelatedPRI_1 )
|
||||
{
|
||||
return class'HUD'.Default.GreenColor;
|
||||
}
|
||||
|
||||
static function string GetString(
|
||||
optional int Switch,
|
||||
optional PlayerReplicationInfo RelatedPRI_1,
|
||||
optional PlayerReplicationInfo RelatedPRI_2,
|
||||
optional Object OptionalObject
|
||||
)
|
||||
{
|
||||
local string KillerName, VictimName;
|
||||
|
||||
if (Class<DamageType>(OptionalObject) == None)
|
||||
return "";
|
||||
|
||||
if (RelatedPRI_2 == None)
|
||||
VictimName = Default.SomeoneString;
|
||||
else
|
||||
VictimName = RelatedPRI_2.PlayerName;
|
||||
|
||||
if ( Switch == 1 )
|
||||
{
|
||||
// suicide
|
||||
return class'GameInfo'.Static.ParseKillMessage(
|
||||
KillerName,
|
||||
VictimName,
|
||||
Class<DamageType>(OptionalObject).Static.SuicideMessage(RelatedPRI_2) );
|
||||
}
|
||||
|
||||
if (RelatedPRI_1 == None)
|
||||
KillerName = Default.SomeoneString;
|
||||
else
|
||||
KillerName = RelatedPRI_1.PlayerName;
|
||||
|
||||
return class'GameInfo'.Static.ParseKillMessage(
|
||||
KillerName,
|
||||
VictimName,
|
||||
Class<DamageType>(OptionalObject).Static.DeathMessage(RelatedPRI_1, RelatedPRI_2) );
|
||||
}
|
||||
|
||||
static function ClientReceive(
|
||||
PlayerController P,
|
||||
optional int Switch,
|
||||
optional PlayerReplicationInfo RelatedPRI_1,
|
||||
optional PlayerReplicationInfo RelatedPRI_2,
|
||||
optional Object OptionalObject
|
||||
)
|
||||
{
|
||||
if ( Switch == 1 )
|
||||
{
|
||||
if ( !Default.bNoConsoleDeathMessages )
|
||||
Super.ClientReceive(P, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject);
|
||||
return;
|
||||
}
|
||||
if ( (RelatedPRI_1 == P.PlayerReplicationInfo)
|
||||
|| (P.PlayerReplicationInfo.bOnlySpectator && (Pawn(P.ViewTarget) != None) && (Pawn(P.ViewTarget).PlayerReplicationInfo == RelatedPRI_1)) )
|
||||
{
|
||||
// Interdict and send the child message instead.
|
||||
P.myHUD.LocalizedMessage( Default.ChildMessage, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject );
|
||||
if ( !Default.bNoConsoleDeathMessages )
|
||||
P.myHUD.LocalizedMessage( Default.Class, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject );
|
||||
|
||||
// check multikills
|
||||
if ( P.Role == ROLE_Authority )
|
||||
{
|
||||
// multikills checked already in LogMultiKills()
|
||||
// Temp commented out - Ramm
|
||||
/*
|
||||
if ( UnrealPlayer(P).MultiKillLevel > 0 )
|
||||
P.ReceiveLocalizedMessage( class'MultiKillMessage', UnrealPlayer(P).MultiKillLevel ); */
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ( RelatedPRI_1 != RelatedPRI_2 ) && ( RelatedPRI_2 != None)
|
||||
&& ((RelatedPRI_2.Team == None) || (RelatedPRI_1.Team != RelatedPRI_2.Team)) )
|
||||
{
|
||||
if ( (P.Level.TimeSeconds - UnrealPlayer(P).LastKillTime < 4) && (Switch != 1) )
|
||||
{
|
||||
UnrealPlayer(P).MultiKillLevel++;
|
||||
// Temp commented out - Ramm
|
||||
/*
|
||||
P.ReceiveLocalizedMessage( class'MultiKillMessage', xPlayer(P).MultiKillLevel ); */
|
||||
}
|
||||
else
|
||||
UnrealPlayer(P).MultiKillLevel = 0;
|
||||
UnrealPlayer(P).LastKillTime = P.Level.TimeSeconds;
|
||||
}
|
||||
else
|
||||
UnrealPlayer(P).MultiKillLevel = 0;
|
||||
}
|
||||
}
|
||||
else if (RelatedPRI_2 == P.PlayerReplicationInfo)
|
||||
{
|
||||
P.ReceiveLocalizedMessage( class'xVictimMessage', 0, RelatedPRI_1 );
|
||||
if ( !Default.bNoConsoleDeathMessages )
|
||||
Super.ClientReceive(P, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject);
|
||||
}
|
||||
else if ( !Default.bNoConsoleDeathMessages )
|
||||
Super.ClientReceive(P, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bNoConsoleDeathMessages=false
|
||||
ChildMessage=class'xKillerMessagePlus'
|
||||
DrawColor=(R=255,G=0,B=0,A=255)
|
||||
KilledString="was killed by"
|
||||
SomeoneString="someone"
|
||||
bIsSpecial=false
|
||||
}
|
||||
13
kf_sources/XGame/Classes/xFallingVolume.uc
Normal file
13
kf_sources/XGame/Classes/xFallingVolume.uc
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
class xFallingVolume extends PhysicsVolume;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DamagePerSec=100
|
||||
DamageType=class'Fell'
|
||||
bPainCausing=True
|
||||
bWaterVolume=False
|
||||
bDestructive=True
|
||||
bNoInventory=True
|
||||
ViewFog=(X=0.5859375,Y=0.1953125,Z=0.078125)
|
||||
LocationName="in air"
|
||||
}
|
||||
59
kf_sources/XGame/Classes/xKicker.uc
Normal file
59
kf_sources/XGame/Classes/xKicker.uc
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
//=============================================================================
|
||||
// xKicker - from UT
|
||||
// Creatures will jump on hitting this trigger in direction specified
|
||||
//=============================================================================
|
||||
class xKicker extends Triggers placeable;
|
||||
|
||||
var() vector KickVelocity;
|
||||
var() name KickedClasses;
|
||||
var() bool bKillVelocity;
|
||||
var() bool bRandomize;
|
||||
|
||||
simulated function Touch( actor Other )
|
||||
{
|
||||
local Actor A;
|
||||
|
||||
if ( !Other.IsA(KickedClasses) )
|
||||
return;
|
||||
PendingTouch = Other.PendingTouch;
|
||||
Other.PendingTouch = self;
|
||||
if( Event != '' )
|
||||
foreach AllActors( class 'Actor', A, Event )
|
||||
A.Trigger( Other, Other.Instigator );
|
||||
}
|
||||
|
||||
simulated function PostTouch( actor Other )
|
||||
{
|
||||
local bool bWasFalling;
|
||||
local vector Push;
|
||||
local float PMag;
|
||||
|
||||
bWasFalling = ( Other.Physics == PHYS_Falling );
|
||||
if ( bKillVelocity )
|
||||
Push = -1 * Other.Velocity;
|
||||
else
|
||||
Push.Z = -1 * Other.Velocity.Z;
|
||||
if ( bRandomize )
|
||||
{
|
||||
PMag = VSize(KickVelocity);
|
||||
Push += PMag * Normal(KickVelocity + 0.5 * PMag * VRand());
|
||||
}
|
||||
else
|
||||
Push += KickVelocity;
|
||||
if ( Other.IsA('Bot') )
|
||||
{
|
||||
if ( bWasFalling )
|
||||
Pawn(Other).JumpOffPawn();
|
||||
Bot(Other).SetFall();
|
||||
}
|
||||
Other.SetPhysics(PHYS_Falling);
|
||||
Other.Velocity += Push;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
RemoteRole=ROLE_SimulatedProxy
|
||||
bStatic=false
|
||||
bDirectional=True
|
||||
KickedClasses=Pawn
|
||||
}
|
||||
35
kf_sources/XGame/Classes/xKillerMessagePlus.uc
Normal file
35
kf_sources/XGame/Classes/xKillerMessagePlus.uc
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
class xKillerMessagePlus extends LocalMessage;
|
||||
|
||||
var(Message) localized string YouKilled;
|
||||
var(Message) localized string YouKilledTrailer;
|
||||
|
||||
static function string GetString(
|
||||
optional int Switch,
|
||||
optional PlayerReplicationInfo RelatedPRI_1,
|
||||
optional PlayerReplicationInfo RelatedPRI_2,
|
||||
optional Object OptionalObject
|
||||
)
|
||||
{
|
||||
if (RelatedPRI_1 == None)
|
||||
return "";
|
||||
if (RelatedPRI_2 == None)
|
||||
return "";
|
||||
|
||||
if (RelatedPRI_2.PlayerName != "")
|
||||
return Default.YouKilled@RelatedPRI_2.PlayerName@Default.YouKilledTrailer;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bFadeMessage=True
|
||||
bIsUnique=True
|
||||
|
||||
DrawColor=(R=0,G=160,B=255,A=255)
|
||||
FontSize=0
|
||||
|
||||
StackMode=SM_Down
|
||||
PosY=0.10
|
||||
|
||||
YouKilled="You killed"
|
||||
YouKilledTrailer=""
|
||||
}
|
||||
40
kf_sources/XGame/Classes/xMutatorList.uc
Normal file
40
kf_sources/XGame/Classes/xMutatorList.uc
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
class xMutatorList extends Actor;
|
||||
|
||||
var() array<CacheManager.MutatorRecord> MutatorList;
|
||||
|
||||
simulated function Init(optional bool bLoadClasses)
|
||||
{
|
||||
local CacheManager.MutatorRecord tmp;
|
||||
local int i, j;
|
||||
|
||||
class'CacheManager'.static.GetMutatorList(MutatorList);
|
||||
|
||||
// sort by name
|
||||
for (i=0; i<MutatorList.Length-1; i++)
|
||||
{
|
||||
for (j=i+1; j<MutatorList.Length; j++)
|
||||
{
|
||||
if (MutatorList[j].FriendlyName < MutatorList[i].FriendlyName)
|
||||
{
|
||||
tmp = MutatorList[i];
|
||||
MutatorList[i] = MutatorList[j];
|
||||
MutatorList[j] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if (bLoadClasses)
|
||||
// LoadClasses();
|
||||
}
|
||||
|
||||
simulated function LoadClasses()
|
||||
{
|
||||
// local int i;
|
||||
|
||||
// for (i=0; i<MutatorList.Length; i++)
|
||||
// {
|
||||
// if (MutatorList[i].ClassRef == None)
|
||||
// MutatorList[i].ClassRef = class<Mutator>(DynamicLoadObject(MutatorList[i].ClassName,class'Class'));
|
||||
// }
|
||||
}
|
||||
|
||||
2674
kf_sources/XGame/Classes/xPawn.uc
Normal file
2674
kf_sources/XGame/Classes/xPawn.uc
Normal file
File diff suppressed because it is too large
Load diff
42
kf_sources/XGame/Classes/xPawnSoundGroup.uc
Normal file
42
kf_sources/XGame/Classes/xPawnSoundGroup.uc
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
class xPawnSoundGroup extends Object
|
||||
abstract;
|
||||
|
||||
var() array<Sound> Sounds;
|
||||
var() array<Sound> DeathSounds;
|
||||
var() array<Sound> PainSounds;
|
||||
|
||||
Enum ESoundType
|
||||
{
|
||||
EST_Land,
|
||||
EST_CorpseLanded,
|
||||
EST_HitUnderWater,
|
||||
EST_Jump,
|
||||
EST_LandGrunt,
|
||||
EST_Gasp,
|
||||
EST_Drown,
|
||||
EST_BreatheAgain,
|
||||
EST_Dodge,
|
||||
EST_DoubleJump
|
||||
};
|
||||
|
||||
static function Sound GetHitSound()
|
||||
{
|
||||
return default.PainSounds[rand(default.PainSounds.length)];
|
||||
}
|
||||
|
||||
static function Sound GetDeathSound()
|
||||
{
|
||||
return default.DeathSounds[rand(default.DeathSounds.length)];
|
||||
}
|
||||
|
||||
static function Sound GetSound(ESoundType soundType, optional int SurfaceID)
|
||||
{
|
||||
return default.Sounds[int(soundType)];
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
// ifndef _RO_
|
||||
//Sounds(0)=Sound'PlayerSounds.Final.Land'
|
||||
//Sounds(1)=Sound'PlayerSounds.Final.CorpseLanded'
|
||||
}
|
||||
1033
kf_sources/XGame/Classes/xPlayer.uc
Normal file
1033
kf_sources/XGame/Classes/xPlayer.uc
Normal file
File diff suppressed because it is too large
Load diff
47
kf_sources/XGame/Classes/xPlayerReplicationInfo.uc
Normal file
47
kf_sources/XGame/Classes/xPlayerReplicationInfo.uc
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
class xPlayerReplicationInfo extends TeamPlayerReplicationInfo;
|
||||
|
||||
var xUtil.PlayerRecord Rec;
|
||||
|
||||
var bool bForceNoPlayerLights; // OBSOLETE
|
||||
var bool bNoTeamSkins; //OBSOLETE
|
||||
|
||||
simulated function UpdatePrecacheMaterials()
|
||||
{
|
||||
if ( CharacterName == "" )
|
||||
return;
|
||||
rec = class'xUtil'.static.FindPlayerRecord(CharacterName);
|
||||
if ( rec.Species != None )
|
||||
{
|
||||
if ( Team == None )
|
||||
rec.Species.static.LoadResources(rec, Level,self,255);
|
||||
else
|
||||
rec.Species.static.LoadResources(rec, Level,self,Team.TeamIndex);
|
||||
}
|
||||
}
|
||||
|
||||
simulated function SetCharacterName(string S)
|
||||
{
|
||||
Super.SetCharacterName(S);
|
||||
UpdateCharacter();
|
||||
}
|
||||
|
||||
simulated event UpdateCharacter()
|
||||
{
|
||||
Rec = class'xUtil'.static.FindPlayerRecord(CharacterName);
|
||||
}
|
||||
|
||||
simulated function material GetPortrait()
|
||||
{
|
||||
// ifdef _RO_
|
||||
if ( Rec.Portrait == None )
|
||||
return Material(DynamicLoadObject("Engine.BlackTexture", class'Material'));
|
||||
//else
|
||||
//if ( Rec.Portrait == None )
|
||||
// return Material(DynamicLoadObject("PlayerPictures.cDefault", class'Material'));
|
||||
return Rec.Portrait;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bNetNotify=True
|
||||
}
|
||||
78
kf_sources/XGame/Classes/xRosterEntry.uc
Normal file
78
kf_sources/XGame/Classes/xRosterEntry.uc
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
class xRosterEntry extends RosterEntry
|
||||
dependsOn(xUtil) transient;
|
||||
|
||||
// FIXME - xRosterEntry is transient as quick fix for save games. Really should change new(None) below to new(xLevel),
|
||||
// but no easy way to do that without breaking compatibility
|
||||
|
||||
var() xUtil.PlayerRecord PlrProfile;
|
||||
|
||||
static function xRosterEntry CreateRosterEntry(int prIdx)
|
||||
{
|
||||
local xRosterEntry xre;
|
||||
local xUtil.PlayerRecord pr;
|
||||
|
||||
pr = class'xUtil'.static.GetPlayerRecord(prIdx);
|
||||
|
||||
xre = new(None) class'xRosterEntry';
|
||||
xre.PlayerName = pr.DefaultName;
|
||||
xre.PawnClassName = "xGame.xPawn";
|
||||
xre.PlrProfile = pr;
|
||||
xre.Init();
|
||||
|
||||
return xre;
|
||||
}
|
||||
|
||||
static function xRosterEntry CreateRosterEntryCharacter(string CharName)
|
||||
{
|
||||
local xRosterEntry xre;
|
||||
local xUtil.PlayerRecord pr;
|
||||
|
||||
pr = class'xUtil'.static.FindPlayerRecord(CharName);
|
||||
|
||||
xre = new(None) class'xRosterEntry';
|
||||
xre.PlayerName = pr.DefaultName;
|
||||
xre.PawnClassName = "xGame.xPawn";
|
||||
xre.PlrProfile = pr;
|
||||
xre.Init();
|
||||
|
||||
return xre;
|
||||
}
|
||||
|
||||
function PrecacheRosterFor(UnrealTeamInfo T)
|
||||
{
|
||||
if ( PlrProfile.Species == None )
|
||||
{
|
||||
warn("Could not load species "$PlrProfile.Species$" for "$PlrProfile.DefaultName);
|
||||
return;
|
||||
}
|
||||
|
||||
PlrProfile.Species.static.LoadResources( PlrProfile, T.Level, None, T.TeamIndex );
|
||||
}
|
||||
|
||||
function InitBot(Bot B)
|
||||
{
|
||||
B.SetPawnClass(PawnClassName, PlayerName);
|
||||
|
||||
// Set bot attributes based on the PlayerRecord
|
||||
//ifdef _RO_
|
||||
CombatStyle = 0.0;//FClamp(class'Bot'.Default.CombatStyle + float(PlrProfile.CombatStyle),-1,1);
|
||||
Aggressiveness = 0.0;//FClamp(class'Bot'.Default.BaseAggressiveness +float(PlrProfile.Aggressiveness),0,1);
|
||||
Accuracy = 0.0;//FClamp(float(PlrProfile.Accuracy),-4,4);
|
||||
StrafingAbility = 0.0;//FClamp(float(PlrProfile.StrafingAbility),-4,4);
|
||||
Tactics = 0.0;//FClamp(float(PlrProfile.Tactics),-4,4);
|
||||
ReactionTime = 0.0;//FClamp(float(PlrProfile.ReactionTime),-4,4);
|
||||
FavoriteWeapon = None;
|
||||
Jumpiness = 0.0;
|
||||
/*
|
||||
if ( PlrProfile.FavoriteWeapon == "" )
|
||||
FavoriteWeapon = None;
|
||||
else
|
||||
FavoriteWeapon = class<Weapon>(DynamicLoadObject(PlrProfile.FavoriteWeapon,class'Class'));
|
||||
Jumpiness = float(PlrProfile.Jumpiness);
|
||||
*/
|
||||
Super.InitBot(B);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
115
kf_sources/XGame/Classes/xTeamRoster.uc
Normal file
115
kf_sources/XGame/Classes/xTeamRoster.uc
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
class xTeamRoster extends UnrealTeamInfo;
|
||||
|
||||
function PostBeginPlay()
|
||||
{
|
||||
local array<xUtil.PlayerRecord> PlayerRecords;
|
||||
local int i,j;
|
||||
|
||||
Super.PostBeginPlay();
|
||||
|
||||
// add RosterNames to roster
|
||||
class'xUtil'.static.GetPlayerList(PlayerRecords);
|
||||
for ( i=0; i<RosterNames.Length; i++ )
|
||||
{
|
||||
j = Roster.Length;
|
||||
Roster.Length = Roster.Length + 1;
|
||||
Roster[j] = class'xRosterEntry'.Static.CreateRosterEntryCharacter(RosterNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function RosterEntry GetNamedBot(string botName)
|
||||
{
|
||||
local array<xUtil.PlayerRecord> PlayerRecords;
|
||||
local xUtil.PlayerRecord PR;
|
||||
|
||||
class'xUtil'.static.GetPlayerList(PlayerRecords);
|
||||
PR = class'xUtil'.static.FindPlayerRecord(botName);
|
||||
return class'xRosterEntry'.Static.CreateRosterEntry(PR.RecordIndex);
|
||||
}
|
||||
|
||||
function Initialize(int TeamBots)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=Roster.Length; i<TeamBots; i++ )
|
||||
AddRandomPlayer();
|
||||
|
||||
for ( i=0; i<TeamBots; i++ )
|
||||
Roster[i].PrecacheRosterFor(self);
|
||||
}
|
||||
|
||||
function FillPlayerTeam(GameProfile G)
|
||||
{
|
||||
local int i,j, limit;
|
||||
|
||||
limit = Min (G.LINEUP_SIZE, G.GetNumTeammatesForMatch());
|
||||
for ( i=0; i<limit; i++ )
|
||||
{
|
||||
j = Roster.Length;
|
||||
Roster.Length = Roster.Length + 1;
|
||||
Roster[j] = class'xRosterEntry'.Static.CreateRosterEntryCharacter(G.PlayerTeam[G.PlayerLineup[i]]);
|
||||
Roster[j].SetOrders(G.PlayerPositions[G.PlayerLineup[i]]);
|
||||
}
|
||||
TeamSymbolName = G.TeamSymbolName;
|
||||
}
|
||||
|
||||
function RosterEntry GetRandomPlayer()
|
||||
{
|
||||
local array<xUtil.PlayerRecord> PlayerRecords;
|
||||
local int RND,i, num;
|
||||
local int max, total;
|
||||
|
||||
class'xUtil'.static.GetPlayerList(PlayerRecords);
|
||||
for ( i=0; i<PlayerRecords.Length; i++ )
|
||||
max += PlayerRecords[i].BotUse;
|
||||
|
||||
RND = Rand(Max);
|
||||
|
||||
for ( i=0; i<PlayerRecords.Length; i++ )
|
||||
{
|
||||
total += PlayerRecords[i].BotUse;
|
||||
if ( total >= RND )
|
||||
break;
|
||||
}
|
||||
num = i;
|
||||
|
||||
if ( AvailableRecord(PlayerRecords[num].Menu) && !AlreadyExistsEntry(PlayerRecords[num].DefaultName,false) )
|
||||
return class'xRosterEntry'.Static.CreateRosterEntry(num);
|
||||
|
||||
for ( i=num; i<PlayerRecords.Length; i++ )
|
||||
if ( AvailableRecord(PlayerRecords[i].Menu) && (PlayerRecords[i].BotUse > 0) && !AlreadyExistsEntry(PlayerRecords[i].DefaultName,false) )
|
||||
return class'xRosterEntry'.Static.CreateRosterEntry(i);
|
||||
|
||||
for ( i=0; i<num; i++ )
|
||||
if ( AvailableRecord(PlayerRecords[i].Menu) && (PlayerRecords[i].BotUse > 0) && !AlreadyExistsEntry(PlayerRecords[i].DefaultName,false) )
|
||||
return class'xRosterEntry'.Static.CreateRosterEntry(i);
|
||||
|
||||
return GetNamedBot("Jakob");
|
||||
}
|
||||
|
||||
function bool AvailableRecord(string MenuString)
|
||||
{
|
||||
return ( (MenuString ~= "DUP") || (MenuString ~= "SP") || (MenuString ~= "") || (MenuString ~= "UNLOCK") );
|
||||
}
|
||||
|
||||
function bool AlreadyExistsEntry(string CharacterName, bool bNoRecursion)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i=0; i<Roster.Length; i++ )
|
||||
if ( (xRosterEntry(Roster[i]) != None) && (xRosterEntry(Roster[i]).PlayerName == CharacterName) )
|
||||
return true;
|
||||
|
||||
if ( !bNoRecursion && UnrealTeamInfo(Level.Game.OtherTeam(self)) != None )
|
||||
return UnrealTeamInfo(Level.Game.OtherTeam(self)).AlreadyExistsEntry(CharacterName,true);
|
||||
return false;
|
||||
}
|
||||
|
||||
function bool BelongsOnTeam(class<Pawn> PawnClass)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
532
kf_sources/XGame/Classes/xUtil.uc
Normal file
532
kf_sources/XGame/Classes/xUtil.uc
Normal file
|
|
@ -0,0 +1,532 @@
|
|||
class xUtil extends Object
|
||||
native;
|
||||
|
||||
cpptext
|
||||
{
|
||||
static class UDecoText* LoadDecoText( const TCHAR* TextName, INT ColumnCount = DECO_TEXT_MAX_COLUMNS );
|
||||
void GetPlayerList();
|
||||
}
|
||||
|
||||
var() protected const string SectionName;
|
||||
var() protected const string FileExtension;
|
||||
|
||||
struct native init PlayerRecord
|
||||
{
|
||||
var() String DefaultName; // Character's name, also used as selection tag
|
||||
var() class<SpeciesType> Species; // Species
|
||||
var() String MeshName; // Mesh type
|
||||
var() String BodySkinName; // Body texture name
|
||||
var() String FaceSkinName; // Face texture name
|
||||
var() Material Portrait; // Menu picture
|
||||
//ifdef _RO_
|
||||
var() Material LockedPortrait; // Locked Menu picture(DLC support)
|
||||
var() String AttachedEmitter;
|
||||
var() Name BoneName;
|
||||
var() float XOffset;
|
||||
var() float YOffset;
|
||||
var() float ZOffset;
|
||||
var() bool bWhileMoving;
|
||||
//endif
|
||||
var() String TextName; // Decotext reference
|
||||
var() String VoiceClassName; // voice pack class name - overrides species default
|
||||
var string Sex;
|
||||
// var string Accuracy;
|
||||
// var string Aggressiveness;
|
||||
// var string StrafingAbility;
|
||||
// var string CombatStyle;
|
||||
// var string Tactics;
|
||||
// var string ReactionTime;
|
||||
// var string Jumpiness;
|
||||
var string Race;
|
||||
// var string FavoriteWeapon;
|
||||
var string Menu; // info for menu displaying characters
|
||||
var string Skeleton; // skeleton mesh, if it differs from the species default
|
||||
var() const int RecordIndex;
|
||||
var string Ragdoll;
|
||||
var byte BotUse; // weighting for use by bots
|
||||
var bool UseSpecular;
|
||||
var bool TeamFace;
|
||||
var bool ZeroWeaponOffsets;
|
||||
};
|
||||
|
||||
struct MutatorRecord
|
||||
{
|
||||
var() const class<Mutator> mutClass;
|
||||
var() const string ClassName;
|
||||
var() const string FriendlyName;
|
||||
var() const string Description;
|
||||
var() const string IconMaterialName;
|
||||
var() const string ConfigMenuClassName;
|
||||
var() const string GroupName;
|
||||
var() const int RecordIndex;
|
||||
var const byte bActivated;
|
||||
};
|
||||
|
||||
var() private const transient CachePlayers CachedPlayerList;
|
||||
|
||||
var localized string NoPreference, FavoriteWeapon;
|
||||
var localized string AgilityString,TacticsString,AccuracyString,AggressivenessString;
|
||||
|
||||
native(562) final simulated static function GetPlayerList(out array<PlayerRecord> PlayerRecords);
|
||||
native(563) final simulated static function PlayerRecord GetPlayerRecord(int index);
|
||||
native(564) final simulated static function PlayerRecord FindUPLPlayerRecord(string charName);
|
||||
native final static function DecoText LoadDecoText(string PackageName, string DecoTextName, optional int ColumnCount);
|
||||
|
||||
// Deprecated - use CacheManager.GetMutatorList instead.
|
||||
final static function GetMutatorList( array<MutatorRecord> MutatorRecords )
|
||||
{
|
||||
}
|
||||
|
||||
final simulated static function PlayerRecord FindPlayerRecord(string charName)
|
||||
{
|
||||
local PlayerRecord PRE;
|
||||
local class<PlayerRecordClass> PRClass;
|
||||
|
||||
PRE = FindUPLPlayerRecord(charName);
|
||||
if ( PRE.DefaultName != charName )
|
||||
{
|
||||
// try to dynamic load downloaded character class object
|
||||
PRClass = class<PlayerRecordClass>(DynamicLoadObject(charname$"mod."$charName,class'Class',true));
|
||||
if ( PRClass != None )
|
||||
{
|
||||
PRE = PRClass.Static.FillPlayerRecord();
|
||||
PRE.DefaultName = charname;
|
||||
}
|
||||
}
|
||||
return PRE;
|
||||
}
|
||||
|
||||
final simulated static function int GetSalaryFor(PlayerRecord PRE)
|
||||
{
|
||||
local float Salary;
|
||||
|
||||
Salary = 500;
|
||||
//ifdef _RO_
|
||||
return int(Salary);
|
||||
/*
|
||||
if ( PRE.FavoriteWeapon == "" )
|
||||
Salary += 5;
|
||||
|
||||
Salary += 30 * float(PRE.Jumpiness);
|
||||
|
||||
Salary += 150 * float(PRE.Accuracy);
|
||||
if ( float(PRE.Accuracy) > 0.3 )
|
||||
Salary += 250 * (float(PRE.Accuracy) - 0.3);
|
||||
Salary += 70 * float(PRE.Tactics);
|
||||
if ( float(PRE.Tactics) > 0.5 )
|
||||
Salary += 100 * (float(PRE.Tactics) - 0.5);
|
||||
Salary += 100 * float(PRE.StrafingAbility);
|
||||
if ( float(PRE.StrafingAbility) > 0.5 )
|
||||
Salary += 100 * (float(PRE.StrafingAbility) - 0.5);
|
||||
Salary -= 5 * Abs(float(PRE.Aggressiveness));
|
||||
Salary -= 5 * Abs(float(PRE.CombatStyle));
|
||||
return int(Salary);
|
||||
*/
|
||||
}
|
||||
|
||||
// returns human-readable version of the favorite weapon, or 'no preference'
|
||||
final simulated static function string GetFavoriteWeaponFor(PlayerRecord PRE)
|
||||
{
|
||||
//local class<Weapon> WeaponClass;
|
||||
//ifdef _RO_
|
||||
/*
|
||||
if ( PRE.FavoriteWeapon != "" )
|
||||
{
|
||||
WeaponClass = class<Weapon>(DynamicLoadObject(PRE.FavoriteWeapon, class'Class'));
|
||||
if (WeaponClass != None)
|
||||
return Default.FavoriteWeapon@WeaponClass.default.ItemName;
|
||||
}
|
||||
*/
|
||||
return Default.NoPreference;
|
||||
}
|
||||
|
||||
final simulated static function int RatingModifier(string CharacterName)
|
||||
{
|
||||
local int Hash;
|
||||
|
||||
Hash = Asc(CharacterName);
|
||||
if ( Hash == 2 )
|
||||
Hash = 1;
|
||||
return ( Hash%5 - 2);
|
||||
}
|
||||
|
||||
final simulated static function int AccuracyRating(PlayerRecord PRE)
|
||||
{
|
||||
//ifdef _RO_
|
||||
return 0;
|
||||
/*
|
||||
if ( 2 * float(PRE.Accuracy) < -1 )
|
||||
return ( 55 + 8 * FMax(-7,2 * float(PRE.Accuracy)) );
|
||||
if ( 2 * float(PRE.Accuracy) == 0 )
|
||||
return ( 75 - RatingModifier(PRE.DefaultName) );
|
||||
if ( 2 * float(PRE.Accuracy) < 1 )
|
||||
return ( 75 + 20 * 2 * float(PRE.Accuracy) - 0.5 * RatingModifier(PRE.DefaultName) );
|
||||
return Min(100, 95 + 2 * float(PRE.Accuracy) );
|
||||
*/
|
||||
}
|
||||
|
||||
final simulated static function int AgilityRating(PlayerRecord PRE)
|
||||
{
|
||||
//local float Add;
|
||||
|
||||
//ifdef _RO_
|
||||
return 0;
|
||||
/*
|
||||
Add = 3 * float(PRE.Jumpiness);
|
||||
if ( float(PRE.StrafingAbility) < -1 )
|
||||
return ( Add + 58 + 8 * FMax(-7,float(PRE.StrafingAbility)) );
|
||||
if ( (Add == 0) && (float(PRE.StrafingAbility) == 0) )
|
||||
return ( 75 + 0.5 * RatingModifier(PRE.DefaultName) );
|
||||
if ( float(PRE.StrafingAbility) < 1 )
|
||||
return ( Add + 75 + 17 * float(PRE.StrafingAbility) - 0.5 * RatingModifier(PRE.DefaultName) );
|
||||
return Min(100, Add + 92 + float(PRE.StrafingAbility) );
|
||||
*/
|
||||
}
|
||||
|
||||
final simulated static function int TacticsRating(PlayerRecord PRE)
|
||||
{
|
||||
/*
|
||||
ifdef _RO_
|
||||
if ( float(PRE.Tactics) < -1 )
|
||||
return ( 55 + 8 * FMax(-7,float(PRE.Tactics)) );
|
||||
if ( float(PRE.Tactics) == 0 )
|
||||
return ( 75 + RatingModifier(PRE.DefaultName) );
|
||||
if ( float(PRE.Tactics) < 1 )
|
||||
return ( 75 + 20 * float(PRE.Tactics) + 0.5 * RatingModifier(PRE.DefaultName) );
|
||||
return Min(100, 95 + float(PRE.Tactics) );
|
||||
*/
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
final simulated static function int AggressivenessRating(PlayerRecord PRE)
|
||||
{
|
||||
//ifdef _RO_
|
||||
return 0.0;//Clamp(73 + 25 * (float(PRE.Aggressiveness) + float(PRE.CombatStyle)) + 0.5 * RatingModifier(PRE.DefaultName),0,100);
|
||||
}
|
||||
///////////////////// TEAM EVALUATION FUNCTIONS /////////////////////
|
||||
// These functions used to provide average values for team, or just lineup
|
||||
// if optional bool is set
|
||||
final simulated static function int TeamAccuracyRating ( GameProfile GP, optional int lineupsize) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
local int numchars;
|
||||
|
||||
numchars = Max(GP.LINEUP_SIZE, lineupsize);
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < numchars; i++ ) {
|
||||
count+=1.0;
|
||||
retval += AccuracyRating(FindPlayerRecord(GP.PlayerTeam[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = AccuracyRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamInfoAccuracyRating ( UnrealTeamInfo UT, optional int lineupsize) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
local int numchars;
|
||||
|
||||
numchars = Max(UT.RosterNames.Length, lineupsize);
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < numchars; i++ ) {
|
||||
count+=1.0;
|
||||
retval += AccuracyRating(FindPlayerRecord(UT.RosterNames[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = AccuracyRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamArrayAccuracyRating ( array<string> Players ) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < Players.length; i++ ) {
|
||||
count+=1.0;
|
||||
retval += AccuracyRating(FindPlayerRecord(Players[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = AccuracyRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamAggressivenessRating ( GameProfile GP, optional int lineupsize ) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
local int numchars;
|
||||
|
||||
numchars = Max(GP.LINEUP_SIZE, lineupsize);
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < numchars; i++ ) {
|
||||
count+=1.0;
|
||||
retval += AggressivenessRating(FindPlayerRecord(GP.PlayerTeam[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = AggressivenessRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamInfoAggressivenessRating ( UnrealTeamInfo UT, optional int lineupsize ) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
local int numchars;
|
||||
|
||||
numchars = Max(UT.RosterNames.Length, lineupsize);
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < numchars; i++ ) {
|
||||
count+=1.0;
|
||||
retval += AggressivenessRating(FindPlayerRecord(UT.RosterNames[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = AggressivenessRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamArrayAggressivenessRating ( array<string> Players ) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < Players.length; i++ ) {
|
||||
count+=1.0;
|
||||
retval += AggressivenessRating(FindPlayerRecord(Players[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = AggressivenessRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamAgilityRating ( GameProfile GP, optional int lineupsize ) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
local int numchars;
|
||||
|
||||
numchars = Max(GP.LINEUP_SIZE, lineupsize);
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < numchars; i++ ) {
|
||||
count+=1.0;
|
||||
retval += AgilityRating(FindPlayerRecord(GP.PlayerTeam[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = AgilityRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamInfoAgilityRating ( UnrealTeamInfo UT, optional int lineupsize ) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
local int numchars;
|
||||
|
||||
numchars = Max(UT.RosterNames.Length, lineupsize);
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < numchars; i++ ) {
|
||||
count+=1.0;
|
||||
retval += AgilityRating(FindPlayerRecord(UT.RosterNames[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = AgilityRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamArrayAgilityRating ( array<string> Players ) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < Players.length; i++ ) {
|
||||
count+=1.0;
|
||||
retval += AgilityRating(FindPlayerRecord(Players[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = AgilityRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamTacticsRating ( GameProfile GP, optional int lineupsize ) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
local int numchars;
|
||||
|
||||
numchars = Max(GP.LINEUP_SIZE, lineupsize);
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < numchars; i++ ) {
|
||||
count+=1.0;
|
||||
retval += TacticsRating(FindPlayerRecord(GP.PlayerTeam[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = TacticsRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamInfoTacticsRating ( UnrealTeamInfo UT, optional int lineupsize ) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
local int numchars;
|
||||
|
||||
numchars = Max(UT.RosterNames.Length, lineupsize);
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < numchars; i++ ) {
|
||||
count+=1.0;
|
||||
retval += TacticsRating(FindPlayerRecord(UT.RosterNames[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = TacticsRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int TeamArrayTacticsRating ( array<string> Players ) {
|
||||
local int retval;
|
||||
local float count;
|
||||
local int i;
|
||||
local PlayerRecord PR;
|
||||
|
||||
count = 0; retval = 0;
|
||||
for ( i=0; i < Players.length; i++ ) {
|
||||
count+=1.0;
|
||||
retval += TacticsRating(FindPlayerRecord(Players[i]));
|
||||
}
|
||||
|
||||
if ( count > 0 ) {
|
||||
retval = retval / count;
|
||||
} else {
|
||||
retval = TacticsRating(PR); // purposefully uninitialized
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int GetTeamSalaryFor ( GameProfile GP, optional int lineupsize ) {
|
||||
local int retval;
|
||||
local int i;
|
||||
local int numchars;
|
||||
|
||||
numchars = Max(GP.LINEUP_SIZE, lineupsize);
|
||||
retval = 0;
|
||||
for ( i=0; i < numchars; i++ ) {
|
||||
retval += GetSalaryFor(FindPlayerRecord(GP.PlayerTeam[i]));
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
final simulated static function int GetTeamInfoSalaryFor ( UnrealTeamInfo UT, optional int lineupsize ) {
|
||||
local int retval;
|
||||
local int i;
|
||||
local int numchars;
|
||||
|
||||
numchars = Max(UT.RosterNames.Length, lineupsize);
|
||||
retval = 0;
|
||||
for ( i=0; i < numchars; i++ ) {
|
||||
retval += GetSalaryFor(FindPlayerRecord(UT.RosterNames[i]));
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
simulated static function array<class<Mutator> > GetMutatorClasses(optional array<string> MutClassNames)
|
||||
{
|
||||
local int i, j;
|
||||
local array<class<Mutator> > Arr;
|
||||
local array<CacheManager.MutatorRecord> LocalRecords;
|
||||
|
||||
class'CacheManager'.static.GetMutatorList(LocalRecords);
|
||||
|
||||
if (MutClassNames.Length == 0)
|
||||
Arr.Length = LocalRecords.Length;
|
||||
|
||||
for (i = 0; i < LocalRecords.Length; i++)
|
||||
{
|
||||
if (MutClassNames.Length == 0)
|
||||
{
|
||||
Arr[i] = class<Mutator>(DynamicLoadObject(LocalRecords[i].ClassName, class'Class'));
|
||||
continue;
|
||||
}
|
||||
|
||||
for (j = 0; j < MutClassNames.Length; j++)
|
||||
{
|
||||
if (MutClassNames[j] ~= LocalRecords[i].ClassName)
|
||||
{
|
||||
Arr[Arr.Length] = class<Mutator>(DynamicLoadObject(LocalRecords[i].ClassName, class'Class'));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Arr;
|
||||
}
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
NoPreference="No Weapon Preference"
|
||||
FavoriteWeapon="Favorite Weapon:"
|
||||
AgilityString="Agility:"
|
||||
TacticsString="Team Tactics:"
|
||||
AccuracyString="Accuracy:"
|
||||
AggressivenessString="Aggression:"
|
||||
}
|
||||
33
kf_sources/XGame/Classes/xVictimMessage.uc
Normal file
33
kf_sources/XGame/Classes/xVictimMessage.uc
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
class xVictimMessage extends LocalMessage;
|
||||
|
||||
var(Message) localized string YouWereKilledBy, KilledByTrailer;
|
||||
|
||||
static function string GetString(
|
||||
optional int Switch,
|
||||
optional PlayerReplicationInfo RelatedPRI_1,
|
||||
optional PlayerReplicationInfo RelatedPRI_2,
|
||||
optional Object OptionalObject
|
||||
)
|
||||
{
|
||||
if (RelatedPRI_1 == None)
|
||||
return "";
|
||||
|
||||
if (RelatedPRI_1.PlayerName != "")
|
||||
return Default.YouWereKilledBy@RelatedPRI_1.PlayerName$Default.KilledByTrailer;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bFadeMessage=True
|
||||
bIsUnique=True
|
||||
Lifetime=6
|
||||
|
||||
DrawColor=(R=255,G=0,B=0,A=255)
|
||||
FontSize=0
|
||||
|
||||
YouWereKilledBy="You were killed by"
|
||||
KilledByTrailer="!"
|
||||
|
||||
StackMode=SM_Down
|
||||
PosY=0.10
|
||||
}
|
||||
182
kf_sources/XGame/Classes/xVoicePack.uc
Normal file
182
kf_sources/XGame/Classes/xVoicePack.uc
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
class xVoicePack extends TeamVoicePack;
|
||||
|
||||
var EVoiceGender VoiceGender;
|
||||
|
||||
static function byte GetMessageIndex(name PhraseName)
|
||||
{
|
||||
local float r;
|
||||
r = FRand();
|
||||
|
||||
if ( PhraseName == 'GOTENEMYFLAG' )
|
||||
return 2;
|
||||
if ( PhraseName == 'INJURED' )
|
||||
{
|
||||
if ( r < 0.3 )
|
||||
return 6;
|
||||
else if ( r < 0.5 )
|
||||
return 13;
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
else if ( PhraseName == 'GOTOURFLAG' )
|
||||
return 8;
|
||||
else if ( PhraseName == 'NEEDBACKUP' )
|
||||
{
|
||||
if(r<0.5)
|
||||
return 13;
|
||||
else
|
||||
return 22;
|
||||
}
|
||||
else if ( PhraseName == 'NEEDOURFLAG' )
|
||||
return 1;
|
||||
else if ( PhraseName == 'ENEMYFLAGCARRIERHERE' )
|
||||
return 12;
|
||||
else if ( PhraseName == 'ENEMYBALLCARRIERHERE' )
|
||||
return 15;
|
||||
else if ( PhraseName == 'INCOMING' )
|
||||
{
|
||||
if(r < 0.33)
|
||||
return 20;
|
||||
else if(r < 0.66)
|
||||
return 21;
|
||||
else
|
||||
return 14;
|
||||
}
|
||||
else if ( PhraseName == 'GOTYOURBACK' )
|
||||
return 3;
|
||||
else if ( PhraseName == 'MANDOWN' )
|
||||
return 5;
|
||||
else if ( PhraseName == 'INPOSITION' )
|
||||
return 9;
|
||||
else if ( PhraseName == 'ONMYWAY' )
|
||||
return 10;
|
||||
}
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
numAcks=4
|
||||
AckString(0)="Affirmative"
|
||||
AckString(1)="Got It"
|
||||
AckString(2)="I'm On It"
|
||||
AckString(3)="Roger"
|
||||
|
||||
numFFires=3
|
||||
FFireString(0)="I'm On Your Team!"
|
||||
FFireString(1)="I'm On Your Team, Idiot!"
|
||||
FFireAbbrev(1)="Your Team, Idiot!"
|
||||
FFireString(2)="Same Team!"
|
||||
|
||||
numTaunts=21
|
||||
TauntString(0)="And Stay Down"
|
||||
TauntString(1)="Anyone Else Want Some?"
|
||||
TauntString(2)="Boom!"
|
||||
TauntString(3)="BURN Baby"
|
||||
TauntString(4)="Die Bitch"
|
||||
TauntString(5)="Eat THAT"
|
||||
TauntString(6)="You Fight Like Nali"
|
||||
TauntString(7)="Is That Your Best?"
|
||||
TauntString(8)="Kiss My Ass"
|
||||
TauntString(9)="Loser"
|
||||
TauntString(10)="MY House"
|
||||
TauntString(11)="Next!"
|
||||
TauntString(12)="Oh YEAH!"
|
||||
TauntString(13)="Ownage"
|
||||
TauntString(14)="Seeya"
|
||||
TauntString(15)="That HAD To Hurt"
|
||||
TauntString(16)="Useless"
|
||||
TauntString(17)="You Play Like A Girl"
|
||||
TauntString(18)="You Be Dead"
|
||||
TauntString(19)="You Like That?"
|
||||
TauntString(20)="You Whore"
|
||||
|
||||
MatureTaunt(4)=1
|
||||
MatureTaunt(8)=1
|
||||
MatureTaunt(20)=1
|
||||
|
||||
HumanOnlyTaunt(6)=1
|
||||
HumanOnlyTaunt(17)=1
|
||||
|
||||
OrderString(0)="Defend the base"
|
||||
OrderAbbrev(0)="Defend"
|
||||
OrderString(1)="Hold this position"
|
||||
OrderString(2)="Assault the base"
|
||||
OrderAbbrev(2)="Attack"
|
||||
OrderString(3)="Cover me"
|
||||
OrderString(4)="Search and destroy"
|
||||
OrderString(10)="Take their flag"
|
||||
OrderString(11)="Defend the flag"
|
||||
OrderString(12)="Attack Alpha"
|
||||
OrderString(13)="Attack Bravo"
|
||||
OrderString(14)="Get the ball"
|
||||
|
||||
OtherString(0)="Base is undefended!"
|
||||
OtherString(1)="Somebody get our flag back!"
|
||||
OtherAbbrev(1)="Get our flag!"
|
||||
OtherString(2)="I've got the flag"
|
||||
OtherAbbrev(2)="Got the flag"
|
||||
OtherString(3)="I've got your back"
|
||||
OtherAbbrev(3)="Got your back"
|
||||
OtherString(4)="I'm hit!"
|
||||
OtherString(5)="Man down!"
|
||||
OtherString(6)="I'm all alone here %l"
|
||||
OtherAbbrev(6)="All alone!"
|
||||
OtherString(7)="Negative!"
|
||||
OtherString(8)="I've got our flag"
|
||||
OtherAbbrev(8)="Got our flag"
|
||||
OtherString(9)="I'm in position %l"
|
||||
OtherAbbrev(9)="In position"
|
||||
DisplayOtherMessage(9)=1
|
||||
OtherString(10)="I'm going in!"
|
||||
OtherDelayed(10)=1
|
||||
OtherString(11)="Area is secure"
|
||||
OtherString(12)="Enemy flag carrier is %l"
|
||||
OtherAbbrev(12)="Enemy flag carrier"
|
||||
DisplayOtherMessage(12)=1
|
||||
OtherString(13)="I need some backup %l"
|
||||
OtherAbbrev(13)="Need backup"
|
||||
OtherString(14)="Incoming!"
|
||||
OtherString(15)="Enemy ball carrier is %l"
|
||||
OtherAbbrev(15)="Enemy ball carrier"
|
||||
DisplayOtherMessage(15)=1
|
||||
OtherString(16)="Alpha secure!"
|
||||
OtherString(17)="Bravo secure!"
|
||||
OtherString(18)="Attack Alpha"
|
||||
OtherString(19)="Attack Bravo"
|
||||
OtherString(20)="The base is under attack %l"
|
||||
OtherAbbrev(20)="Base under attack"
|
||||
DisplayOtherMessage(20)=1
|
||||
OtherString(21)="We're being overrun %l!"
|
||||
OtherAbbrev(21)="Being overrun"
|
||||
DisplayOtherMessage(21)=1
|
||||
OtherString(22)="Under heavy attack %l"
|
||||
OtherAbbrev(22)="Under heavy attack"
|
||||
DisplayOtherMessage(22)=1
|
||||
OtherString(23)="Defend point Alpha"
|
||||
OtherString(24)="Defend point Bravo"
|
||||
OtherString(25)="Get The Ball"
|
||||
OtherString(26)="I'm on defense"
|
||||
OtherString(27)="I'm on offense"
|
||||
OtherString(28)="Take point Alpha"
|
||||
OtherString(29)="Take point Bravo"
|
||||
OtherString(30)="Medic"
|
||||
OtherString(31)="Nice"
|
||||
|
||||
OtherMesgGroup(0)="CTFGame"
|
||||
OtherMesgGroup(1)="CTFGame"
|
||||
OtherMesgGroup(2)="CTFGame"
|
||||
OtherMesgGroup(8)="CTFGame"
|
||||
OtherMesgGroup(12)="CTFGame"
|
||||
OtherMesgGroup(15)="BombingRun"
|
||||
OtherMesgGroup(16)="DoubleDom"
|
||||
OtherMesgGroup(17)="DoubleDom"
|
||||
OtherMesgGroup(18)="DoubleDom"
|
||||
OtherMesgGroup(19)="DoubleDom"
|
||||
OtherMesgGroup(20)="CTFGame"
|
||||
OtherMesgGroup(23)="DoubleDom"
|
||||
OtherMesgGroup(24)="DoubleDom"
|
||||
OtherMesgGroup(25)="BombingRun"
|
||||
OtherMesgGroup(28)="DoubleDom"
|
||||
OtherMesgGroup(29)="DoubleDom"
|
||||
|
||||
VoiceGender=VG_None
|
||||
}
|
||||
109
kf_sources/XGame/Classes/xWeaponAttachment.uc
Normal file
109
kf_sources/XGame/Classes/xWeaponAttachment.uc
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
class xWeaponAttachment extends WeaponAttachment;
|
||||
|
||||
// player animation specification
|
||||
var() bool bHeavy;
|
||||
var() bool bRapidFire;
|
||||
var() bool bAltRapidFire;
|
||||
var vector mHitNormal;
|
||||
var actor mHitActor;
|
||||
var Weapon LitWeapon;
|
||||
|
||||
simulated function GetHitInfo()
|
||||
{
|
||||
local vector HitLocation, Offset;
|
||||
|
||||
// if standalone, already have valid HitActor and HitNormal
|
||||
if ( Level.NetMode == NM_Standalone )
|
||||
return;
|
||||
Offset = 20 * Normal(Instigator.Location - mHitLocation);
|
||||
mHitActor = Trace(HitLocation,mHitNormal,mHitLocation-Offset,mHitLocation+Offset, false);
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
}
|
||||
|
||||
simulated function Hide(bool NewbHidden)
|
||||
{
|
||||
bHidden = NewbHidden;
|
||||
}
|
||||
|
||||
simulated event ThirdPersonEffects()
|
||||
{
|
||||
if (Level.NetMode != NM_DedicatedServer)
|
||||
{
|
||||
if ( xPawn(Instigator) == None )
|
||||
return;
|
||||
if (FlashCount == 0)
|
||||
{
|
||||
xPawn(Instigator).StopFiring();
|
||||
}
|
||||
else if (FiringMode == 0)
|
||||
{
|
||||
xPawn(Instigator).StartFiring(bHeavy, bRapidFire);
|
||||
}
|
||||
else
|
||||
{
|
||||
xPawn(Instigator).StartFiring(bHeavy, bAltRapidFire);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
simulated function PostNetBeginPlay()
|
||||
{
|
||||
if ( Instigator != None && xPawn(Instigator) != None )
|
||||
{
|
||||
xPawn(Instigator).SetWeaponAttachment(self);
|
||||
}
|
||||
}
|
||||
|
||||
simulated function Vector GetTipLocation()
|
||||
{
|
||||
local Coords C;
|
||||
C = GetBoneCoords('tip');
|
||||
return C.Origin;
|
||||
}
|
||||
|
||||
simulated function WeaponLight()
|
||||
{
|
||||
if ( (FlashCount > 0) && !Level.bDropDetail && (Instigator != None)
|
||||
&& ((Level.TimeSeconds - LastRenderTime < 0.2) || (PlayerController(Instigator.Controller) != None)) )
|
||||
{
|
||||
if ( Instigator.IsFirstPerson() )
|
||||
{
|
||||
LitWeapon = Instigator.Weapon;
|
||||
LitWeapon.bDynamicLight = true;
|
||||
}
|
||||
else
|
||||
bDynamicLight = true;
|
||||
SetTimer(0.15, false);
|
||||
}
|
||||
else
|
||||
Timer();
|
||||
}
|
||||
|
||||
function InitFor(Inventory I)
|
||||
{
|
||||
Super.InitFor(I);
|
||||
|
||||
if ( xPawn(I.Instigator) == None )
|
||||
return;
|
||||
|
||||
if ( xPawn(I.Instigator).bClearWeaponOffsets )
|
||||
SetRelativeLocation(vect(0,0,0));
|
||||
}
|
||||
|
||||
simulated function Timer()
|
||||
{
|
||||
if ( LitWeapon != None )
|
||||
{
|
||||
LitWeapon.bDynamicLight = false;
|
||||
LitWeapon = None;
|
||||
}
|
||||
bDynamicLight = false;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DrawScale=0.4
|
||||
bHeavy=false
|
||||
bRapidFire=false
|
||||
bAltRapidFire=false
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue