Always snap to grid

Difference between revisions of "User:OlympusMons"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m
m (Replaced content with '{{template:delete}}')
Line 1: Line 1:
<uscript>
+
{{template:delete}}
//===================================================
+
// Class: UTGame_Data
+
// Creation date: 11/12/2008 21:03
+
// Last updated: 21/12/2008 03:18
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTGame_Data extends UTData;
+
 
+
//---------------------------------------------------
+
//Mutators
+
 
+
//TODO: Linked list of default muts
+
var class OwnerMutator;
+
var string MutatorClass; /// default mutator assigned to this gametype - 2k4
+
var array< name > > MutatorsGroup; ///Find the LinkedList of Names for MutatorGroup? Mutators.Group
+
 
+
///Applied Mutators
+
//var Mutator NextMutator;
+
//var() array<string> GroupNames;
+
 
+
/** list of groups this mutator is in. Mutators that share any group cannot be activated simultaneously */
+
 
+
//---------------------------------------------------
+
//Gametype
+
//var UTGame Game; //TODO: Current Gametype, GameInfo?
+
 
+
var() class<Gameinfo> GClass;
+
//var UT_GRI_Expansion GRIEx; /// Expanded GRi
+
var() class<PlayerController> PCClass; /// Controller for this Mutator.
+
var() class<UTPawn> PClass; /// Pawn for this Mutator.
+
 
+
var() class<GameRules> GRClass; /// GameRules for this Mutator.
+
var() class<HUD> HUDClass; /// HUD for this Mutator.
+
var() class<UTLinkedReplicationInfo> LRIPath; /// Class to use for this expansions player replication
+
 
+
var() class<UTCheatManager> CMClass;
+
 
+
//---------------------------------------------------
+
// Map (WorldInfo)
+
 
+
var WorldInfo WorldInfo;
+
var string CurrentMap; /// Name of the Loaded Map
+
 
+
/** Factory Replacement/Per Map Factory Replacement */
+
var UTData_FactoryReplacer PF_Data;
+
var() class<UTData_FactoryReplacer> cPF_Replacer;
+
 
+
var UTData_FactoryReplacer VF_Data;
+
var() class<UTData_FactoryReplacer> cVF_Replacer;
+
 
+
/** This mutator uses Per Map Setting from the FactoryReplacer */
+
var config bool bUse_PM-PF_Set;
+
var config bool bUse_PM-VF_Set;
+
 
+
//---------------------------------------------------
+
//Inventory
+
 
+
var class<Inventory> NewInventoryType; /// New InventoryType for Factory
+
 
+
/** New Default inventory. Gets passed to Default Inventory array when bool is true! */
+
var bool bUseNewDefaultInventory;
+
var array< class<Inventory> > NewDefaultInventory;
+
 
+
var bool bAllowTranslocator;
+
 
+
//---------------------------------------------------
+
//Info Actor Attachements
+
 
+
struct ActorInfo{
+
// var Actor AttachedToActor;
+
var name AttachedToActor;
+
var class<Info> AttachedInfo;
+
};var array<ActorInfo> Info_Attachments;
+
//---------------------------------------------------
+
//Globals
+
var int SelfDmgMultiplier;
+
var int BotDmgMultiplier;
+
var int VehicleDmgMultiplier;
+
 
+
//From GameInfo
+
var bool bNewPlayersVsBots;
+
var bool bNewCustomBots;
+
var bool bNewWeaponStay;
+
//TODO: Server Force Default Chars on/off
+
//bNoCustomCharacters
+
//SpawnProtectionTime
+
 
+
//Roster
+
//var UTTeamInfo NewEnemyRoster;
+
//var string NewEnemyRosterName;
+
//var string NewDefaultEnemyRosterClass;
+
 
+
//---------------------------------------------------
+
/** Logging */
+
var UTPawn LastLoggedPawn;
+
var string LastLoggedMap;
+
//---------------------------------------------------
+
/*event PreBeginPlay()
+
{
+
Super.PreBeginPlay();
+
 
+
// GRI = UT_GRI_Expansion(GameReplicationInfo);
+
GRIEx = UT_GRI_Expansion(WorldInfo.GRI);
+
 
+
//Expand to cover lives, frags
+
if(NumRounds == 0 && NumRoundWins > 0)
+
GRIEx.VictoryCondition = VC_RoundsWon;
+
else if(NumRounds > 0 && NumRoundWins == 0)
+
GRIEx.VictoryCondition = VC_RoundsPlayed;
+
else
+
GRIEx.VictoryCondition = VC_RoundsPlayed;
+
`logd("PreBegin: Victory Condition: "$GRIEx.VictoryCondition,,'GameTypeExpansion');
+
}*/
+
 
+
////
+
//Replacement functions
+
function Init_PF_Replacer(string CurrentMap){
+
local int iMap;
+
 
+
// CurrentMap = WorldInfo.GetMapName(true);
+
 
+
if(PF_ReplacerClass != None) PF_Data = new(self) cPF_Replacer;
+
if(PF_Data == None) return;
+
 
+
if(FactoryData.bUsePerMapSettings) {
+
`logd("Using Per Map Factory Replacer Settings!",,'GameData');
+
//TODO: Parse commandline options for this?
+
iMap = FactoryReplacer.PerMapFactorySettings.Find('Map', CurrentMap);
+
if(iMap != INDEX_NONE) {
+
FactoryData.SetupPerMapData(iMap);
+
}else {
+
`logd("Using Global Factory Replacer Settings!",,'GameData');
+
FactoryData.AddDummyMapEntry(CurrentMap);
+
}
+
}
+
 
+
//FactoryReplacer.ReplacementFactories.FactoriesToReplace
+
}
+
/* `log("Pawn: "$PClass.Name,,'GameData');
+
`log("Controller: "$PCClass.Name,,'GameData');
+
`log("HUD: "$HUDClass.Name,,'GameData');
+
 
+
function
+
local UTVehicleFactory tempfactory;
+
 
+
WorldInfo.AllNavigationPoints(UTVehicleFactory, tempFactory);
+
*/
+
 
+
//TODO: Support for any factory, vehicles, weapons, etc
+
function FactoryReplacement(NavigationPoint Other){
+
local int j, iMap, iFactory;
+
 
+
if(FactoryData == None) return;
+
 
+
if(FactoryData.FactoryGroup != 'FT_Vehicle') {
+
//Replace Factory
+
for(j = 0;j < PF_Data.Length();j++) {
+
if(Other.IsA(PF_Data.ReplacerFactories[j].ReplacedFactory) &&
+
!Other.IsA(PF_Data.ReplacerFactories[j].ReplacedWithFactory))
+
{
+
OwnerMutator.ReplaceWith(Other, PF_Data.ReplacerFactories[j].ReplacedWithFactoryPath);
+
`logd("Factory: "$Other$" Replaced With: "$PF_Data.ReplacerFactories[j].ReplacedWithFactoryPath,,'FactoryReplacer');
+
return false; //NewFactory.InitializePickup();
+
}
+
// else if(ReplacementFactories[j].ReplacedWithFactory ~= "Remove"){
+
// Factory.Deactivate(); //Deactivate Factory!
+
// }
+
}
+
 
+
iMap = PF_Data.PM_FactorySet.Find('Map', CurrentMap);
+
if(iMap != INDEX_NONE) {
+
//TODO: Will add entry for every factory in the map, do not want!
+
iFactory = PF_Data.PM_FactorySet[iMap].FactoriesToReplace.Find('ReplacedFactory', PickupFactory(Other).Name);
+
if(iFactory == INDEX_NONE) {
+
PF_Data.AddPerMapEntry(iMap, PickupFactory(Other));
+
}
+
else if(iFactory != INDEX_NONE) {
+
PF_Data.UpdatePerMapEntry(iMap, PickupFactory(Other));
+
}
+
}
+
}else{
+
if(UTVehicleFactory(Other) != UTVehicleFactory_TrackTurretBase(Other))
+
ReplaceVehicle(UTVehicleFactory(Other)); //Mutator
+
// ModifyVehicle(UTVehicle(Other));
+
}
+
}
+
 
+
function InitVehicleReplacer(string CurrentMap, bool bArenaMode){
+
local int iMap;
+
 
+
// CurrentMap = WorldInfo.GetMapName(true);
+
 
+
if(cVF_Replacer != None) VF_Data = new(self) cVF_Replacer;
+
if(VF_Data == None) return;
+
 
+
if(cVF_Replacer == class'UTData_VehicleTeamSwap')
+
VF_Data = new(self) cVF_Replacer;
+
 
+
if(VF_Data.bUsePM_Settings) {
+
`logd("Using Per Map Factory Replacer Settings!",,'GameData');
+
//TODO: Parse commandline options for this?
+
iMap = FactoryReplacer.PerMapFactorySettings.Find('Map', CurrentMap);
+
if(iMap != INDEX_NONE) {
+
VF_Data.SetupPerMapData(iMap);
+
}else {
+
`logd("Using Global Factory Replacer Settings!",,'GameData');
+
VF_Data.AddDummyMapEntry(CurrentMap);
+
}
+
}
+
 
+
//FactoryReplacer.ReplacementFactories.FactoriesToReplace
+
}
+
 
+
// `log("Pawn: "$PClass.Name,,'GameData');
+
// `log("Controller: "$PCClass.Name,,'GameData');
+
// `log("HUD: "$HUDClass.Name,,'GameData');
+
 
+
// function
+
// local UTVehicleFactory tempfactory;
+
 
+
// WorldInfo.AllNavigationPoints(UTVehicleFactory, tempFactory);
+
 
+
 
+
////
+
//Replacement functions
+
/*function bool CheckReplacement(NavigationPoint Other)
+
{
+
//Replace Jumpboots with NewBootInventoryType!
+
BootFactory = UTPickupFactory_JumpBoots(Other);
+
if(BootFactory != None && NewBootInventoryType != None){
+
BootFactory.InventoryType = NewBootInventoryType;
+
BootFactory.InitializePickup();
+
`logd("BootFactory: "$BootFactory$"."$BootFactory.InventoryType,,'Replacement');
+
}
+
return true;
+
}*/
+
 
+
/*function bool PickupQuery(Pawn Other, class<Inventory> ItemClass, Actor Pickup)
+
{
+
foreach (items)
+
{
+
HV = UTPickupFactory_HealthVial(Pickup);
+
if(HV != None){
+
if(bRandomRespawns)
+
AV.RespawnTime = RandRange(AV.default.RespawnTime*0.75, AV.default.RespawnTime*1.25);
+
 
+
if(bRespawnScaling)
+
AV.RespawnTime = ((AV.RespawnTime - AV.default.RespawnTime)+(AV.default.RespawnTime*SpawnScale));
+
}
+
}
+
}*/
+
 
+
//From GameRules (Can only access defaults, statics?)
+
/*function NetDamage(int OriginalDamage, out int Damage, pawn injured, Controller instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DmgType)
+
{
+
local UCAbility_Armour ArmourAbsorb;
+
 
+
foreach  UTPawn(injured).ChildActors(Class'UCAbility_Armour', ArmourAbsorb)
+
// ArmourAbsorb.ArmourAbsorbDamage(Damage, DmgType, HitLocation);
+
 
+
//foreach UTPawn(injured).ChildActors(Class'UCSpeciesArmourInfo', TestAInfo)
+
// TestAInfo.ArmourAbsorbDamage(Damage, DmgType, HitLocation);
+
 
+
//bUseShieldBelt
+
//UTPawn(injured).ShieldBeltArmor
+
//ArmourAmount = UTPawn(instigatedBy.Pawn).VestArmor;
+
 
+
//Vampire
+
if(UTPawn(injured).ShieldBeltArmor > 0){}
+
 
+
//EnergyLeech
+
if(UTPawn(injured).ShieldBeltArmor > 0 && bUseShieldBelt)
+
{
+
ConversionRatio = 0.500; //0.5 // shield belt absorbs 100% of damage
+
ArmourAmount = UTPawn(instigatedBy.Pawn).ShieldBeltArmor;
+
UTPawn(instigatedBy.Pawn).ShieldBeltArmor = min(ArmourAmount+Damage*ConversionRatio, 100);
+
DifArmour = UTPawn(instigatedBy.Pawn).ShieldBeltArmor - ArmourAmount;
+
}
+
}*/
+
 
+
//function DmgFromEnemyTeam(Pawn Injured, Pawn EnemyP, EnemyTeam, bEnemyIsInfantry, bool bEnemyIsBot);
+
function int DmgFromEnemyTeam(Pawn Injured, Pawn EnemyP, int EnemyTeam, bool bEnemyIsInfantry, bool bEnemyIsBot);
+
 
+
function int DmgFromInjuredTeam(Pawn FriendP, bool bFriendIsInfantry, bool bFriendIsBot);
+
function int DoInfantrySelfDmg(bool IsBot);
+
function int DoVehicleSelfDmg(bool IsBot);
+
 
+
static simulated function ModifyPawn(UTPawn P);
+
 
+
defaultproperties
+
{
+
FactoryReplacerDataClass=None
+
 
+
PClass=None
+
PCClass=None
+
GRClass=None
+
LRIPath=None
+
HUDClass=None
+
CMClass=None
+
bUseNewDefaultInventory=False
+
NewBootInventoryType=None
+
}
+
</uscript>
+
<uscript>
+
 
+
//===================================================
+
// Class: UTMutator_GameExpansion
+
// Creation date: 06/12/2007 08:10
+
// Last updated: 15/01/2009 02:04
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//---------------------------------------------------
+
//SuperClass for all Game Expansion types
+
//covers alot of the base functionality which will
+
//be reused alot through these.
+
//TODO: Can be used to auto assign groups based on what
+
//adjustments are made.
+
//===================================================
+
class UTMutator_GameExpansion extends UTMutator
+
abstract;
+
 
+
/** Version number for this Game Expasion Mutator. */
+
var int Mut_Ver;
+
 
+
/** */
+
var UTGame_Data UTGameData;
+
var class<UTGame_Data> UTGameDataClass;
+
 
+
/** Controller for this Mutator. Not a good idea to use this unless you have to! */
+
//var class<PlayerController> PCClass;
+
var Controller aPlayer;
+
 
+
//---------------------------------------------------
+
/** Name of the Loaded Map */
+
//var string CurrentMap;
+
//---------------------------------------------------
+
/** Logging */
+
var UTPawn LastLoggedPawn;
+
var string LastLoggedMap;
+
//---------------------------------------------------
+
 
+
////
+
function GetServerDetails(out GameInfo.ServerResponseLine ServerState)
+
{
+
local int i;
+
 
+
Super.GetServerDetails(ServerState);
+
 
+
i = ServerState.ServerInfo.Length;
+
 
+
ServerState.ServerInfo.Length = i+1;
+
ServerState.ServerInfo[i].Key = "MF Version";
+
ServerState.ServerInfo[i++].Value = "v0.4";
+
// ServerState.ServerInfo[i++].Value = ""$(Mutator_VERSION / 10)$"."$int(Mutator_VERSION % 10);
+
}
+
 
+
////
+
function InitMutator(string Options, out string ErrorMessage){
+
local UTGame Game;
+
local int i, MapIndex;
+
 
+
if(UTGameDataClass != None) {
+
UTGameData = new(self) UTGameDataClass;
+
`logd("Game Data: "$UTGameData,,'GameExpansion');
+
}
+
 
+
//CurrentMap = WorldInfo.GetMapName(true);
+
// `logd("Current Map: "$CurrentMap,,'GameExpansion');
+
 
+
Game = UTGame(WorldInfo.Game);
+
if(Game != None) {
+
Game.bAllowTranslocator = UTGameData.bAllowTranslocator;
+
 
+
if(UTGameData.PClass != None) Game.DefaultPawnClass = UTGameData.PClass;
+
if(UTGameData.PCClass != None) Game.PlayerControllerClass = UTGameData.PCClass;
+
if(UTGameData.HUDClass != None) Game.HUDType = UTGameData.HUDClass;
+
 
+
if(bUseNewDefaultInventory) {
+
if(NewDefaultInventory.length > 1){
+
`logd("NewDefaultInventory",,'GameExpansion');
+
Game.DefaultInventory.length = NewDefaultInventory.length;
+
 
+
for(i = 0; i < Game.DefaultInventory.length; i++){
+
Game.DefaultInventory[i] = NewDefaultInventory[i];
+
`logd("DefaultLoadout: "$Game.DefaultInventory[i]);
+
/* i = Game.DefaultInventory.Length + 1;
+
Game.DefaultInventory[i+1] = class'GravBelt.GravBelt';*/
+
}
+
}
+
}
+
}
+
 
+
if(UTGameData.GRClass != None){
+
WorldInfo.Game.AddGameRules(UTGameData.GRClass);
+
//TODO: Search linkedlist and `log all GameRules
+
`log("GameRules: "$UTGameData.GRClass.Name,,'GameExpansion');
+
}
+
 
+
Super.InitMutator(Options, ErrorMessage);
+
}
+
 
+
////
+
//Replacement functions
+
function bool CheckReplacement(Actor Other){
+
local int i, j, MapIndex, FactoryIndex;
+
local UTPlayerController UTPlayer;
+
 
+
UTPlayer = UTPlayerController(Controller(other));
+
if(UTPlayer != None && CMClass != None){
+
UTPlayer.CheatClass = CMClass;
+
}
+
 
+
//Factory Replacement! TODO: Check for pathing issues with doing this
+
//TODO:
+
//UTGameData.FactoryReplacement(NavigationPoint(Other))
+
 
+
// if(UTVehicleFactory(Other) != UTVehicleFactory_TrackTurretBase(Other))
+
// ReplaceVehicle(UTVehicleFactory(Other));
+
 
+
// ModifyVehicle(UTVehicle(Other));
+
 
+
if(UTGameData == None)
+
return true;
+
 
+
//Spawn/Attach Info's
+
for(i = 0;i < UTGameData.Info_Attachments.Length;i++){
+
if(Other.IsA(UTGameData.Info_Attachments[i].AttachedToActor)){
+
Spawn(UTGameData.Info_Attachments[i].AttachedInfo, Other);
+
`logd("Info: "$UTGameData.Info_Attachments[i].AttachedInfo$" Attached to: "$UTGameData.Info_Attachments[i].AttachedToActor$"."$Other,,'Info Attachment');
+
}
+
}
+
 
+
return true;
+
}
+
 
+
function ReplaceVehicle(UTVehicleFactory Factory){
+
if(Factory == None && Factory.VehicleClass == None)
+
return;
+
 
+
`logd("Factory: "$Factory$"."$Factory.VehicleClass,,'Replacement');
+
}
+
 
+
////
+
//Modify functions
+
function ModifyPlayer(Pawn Other){
+
local UTPawn P;
+
//TODO: Add Modify.Controller()
+
 
+
P = UTPawn(Other);
+
if(P != None){
+
ModifyPawn(P);
+
 
+
//TODO: Support for Spawning PawnInfo's
+
// Spawn(Class'HammerPlayerInfo', Other);
+
// `logd("FireInfoSpawned",,'FastWeapSwitch');
+
}
+
 
+
Super.ModifyPlayer(Other);
+
}
+
 
+
function ModifyPawn(UTPawn P){
+
if(P == None)
+
return;
+
 
+
if(LastLoggedPawn != P) {
+
// `logd("Pawn: "$P,,'Modify');
+
LastLoggedPawn = P;
+
}
+
}
+
 
+
/*function ModifyVehicle(UTVehicle V){
+
V = UTVehicle(Other);
+
if (V != None){
+
`log("Vehicle: "$V);
+
}
+
}*/
+
 
+
////
+
/** Added to allow Gametype hook to UTLinkedReplicationInfo.
+
Similar to Info attachment method but instead links a replication info to the PRI.*/
+
//NOTE: Should be called from check replacement!
+
function AddReplicationInfo(Actor Other)
+
{
+
local UTLinkedReplicationInfo LRI;
+
local UTPlayerReplicationInfo PRI;
+
 
+
// foreach dynamicactors(class'PlayerController', pc) {
+
 
+
PRI = UTPlayerReplicationInfo(Other);
+
if(PRI != None && LRIPath != None) {
+
if(PRI.CustomReplicationInfo != None) {
+
LRI = PRI.CustomReplicationInfo;
+
// while(LRI.NextReplicationInfo != None){
+
// LRI = LRI.NextReplicationInfo;
+
// }
+
LRI.NextReplicationInfo = Spawn(LRIPath, Other.Owner);
+
`logd("NextReplicationInfo: "$LRI.NextReplicationInfo,,'GameExpansion');
+
}else{
+
PRI.CustomReplicationInfo = Spawn(LRIPath, Other.Owner);
+
`logd("CustomReplicationInfo: "$PRI.CustomReplicationInfo,,'GameExpansion');
+
}
+
}
+
}
+
 
+
defaultproperties
+
{
+
UTGameDataClass=None
+
}
+
</uscript>
+
<uscript>
+
// Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
+
class UTMutator_NoSuperWeapons extends UTMutator;
+
 
+
function bool CheckReplacement(Actor Other)
+
{
+
local UTWeaponPickupFactory Factory;
+
 
+
Factory = UTWeaponPickupFactory(Other);
+
if(Factory != None)
+
{
+
if (Factory.WeaponPickupClass.Default.bSuperWeapon)
+
{
+
return false;
+
}
+
}
+
 
+
return true;
+
}
+
 
+
 
+
class UTMutator_SuperBots extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
GRClass=Class'Newtators.UTGameRules_SuperBots'
+
}
+
 
+
class UTMutator_StrongVehicles extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
GRClass=Class'Newtators.UTGameRules_StrongVehicles'
+
}
+
 
+
class UTMutator_SpeedBoots extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
GroupNames(0)="JUMPBOOTS" //"POWERUPS"
+
FactoryReplacerDataClass=Class'Newtators.Data_SpeedBoots'
+
// ReplacementFactories(0)=(ReplacedFactory="UTPickupFactory_JumpBoots", ReplacedWithFactory="UTPickupFactory_SpeedBoots", ReplacedWithFactoryPath="Newtators.UTPickupFactory_SpeedBoots")
+
}
+
 
