Yes, the code is in plain text at the end of the file. I believe the editor has a way to export it back to source files? Here's the first few.
Code:
class VilBotController extends UTBot;
Code:
/*
BattleTeamArena Copyright (C) 2007-2008 Nico de Vries.
This file is part of BattleTeamArena.
BattleTeamArena is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
*/
class VilCopSpawnMessage extends UTTimerMessage;
Code:
class VilGetaway_SeqAction extends SequenceAction;
// var() Object myObject;
var() Controller Escapee;
event Activated()
{
local Villainous Vil;
Vil = Villainous(GetWorldInfo().Game);
Vil.KismetHack("VilGetaway");
//Vil.VilGRI (WorldInfo.GRI).bGetawayTriggered = true;
}
Code:
/**
* UTKillZVolume
* Kills pawns using KillZ interface
*
*
* Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
*/
class VilGotawayVolume extends PhysicsVolume
placeable;
event PawnEnteredVolume(Pawn Other)
{
Gotaway(Other);
}
simulated event Gotaway(Pawn Other)
{
if ( VilPawn(Other) != None )
{
//Other.FellOutOfWorld(none);
VilPRI (Other.PlayerReplicationInfo).bGotAway = true;
VilPawn(Other).FellOutOfWorld(none);
VilPawn(Other).bStopDeathCamera = true;
}
}
Code:
/*
Villainous Copyright (C) 2007 Kyle Staves.
This file is the work of Kyle Staves, inDevs.net. However, much of the work
found throughout this modification is derived from the work of Nico de Vries
on his BattleTeamArena gametype modifications. I do not claim to have authored
every line of code, and I will do my best to comment chunks derived from other's
work (excluding that of Epic Games).
This file is part of Villainous.
Villainous is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
This file also contains code that is derived from code which is
Copyright 1998-2007 Epic Games, Inc. All Rights Reserved. That part
of the code is covered by the Epic license and not by the GPL.
*/
class VilGRI extends UTGameReplicationInfo config (Villainous);
// Server Side Data
var int ElapsedTimeRoundOffset;
// Client Side Data
var VilPlayerController LocalPlayerController;
var int RemainingRoundTime;
// Data replicated from the server to the client
var int RemainingTimeRoundOffset;
var int CopSpawnTime;
var bool bGetawayTriggered;
var bool bRoundIsOver;
var bool bGameIsOver;
var globalconfig int VilRoundLength;
var globalconfig int VilCopSpawnPulse;
replication
{
if (Role == ROLE_Authority)
RemainingTimeRoundOffset, CopSpawnTime, bRoundIsOver, bGameIsOver,
bGetawayTriggered, VilRoundLength, VilCopSpawnPulse;
}
simulated function Timer() // Derived from UTGameReplicationInfo.uc
{
local byte TimerMessageIndex;
local PlayerController PC;
Super (GameReplicationInfo).Timer(); // Super.Super - from BTA, I have no idea what this comment means, should learn
if (VilGRI (WorldInfo.GRI).VilRoundLength == 0) VilGRI (WorldInfo.GRI).VilRoundLength = 60;
if (VilGRI (WorldInfo.GRI).VilCopSpawnPulse == 0) VilGRI (WorldInfo.GRI).VilCopSpawnPulse = 15;
Villainous (WorldInfo.Game).CheckEndHeist();
if ( WorldInfo.NetMode == NM_Client )
{
if ( bWarmupRound && RemainingTime > 0 )
RemainingTime--;
}
if (WorldInfo.NetMode != NM_DedicatedServer && MapVoteTimeRemaining > 0)
{
MapVoteTimeRemaining--;
}
if ( bGetawayTriggered )
{
RemainingRoundTime = Min (300, Max (-1, RemainingTime - RemainingTimeRoundOffset));
}
else RemainingRoundTime = VilRoundLength;
// check if we should broadcast a time countdown message, subset of UTGameReplicationInfo otherwise it would become annoying
if (WorldInfo.NetMode != NM_DedicatedServer && !bRoundIsOver && (bMatchHasBegun || bWarmupRound) && !bStopCountDown && !bMatchIsOver && Winner == None)
{
// Kyle: Round timer/message
switch (RemainingRoundTime)
{
case 0:
if (RemainingTime!=0) TimerMessageIndex = 17; // No double overtime message
break;
case 30:
TimerMessageIndex = 12;
break;
default:
if (RemainingRoundTime <= 5 && RemainingRoundTime > 0)
{
TimerMessageIndex = RemainingRoundTime;
}
break;
}
if (TimerMessageIndex != 0 && bGetawayTriggered)
{
foreach LocalPlayerControllers(class'PlayerController', PC)
{
PC.ReceiveLocalizedMessage(class'VilTimerMessage', TimerMessageIndex);
}
}
// CopSpawn Counter
if (CopSpawnTime <= 0) CopSpawnTime = VilCopSpawnPulse; else CopSpawnTime--;
}
}
/** determines whether we should process the given player's character data into a mesh
* and if so, gets that started
* @note: this can be called multiple times for a given PRI if more info is received (e.g. Team)
* @param PRI - the PlayerReplicationInfo that holds the data to process
* @param bTeamChange - if this is the result of a team change
*/
simulated singular function ProcessCharacterData(UTPlayerReplicationInfo PRI, optional bool bTeamChange)
{
local int i;
local bool bPRIAlreadyPresent, bDefaultCharParts, bLocalTeamChange;
local CreateCharStatus NewCharStatus;
local UTProcessedCharacterCache CharacterCache, OldestCharacterCache;
local UTPlayerReplicationInfo ReplacementUTPRI;
/* Kyle: unkilling this for now */
if (SkipAllProcessing())
{
return;
}
// Do nothing if CharData is not filled in
/* Kyle: unkilling this again */
if((PRI.CharacterData.FamilyID == "" || PRI.CharacterData.FamilyID == "NONE") && !PRI.IsLocalPlayerPRI())
{
return;
}
// see if this character is cached
foreach DynamicActors(class'UTProcessedCharacterCache', CharacterCache)
{
if (CharacterCache.GetCachedCharacter(PRI))
{
TotalPlayersSetToProcess++;
return;
}
else if (OldestCharacterCache != None)
{
OldestCharacterCache = CharacterCache;
}
}
// Kyle: kill this if we need to?
// we need to make sure we have called StartProcessingCharacterData() before we actually do anything
if (IsTimerActive('StartProcessingCharacterData'))
{
if (GetTimerRate('StartProcessingCharacterData') > 0.001)
{
SetTimer(0.001, false, 'StartProcessingCharacterData');
}
return;
}
/* Kyle: killing it for now
if(bProcessedInitialCharacters && bTeamChange && PRI.IsLocalPlayerPRI())
{
if( PRI.UpdateCustomTeamSkin() )
{
bLocalTeamChange = TRUE;
}
}
*/
// We don't allow non-local characters to be created once gameplay has begun.
// also skip nonlocal spectators (spectators can join later, so build local mesh anyway so at least player sees his/her own custom mesh)
/* Kyle: this is probably the main thing to kill
if (((bProcessedInitialCharacters && !WorldInfo.IsInSeamlessTravel()) || PRI.bOnlySpectator || bForceDefaultCharacter) && !PRI.IsLocalPlayerPRI())
{
ReplacementUTPRI = FindExistingMeshForFamily(PRI.CharacterData.FamilyID, PRI.GetTeamNum(), PRI);
if(ReplacementUTPRI != None)
{
PRI.SetCharacterMesh(ReplacementUTPRI.CharacterMesh, true);
PRI.CharPortrait = ReplacementUTPRI.CharPortrait;
}
else
{
PRI.SetCharacterMesh(None);
}
return;
}
*/
/* Kyle: Lets unkill this again... */
// Decrement count if this is a local player.
if(PRI.IsLocalPlayerPRI())
{
LocalPCsLeftToProcess.RemoveItem(PlayerController(PRI.Owner));
}
// If this isn't a local player, don't process it if we haven't got space.
else if((TotalPlayersSetToProcess + LocalPCsLeftToProcess.length) >= class'UTGame'.default.MaxCustomChars)
{
PRI.SetCharacterMesh(None);
return;
}
// Kyle: Disabling the if statement to see if SendCharacterProcessingNotification helps get replication functioning
//if (!bProcessedInitialCharacters)
//{
// make sure local players have been informed if we're running the initial processing
SendCharacterProcessingNotification(true);
//}
// remove any previous mesh and arms
if(!bLocalTeamChange)
{
PRI.SetCharacterMesh(None);
}
// Kyle: unkilled this function
PRI.SetFirstPersonArmInfo(None, None);
// See if the parts you picked are actually the default char
bDefaultCharParts = (class'UTCustomChar_Data'.static.CharDataToString(PRI.CharacterData) == "B,IRNM,A,C,NONE,NONE,B,A,A,A,A,T,T");
// First see if this PRI is already present (eg may have changed team)
bPRIAlreadyPresent = false;
for(i=0; i<CharStatus.Length; i++)
{
// It is there - reset and abandon any merge work so far.
if(CharStatus[i].PRI == PRI)
{
//`log("PRI in use - resetting:"@PRI);
// Kyle: ResetCharMerge(i);
// only do arms if we've already done initial characters
// Kyle: CharStatus[i].bNeedsArms = (bProcessedInitialCharacters && !WorldInfo.IsInSeamlessTravel() && PRI.IsLocalPlayerPRI()) || bDefaultCharParts;
bPRIAlreadyPresent = true;
}
}
// Was not there - add to end of the array
if(!bPRIAlreadyPresent)
{
//`log("Adding PRI:"@PRI);
NewCharStatus.PRI = PRI;
// only do arms if we've already done initial characters
NewCharStatus.bNeedsArms = (bProcessedInitialCharacters && !WorldInfo.IsInSeamlessTravel() && PRI.IsLocalPlayerPRI());
// Special case - when you actually picked the parts for the fallback mesh - just use that! Go straight to loading arms.
if(!NewCharStatus.bNeedsArms && bDefaultCharParts)
{
NewCharStatus.bNeedsArms = TRUE;
}
CharStatus[CharStatus.length] = NewCharStatus;
// Increment count of total players set to process (if we are not just asking for arms)
//if(!NewCharStatus.bNeedsArms)
//{
// TotalPlayersSetToProcess++;
//}
// Kyle: disabled, but replaced outside the if
// destroy oldest cached data to make sure we have enough room
if (OldestCharacterCache != None)
{
OldestCharacterCache.Destroy();
WorldInfo.ForceGarbageCollection();
}
}
if(!NewCharStatus.bNeedsArms)
{
TotalPlayersSetToProcess++;
}
SetTimer(1.0 / 60.0, true, 'TickCharacterMeshCreation');
// Start the character creation timer.
StartCreateCharTime = WorldInfo.RealTimeSeconds;
}
Bookmarks