+
class UTMutator_QuadJumpBoots extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
GroupNames(0)="JUMPBOOTS" //"POWERUPS"
+
NewBootInventoryType=class'Newtators.UTQuadJumpBoots'
+
}
+
 
+
// Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
+
//FIX
+
//*Leaves behind lights.
+
class UTMutator_NoHealthPickups extends UTMutator;
+
 
+
function bool CheckReplacement(Actor Other)
+
{
+
local UTHealthPickupFactory F;
+
 
+
F = UTHealthPickupFactory(Other);
+
return (F == None);
+
}
+
 
+
//===================================================
+
// Class: UTMutator_NoDoubleJump
+
// Creation date: 27/11/2007 15:52
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTMutator_NoDoubleJump extends UTMutator_GameExpansion;
+
 
+
function ModifyPawn(UTPawn P)
+
{
+
Super.ModifyPawn(P);
+
 
+
P.bCanDoubleJump=False;
+
P.MaxMultiJump = 0;
+
P.MultiJumpRemaining = 0;
+
P.JumpZ = 400.000000;
+
}
+
 
+
defaultproperties
+
{
+
GroupNames(0)="POWERUPS"
+
GroupNames(1)="JUMPING"
+
PClass=class'Newtators.UTSingleJumpPawn'
+
NewBootInventoryType=class'Newtators.UTSingleJumpBoots'
+
}
+
 
+
//Remove Helmet, Thighpads.
+
class UTMutator_NoDelayOnDouble extends UTMutator_GameExpansion;
+
 
+
function ModifyPlayer(Pawn Other)
+
{
+
local UTPawn P;
+
 
+
P = UTPawn(Other);
+
 
+
if(P != None)
+
{
+
P.bStopOnDoubleLanding = False;
+
P.SlopeBoostFriction = -0.400000; //.0.200000
+
}
+
 
+
Super.ModifyPlayer(Other);
+
}
+
 
+
defaultproperties
+
{
+
Info_Attachments(0)=(AttachedToActor="UTPlayerController", AttachedInfo=class'MutatorFramework.UTInfo_DodgeJump')
+
}
+
 
+
class UTMutator_Hardcore extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
GRClass=Class'Newtators.UTGameRules_Hardcore'
+
}
+
 
+
class UTMutator_EnergyLeech extends UTMutator_GameExpansion;
+
 
+
function ModifyPawn(UTPawn P)
+
{
+
Super.ModifyPawn(P);
+
P.ShieldBeltPickupClass = None;
+
}
+
 
+
defaultproperties
+
{
+
Mutator_VERSION=3
+
GRClass=Class'Newtators.UTGameRules_EnergyLeech'
+
}
+
 
+
class UTMutator_FastWeapSwitch extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
Info_Attachments(0)=(AttachedToActor="UTWeapon", AttachedInfo=class'MutatorFramework.UTInfo_WeaponSwitchSpeed')
+
}
+
 
+
class UTMutator_ExtraSelfDamage extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
GRClass=Class'Newtators.UTGameRules_ExtraSelfDamage'
+
}
+
 
+
class UTMutator_DualEnforcers extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
Info_Attachments(0)=(AttachedToActor="UTWeap_Enforcer", AttachedInfo=class'MutatorFramework.UTInfo_EnforcerDual')
+
}
+
 
+
class UTMutator_Booster extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
// GroupNames(0)="POWERUPS"
+
GRClass=Class'Newtators.UTGameRules_Booster'
+
FactoryReplacerDataClass=Class'Newtators.Data_Booster'
+
// ReplacementFactories(0)=(ReplacedFactory="UTPickupFactory_Berserk", ReplacedWithFactory="UTPickupFactory_Booster", ReplacedWithFactoryPath="Newtators.UTPickupFactory_Booster")
+
}
+
 
+
class UTMutator_Bloodlust extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
GroupNames(0)="VAMPIRE"
+
UTGameDataClass=Class'Newtators.UTD_Game_Bloodlust'
+
}
+
 
+
//===================================================
+
// Class: UTInfo_Booster
+
// Creation date: 22/06/2008 10:11
+
// Last updated: 23/06/2008 11:01
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTInfo_Booster extends UTInfo;
+
 
+
var UTPawn Pawnt;
+
var() repnotify float NewHealth;
+
 
+
var bool bSetHealth;
+
 
+
replication
+
{
+
if(bNetDirty && (Role == ROLE_Authority) && bNetInitial)
+
NewHealth;
+
}
+
 
+
/** Make sure we have an owner and its the right type before moving on */
+
simulated event PostBeginPlay()
+
{
+
if(Owner == None)
+
Destroy();
+
 
+
`logd("Info Owner: "$Owner,,'Booster');
+
 
+
Pawnt = UTPawn(Owner);
+
if(Pawnt != None)
+
{
+
NewHealth = Pawnt.Health;
+
Pawnt.HealthMax = 199;
+
Pawnt.SuperHealthMax = 299;
+
Enable('tick');
+
}
+
else
+
{
+
`logd("Destroy Info: PC == None;" ,,'Booster');
+
Destroy();
+
}
+
}
+
 
+
function DegenHealthTimer()
+
{
+
// local int TempHealth;
+
// local bool bHealth;
+
 
+
// `logd("Degen Health!",,'Booster');
+
 
+
/* if(bHealth)
+
{
+
TempHealth = Pawnt.Health;
+
bHealth = False;
+
}*/
+
 
+
Pawnt.HealthMax -= 1;
+
Pawnt.SuperHealthMax -= 1;
+
Pawnt.Health -= 1;
+
 
+
if(Pawnt.HealthMax <= 100 || Pawnt.SuperHealthMax <= 199)
+
{
+
Pawnt.HealthMax = 100;
+
Pawnt.SuperHealthMax = 199;
+
 
+
if(Pawnt.Health <= NewHealth)
+
{
+
Pawnt.Health = NewHealth;
+
Destroy();
+
}
+
//TODO: If player takes damage and ends up under NewHealth amount
+
// then it'll bump their health back up. Dont want this!
+
}
+
 
+
//TODO: If kill ourselves with booster!
+
//if(P.Health)
+
}
+
 
+
simulated event Tick(float DeltaTime)
+
{
+
if(Pawnt == None)
+
Disable('tick');
+
 
+
if(UTInventoryManager(Pawnt.InvManager) != None)
+
{
+
if(UTInventoryManager(Pawnt.InvManager).HasInventoryOfClass(class'Newtators.UTBooster') == None)
+
{
+
//Degen health back to normal after set time!
+
if(!IsTimerActive('DegenHealthTimer'))
+
SetTimer(0.5, True, 'DegenHealthTimer');
+
 
+
Disable('tick');
+
}
+
}
+
}
+
 
+
defaultproperties
+
{
+
RemoteRole=ROLE_SimulatedProxy
+
bAlwaysRelevant=True
+
}
+
 
+
//===================================================
+
// Class: UTGameRules_SuperBots
+
// Creation date: 20/12/2007 00:15
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTGameRules_SuperBots extends GameRules;
+
 
+
var() float SuperBotDamage;
+
 
+
function NetDamage(int OriginalDamage, out int Damage, pawn injured, Controller instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType)
+
{
+
if (NextGameRules != None)
+
NextGameRules.NetDamage(OriginalDamage,Damage,injured,instigatedBy,HitLocation,Momentum,DamageType);
+
 
+
if(injured != None && instigatedBy.Pawn != None && injured != instigatedBy &&
+
UTBot(instigatedBy) != None && UTBot(injured.controller) == None && UTBot(injured.controller) != UTBot(instigatedBy))
+
{
+
///
+
Damage = Damage * SuperBotDamage;
+
}
+
}
+
 
+
defaultproperties
+
{
+
SuperBotDamage=1.5
+
}
+
 
+
//===================================================
+
// Class: UTGameRules_StrongVehicles
+
// Creation date: 04/12/2007 12:26
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTGameRules_StrongVehicles extends GameRules;
+
 
+
function NetDamage(int OriginalDamage, out int Damage, pawn injured, Controller instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DmgType)
+
{
+
if ((DmgType != None) && ClassIsChildOf(DmgType,class'UTDamageType') && Injured != none && UTVehicle(Injured) != None)
+
{
+
Damage = Damage * 0.5; //0.75
+
}
+
 
+
if (NextGameRules != None)
+
NextGameRules.NetDamage(OriginalDamage,Damage,injured,instigatedBy,HitLocation,Momentum,DmgType);
+
}
+
 
+
 
+
//===================================================
+
// Class: UTGameRules_ExtraSelfDamage
+
// Creation date: 13/12/2007 23:47
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTGameRules_ExtraSelfDamage extends GameRules;
+
 
+
function NetDamage(int OriginalDamage, out int Damage, pawn injured, Controller instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType)
+
{
+
if ((instigatedBy.Pawn == injured) && (instigatedBy != None) && (instigatedBy.Pawn.Health > 0))
+
{
+
Damage = Damage * 1.5;
+
}
+
 
+
if (NextGameRules != None)
+
NextGameRules.NetDamage(OriginalDamage,Damage,injured,instigatedBy,HitLocation,Momentum,DamageType);
+
}
+
 
+
//===================================================
+
// Class: UTGameRules_EnergyLeech
+
// Creation date: 04/12/2007 04:01
+
// Last Updated: 07/03/2008 10:19
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//---------------------------------------------------
+
//-Support for Infantry Vs Vehicle
+
//===================================================
+
class UTGameRules_EnergyLeech extends GameRules
+
config(Newtators);
+
 
+
var() float ConversionRatio;
+
var globalconfig bool bUseShieldBelt;
+
var globalconfig bool bUseVestArmour;
+
var globalconfig bool bUseThighpadArmor;
+
var globalconfig bool bUseHelmetArmor;
+
 
+
var globalconfig bool bUseForVehicles; //Infantry Vs Vehicle Damage!
+
 
+
function NetDamage(int OriginalDamage, out int Damage, pawn injured, Controller instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType)
+
{
+
local int ArmourAmount, DifArmour;;
+
 
+
if(NextGameRules != None)
+
NextGameRules.NetDamage(OriginalDamage,Damage,injured,instigatedBy,HitLocation,Momentum,DamageType);
+
 
+
if((instigatedBy != None && PlayerController(instigatedBy) != None && injured != None) && (instigatedBy.Pawn != None) && (instigatedBy.Pawn != injured) && (UTPawn(instigatedBy.Pawn) != None) &&
+
(instigatedBy.PlayerReplicationInfo != None) && (injured.PlayerReplicationInfo != None) &&
+
((instigatedBy.PlayerReplicationInfo.Team == None) || (instigatedBy.PlayerReplicationInfo.Team != injured.PlayerReplicationInfo.Team)))
+
{
+
//
+
if(UTPawn(injured).ShieldBeltArmor > 0 && bUseShieldBelt)
+
{
+
ConversionRatio = 0.500; //0.5 // shield belt absorbs 100% of damage
+
ArmourAmount = UTPawn(instigatedBy.Pawn).ShieldBeltArmor;
+
UTPawn(instigatedBy.Pawn).ShieldBeltArmor = min(ArmourAmount+Damage*ConversionRatio, 100);
+
DifArmour = UTPawn(instigatedBy.Pawn).ShieldBeltArmor - ArmourAmount;
+
}
+
else if(UTPawn(injured).VestArmor > 0 && bUseVestArmour)
+
{
+
ConversionRatio = 0.375; //0.3 // vest absorbs 75% of damage
+
ArmourAmount = UTPawn(instigatedBy.Pawn).VestArmor;
+
UTPawn(instigatedBy.Pawn).VestArmor = min(ArmourAmount+Damage*ConversionRatio, 50);
+
DifArmour = UTPawn(instigatedBy.Pawn).VestArmor - ArmourAmount;
+
}
+
else if(UTPawn(injured).ThighpadArmor > 0 && bUseThighpadArmor)
+
{
+
ConversionRatio = 0.250; //0.2 // thighpads absorb 50% of damage
+
ArmourAmount = UTPawn(instigatedBy.Pawn).ThighpadArmor;
+
UTPawn(instigatedBy.Pawn).ThighpadArmor = min(ArmourAmount+Damage*ConversionRatio, 30);
+
DifArmour = UTPawn(instigatedBy.Pawn).ThighpadArmor - ArmourAmount;
+
}
+
else if(UTPawn(injured).HelmetArmor > 0 && bUseHelmetArmor)
+
{
+
ConversionRatio = 0.250; //0.1 // helmet absorbs 20% of damage
+
ArmourAmount = UTPawn(instigatedBy.Pawn).HelmetArmor;
+
UTPawn(instigatedBy.Pawn).HelmetArmor = min(ArmourAmount+Damage*ConversionRatio, 20);
+
DifArmour = UTPawn(instigatedBy.Pawn).HelmetArmor - ArmourAmount;
+
}
+
 
+
//Latest Update to support Vehicles!
+
if(UTVehicle(Injured) != None && bUseForVehicles)
+
{
+
ConversionRatio = 0.250; //For vehicles we go a quater of health to armour
+
ArmourAmount = UTPawn(instigatedBy.Pawn).ShieldBeltArmor;
+
UTPawn(instigatedBy.Pawn).ShieldBeltArmor = min(ArmourAmount+Damage*ConversionRatio, 100);
+
DifArmour = UTPawn(instigatedBy.Pawn).ShieldBeltArmor - ArmourAmount;
+
}
+
 
+
if(DifArmour != 0)
+
PlayerController(instigatedBy).ReceiveLocalizedMessage(class'Newtators.EnergyLeechMsg', DifArmour);
+
}
+
}
+
 
+
defaultproperties
+
{
+
bUseShieldBelt=True
+
bUseVestArmour=False
+
bUseThighpadArmor=False
+
bUseHelmetArmor=False
+
bUseForVehicles=True
+
}
+
 
+
//===================================================
+
// Class: UTGameRules_Booster
+
// Creation date: 22/06/2008 11:17
+
// Last Updated: 22/06/2008 11:17
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTGameRules_Booster extends GameRules;
+
 
+
function bool OverridePickupQuery(Pawn Other, class<Inventory> ItemClass, Actor Pickup, out byte bAllowPickup)
+
{
+
local UTInventoryManager InvMgr;
+
local UTPickupFactory_MediumHealth MedHealthFactory;
+
local int HealAmount;
+
 
+
InvMgr = UTInventoryManager(Other.InvManager);
+
 
+
if(InvMgr.HasInventoryOfClass(class'Newtators.UTBooster') != None)
+
{
+
if(Pickup != None && UTPawn(Other) != None)
+
{
+
//Medium Health packs usually only allow pickup if you have under 100 health!
+
//This overrides that and forces the player to pickup the item.
+
MedHealthFactory = UTPickupFactory_MediumHealth(Pickup);
+
if(MedHealthFactory != None)
+
{
+
HealAmount = (UTPawn(Other).Health + MedHealthFactory.HealingAmount) - UTPawn(Other).SuperHealthMax;
+
// if(UTPawn(Other).Health <= UTPawn(Other).HealthMax){}
+
 
+
if(UTPawn(Other).Health <= UTPawn(Other).SuperHealthMax)
+
{
+
if(UTPawn(Other).Health + MedHealthFactory.HealingAmount > UTPawn(Other).SuperHealthMax)
+
UTPawn(Other).Health += HealAmount;
+
else
+
UTPawn(Other).Health += MedHealthFactory.HealingAmount;
+
 
+
MedHealthFactory.GiveTo(Other);
+
return true;
+
}
+
}
+
}
+
}
+
 
+
if((NextGameRules != None) &&  NextGameRules.OverridePickupQuery(Other, ItemClass, Pickup, bAllowPickup))
+
return true;
+
 
+
return false;
+
}
+
 
+
//===================================================
+
// Class: UTData_VehicleTeamSwap
+
// Creation date: 20/12/2008 21:03
+
// Last updated: 20/12/2008 21:38
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTData_VehicleTeamSwap extends UTData_FactoryReplacer
+
Config(FactoryReplacer);
+
 
+
const numTeams = 2; //0 = red, 1 = blue
+
struct PowerCoreSet{
+
var bool bTeamIsNecris;
+
var bool bTeamWasNecris;
+
var bool bTeamVehiclesChanged;
+
};var config PowerCoreSet TeamCore[numTeams];
+
 
+
//TODO: Change these to linked list?
+
const numFactories = 8;
+
var class<UTVehicleFactory> AxonFactories[numFactories];
+
var class<UTVehicleFactory> NecrisFactories[numFactories];
+
var class<UTVehicleFactory> SwapAxonFactories[numFactories];
+
var class<UTVehicleFactory> SwapNecrisFactories[numFactories];
+
 
+
//TODO: Tidy this up some :) perhaps move to super or subclass of object for callback static
+
//These factories could be stored in the vehicle class for custom vehicle support
+
//use linked list here also so numFactories isnt limited (ForEach.next, While.Next!=None)
+
/*struct VehicleSet{
+
var class<UTVehicleFactory> Factories[numFactories];
+
var class<UTVehicleFactory> SwapFactories[numFactories];
+
};var VehicleSet VehicleTeamSwapSet[numTeams];*/
+
 
+
const CheckRadius = 196; //64,128
+
//---------------------------------------------------
+
var config bool bUse_PM_Set;
+
 
+
//TODO: Change this to a BYTE array!
+
//struct PerMapCoreSetup{
+
// var bool bTeamIsNecris;
+
//};
+
 
+
//TODO: Add bool for swapping nightshade and darkwalker
+
struct MapTeamSwapSettings{
+
var string Map;
+
var PowerCoreSet PerMapTeamCore[numTeams];
+
};var config array<MapTeamSwapSettings> PM_Set;
+
 
+
//---------------------------------------------------
+
//Map Exceptions for which factory will spawn for the opposing one.
+
//For eg, Raptor gets replaced with Fury by default.
+
/*struct MapExceptionAxonVehicleSet{
+
var class<UTVehicleFactory> MapAxonFactories;
+
var class<UTVehicleFactory> MapSwapAxonFactories;
+
}
+
 
+
struct MapExceptionNecrisVehicleSet{
+
var class<UTVehicleFactory> MapNecrisFactories;
+
var class<UTVehicleFactory> MapSwapNecrisFactories;
+
}*/
+
 
+
/*struct MapExceptionVehicleSet{
+
var array< class<UTVehicleFactory> > Factories;
+
var array< class<UTVehicleFactory> > SwapFactories;
+
};*/
+
 
+
/*struct MapExceptionSwapSet{
+
var string Map;
+
var MapExceptionAxonVehicleSet MapExctSwapAxon[numFactories];
+
var MapExceptionNecrisVehicleSet MapExctSwapNecris[numFactories];
+
};*/
+
 
+
/*struct MapExceptionSwapSet{
+
var string Map;
+
var MapExceptionVehicleSet MapExctSwapSet[numTeams];
+
};var config array<MapExceptionSwapSet> PerMapSwapSet;*/
+
//---------------------------------------------------
+
 
+
function AddDummyMapEntry(string CurrentMap){
+
NewPM_FactorySet.Map = CurrentMap;
+
PM_FactorySet.AddItem(NewPerMapFactorySet);
+
}
+
 
+
function AddPerMapEntry(int iMap, PickupFactory Factory){
+
 
+
}
+
 
+
function UpdatePerMapEntry(int iMap, PickupFactory Factory){
+
 
+
}
+
 
+
 
+
 
+
simulated function PostBeginPlay(){
+
local UTOnslaughtGame_Content WarGame;
+
local UTOnslaughtPowerCore WarCore[numTeams];
+
local UTOnslaughtPowerCore TempWarCore;
+
local UTVehicleFactory WarFactory;
+
local byte i, k;//, m;
+
local int j;
+
 
+
local bool bInPerMapList;
+
local MapTeamSwapSettings NewMapSwapSettings;
+
 
+
// local MapExceptionSwapSet NewPerMapSwapSet;
+
// local MapExceptionVehicleSet NewMapExctSwapSet[numTeams];
+
// local int Index, MapIndex;
+
//, VehicleIndex;
+
 
+
 
+
Super.PostBeginPlay();
+
 
+
/** Checks for Warfare and if found processes Cores and Vehicle Factories */
+
WarGame = UTOnslaughtGame_Content(WorldInfo.Game);
+
if(WarGame == None){
+
`logd("Skipping Core checks, Gametype is not Warfare!",,'VehicleTeamSwap');
+
// Destroy();
+
}else{
+
if(bUsePerMapSettings){
+
`logd("Using Per Map Settings!",,'VehicleTeamSwap');
+
 
+
for(j=0; j < PerMapSettings.length; j++){
+
if(PerMapSettings[j].Map ~= CurrentMap){
+
for(k=0; k < numTeams; k++){
+
TeamCore[k].bTeamIsNecris = PerMapSettings[j].PerMapTeamCore[k].bTeamIsNecris;
+
`logd("Per Map Settings: Team"$k$" is Necris: "$TeamCore[k].bTeamIsNecris,,'VehicleTeamSwap');
+
}
+
bInPerMapList = True;
+
}
+
else if(CurrentMap != PerMapSettings[j].Map){
+
bInPerMapList = False;
+
}
+
}
+
 
+
//Map is not found on the list, create a new entry in the ini using the defauls
+
if(!bInPerMapList){
+
NewMapSwapSettings.Map = CurrentMap;
+
for(k=0; k < numTeams; k++)
+
NewMapSwapSettings.PerMapTeamCore[k].bTeamIsNecris = TeamCore[k].bTeamIsNecris;
+
 
+
PerMapSettings.AddItem(NewMapSwapSettings);
+
SaveConfig();
+
}
+
}
+
 
+
//Map Exceptions from config to handle spawning/balance issues with vehicles on some maps!
+
/* MapIndex = PerMapSwapSet.Find('Map', CurrentMap);
+
if(MapIndex != INDEX_NONE)
+
{
+
for(j=0;j < numTeams;j++)
+
{
+
for(k=0;k < PerMapSwapSet[MapIndex].MapExctSwapSet[j].Factories.length;k++)
+
{
+
NewMapExctSwapSet[j].Factories[k] = PerMapSwapSet[MapIndex].MapExctSwapSet[j].Factories[k];
+
NewMapExctSwapSet[j].SwapFactories[k] = PerMapSwapSet[MapIndex].MapExctSwapSet[j].SwapFactories[k];
+
`logd("New Map Exception Swap Set: Factory: "$NewMapExctSwapSet[j].Factories[k]$" to be replaced with "$NewMapExctSwapSet[j].SwapFactories[k],,'VehicleTeamSwap');
+
 
+
for(m=0;m < numFactories;m++)
+
{
+
if(NewMapExctSwapSet[0].Factories[k] == AxonFactories[m]){
+
SwapAxonFactories[m] = NewMapExctSwapSet[0].SwapFactories[k];
+
`logd("Set Map Exception: "$SwapAxonFactories[m],,'VehicleTeamSwap');
+
}
+
 
+
if(NewMapExctSwapSet[1].Factories[k] == NecrisFactories[m]){
+
SwapNecrisFactories[m] = NewMapExctSwapSet[1].SwapFactories[k];
+
`logd("Set Map Exception: "$SwapNecrisFactories[m],,'VehicleTeamSwap');
+
}
+
}
+
}
+
}
+
}*/
+
 
+
//Exception for Downtown to Fix Darkwalker Spawn problem.
+
if(CurrentMap ~= "WAR-DOWNTOWN"){
+
SwapNecrisFactories[5] = class'Newtators.TSVehicleFactory_Nightshade';
+
SwapNecrisFactories[7] = class'Newtators.TSVehicleFactory_DarkWalker';
+
}
+
 
+
//Assuming first one found is red, bad right? :P
+
//bSidesAreSwitched
+
foreach AllActors(Class'UTOnslaughtPowerCore', TempWarCore){
+
WarCore[i] = TempWarCore;
+
i++;
+
}
+
 
+
//Checks the Cores to make sure replacement needs to be run!
+
for(i=0; i < numTeams; i++){
+
// WarCore[i] = UTOnslaughtGRI(WarGame.GameReplicationInfo).GetTeamCore(i);
+
`logd("Check Power Core : "$WarCore[i].Name$" Necris Core = "$WarCore[i].bNecrisCore$"; No Core Switch = "$WarCore[i].bNoCoreSwitch,,'VehicleTeamSwap');
+
 
+
TeamCore[i].bTeamWasNecris = WarCore[i].bNecrisCore;
+
 
+
if((TeamCore[i].bTeamWasNecris == True && TeamCore[i].bTeamIsNecris == False) ||
+
(TeamCore[i].bTeamWasNecris == False && TeamCore[i].bTeamIsNecris == True))
+
{
+
//If is Necris initially but does not equal TeamIsNecris (Team was Necris, Team is Axon)
+
//If is Axon initially but does not equal TeamIsNecris (Team was Axon, Team is Necris)
+
TeamCore[i].bTeamVehiclesChanged = true;
+
}
+
else if(TeamCore[i].bTeamWasNecris == TeamCore[i].bTeamIsNecris){
+
//Is a Necris or Axon Core being switched to the same type!
+
TeamCore[i].bTeamVehiclesChanged = false;
+
}
+
}
+
 
+
//No need to swap vehicles if vehicle teams havent changed!
+
if(!TeamCore[0].bTeamVehiclesChanged && !TeamCore[1].bTeamVehiclesChanged){
+
`logd("No need for vehicle swap!",,'VehicleTeamSwap');
+
return;
+
}
+
 
+
foreach DynamicActors(Class'UTVehicleFactory', WarFactory)
+
if(WarFactory != None && WarFactory != UTVehicleFactory_TrackTurretBase(WarFactory))
+
SetWarFactories(WarFactory);
+
 
+
//Sets cores to new faction type!
+
for(i=0; i < numTeams; i++){
+
if(TeamCore[i].bTeamVehiclesChanged)
+
WarCore[i].bNecrisCore = TeamCore[i].bTeamIsNecris;
+
 
+
`logd("Set Power Core : "$WarCore[i].Name$" Necris Core = "$WarCore[i].bNecrisCore$"; No Core Switch = "$WarCore[i].bNoCoreSwitch,,'VehicleTeamSwap');
+
}
+
}
+
}
+
 
+
//===================================================
+
// Class: UTData_SpeedBoots
+
// Creation date: 22/08/2008 06:12
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//---------------------------------------------------
+
class UTData_SpeedBoots extends UTData_FactoryReplacer;
+
 
+
defaultproperties{
+
ReplacementFactories(0)=(FactoryGroup='FT_Powerup',ReplacedFactory="UTPickupFactory_JumpBoots", ReplacedWithFactory="UTPickupFactory_SpeedBoots", ReplacedWithFactoryPath="Newtators.UTPickupFactory_SpeedBoots")
+
}
+
 
+
//===================================================
+
// Class: UTData_Booster
+
// Creation date: 22/08/2008 06:08
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//---------------------------------------------------
+
class UTData_Booster extends UTData_FactoryReplacer;
+
 
+
defaultproperties{
+
ReplacementFactories(0)=(FactoryGroup='SPowerup',ReplacedFactory="UTPickupFactory_Berserk", ReplacedWithFactory="UTPickupFactory_Booster", ReplacedWithFactoryPath="Newtators.UTPickupFactory_Booster")
+
}
+
 
+
//===================================================
+
// Class: UTData_BloodLust
+
// Creation date: 22/08/2008 05:21
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//---------------------------------------------------
+
class UTData_BloodLust extends UTData_FactoryReplacer;
+
 
+
defaultproperties{
+
ReplacementFactories(0)=(FactoryGroup='SPowerup',ReplacedFactory="UTPickupFactory_UDamage", ReplacedWithFactory="UTPickupFactory_VDamage", ReplacedWithFactoryPath="Newtators.UTPickupFactory_VDamage")
+
}
+
 
+
//===================================================
+
// Class: UTD_GR_Vampire
+
// Creation date: 27/11/2007 04:01
+
// Last Updated: 15/01/2009 07:07
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//---------------------------------------------------
+
//Modified version of Epics VampireGameRules from 2k4
+
//-Support for UT3's armour system
+
//-Support for Infantry Vs Vehicle??
+
//-Support for Vehicle Vs Vehicle
+
//===================================================
+
class UTD_GR_Vampire extends UTD_GameRules;
+
 
+
var() float ConversionRatio;
+
var globalconfig bool bUseSuperHealth;
+
var globalconfig bool bUseForVehicles; //Infantry Vs Vehicle || Vehicle Vs Vehicle Damage!
+
 
+
function DmgFromEnemyTeam(EnemyP, EnemyTeam, bEnemyIsInfantry, bool bEnemyIsBot){
+
local int VampHealth, VampMaxHealth, VampSuperHealth, DifHealth;
+
 
+
VampHealth = EnemyP.Health;
+
 
+
if(bEnemyIsInfantry){
+
if(!bUseSuperHealth){
+
VampMaxHealth = EnemyP.HealthMax;
+
 
+
if(UTPawn(injured).ShieldBeltArmor > 0){}
+
else if(UTPawn(injured).VestArmor > 0){
+
ConversionRatio = 0.1875;
+
EnemyP.Health = Min(VampHealth+Damage*ConversionRatio, Max(VampHealth,VampMaxHealth));
+
}
+
else if(UTPawn(injured).ThighpadArmor > 0){
+
ConversionRatio = 0.125;
+
EnemyP.Health = Min(VampHealth+Damage*ConversionRatio, Max(VampHealth,VampMaxHealth));
+
}
+
else if(UTPawn(injured).HelmetArmor > 0){
+
ConversionRatio = 0.125;
+
EnemyP.Health = Min(VampHealth+Damage*ConversionRatio, Max(VampHealth,VampMaxHealth));
+
}
+
else{
+
ConversionRatio = 0.5;
+
EnemyP.Health = Min(VampHealth+Damage*ConversionRatio, Max(VampHealth,VampMaxHealth));
+
}
+
}else{
+
VampSuperHealth = UTPawn(instigatedBy.Pawn).SuperHealthMax;
+
 
+
if(UTPawn(injured).ShieldBeltArmor > 0){}
+
else if(UTPawn(injured).VestArmor > 0){
+
ConversionRatio = 0.375;
+
EnemyP.Health = Min(VampHealth+Damage*ConversionRatio, Max(VampHealth,VampSuperHealth));
+
}
+
else if(UTPawn(injured).ThighpadArmor > 0){
+
ConversionRatio = 0.250;
+
EnemyP.Health = Min(VampHealth+Damage*ConversionRatio, Max(VampHealth,VampSuperHealth));
+
}
+
else if(UTPawn(injured).HelmetArmor > 0){
+
ConversionRatio = 0.250;
+
EnemyP.Health = Min(VampHealth+Damage*ConversionRatio, Max(VampHealth,VampSuperHealth));
+
}
+
else{
+
ConversionRatio = 0.35;
+
EnemyP.Health = Min(VampHealth+Damage*ConversionRatio, Max(VampHealth,VampSuperHealth));
+
}
+
}
+
 
+
DifHealth = instigatedBy.Pawn.Health - VampHealth;
+
if(DifHealth != 0){
+
PlayerController(instigatedBy).ReceiveLocalizedMessage(class'Newtators.VampireMsg', DifHealth);
+
// `logd("Player Health: After: "$instigatedBy.Pawn.Health);
+
{
+
}else if(!bEnemyIsInfantry && bUseForVehicles){
+
if(EnemyP == Vehicle(instigatedBy.Pawn)){
+
 
+
VampHealth = Vehicle(instigatedBy.Pawn).Health;
+
VampMaxHealth = Vehicle(instigatedBy.Pawn).HealthMax;
+
ConversionRatio = 0.5;
+
Vehicle(instigatedBy.Pawn).HealDamage(Damage*ConversionRatio, instigatedBy, DamageType);
+
DifHealth = Damage*ConversionRatio;
+
PlayerController(instigatedBy).ReceiveLocalizedMessage(class'Newtators.VampireMsg', DifHealth);
+
// `logd("Vehicle Health: After: "$Vehicle(instigatedBy.Pawn).Health);
+
}
+
}
+
}
+
 
+
defaultproperties
+
{
+
GRClass=Class'MutatorFramework.UTGameRules_Info'
+
}
+
 
+
//===================================================
+
// Class: UTD_Game_Bloodlust
+
// Creation date: 18/12/2007 04:30
+
// Last updated: 23/12/2008 20:01
+
//
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTD_GR_Bloodlust extends UTD_GR_Vampire;
+
 
+
/*function NetDamage(int OriginalDamage, out int Damage, pawn injured, Controller instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType)
+
{
+
if(NextGameRules != None)
+
NextGameRules.NetDamage(OriginalDamage,Damage,injured,instigatedBy,HitLocation,Momentum,DamageType);
+
 
+
if(instigatedBy != None && InstigatedBy.Pawn != None && injured != InstigatedBy.Pawn &&
+
(UTInventoryManager(InstigatedBy.Pawn.InvManager).HasInventoryOfClass(class'Newtators.UTVDamage') != None))
+
{
+
///
+
Super.NetDamage(OriginalDamage,Damage,injured,instigatedBy,HitLocation,Momentum,DamageType);
+
}
+
}
+
 
+
function bool OverridePickupQuery(Pawn Other, class<Inventory> ItemClass, Actor Pickup, out byte bAllowPickup)
+
{
+
local UTInventoryManager InvMgr;
+
 
+
InvMgr = UTInventoryManager(Other.InvManager);
+
 
+
if(Pickup != None && UTPawn(Other) != None)
+
{
+
if(InvMgr.HasInventoryOfClass(class'Newtators.UTVDamage') != None)
+
{
+
if(Pickup.IsA('UTPickupFactory_HealthVial') ||
+
Pickup.IsA('UTPickupFactory_SuperHealth') ||
+
Pickup.IsA('UTPickupFactory_MediumHealth'))
+
return true;
+
}
+
}
+
 
+
if((NextGameRules != None) &&  NextGameRules.OverridePickupQuery(Other, ItemClass, Pickup, bAllowPickup))
+
return true;
+
 
+
return false;
+
}*/
+
 
+
defaultproperties
+
{
+
bUseSuperHealth=True
+
 
+
FactoryReplacerDataClass=Class'Newtators.Data_Bloodlust'
+
// ReplacementFactories(0)=(ReplacedFactory="UTPickupFactory_UDamage", ReplacedWithFactory="UTPickupFactory_VDamage", ReplacedWithFactoryPath="Newtators.UTPickupFactory_VDamage")
+
}
+
 
+
//===================================================
+
// Class: UTVDamage
+
// Creation date: 18/12/2007 03:58
+
// Last updated: 22/06/2008 10:09
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTVDamage extends UTTimedPowerup_Generic;
+
 
+
//TODO: Effects for the players eyes, might need to be in info to spawn
+
//the sockets for the player.
+
 
+
/** The Particle System Template for the Beam */
+
var particleSystem VampEyeTemplate[2];
+
 
+
/** Holds the Emitter for the Beam */
+
var ParticleSystemComponent VampEyeEmitter[2];
+
 
+
/** Where to attach the Beam */
+
var name VampEyeSockets[2];
+
 
+
/** post processing applied while holding this powerup */
+
var vector PP_Scene_MidTones;
+
var vector PP_Scene_Shadows;
+
 
+
//TODO: Some kind of kewl semi transparent material for the player.
+
 
+
simulated static function AddWeaponOverlay(UTGameReplicationInfo GRI)
+
{
+
GRI.WeaponOverlays[2] = default.OverlayMaterialInstance;
+
GRI.VehicleWeaponEffects[2] = default.VehicleWeaponEffect;
+
}
+
 
+
/** adds or removes our bonus from the given pawn */
+
/*simulated function AdjustPawn(UTPawn P, bool bRemoveBonus)
+
{
+
if(P != None && Role == ROLE_Authority)
+
{
+
if(!bRemoveBonus){}
+
else{}
+
}
+
}*/
+
 
+
//SkeletalMeshComponent(Mesh).AttachComponentToSocket( BeamEmitter[CurrentFireMode],BeamSockets[CurrentFireMode] );
+
//Mesh.GetSocketWorldLocationAndRotation('RocketSocket',RocketSocketL, RocketSocketR);
+
 
+
//SkeletalMeshComponent(Mesh).Attachments[i]
+
 
+
//native final function AttachComponent(ActorComponent Component,name BoneName,optional vector RelativeLocation,optional rotator RelativeRotation,optional vector RelativeScale);
+
//native final function DetachComponent(ActorComponent Component);
+
//native final function SkeletalMeshSocket GetSocketByName( Name InSocketName );
+
 
+
/** applies and removes any post processing effects while holding this item */
+
simulated function AdjustPPEffects(Pawn P, bool bRemove)
+
{
+
local UTPlayerController PC;
+
 
+
if(P != None){
+
PC = UTPlayerController(P.Controller);
+
if(PC == None && P.DrivenVehicle != None){
+
PC = UTPlayerController(P.DrivenVehicle.Controller);
+
}
+
if (PC != None){
+
if(bRemove){
+
PC.PostProcessModifier.Scene_HighLights -= PP_Scene_Highlights;
+
PC.PostProcessModifier.Scene_MidTones -= PP_Scene_MidTones;
+
PC.PostProcessModifier.Scene_Shadows -= PP_Scene_Shadows;
+
}else{
+
PC.PostProcessModifier.Scene_HighLights += PP_Scene_Highlights;
+
PC.PostProcessModifier.Scene_MidTones += PP_Scene_MidTones;
+
PC.PostProcessModifier.Scene_Shadows += PP_Scene_Shadows;
+
}
+
}
+
}
+
}
+
 
+
defaultproperties
+
{
+
AssignWeaponOverlay=2 //my values start here
+
 
+
PickupMessage="BLOODLUST!" //"VAMPYRIC DAMAGE!"
+
 
+
TimeRemaining=45.000000
+
RespawnTime=96.000000
+
 
+
// PowerupFadingSound=SoundCue'Newtators_Pickups.VDamage.Cue.Invis_VDamage_Loop'
+
PowerupFireSound=SoundCue'Newtators_Pickups.VDamage.Cue.VDamage_FireSound'
+
PickupSound=SoundCue'Newtators_Pickups.VDamage.Cue.Necris_IHunger_VDamage'
+
 
+
// PowerupAmbientSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_Invisibility_PowerLoopCue'
+
PowerupAmbientSound=SoundCue'Newtators_Pickups.VDamage.Cue.Invis_VDamage_Loop'
+
PowerupOverSound=SoundCue'Newtators_Pickups.VDamage.Cue.Invis_VDamage_End2'
+
 
+
OverlayMaterialInstance=Material'Newtators_Pickups.VDamage.M_VDamage_Overlay'
+
VehicleWeaponEffect=(Mesh=StaticMesh'Envy_Effects.Mesh.S_VH_Powerups',Material=Material'Envy_Effects.Energy.Materials.M_VH_Beserk')
+
PowerupStatName="POWERUPTIME_BLOODLUST"
+
IconCoords=(U=792.000000,V=41.000000,UL=43.000000,VL=58.000000)
+
 
+
PP_Scene_HighLights=(X=-0.100000,Y=0.080000,Z=0.080000)//(X=0.180000,Y=0.200000,Z=0.200000)
+
PP_Scene_MidTones=(X=-0.060000,Y=0.060000,Z=0.060000)//(X=-0.080000,Y=0.060000,Z=0.060000)
+
PP_Scene_Shadows=(X=-0.030000,Y=0.030000,Z=0.030000)//(X=-0.040000,Y=0.030000,Z=0.030000)
+
 
+
bRenderOverlays=True
+
bReceiveOwnerEvents=True
+
 
+
bCanDenyPowerup=False
+
Begin Object Class=StaticMeshComponent Name=MeshComponentV ObjName=MeshComponentV Archetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
+
StaticMesh=StaticMesh'PICKUPS.UDamage.Mesh.S_Pickups_UDamage'
+
Materials(0)=Material'Newtators_Pickups.VDamage.Materials.M_Vdamage_Base'
+
Materials(1)=Material'Newtators_Pickups.VDamage.Materials.M_Vdamage_Add'
+
// CullDistance=8000.000000
+
// CachedCullDistance=8000.000000
+
bUseAsOccluder=False
+
CastShadow=False
+
bForceDirectLightMap=True
+
bCastDynamicShadow=False
+
CollideActors=False
+
BlockRigidBody=False
+
Translation=(X=0.000000,Y=0.000000,Z=5.000000)
+
Scale3D=(X=0.600000,Y=0.800000,Z=0.600000)//Scale3D=(X=0.600000,Y=0.600000,Z=0.600000)
+
End Object
+
DroppedPickupMesh=MeshComponentV
+
PickupFactoryMesh=MeshComponentV
+
Begin Object Class=UTParticleSystemComponent Name=PickupParticles ObjName=PickupParticles Archetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
+
Template=ParticleSystem'Newtators_Pickups.VDamage.Effects.P_Pickups_VDamage_Idle'
+
bAutoActivate=False
+
Translation=(X=0.000000,Y=0.000000,Z=5.000000)
+
SecondsBeforeInactive=1.0f
+
End Object
+
DroppedPickupParticles=PickupParticles
+
}
+
 
+
//===================================================
+
// Class: UTBooster
+
// Creation date: 18/12/2007 02:23
+
// Last updated: 22/06/2008 10:09
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTBooster extends UTTimedPowerup_Generic;
+
 
+
var UTPawn Pawnt;
+
 
+
 
+
simulated static function AddWeaponOverlay(UTGameReplicationInfo GRI){}
+
 
+
/** adds or removes our bonus from the given pawn */
+
simulated function AdjustPawn(UTPawn P, bool bRemoveBonus)
+
{
+
if(P != None && Role == ROLE_Authority)
+
{
+
Pawnt = P;
+
 
+
if(!bRemoveBonus)
+
{
+
Pawnt.Spawn(class'Newtators.UTInfo_Booster',Pawnt);
+
SetTimer(4.6, True, 'GiveHealth');
+
}
+
else
+
{
+
SetTimer(0.6, False, 'GiveHealth');
+
}
+
}
+
}
+
 
+
function GiveHealth()
+
{
+
if(Pawnt != None)
+
{
+
if(Pawnt.Health >= Pawnt.SuperHealthMax)
+
Pawnt.Health = Pawnt.SuperHealthMax;
+
else
+
Pawnt.Health = Pawnt.Health + 10;
+
}
+
}
+
 
+
defaultproperties
+
{
+
TimeRemaining=45.000000 //30,60
+
WarningTime=6.000000
+
RespawnTime=110.000000 //90
+
 
+
bCanDenyPowerup=True
+
bHavePowerup=True
+
 
+
PowerupFadingSound=SoundCue'Newtators_Pickups.Booster.Cue.BoosterFading'
+
PickupSound=SoundCue'Newtators_Pickups.Booster.Cue.BoosterPickup'
+
PowerupAmbientSound=SoundCue'Newtators_Pickups.Booster.Cue.BoosterLoop'
+
// PowerupOverSound=SoundCue'Newtators_Pickups.VDamage.Cue.Invis_VDamage_End2'
+
 
+
/*
+
  OverlayMaterialInstance=Material'PICKUPS.Berserk.M_Berserk_Overlay'
+
  VehicleWeaponEffect=(Mesh=StaticMesh'Envy_Effects.Mesh.S_VH_Powerups',Material=Material'Envy_Effects.Energy.Materials.M_VH_Beserk')
+
  HudIndex=1
+
  PowerupOverSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_Berzerk_EndCue'*/
+
PowerupStatName="POWERUPTIME_BOOSTER"
+
IconCoords=(U=744.000000,UL=35.000000,VL=55.000000)
+
PP_Scene_HighLights=(X=0.000000,Y=0.300000,Z=0.000000)//(X=-0.150000,Y=0.180000,Z=-0.150000)
+
// bRenderOverlays=True
+
bReceiveOwnerEvents=True
+
PickupMessage="BOOSTER!"
+
// PickupSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_Berzerk_PickupCue'
+
Begin Object Class=StaticMeshComponent Name=MeshComponentA ObjName=MeshComponentA Archetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
+
StaticMesh=StaticMesh'PICKUPS.Berserk.Mesh.S_Pickups_Berserk'
+
Materials(0)=Material'Newtators_Pickups.Booster.Materials.M_Booster'
+
CullDistance=8000.000000
+
CachedCullDistance=8000.000000
+
bUseAsOccluder=False
+
CastShadow=False
+
bForceDirectLightMap=True
+
bCastDynamicShadow=False
+
CollideActors=False
+
BlockRigidBody=False
+
Translation=(X=0.000000,Y=0.000000,Z=5.000000)
+
Scale3D=(X=0.700000,Y=0.700000,Z=0.700000)
+
// Name="MeshComponentA"
+
// ObjectArchetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
+
End Object
+
DroppedPickupMesh=MeshComponentA
+
PickupFactoryMesh=MeshComponentA
+
 
+
/*  Begin Object Class=UTParticleSystemComponent Name=BerserkParticles ObjName=BerserkParticles Archetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
+
  Template=ParticleSystem'PICKUPS.Berserk.Effects.P_Pickups_Berserk_Idle'
+
  bAutoActivate=False
+
  Translation=(X=0.000000,Y=0.000000,Z=5.000000)
+
  Name="BerserkParticles"
+
  ObjectArchetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
+
  End Object
+
  DroppedPickupParticles=BerserkParticles*/
+
//  Name="Default__UTBooster"
+
//  ObjectArchetype=UTTimedPowerup_Generic'MutatorFramework.Default__UTTimedPowerup_Generic'
+
}
+
 
+
//===================================================
+
// Class: EnergyLeechMsg
+
// Creation date: 10/06/2008 17:08
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class EnergyLeechMsg extends VampireMsg;
+
 
+
var(Message) color Gold, Silver;
+
 
+
/*static function string GetString(
+
optional int Switch,
+
optional bool bPRI1HUD,
+
optional PlayerReplicationInfo RelatedPRI_1,
+
optional PlayerReplicationInfo RelatedPRI_2,
+
optional Object OptionalObject
+
)
+
{
+
if(Switch > 0)
+
return "+"$Switch;
+
else
+
return ""$Switch;
+
}*/
+
 
+
static function color GetColor(
+
optional int Switch,
+
optional PlayerReplicationInfo RelatedPRI_1,
+
optional PlayerReplicationInfo RelatedPRI_2,
+
optional Object OptionalObject
+
)
+
{
+
if(Switch > 0)
+
return default.Gold;
+
 
+
return default.Silver;
+
}
+
 
+
defaultproperties
+
{
+
Gold=(B=10,G=80,R=170,A=255)
+
Silver=(B=100,G=100,R=100,A=255)
+
// bBeep=False
+
// Lifetime=1.000000
+
// PosY=0.650000 //0.650000
+
// FontSize=2
+
}
+
 
+
//===================================================
+
// Class: VampireMsg
+
// Creation date: 10/06/2008 11:48
+
// Last updated: 10/06/2008 11:48
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class VampireMsg extends LocalMessage;
+
 
+
var(Message) color Green, Red;
+
 
+
static function string GetString(
+
optional int Switch,
+
optional bool bPRI1HUD,
+
optional PlayerReplicationInfo RelatedPRI_1,
+
optional PlayerReplicationInfo RelatedPRI_2,
+
optional Object OptionalObject
+
)
+
{
+
if(Switch > 0)
+
return "+"$Switch;
+
else
+
return ""$Switch;
+
}
+
 
+
static function color GetColor(
+
optional int Switch,
+
optional PlayerReplicationInfo RelatedPRI_1,
+
optional PlayerReplicationInfo RelatedPRI_2,
+
optional Object OptionalObject
+
)
+
{
+
if(Switch > 0)
+
return default.Green;
+
 
+
return default.Red;
+
}
+
 
+
defaultproperties
+
{
+
Green=(B=0,G=255,R=0,A=255)
+
Red=(B=0,G=0,R=255,A=255)
+
bBeep=False
+
Lifetime=1.000000
+
PosY=0.650000 //0.650000
+
FontSize=2
+
}
+
 
+
 
+
//===================================================
+
// Class: UTUIFrontEnd_VehicleTeamSwap
+
// Creation Date: 04/12/2007 22:21
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTUIFrontEnd_VehicleTeamSwap extends UTUIFrontEnd_Generic;
+
 
+
var transient UTUICollectionCheckBox bBlueIsNecris;
+
var transient UTUICollectionCheckBox bRedIsNecris;
+
 
+
event SceneActivated(bool bInitialActivation)
+
{
+
Super.SceneActivated(bInitialActivation);
+
 
+
if(bInitialActivation)
+
{
+
bRedIsNecris = UTUICollectionCheckBox(FindChild('cbxTeam2', true));
+
bBlueIsNecris = UTUICollectionCheckBox(FindChild('cbxTeam1', true));
+
 
+
bRedIsNecris.SetValue(class'Newtators.UTMutator_VehicleTeamSwap'.default.TeamCore[0].bTeamIsNecris);
+
bBlueIsNecris.SetValue(class'Newtators.UTMutator_VehicleTeamSwap'.default.TeamCore[1].bTeamIsNecris);
+
}
+
}
+
 
+
/** Callback for when the user accepts the changes. */
+
function OnAccept()
+
{
+
class'Newtators.UTMutator_VehicleTeamSwap '.default.TeamCore[0].bTeamIsNecris = bRedIsNecris.IsChecked();
+
class'Newtators.UTMutator_VehicleTeamSwap '.default.TeamCore[1].bTeamIsNecris = bBlueIsNecris.IsChecked();
+
class'Newtators.UTMutator_VehicleTeamSwap '.static.StaticSaveConfig();
+
 
+
CloseScene(self);
+
}
+
 
+
defaultproperties
+
{
+
MutTitle="Vehicle Team Swap"
+
}
+
 
+
//===================================================
+
// Class: UTUIFrontEnd_VehicleReplacerMenu
+
// Creation Date: 30/11/2007 22:21
+
// Last Updated: 10/08/2008 23:11
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTUIFrontEnd_VehicleReplacerMenu extends UTUIFrontEnd_Generic
+
dependson(UTMutator_VehicleReplacer);
+
 
+
//---------------------------------------------------
+
/** List of available maps. */
+
//var transient UIList AvailableList;
+
 
+
/** The last focused UI List. */
+
//var transient UIList LastFocused;
+
 
+
/** Label describing the currently selected map. */
+
//var transient UILabel DescriptionLabel;
+
 
+
/** Reference to the menu datastore */
+
//var transient UTUIDataStore_MenuItems MenuDataStore;
+
//---------------------------------------------------
+
 
+
/** Replacement info. */
+
var transient array<ReplacementInfo> VehiclesToReplace;
+
 
+
/** Reference to option list. */
+
var transient UTUIOptionList OptionList;
+
 
+
/** Reference to the options datastore. */
+
var transient UTUIDataStore_Options OptionsDataStore;
+
 
+
/** Reference to the string list datastore. */
+
var transient UTUIDataStore_StringList StringListDataStore;
+
 
+
/** Reference to the menu item datastore. */
+
//var transient UTUIDataStore_MenuItems MenuItemDataStore;
+
var transient UTUIDataStore_NewMenuItems VehicleDataStore;
+
 
+
/** List of possible Vehicle classes. */
+
var transient array<string> VehicleClassNames;
+
var transient array<string> VehicleFriendlyNames;
+
var transient array<UTUIDataProvider_Vehicles> VehicleProviders;
+
 
+
//var GameResourceDataProvider ProviderInfo;
+
//---------------------------------------------------
+
 
+
event PostInitialize()
+
{
+
Super.PostInitialize();
+
 
+
//---------------------------------------------------
+
// Store widget references
+
/*
+
AvailableList = UIList(FindChild('lstAvailable', true));
+
LastFocused = AvailableList;
+
AvailableList.OnValueChanged = OnAvailableList_ValueChanged;
+
AvailableList.OnSubmitSelection = OnAvailableList_SubmitSelection;
+
AvailableList.NotifyActiveStateChanged = OnAvailableList_NotifyActiveStateChanged;
+
AvailableList.OnRawInputKey = OnMapList_RawInputKey;
+
 
+
DescriptionLabel = UILabel(FindChild('lblDescription', true));
+
 
+
// Get reference to the menu datastore
+
MenuDataStore = UTUIDataStore_MenuItems(GetCurrentUIController().DataStoreManager.FindDataStore('UTMenuItems'));
+
*/
+
// LoadMapCycle();
+
 
+
//---------------------------------------------------
+
// `log("PostInitialize()",,'VehicleReplacer');
+
VehiclesToReplace = class'UTMutator_VehicleReplacer'.default.VehiclesToReplace;
+
 
+
OptionList = UTUIOptionList(FindChild('lstOptions', true));
+
OptionList.OnAcceptOptions=OnAcceptOptions;
+
 
+
// Get datastore references
+
OptionsDataStore = UTUIDataStore_Options(FindDataStore('UTOptions'));
+
StringListDataStore = UTUIDataStore_StringList(FindDataStore('UTStringList'));
+
// MenuItemDataStore = UTUIDataStore_MenuItems(FindDataStore('UTMenuItems'));
+
// VehicleDataStore = UTUIDataStore_Vehicle(FindDataStore('Vehicle'));
+
VehicleDataStore = new(self) class'Newtators.UTUIDataStore_NewMenuItems';
+
 
+
BuildVehicleOptions();
+
}
+
 
+
//---------------------------------------------------
+
/** Updates the description label. */
+
/*function UpdateDescriptionLabel()
+
{
+
local string NewDescription;
+
local int SelectedItem;
+
 
+
SelectedItem = LastFocused.GetCurrentItem();
+
 
+
if(class'UTUIMenuList'.static.GetCellFieldString(LastFocused, 'Description', SelectedItem, NewDescription))
+
{
+
DescriptionLabel.SetDataStoreBinding(NewDescription);
+
}
+
}*/
+
 
+
//---------------------------------------------------
+
/** Actiated event for the scene. */
+
event SceneActivated(bool bInitialActivation)
+
{
+
// `log("SceneActivated()",,'VehicleReplacer');
+
Super.SceneActivated(bInitialActivation);
+
 
+
OptionList.SetFocus(none);
+
}
+
 
+
/** Callback for when the option list is accepted. */
+
function OnAcceptOptions(UIScreenObject InObj, int PlayerIndex)
+
{
+
OnAccept();
+
}
+
 
+
/** Builds the vehicle option lists. */
+
function BuildVehicleOptions()
+
{
+
local int VehicleIdx;
+
local int SelectedIdx;
+
local int NameIdx;
+
local array<UTUIResourceDataProvider> OutProviders;
+
local array<UTUIResourceDataProvider> VehicleOptions;
+
local bool bAddVehicle;
+
local string ClassPath;
+
 
+
// Build a list of vehicles
+
VehicleProviders.length = 0;
+
VehicleClassNames.length = 0;
+
VehicleFriendlyNames.length = 0;
+
 
+
// `log("BuildVehicleOptions()",,'VehicleReplacer');
+
 
+
VehicleDataStore.GetAllResourceDataProviders(class'UTUIDataProvider_Vehicles', OutProviders);
+
// if(MenuItemDataStore.GetProviderSet('Vehicles', OutProviders))
+
// if(VehicleDataStore.GetProviderSet('Vehicle', OutProviders))
+
// {
+
for(VehicleIdx=0; VehicleIdx<OutProviders.length; VehicleIdx++)
+
{
+
bAddVehicle=true;
+
 
+
ClassPath = UTUIDataProvider_Vehicles(OutProviders[VehicleIdx]).ClassName;
+
// `log("Class1: "$ClassPath,,'VehicleReplacer');
+
// Remove content weapons from console
+
// if (class'WorldInfo'.static.IsConsoleBuild() && Left(ClassPath, 14) ~= "UTGameContent.")
+
// {
+
// bAddVehicle=false;
+
// }
+
 
+
if(bAddVehicle)
+
{
+
VehicleProviders.AddItem(UTUIDataProvider_Vehicles(OutProviders[VehicleIdx]));
+
VehicleClassNames.AddItem(ClassPath);
+
VehicleFriendlyNames.AddItem(UTUIDataProvider_Vehicles(OutProviders[VehicleIdx]).FriendlyName);
+
}
+
}
+
// }
+
 
+
// Generate weapon set if we havent already.
+
OptionsDataStore.GetSet('ReplacerVehicles', VehicleOptions);
+
 
+
if(VehicleOptions.length==0)
+
{
+
OptionsDataStore.AppendToSet('ReplacerVehicles', VehicleFriendlyNames.length);
+
OptionsDataStore.GetSet('ReplacerVehicles', VehicleOptions);
+
 
+
// Generate set of options and set of possible values
+
for(VehicleIdx=0; VehicleIdx<VehicleFriendlyNames.length; VehicleIdx++)
+
{
+
ClassPath = GetClassFieldName(VehicleClassNames[VehicleIdx]);
+
 
+
UTUIDataProvider_MenuOption(VehicleOptions[VehicleIdx]).DataStoreMarkup = "<UTStringList:"$ClassPath$">";
+
UTUIDataProvider_MenuOption(VehicleOptions[VehicleIdx]).CustomFriendlyName = VehicleFriendlyNames[VehicleIdx];
+
// `log("Generate:: Class: "$ClassPath$", Name: "$VehicleFriendlyNames[VehicleIdx],,'VehicleReplacer');
+
 
+
StringListDataStore.Empty(name(ClassPath));
+
for(NameIdx=0; NameIdx<VehicleFriendlyNames.length; NameIdx++)
+
{
+
StringListDataStore.AddStr(name(ClassPath), VehicleFriendlyNames[NameIdx]);
+
}
+
 
+
StringListDataStore.SetCurrentValueIndex(name(ClassPath), VehicleIdx);
+
}
+
 
+
OptionList.bRegenOptions=true;
+
}
+
else
+
{
+
for(VehicleIdx=0; VehicleIdx<VehicleFriendlyNames.length; VehicleIdx++)
+
{
+
ClassPath = GetClassFieldName(VehicleClassNames[VehicleIdx]);
+
// `log("Class: "$ClassPath,,'VehicleReplacer');
+
StringListDataStore.SetCurrentValueIndex(name(ClassPath), VehicleIdx);
+
}
+
}
+
 
+
// Set defaults
+
for(VehicleIdx=0; VehicleIdx<VehiclesToReplace.length; VehicleIdx++)
+
{
+
for(SelectedIdx=0; SelectedIdx<VehicleClassNames.length; SelectedIdx++)
+
{
+
if(VehiclesToReplace[VehicleIdx].NewClassPath==VehicleClassNames[SelectedIdx])
+
{
+
ClassPath = GetClassFieldName(string(VehiclesToReplace[VehicleIdx].OldClassName));
+
// `log("default Class: "$ClassPath,,'VehicleReplacer');
+
StringListDataStore.SetCurrentValueIndex(name(ClassPath), SelectedIdx);
+
}
+
}
+
}
+
 
+
OptionList.RefreshAllOptions();
+
}
+
 
+
/** @return string Returns a fieldname given a weapon class name. */
+
function string GetClassFieldName(string ClassName)
+
{
+
ClassName = Right(ClassName, Len(ClassName) - InStr(ClassName, ".") - 1);
+
ClassName = Repl(ClassName, ".", "_");
+
ClassName = "ReplaceVehicle_"$ClassName;
+
return ClassName;
+
}
+
 
+
/** Callback for when the user accepts the changes. */
+
function OnAccept()
+
{
+
local int VehicleIdx;
+
local string ClassPath;
+
local int SelectedIdx;
+
 
+
// `log("OnAccept()",,'VehicleReplacer');
+
 
+
VehiclesToReplace.length=0;
+
 
+
for(VehicleIdx=0; VehicleIdx<VehicleClassNames.length; VehicleIdx++)
+
{
+
ClassPath=GetClassFieldName(VehicleClassNames[VehicleIdx]);
+
SelectedIdx=StringListDataStore.GetCurrentValueIndex(name(ClassPath));
+
// `log("Class"$SelectedIdx$": "$ClassPath,,'VehicleReplacer');
+
 
+
if(SelectedIdx!=VehicleIdx)
+
{
+
VehiclesToReplace.length=VehiclesToReplace.length+1;
+
VehiclesToReplace[VehiclesToReplace.length-1].NewClassPath = VehicleProviders[SelectedIdx].ClassName;
+
// `log("Vehicle New Class: "$VehiclesToReplace[VehiclesToReplace.length-1].NewClassPath,,'VehicleReplacer');
+
VehiclesToReplace[VehiclesToReplace.length-1].OldClassName = name(Right(VehicleProviders[VehicleIdx].ClassName, Len(VehicleProviders[VehicleIdx].ClassName) - InStr(VehicleProviders[VehicleIdx].ClassName, ".") - 1));
+
// `log("Vehicle Old Class: "$VehiclesToReplace[VehiclesToReplace.length-1].OldClassName,,'VehicleReplacer');
+
}
+
}
+
 
+
class'UTMutator_VehicleReplacer'.default.VehiclesToReplace = VehiclesToReplace;
+
class'UTMutator_VehicleReplacer'.static.StaticSaveConfig();
+
 
+
CloseScene(self);
+
}
+
 
+
defaultproperties
+
{
+
MutTitle="Vehicle Replacer"
+
Begin Object /*Class=UIComp_Event*/ Name=SceneEventComponent ObjName=SceneEventComponent Archetype=UIComp_Event'UTGame.Default__UTUIFrontEnd:SceneEventComponent'
+
ObjectArchetype=UIComp_Event'UTGame.Default__UTUIFrontEnd:SceneEventComponent'
+
End Object
+
EventProvider=SceneEventComponent
+
}
+
 
+
//===================================================
+
// Class: UTUIFrontEnd_VampireMenu
+
// Creation Date: 30/11/2007 22:21
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTUIFrontEnd_VampireMenu extends UTUIFrontEnd_Generic;
+
 
+
var transient UTUICollectionCheckBox bSuperHealth, bVehicleVamp;
+
 
+
event SceneActivated(bool bInitialActivation)
+
{
+
Super.SceneActivated(bInitialActivation);
+
 
+
if (bInitialActivation)
+
{
+
bSuperHealth = UTUICollectionCheckBox(FindChild('cbxHealth', true));
+
bSuperHealth.SetValue(class'Newtators.UTGameRules_Vampire'.default.bUseSuperHealth);
+
bVehicleVamp = UTUICollectionCheckBox(FindChild('cbxVehicles', true));
+
bVehicleVamp.SetValue(class'Newtators.UTGameRules_Vampire'.default.bUseForVehicles);
+
}
+
}
+
 
+
/** Callback for when the user accepts the changes. */
+
function OnAccept()
+
{
+
class'Newtators.UTGameRules_Vampire'.default.bUseSuperHealth = bSuperHealth.IsChecked();
+
class'Newtators.UTGameRules_Vampire'.default.bUseForVehicles = bVehicleVamp.IsChecked();
+
class'Newtators.UTGameRules_Vampire'.static.StaticSaveConfig();
+
 
+
CloseScene(self);
+
}
+
 
+
defaultproperties
+
{
+
MutTitle="Vampire"
+
}
+
 
+
//===================================================
+
// Class: UTUIFrontEnd_HoardingMenu
+
// Creation Date: 01/02/2008 02:14
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTUIFrontEnd_HoardingMenu extends UTUIFrontEnd_Generic;
+
 
+
var transient UTUICollectionCheckBox bHoardArmour;
+
var transient UTUICollectionCheckBox bHoardHealth;
+
var transient UTUICollectionCheckBox bHoardPowerups;
+
var transient UTUICollectionCheckBox bHoardAmmo;
+
var transient UTUICollectionCheckBox bHoardWeapons;
+
 
+
event SceneActivated(bool bInitialActivation)
+
{
+
Super.SceneActivated(bInitialActivation);
+
 
+
if (bInitialActivation)
+
{
+
bHoardArmour = UTUICollectionCheckBox(FindChild('cbxHoardArmour', true));
+
bHoardHealth = UTUICollectionCheckBox(FindChild('cbxHoardHealth', true));
+
bHoardPowerups = UTUICollectionCheckBox(FindChild('cbxHoardPowerups', true));
+
bHoardAmmo = UTUICollectionCheckBox(FindChild('cbxHoardAmmo', true));
+
bHoardWeapons = UTUICollectionCheckBox(FindChild('cbxHoardWeapons', true));
+
 
+
bHoardArmour.SetValue(class'Newtators.UTGameRules_Hoarding'.default.bCanHoardArmour);
+
bHoardHealth.SetValue(class'Newtators.UTGameRules_Hoarding'.default.bCanHoardHealth);
+
bHoardPowerups.SetValue(class'Newtators.UTGameRules_Hoarding'.default.bCanHoardPowerups);
+
bHoardAmmo.SetValue(class'Newtators.UTGameRules_Hoarding'.default.bCanHoardAmmo);
+
bHoardWeapons.SetValue(class'Newtators.UTMutator_NoHoarding'.default.bHoardWeaponStay);
+
}
+
}
+
 
+
/** Callback for when the user accepts the changes. */
+
function OnAccept()
+
{
+
class'Newtators.UTGameRules_Hoarding'.default.bCanHoardArmour = bHoardArmour.IsChecked();
+
class'Newtators.UTGameRules_Hoarding'.default.bCanHoardHealth = bHoardHealth.IsChecked();
+
class'Newtators.UTGameRules_Hoarding'.default.bCanHoardPowerups = bHoardPowerups.IsChecked();
+
class'Newtators.UTGameRules_Hoarding'.default.bCanHoardAmmo = bHoardAmmo.IsChecked();
+
class'Newtators.UTMutator_NoHoarding'.default.bHoardWeaponStay = bHoardWeapons.IsChecked();
+
class'Newtators.UTGameRules_Hoarding'.static.StaticSaveConfig();
+
 
+
CloseScene(self);
+
}
+
 
+
defaultproperties
+
{
+
MutTitle="Hoarding"
+
}
+
 
+
//===================================================
+
// Class: UTUIFrontEnd_EnergyLeechMenu
+
// Creation Date: 30/11/2007 22:21
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTUIFrontEnd_EnergyLeechMenu extends UTUIFrontEnd_Generic;
+
 
+
var transient UTUICollectionCheckBox bShieldBelt;
+
var transient UTUICollectionCheckBox bVestArmour;
+
var transient UTUICollectionCheckBox bThighpadArmor;
+
var transient UTUICollectionCheckBox bHelmetArmor;
+
var transient UTUICollectionCheckBox bVehicleLeech;
+
 
+
event SceneActivated(bool bInitialActivation)
+
{
+
Super.SceneActivated(bInitialActivation);
+
 
+
if (bInitialActivation)
+
{
+
bShieldBelt = UTUICollectionCheckBox(FindChild('cbxShieldBelt', true));
+
bVestArmour = UTUICollectionCheckBox(FindChild('cbxVestArmour', true));
+
bThighpadArmor = UTUICollectionCheckBox(FindChild('cbxThighpadArmor', true));
+
bHelmetArmor = UTUICollectionCheckBox(FindChild('cbxHelmetArmor', true));
+
bVehicleLeech = UTUICollectionCheckBox(FindChild('cbxVehicles', true));
+
bShieldBelt.SetValue(class'Newtators.UTGameRules_EnergyLeech'.default.bUseShieldBelt);
+
bVestArmour.SetValue(class'Newtators.UTGameRules_EnergyLeech'.default.bUseVestArmour);
+
bThighpadArmor.SetValue(class'Newtators.UTGameRules_EnergyLeech'.default.bUseThighpadArmor);
+
bHelmetArmor.SetValue(class'Newtators.UTGameRules_EnergyLeech'.default.bUseHelmetArmor);
+
bVehicleLeech.SetValue(class'Newtators.UTGameRules_EnergyLeech'.default.bUseForVehicles);
+
}
+
}
+
 
+
/** Callback for when the user accepts the changes. */
+
function OnAccept()
+
{
+
class'Newtators.UTGameRules_EnergyLeech'.default.bUseShieldBelt = bShieldBelt.IsChecked();
+
class'Newtators.UTGameRules_EnergyLeech'.default.bUseVestArmour = bVestArmour.IsChecked();
+
class'Newtators.UTGameRules_EnergyLeech'.default.bUseThighpadArmor = bThighpadArmor.IsChecked();
+
class'Newtators.UTGameRules_EnergyLeech'.default.bUseHelmetArmor = bHelmetArmor.IsChecked();
+
class'Newtators.UTGameRules_EnergyLeech'.default.bUseForVehicles = bVehicleLeech.IsChecked();
+
class'Newtators.UTGameRules_EnergyLeech'.static.StaticSaveConfig();
+
 
+
CloseScene(self);
+
}
+
 
+
defaultproperties
+
{
+
MutTitle="Energy Leech"
+
}
+
 
+
//===================================================
+
// Class: UTUIFrontEnd_VehicleReplacerMenu
+
// Creation Date: 30/11/2007 22:21
+
// Last Updated: 01/02/2008 05:48
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTUIDataStore_NewMenuItems extends UTUIDataStore_MenuItems;
+
 
+
defaultproperties
+
{
+
//  ElementProviderTypes(0)=(ProviderTag="Vehicles",ProviderClassName="Newtators.UTUIDataProvider_Vehicle")
+
/*    ElementProviderTypes(0)=
+
  ElementProviderTypes(1)=
+
  ElementProviderTypes(2)=
+
  ElementProviderTypes(3)=
+
  ElementProviderTypes(4)=
+
  ElementProviderTypes(5)=
+
  ElementProviderTypes(6)=
+
  ElementProviderTypes(7)=
+
  ElementProviderTypes(8)=
+
  ElementProviderTypes(9)=
+
  ElementProviderTypes(10)=
+
  ElementProviderTypes(11)= */
+
//  ElementProviderTypes(12)=(ProviderTag="DropDownVehicles",ProviderClassName="Newtators.UTUIDataProvider_Vehicles")
+
  Tag="Vehicles"
+
  Name="Default__UTUIDataStore_NewMenuItems"
+
  ObjectArchetype=UIDataStore_GameResource'UTGame.Default__UTUIDataStore_MenuItems'
+
}
+
 
+
/**
+
* Provides data for a UT3 vehicle.
+
*
+
* Copyright 1998-2007 Epic Games, Inc. All Rights Reserved
+
*/
+
class UTUIDataProvider_Vehicles extends UTUIResourceDataProvider
+
PerObjectConfig;
+
 
+
/** The Vehicle class path */
+
var config string ClassName;
+
 
+
/** optional flags separated by pipes | that can be parsed by the UI as arbitrary options (for example, to exclude weapons from some menus, etc) */
+
var config string Flags;
+
 
+
/** Friendly name for the vehicle */
+
var config localized string FriendlyName;
+
 
+
/** Description for the vehicle */
+
var config localized string Description;
+
 
+
/** String reference to the 3rd person mesh for this weapon.  This mesh is used in the UI. */
+
var config string MeshReference;
+
 
+
var config bool bNecrisVehicle;
+
var config bool bTurret;
+
 
+
defaultproperties
+
{
+
  bSearchAllInis=True
+
//  Name="Default__UTUIDataProvider_Vehicle"
+
//  ObjectArchetype=UTUIResourceDataProvider'UTGame.Default__UTUIResourceDataProvider'
+
}
+
 
+
//===================================================
+
// Class: UTSpeedBoots
+
// Creation date: 29/11/2007 14:50
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTSpeedBoots extends UTTimedPowerup_Generic;
+
 
+
var float SpeedBoost; /// the Speed boost to give the owner
+
var float MultiJumpBoost; /// the Z velocity boost to give the owner's double jumps
+
 
+
/** camera overlay effect - New blur effect, no motionblur sucks >:)*/
+
//var PostProcessChain CameraEffect;
+
 
+
//TODO: If player stops then Ambient = none?
+
//A_Vehicle_Hoverboard.Cue.A_Vehicle_Hoverboard_Jump
+
 
+
/** adds or removes our bonus from the given pawn */
+
simulated function AdjustPawn(UTPawn P, bool bRemoveBonus){
+
local UTJumpBootEffect SpeedEffect;
+
local bool bCheckDoubleLanding;
+
 
+
if(P != None) {
+
if(!bRemoveBonus) {
+
`logd("Start Speed!",,'SpeedBoots');
+
// DoMotionBlur(P);
+
// ClientSetCameraEffect(P.Controller, true);
+
 
+
SpeedEffect = Spawn(class'Newtators.UTSpeedBootEffect', P,, P.Location, P.Rotation);
+
// SpeedEffect.LifeSpan = 30.00000;
+
// SpeedEffect.JumpingEffect = ParticleSystem'Newtators_Pickups.Particles.P_SpeedBoot_Effect';
+
 
+
P.AirControl = P.AirControl * SpeedBoost;
+
P.GroundSpeed = P.GroundSpeed * SpeedBoost;
+
P.WaterSpeed = P.WaterSpeed * SpeedBoost;
+
P.AirSpeed = P.AirSpeed * SpeedBoost;
+
P.MultiJumpBoost = P.MultiJumpBoost + MultiJumpBoost;
+
 
+
bCheckDoubleLanding = P.bStopOnDoubleLanding;
+
P.bStopOnDoubleLanding = False;
+
P.SlopeBoostFriction = -0.400000;
+
// increase cost of high jump nodes so bots don't waste the boots for small shortcuts
+
// if (P.Controller != None) P.Controller.HighJumpNodeCostModifier += 1000;
+
} else {
+
`logd("End Speed!",,'SpeedBoots');
+
// DoMotionBlur(P);
+
// ClientSetCameraEffect(P.Controller, false);
+
 
+
if(SpeedEffect != None)
+
SpeedEffect.Destroyed();
+
 
+
P.AirControl = P.AirControl / SpeedBoost;
+
P.GroundSpeed = P.GroundSpeed / SpeedBoost;
+
P.WaterSpeed = P.WaterSpeed / SpeedBoost;
+
P.AirSpeed = P.AirSpeed / SpeedBoost;
+
P.MultiJumpBoost = P.MultiJumpBoost - MultiJumpBoost;
+
 
+
if(!bCheckDoubleLanding)
+
P.bStopOnDoubleLanding = True;
+
 
+
P.SlopeBoostFriction = 0.200000;
+
// increase cost of high jump nodes so bots don't waste the boots for small shortcuts
+
// if (P.Controller != None) P.Controller.HighJumpNodeCostModifier -= 1000;
+
}
+
}
+
}
+
 
+
/** turns on or off the camera effect */
+
/*reliable client function ClientSetCameraEffect(Controller C, bool bEnabled)
+
{
+
local UTPlayerController PC;
+
local LocalPlayer LP;
+
// local MaterialEffect NewEffect;
+
// local byte Team;
+
local int i;
+
 
+
PC = UTPlayerController(C);
+
if(PC != None)
+
{
+
LP = LocalPlayer(PC.Player);
+
if(LP != None)
+
{
+
if(bEnabled)
+
{
+
LP.InsertPostProcessingChain(CameraEffect, INDEX_NONE, true);
+
// NewEffect = MaterialEffect(LP.PlayerPostProcess.FindPostProcessEffect('SpeedbootsEffect'));
+
// if(NewEffect != None)
+
// {
+
// Team = C.GetTeamNum();
+
// NewEffect.Material = (Team < TeamCameraMaterials.length) ? TeamCameraMaterials[Team] : TeamCameraMaterials[0];
+
// }
+
}
+
else
+
{
+
for(i = 0; i < LP.PlayerPostProcessChains.length; i++)
+
{
+
if(LP.PlayerPostProcessChains[i].FindPostProcessEffect('SpeedbootsEffect') != None)
+
{
+
LP.RemovePostProcessingChain(i);
+
i--;
+
}
+
}
+
}
+
}
+
}
+
}
+
 
+
Simulated function DoMotionBlur(UTPawn P)
+
{
+
local LocalPlayer LocPlayer;
+
local PostProcessEffect PPE;
+
 
+
LocPlayer = LocalPlayer(UTPlayerController(P.Controller).Player);
+
if(LocPlayer != None)
+
{
+
PPE = LocPlayer.PlayerPostProcess.FindPostProcessEffect('MotionBlur');
+
if(PPE != None)
+
{
+
PPE.bShowInGame = !PPE.bShowInGame;
+
}
+
 
+
if(PPE.bShowInGame)
+
{
+
MotionBlurEffect(PPE).MaxVelocity = 1.000000;//2.0
+
MotionBlurEffect(PPE).MotionBlurAmount = 0.400000;//0.5,2.5
+
MotionBlurEffect(PPE).CameraRotationThreshold=90.000000;//45
+
MotionBlurEffect(PPE).CameraTranslationThreshold = 100.000000;
+
}
+
else
+
{
+
MotionBlurEffect(PPE).MaxVelocity = 1.000000;
+
MotionBlurEffect(PPE).MotionBlurAmount = 0.400000;
+
MotionBlurEffect(PPE).CameraRotationThreshold = 90.000000;
+
MotionBlurEffect(PPE).CameraTranslationThreshold = 10000.000000;
+
}
+
}
+
}*/
+
 
+
// FootSound = SoundGroupClass.static.GetFootstepSound(FootDown, GetMaterialBelowFeet());
+
 
+
//TODO: Add sound effect for jumping and dodging
+
/*simulated function OwnerEvent(name EventName)
+
{
+
if(Role == ROLE_Authority)
+
{
+
if(EventName == 'MultiJump')
+
{
+
Charges--;
+
UTPawn(Owner).JumpBootCharge = Charges;
+
Spawn(class'UTJumpBootEffect', Owner,, Owner.Location, Owner.Rotation);
+
Owner.PlaySound(ActivateSound, false, true, false);
+
}
+
else if(EventName == 'Landed' && Charges <= 0)
+
{
+
Destroy();
+
}
+
}
+
else if(EventName == 'MultiJump')
+
{
+
Owner.PlaySound(ActivateSound, false, true, false);
+
}
+
UTPawn(Owner).bDodging;
+
}*/
+
 
+
defaultproperties
+
{
+
// CameraEffect=PostProcessChain'Newtators_Pickups.Speedboots.LensEffects.SpeedbootsPostProcess'
+
 
+
bCanDenyPowerup=True
+
bHavePowerup=True
+
SpeedBoost=1.4 //1.35,1.4, 1.45
+
MultiJumpBoost=35.000000 //25
+
TimeRemaining=30.000000
+
RespawnTime=45.000000 //30.000000
+
// PowerupAmbientSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_Hoverboard_EngineCue'
+
PowerupAmbientSound=SoundCue'Newtators_Pickups.Speedboots.Cue.SpeedbootsLoop'
+
// PowerupSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_Berzerk_WarningCue'
+
HudIndex=4
+
// PowerupOverSound=SoundCue'A_Vehicle_Hoverboard.Cue.A_Vehicle_Hoverboard_WaterDisruptCue'
+
PowerupOverSound=SoundCue'Newtators_Pickups.Speedboots.Cue.SpeedbootsEnd'
+
PowerupStatName="POWERUPTIME_SPEEDBOOTS"
+
IconCoords=(U=744.000000,UL=35.000000,VL=55.000000)
+
// PP_Scene_HighLights=(X=-0.150000,Y=-0.080000,Z=0.050000)
+
PickupMessage="Speed Boots!"
+
// bRenderOverlays=True
+
bReceiveOwnerEvents=True
+
MaxDesireability=1.000000
+
// PickupSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_JumpBoots_PickupCue'
+
PickupSound=SoundCue'Newtators_Pickups.Speedboots.Cue.SpeedbootsPickup'
+
Begin Object Class=StaticMeshComponent Name=StaticMeshComponent1 ObjName=StaticMeshComponent1 Archetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
+
StaticMesh=StaticMesh'PICKUPS.JumpBoots.Mesh.S_UN_Pickups_Jumpboots002'
+
Materials(0)=Material'Newtators_Pickups.SpeedBoots.Materials.M_SpeedBoots'
+
bUseAsOccluder=False
+
CastShadow=False
+
bForceDirectLightMap=True
+
bCastDynamicShadow=False
+
CollideActors=False
+
BlockRigidBody=False
+
Translation=(X=0.000000,Y=0.000000,Z=-20.000000)
+
Scale=1.700000
+
Name="StaticMeshComponent1"
+
ObjectArchetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
+
End Object
+
DroppedPickupMesh=StaticMeshComponent1
+
PickupFactoryMesh=StaticMeshComponent1
+
}
+
 
+
//===================================================
+
// Class: UTSpeedBootEffect
+
// Creation Date: 15/02/2008 18:12
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTSpeedBootEffect extends UTJumpBootEffect;
+
 
+
var UTEmitter RightFootEmitter, LeftFootEmitter;
+
 
+
simulated function AttachToOwner()
+
{
+
local vector SocketLocation;
+
local rotator SocketRotation;
+
 
+
`logd("Emitter Controller Attached!",,'SpeedBoots');
+
 
+
if(OwnerPawn != None && OwnerPawn.Mesh != None)
+
{
+
if(OwnerPawn.Mesh.GetSocketWorldLocationAndRotation(OwnerPawn.PawnEffectSockets[0], SocketLocation, SocketRotation))
+
{
+
RightFootEmitter = Spawn(class'UTEmitter', OwnerPawn,, SocketLocation, SocketRotation);
+
RightFootEmitter.LifeSpan=0;
+
/* if(OwnerPawn.Mesh.bOwnerNoSee)
+
{
+
FootEmitter.ParticleSystemComponent.SetOwnerNoSee(true);
+
}*/
+
RightFootEmitter.SetBase(OwnerPawn,, OwnerPawn.Mesh, OwnerPawn.PawnEffectSockets[0]);
+
RightFootEmitter.SetTemplate(JumpingEffect, true);
+
}
+
if(OwnerPawn.Mesh.GetSocketWorldLocationAndRotation(OwnerPawn.PawnEffectSockets[1], SocketLocation, SocketRotation))
+
{
+
LeftFootEmitter = Spawn(class'UTEmitter', OwnerPawn,, SocketLocation, SocketRotation);
+
LeftFootEmitter.LifeSpan=0;
+
/* if(OwnerPawn.Mesh.bOwnerNoSee)
+
{
+
FootEmitter.ParticleSystemComponent.SetOwnerNoSee(true);
+
}*/
+
LeftFootEmitter.SetBase(OwnerPawn,, OwnerPawn.Mesh, OwnerPawn.PawnEffectSockets[1]);
+
LeftFootEmitter.SetTemplate(JumpingEffect, true);
+
}
+
}
+
}
+
 
+
//event Destroyed()
+
//event ShutDown()
+
function Destroyed()
+
{
+
Super.Destroyed();
+
 
+
`logd("Emitter Controller Destroyed!",,'SpeedBoots');
+
RightFootEmitter.ParticleSystemComponent.SecondsBeforeInactive = 0.000001;
+
LeftFootEmitter.ParticleSystemComponent.SecondsBeforeInactive = 0.000001;
+
/* RightFootEmitter.ShutDown();
+
LeftFootEmitter.ShutDown();
+
ShutDown();*/
+
/* RightFootEmitter.bCurrentlyActive = false;
+
LeftFootEmitter.bCurrentlyActive = false;
+
RightFootEmitter.ParticleSystemComponent.DeactivateSystem();
+
LeftFootEmitter.ParticleSystemComponent.DeactivateSystem();
+
 
+
RightFootEmitter.ParticleSystemComponent.SetActive(false);
+
LeftFootEmitter.ParticleSystemComponent.SetActive(false);
+
 
+
RightFootEmitter.LifeSpan=0.001;
+
LeftFootEmitter.LifeSpan=0.001;
+
 
+
LifeSpan=0.001;*/
+
}
+
 
+
defaultproperties
+
{
+
LifeSpan=0.00000 //30
+
JumpingEffect=ParticleSystem'Newtators_Pickups.Speedboots.Effects.P_SpeedBoot_Effect_C'
+
}
+
 
+
//===================================================
+
// Class: UTQuadJumpBoots
+
// Creation date: 26/11/2007 12:00
+
// Last updated: 19/05/2008 07:39
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//---------------------------------------------------
+
//Modified version of UTJumpBoots to support Quadjumps
+
//TODO: add proper bot support so they know how high they can jump
+
//===================================================
+
class UTQuadJumpBoots extends UTJumpBoots;
+
 
+
var int JumpsBoost;
+
 
+
/** adds or removes our bonus from the given pawn */
+
simulated function AdjustPawn(UTPawn P, bool bRemoveBonus)
+
{
+
if(P != None)
+
{
+
if(bRemoveBonus)
+
{
+
P.MaxMultiJump = 1;
+
P.MultiJumpRemaining = 1;
+
P.MultiJumpBoost=-45;
+
P.JumpBootCharge = 0;
+
 
+
// increase cost of high jump nodes so bots don't waste the boots for small shortcuts
+
if(P.Controller != None)
+
P.Controller.HighJumpNodeCostModifier -= 400; //1000
+
}
+
else
+
{
+
P.MaxMultiJump = JumpsBoost;
+
P.MultiJumpRemaining = JumpsBoost;
+
P.MultiJumpBoost=MultiJumpBoost;
+
P.JumpBootCharge = Charges;
+
 
+
// increase cost of high jump nodes so bots don't waste the boots for small shortcuts
+
if(P.Controller != None)
+
P.Controller.HighJumpNodeCostModifier += 400; //1000
+
}
+
}
+
}
+
 
+
simulated function OwnerEvent(name EventName)
+
{
+
if(Role == ROLE_Authority)
+
{
+
if(EventName == 'MultiJump')
+
{
+
Charges--;
+
UTPawn(Owner).JumpBootCharge = Charges;
+
Spawn(class'UTJumpBootEffect', Owner,, Owner.Location, Owner.Rotation);
+
Owner.PlaySound(ActivateSound, false, true, false);
+
}
+
 
+
if(Charges <= 0)
+
{
+
Destroy();
+
}
+
}
+
else if(EventName == 'MultiJump')
+
{
+
Owner.PlaySound(ActivateSound, false, true, false);
+
}
+
}
+
 
+
defaultproperties
+
{
+
JumpsBoost=3
+
MultiJumpBoost=50.000000
+
Charges=20
+
ActivateSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_JumpBoots_JumpCue'
+
RanOutText="The Quad-Jump Boots have run out."
+
bRenderOverlays=True
+
bReceiveOwnerEvents=True
+
bDropOnDeath=True
+
RespawnTime=30.000000
+
MaxDesireability=1.000000
+
PickupMessage="Quad-Jump Boots"
+
PickupSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_JumpBoots_PickupCue'
+
Begin Object Name=StaticMeshComponent1 ObjName=StaticMeshComponent1 Archetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
+
StaticMesh=StaticMesh'PICKUPS.JumpBoots.Mesh.S_UN_Pickups_Jumpboots002'
+
bUseAsOccluder=False
+
CastShadow=False
+
bForceDirectLightMap=True
+
bCastDynamicShadow=False
+
CollideActors=False
+
BlockRigidBody=False
+
Translation=(X=0.000000,Y=0.000000,Z=-20.000000)
+
Scale=1.700000
+
End Object
+
DroppedPickupMesh=StaticMeshComponent1
+
PickupFactoryMesh=StaticMeshComponent1
+
}
+
 
+
//===================================================
+
// Class: UTPickupFactory_SpeedBoots
+
// Creation date: 19/05/2008 00:42
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTPickupFactory_SpeedBoots extends UTPickupFactory_JumpBoots;
+
 
+
defaultproperties
+
{
+
PickupStatName="PICKUPS_SPEEDBOOTS"
+
InventoryType=Class'Newtators.UTSpeedBoots'
+
bHasLocationSpeech=False //True
+
BaseBrightEmissive=(R=0.500000,G=0.500000,B=0.500000,A=1.000000)
+
BaseDimEmissive=(R=0.500000,G=0.500000,B=0.500000,A=1.000000)
+
 
+
bStatic=False //True
+
bNoDelete=False //True
+
}
+
 
+
//===================================================
+
// Class: UTPickupFactory_Booster
+
// Creation date: 19/05/2008 00:42
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTPickupFactory_Booster extends UTPickupFactory_Berserk;
+
 
+
defaultproperties
+
{
+
PickupStatName="PICKUPS_BOOSTER"
+
InventoryType=Class'Newtators.UTBooster'
+
Begin Object /*Class=UTParticleSystemComponent*/ Name=BerserkParticles ObjName=BerserkParticles Archetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
+
Template=ParticleSystem'Newtators_Pickups.Booster.Effects.P_Pickups_Booster_Idle'
+
bAutoActivate=False
+
Translation=(X=0.000000,Y=0.000000,Z=5.000000)
+
End Object
+
bHasLocationSpeech=False //True
+
BaseBrightEmissive=(R=0.000000,G=20.000000,B=1.000000,A=1.000000)
+
BaseDimEmissive=(R=0.000000,G=1.000000,B=0.100000,A=1.000000)
+
 
+
bStatic=False //True
+
bNoDelete=False //True
+
}
+
 
+
//===================================================
+
// Class: UTMutator_VehicleTeamSwap
+
// Creation date: 20/12/2008 21:03
+
// Last updated: 20/12/2008 21:38
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTMutator_VehicleTeamSwap extends UTData_FactoryRepl
+
 
+
simulated function PostBeginPlay()
+
{
+
local UTOnslaughtGame_Content WarGame;
+
local UTOnslaughtPowerCore WarCore[numTeams];
+
local UTOnslaughtPowerCore TempWarCore;
+
local UTVehicleFactory WarFactory;
+
local byte i, k;//, m;
+
local int j;
+
 
+
local bool bInPerMapList;
+
local MapTeamSwapSettings NewMapSwapSettings;
+
 
+
// local MapExceptionSwapSet NewPerMapSwapSet;
+
// local MapExceptionVehicleSet NewMapExctSwapSet[numTeams];
+
// local int Index, MapIndex;
+
//, VehicleIndex;
+
 
+
 
+
Super.PostBeginPlay();
+
 
+
/** Checks for Warfare and if found processes Cores and Vehicle Factories */
+
WarGame = UTOnslaughtGame_Content(WorldInfo.Game);
+
if(WarGame == None)
+
{
+
`logd("Skipping Core checks, Gametype is not Warfare!",,'VehicleTeamSwap');
+
// Destroy();
+
}
+
else
+
{
+
 
+
class UTMutator_Vampire extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
GroupNames(0)="VAMPIRE"
+
UTGameDataClass=Class'Newtators.UTD_Game_Vampire'
+
}
+
 
+
//===================================================
+
// Class: UTPickupFactory_VDamage
+
// Creation date: 19/12/2007 08:47
+
//---------------------------------------------------
+
// Attribution-Noncommercial-Share Alike 2.5 Generic
+
// http://creativecommons.org/licenses/by-nc-sa/2.5/
+
//===================================================
+
class UTPickupFactory_VDamage extends UTPickupFactory_UDamage;
+
 
+
defaultproperties
+
{
+
PickupStatName="PICKUPS_VDAMAGE"
+
InventoryType=Class'Newtators.UTVDamage'
+
Begin Object /*Class=UTParticleSystemComponent*/ Name=DamageParticles ObjName=DamageParticles Archetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
+
Template=ParticleSystem'Newtators_Pickups.VDamage.Effects.P_Pickups_VDamage_Idle'
+
bAutoActivate=False
+
Translation=(X=0.000000,Y=0.000000,Z=5.000000)
+
// Name="DamageParticles"
+
// ObjectArchetype=UTParticleSystemComponent'UTGame.Default__UTParticleSystemComponent'
+
End Object
+
bHasLocationSpeech=False //True
+
BaseBrightEmissive=(R=50.000000,G=1.000000,B=0.000000,A=1.000000)
+
BaseDimEmissive=(R=5.000000,G=0.100000,B=0.000000,A=1.000000)
+
 
+
bStatic=False //True
+
bNoDelete=False //True
+
}
+
 
+
class UTMutator_Translocator extends UTMutator_GameExpansion;
+
 
+
defaultproperties
+
{
+
GroupNames(0)="TRANSLOC"
+
bAllowTranslocator=True
+
bUseNewDefaultInventory=True
+
NewDefaultInventory(0)=Class'UTGame.UTWeap_Enforcer';
+
NewDefaultInventory(1)=Class'UTGame.UTWeap_ImpactHammer';
+
NewDefaultInventory(2)=class'UTGameContent.UTWeap_Translocator_Content';
+
}
+
</uscript>
+

Revision as of 01:35, 12 January 2010