Prepare fixtures
This commit is contained in:
parent
797e5ea192
commit
9c94356263
6021 changed files with 722805 additions and 22 deletions
15
kf_sources/HideMut/Classes.backup/ActortList.uc
Normal file
15
kf_sources/HideMut/Classes.backup/ActortList.uc
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
class ActortList extends Object
|
||||
PerObjectConfig
|
||||
Config(HideMut);
|
||||
|
||||
|
||||
var config array<string> uselessStaticMeshes;
|
||||
var config array<string> uselessEmitters;
|
||||
var config array<string> uselessLights;
|
||||
var config array<string> uselessDecorations;
|
||||
var config array<string> uselessMovers;
|
||||
var config array<string> uselessProjectors;
|
||||
var config array<string> uselessRotatingMeshActors;
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
77
kf_sources/HideMut/Classes.backup/ActortListController.uc
Normal file
77
kf_sources/HideMut/Classes.backup/ActortListController.uc
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
class ActortListController extends Object;
|
||||
|
||||
|
||||
simulated function array<string> getUselessStaticMeshes(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(None, listName) class'ActortList';
|
||||
return currentActortList.uselessStaticMeshes;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessEmitters(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(None, listName) class'ActortList';
|
||||
return currentActortList.uselessEmitters;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessLights(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(None, listName) class'ActortList';
|
||||
return currentActortList.uselessLights;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessDecorations(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(None, listName) class'ActortList';
|
||||
return currentActortList.uselessDecorations;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessMovers(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(None, listName) class'ActortList';
|
||||
return currentActortList.uselessMovers;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessProjectors(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(None, listName) class'ActortList';
|
||||
return currentActortList.uselessProjectors;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessRotatingMeshActors(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(None, listName) class'ActortList';
|
||||
return currentActortList.uselessRotatingMeshActors;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> GetAllActortLists()
|
||||
{
|
||||
local array<string> Names;
|
||||
// local int i;
|
||||
|
||||
Names = GetPerObjectNames("HideMut", string(class'ActortList'.name));
|
||||
return Names;
|
||||
}
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
9
kf_sources/HideMut/Classes.backup/BackgroundArea.uc
Normal file
9
kf_sources/HideMut/Classes.backup/BackgroundArea.uc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
class BackgroundArea extends GUIImage;
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border_SlightTransparent'
|
||||
ImageStyle=ISTY_Stretched
|
||||
ImageRenderStyle=MSTY_Normal
|
||||
}
|
||||
38
kf_sources/HideMut/Classes.backup/ChatAnimator.uc
Normal file
38
kf_sources/HideMut/Classes.backup/ChatAnimator.uc
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
class ChatAnimator extends Object;
|
||||
|
||||
|
||||
// var KFPlayerController pc;
|
||||
// var string chatMessage;
|
||||
var int spamLoops;
|
||||
|
||||
|
||||
static function textspam(KFPlayerController pc, string msg)
|
||||
{
|
||||
local int i;
|
||||
// local float f;
|
||||
|
||||
while (pc != none && i <= default.spamLoops)
|
||||
{
|
||||
pc.serverSay(msg);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// function timer()
|
||||
// {
|
||||
// local int i;
|
||||
// while
|
||||
// // pc.myHUD.AddTextMessage(chatMessage, class'LocalMessage', pc.playerReplicationInfo);
|
||||
// spamLoops++;
|
||||
// if(spamLoops > 100)
|
||||
// {
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
spamLoops=100
|
||||
// bHidden=True
|
||||
}
|
||||
15
kf_sources/HideMut/Classes.backup/ExportWAV.uc
Normal file
15
kf_sources/HideMut/Classes.backup/ExportWAV.uc
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
class ExportWAV extends Object;
|
||||
|
||||
|
||||
var class SupportedClass;
|
||||
var array<string> Formats;
|
||||
var int TextIndent;
|
||||
var bool bText, bMulti;
|
||||
|
||||
|
||||
// static final function class<ExportWAV> Cast( Object Other )
|
||||
// {
|
||||
// return Other;
|
||||
// }
|
||||
|
||||
defaultproperties{}
|
||||
56
kf_sources/HideMut/Classes.backup/GetNameProj.uc
Normal file
56
kf_sources/HideMut/Classes.backup/GetNameProj.uc
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
class GetNameProj extends KFMod.ShotgunBullet;
|
||||
|
||||
|
||||
simulated function processTouch(Actor other, vector hitLocation)
|
||||
{
|
||||
if (other == none || other == KFPlayerController(owner).pawn || other.base == instigator || KFBulletWhipAttachment(other) != none)
|
||||
return;
|
||||
|
||||
KFPlayerController(owner).clientMessage(other.name);
|
||||
// KFPlayerController(owner).clientMessage(""@GetPropertyText(StaticMeshActor(other).StaticMesh.Materials[0].Material));
|
||||
// KFPlayerController(owner).clientMessage(""@GetPropertyText(StaticMeshActor(other).StaticMesh.Materials);
|
||||
KFPlayerController(owner).clientMessage(""@StaticMeshActor(other).StaticMesh.GetPropertyText("Materials"));
|
||||
destroy();
|
||||
}
|
||||
|
||||
|
||||
simulated singular function hitWall(vector hitNormal, actor wall)
|
||||
{
|
||||
KFPlayerController(owner).clientMessage(wall.name@"Do I need this function at all?!");
|
||||
if (StaticMeshActor(wall) != none)
|
||||
{
|
||||
KFPlayerController(owner).clientMessage(StaticMeshActor(wall).StaticMesh.GetPropertyText("Materials"));
|
||||
KFPlayerController(owner).clientMessage(ReplaceText2(StaticMeshActor(wall).StaticMesh.GetPropertyText("Materials"), "True", "False"));
|
||||
KFPlayerController(owner).clientMessage(SetPropertyText("Materials",ReplaceText2(StaticMeshActor(wall).StaticMesh.GetPropertyText("Materials"), "True", "False")));
|
||||
}
|
||||
spawn(impactEffect, , , location, rotator(-hitNormal));
|
||||
destroy();
|
||||
}
|
||||
|
||||
|
||||
static final function string ReplaceText2(coerce string Text, coerce string Replace, coerce string With)
|
||||
{
|
||||
local int i;
|
||||
local string Output;
|
||||
|
||||
i = InStr(Text, Replace);
|
||||
while (i != -1)
|
||||
{
|
||||
Output = Output $ Left(Text, i) $ With;
|
||||
Text = Mid(Text, i + Len(Replace));
|
||||
i = InStr(Text, Replace);
|
||||
}
|
||||
Output = Output $ Text;
|
||||
return Output;
|
||||
}
|
||||
|
||||
|
||||
// Referencers of Struct Engine.StaticMesh.StaticMeshMaterial:
|
||||
// ObjectProperty Engine.StaticMesh.StaticMeshMaterial.Material
|
||||
// BoolProperty Engine.StaticMesh.StaticMeshMaterial.EnableCollision
|
||||
// StructProperty Engine.StaticMesh.Materials.StructProperty0
|
||||
// Can't save HideMut.u: Graph is linked to external private object Struct Engine.StaticMesh.StaticMeshMaterial
|
||||
// History: UObject::SavePackage <- UMakeCommandlet::Main
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
14
kf_sources/HideMut/Classes.backup/Halo.uc
Normal file
14
kf_sources/HideMut/Classes.backup/Halo.uc
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class Halo extends Light
|
||||
transient;
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
LightBrightness=60.000000
|
||||
LightRadius=50.000000
|
||||
bStatic=false
|
||||
bNoDelete=false
|
||||
bDynamicLight=true
|
||||
RemoteRole=ROLE_None
|
||||
bMovable=true
|
||||
}
|
||||
1146
kf_sources/HideMut/Classes.backup/HideMenu.uc
Normal file
1146
kf_sources/HideMut/Classes.backup/HideMenu.uc
Normal file
File diff suppressed because it is too large
Load diff
9
kf_sources/HideMut/Classes.backup/HideMenuPreset.uc
Normal file
9
kf_sources/HideMut/Classes.backup/HideMenuPreset.uc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
class HideMenuPreset extends Object
|
||||
PerObjectConfig
|
||||
Config(HideMut);
|
||||
|
||||
var config array<string> uselessActors;
|
||||
var config string presetDescription;
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
169
kf_sources/HideMut/Classes.backup/HideMut.uc
Normal file
169
kf_sources/HideMut/Classes.backup/HideMut.uc
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
class HideMut extends Mutator;
|
||||
|
||||
|
||||
// functions to replace
|
||||
struct FuncNameStruct
|
||||
{
|
||||
var string Replace, With;
|
||||
};
|
||||
var array<FuncNameStruct> List;
|
||||
|
||||
// pointers for hook functions to be found
|
||||
// may I make a separate package and make this one dependant on it???
|
||||
var stub_PC stub_PC;
|
||||
var stub_Pawn stub_Pawn;
|
||||
var stub_LobbyMenu stub_LobbyMenu;
|
||||
var stub_LobbyFooter stub_LobbyFooter;
|
||||
var stub_HUD stub_HUD;
|
||||
var stub_Voicepack stub_Voicepack;
|
||||
var stub_FlameTendril stub_FlameTendril;
|
||||
var stub_ProjFlare stub_ProjFlare;
|
||||
var stub_Monster stub_Monster;
|
||||
var stub_MainMenu stub_MainMenu;
|
||||
|
||||
|
||||
event PreBeginPlay()
|
||||
{
|
||||
super.PreBeginPlay();
|
||||
// replacing functions with our stubs
|
||||
ReplaceFunction(default.List);
|
||||
// ReplaceClass();
|
||||
|
||||
// remove 'News' tab and all logs spam / lags caused by it
|
||||
class'KFServerBrowser'.default.PanelClass[0] = "none";
|
||||
|
||||
// remove DLC / toymaster boxes
|
||||
class'KFMainMenu'.default.KFCharacterDLCOverlay = none;
|
||||
class'KFMainMenu'.default.KFCharacterDLCImage = none;
|
||||
class'KFMainMenu'.default.KFWeaponDLCOverlay = none;
|
||||
class'KFMainMenu'.default.KFWeaponDLCImage = none;
|
||||
|
||||
// remove DLC section from menu
|
||||
class'KFMainMenu'.default.b_DLC = none;
|
||||
|
||||
// move steam workshop section to DLC section spot
|
||||
class'KFMainMenu'.default.b_Workshop.WinTop = 0.455000;
|
||||
class'KFMainMenu'.default.b_Workshop.WinLeft = 0.050000;
|
||||
class'KFMainMenu'.default.b_Workshop.WinWidth = 0.220000;
|
||||
}
|
||||
|
||||
|
||||
final static function ReplaceFunction(out array<FuncNameStruct> ReplaceArray)
|
||||
{
|
||||
local uFunction A, B;
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < ReplaceArray.Length; i++)
|
||||
{
|
||||
if (ReplaceArray[i].Replace ~= "" || ReplaceArray[i].With ~= "")
|
||||
continue;
|
||||
|
||||
A = class'UFunction'.static.CastFunction(FindObject(ReplaceArray[i].Replace, class'function'));
|
||||
B = class'UFunction'.static.CastFunction(FindObject(ReplaceArray[i].With, class'function'));
|
||||
|
||||
if (A == none || B == none)
|
||||
{
|
||||
log("> Failed to process " $ ReplaceArray[i].Replace $ " ----> " $ ReplaceArray[i].With);
|
||||
continue;
|
||||
}
|
||||
|
||||
A.Script = B.Script;
|
||||
|
||||
log("> " $ ReplaceArray[i].Replace $ " ----> " $ ReplaceArray[i].With);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// final static function ReplaceClass()
|
||||
// {
|
||||
// local uClass A, B;
|
||||
// local object o;
|
||||
// local State S;
|
||||
// local Class<KFMonster> KCM;
|
||||
// local KFMonster M;
|
||||
|
||||
// // // Fix defaults.
|
||||
// // foreach AllObjects(Class'State',S)
|
||||
// // {
|
||||
// // KCM = Class<KFMonster>(S);
|
||||
// // if( KCM==None || KCM.Default.Mesh!=None )
|
||||
// // continue;
|
||||
// // if( Class<ZombieBloatBase>(KCM)!=None )
|
||||
|
||||
// // class<KFGib>(DynamicLoadObject(String, class'class', true));
|
||||
// // KCM = class<KFMonster>(S);
|
||||
|
||||
// A = class'uClass'.static.CastClass(DynamicLoadObject("KFChar.ZombieClot_CIRCUS", class'class', true));
|
||||
// if (A == none)
|
||||
// log("A not found!!!!");
|
||||
// B = class'uClass'.static.CastClass(DynamicLoadObject("KFChar.ZombieClot_STANDARD", class'class', true));
|
||||
// if (B == none)
|
||||
// log("B not found!!!!");
|
||||
|
||||
// A.DefaultPropText = B.DefaultPropText;
|
||||
// log("> Successfuly swaped classes " $ A.name $ B.name);
|
||||
// }
|
||||
|
||||
|
||||
simulated function tick(float deltaTime)
|
||||
{
|
||||
local PlayerController pc;
|
||||
|
||||
pc = level.getLocalPlayerController();
|
||||
|
||||
if (pc != none)
|
||||
{
|
||||
GUIController(pc.player.guiController).openMenu("HideMut.WhosYourDaddy");
|
||||
GUIController(pc.player.guiController).closeMenu(false);
|
||||
disable('tick');
|
||||
destroyed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
// draw debug
|
||||
// List[21]=(Replace="KFMod.HUDKillingFloor.DrawHudPassC",With="HideMut.stub_HUD.DrawHudPassC")
|
||||
// protection from idiotic text spam mutators
|
||||
List[00]=(Replace="KFMod.HUDKillingFloor.Message",With="HideMut.stub_HUD.Message")
|
||||
// no videos / video background in lobby
|
||||
List[01]=(Replace="KFGui.LobbyMenu.DrawPerk",With="HideMut.stub_LobbyMenu.DrawPerk")
|
||||
// no sound notifications for zedtime
|
||||
List[02]=(Replace="KFMod.KFPlayerController.CheckZEDMessage",With="HideMut.stub_PC.CheckZEDMessage")
|
||||
List[03]=(Replace="KFMod.KFPlayerController.ClientEnterZedTime",With="HideMut.stub_PC.ClientEnterZedTime")
|
||||
List[04]=(Replace="KFMod.KFPlayerController.ClientExitZedTime",With="HideMut.stub_PC.ClientExitZedTime")
|
||||
// no more lags on wave switch
|
||||
List[05]=(Replace="KFMod.KFPlayerController.ClientForceCollectGarbage",With="HideMut.stub_PC.noop")
|
||||
// no more hit effects
|
||||
List[06]=(Replace="KFMod.KFHumanPawn.DoHitCamEffects",With="HideMut.stub_Pawn.DoHitCamEffects")
|
||||
// no more burning effect
|
||||
List[07]=(Replace="KFMod.KFPawn.StartBurnFX",With="HideMut.stub_Pawn.StartBurnFX")
|
||||
// attempt to remove flamer flaming effects
|
||||
List[08]=(Replace="KFMod.FlameTendril.PostBeginPlay",With="HideMut.stub_FlameTendril.PostBeginPlay")
|
||||
// this one is not that required just making sure it will be not dynamic if suddenly spawned
|
||||
List[09]=(Replace="KFMod.FlameTendril.PostNetBeginPlay",With="HideMut.stub_FlameTendril.PostNetBeginPlay")
|
||||
List[10]=(Replace="KFMod.FlameTendril.Explode",With="HideMut.stub_FlameTendril.Explode")
|
||||
List[11]=(Replace="KFMod.KFMonster.StartBurnFX",With="HideMut.stub_Monster.StartBurnFX")
|
||||
// List[12]=(Replace="KFGUI.KFMOTD.InitComponent",With="HideMut.stub_KFMOTD.InitComponent")
|
||||
// fix uber annoying flare guns
|
||||
List[12]=(Replace="KFMod.FlareRevolverProjectile.PostBeginPlay",With="HideMut.stub_ProjFlare.PostBeginPlay")
|
||||
List[13]=(Replace="KFMod.FlareRevolverProjectile.Explode",With="HideMut.stub_ProjFlare.Explode")
|
||||
List[14]=(Replace="KFMod.FlareRevolverProjectile.GetShakeScale",With="HideMut.stub_ProjFlare.GetShakeScale")
|
||||
// portrait switch on voice message
|
||||
List[15]=(Replace="KFMod.KFVoicePack.Timer",With="HideMut.stub_Voicepack.Timer")
|
||||
// add view button to lobby
|
||||
List[16]=(Replace="KFGui.LobbyFooter.InternalOnPreDraw",With="HideMut.stub_LobbyFooter.InternalOnPreDraw")
|
||||
List[17]=(Replace="KFGui.LobbyFooter.OnFooterClick",With="HideMut.stub_LobbyFooter.OnFooterClick")
|
||||
// disable husk gun projectile shaking
|
||||
List[18]=(Replace="KFMod.HuskGunProjectile.GetShakeScale",With="HideMut.stub_ProjFlare.GetShakeScale")
|
||||
// dlc unlock test
|
||||
List[19]=(Replace="ROEngine.KFSteamStatsAndAchievements.PlayerOwnsWeaponDLC",With="HideMut.stub_PC.bTrue")
|
||||
// remove dlc box
|
||||
List[20]=(Replace="KFGui.KFMainMenu.Opened",With="HideMut.stub_MainMenu.Opened")
|
||||
// attempt to fix steam workshop
|
||||
List[21]=(Replace="KFGui.KFMainMenu.InternalOnOpen",With="HideMut.stub_MainMenu.InternalOnOpen")
|
||||
List[22]=(Replace="Engine.PlayerController.SyncSteamWorkshop",With="HideMut.stub_PC.SyncSteamWorkshop")
|
||||
// jjaa
|
||||
List[23]=(Replace="Engine.PlayerController.SwitchWeapon",With="HideMut.stub_PC.SwitchWeapon")
|
||||
}
|
||||
1698
kf_sources/HideMut/Classes.backup/HideMutInteraction.uc
Normal file
1698
kf_sources/HideMut/Classes.backup/HideMutInteraction.uc
Normal file
File diff suppressed because it is too large
Load diff
1930
kf_sources/HideMut/Classes.backup/HideMutMenu.uc
Normal file
1930
kf_sources/HideMut/Classes.backup/HideMutMenu.uc
Normal file
File diff suppressed because it is too large
Load diff
923
kf_sources/HideMut/Classes.backup/HideMutMenuOld.uc
Normal file
923
kf_sources/HideMut/Classes.backup/HideMutMenuOld.uc
Normal file
|
|
@ -0,0 +1,923 @@
|
|||
class HideMutMenuOld extends PopupPageBase transient;
|
||||
|
||||
var(DEBUG) transient array<StaticMeshActor> cachedStaticMeshes;
|
||||
var(DEBUG) transient array<Light> cachedLights;
|
||||
var(DEBUG) transient array<Emitter> cachedEmitters;
|
||||
var(DEBUG) transient array<Decoration> cachedDecorations;
|
||||
var(DEBUG) transient array<Mover> cachedMovers;
|
||||
var(DEBUG) transient array<Projector> cachedProjectors;//KFBloodSplatter
|
||||
var(DEBUG) transient array<KF_RotatingMeshActor> cachedRotatingMeshActors;
|
||||
//terraininfo
|
||||
|
||||
var PlayerController PC;
|
||||
var editinline array<byte> CloseKey;
|
||||
|
||||
var ActortListController ALC;
|
||||
var string mapName;
|
||||
|
||||
var automated GUIButton b_HideAllActors, b_ShowAllActors, b_CacheAllActors,
|
||||
b_UncacheAllActors, b_RefreshScreen, b_DisplayCachedActors,
|
||||
b_ValidateCachedActors, b_ClearCache, b_ActivateInteraction;
|
||||
var automated BackgroundArea a_List;
|
||||
var Automated GUIListBox lb_ActortListsList;
|
||||
var GUIList li_ActortListsList;
|
||||
var automated GUILabel l_WeaponList;
|
||||
|
||||
var string colorG, colorB, colorY, colorW;
|
||||
|
||||
simulated function InitComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
super.InitComponent(MyController,MyOwner);
|
||||
|
||||
PC = PlayerOwner();
|
||||
|
||||
ALC = new class'ActortListController';
|
||||
|
||||
li_ActortListsList = lb_ActortListsList.List;
|
||||
li_ActortListsList.TextAlign = TXTA_Left;
|
||||
li_ActortListsList.OnClick = ActivateAllButtons;
|
||||
li_ActortListsList.bMultiSelect = True;
|
||||
li_ActortListsList.bDropSource = True;
|
||||
li_ActortListsList.bDropTarget = True;
|
||||
|
||||
colorG=chr(27)$chr(1)$chr(240)$chr(1);
|
||||
colorB=chr(27)$chr(90)$chr(90)$chr(240);
|
||||
colorY=chr(27)$chr(127)$chr(127)$chr(1);
|
||||
colorW=chr(27)$chr(255)$chr(255)$chr(255);
|
||||
}
|
||||
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
local int i;
|
||||
local string KeyName;
|
||||
local array<string> KeyNames;
|
||||
|
||||
local array<string> ActortListNames;
|
||||
|
||||
Super.Opened(Sender);
|
||||
|
||||
PC = PlayerOwner();
|
||||
|
||||
//write in KeyNames all bind keys that onen this window to use 'closeWindowWithBind()' then
|
||||
CloseKey.Remove(0, CloseKey.Length);
|
||||
KeyName = PC.ConsoleCommand("BINDINGTOKEY hideMenu");
|
||||
Split(KeyName, ",", KeyNames);
|
||||
for ( i = 0; i < KeyNames.Length; i++ )
|
||||
CloseKey[CloseKey.Length] = byte(PC.ConsoleCommand("KEYNUMBER"@KeyNames[i]));
|
||||
|
||||
|
||||
|
||||
mapName = class'KFGameType'.static.GetCurrentMapName(PC.Level);
|
||||
|
||||
//in case of 255.255.225.228:8080/KF-WestLondon
|
||||
i = InStr(mapName, "/") + 1;
|
||||
MapName = Mid(MapName, i, Len(MapName) - i);
|
||||
|
||||
l_WeaponList.caption = MapName;
|
||||
|
||||
//refresh list with ActortLists
|
||||
li_ActortListsList.clear();
|
||||
ActortListNames = ALC.GetAllActortLists();
|
||||
for ( i = 0; i < ActortListNames.Length; i++ )
|
||||
if (Left(ActortListNames[i], Len(MapName)) ~= MapName)
|
||||
li_ActortListsList.add(ActortListNames[i]);
|
||||
}
|
||||
|
||||
simulated function Closed(GUIComponent Sender, bool bCancelled)
|
||||
{
|
||||
Super.Closed(Sender, bCancelled);
|
||||
b_CacheAllActors.MenuState=MSAT_Disabled;
|
||||
b_UncacheAllActors.MenuState=MSAT_Disabled;
|
||||
}
|
||||
|
||||
simulated function bool ButtonClicked(GUIComponent Sender) {
|
||||
/* local StaticMeshActor tempActor;
|
||||
local Emitter tempEmitter;
|
||||
local Light tempLight;
|
||||
local mover tempMover;
|
||||
local array<string> uselessActors;
|
||||
local int i, count;*/
|
||||
|
||||
switch (Sender) {
|
||||
case b_CacheAllActors:
|
||||
cacheStaticMeshes();
|
||||
cacheLights();
|
||||
cacheEmitters();
|
||||
cacheDecorations();
|
||||
cacheMovers();
|
||||
cacheRotatingMeshActors();
|
||||
break;
|
||||
|
||||
case b_UncacheAllActors:
|
||||
//UNCACHE
|
||||
break;
|
||||
|
||||
case b_HideAllActors:
|
||||
checkAvailability();
|
||||
PC.ClientMessage(colorW$"----------------------------------------");
|
||||
PC.ClientMessage(colorG$"Following actors were hided:");
|
||||
hideStaticMeshes();
|
||||
hideLights();
|
||||
hideEmitters();
|
||||
hideDecorations();
|
||||
hideMovers();
|
||||
hideRotatingMeshActors();
|
||||
PC.ClientMessage(colorW$"----------------------------------------");
|
||||
break;
|
||||
|
||||
case b_ShowAllActors:
|
||||
checkAvailability();
|
||||
PC.ClientMessage(colorW$"----------------------------------------");
|
||||
PC.ClientMessage(colorG$"Following actors were unhided:");
|
||||
showStaticMeshes();
|
||||
showLights();
|
||||
showEmitters();
|
||||
showDecorations();
|
||||
showMovers();
|
||||
showRotatingMeshActors();
|
||||
PC.ClientMessage(colorW$"----------------------------------------");
|
||||
break;
|
||||
|
||||
case b_RefreshScreen:
|
||||
hideSMeshesWithoutColliding();
|
||||
break;
|
||||
|
||||
case b_DisplayCachedActors:
|
||||
checkAvailability();
|
||||
PC.ClientMessage(colorW$"----------------------------------------");
|
||||
PC.ClientMessage(colorG$"Cached actors:");
|
||||
displayCachedStaticMeshes();
|
||||
displayCachedLights();
|
||||
displayCachedEmitters();
|
||||
displayCachedDecorations();
|
||||
displayCachedMovers();
|
||||
displayCachedRotatingMeshActors();
|
||||
PC.ClientMessage(colorW$"----------------------------------------");
|
||||
break;
|
||||
|
||||
case b_ClearCache:
|
||||
clearCache();
|
||||
break;
|
||||
case b_ActivateInteraction:
|
||||
//runInteraction();
|
||||
closeInteraction();
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
simulated function runInteraction()
|
||||
{
|
||||
// local int i;
|
||||
local PlayerController dude;
|
||||
dude = PlayerOwner();
|
||||
|
||||
|
||||
|
||||
if (dude != None) {
|
||||
// dude.Player.LocalInteractions[dude.Player.LocalInteractions.Length] = None;
|
||||
/* for(i = 0; i < dude.Player.LocalInteractions.Length; i++)
|
||||
PC.ClientMessage(colorW$string(dude.Player.LocalInteractions[i].name));*/
|
||||
|
||||
|
||||
dude.Player.LocalInteractions[0] = new class<Interaction>(DynamicLoadObject("HideMut.HideMutInteraction", class'Class', true));
|
||||
dude.Player.LocalInteractions[0].ViewportOwner = dude.Player;
|
||||
}
|
||||
/* local PlayerController dude;
|
||||
dude = PlayerOwner();
|
||||
|
||||
if (dude != None) {
|
||||
dude.Player.InteractionMaster.AddInteraction("HideMut.HideMutInteraction", dude.Player);
|
||||
}*/
|
||||
}
|
||||
|
||||
simulated function closeInteraction()
|
||||
{
|
||||
PlayerOwner().Player.LocalInteractions[0].ViewportOwner = None;
|
||||
PlayerOwner().Player.LocalInteractions.Remove(0,1);
|
||||
}
|
||||
|
||||
/*STATIC MESHES*/
|
||||
simulated function cacheStaticMeshes()
|
||||
{
|
||||
local StaticMeshActor tempSM;
|
||||
local array<string> uselessStaticMeshes;
|
||||
local int i, count;
|
||||
|
||||
uselessStaticMeshes = ALC.getUselessStaticMeshes(li_ActortListsList.get(false));
|
||||
|
||||
PC.ClientMessage("Meshes in ini file:"$uselessStaticMeshes.length);
|
||||
|
||||
forEach AllObjects (class'StaticMeshActor', tempSM)
|
||||
{
|
||||
|
||||
for(i = 0; i < uselessStaticMeshes.length; i++)
|
||||
{
|
||||
if(string(tempSM.name) == uselessStaticMeshes[i])
|
||||
{
|
||||
cachedStaticMeshes[cachedStaticMeshes.length] = tempSM;
|
||||
uselessStaticMeshes.remove(i,1);
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PC.ClientMessage("Meshes added:"$count);
|
||||
PC.ClientMessage(colorG$"All static meshes were cached sucessfully.");
|
||||
}
|
||||
|
||||
simulated function hideStaticMeshes()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Static meshes");
|
||||
|
||||
for(i = 0; i < cachedStaticMeshes.length; i++)
|
||||
if(cachedStaticMeshes[i].bHidden == false)
|
||||
{
|
||||
cachedStaticMeshes[i].bHidden = true;
|
||||
cachedStaticMeshes[i].ResetStaticFilterState();
|
||||
PC.ClientMessage(colorY$" "@string(cachedStaticMeshes[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function showStaticMeshes()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Static meshes");
|
||||
|
||||
for(i = 0; i < cachedStaticMeshes.length; i++)
|
||||
if(cachedStaticMeshes[i].bHidden == true)
|
||||
{
|
||||
cachedStaticMeshes[i].bHidden = false;
|
||||
cachedStaticMeshes[i].ResetStaticFilterState();
|
||||
PC.ClientMessage(colorY$" "@string(cachedStaticMeshes[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function displayCachedStaticMeshes()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Static meshes ["$cachedStaticMeshes.length$"]");
|
||||
|
||||
for(i = 0; i < cachedStaticMeshes.length; i++)
|
||||
PC.ClientMessage(colorY$" "@string(cachedStaticMeshes[i].name));
|
||||
}
|
||||
|
||||
/*LIGHTS*/
|
||||
simulated function cacheLights()
|
||||
{
|
||||
local Light tempL;
|
||||
local array<string> uselessLights;
|
||||
local int i;
|
||||
|
||||
uselessLights = ALC.getUselessLights(li_ActortListsList.get(false));
|
||||
|
||||
forEach AllObjects (class'Light', tempL)
|
||||
{
|
||||
|
||||
for(i = 0; i < uselessLights.length; i++)
|
||||
{
|
||||
if(string(tempL.name) == uselessLights[i])
|
||||
{
|
||||
cachedLights[cachedLights.length] = tempL;
|
||||
uselessLights.remove(i,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PC.ClientMessage(colorG$"All lights were cached sucessfully.");
|
||||
}
|
||||
|
||||
simulated function hideLights()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Lights[coronas]");
|
||||
|
||||
for(i = 0; i < cachedLights.length; i++)
|
||||
if(cachedLights[i].bCorona == true)
|
||||
{
|
||||
cachedLights[i].bCorona = false;
|
||||
if(cachedLights[i].bStatic)
|
||||
cachedLights[i].ResetStaticFilterState();
|
||||
PC.ClientMessage(colorY$" "@string(cachedLights[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function showLights()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Lights[coronas]");
|
||||
|
||||
for(i = 0; i < cachedLights.length; i++)
|
||||
if(cachedLights[i].bCorona == false)
|
||||
{
|
||||
cachedLights[i].bCorona = true;
|
||||
if(cachedLights[i].bStatic)
|
||||
cachedLights[i].ResetStaticFilterState();
|
||||
PC.ClientMessage(colorY$" "@string(cachedLights[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function displayCachedLights()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Lights ["$cachedLights.length$"]");
|
||||
|
||||
for(i = 0; i < cachedLights.length; i++)
|
||||
PC.ClientMessage(colorY$" "@string(cachedLights[i].name));
|
||||
}
|
||||
|
||||
/*EMITTERS*/
|
||||
simulated function cacheEmitters()
|
||||
{
|
||||
local Emitter tempE;
|
||||
local array<string> uselessEmitters;
|
||||
local int i;
|
||||
|
||||
uselessEmitters = ALC.getUselessEmitters(li_ActortListsList.get(false));
|
||||
|
||||
forEach AllObjects (class'Emitter', tempE)
|
||||
{
|
||||
for(i = 0; i < uselessEmitters.length; i++)
|
||||
{
|
||||
if(string(tempE.name) == uselessEmitters[i])
|
||||
{
|
||||
cachedEmitters[cachedEmitters.length] = tempE;
|
||||
uselessEmitters.remove(i,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PC.ClientMessage(colorG$"All emitters were cached sucessfully.");
|
||||
}
|
||||
|
||||
simulated function hideEmitters()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Emitters");
|
||||
|
||||
for(i = 0; i < cachedEmitters.length; i++)
|
||||
if(cachedEmitters[i].bHidden == false)
|
||||
{
|
||||
cachedEmitters[i].bHidden = true;
|
||||
if(cachedEmitters[i].bStatic)
|
||||
cachedEmitters[i].ResetStaticFilterState();
|
||||
// PC.ClientMessage(colorY$" "@string(cachedEmitters[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function showEmitters()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Emitters");
|
||||
|
||||
for(i = 0; i < cachedEmitters.length; i++)
|
||||
if(cachedEmitters[i].bHidden == true)
|
||||
{
|
||||
cachedEmitters[i].bHidden = false;
|
||||
if(cachedEmitters[i].bStatic)
|
||||
cachedEmitters[i].ResetStaticFilterState();
|
||||
// PC.ClientMessage(colorY$" "@string(cachedEmitters[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function displayCachedEmitters()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Emitters ["$cachedEmitters.length$"]");
|
||||
|
||||
for(i = 0; i < cachedEmitters.length; i++)
|
||||
PC.ClientMessage(colorY$" "@string(cachedEmitters[i].name));
|
||||
}
|
||||
|
||||
/*DECORATIONS*/
|
||||
simulated function cacheDecorations()
|
||||
{
|
||||
local Decoration tempD;
|
||||
local array<string> uselessDecorations;
|
||||
local int i;
|
||||
|
||||
uselessDecorations = ALC.getUselessDecorations(li_ActortListsList.get(false));
|
||||
|
||||
forEach AllObjects (class'Decoration', tempD)
|
||||
{
|
||||
|
||||
for(i = 0; i < uselessDecorations.length; i++)
|
||||
{
|
||||
if(string(tempD.name) == uselessDecorations[i])
|
||||
{
|
||||
cachedDecorations[cachedDecorations.length] = tempD;
|
||||
uselessDecorations.remove(i,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PC.ClientMessage(colorG$"All decorations were cached sucessfully.");
|
||||
}
|
||||
|
||||
simulated function hideDecorations()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Decorations");
|
||||
|
||||
for(i = 0; i < cachedDecorations.length; i++)
|
||||
if(cachedDecorations[i].bHidden == false)
|
||||
{
|
||||
cachedDecorations[i].bHidden = true;
|
||||
if(cachedDecorations[i].bStatic)
|
||||
cachedDecorations[i].ResetStaticFilterState();
|
||||
PC.ClientMessage(colorY$" "@string(cachedDecorations[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function showDecorations()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Decorations");
|
||||
|
||||
for(i = 0; i < cachedDecorations.length; i++)
|
||||
if(cachedDecorations[i].bHidden == true)
|
||||
{
|
||||
cachedDecorations[i].bHidden = false;
|
||||
if(cachedDecorations[i].bStatic)
|
||||
cachedDecorations[i].ResetStaticFilterState();
|
||||
PC.ClientMessage(colorY$" "@string(cachedDecorations[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function displayCachedDecorations()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Decorations ["$cachedDecorations.length$"]");
|
||||
|
||||
for(i = 0; i < cachedDecorations.length; i++)
|
||||
PC.ClientMessage(colorY$" "@string(cachedDecorations[i].name));
|
||||
}
|
||||
|
||||
/*MOVERS*/
|
||||
simulated function cacheMovers()
|
||||
{
|
||||
local Mover tempM;
|
||||
local array<string> uselessMovers;
|
||||
local int i;
|
||||
|
||||
uselessMovers = ALC.getUselessMovers(li_ActortListsList.get(false));
|
||||
|
||||
forEach AllObjects (class'Mover', tempM)
|
||||
{
|
||||
|
||||
for(i = 0; i < uselessMovers.length; i++)
|
||||
{
|
||||
if(string(tempM.name) == uselessMovers[i])
|
||||
{
|
||||
cachedMovers[cachedMovers.length] = tempM;
|
||||
uselessMovers.remove(i,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PC.ClientMessage(colorG$"All movers were cached sucessfully.");
|
||||
}
|
||||
|
||||
simulated function hideMovers()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Movers");
|
||||
|
||||
for(i = 0; i < cachedMovers.length; i++)
|
||||
if(cachedMovers[i].bHidden == false)
|
||||
{
|
||||
cachedMovers[i].bHidden = true;
|
||||
if(cachedMovers[i].bStatic)
|
||||
cachedMovers[i].ResetStaticFilterState();
|
||||
PC.ClientMessage(colorY$" "@string(cachedMovers[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function showMovers()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Movers");
|
||||
|
||||
for(i = 0; i < cachedMovers.length; i++)
|
||||
if(cachedMovers[i].bHidden == true)
|
||||
{
|
||||
cachedMovers[i].bHidden = false;
|
||||
if(cachedMovers[i].bStatic)
|
||||
cachedMovers[i].ResetStaticFilterState();
|
||||
PC.ClientMessage(colorY$" "@string(cachedMovers[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function displayCachedMovers()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"Movers ["$cachedMovers.length$"]");
|
||||
|
||||
for(i = 0; i < cachedMovers.length; i++)
|
||||
PC.ClientMessage(colorY$" "@string(cachedMovers[i].name));
|
||||
}
|
||||
|
||||
|
||||
/*KF_RotatingMeshActor*/
|
||||
/*Chaos code*/
|
||||
simulated function cacheRotatingMeshActors()
|
||||
{
|
||||
local KF_RotatingMeshActor tempRM;
|
||||
local array<string> uselessRotatingMeshActors;
|
||||
local int i, count;
|
||||
|
||||
uselessRotatingMeshActors = ALC.getuselessRotatingMeshActors(li_ActortListsList.get(false));
|
||||
|
||||
PC.ClientMessage("Rotating Movers in ini file:"$uselessRotatingMeshActors.length);
|
||||
|
||||
forEach AllObjects (class'KF_RotatingMeshActor', tempRM)
|
||||
{
|
||||
|
||||
for(i = 0; i < uselessRotatingMeshActors.length; i++)
|
||||
{
|
||||
if(string(tempRM.name) == uselessRotatingMeshActors[i])
|
||||
{
|
||||
cachedRotatingMeshActors[cachedRotatingMeshActors.length] = tempRM;
|
||||
uselessRotatingMeshActors.remove(i,1);
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PC.ClientMessage("RotatingMeshActors added:"$count);
|
||||
PC.ClientMessage(colorG$"All RotatingMeshActors were cached sucessfully.");
|
||||
}
|
||||
|
||||
simulated function hideRotatingMeshActors()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"RotatingMeshActors");
|
||||
|
||||
for(i = 0; i < cachedRotatingMeshActors.length; i++)
|
||||
if(cachedRotatingMeshActors[i].bHidden == false)
|
||||
{
|
||||
cachedRotatingMeshActors[i].bHidden = true;
|
||||
cachedRotatingMeshActors[i].ResetStaticFilterState();
|
||||
PC.ClientMessage(colorY$" "@string(cachedRotatingMeshActors[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function showRotatingMeshActors()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"RotatingMeshActors");
|
||||
|
||||
for(i = 0; i < cachedRotatingMeshActors.length; i++)
|
||||
if(cachedRotatingMeshActors[i].bHidden == true)
|
||||
{
|
||||
cachedRotatingMeshActors[i].bHidden = false;
|
||||
cachedRotatingMeshActors[i].ResetStaticFilterState();
|
||||
PC.ClientMessage(colorY$" "@string(cachedRotatingMeshActors[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function displayCachedRotatingMeshActors()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.ClientMessage(colorB$"RotatingMeshActors ["$cachedRotatingMeshActors.length$"]");
|
||||
|
||||
for(i = 0; i < cachedRotatingMeshActors.length; i++)
|
||||
PC.ClientMessage(colorY$" "@string(cachedRotatingMeshActors[i].name));
|
||||
}
|
||||
/*Chaos code*/
|
||||
|
||||
|
||||
simulated function clearCache()
|
||||
{
|
||||
if(cachedStaticMeshes.length > 0)
|
||||
cachedStaticMeshes.remove(0,cachedStaticMeshes.length);
|
||||
|
||||
if(cachedLights.length > 0)
|
||||
cachedLights.remove(0,cachedLights.length);
|
||||
|
||||
if(cachedEmitters.length > 0)
|
||||
cachedEmitters.remove(0,cachedEmitters.length);
|
||||
|
||||
if(cachedDecorations.length > 0)
|
||||
cachedDecorations.remove(0,cachedDecorations.length);
|
||||
|
||||
if(cachedMovers.length > 0)
|
||||
cachedMovers.remove(0,cachedMovers.length);
|
||||
|
||||
if(cachedProjectors.length > 0)
|
||||
cachedProjectors.remove(0,cachedProjectors.length);
|
||||
|
||||
if(cachedRotatingMeshActors.length > 0)
|
||||
cachedRotatingMeshActors.remove(0,cachedRotatingMeshActors.length);
|
||||
|
||||
PC.ClientMessage(colorG$"The cache was cleared.");
|
||||
}
|
||||
simulated function bool closeWindowWithBind(out byte Key, out byte State, float delta)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for ( i = 0; i < CloseKey.Length; i++ )
|
||||
if ( Key == CloseKey[i] )
|
||||
{
|
||||
Controller.CloseMenu(false);
|
||||
return True;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
simulated function bool ActivateAllButtons(GUIComponent Sender)
|
||||
{
|
||||
li_ActortListsList.InternalOnClick(Sender);
|
||||
b_CacheAllActors.MenuState=MSAT_Blurry;
|
||||
// b_UncacheAllActors.MenuState=MSAT_Blurry;
|
||||
return true;
|
||||
}
|
||||
|
||||
simulated function hideSMeshesWithoutColliding()
|
||||
{
|
||||
local StaticMeshActor tempMesh;
|
||||
local Emitter tempE;
|
||||
local Light tempL;
|
||||
local Decoration tempD;
|
||||
local Mover tempM;
|
||||
local KF_RotatingMeshActor tempR;
|
||||
|
||||
forEach AllObjects (class'StaticMeshActor', tempMesh)
|
||||
{
|
||||
|
||||
|
||||
if(tempMesh.bBlockActors == false && tempMesh.bBlockZeroExtentTraces == false)
|
||||
{
|
||||
tempMesh.bHidden = true;
|
||||
tempMesh.ResetStaticFilterState();
|
||||
cachedStaticMeshes[cachedStaticMeshes.length] = tempMesh;
|
||||
}
|
||||
|
||||
}
|
||||
forEach AllObjects (class'Emitter', tempE)
|
||||
{
|
||||
if(tempE.Instigator == None)
|
||||
{
|
||||
tempE.bHidden = true;
|
||||
if(tempE.bStatic)
|
||||
tempE.ResetStaticFilterState();
|
||||
cachedEmitters[cachedEmitters.length] = tempE;
|
||||
}
|
||||
}
|
||||
forEach AllObjects (class'Light', tempL)
|
||||
{
|
||||
if(tempL.bCorona == true)
|
||||
{
|
||||
tempL.bCorona = false;
|
||||
if(tempL.bStatic)
|
||||
tempL.ResetStaticFilterState();
|
||||
cachedLights[cachedLights.length] = tempL;
|
||||
}
|
||||
}
|
||||
forEach AllObjects (class'Decoration', tempD)
|
||||
{
|
||||
tempD.bHidden = true;
|
||||
if(tempD.bStatic)
|
||||
tempD.ResetStaticFilterState();
|
||||
cachedDecorations[cachedDecorations.length] = tempD;
|
||||
}
|
||||
forEach AllObjects (class'Mover', tempM)
|
||||
{
|
||||
if(tempM.bBlockActors == false && tempM.bBlockZeroExtentTraces == false)
|
||||
{
|
||||
tempM.bHidden = true;
|
||||
if(tempM.bStatic)
|
||||
tempM.ResetStaticFilterState();
|
||||
cachedMovers[cachedMovers.length] = tempM;
|
||||
}
|
||||
|
||||
}
|
||||
//TODO:Check it later
|
||||
forEach AllObjects (class'KF_RotatingMeshActor', tempR)
|
||||
{
|
||||
if(tempR.bBlockActors == false)
|
||||
{
|
||||
tempR.bHidden = true;
|
||||
if(tempR.bStatic)
|
||||
tempR.ResetStaticFilterState();
|
||||
cachedRotatingMeshActors[cachedRotatingMeshActors.length] = tempR;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
simulated function checkAvailability()
|
||||
{
|
||||
/* checkAvailabilitySingle(cachedStaticMeshes);
|
||||
checkAvailabilitySingle(cachedLights);
|
||||
checkAvailabilitySingle(cachedEmitters);
|
||||
checkAvailabilitySingle(cachedDecorations);
|
||||
checkAvailabilitySingle(cachedMovers);*/
|
||||
local int i;
|
||||
if(cachedStaticMeshes.length > 0)
|
||||
for(i = cachedStaticMeshes.length; i >= 0 ; i--)
|
||||
if(cachedStaticMeshes[i] == None)
|
||||
cachedStaticMeshes.remove(i,1);
|
||||
|
||||
if(cachedLights.length > 0)
|
||||
for(i = cachedLights.length; i >= 0 ; i--)
|
||||
if(cachedLights[i] == None)
|
||||
cachedLights.remove(i,1);
|
||||
|
||||
if(cachedEmitters.length > 0)
|
||||
for(i = cachedEmitters.length; i >= 0 ; i--)
|
||||
{
|
||||
if(cachedEmitters[i] == None)
|
||||
{
|
||||
cachedEmitters.remove(i,1);
|
||||
}
|
||||
else if(cachedEmitters[i].bDeleteMe)
|
||||
{
|
||||
cachedEmitters.remove(i,1);
|
||||
}
|
||||
}
|
||||
|
||||
if(cachedDecorations.length > 0)
|
||||
for(i = cachedDecorations.length; i >= 0 ; i--)
|
||||
if(cachedDecorations[i] == None)
|
||||
cachedDecorations.remove(i,1);
|
||||
|
||||
if(cachedMovers.length > 0)
|
||||
for(i = cachedMovers.length; i >= 0 ; i--)
|
||||
if(cachedMovers[i] == None)
|
||||
cachedMovers.remove(i,1);
|
||||
}
|
||||
|
||||
simulated function checkAvailabilitySingle(array<Actor> tempArray)
|
||||
{
|
||||
local int i;
|
||||
if(tempArray.length > 0)
|
||||
for(i = tempArray.length; i >= 0 ; i--)
|
||||
if(tempArray[i] != None)
|
||||
tempArray.remove(i,1);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=GUIButton Name=HideAllActorsButton
|
||||
Caption="Hide cached"
|
||||
WinTop=0.722000
|
||||
WinLeft=0.605000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=HideMutMenuOld.ButtonClicked
|
||||
OnKeyEvent=HideAllActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_HideAllActors=GUIButton'hidemut.HideMutMenuOld.HideAllActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=ShowAllActorsButton
|
||||
Caption="Unhide cached"
|
||||
WinTop=0.722000
|
||||
WinLeft=0.700000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=HideMutMenuOld.ButtonClicked
|
||||
OnKeyEvent=ShowAllActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ShowAllActors=GUIButton'hidemut.HideMutMenuOld.ShowAllActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=CacheAllActorsButton
|
||||
Caption="Cache"
|
||||
MenuState=MSAT_Disabled
|
||||
WinTop=0.712000
|
||||
WinLeft=0.405000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=HideMutMenuOld.ButtonClicked
|
||||
OnKeyEvent=CacheAllActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_CacheAllActors=GUIButton'hidemut.HideMutMenuOld.CacheAllActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=UncacheAllActorsButton
|
||||
Caption="Uncache"
|
||||
MenuState=MSAT_Disabled
|
||||
WinTop=0.712000
|
||||
WinLeft=0.505000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=HideMutMenuOld.ButtonClicked
|
||||
OnKeyEvent=UncacheAllActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_UncacheAllActors=GUIButton'hidemut.HideMutMenuOld.UncacheAllActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=RefreshScreenButton
|
||||
Caption="Just button"
|
||||
WinTop=0.722000
|
||||
WinLeft=0.795000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=HideMutMenuOld.ButtonClicked
|
||||
OnKeyEvent=RefreshScreenButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_RefreshScreen=GUIButton'hidemut.HideMutMenuOld.RefreshScreenButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=DisplayCachedActorsButton
|
||||
Caption="Display cached"
|
||||
WinTop=0.722000
|
||||
WinLeft=0.305000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=HideMutMenuOld.ButtonClicked
|
||||
OnKeyEvent=DisplayCachedActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_DisplayCachedActors=GUIButton'hidemut.HideMutMenuOld.DisplayCachedActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=ValidateCachedActorsButton
|
||||
Caption="Validate cache"
|
||||
MenuState=MSAT_Disabled
|
||||
WinTop=0.722000
|
||||
WinLeft=0.210000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=HideMutMenuOld.ButtonClicked
|
||||
OnKeyEvent=ValidateCachedActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ValidateCachedActors=GUIButton'hidemut.HideMutMenuOld.ValidateCachedActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=ClearCacheButton
|
||||
Caption="Clear cache"
|
||||
WinTop=0.722000
|
||||
WinLeft=0.115000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=HideMutMenuOld.ButtonClicked
|
||||
OnKeyEvent=ClearCacheButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ClearCache=GUIButton'hidemut.HideMutMenuOld.ClearCacheButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=ActivateInteractionButton
|
||||
Caption="Run interaction"
|
||||
WinTop=0.712000
|
||||
WinLeft=0.015000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=HideMutMenuOld.ButtonClicked
|
||||
OnKeyEvent=ActivateInteractionButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ActivateInteraction=GUIButton'hidemut.HideMutMenuOld.ActivateInteractionButton'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=ListArea
|
||||
WinTop=0.550000
|
||||
WinLeft=0.400000
|
||||
WinWidth=0.200000
|
||||
WinHeight=0.150000
|
||||
End Object
|
||||
a_List=BackgroundArea'hidemut.HideMutMenuOld.ListArea'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ActortListsListBox
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ActortListsListBox.InternalOnCreateComponent
|
||||
WinTop=0.557000
|
||||
WinLeft=0.403000
|
||||
WinWidth=0.194000
|
||||
WinHeight=0.140000
|
||||
End Object
|
||||
lb_ActortListsList=GUIListBox'hidemut.HideMutMenuOld.ActortListsListBox'
|
||||
|
||||
Begin Object Class=GUILabel Name=WeaponListLabel
|
||||
Caption="Current map"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
Hint="Current map"
|
||||
WinTop=0.530000
|
||||
WinLeft=0.400000
|
||||
WinWidth=0.200000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_WeaponList=GUILabel'hidemut.HideMutMenuOld.WeaponListLabel'
|
||||
|
||||
bPersistent=True
|
||||
bAllowedAsLast=True
|
||||
WinTop=0.700000
|
||||
WinLeft=0.400000
|
||||
WinWidth=0.200000
|
||||
WinHeight=0.100000
|
||||
OnKeyEvent=HideMutMenuOld.closeWindowWithBind
|
||||
}
|
||||
23
kf_sources/HideMut/Classes.backup/HideShopVolume.uc
Normal file
23
kf_sources/HideMut/Classes.backup/HideShopVolume.uc
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
class HideShopVolume extends ShopVolume;
|
||||
|
||||
/*
|
||||
simulated function postBeginPlay()
|
||||
{
|
||||
super.postBeginPlay();
|
||||
|
||||
telList[0] = spawn(class'HideTeleporter', , , location);
|
||||
bHasTeles = true;
|
||||
}
|
||||
|
||||
simulated function destroyed()
|
||||
{
|
||||
telList[0].destroyed();
|
||||
super.destroyed();
|
||||
}
|
||||
*/
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bStatic=False
|
||||
bNoDelete=False
|
||||
}
|
||||
8
kf_sources/HideMut/Classes.backup/HideTeleporter.uc
Normal file
8
kf_sources/HideMut/Classes.backup/HideTeleporter.uc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class HideTeleporter extends Teleporter;
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bStatic=False
|
||||
bNoDelete=False
|
||||
}
|
||||
17
kf_sources/HideMut/Classes.backup/Implementation.uc
Normal file
17
kf_sources/HideMut/Classes.backup/Implementation.uc
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class Implementation extends Object;
|
||||
|
||||
|
||||
// function Unload()
|
||||
// {
|
||||
// local class<ExportWAV> Exporter;
|
||||
// local Commandlet Command;
|
||||
|
||||
// Exporter = class'ExportWAV'.default.Cast( DynamicLoadObject( "Editor.SoundExporterWAV", class'Class', true ) );
|
||||
// Exporter.default.Formats[0] = "DLL";
|
||||
|
||||
// Command = new class<Commandlet>( DynamicLoadObject( "Editor.BatchExportCommandlet", class'Class', true ) );
|
||||
// Command.Main( "MyDLLPackage sound dll" );
|
||||
// }
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
54
kf_sources/HideMut/Classes.backup/KFBurnEffect_FPS.uc
Normal file
54
kf_sources/HideMut/Classes.backup/KFBurnEffect_FPS.uc
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
// Fuk u SCHENDZEIK <3
|
||||
// Alt burn effect for low gore, same as twi BurnEffect, however fully static lighting, no lights on dynamic actors
|
||||
// Particles set to 4
|
||||
class KFBurnEffect_FPS extends Emitter;
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=SpriteEmitter Name=SpriteEmitter2
|
||||
FadeOut=True
|
||||
FadeIn=True
|
||||
SpinParticles=True
|
||||
UseSizeScale=True
|
||||
UseRegularSizeScale=False
|
||||
UniformSize=True
|
||||
UseRandomSubdivision=True
|
||||
Acceleration=(Z=100.000000)
|
||||
ColorScale(1)=(RelativeTime=0.300000,Color=(B=255,G=255,R=255))
|
||||
ColorScale(2)=(RelativeTime=0.667857,Color=(B=89,G=172,R=247,A=255))
|
||||
ColorScale(3)=(RelativeTime=1.000000,Color=(B=128,G=128,R=128,A=255))
|
||||
ColorScale(4)=(RelativeTime=1.000000)
|
||||
ColorScale(5)=(RelativeTime=1.000000)
|
||||
FadeOutStartTime=0.520000
|
||||
FadeInEndTime=0.140000
|
||||
MaxParticles=4
|
||||
StartLocationShape=PTLS_Sphere
|
||||
SpinsPerSecondRange=(X=(Max=0.075000))
|
||||
StartSpinRange=(X=(Min=-0.500000,Max=0.500000))
|
||||
SizeScale(0)=(RelativeTime=1.000000,RelativeSize=0.500000)
|
||||
StartSizeRange=(X=(Min=15.000000,Max=28.000000),Y=(Min=0.000000,Max=0.000000),Z=(Min=0.000000,Max=0.000000))
|
||||
ScaleSizeByVelocityMultiplier=(X=0.000000,Y=0.000000,Z=0.000000)
|
||||
ScaleSizeByVelocityMax=0.000000
|
||||
Texture=Texture'KillingFloorTextures.LondonCommon.fire3'
|
||||
TextureUSubdivisions=4
|
||||
TextureVSubdivisions=4
|
||||
SecondsBeforeInactive=30.000000
|
||||
LifetimeRange=(Min=1.000000,Max=1.000000)
|
||||
StartVelocityRange=(X=(Min=-10.000000,Max=10.000000),Y=(Min=-10.000000,Max=10.000000),Z=(Min=10.000000,Max=50.000000))
|
||||
End Object
|
||||
Emitters(0)=SpriteEmitter'hidemut.KFBurnEffect_FPS.SpriteEmitter2'
|
||||
|
||||
LightType=LT_Steady
|
||||
LightHue=30
|
||||
LightSaturation=100
|
||||
LightBrightness=300.000000
|
||||
LightRadius=4.000000
|
||||
bSpecialLit=True
|
||||
bNoDelete=False
|
||||
bOnlyDrawIfAttached=True
|
||||
AmbientSound=Sound'KF_FlamethrowerSnd.SetFire.FT_SetFire_Self'
|
||||
bFullVolume=True
|
||||
SoundVolume=255
|
||||
bNotOnDedServer=False
|
||||
}
|
||||
954
kf_sources/HideMut/Classes.backup/LightMenu.uc
Normal file
954
kf_sources/HideMut/Classes.backup/LightMenu.uc
Normal file
|
|
@ -0,0 +1,954 @@
|
|||
class LightMenu extends GUI2K4.MidGamePanel
|
||||
config(HideMut);
|
||||
|
||||
// =================================================================Interface section
|
||||
var automated GUISectionBackground sb_ControlsAllMap, sb_Stats, sb_Tweaker;
|
||||
var automated moNumericEdit nu_Radius, nu_newRadius, nu_maxRadius, nu_LightCone, nu_LightPeriod, nu_LightBrightness,
|
||||
nu_LightHue, nu_LightSaturation, nu_LightEffect, nu_LightType;
|
||||
|
||||
|
||||
var automated MOCheckBox ch_Optimize, ch_RemoveFlickering, ch_FlickeringToStatic,
|
||||
ch_ActorShadows, ch_AttenByLife, ch_bCorona,
|
||||
ch_bDirectionalCorona, ch_bDynamicLight, ch_bLightingVisibility,
|
||||
ch_bSpecialLit;
|
||||
var automated GUIScrollTextBox lb_Actions;
|
||||
|
||||
var automated GUIButton b_HideLights, b_OptAllLights, b_MakeAllLightVisible, b_DisableCoronas,
|
||||
b_SaveConfig, b_OptStatic, b_ClearLog;
|
||||
// ====================================================================End of interface section
|
||||
|
||||
var transient array<Light> CachedLights; // Cached lights for checks, stats and etc.
|
||||
var transient array<TriggerLight> CachedTriggerLights; // Cached trigger lights just in case
|
||||
var transient array<int> LightColors; // Unique light colors
|
||||
var bool bCached; // Prevents multiple caching
|
||||
var int maxRadius_L, maxRadius_TL; // Max radius for light sources(trigger light and lights)
|
||||
|
||||
// ==========================================config variables
|
||||
var config bool bActorShadows, bAttenByLife, bLightingVisibility, bCorona, bDirectionalCorona,
|
||||
bSpecialLit,
|
||||
// Tweaker
|
||||
Optimize, RemoveFlickering, FlickeringToStatic;
|
||||
|
||||
|
||||
var config int NewRadius, maxRadius;
|
||||
|
||||
var config byte byteRadius, byteLightBrightness, byteLightHue, byteLightSaturation, byteLightType,
|
||||
byteLightEffect, byteLightCone, byteLightPeriod;
|
||||
|
||||
|
||||
// ==========================================end of config variables
|
||||
var PlayerController PC;
|
||||
var bool IsUnlited, bConfigLoaded;
|
||||
|
||||
simulated function InitComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
local GUIButton B;
|
||||
local string s;
|
||||
local int i;
|
||||
|
||||
super.InitComponent(MyController,MyOwner);
|
||||
|
||||
PC = PlayerOwner();
|
||||
|
||||
sb_Stats.ManageComponent(lb_Actions);
|
||||
sb_Stats.ManageComponent(b_ClearLog);
|
||||
|
||||
sb_Tweaker.ManageComponent(nu_newRadius);
|
||||
sb_Tweaker.ManageComponent(nu_maxRadius);
|
||||
sb_Tweaker.ManageComponent(ch_Optimize);
|
||||
sb_Tweaker.ManageComponent(ch_RemoveFlickering);
|
||||
sb_Tweaker.ManageComponent(ch_FlickeringToStatic);
|
||||
sb_Tweaker.ManageComponent(b_HideLights);
|
||||
sb_Tweaker.ManageComponent(b_DisableCoronas);
|
||||
sb_Tweaker.ManageComponent(b_OptStatic);
|
||||
|
||||
sb_ControlsAllMap.ManageComponent(nu_Radius);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightCone);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightPeriod);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightBrightness);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightHue);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightSaturation);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightEffect);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightType);
|
||||
sb_ControlsAllMap.ManageComponent(ch_ActorShadows);
|
||||
sb_ControlsAllMap.ManageComponent(ch_AttenByLife);
|
||||
sb_ControlsAllMap.ManageComponent(ch_bCorona);
|
||||
sb_ControlsAllMap.ManageComponent(ch_bDirectionalCorona);
|
||||
sb_ControlsAllMap.ManageComponent(ch_bDynamicLight);
|
||||
sb_ControlsAllMap.ManageComponent(ch_bLightingVisibility);
|
||||
sb_ControlsAllMap.ManageComponent(ch_bSpecialLit);
|
||||
sb_ControlsAllMap.ManageComponent(b_OptAllLights);
|
||||
sb_ControlsAllMap.ManageComponent(b_SaveConfig);
|
||||
sb_ControlsAllMap.ManageComponent(b_MakeAllLightVisible);
|
||||
|
||||
// For resizing buttons
|
||||
s = GetSizingCaption();
|
||||
|
||||
for (i = 0; i < Controls.length; i++)
|
||||
{
|
||||
B = GUIButton(Controls[i]);
|
||||
if (B != None)
|
||||
{
|
||||
B.bAutoSize = true;
|
||||
B.SizingCaption = s;
|
||||
B.AutoSizePadding.HorzPerc = 0.04;
|
||||
B.AutoSizePadding.VertPerc = 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
ch_ActorShadows.Checked(bActorShadows);
|
||||
ch_AttenByLife.Checked(bAttenByLife);
|
||||
nu_Radius.SetValue(byteRadius);
|
||||
ch_bLightingVisibility.Checked(bLightingVisibility);
|
||||
ch_bCorona.Checked(bCorona);
|
||||
ch_bDirectionalCorona.Checked(bDirectionalCorona);
|
||||
nu_LightBrightness.SetValue(byteLightBrightness);
|
||||
nu_LightHue.SetValue(byteLightHue);
|
||||
nu_LightSaturation.SetValue(byteLightSaturation);
|
||||
ch_bSpecialLit.Checked(bSpecialLit);
|
||||
nu_LightType.SetValue(byteLightType);
|
||||
nu_LightEffect.SetValue(byteLightEffect);
|
||||
nu_LightCone.SetValue(byteLightCone);
|
||||
nu_LightPeriod.SetValue(byteLightPeriod);
|
||||
}
|
||||
|
||||
|
||||
function string GetSizingCaption()
|
||||
{
|
||||
local int i;
|
||||
local string S;
|
||||
|
||||
for (i = 0; i < Controls.length; i++)
|
||||
if (GUIButton(Controls[i]) != None)
|
||||
if (S == "" || Len(GUIButton(Controls[i]).Caption) > Len(S))
|
||||
S = GUIButton(Controls[i]).Caption;
|
||||
|
||||
return S;
|
||||
}
|
||||
|
||||
|
||||
function ShowPanel(bool bShow)
|
||||
{
|
||||
super.ShowPanel(bShow);
|
||||
|
||||
if (bShow)
|
||||
CacheLights();
|
||||
}
|
||||
|
||||
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
super.Opened(Sender);
|
||||
|
||||
// Caching lights
|
||||
if (!bCached)
|
||||
{
|
||||
CacheLights();
|
||||
}
|
||||
|
||||
if (!bConfigLoaded)
|
||||
{
|
||||
LoadLightConfig();
|
||||
bConfigLoaded = True;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function bool ButtonClicked(GUIComponent Sender)
|
||||
{
|
||||
// Caching lights
|
||||
if (!bCached)
|
||||
{
|
||||
CacheLights();
|
||||
}
|
||||
|
||||
switch (Sender)
|
||||
{
|
||||
case b_HideLights:
|
||||
OptLights(nu_newRadius.GetValue(), nu_maxRadius.GetValue(), ch_Optimize.IsChecked(), ch_RemoveFlickering.IsChecked(), ch_FlickeringToStatic.IsChecked());
|
||||
break;
|
||||
|
||||
case b_OptAllLights:
|
||||
OptAllLights();
|
||||
break;
|
||||
|
||||
case b_MakeAllLightVisible:
|
||||
AllLightVisible();
|
||||
break;
|
||||
|
||||
case b_DisableCoronas:
|
||||
RemoveCoronas();
|
||||
break;
|
||||
|
||||
case b_SaveConfig:
|
||||
SaveLightConfig();
|
||||
break;
|
||||
|
||||
case b_OptStatic:
|
||||
OptimizeStaticMeshes();
|
||||
break;
|
||||
|
||||
case b_ClearLog:
|
||||
lb_Actions.SetContent("");
|
||||
break;
|
||||
}
|
||||
|
||||
// Get lighting statistics
|
||||
StatLights();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
simulated function SaveLightConfig()
|
||||
{
|
||||
bActorShadows = ch_ActorShadows.IsChecked();
|
||||
bAttenByLife = ch_AttenByLife.IsChecked();
|
||||
byteRadius = nu_Radius.GetValue();
|
||||
bLightingVisibility = ch_bLightingVisibility.IsChecked();
|
||||
bCorona = ch_bCorona.IsChecked();
|
||||
bDirectionalCorona = ch_bDirectionalCorona.IsChecked();
|
||||
byteLightBrightness = nu_LightBrightness.GetValue();
|
||||
byteLightHue = nu_LightHue.GetValue();
|
||||
byteLightSaturation = nu_LightSaturation.GetValue();
|
||||
bSpecialLit = ch_bSpecialLit.IsChecked();
|
||||
byteLightType = nu_LightType.GetValue();
|
||||
byteLightEffect = nu_LightEffect.GetValue();
|
||||
byteLightCone = nu_LightCone.GetValue();
|
||||
byteLightPeriod = nu_LightPeriod.GetValue();
|
||||
|
||||
NewRadius = nu_newRadius.GetValue();
|
||||
maxRadius = nu_maxRadius.GetValue();
|
||||
Optimize = ch_Optimize.IsChecked();
|
||||
RemoveFlickering = ch_RemoveFlickering.IsChecked();
|
||||
FlickeringToStatic = ch_FlickeringToStatic.IsChecked();
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
|
||||
simulated function LoadLightConfig()
|
||||
{
|
||||
ch_ActorShadows.Checked(bActorShadows);
|
||||
ch_AttenByLife.Checked(bAttenByLife);
|
||||
nu_Radius.SetValue(byteRadius);
|
||||
ch_bLightingVisibility.Checked(bLightingVisibility);
|
||||
ch_bCorona.Checked(bCorona);
|
||||
ch_bDirectionalCorona.Checked(bDirectionalCorona);
|
||||
nu_LightBrightness.SetValue(byteLightBrightness);
|
||||
nu_LightHue.SetValue(byteLightHue);
|
||||
nu_LightSaturation.SetValue(byteLightSaturation);
|
||||
ch_bSpecialLit.Checked(bSpecialLit);
|
||||
nu_LightType.SetValue(byteLightType);
|
||||
nu_LightEffect.SetValue(byteLightEffect);
|
||||
nu_LightCone.SetValue(byteLightCone);
|
||||
nu_LightPeriod.SetValue(byteLightPeriod );
|
||||
|
||||
nu_newRadius.SetValue(NewRadius);
|
||||
nu_maxRadius.SetValue(maxRadius);
|
||||
ch_Optimize.Checked(Optimize);
|
||||
ch_RemoveFlickering.Checked(RemoveFlickering);
|
||||
ch_FlickeringToStatic.Checked(FlickeringToStatic);
|
||||
}
|
||||
|
||||
|
||||
simulated function AllLightVisible() // Toggle lights visibility
|
||||
{
|
||||
local int i;
|
||||
|
||||
for (i=0;i<CachedLights.length;i++)
|
||||
{
|
||||
if (CachedLights[i].bHidden)
|
||||
CachedLights[i].bHidden = False;
|
||||
else
|
||||
CachedLights[i].bHidden = True;
|
||||
|
||||
if (CachedLights[i].bStatic)
|
||||
CachedLights[i].ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function CacheLights() // Cache lights
|
||||
{
|
||||
local Light LE;
|
||||
local TriggerLight TL;
|
||||
local int i;
|
||||
|
||||
// Cached lights for checks, stats and etc.
|
||||
forEach AllObjects (class'Light', LE)
|
||||
{
|
||||
CachedLights[i] = LE;
|
||||
i++;
|
||||
}
|
||||
i=0;
|
||||
|
||||
// Cached TriggerLights
|
||||
forEach AllObjects (class'TriggerLight', TL)
|
||||
{
|
||||
CachedTriggerLights[i] = TL;
|
||||
i++;
|
||||
}
|
||||
|
||||
// Empty lights check
|
||||
if (CachedLights.length > 0 || CachedTriggerLights.Length > 0)
|
||||
bCached = True;
|
||||
}
|
||||
|
||||
|
||||
// Clear cache
|
||||
simulated function ClearCache()
|
||||
{
|
||||
CachedLights.Remove(0,CachedLights.Length);
|
||||
CachedTriggerLights.Remove(0,CachedTriggerLights.Length);
|
||||
bCached = False;
|
||||
}
|
||||
|
||||
|
||||
// Get max radius of light sources and triggerlight
|
||||
simulated function MaxRad(out int MRad, out int TlMRad)
|
||||
{
|
||||
local int i;
|
||||
|
||||
if (CachedLights.length == 0)
|
||||
return;
|
||||
|
||||
MRad = CachedLights[0].LightRadius;
|
||||
|
||||
// Find max radius
|
||||
for (i=0;i<CachedLights.length; i++)
|
||||
{
|
||||
if (CachedLights[i].LightRadius > MRad)
|
||||
{
|
||||
MRad = CachedLights[i].LightRadius ;
|
||||
}
|
||||
}
|
||||
|
||||
if (CachedTriggerLights.length == 0)
|
||||
return;
|
||||
|
||||
TlMRad = CachedTriggerLights[0].LightRadius;
|
||||
|
||||
// Find max radius
|
||||
for(i=0;i<CachedTriggerLights.length; i++)
|
||||
{
|
||||
if (CachedLights[i].LightRadius > TlMRad)
|
||||
{
|
||||
TlMRad = CachedLights[i].LightRadius;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function GetUniqueColorsLights()
|
||||
{
|
||||
local int i, k, count;
|
||||
local bool bAlreadyIsIn;
|
||||
|
||||
if (CachedLights.Length == 0)
|
||||
return;
|
||||
|
||||
if (LightColors.Length == 0)
|
||||
{
|
||||
LightColors[0] = CachedLights[0].LightHue;
|
||||
count++;
|
||||
}
|
||||
|
||||
for (i=0; i < CachedLights.length; i++)
|
||||
{
|
||||
for (k=0; k < LightColors.length; k++) // Finding unique color
|
||||
{
|
||||
if (LightColors[k] == CachedLights[i].LightHue)
|
||||
{
|
||||
bAlreadyIsIn = True;
|
||||
break; // Already having dat color
|
||||
}
|
||||
}
|
||||
|
||||
if (!bAlreadyIsIn)
|
||||
{
|
||||
LightColors[count] = CachedLights[i].LightHue; // Adding unique light
|
||||
count++;
|
||||
}
|
||||
bAlreadyIsIn = False; // Next iteration
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Statistics
|
||||
simulated function StatLights() // Get light statistics
|
||||
{
|
||||
local int i, maxRadiusCountL, maxRadiusCountTL, SpecialLit_CountL, SpecialLit_CountTL;
|
||||
|
||||
if (maxRadius_TL==0 || maxRadius_L==0)
|
||||
{
|
||||
MaxRad(maxRadius_L, maxRadius_TL);
|
||||
}
|
||||
|
||||
if (CachedTriggerLights.length > 0)
|
||||
{
|
||||
for (i=0; i < cachedTriggerLights.length; i++)
|
||||
{
|
||||
if (CachedTriggerLights[i].bSpecialLit)
|
||||
SpecialLit_CountTL++;
|
||||
if (CachedTriggerLights[i].LightRadius == maxRadius_TL)
|
||||
maxRadiusCountTL++;
|
||||
}
|
||||
}
|
||||
|
||||
if (CachedLights.length == 0) // if no lights on map == fuckoff
|
||||
return;
|
||||
|
||||
for (i=0; i < CachedLights.length; i++)
|
||||
{
|
||||
if (CachedLights[i].bSpecialLit)
|
||||
SpecialLit_CountL++;
|
||||
if (CachedLights[i].LightRadius == maxRadius_L)
|
||||
maxRadiusCountL++;
|
||||
}
|
||||
|
||||
LightColors.Length = 0;
|
||||
GetUniqueColorsLights();
|
||||
lb_Actions.Addtext("There are" @ CachedLights.length @ "light sources" @ "and" @ cachedTriggerLights.length @ "Trigger light sources");
|
||||
lb_Actions.Addtext("Max Radius for light source is " @ maxRadius_L @ ". Light sources that uses max radius:" @ maxRadiusCountL
|
||||
@ "Max Radius for triggerlight source is " @ maxRadius_TL @ ". TriggerLight sources that uses max radius:" @ maxRadiusCountTL);
|
||||
|
||||
lb_Actions.Addtext("Detected" @ LightColors.length @ "unique lights");
|
||||
|
||||
lb_Actions.Addtext("Detected" @ SpecialLit_CountL @ " SpecialLit lights"
|
||||
@ "Detected" @ SpecialLit_CountTL @ " SpecialLit triggerlights");
|
||||
}
|
||||
|
||||
|
||||
// =======Lights
|
||||
// Light Optimization
|
||||
simulated function OptLights(Int Radius, Int maxRadius, bool Optimize, bool RemoveFlickering, bool FlickeringToStatic)
|
||||
{
|
||||
local Light LE;
|
||||
local TriggerLight TL;
|
||||
local int i, count;
|
||||
|
||||
if (Radius == 0 || maxRadius == 0)
|
||||
return;
|
||||
|
||||
forEach AllObjects (class'Light', LE)
|
||||
{
|
||||
if (LE.LightRadius > maxRadius)
|
||||
{
|
||||
LE.bSpecialLit = Optimize;
|
||||
LE.LightRadius = Radius;
|
||||
i++;
|
||||
}
|
||||
|
||||
if (RemoveFlickering)
|
||||
{
|
||||
switch (LE.LightType)
|
||||
{
|
||||
case LT_Pulse: // 3 Laggy types of lights
|
||||
LE.LightType = LT_Steady; // Replace this to steady light
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
LE.bSpecialLit = True;
|
||||
LE.bLightingVisibility = False;
|
||||
}
|
||||
|
||||
break;
|
||||
case LT_Blink:
|
||||
LE.LightType = LT_Steady; // Replace this to steady light
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
LE.bSpecialLit = True;
|
||||
LE.bLightingVisibility = False;
|
||||
}
|
||||
break;
|
||||
case LT_Flicker:
|
||||
LE.LightType = LT_Steady; // Replace this to steady light
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
LE.bSpecialLit = True;
|
||||
LE.bLightingVisibility = False;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LE.bLightChanged=True; // Recalculate light now
|
||||
if (LE.bStatic)
|
||||
LE.ResetStaticFilterState();
|
||||
|
||||
}
|
||||
|
||||
forEach AllObjects (class'TriggerLight', TL)
|
||||
{
|
||||
if (TL.LightRadius > maxRadius)
|
||||
{
|
||||
TL.bSpecialLit = Optimize;
|
||||
TL.LightRadius = Radius;
|
||||
i++;
|
||||
}
|
||||
if (RemoveFlickering)
|
||||
{
|
||||
switch (TL.LightType)
|
||||
{
|
||||
case LT_Pulse: // 3 Laggy types of lights
|
||||
TL.LightType = LT_Steady; // Replace this to steady light
|
||||
TL.InitialState = '';
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
TL.bSpecialLit = True;
|
||||
TL.bLightingVisibility = False;
|
||||
}
|
||||
break;
|
||||
case LT_Blink:
|
||||
TL.LightType = LT_Steady; // Replace this to steady light
|
||||
TL.InitialState = '';
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
TL.bSpecialLit = True;
|
||||
TL.bLightingVisibility = False;
|
||||
}
|
||||
break;
|
||||
case LT_Flicker:
|
||||
TL.LightType = LT_Steady; // Replace this to steady light
|
||||
TL.InitialState = '';
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
TL.bSpecialLit = True;
|
||||
TL.bLightingVisibility = False;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
TL.bLightChanged=True; // Recalculate light now
|
||||
if (TL.bStatic)
|
||||
TL.ResetStaticFilterState();
|
||||
}
|
||||
|
||||
if (Optimize)
|
||||
lb_Actions.Addtext("Laggy lights are now fully static.");
|
||||
lb_Actions.Addtext("Radius for " @ i @ " lights set to " @ Radius @ ".Removed" @ count @ " flickering/pulsing/blinking light sources");
|
||||
|
||||
foreach AllObjects(class'Light', LE)
|
||||
if (LE.bLightChanged)
|
||||
LE.bLightChanged = False;
|
||||
}
|
||||
|
||||
|
||||
// RemoveCoronas
|
||||
simulated function RemoveCoronas()
|
||||
{
|
||||
local Light tempL;
|
||||
|
||||
// Corona will be rendered because map author decide to force dis. No freedom for players...
|
||||
// Somehow this slow down Mesh lighting quite a bit(x2, x3)...
|
||||
forEach AllObjects (class'Light', tempL)
|
||||
{
|
||||
if(tempL.bCorona == true)
|
||||
{
|
||||
tempL.bCorona = false;
|
||||
if(tempL.bStatic)
|
||||
tempL.ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
lb_Actions.Addtext("All coronas disabled!");
|
||||
}
|
||||
|
||||
|
||||
simulated function OptimizeStaticMeshes()
|
||||
{
|
||||
local StaticMeshActor SMA;
|
||||
local Decoration Deco;
|
||||
|
||||
IsUnlited = !IsUnlited;
|
||||
|
||||
foreach AllObjects(class'StaticMeshActor', SMA)
|
||||
{
|
||||
SMA.bUnlit = IsUnlited;
|
||||
SMA.ResetStaticFilterstate();
|
||||
}
|
||||
|
||||
foreach AllObjects(class'Decoration', Deco)
|
||||
{
|
||||
Deco.bUnlit = IsUnlited;
|
||||
if (Deco.bStatic)
|
||||
Deco.ResetStaticFilterstate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function OptAllLights()
|
||||
{
|
||||
local int i;
|
||||
local light L;
|
||||
|
||||
for (i=0; i<CachedLights.length; i++)
|
||||
{
|
||||
CachedLights[i].bActorShadows = ch_ActorShadows.IsChecked();
|
||||
CachedLights[i].bAttenByLife = ch_AttenByLife.IsChecked();
|
||||
CachedLights[i].LightRadius = nu_Radius.GetValue();
|
||||
CachedLights[i].bLightingVisibility = ch_bLightingVisibility.IsChecked();
|
||||
CachedLights[i].bCorona = ch_bCorona.IsChecked(); // Must be tweak
|
||||
CachedLights[i].bDirectionalCorona = ch_bDirectionalCorona.IsChecked();
|
||||
|
||||
CachedLights[i].LightBrightness = nu_LightBrightness.GetValue();
|
||||
|
||||
CachedLights[i].LightHue = nu_LightHue.GetValue();
|
||||
CachedLights[i].LightSaturation = nu_LightSaturation.GetValue();
|
||||
|
||||
CachedLights[i].bSpecialLit = ch_bSpecialLit.IsChecked();
|
||||
CachedLights[i].LightType = ELightType(nu_LightType.GetValue());
|
||||
CachedLights[i].LightEffect = ELightEffect(nu_LightEffect.GetValue());
|
||||
CachedLights[i].LightCone = nu_LightCone.GetValue();
|
||||
CachedLights[i].LightPeriod = nu_LightPeriod.GetValue();
|
||||
|
||||
CachedLights[i].bDynamicLight=ch_bDynamicLight.IsChecked();
|
||||
|
||||
CachedLights[i].bLightChanged=True; // Recalculate light now
|
||||
|
||||
CachedLights[i].Style = STY_Additive; // Enabling bDeferRendering
|
||||
|
||||
CachedLights[i].bDeferRendering = True;
|
||||
CachedLights[i].bUnlit = True;
|
||||
CachedLights[i].bStaticLighting = False;
|
||||
|
||||
if (CachedLights[i].bStatic)
|
||||
CachedLights[i].ResetStaticFilterState();
|
||||
}
|
||||
|
||||
lb_Actions.Addtext("All lights on map set to given parameters");
|
||||
|
||||
if (CachedTriggerLights.length == 0)
|
||||
return;
|
||||
|
||||
for (i=0; i<CachedTriggerLights.length; i++)
|
||||
{
|
||||
CachedTriggerLights[i].bActorShadows = ch_ActorShadows.IsChecked();
|
||||
CachedTriggerLights[i].bAttenByLife = ch_AttenByLife.IsChecked();
|
||||
CachedTriggerLights[i].LightCone = nu_Radius.GetValue();
|
||||
CachedTriggerLights[i].bLightingVisibility = ch_bLightingVisibility.IsChecked();
|
||||
CachedTriggerLights[i].bCorona = ch_bCorona.IsChecked(); // Must be tweak
|
||||
CachedTriggerLights[i].bDirectionalCorona = ch_bDirectionalCorona.IsChecked();
|
||||
CachedTriggerLights[i].LightBrightness = nu_LightBrightness.GetValue();
|
||||
CachedTriggerLights[i].LightHue = nu_LightHue.GetValue();
|
||||
CachedTriggerLights[i].LightSaturation = nu_LightSaturation.GetValue();
|
||||
CachedTriggerLights[i].bSpecialLit = ch_bSpecialLit.IsChecked();
|
||||
CachedTriggerLights[i].LightType = ELightType(nu_LightType.GetValue());
|
||||
CachedTriggerLights[i].LightEffect = ELightEffect(nu_LightEffect.GetValue());
|
||||
CachedTriggerLights[i].LightCone = nu_LightCone.GetValue();
|
||||
CachedTriggerLights[i].LightPeriod = nu_LightPeriod.GetValue();
|
||||
|
||||
CachedTriggerLights[i].bDynamicLight=ch_bDynamicLight.IsChecked();
|
||||
CachedTriggerLights[i].bLightChanged=True; // Recalculate light now
|
||||
|
||||
if (CachedTriggerLights[i].bStatic)
|
||||
CachedTriggerLights[i].ResetStaticFilterState();
|
||||
}
|
||||
|
||||
foreach AllObjects(class'Light', L)
|
||||
if (L.bLightChanged)
|
||||
L.bLightChanged = False;
|
||||
}
|
||||
|
||||
|
||||
// ===================================================================
|
||||
simulated function InternalOnChange(GUIComponent Sender)
|
||||
{
|
||||
/*
|
||||
switch (Sender) {
|
||||
case ch_HideNiggaz:
|
||||
break;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=GUISectionBackground Name=BGControlsAllMap
|
||||
bFillClient=True
|
||||
Caption="Control of light sources and shadows on all map"
|
||||
WinTop=0.010000
|
||||
WinLeft=0.400000
|
||||
WinWidth=0.500000
|
||||
WinHeight=0.900000
|
||||
OnPreDraw=BGControlsAllMap.InternalPreDraw
|
||||
End Object
|
||||
sb_ControlsAllMap=GUISectionBackground'hidemut.LightMenu.BGControlsAllMap'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=BGStats
|
||||
bFillClient=True
|
||||
Caption="Statistics of light sources on current map"
|
||||
WinTop=0.510000
|
||||
WinWidth=0.400000
|
||||
WinHeight=0.460000
|
||||
OnPreDraw=BGStats.InternalPreDraw
|
||||
End Object
|
||||
sb_Stats=GUISectionBackground'hidemut.LightMenu.BGStats'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=BGTweaker
|
||||
bFillClient=True
|
||||
Caption="Various lighting tweaks"
|
||||
WinTop=0.010000
|
||||
WinWidth=0.400000
|
||||
WinHeight=0.500000
|
||||
OnPreDraw=BGTweaker.InternalPreDraw
|
||||
End Object
|
||||
sb_Tweaker=GUISectionBackground'hidemut.LightMenu.BGTweaker'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=Radius
|
||||
MinValue=0
|
||||
MaxValue=1024
|
||||
Caption="Light Radius"
|
||||
OnCreateComponent=Radius.InternalOnCreateComponent
|
||||
Hint="Light radius for all lights"
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
nu_Radius=moNumericEdit'hidemut.LightMenu.Radius'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightnewRadius
|
||||
MinValue=0
|
||||
MaxValue=512
|
||||
Caption="New Light radius"
|
||||
OnCreateComponent=LightnewRadius.InternalOnCreateComponent
|
||||
Hint="New Light radius for laggy lights"
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
nu_newRadius=moNumericEdit'hidemut.LightMenu.LightnewRadius'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightmaxRadius
|
||||
MinValue=1
|
||||
MaxValue=1024
|
||||
Caption="Max light Radius"
|
||||
OnCreateComponent=LightmaxRadius.InternalOnCreateComponent
|
||||
Hint="Max Light radius for laggy lights"
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
nu_maxRadius=moNumericEdit'hidemut.LightMenu.LightmaxRadius'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightCone
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="LightCone"
|
||||
OnCreateComponent=LightCone.InternalOnCreateComponent
|
||||
Hint="Changes the size of the lightbeam in specific lights such as the spotlight."
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
nu_LightCone=moNumericEdit'hidemut.LightMenu.LightCone'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightPeriod
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="LightPeriod"
|
||||
OnCreateComponent=LightPeriod.InternalOnCreateComponent
|
||||
Hint="Sets speed of selected LightType and/or LightEffect."
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
nu_LightPeriod=moNumericEdit'hidemut.LightMenu.LightPeriod'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightBrightness
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="LightBrightness"
|
||||
OnCreateComponent=LightPeriod.InternalOnCreateComponent
|
||||
Hint="How bright the light should be from source and outwards."
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
nu_LightBrightness=moNumericEdit'hidemut.LightMenu.LightBrightness'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightHue
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="LightHue"
|
||||
OnCreateComponent=LightPeriod.InternalOnCreateComponent
|
||||
Hint="Allows you to select a color through the default color spectrum. Affects the color chosen."
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
nu_LightHue=moNumericEdit'hidemut.LightMenu.LightHue'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightSaturation
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="LightSaturation"
|
||||
OnCreateComponent=LightSaturation.InternalOnCreateComponent
|
||||
Hint="This value sets the amount of white light to mix with the color selected. If the value is set to 0, it will be the pure color. The higher the value, the less rich the color becomes. This is very effective when creating realistic lighting schemes. The default saturation is 127. Affects the chosen color."
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
nu_LightSaturation=moNumericEdit'hidemut.LightMenu.LightSaturation'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightEffect
|
||||
MinValue=0
|
||||
MaxValue=15
|
||||
Caption="LightEffect"
|
||||
OnCreateComponent=LightEffect.InternalOnCreateComponent
|
||||
Hint="Adds an animation to the light."
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
nu_LightEffect=moNumericEdit'hidemut.LightMenu.LightEffect'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightType
|
||||
MinValue=0
|
||||
MaxValue=8
|
||||
Caption="LightType"
|
||||
OnCreateComponent=LightType.InternalOnCreateComponent
|
||||
Hint="Light types affect the brightness and darkness values of a lights' lighteffect."
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
nu_LightType=moNumericEdit'hidemut.LightMenu.LightType'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moOptimize
|
||||
Caption="Toggle static lighting on laggy lights"
|
||||
OnCreateComponent=moOptimize.InternalOnCreateComponent
|
||||
Hint="Toggle static lighting on laggy lights(if they are >maxRadus)"
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
ch_Optimize=moCheckBox'hidemut.LightMenu.moOptimize'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moRemoveFlickering
|
||||
Caption="Remove flickering lights"
|
||||
OnCreateComponent=moRemoveFlickering.InternalOnCreateComponent
|
||||
Hint="Remove flickering, blinking, pulse lights cuz fuk TWI optimization bullcrap"
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
ch_RemoveFlickering=moCheckBox'hidemut.LightMenu.moRemoveFlickering'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moFlickeringToStatic
|
||||
Caption="Flickering to Static lighting"
|
||||
OnCreateComponent=moFlickeringToStatic.InternalOnCreateComponent
|
||||
Hint="Makes all flickering lights static and steady"
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
ch_FlickeringToStatic=moCheckBox'hidemut.LightMenu.moFlickeringToStatic'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moActorShadows
|
||||
Caption="Actor Shadows"
|
||||
OnCreateComponent=moActorShadows.InternalOnCreateComponent
|
||||
Hint="Light casts actor shadows."
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
ch_ActorShadows=moCheckBox'hidemut.LightMenu.moActorShadows'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moAttenByLife
|
||||
Caption="Attenuate light"
|
||||
OnCreateComponent=moAttenByLife.InternalOnCreateComponent
|
||||
Hint="Attenuate light by diminishing lifespan"
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
ch_AttenByLife=moCheckBox'hidemut.LightMenu.moAttenByLife'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moCorona
|
||||
Caption="Light Corona"
|
||||
OnCreateComponent=moCorona.InternalOnCreateComponent
|
||||
Hint="Toggle Coronas"
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
ch_bCorona=moCheckBox'hidemut.LightMenu.moCorona'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moDirectionalCorona
|
||||
Caption="Directional Corona"
|
||||
OnCreateComponent=moDirectionalCorona.InternalOnCreateComponent
|
||||
Hint="(if bCorona) Make corona bigger if it faces you, and zero and 90 degrees or beyond."
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
ch_bDirectionalCorona=moCheckBox'hidemut.LightMenu.moDirectionalCorona'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moDynamicLight
|
||||
Caption="DynamicLight"
|
||||
OnCreateComponent=moDirectionalCorona.InternalOnCreateComponent
|
||||
Hint="Use dynamic light on lightsources"
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
ch_bDynamicLight=moCheckBox'hidemut.LightMenu.moDynamicLight'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moLightingVisibility
|
||||
Caption="LightingVisibility"
|
||||
OnCreateComponent=moDirectionalCorona.InternalOnCreateComponent
|
||||
Hint="Calculate Lighting Visibility by using line checks"
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
ch_bLightingVisibility=moCheckBox'hidemut.LightMenu.moLightingVisibility'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moSpecialLit
|
||||
Caption="SpecialLit"
|
||||
OnCreateComponent=moDirectionalCorona.InternalOnCreateComponent
|
||||
Hint="Special Lit adds another layer of lighting used to isolate lighting to specific surfaces."
|
||||
OnChange=LightMenu.InternalOnChange
|
||||
End Object
|
||||
ch_bSpecialLit=moCheckBox'hidemut.LightMenu.moSpecialLit'
|
||||
|
||||
Begin Object Class=GUIScrollTextBox Name=lbActions
|
||||
bNoTeletype=True
|
||||
CharDelay=0.000000
|
||||
EOLDelay=0.000000
|
||||
RepeatDelay=0.000000
|
||||
OnCreateComponent=lbActions.InternalOnCreateComponent
|
||||
FontScale=FNS_Small
|
||||
bNeverFocus=True
|
||||
End Object
|
||||
lb_Actions=GUIScrollTextBox'hidemut.LightMenu.lbActions'
|
||||
|
||||
Begin Object Class=GUIButton Name=HideLights_Button
|
||||
Caption="Optimize lights!"
|
||||
Hint="Optimize light radius to your value(if light radius >maxRadius)"
|
||||
OnClick=LightMenu.ButtonClicked
|
||||
OnKeyEvent=HideLights_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_HideLights=GUIButton'hidemut.LightMenu.HideLights_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=OptAllLights_Button
|
||||
Caption="Optimize all lights!"
|
||||
Hint="Optimize all lights on map by given parameters"
|
||||
OnClick=LightMenu.ButtonClicked
|
||||
OnKeyEvent=OptAllLights_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_OptAllLights=GUIButton'hidemut.LightMenu.OptAllLights_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=MakeAllLightVisible_Button
|
||||
Caption="Make all lights visible to player(debug)"
|
||||
Hint="Debug light sources"
|
||||
OnClick=LightMenu.ButtonClicked
|
||||
OnKeyEvent=MakeAllLightVisible_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_MakeAllLightVisible=GUIButton'hidemut.LightMenu.MakeAllLightVisible_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=DisableCoronas_Button
|
||||
Caption="Remove coronas"
|
||||
Hint="Remove coronas from light sources"
|
||||
OnClick=LightMenu.ButtonClicked
|
||||
OnKeyEvent=DisableCoronas_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_DisableCoronas=GUIButton'hidemut.LightMenu.DisableCoronas_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=SaveConfig_Button
|
||||
Caption="Save config variables"
|
||||
Hint="Remove coronas from light sources"
|
||||
OnClick=LightMenu.ButtonClicked
|
||||
OnKeyEvent=SaveConfig_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_SaveConfig=GUIButton'hidemut.LightMenu.SaveConfig_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=OptStatic_Button
|
||||
Caption="Optimize lighting on static meshes"
|
||||
Hint="Apply bUnlit to all static meshes. Fixes retarded light calculate render to static meshes"
|
||||
OnClick=LightMenu.ButtonClicked
|
||||
OnKeyEvent=OptStatic_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_OptStatic=GUIButton'hidemut.LightMenu.OptStatic_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=clearLog
|
||||
Caption="Clear log spam"
|
||||
Hint="Clear log"
|
||||
OnClick=LightMenu.ButtonClicked
|
||||
OnKeyEvent=clearLog.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ClearLog=GUIButton'hidemut.LightMenu.clearLog'
|
||||
|
||||
PropagateVisibility=False
|
||||
WinHeight=1.000000
|
||||
}
|
||||
40
kf_sources/HideMut/Classes.backup/NewMenu.uc
Normal file
40
kf_sources/HideMut/Classes.backup/NewMenu.uc
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
class NewMenu extends UT2K4PlayerLoginMenu;
|
||||
|
||||
var bool bNoSteam;
|
||||
|
||||
function InitComponent(GUIController MyController, GUIComponent MyComponent)
|
||||
{
|
||||
// just to remove that "help" tab
|
||||
Panels.remove(4, 1);
|
||||
super.InitComponent(MyController, MyComponent);
|
||||
|
||||
// c_Main.ActivateTabByName(Panels[1].Caption, true);
|
||||
}
|
||||
|
||||
// Overridden to stop the unnecessary removal of Panels
|
||||
function RemoveMultiplayerTabs(GameInfo Game){}
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Panels(0)=(ClassName="HideMut.HideMutMenu",Caption="HideMenu",Hint="Some tweaks, cheats and etc.")
|
||||
Panels(1)=(ClassName="HideMut.OptimizerMenu",Caption="OptimizerMenu",Hint="Module aimed for game optimization and clientside zed modifications")
|
||||
Panels(2)=(ClassName="HideMut.LightMenu",Caption="LightMenu",Hint="Module aimed for analysis of light sources and their optimization")
|
||||
Panels(3)=(ClassName="HideMut.ZonerMenu",Caption="ZonerMenu")
|
||||
Begin Object Class=GUITabControl Name=NewLoginMenu
|
||||
bDockPanels=True
|
||||
BackgroundStyleName="TabBackground"
|
||||
WinTop=0.026336
|
||||
WinLeft=0.012500
|
||||
WinWidth=0.974999
|
||||
WinHeight=0.050000
|
||||
bScaleToParent=True
|
||||
bAcceptsInput=True
|
||||
OnActivate=NewLoginMenu.InternalOnActivate
|
||||
End Object
|
||||
c_Main=GUITabControl'hidemut.NewMenu.NewLoginMenu'
|
||||
WinTop=0.000000
|
||||
WinLeft=0.000000
|
||||
WinWidth=1.000000
|
||||
WinHeight=1.000000
|
||||
}
|
||||
1830
kf_sources/HideMut/Classes.backup/OptimizerMenu.uc
Normal file
1830
kf_sources/HideMut/Classes.backup/OptimizerMenu.uc
Normal file
File diff suppressed because it is too large
Load diff
26
kf_sources/HideMut/Classes.backup/PickActorProj.uc
Normal file
26
kf_sources/HideMut/Classes.backup/PickActorProj.uc
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
class PickActorProj extends KFMod.ShotgunBullet;
|
||||
|
||||
var a_VisibilityHandler a_visibilityHandler;
|
||||
|
||||
|
||||
simulated singular function hitWall(vector hitNormal, actor wall)
|
||||
{
|
||||
if(wall.mesh != none || wall.staticMesh != none)
|
||||
{
|
||||
if((wall.bNoDelete || wall.bStatic) && !wall.bDeleteMe)
|
||||
a_visibilityHandler.pickActorWithProjectile(wall);
|
||||
else
|
||||
a_visibilityHandler.logMessage(a_visibilityHandler.getActorName(wall)@"can't be hided because this actor can be destroyed any time.");
|
||||
spawn(impactEffect, , , location, rotator(-hitNormal));
|
||||
destroy();
|
||||
}
|
||||
|
||||
if(LevelInfo(wall) != none)
|
||||
{
|
||||
spawn(impactEffect, , , location, rotator(-hitNormal));
|
||||
destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
11
kf_sources/HideMut/Classes.backup/Settings.uc
Normal file
11
kf_sources/HideMut/Classes.backup/Settings.uc
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// q good place to store our 'global' variables
|
||||
class Settings extends Object
|
||||
config(HideMut);
|
||||
|
||||
|
||||
var config bool bHideZedFlames;
|
||||
var config bool bHideFlamethrowerEffects;
|
||||
var config bool bHideZedTimeSounds;
|
||||
var config bool bHidePortraits;
|
||||
var config bool bHideNoPRImessages;
|
||||
var config bool bRandomName;
|
||||
16
kf_sources/HideMut/Classes.backup/WeaponManagerList.uc
Normal file
16
kf_sources/HideMut/Classes.backup/WeaponManagerList.uc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
class WeaponManagerList extends Object
|
||||
PerObjectConfig
|
||||
Config(HideMutWeapons);
|
||||
|
||||
|
||||
var config array<string> weaponGroup1;
|
||||
var config array<string> weaponGroup2;
|
||||
var config array<string> weaponGroup3;
|
||||
var config array<string> weaponGroup4;
|
||||
var config array<string> weaponGroup5;
|
||||
var config array<string> weaponGroup6;
|
||||
var config array<string> weaponGroup7;
|
||||
var config array<string> weaponGroup8;
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
882
kf_sources/HideMut/Classes.backup/WeaponManagerMenu.uc
Normal file
882
kf_sources/HideMut/Classes.backup/WeaponManagerMenu.uc
Normal file
|
|
@ -0,0 +1,882 @@
|
|||
class WeaponManagerMenu extends GUIPage transient;
|
||||
|
||||
var PlayerController pc;
|
||||
var a_WeaponManager a_weaponManager;
|
||||
var string colorG, colorR;
|
||||
|
||||
|
||||
var automated BackgroundArea ba_Group1, ba_Group2, ba_Group3, ba_Group4,
|
||||
ba_Group5, ba_Group6, ba_Group7, ba_Group8,
|
||||
ba_Group9, ba_Presets;
|
||||
|
||||
var automated GUIListBox lb_Group1, lb_Group2, lb_Group3, lb_Group4,
|
||||
lb_Group5, lb_Group6, lb_Group7, lb_Group8,
|
||||
lb_Group9, lb_Presets;
|
||||
|
||||
var GUIList li_Group1, li_Group2, li_Group3, li_Group4,
|
||||
li_Group5, li_Group6, li_Group7, li_Group8,
|
||||
li_Group9, li_Presets;
|
||||
|
||||
var automated GUIButton b_VanillaReset, b_BasicCleaning, b_FullCleaning,
|
||||
b_SavePreset, b_DeletePreset;
|
||||
|
||||
var automated moEditBox eb_PresetName;
|
||||
|
||||
var automated moCheckbox cb_UseVanillaManagement, cb_FastWeaponChanging;
|
||||
|
||||
var automated GUILabel l_Group1, l_Group2, l_Group3, l_Group4,
|
||||
l_Group5, l_Group6, l_Group7, l_Group8,
|
||||
l_Group9, l_Presets;
|
||||
|
||||
simulated function initComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
local HideMutInteraction tempHmi;
|
||||
|
||||
super.initComponent(MyController,MyOwner);
|
||||
|
||||
pc = playerOwner();
|
||||
|
||||
forEach AllObjects(class'HideMutInteraction', tempHmi)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(tempHmi.a_weaponManager == None)
|
||||
{
|
||||
tempHmi.a_weaponManager = pc.Spawn(class'a_WeaponManager');
|
||||
tempHmi.a_weaponManager.kfpc = KFPlayerController(pc);
|
||||
}
|
||||
|
||||
a_weaponManager = tempHmi.a_weaponManager;
|
||||
|
||||
li_Group1 = lb_Group1.List;
|
||||
li_Group1.TextAlign = TXTA_Left;
|
||||
li_Group1.bMultiSelect = True;
|
||||
li_Group1.bDropSource = True;
|
||||
li_Group1.bDropTarget = True;
|
||||
li_Group1.OnDblClick = ListDblClick;
|
||||
//li_Group1.bDrawSelectionBorder = True;
|
||||
|
||||
li_Group2 = lb_Group2.List;
|
||||
li_Group2.TextAlign = TXTA_Left;
|
||||
li_Group2.bMultiSelect = True;
|
||||
li_Group2.bDropSource = True;
|
||||
li_Group2.bDropTarget = True;
|
||||
li_Group2.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group3 = lb_Group3.List;
|
||||
li_Group3.TextAlign = TXTA_Left;
|
||||
li_Group3.bMultiSelect = True;
|
||||
li_Group3.bDropSource = True;
|
||||
li_Group3.bDropTarget = True;
|
||||
li_Group3.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group4 = lb_Group4.List;
|
||||
li_Group4.TextAlign = TXTA_Left;
|
||||
li_Group4.bMultiSelect = True;
|
||||
li_Group4.bDropSource = True;
|
||||
li_Group4.bDropTarget = True;
|
||||
li_Group4.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group5 = lb_Group5.List;
|
||||
li_Group5.TextAlign = TXTA_Left;
|
||||
li_Group5.bMultiSelect = True;
|
||||
li_Group5.bDropSource = True;
|
||||
li_Group5.bDropTarget = True;
|
||||
li_Group5.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group6 = lb_Group6.List;
|
||||
li_Group6.TextAlign = TXTA_Left;
|
||||
li_Group6.bMultiSelect = True;
|
||||
li_Group6.bDropSource = True;
|
||||
li_Group6.bDropTarget = True;
|
||||
li_Group6.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group7 = lb_Group7.List;
|
||||
li_Group7.TextAlign = TXTA_Left;
|
||||
li_Group7.bMultiSelect = True;
|
||||
li_Group7.bDropSource = True;
|
||||
li_Group7.bDropTarget = True;
|
||||
li_Group7.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group8 = lb_Group8.List;
|
||||
li_Group8.TextAlign = TXTA_Left;
|
||||
li_Group8.bMultiSelect = True;
|
||||
li_Group8.bDropSource = True;
|
||||
li_Group8.bDropTarget = True;
|
||||
li_Group8.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group9 = lb_Group9.List;
|
||||
li_Group9.TextAlign = TXTA_Left;
|
||||
li_Group9.bMultiSelect = True;
|
||||
li_Group9.bDropSource = True;
|
||||
li_Group9.bDropTarget = True;
|
||||
li_Group9.OnDblClick = ListDblClick;
|
||||
|
||||
li_Presets = lb_Presets.List;
|
||||
li_Presets.TextAlign = TXTA_Left;
|
||||
li_Presets.bMultiSelect = True;
|
||||
li_Presets.bDropSource = True;
|
||||
li_Presets.bDropTarget = True;
|
||||
li_Presets.OnDblClick = ListDblClick;
|
||||
|
||||
colorG=chr(27)$chr(1)$chr(240)$chr(1);
|
||||
colorR=chr(27)$chr(240)$chr(1)$chr(1);
|
||||
|
||||
refreshLists();
|
||||
refreshPresetNames();
|
||||
}
|
||||
|
||||
event opened(GUIComponent sender)
|
||||
{
|
||||
// local int i;
|
||||
// local string KeyName;
|
||||
// local array<string> KeyNames;
|
||||
local HideMutInteraction tempHmi;
|
||||
|
||||
super.opened(sender);
|
||||
|
||||
pc = playerOwner();
|
||||
|
||||
forEach AllObjects(class'HideMutInteraction', tempHmi)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(tempHmi.a_weaponManager == None)
|
||||
{
|
||||
tempHmi.a_weaponManager = pc.Spawn(class'a_WeaponManager');
|
||||
}
|
||||
tempHmi.a_weaponManager.kfpc = KFPlayerController(pc);
|
||||
a_weaponManager = tempHmi.a_weaponManager;
|
||||
|
||||
refreshLists();
|
||||
refreshPresetNames();
|
||||
|
||||
cb_UseVanillaManagement.SetComponentValue(a_weaponManager.bUseVanillaManagement, true);
|
||||
cb_FastWeaponChanging.SetComponentValue(a_weaponManager.bFastWeaponChanging, true);
|
||||
|
||||
/*
|
||||
//write in KeyNames all bind keys that onen this window to use 'closeWindowWithBind()' then
|
||||
CloseKey.Remove(0, CloseKey.Length);
|
||||
KeyName = PC.ConsoleCommand("BINDINGTOKEY hideMenu");
|
||||
Split(KeyName, ",", KeyNames);
|
||||
for ( i = 0; i < KeyNames.Length; i++ )
|
||||
CloseKey[CloseKey.Length] = byte(PC.ConsoleCommand("KEYNUMBER"@KeyNames[i]));
|
||||
*/
|
||||
}
|
||||
|
||||
simulated function closed(GUIComponent sender, bool bCancelled)
|
||||
{
|
||||
eb_PresetName.SetComponentValue("");
|
||||
super.closed(sender, bCancelled);
|
||||
saveChanges();
|
||||
}
|
||||
|
||||
simulated function refreshLists()
|
||||
{
|
||||
local int i;
|
||||
local class<KFWeapon> tempWeaponClass;
|
||||
|
||||
li_Group1.clear();
|
||||
li_Group2.clear();
|
||||
li_Group3.clear();
|
||||
li_Group4.clear();
|
||||
li_Group5.clear();
|
||||
li_Group6.clear();
|
||||
li_Group7.clear();
|
||||
li_Group8.clear();
|
||||
li_Group9.clear();
|
||||
|
||||
for(i = 0; i < a_weaponManager.weaponGroup1.length; i++)
|
||||
{
|
||||
tempWeaponClass = class<KFWeapon>(DynamicLoadObject(a_weaponManager.weaponGroup1[i], class'Class', true));
|
||||
if(tempWeaponClass != None)
|
||||
li_Group1.add(getColor(a_weaponManager.weaponGroup1[i])$tempWeaponClass.default.itemName,,a_weaponManager.weaponGroup1[i]);
|
||||
else
|
||||
li_Group1.add(colorR$a_weaponManager.weaponGroup1[i],,a_weaponManager.weaponGroup1[i]);
|
||||
}
|
||||
for(i = 0; i < a_weaponManager.weaponGroup2.length; i++)
|
||||
{
|
||||
tempWeaponClass = class<KFWeapon>(DynamicLoadObject(a_weaponManager.weaponGroup2[i], class'Class', true));
|
||||
if(tempWeaponClass != None)
|
||||
li_Group2.add(getColor(a_weaponManager.weaponGroup2[i])$tempWeaponClass.default.itemName,,a_weaponManager.weaponGroup2[i]);
|
||||
else
|
||||
li_Group2.add(colorR$a_weaponManager.weaponGroup2[i],,a_weaponManager.weaponGroup2[i]);
|
||||
}
|
||||
for(i = 0; i < a_weaponManager.weaponGroup3.length; i++)
|
||||
{
|
||||
tempWeaponClass = class<KFWeapon>(DynamicLoadObject(a_weaponManager.weaponGroup3[i], class'Class',true));
|
||||
if(tempWeaponClass != None)
|
||||
li_Group3.add(getColor(a_weaponManager.weaponGroup3[i])$tempWeaponClass.default.itemName,,a_weaponManager.weaponGroup3[i]);
|
||||
else
|
||||
li_Group3.add(colorR$a_weaponManager.weaponGroup3[i],,a_weaponManager.weaponGroup3[i]);
|
||||
}
|
||||
for(i = 0; i < a_weaponManager.weaponGroup4.length; i++)
|
||||
{
|
||||
tempWeaponClass = class<KFWeapon>(DynamicLoadObject(a_weaponManager.weaponGroup4[i], class'Class', true));
|
||||
if(tempWeaponClass != None)
|
||||
li_Group4.add(getColor(a_weaponManager.weaponGroup4[i])$tempWeaponClass.default.itemName,,a_weaponManager.weaponGroup4[i]);
|
||||
else
|
||||
li_Group4.add(colorR$a_weaponManager.weaponGroup4[i],,a_weaponManager.weaponGroup4[i]);
|
||||
}
|
||||
for(i = 0; i < a_weaponManager.weaponGroup5.length; i++)
|
||||
{
|
||||
tempWeaponClass = class<KFWeapon>(DynamicLoadObject(a_weaponManager.weaponGroup5[i], class'Class', true));
|
||||
if(tempWeaponClass != None)
|
||||
li_Group5.add(getColor(a_weaponManager.weaponGroup5[i])$tempWeaponClass.default.itemName,,a_weaponManager.weaponGroup5[i]);
|
||||
else
|
||||
li_Group5.add(colorR$a_weaponManager.weaponGroup5[i],,a_weaponManager.weaponGroup5[i]);
|
||||
}
|
||||
for(i = 0; i < a_weaponManager.weaponGroup6.length; i++)
|
||||
{
|
||||
tempWeaponClass = class<KFWeapon>(DynamicLoadObject(a_weaponManager.weaponGroup6[i], class'Class', true));
|
||||
if(tempWeaponClass != None)
|
||||
li_Group6.add(getColor(a_weaponManager.weaponGroup6[i])$tempWeaponClass.default.itemName,,a_weaponManager.weaponGroup6[i]);
|
||||
else
|
||||
li_Group6.add(colorR$a_weaponManager.weaponGroup6[i],,a_weaponManager.weaponGroup6[i]);
|
||||
}
|
||||
for(i = 0; i < a_weaponManager.weaponGroup7.length; i++)
|
||||
{
|
||||
tempWeaponClass = class<KFWeapon>(DynamicLoadObject(a_weaponManager.weaponGroup7[i], class'Class', true));
|
||||
if(tempWeaponClass != None)
|
||||
li_Group7.add(getColor(a_weaponManager.weaponGroup7[i])$tempWeaponClass.default.itemName,,a_weaponManager.weaponGroup7[i]);
|
||||
else
|
||||
li_Group7.add(colorR$a_weaponManager.weaponGroup7[i],,a_weaponManager.weaponGroup7[i]);
|
||||
}
|
||||
for(i = 0; i < a_weaponManager.weaponGroup8.length; i++)
|
||||
{
|
||||
tempWeaponClass = class<KFWeapon>(DynamicLoadObject(a_weaponManager.weaponGroup8[i], class'Class', true));
|
||||
if(tempWeaponClass != None)
|
||||
li_Group8.add(getColor(a_weaponManager.weaponGroup8[i])$tempWeaponClass.default.itemName,,a_weaponManager.weaponGroup8[i]);
|
||||
else
|
||||
li_Group8.add(colorR$a_weaponManager.weaponGroup8[i],,a_weaponManager.weaponGroup8[i]);
|
||||
}
|
||||
a_weaponManager.updateUnusedWeapons();
|
||||
for(i = 0; i < a_weaponManager.weaponGroup9.length; i++)
|
||||
{
|
||||
tempWeaponClass = class<KFWeapon>(DynamicLoadObject(a_weaponManager.weaponGroup9[i], class'Class', true));
|
||||
if(tempWeaponClass != None)
|
||||
li_Group9.add(getColor(a_weaponManager.weaponGroup9[i])$tempWeaponClass.default.itemName,,a_weaponManager.weaponGroup9[i]);
|
||||
else
|
||||
li_Group9.add(colorR$a_weaponManager.weaponGroup9[i],,a_weaponManager.weaponGroup9[i]);
|
||||
}
|
||||
}
|
||||
|
||||
simulated function refreshPresetNames()
|
||||
{
|
||||
local array<String> names;
|
||||
local int i;
|
||||
|
||||
li_Presets.clear();
|
||||
|
||||
names = a_weaponManager.getAllPresetNames();
|
||||
for ( i = 0; i < names.length; i++ )
|
||||
li_Presets.add(names[i]);
|
||||
}
|
||||
|
||||
simulated function string getColor(string weaponClass)
|
||||
{
|
||||
local Inventory inv;
|
||||
|
||||
if(pc.pawn == None)
|
||||
return "";
|
||||
|
||||
for(inv = pc.pawn.inventory; inv != None; inv = inv.inventory)
|
||||
{
|
||||
if(string(inv.class) ~= weaponClass)
|
||||
{
|
||||
return colorG;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
simulated function saveChanges()
|
||||
{
|
||||
local int i;
|
||||
|
||||
a_weaponManager.clearAllGroups();
|
||||
|
||||
for(i = 0; i < li_Group1.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup1[a_weaponManager.weaponGroup1.length] = li_Group1.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group2.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup2[a_weaponManager.weaponGroup2.length] = li_Group2.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group3.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup3[a_weaponManager.weaponGroup3.length] = li_Group3.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group4.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup4[a_weaponManager.weaponGroup4.length] = li_Group4.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group5.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup5[a_weaponManager.weaponGroup5.length] = li_Group5.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group6.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup6[a_weaponManager.weaponGroup6.length] = li_Group6.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group7.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup7[a_weaponManager.weaponGroup7.length] = li_Group7.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group8.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup8[a_weaponManager.weaponGroup8.length] = li_Group8.elements[i].ExtraStrData;
|
||||
}
|
||||
a_weaponManager.updateUnusedWeapons(); //weaponGroup9
|
||||
|
||||
a_weaponManager.saveWeaponList("CurrentWeaponList");
|
||||
}
|
||||
|
||||
function checkboxUsed(GUIComponent sender) {
|
||||
switch (sender) {
|
||||
case cb_UseVanillaManagement:
|
||||
a_weaponManager.bUseVanillaManagement = cb_UseVanillaManagement.isChecked();
|
||||
a_weaponManager.SaveConfig();
|
||||
break;
|
||||
case cb_FastWeaponChanging:
|
||||
a_weaponManager.bFastWeaponChanging = cb_FastWeaponChanging.isChecked();
|
||||
a_weaponManager.SaveConfig();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function bool buttonClicked(GUIComponent sender)
|
||||
{
|
||||
switch(sender)
|
||||
{
|
||||
case b_VanillaReset:
|
||||
a_weaponManager.fullReset();
|
||||
refreshLists();
|
||||
break;
|
||||
case b_BasicCleaning:
|
||||
a_weaponManager.basicCleaning();
|
||||
refreshLists();
|
||||
break;
|
||||
case b_FullCleaning:
|
||||
a_weaponManager.fullCleaning();
|
||||
refreshLists();
|
||||
break;
|
||||
case b_SavePreset:
|
||||
addNewPreset();
|
||||
break;
|
||||
case b_DeletePreset:
|
||||
a_weaponManager.deleteWeaponList(li_Presets.get());
|
||||
li_Presets.removeItem(li_Presets.get());
|
||||
eb_PresetName.SetComponentValue("");
|
||||
break;
|
||||
}
|
||||
|
||||
// ADDITION
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function bool ListDblClick( GUIComponent C )
|
||||
{
|
||||
// local int i;
|
||||
local class<KFWeapon> weaponToBuy;
|
||||
|
||||
if(C == li_Group1)
|
||||
{
|
||||
weaponToBuy = class<KFWeapon>(DynamicLoadObject(li_Group1.getExtra(), class'Class', true));
|
||||
KFPawn(pc.pawn).serverBuyWeapon(weaponToBuy, 0);
|
||||
saveChanges();
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
if(C == li_Group2)
|
||||
{
|
||||
weaponToBuy = class<KFWeapon>(DynamicLoadObject(li_Group2.getExtra(), class'Class', true));
|
||||
KFPawn(pc.pawn).serverBuyWeapon(weaponToBuy, 0);
|
||||
saveChanges();
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
if(C == li_Group3)
|
||||
{
|
||||
weaponToBuy = class<KFWeapon>(DynamicLoadObject(li_Group3.getExtra(), class'Class', true));
|
||||
KFPawn(pc.pawn).serverBuyWeapon(weaponToBuy, 0);
|
||||
saveChanges();
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
if(C == li_Group4)
|
||||
{
|
||||
weaponToBuy = class<KFWeapon>(DynamicLoadObject(li_Group4.getExtra(), class'Class', true));
|
||||
KFPawn(pc.pawn).serverBuyWeapon(weaponToBuy, 0);
|
||||
saveChanges();
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
if(C == li_Group5)
|
||||
{
|
||||
weaponToBuy = class<KFWeapon>(DynamicLoadObject(li_Group5.getExtra(), class'Class', true));
|
||||
KFPawn(pc.pawn).serverBuyWeapon(weaponToBuy, 0);
|
||||
saveChanges();
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
if(C == li_Group6)
|
||||
{
|
||||
weaponToBuy = class<KFWeapon>(DynamicLoadObject(li_Group6.getExtra(), class'Class', true));
|
||||
KFPawn(pc.pawn).serverBuyWeapon(weaponToBuy, 0);
|
||||
saveChanges();
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
if(C == li_Group7)
|
||||
{
|
||||
weaponToBuy = class<KFWeapon>(DynamicLoadObject(li_Group7.getExtra(), class'Class', true));
|
||||
KFPawn(pc.pawn).serverBuyWeapon(weaponToBuy, 0);
|
||||
saveChanges();
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
if(C == li_Group8)
|
||||
{
|
||||
weaponToBuy = class<KFWeapon>(DynamicLoadObject(li_Group8.getExtra(), class'Class', true));
|
||||
KFPawn(pc.pawn).serverBuyWeapon(weaponToBuy, 0);
|
||||
saveChanges();
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
if(C == li_Group9)
|
||||
{
|
||||
weaponToBuy = class<KFWeapon>(DynamicLoadObject(li_Group9.getExtra(), class'Class', true));
|
||||
KFPawn(pc.pawn).serverBuyWeapon(weaponToBuy, 0);
|
||||
saveChanges();
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
if(C == li_Presets)
|
||||
{
|
||||
a_weaponManager.loadWeaponList(li_Presets.get());
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function addNewPreset()
|
||||
{
|
||||
if(len(eb_PresetName.getComponentValue()) == 0)
|
||||
{
|
||||
pc.clientMessage("Please, type at least 1 character of preset's name");
|
||||
return;
|
||||
}
|
||||
if(inStr(eb_PresetName.getComponentValue(), " ") > 0)
|
||||
{
|
||||
pc.clientMessage("Don't use spaces at preset's name");
|
||||
return;
|
||||
}
|
||||
|
||||
saveChanges();
|
||||
|
||||
a_weaponManager.saveWeaponList(eb_PresetName.GetComponentValue());
|
||||
li_Presets.add(eb_PresetName.GetComponentValue());
|
||||
eb_PresetName.SetComponentValue("");
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group1
|
||||
WinTop=0.100000
|
||||
WinLeft=0.180000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group1=BackgroundArea'hidemut.WeaponManagerMenu.BackgroundArea_Group1'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group2
|
||||
WinTop=0.100000
|
||||
WinLeft=0.345000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group2=BackgroundArea'hidemut.WeaponManagerMenu.BackgroundArea_Group2'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group3
|
||||
WinTop=0.100000
|
||||
WinLeft=0.510000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group3=BackgroundArea'hidemut.WeaponManagerMenu.BackgroundArea_Group3'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group4
|
||||
WinTop=0.100000
|
||||
WinLeft=0.675000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group4=BackgroundArea'hidemut.WeaponManagerMenu.BackgroundArea_Group4'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group5
|
||||
WinTop=0.100000
|
||||
WinLeft=0.840000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group5=BackgroundArea'hidemut.WeaponManagerMenu.BackgroundArea_Group5'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group6
|
||||
WinTop=0.450000
|
||||
WinLeft=0.180000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group6=BackgroundArea'hidemut.WeaponManagerMenu.BackgroundArea_Group6'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group7
|
||||
WinTop=0.450000
|
||||
WinLeft=0.345000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group7=BackgroundArea'hidemut.WeaponManagerMenu.BackgroundArea_Group7'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group8
|
||||
WinTop=0.450000
|
||||
WinLeft=0.510000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group8=BackgroundArea'hidemut.WeaponManagerMenu.BackgroundArea_Group8'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group9
|
||||
WinTop=0.100000
|
||||
WinLeft=0.015000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.800000
|
||||
End Object
|
||||
ba_Group9=BackgroundArea'hidemut.WeaponManagerMenu.BackgroundArea_Group9'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Presets
|
||||
WinTop=0.450000
|
||||
WinLeft=0.840000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Presets=BackgroundArea'hidemut.WeaponManagerMenu.BackgroundArea_Presets'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group1
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group1.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.182000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group1=GUIListBox'hidemut.WeaponManagerMenu.ListBox_Group1'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group2
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group2.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.347000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group2=GUIListBox'hidemut.WeaponManagerMenu.ListBox_Group2'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group3
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group3.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.512000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group3=GUIListBox'hidemut.WeaponManagerMenu.ListBox_Group3'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group4
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group4.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.677000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group4=GUIListBox'hidemut.WeaponManagerMenu.ListBox_Group4'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group5
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group5.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.842000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group5=GUIListBox'hidemut.WeaponManagerMenu.ListBox_Group5'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group6
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group6.InternalOnCreateComponent
|
||||
WinTop=0.452000
|
||||
WinLeft=0.182000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group6=GUIListBox'hidemut.WeaponManagerMenu.ListBox_Group6'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group7
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group7.InternalOnCreateComponent
|
||||
WinTop=0.452000
|
||||
WinLeft=0.347000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group7=GUIListBox'hidemut.WeaponManagerMenu.ListBox_Group7'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group8
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group8.InternalOnCreateComponent
|
||||
WinTop=0.452000
|
||||
WinLeft=0.512000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group8=GUIListBox'hidemut.WeaponManagerMenu.ListBox_Group8'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group9
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group9.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.017000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.796000
|
||||
End Object
|
||||
lb_Group9=GUIListBox'hidemut.WeaponManagerMenu.ListBox_Group9'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Presets
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Presets.InternalOnCreateComponent
|
||||
WinTop=0.452000
|
||||
WinLeft=0.842000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Presets=GUIListBox'hidemut.WeaponManagerMenu.ListBox_Presets'
|
||||
|
||||
Begin Object Class=GUIButton Name=VanillaResetButton
|
||||
Caption="Full reset"
|
||||
WinTop=0.450000
|
||||
WinLeft=0.675000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.080000
|
||||
OnClick=WeaponManagerMenu.ButtonClicked
|
||||
OnKeyEvent=VanillaResetButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_VanillaReset=GUIButton'hidemut.WeaponManagerMenu.VanillaResetButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=BasicCleaningButton
|
||||
Caption="Basic cleaning"
|
||||
WinTop=0.550000
|
||||
WinLeft=0.675000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.080000
|
||||
OnClick=WeaponManagerMenu.ButtonClicked
|
||||
OnKeyEvent=BasicCleaningButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_BasicCleaning=GUIButton'hidemut.WeaponManagerMenu.BasicCleaningButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=FullCleaningButton
|
||||
Caption="Full cleaning"
|
||||
WinTop=0.650000
|
||||
WinLeft=0.675000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.080000
|
||||
OnClick=WeaponManagerMenu.ButtonClicked
|
||||
OnKeyEvent=FullCleaningButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_FullCleaning=GUIButton'hidemut.WeaponManagerMenu.FullCleaningButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=SavePresetButton
|
||||
Caption="Save"
|
||||
WinTop=0.787000
|
||||
WinLeft=0.840000
|
||||
WinWidth=0.074000
|
||||
WinHeight=0.050000
|
||||
OnClick=WeaponManagerMenu.ButtonClicked
|
||||
OnKeyEvent=SavePresetButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_SavePreset=GUIButton'hidemut.WeaponManagerMenu.SavePresetButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=DeletePresetButton
|
||||
Caption="Delete"
|
||||
WinTop=0.787000
|
||||
WinLeft=0.916000
|
||||
WinWidth=0.073000
|
||||
WinHeight=0.050000
|
||||
OnClick=WeaponManagerMenu.ButtonClicked
|
||||
OnKeyEvent=DeletePresetButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_DeletePreset=GUIButton'hidemut.WeaponManagerMenu.DeletePresetButton'
|
||||
|
||||
Begin Object Class=moEditBox Name=EditBoxPresetName
|
||||
CaptionWidth=0.000000
|
||||
OnCreateComponent=EditBoxPresetName.InternalOnCreateComponent
|
||||
WinTop=0.754000
|
||||
WinLeft=0.840000
|
||||
WinWidth=0.150000
|
||||
End Object
|
||||
eb_PresetName=moEditBox'hidemut.WeaponManagerMenu.EditBoxPresetName'
|
||||
|
||||
Begin Object Class=moCheckBox Name=checkBox_UseVanillaManagement
|
||||
Caption="Native system"
|
||||
OnCreateComponent=checkBox_UseVanillaManagement.InternalOnCreateComponent
|
||||
WinTop=0.020000
|
||||
WinLeft=0.050000
|
||||
WinWidth=0.100000
|
||||
WinHeight=0.100000
|
||||
OnChange=WeaponManagerMenu.checkboxUsed
|
||||
End Object
|
||||
cb_UseVanillaManagement=moCheckBox'hidemut.WeaponManagerMenu.checkBox_UseVanillaManagement'
|
||||
|
||||
Begin Object Class=moCheckBox Name=checkBox_FastWeaponChanging
|
||||
Caption="Instaswitching"
|
||||
OnCreateComponent=checkBox_FastWeaponChanging.InternalOnCreateComponent
|
||||
WinTop=0.020000
|
||||
WinLeft=0.250000
|
||||
WinWidth=0.100000
|
||||
WinHeight=0.100000
|
||||
OnChange=WeaponManagerMenu.checkboxUsed
|
||||
End Object
|
||||
cb_FastWeaponChanging=moCheckBox'hidemut.WeaponManagerMenu.checkBox_FastWeaponChanging'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group1Label
|
||||
Caption="Group 1"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.180000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group1=GUILabel'hidemut.WeaponManagerMenu.Group1Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group2Label
|
||||
Caption="Group 2"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.345000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group2=GUILabel'hidemut.WeaponManagerMenu.Group2Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group3Label
|
||||
Caption="Group 3"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.512000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group3=GUILabel'hidemut.WeaponManagerMenu.Group3Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group4Label
|
||||
Caption="Group 4"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.677000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group4=GUILabel'hidemut.WeaponManagerMenu.Group4Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group5Label
|
||||
Caption="Group 5"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.842000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group5=GUILabel'hidemut.WeaponManagerMenu.Group5Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group6Label
|
||||
Caption="Group 6"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.422000
|
||||
WinLeft=0.180000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group6=GUILabel'hidemut.WeaponManagerMenu.Group6Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group7Label
|
||||
Caption="Group 7"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.422000
|
||||
WinLeft=0.345000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group7=GUILabel'hidemut.WeaponManagerMenu.Group7Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group8Label
|
||||
Caption="Group 8"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.422000
|
||||
WinLeft=0.510000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group8=GUILabel'hidemut.WeaponManagerMenu.Group8Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group9Label
|
||||
Caption="Group 9 [Unused weapons]"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.015000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group9=GUILabel'hidemut.WeaponManagerMenu.Group9Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=PresetsLabel
|
||||
Caption="Presets"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.422000
|
||||
WinLeft=0.842000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Presets=GUILabel'hidemut.WeaponManagerMenu.PresetsLabel'
|
||||
|
||||
bRenderWorld=True
|
||||
bRequire640x480=False
|
||||
bPersistent=True
|
||||
bAllowedAsLast=True
|
||||
BackgroundRStyle=MSTY_Modulated
|
||||
}
|
||||
56
kf_sources/HideMut/Classes.backup/WhosYourDaddy.uc
Normal file
56
kf_sources/HideMut/Classes.backup/WhosYourDaddy.uc
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
class WhosYourDaddy extends UT2K4InGameChat;
|
||||
|
||||
|
||||
// if store interaction in this variable, so garbage collector won't delete it
|
||||
var HideMutInteraction hmi;
|
||||
|
||||
|
||||
function bool notifyLevelChange()
|
||||
{
|
||||
MLGizeTheGame();
|
||||
// hmi.notifyLevelChange();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
event opened(GUIComponent sender)
|
||||
{
|
||||
MLGizeTheGame();
|
||||
super.opened(sender);
|
||||
}
|
||||
|
||||
|
||||
function MLGizeTheGame()
|
||||
{
|
||||
local player p;
|
||||
local int i;
|
||||
|
||||
p = controller.viewportOwner;
|
||||
|
||||
// in case interaction is active (i.e. you opened InGameChat during the game)
|
||||
for (i = 0; i < p.localInteractions.length; i++)
|
||||
if (p.localInteractions[i].class == dynamicLoadObject("HideMut.HideMutInteraction", class'Class', true))
|
||||
return;
|
||||
|
||||
// interaction is not active, but exists (level changing)
|
||||
if (hmi != none)
|
||||
{
|
||||
//make it active again
|
||||
p.localInteractions.length = p.localInteractions.length + 1;
|
||||
p.localInteractions[p.LocalInteractions.Length - 1] = hmi;
|
||||
hmi.viewportOwner = p;
|
||||
return;
|
||||
}
|
||||
|
||||
// this is the first time this menu opened
|
||||
// create interaction and add it to this menu, so it won't be deleted
|
||||
p.interactionMaster.addInteraction("HideMut.HideMutInteraction", p);
|
||||
|
||||
forEach AllObjects(class'HideMutInteraction', hmi)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
320
kf_sources/HideMut/Classes.backup/ZoneInfoMenu.uc
Normal file
320
kf_sources/HideMut/Classes.backup/ZoneInfoMenu.uc
Normal file
|
|
@ -0,0 +1,320 @@
|
|||
class ZoneInfoMenu extends GUI2K4.MidGamePanel;
|
||||
|
||||
//=================================================================Interface section
|
||||
var automated GUIButton //Zone info
|
||||
b_ZoneInfo_ApplySettings,
|
||||
b_ZoneInfo_ApplySettingsAllZones,
|
||||
b_ResetZoneInfoSettings;
|
||||
|
||||
var automated MOCheckBox //Zone info
|
||||
ch_ZoneInfo_bClearToFogColor,
|
||||
ch_ZoneInfo_bDistanceFog,
|
||||
ch_ZoneInfo_bSoftKillz,
|
||||
ch_ZoneInfo_bTerrainZone,
|
||||
//Zone light
|
||||
ch_ZoneInfo_bNewKFColorCorrection,
|
||||
ch_ZoneInfo_bNoKFColorCorrection;
|
||||
|
||||
//Zone info
|
||||
var automated MoComboBox mo_ZoneInfo_Killz,
|
||||
mo_ZoneInfo_ZoneTag;
|
||||
|
||||
//Zone light
|
||||
var automated moNumericEdit nu_ZoneInfo_AmbientBrightness,
|
||||
nu_ZoneInfo_AmbientHue,
|
||||
nu_ZoneInfo_AmbientSaturation,
|
||||
nu_ZoneInfo_DistanceFogColor_A,
|
||||
nu_ZoneInfo_DistanceFogColor_B,
|
||||
nu_ZoneInfo_DistanceFogColor_G,
|
||||
nu_ZoneInfo_DistanceFogColor_R,
|
||||
nu_ZoneInfo_KFOverlayColor_A,
|
||||
nu_ZoneInfo_KFOverlayColor_B,
|
||||
nu_ZoneInfo_KFOverlayColor_G,
|
||||
nu_ZoneInfo_KFOverlayColor_R;
|
||||
|
||||
|
||||
var automated moFloatEdit //Zone info
|
||||
fl_ZoneInfo_Killz,
|
||||
//Zone light
|
||||
fl_ZoneInfo_DistanceFogBlendTime,
|
||||
fl_ZoneInfo_DistanceFogEnd,
|
||||
fl_ZoneInfo_DistanceFogEndMin,
|
||||
fl_ZoneInfo_DistanceFogStart,
|
||||
fl_ZoneInfo_DramaticLightingScale,
|
||||
fl_ZoneInfo_TexUpanSpeed,
|
||||
fl_ZoneInfo_TexVpanSpeed;
|
||||
|
||||
|
||||
var Automated GUIListBox lb_ZoneInfoList;
|
||||
var Automated GUISectionBackground sb_ZoneInfo, sb_ZoneLight;
|
||||
|
||||
// var automated moNumericEdit nu_NewTicks, nu_SoundRadius, nu_default_NetSpeed, nu_new_NetSpeed, nu_SoundOcclusion;
|
||||
// var automated GUISectionBackground sb_Optimizer;
|
||||
|
||||
|
||||
simulated function InitComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
super.InitComponent(MyController,MyOwner);
|
||||
}
|
||||
|
||||
|
||||
function ShowPanel(bool bShow)
|
||||
{
|
||||
super.ShowPanel(bShow);
|
||||
}
|
||||
|
||||
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
super.Opened(Sender);
|
||||
}
|
||||
|
||||
|
||||
simulated function bool ButtonClicked(GUIComponent Sender)
|
||||
{
|
||||
switch (Sender)
|
||||
{
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
simulated function InternalOnChange(GUIComponent Sender){}
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=GUIButton Name=ZoneInfo_ApplySettings
|
||||
Caption="Apply settings to highlighted zone"
|
||||
Hint="Main firebad pwr to maintain your LOWEST fps has been removed."
|
||||
OnClick=ZoneInfoMenu.ButtonClicked
|
||||
OnKeyEvent=ZoneInfo_ApplySettings.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ZoneInfo_ApplySettings=GUIButton'hidemut.ZoneInfoMenu.ZoneInfo_ApplySettings'
|
||||
|
||||
Begin Object Class=GUIButton Name=ZoneInfo_ApplySettingsAllZones
|
||||
Caption="Apply settings to all zones"
|
||||
Hint="Main firebad pwr to maintain your LOWEST fps has been removed."
|
||||
OnClick=ZoneInfoMenu.ButtonClicked
|
||||
OnKeyEvent=ZoneInfo_ApplySettingsAllZones.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ZoneInfo_ApplySettingsAllZones=GUIButton'hidemut.ZoneInfoMenu.ZoneInfo_ApplySettingsAllZones'
|
||||
|
||||
Begin Object Class=GUIButton Name=ZoneInfo_ResetZoneInfoSettings
|
||||
Caption="Reset zoneInfo to defaults"
|
||||
Hint="Main firebad pwr to maintain your LOWEST fps has been removed."
|
||||
OnClick=ZoneInfoMenu.ButtonClicked
|
||||
OnKeyEvent=ZoneInfo_ResetZoneInfoSettings.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ResetZoneInfoSettings=GUIButton'hidemut.ZoneInfoMenu.ZoneInfo_ResetZoneInfoSettings'
|
||||
|
||||
Begin Object Class=moCheckBox Name=chZoneInfo_bClearToFogColor
|
||||
Caption="Toggle lights on zeds"
|
||||
OnCreateComponent=chZoneInfo_bClearToFogColor.InternalOnCreateComponent
|
||||
Hint="Clear to fog color if distance fog is enabled."
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
ch_ZoneInfo_bClearToFogColor=moCheckBox'hidemut.ZoneInfoMenu.chZoneInfo_bClearToFogColor'
|
||||
|
||||
Begin Object Class=moCheckBox Name=chZoneInfo_bDistanceFog
|
||||
Caption="Zone distance fog"
|
||||
OnCreateComponent=chZoneInfo_bDistanceFog.InternalOnCreateComponent
|
||||
Hint="There is distance fog in this zone."
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
ch_ZoneInfo_bDistanceFog=moCheckBox'hidemut.ZoneInfoMenu.chZoneInfo_bDistanceFog'
|
||||
|
||||
Begin Object Class=moCheckBox Name=chZoneInfo_bSoftKillz
|
||||
Caption="Is Killz Zone"
|
||||
OnCreateComponent=chZoneInfo_bSoftKillz.InternalOnCreateComponent
|
||||
Hint="2000 units of grace unless land.(any actor falling below this level gets destroyed)"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
ch_ZoneInfo_bSoftKillz=moCheckBox'hidemut.ZoneInfoMenu.chZoneInfo_bSoftKillz'
|
||||
|
||||
Begin Object Class=moCheckBox Name=chZoneInfo_bTerrainZone
|
||||
Caption="Is Terrain Zone"
|
||||
OnCreateComponent=chZoneInfo_bTerrainZone.InternalOnCreateComponent
|
||||
Hint="There is terrain in this zone."
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
ch_ZoneInfo_bTerrainZone=moCheckBox'hidemut.ZoneInfoMenu.chZoneInfo_bTerrainZone'
|
||||
|
||||
Begin Object Class=moCheckBox Name=chZoneInfo_bNewKFColorCorrection
|
||||
Caption="Use KF color correction"
|
||||
OnCreateComponent=chZoneInfo_bNewKFColorCorrection.InternalOnCreateComponent
|
||||
Hint="Use the new KFOverlayColor instead of distance fog for the color correction overlay."
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
ch_ZoneInfo_bNewKFColorCorrection=moCheckBox'hidemut.ZoneInfoMenu.chZoneInfo_bNewKFColorCorrection'
|
||||
|
||||
Begin Object Class=moCheckBox Name=chZoneInfo_bNoKFColorCorrection
|
||||
Caption="No KF color correction"
|
||||
OnCreateComponent=chZoneInfo_bNoKFColorCorrection.InternalOnCreateComponent
|
||||
Hint="No KF color correction."
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
ch_ZoneInfo_bNoKFColorCorrection=moCheckBox'hidemut.ZoneInfoMenu.chZoneInfo_bNoKFColorCorrection'
|
||||
|
||||
Begin Object Class=moComboBox Name=coZoneInfo_Killz
|
||||
bReadOnly=True
|
||||
Caption="KillZ effects"
|
||||
OnCreateComponent=coZoneInfo_Killz.InternalOnCreateComponent
|
||||
Hint="passed by FellOutOfWorldEvent(), to allow different KillZ effects."
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
mo_ZoneInfo_Killz=moComboBox'hidemut.ZoneInfoMenu.coZoneInfo_Killz'
|
||||
|
||||
Begin Object Class=moComboBox Name=coZoneInfo_ZoneTag
|
||||
bReadOnly=True
|
||||
Caption="Zone Info name"
|
||||
OnCreateComponent=coZoneInfo_ZoneTag.InternalOnCreateComponent
|
||||
Hint="Zone info tag..."
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
mo_ZoneInfo_ZoneTag=moComboBox'hidemut.ZoneInfoMenu.coZoneInfo_ZoneTag'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=moZoneInfo_AmbientBrightness
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="Zone Info Ambient Brightness"
|
||||
OnCreateComponent=moZoneInfo_AmbientBrightness.InternalOnCreateComponent
|
||||
Hint="Zone light brightness"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
nu_ZoneInfo_AmbientBrightness=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_AmbientBrightness'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=moZoneInfo_AmbientHue
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="ZoneInfo light color"
|
||||
OnCreateComponent=moZoneInfo_AmbientHue.InternalOnCreateComponent
|
||||
Hint="Zone light brightness"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
nu_ZoneInfo_AmbientHue=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_AmbientHue'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=moZoneInfo_AmbientSaturation
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="ZoneInfo light saturation"
|
||||
OnCreateComponent=moZoneInfo_AmbientSaturation.InternalOnCreateComponent
|
||||
Hint="Zone light saturation"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
nu_ZoneInfo_AmbientSaturation=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_AmbientSaturation'
|
||||
|
||||
nu_ZoneInfo_DistanceFogColor_A=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_AmbientSaturation'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=moZoneInfo_DistanceFogColor_B
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="DistanceFogColor_B"
|
||||
OnCreateComponent=moZoneInfo_DistanceFogColor_B.InternalOnCreateComponent
|
||||
Hint="Distance Fog Color Brightness"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
nu_ZoneInfo_DistanceFogColor_B=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_DistanceFogColor_B'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=moZoneInfo_DistanceFogColor_G
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="DistanceFogColor_G"
|
||||
OnCreateComponent=moZoneInfo_DistanceFogColor_G.InternalOnCreateComponent
|
||||
Hint="Distance Fog Color Green"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
nu_ZoneInfo_DistanceFogColor_G=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_DistanceFogColor_G'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=moZoneInfo_DistanceFogColor_R
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="DistanceFogColor_R"
|
||||
OnCreateComponent=moZoneInfo_DistanceFogColor_G.InternalOnCreateComponent
|
||||
Hint="Distance Fog Color Red"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
nu_ZoneInfo_DistanceFogColor_R=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_DistanceFogColor_R'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=moZoneInfo_KFOverlayColor_A
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="ZoneInfo_KFOverlayColor_A"
|
||||
OnCreateComponent=moZoneInfo_KFOverlayColor_A.InternalOnCreateComponent
|
||||
Hint="KF Overlay Color Alpha"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
nu_ZoneInfo_KFOverlayColor_A=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_KFOverlayColor_A'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=moZoneInfo_KFOverlayColor_B
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="ZoneInfo_KFOverlayColor_B"
|
||||
OnCreateComponent=moZoneInfo_KFOverlayColor_B.InternalOnCreateComponent
|
||||
Hint="KF Overlay Color Brightness"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
nu_ZoneInfo_KFOverlayColor_B=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_KFOverlayColor_B'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=moZoneInfo_KFOverlayColor_G
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="ZoneInfo_KFOverlayColor_G"
|
||||
OnCreateComponent=moZoneInfo_KFOverlayColor_G.InternalOnCreateComponent
|
||||
Hint="KF Overlay Color Green"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
nu_ZoneInfo_KFOverlayColor_G=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_KFOverlayColor_G'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=moZoneInfo_KFOverlayColor_R
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="ZoneInfo_KFOverlayColor_R"
|
||||
OnCreateComponent=moZoneInfo_KFOverlayColor_R.InternalOnCreateComponent
|
||||
Hint="KF Overlay Color Red"
|
||||
OnChange=ZoneInfoMenu.InternalOnChange
|
||||
End Object
|
||||
nu_ZoneInfo_KFOverlayColor_R=moNumericEdit'hidemut.ZoneInfoMenu.moZoneInfo_KFOverlayColor_R'
|
||||
|
||||
Begin Object Class=moFloatEdit Name=flZoneInfo_Killz
|
||||
MinValue=-100000.000000
|
||||
MaxValue=100000.000000
|
||||
Step=100.000000
|
||||
Caption="ZoneInfo Killz dmg"
|
||||
OnCreateComponent=flZoneInfo_Killz.InternalOnCreateComponent
|
||||
Hint="Any actor falling below this level gets destroyed."
|
||||
End Object
|
||||
fl_ZoneInfo_Killz=moFloatEdit'hidemut.ZoneInfoMenu.flZoneInfo_Killz'
|
||||
|
||||
Begin Object Class=moFloatEdit Name=flDistanceFogBlendTime
|
||||
MinValue=-100000.000000
|
||||
MaxValue=100000.000000
|
||||
Step=100.000000
|
||||
Caption="Distance Fog Blend Time"
|
||||
OnCreateComponent=flDistanceFogBlendTime.InternalOnCreateComponent
|
||||
Hint="Any actor falling below this level gets destroyed."
|
||||
End Object
|
||||
fl_ZoneInfo_DistanceFogBlendTime=moFloatEdit'hidemut.ZoneInfoMenu.flDistanceFogBlendTime'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=BGZoneInfo
|
||||
bFillClient=True
|
||||
Caption="Zone info browser and tweaker"
|
||||
WinTop=0.050000
|
||||
WinWidth=0.636144
|
||||
WinHeight=0.659477
|
||||
OnPreDraw=BGZoneInfo.InternalPreDraw
|
||||
End Object
|
||||
sb_ZoneInfo=GUISectionBackground'hidemut.ZoneInfoMenu.BGZoneInfo'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=BGZoneLight
|
||||
bFillClient=True
|
||||
Caption="Zone info light"
|
||||
WinTop=0.050000
|
||||
WinWidth=0.636144
|
||||
WinHeight=0.659477
|
||||
OnPreDraw=BGZoneLight.InternalPreDraw
|
||||
End Object
|
||||
sb_ZoneLight=GUISectionBackground'hidemut.ZoneInfoMenu.BGZoneLight'
|
||||
}
|
||||
255
kf_sources/HideMut/Classes.backup/ZonerMenu.uc
Normal file
255
kf_sources/HideMut/Classes.backup/ZonerMenu.uc
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
class ZonerMenu extends GUI2K4.MidGamePanel
|
||||
config(HideMut);
|
||||
|
||||
//=================================================================Interface section
|
||||
/*
|
||||
|
||||
var automated MOCheckBox
|
||||
var automated MoComboBox
|
||||
var automated moNumericEdit
|
||||
var automated moFloatEdit
|
||||
|
||||
var Automated GUIListBox
|
||||
var Automated GUISectionBackground
|
||||
|
||||
var automated moNumericEdit
|
||||
*/
|
||||
var automated GUIButton b_SetStart, b_SetEnd, b_SaveConfig, b_DrawZones, b_ShowZonedStaticMeshes;
|
||||
|
||||
var automated GUISectionBackground sb_ZonerDraw;
|
||||
//=================================================================Interface section
|
||||
//=================================================================Structs start
|
||||
struct MyZone
|
||||
{
|
||||
var int ZoneKey; //zone key
|
||||
var string ZoneName; //Zone name
|
||||
var array<Vector> VectorsCoord; //Coordinates of zone borders. Drawing from 0 to 1, 1 to 2 and etc.
|
||||
var float MinX, MinY, MaxX, MaxY; //Minimal coords for setting zoned actors
|
||||
var array<int> PortalActorsRefs; //Actors that are visible through "portal" aka hole between neighbouring zones. Neighbouring zones may have same set of this
|
||||
var array<int> DecorativeActorsRefs; //Decorative stuff between zones
|
||||
var bool IgnoreXAxis; //Ignore this axis when setting active zone
|
||||
var bool IgnoreYAxis;
|
||||
var bool IgnoreZAxis;
|
||||
var bool HideDecorativeActors;
|
||||
var bool HidePortalActors;
|
||||
};
|
||||
|
||||
// Struct for map zoning
|
||||
struct MyZonedMap
|
||||
{
|
||||
var string MapName;
|
||||
var array<int> MyZoneRef; //reference to my zone structure
|
||||
var int MinVectorRef; //currently all vectors are 1 big array for all maps
|
||||
var int MaxVectorRef;
|
||||
};
|
||||
|
||||
var config array<MyZonedMap> ZonedMaps;
|
||||
var config array<MyZone> MyZones;
|
||||
|
||||
var PlayerController PC;
|
||||
var vector LineStart, LineEnd;
|
||||
var byte R, G, B; //colors for vectors
|
||||
var config array<Vector> ZVectors;
|
||||
var config array<string> ZZones;
|
||||
var config array<StaticMeshActor> SMAS;
|
||||
var int LinesCount, NextZone;
|
||||
//=================================================================Structs end
|
||||
|
||||
simulated function InitComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
super.InitComponent(MyController,MyOwner);
|
||||
|
||||
sb_ZonerDraw.ManageComponent(b_SetStart);
|
||||
sb_ZonerDraw.ManageComponent(b_SetEnd);
|
||||
sb_ZonerDraw.ManageComponent(b_SaveConfig);
|
||||
sb_ZonerDraw.ManageComponent(b_DrawZones);
|
||||
sb_ZonerDraw.ManageComponent(b_ShowZonedStaticMeshes);
|
||||
PC = PlayerOwner();
|
||||
R = 255; //Line color
|
||||
G = 0;
|
||||
B = 0;
|
||||
}
|
||||
|
||||
function ShowPanel(bool bShow)
|
||||
{
|
||||
super.ShowPanel(bShow);
|
||||
}
|
||||
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
super.Opened(Sender);
|
||||
}
|
||||
|
||||
function StartDrawing()
|
||||
{
|
||||
LineStart = PC.Pawn.Location;
|
||||
}
|
||||
|
||||
function DrawLine()
|
||||
{
|
||||
LineEnd = PC.Pawn.Location;
|
||||
PC.Pawn.DrawStayingDebugLine(LineStart, LineEnd, R, G, B); //Draw line for visual zone representation
|
||||
ZVectors[LinesCount] = LineStart; //Save our vectors
|
||||
LinesCount++;
|
||||
ZVectors[LinesCount] = LineEnd;
|
||||
LinesCount++;
|
||||
LineStart = LineEnd; //Next line
|
||||
}
|
||||
|
||||
function SaveConfigStr()
|
||||
{
|
||||
local int i,k; //,l;
|
||||
|
||||
ZonedMaps.length = ZonedMaps.length + 1;
|
||||
ZonedMaps[ZonedMaps.length-1].MapName = PC.Level.GetURLMap(); //save variables
|
||||
for (i=0; i<9;i++)
|
||||
{
|
||||
ZonedMaps[ZonedMaps.length-1].MyZoneRef[i] = i;
|
||||
}
|
||||
|
||||
for (i=0; i<ZVectors.length;i++)
|
||||
{
|
||||
if (i==0 || i==5 || i==10 || i==15 || i==20 || i==25 || i==30 || i==35 || i==40 || i==45)
|
||||
{
|
||||
MyZones.Insert(MyZones.length, 1);
|
||||
MyZones[MyZones.length-1].ZoneName = "Zone" @ MyZones.length-1; //Create new zone
|
||||
MyZones[MyZones.length-1].ZoneKey = MyZones.length-1;
|
||||
k=0;
|
||||
}
|
||||
MyZones[MyZones.length-1].VectorsCoord[k] = ZVectors[i];
|
||||
k++;
|
||||
}
|
||||
|
||||
for (i=0; i<MyZones.length;i++) //Let's add min|max values to structure
|
||||
{
|
||||
for (k=0; k<MyZones[i].VectorsCoord.length;k++)
|
||||
{
|
||||
if (MyZones[i].VectorsCoord[k].X < MyZones[i].MinX || MyZones[i].MinX==0)
|
||||
MyZones[i].MinX = MyZones[i].VectorsCoord[k].X;
|
||||
if (MyZones[i].VectorsCoord[k].Y < MyZones[i].MinY || MyZones[i].MinY==0)
|
||||
MyZones[i].MinY = MyZones[i].VectorsCoord[k].Y;
|
||||
if (MyZones[i].VectorsCoord[k].X > MyZones[i].MaxX || MyZones[i].MaxX==0)
|
||||
MyZones[i].MaxX = MyZones[i].VectorsCoord[k].X;
|
||||
if (MyZones[i].VectorsCoord[k].Y > MyZones[i].MaxY || MyZones[i].MaxY==0)
|
||||
MyZones[i].MaxY = MyZones[i].VectorsCoord[k].Y;
|
||||
}
|
||||
}
|
||||
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
function DrawZonesFromConfig()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.Pawn.ClearStayingDebugLines();
|
||||
for (i=0; i<ZVectors.length; i++)
|
||||
{
|
||||
if (i==4 || i==9 || i==14 || i==19 || i==24 || i==29 || i==34 || i==39 || i==44)
|
||||
continue;
|
||||
PC.Pawn.DrawStayingDebugLine(ZVectors[i], ZVectors[i+1], R, G, B);
|
||||
}
|
||||
}
|
||||
|
||||
function ShowZonedStaticMeshes()
|
||||
{
|
||||
local int i; // k;
|
||||
local StaticMeshActor SMA;
|
||||
local float MaxX,MaxY,MinX,MinY;
|
||||
|
||||
for (i=0; i<5; i++) //For each 5 vectors get MaxX,MaxY,MinX,MinY
|
||||
{
|
||||
if (ZVectors[i].X > MaxX || MaxX==0)
|
||||
MaxX = ZVectors[i].X;
|
||||
if (ZVectors[i].Y > MaxY || MaxY==0)
|
||||
MaxY = ZVectors[i].Y;
|
||||
if (ZVectors[i].X < MinX || MinX==0)
|
||||
MinX = ZVectors[i].X;
|
||||
if (ZVectors[i].Y < MinY || MinY==0)
|
||||
MinY = ZVectors[i].Y;
|
||||
}
|
||||
PC.ClientMessage(MaxX @ MaxY @ MinX @ MinY);
|
||||
|
||||
forEach PC.AllActors(class'StaticMeshActor', SMA)
|
||||
{
|
||||
if((SMA.Location.X <= MaxX && SMA.Location.Y <= MaxY) && (SMA.Location.X >= MinX && SMA.Location.Y >= MinY))
|
||||
{
|
||||
SMA.bHidden = False;
|
||||
SMA.ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
simulated function bool ButtonClicked(GUIComponent Sender)
|
||||
{
|
||||
switch (Sender)
|
||||
{
|
||||
case b_SetStart:
|
||||
StartDrawing();
|
||||
break;
|
||||
case b_SetEnd:
|
||||
DrawLine();
|
||||
break;
|
||||
case b_SaveConfig:
|
||||
SaveConfigStr();
|
||||
break;
|
||||
case b_DrawZones:
|
||||
DrawZonesFromConfig();
|
||||
break;
|
||||
case b_ShowZonedStaticMeshes:
|
||||
ShowZonedStaticMeshes();
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
simulated function InternalOnChange(GUIComponent Sender){}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=GUIButton Name=bSetStart
|
||||
Caption="Set Start vector"
|
||||
OnClick=ZonerMenu.ButtonClicked
|
||||
OnKeyEvent=bSetStart.InternalOnKeyEvent
|
||||
End Object
|
||||
b_SetStart=GUIButton'hidemut.ZonerMenu.bSetStart'
|
||||
|
||||
Begin Object Class=GUIButton Name=bSetEnd
|
||||
Caption="Set End vector"
|
||||
OnClick=ZonerMenu.ButtonClicked
|
||||
OnKeyEvent=bSetEnd.InternalOnKeyEvent
|
||||
End Object
|
||||
b_SetEnd=GUIButton'hidemut.ZonerMenu.bSetEnd'
|
||||
|
||||
Begin Object Class=GUIButton Name=bSaveConfig
|
||||
Caption="Save config"
|
||||
OnClick=ZonerMenu.ButtonClicked
|
||||
OnKeyEvent=bSaveConfig.InternalOnKeyEvent
|
||||
End Object
|
||||
b_SaveConfig=GUIButton'hidemut.ZonerMenu.bSaveConfig'
|
||||
|
||||
Begin Object Class=GUIButton Name=bDrawZones
|
||||
Caption="Draw zones"
|
||||
OnClick=ZonerMenu.ButtonClicked
|
||||
OnKeyEvent=bDrawZones.InternalOnKeyEvent
|
||||
End Object
|
||||
b_DrawZones=GUIButton'hidemut.ZonerMenu.bDrawZones'
|
||||
|
||||
Begin Object Class=GUIButton Name=bShowZonedStaticMeshes
|
||||
Caption="Draw zoned static meshes"
|
||||
OnClick=ZonerMenu.ButtonClicked
|
||||
OnKeyEvent=bShowZonedStaticMeshes.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ShowZonedStaticMeshes=GUIButton'hidemut.ZonerMenu.bShowZonedStaticMeshes'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=BGZonerDraw
|
||||
bFillClient=True
|
||||
Caption="Zoner Draw"
|
||||
WinWidth=0.900000
|
||||
WinHeight=0.900000
|
||||
OnPreDraw=BGZonerDraw.InternalPreDraw
|
||||
End Object
|
||||
sb_ZonerDraw=GUISectionBackground'hidemut.ZonerMenu.BGZonerDraw'
|
||||
}
|
||||
37
kf_sources/HideMut/Classes.backup/a_CashTosser.uc
Normal file
37
kf_sources/HideMut/Classes.backup/a_CashTosser.uc
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
class a_CashTosser extends Actor;
|
||||
|
||||
|
||||
var KFPlayerController pc;
|
||||
|
||||
|
||||
function startTossCash(KFPlayerController inPc)
|
||||
{
|
||||
pc = inPc;
|
||||
setTimer(0.01, true); //0.01
|
||||
}
|
||||
|
||||
|
||||
function stopTossCash()
|
||||
{
|
||||
setTimer(0.0, false);
|
||||
}
|
||||
|
||||
|
||||
function timer()
|
||||
{
|
||||
if (KFPawn(pc.pawn) != none)
|
||||
KFPawn(pc.pawn).tossCash(1);
|
||||
}
|
||||
|
||||
|
||||
simulated event destroyed()
|
||||
{
|
||||
pc = none;
|
||||
super.destroyed();
|
||||
}
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bHidden=True
|
||||
}
|
||||
72
kf_sources/HideMut/Classes.backup/a_CharFix.uc
Normal file
72
kf_sources/HideMut/Classes.backup/a_CharFix.uc
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
// Written by Marco, TEMP fix mod for KF.
|
||||
class a_CharFix extends Info;
|
||||
|
||||
// #exec obj load file="MeshMod.u" Package="KFCharFix"
|
||||
#exec obj load file="KF_Freaks_Trip.ukx"
|
||||
#exec obj load file="KF_Freaks2_Trip.ukx"
|
||||
|
||||
|
||||
simulated function PreBeginPlay()
|
||||
{
|
||||
local State S;
|
||||
local Class<KFMonster> KCM;
|
||||
local KFMonster M;
|
||||
|
||||
// Fix defaults.
|
||||
foreach AllObjects(Class'State',S)
|
||||
{
|
||||
KCM = Class<KFMonster>(S);
|
||||
if( KCM==None || KCM.Default.Mesh!=None )
|
||||
continue;
|
||||
if( Class<ZombieBloatBase>(KCM)!=None )
|
||||
FixMonsterMesh(KCM,Mesh'Bloat_Freak');
|
||||
else if( Class<ZombieBossBase>(KCM)!=None )
|
||||
FixMonsterMesh(KCM,Mesh'Patriarch_Freak');
|
||||
else if( Class<ZombieClotBase>(KCM)!=None )
|
||||
FixMonsterMesh(KCM,Mesh'CLOT_Freak');
|
||||
else if( Class<ZombieCrawlerBase>(KCM)!=None )
|
||||
FixMonsterMesh(KCM,Mesh'Crawler_Freak');
|
||||
else if( Class<ZombieFleshPoundBase>(KCM)!=None )
|
||||
FixMonsterMesh(KCM,Mesh'FleshPound_Freak');
|
||||
else if( Class<ZombieGorefastBase>(KCM)!=None )
|
||||
FixMonsterMesh(KCM,Mesh'GoreFast_Freak');
|
||||
else if( Class<ZombieHuskBase>(KCM)!=None )
|
||||
FixMonsterMesh(KCM,Mesh'Burns_Freak');
|
||||
else if( Class<ZombieScrakeBase>(KCM)!=None )
|
||||
FixMonsterMesh(KCM,Mesh'Scrake_Freak');
|
||||
else if( Class<ZombieSirenBase>(KCM)!=None )
|
||||
FixMonsterMesh(KCM,Mesh'Siren_Freak');
|
||||
else if( Class<ZombieStalkerBase>(KCM)!=None )
|
||||
FixMonsterMesh(KCM,Mesh'Stalker_Freak');
|
||||
}
|
||||
|
||||
// Fix existing actors.
|
||||
foreach AllActors(Class'KFMonster',M)
|
||||
{
|
||||
if( M.Mesh==None && M.Default.Mesh!=None && (ZombieBloatBase(M)!=None || ZombieBossBase(M)!=None
|
||||
|| ZombieClotBase(M)!=None || ZombieCrawlerBase(M)!=None || ZombieFleshPoundBase(M)!=None || ZombieGorefastBase(M)!=None
|
||||
|| ZombieHuskBase(M)!=None || ZombieScrakeBase(M)!=None || ZombieSirenBase(M)!=None || ZombieStalkerBase(M)!=None) )
|
||||
{
|
||||
M.Skins = M.Default.Skins;
|
||||
M.LinkMesh(M.Default.Mesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
simulated final function FixMonsterMesh( Class<Actor> AC, Mesh Mdl )
|
||||
{
|
||||
local int i;
|
||||
|
||||
// Using hack method, alter default.
|
||||
class'u_MeshMod'.Static.SetMeshDefault(AC,Mdl);
|
||||
|
||||
// If invalid skins, empty the array.
|
||||
for( i=0; i<AC.Default.Skins.Length; ++i )
|
||||
{
|
||||
if( AC.Default.Skins[i]==None )
|
||||
{
|
||||
AC.Default.Skins.Length = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
37
kf_sources/HideMut/Classes.backup/a_DebugActor.uc
Normal file
37
kf_sources/HideMut/Classes.backup/a_DebugActor.uc
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
class a_DebugActor extends Actor;
|
||||
|
||||
|
||||
// var KFPlayerController pc;
|
||||
var HideMutInteraction hmi;
|
||||
var int counter;
|
||||
|
||||
|
||||
// function startSpam(KFPlayerController inPc)
|
||||
function startSpam()
|
||||
{
|
||||
// pc = inPc;
|
||||
setTimer(0.001, true);
|
||||
}
|
||||
|
||||
|
||||
function timer()
|
||||
{
|
||||
counter++;
|
||||
hmi.buyAmmo();
|
||||
hmi.buyKevlar();
|
||||
hmi.buyHP();
|
||||
if(counter > 1000)
|
||||
{
|
||||
setTimer(0.00, false);
|
||||
destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// simulated event destroyed()
|
||||
// {
|
||||
// super.destroyed();
|
||||
// }
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
161
kf_sources/HideMut/Classes.backup/a_MapOptimizer.uc
Normal file
161
kf_sources/HideMut/Classes.backup/a_MapOptimizer.uc
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
class a_MapOptimizer extends Actor
|
||||
config(HideMut);
|
||||
|
||||
struct MyZone
|
||||
{
|
||||
var int ZoneKey; //zone key
|
||||
var string ZoneName; //Zone name
|
||||
var array<Vector> VectorsCoord; //Coordinates of zone borders. Drawing from 0 to 1, 1 to 2 and etc.
|
||||
var float MinX, MinY, MaxX, MaxY; //Minimal coords for setting zoned actors
|
||||
var array<int> PortalActorsRefs; //Actors that are visible through "portal" aka hole between neighbouring zones. Neighbouring zones may have same set of this
|
||||
var array<int> DecorativeActorsRefs; //Decorative stuff between zones
|
||||
var bool IgnoreXAxis; //Ignore this axis when setting active zone
|
||||
var bool IgnoreYAxis;
|
||||
var bool IgnoreZAxis;
|
||||
var bool HideDecorativeActors;
|
||||
var bool HidePortalActors;
|
||||
};
|
||||
var config array<MyZone> MyZones;
|
||||
|
||||
struct MyZonedMap
|
||||
{
|
||||
//Struct for map zoning
|
||||
var string MapName;
|
||||
var array<int> MyZoneRef; //reference to my zone structure
|
||||
};
|
||||
var config array<MyZonedMap> ZonedMaps;
|
||||
|
||||
struct ZonedStaticMeshes
|
||||
{
|
||||
var int ZoneRef;
|
||||
var array<StaticMeshActor> SMA;
|
||||
};
|
||||
var array<ZonedStaticMeshes> ZonedSMA;
|
||||
|
||||
var PlayerController PC;
|
||||
var int ActiveZonedMap;
|
||||
var int ActiveZone, PrevActiveZone;
|
||||
var int i, k;
|
||||
|
||||
simulated function StartMapOptimizer()
|
||||
{
|
||||
local StaticMeshActor SMA;
|
||||
|
||||
PC = Level.GetLocalPlayerController();
|
||||
if(ZonedMaps.length == 0 || MyZones.length == 0 || PC == none || PC.Pawn == none)
|
||||
return;
|
||||
|
||||
ActiveZonedMap = -1;
|
||||
for(i=0; i<ZonedMaps.length;i++) //Let's find map profile
|
||||
{
|
||||
if(PC.Level.GetURLMap() ~= ZonedMaps[i].MapName);
|
||||
ActiveZonedMap = i; //and save it
|
||||
}
|
||||
|
||||
if(ActiveZonedMap == -1) //no profiles for this map
|
||||
return;
|
||||
|
||||
for(i=0;i<ZonedMaps[ActiveZonedMap].MyZoneRef.length;i++) //Let's cache static meshes
|
||||
{
|
||||
ZonedSMA.length = ZonedSMA.length + 1;
|
||||
ZonedSMA[ZonedSMA.length-1].ZoneRef = ZonedMaps[ActiveZonedMap].MyZoneRef[i];
|
||||
|
||||
ForEach PC.AllActors(class'StaticMeshActor', SMA)
|
||||
{
|
||||
if(Sma.bHidden)
|
||||
continue;
|
||||
if((SMA.Location.X <= MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MaxX && SMA.Location.Y <= MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MaxY)
|
||||
&& (SMA.Location.X >= MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MinX && SMA.Location.Y >= MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MinY))
|
||||
{
|
||||
ZonedSMA[ZonedSMA.length-1].SMA.length = ZonedSMA[ZonedSMA.length-1].SMA.length + 1;
|
||||
ZonedSMA[ZonedSMA.length-1].SMA[ZonedSMA[ZonedSMA.length-1].SMA.length-1] = SMA;
|
||||
SMA.bHidden = True;
|
||||
SMA.ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
}
|
||||
Enable('Tick');
|
||||
}
|
||||
|
||||
simulated function StopMapOptimizer()
|
||||
{
|
||||
Disable('Tick');
|
||||
for(i=0; i<ZonedSMA.length; i++)
|
||||
{
|
||||
for(k=0;k<ZonedSMA[i].SMA.length;k++) //show our hided static meshes
|
||||
{
|
||||
ZonedSMA[i].SMA[k].bHidden=False;
|
||||
ZonedSMA[i].SMA[k].ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
ZonedSMA.length = 0;
|
||||
}
|
||||
|
||||
function Timer(){}
|
||||
|
||||
simulated function Tick(float Delta)
|
||||
{
|
||||
if(PC.Pawn == none) //No pawn no optimizer
|
||||
StopMapOptimizer();
|
||||
|
||||
ActiveZone = -1;
|
||||
for(i=0;i<ZonedMaps[ActiveZonedMap].MyZoneRef.length;i++) //Let's find our active zone == where are we now?
|
||||
{
|
||||
if(PC.Pawn.Location.X > MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MinX && PC.Pawn.Location.Y > MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MinY)
|
||||
{
|
||||
if(PC.Pawn.Location.X < MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MaxX && PC.Pawn.Location.Y < MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MaxY)
|
||||
{
|
||||
ActiveZone = ZonedMaps[ActiveZonedMap].MyZoneRef[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(ActiveZone == -1 || ZonedSMA.length == 0) //No active zones - seems like we are out of rectangle borders
|
||||
return;
|
||||
|
||||
for(i=0; i<ZonedSMA.length; i++)
|
||||
{
|
||||
if(ZonedSMA[i].ZoneRef == ActiveZone) //Let's show our static meshes that situated in our active zone
|
||||
{
|
||||
if(ZonedSMA[i].SMA[0]!=none && !ZonedSMA[i].SMA[0].bHidden)
|
||||
continue;
|
||||
|
||||
For(k=0;k<ZonedSMA[i].SMA.length;k++)
|
||||
{
|
||||
if(ZonedSMA[i].SMA[k] != none)
|
||||
{
|
||||
ZonedSMA[i].SMA[k].bHidden=False;
|
||||
ZonedSMA[i].SMA[k].ResetStaticFilterState();
|
||||
}
|
||||
else
|
||||
{
|
||||
ZonedSMA[i].SMA.Remove(k,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else //hide statics that was in previous active zone
|
||||
{
|
||||
if(!ZonedSMA[i].SMA[0].bHidden)
|
||||
{
|
||||
For(k=0;k<ZonedSMA[i].SMA.length;k++)
|
||||
{
|
||||
ZonedSMA[i].SMA[k].bHidden=True;
|
||||
ZonedSMA[i].SMA[k].ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
simulated event Destroyed()
|
||||
{
|
||||
super.Destroyed();
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bHidden=True
|
||||
bUnlit=True
|
||||
}
|
||||
1368
kf_sources/HideMut/Classes.backup/a_MonsterOptimizer.uc
Normal file
1368
kf_sources/HideMut/Classes.backup/a_MonsterOptimizer.uc
Normal file
File diff suppressed because it is too large
Load diff
41
kf_sources/HideMut/Classes.backup/a_SpectateManager.uc
Normal file
41
kf_sources/HideMut/Classes.backup/a_SpectateManager.uc
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
class a_SpectateManager extends Actor;
|
||||
|
||||
var KFPlayerController PC;
|
||||
var bool isSpectator;
|
||||
|
||||
|
||||
function friendlyShoot(KFPlayerController inPC, float timerTime)
|
||||
{
|
||||
PC = inPC;
|
||||
KFHumanPawn(PC.pawn).weapon.serverStartFire(0);
|
||||
SetTimer(timerTime, true);
|
||||
}
|
||||
|
||||
|
||||
function Timer()
|
||||
{
|
||||
if(!isSpectator)
|
||||
{
|
||||
PC.BecomeSpectator();
|
||||
isSpectator = true;
|
||||
SetTimer(0.10, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
PC.BecomeActivePlayer();
|
||||
SetTimer(0.00, false);
|
||||
Destroyed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated event Destroyed()
|
||||
{
|
||||
super.Destroyed();
|
||||
}
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bHidden=True
|
||||
}
|
||||
1673
kf_sources/HideMut/Classes.backup/a_VisibilityHandler.uc
Normal file
1673
kf_sources/HideMut/Classes.backup/a_VisibilityHandler.uc
Normal file
File diff suppressed because it is too large
Load diff
571
kf_sources/HideMut/Classes.backup/a_WeaponManager.uc
Normal file
571
kf_sources/HideMut/Classes.backup/a_WeaponManager.uc
Normal file
|
|
@ -0,0 +1,571 @@
|
|||
class a_WeaponManager extends Actor
|
||||
config(HideMutWeapons);
|
||||
|
||||
// when exit save weapon list as "CurrentWeaponList"
|
||||
|
||||
var() KFPlayerController kfpc;
|
||||
|
||||
var() HideMutInteraction interaction;
|
||||
|
||||
var() config bool bUseVanillaManagement;
|
||||
var() config bool bFastWeaponChanging;
|
||||
|
||||
var() array<String> weaponGroup1;
|
||||
var() array<String> weaponGroup2;
|
||||
var() array<String> weaponGroup3;
|
||||
var() array<String> weaponGroup4;
|
||||
var() array<String> weaponGroup5;
|
||||
var() array<String> weaponGroup6;
|
||||
var() array<String> weaponGroup7;
|
||||
var() array<String> weaponGroup8;
|
||||
var() array<String> weaponGroup9;
|
||||
var() array<String> allUsedWeapons;
|
||||
|
||||
struct serverPreset
|
||||
{
|
||||
var string gameMode;
|
||||
var string weaponPreset;
|
||||
var string serverName;
|
||||
var bool bUseVanillaManagement;
|
||||
};
|
||||
|
||||
var() config array<serverPreset> serverPresets;
|
||||
|
||||
|
||||
function postBeginPlay()
|
||||
{
|
||||
super.postBeginPlay();
|
||||
|
||||
// CrossbuzzsawBlade sound spam fix
|
||||
class'CrossbuzzsawBlade'.default.AmbientSoundRef = "";
|
||||
class'FNFALFire'.default.AmbientFireVolume = 0;
|
||||
class'CashPickup'.default.TransientSoundVolume = 0.0;
|
||||
class'CashPickup'.default.AmbientGlow = 0;
|
||||
class'machete'.default.priority = 3;
|
||||
|
||||
loadWeaponList("CurrentWeaponList");
|
||||
|
||||
if(serverPresets.length > 0)
|
||||
checkGameType();
|
||||
|
||||
forEach allObjects(class'HideMutInteraction', interaction)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
simulated function checkGameType()
|
||||
{
|
||||
local GameReplicationInfo tempGri;
|
||||
local int i;
|
||||
local bool highestPriority;
|
||||
local bool newBUseVanillaManagement;
|
||||
local bool bFoundMatchingPreset;
|
||||
local string newPreset;
|
||||
|
||||
foreach allActors(class'GameReplicationInfo', tempGri)
|
||||
{
|
||||
for(i = 0; i < serverPresets.length; i++)
|
||||
{
|
||||
if(tempGri.gameClass == serverPresets[i].gameMode)
|
||||
{
|
||||
// if server name is defined, this preset has higher priority (highestPriority = true)
|
||||
if(serverPresets[i].serverName != "")
|
||||
{
|
||||
if(inStr(caps(tempGri.serverName), caps(serverPresets[i].serverName)) != -1)
|
||||
{
|
||||
newBUseVanillaManagement = serverPresets[i].bUseVanillaManagement;
|
||||
|
||||
if(serverPresets[i].weaponPreset != "")
|
||||
newPreset = serverPresets[i].weaponPreset;
|
||||
|
||||
highestPriority = true;
|
||||
bFoundMatchingPreset = true;
|
||||
}
|
||||
}
|
||||
// if we found preset matching gameType and server name, we should skip presets without server name
|
||||
else if(!highestPriority)
|
||||
{
|
||||
newBUseVanillaManagement = serverPresets[i].bUseVanillaManagement;
|
||||
|
||||
if(serverPresets[i].weaponPreset != "")
|
||||
newPreset = serverPresets[i].weaponPreset;
|
||||
|
||||
bFoundMatchingPreset = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(bFoundMatchingPreset)
|
||||
{
|
||||
bUseVanillaManagement = newBUseVanillaManagement;
|
||||
if(newPreset != "")
|
||||
loadWeaponList(newPreset);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function saveWeaponList(string listName)
|
||||
{
|
||||
local WeaponManagerList newWeaponList;
|
||||
|
||||
newWeaponList = new(none, listName) class'WeaponManagerList';
|
||||
newWeaponList.clearConfig();
|
||||
|
||||
newWeaponList.weaponGroup1 = weaponGroup1;
|
||||
newWeaponList.weaponGroup2 = weaponGroup2;
|
||||
newWeaponList.weaponGroup3 = weaponGroup3;
|
||||
newWeaponList.weaponGroup4 = weaponGroup4;
|
||||
newWeaponList.weaponGroup5 = weaponGroup5;
|
||||
newWeaponList.weaponGroup6 = weaponGroup6;
|
||||
newWeaponList.weaponGroup7 = weaponGroup7;
|
||||
newWeaponList.weaponGroup8 = weaponGroup8;
|
||||
|
||||
newWeaponList.saveConfig();
|
||||
}
|
||||
|
||||
|
||||
simulated function loadWeaponList(string listName)
|
||||
{
|
||||
local WeaponManagerList newWeaponList;
|
||||
|
||||
clearAllGroups();
|
||||
|
||||
newWeaponList = new(none, listName) class'WeaponManagerList';
|
||||
|
||||
weaponGroup1 = newWeaponList.weaponGroup1;
|
||||
weaponGroup2 = newWeaponList.weaponGroup2;
|
||||
weaponGroup3 = newWeaponList.weaponGroup3;
|
||||
weaponGroup4 = newWeaponList.weaponGroup4;
|
||||
weaponGroup5 = newWeaponList.weaponGroup5;
|
||||
weaponGroup6 = newWeaponList.weaponGroup6;
|
||||
weaponGroup7 = newWeaponList.weaponGroup7;
|
||||
weaponGroup8 = newWeaponList.weaponGroup8;
|
||||
updateUnusedWeapons();
|
||||
}
|
||||
|
||||
|
||||
simulated function deleteWeaponList(string listName)
|
||||
{
|
||||
local WeaponManagerList newWeaponList;
|
||||
|
||||
newWeaponList = new(none, listName) class'WeaponManagerList';
|
||||
newWeaponList.clearConfig();
|
||||
}
|
||||
|
||||
|
||||
// check if we have vanilla weapon slot system on or off
|
||||
static function bool checkVanillaSys(KFPlayerController kfpc, byte F)
|
||||
{
|
||||
local int i;
|
||||
|
||||
// if its on, let the playercontroller original code do its job
|
||||
if (default.bUseVanillaManagement)
|
||||
return true;
|
||||
|
||||
// otherwise start our shady functions
|
||||
else
|
||||
{
|
||||
i = clamp(int(F), 1, 9);
|
||||
kfpc.ConsoleCommand("getWeapon" $ i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function getWeapon(int groupNumber)
|
||||
{
|
||||
local Inventory inv;
|
||||
local int i, currentWeapon;
|
||||
local array<string> weaponGroup;
|
||||
|
||||
switch (groupNumber)
|
||||
{
|
||||
case 1:
|
||||
weaponGroup = weaponGroup1;
|
||||
break;
|
||||
case 2:
|
||||
weaponGroup = weaponGroup2;
|
||||
break;
|
||||
case 3:
|
||||
weaponGroup = weaponGroup3;
|
||||
break;
|
||||
case 4:
|
||||
weaponGroup = weaponGroup4;
|
||||
break;
|
||||
case 5:
|
||||
weaponGroup = weaponGroup5;
|
||||
break;
|
||||
case 6:
|
||||
weaponGroup = weaponGroup6;
|
||||
break;
|
||||
case 7:
|
||||
weaponGroup = weaponGroup7;
|
||||
break;
|
||||
case 8:
|
||||
weaponGroup = weaponGroup8;
|
||||
break;
|
||||
case 9:
|
||||
weaponGroup = weaponGroup9;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
if (weaponGroup.length == 0)
|
||||
return;
|
||||
|
||||
if ((kfpc.pawn == none) || (kfpc.pawn.inventory == none))
|
||||
return;
|
||||
|
||||
currentWeapon = -1;
|
||||
|
||||
for (i = 0; i < weaponGroup.length; i++)
|
||||
{
|
||||
if (string(kfpc.pawn.weapon.class) ~= weaponGroup[i])
|
||||
{
|
||||
currentWeapon = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentWeapon < weaponGroup.length - 1)
|
||||
{
|
||||
for (i = currentWeapon + 1; i < weaponGroup.length; i++)
|
||||
{
|
||||
for (inv = kfpc.pawn.inventory; inv != none; inv = inv.inventory)
|
||||
{
|
||||
if (string(inv.class) ~= weaponGroup[i])
|
||||
{
|
||||
kfpc.pawn.pendingWeapon = Weapon(inv);
|
||||
if (bFastWeaponChanging)
|
||||
kfpc.pawn.changedWeapon();
|
||||
else
|
||||
kfpc.pawn.weapon.putDown();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < currentWeapon; i++)
|
||||
{
|
||||
for (inv = kfpc.pawn.inventory; inv != none; inv = inv.inventory)
|
||||
{
|
||||
if (string(inv.class) ~= weaponGroup[i])
|
||||
{
|
||||
kfpc.pawn.pendingWeapon = Weapon(inv);
|
||||
if(bFastWeaponChanging)
|
||||
kfpc.pawn.changedWeapon();
|
||||
else
|
||||
kfpc.pawn.weapon.putDown();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
simulated function reallyQuickHeal()
|
||||
{
|
||||
local Inventory inv;
|
||||
local Weapon oldWeapon;
|
||||
|
||||
if (kfpc == none || kfpc.pawn == none || kfpc.pawn.inventory == none)
|
||||
return;
|
||||
|
||||
for (inv = kfpc.pawn.inventory; inv != none; inv = inv.inventory)
|
||||
{
|
||||
if (ClassIsChildOf(inv.class, class'Syringe'))
|
||||
{
|
||||
oldWeapon = kfpc.pawn.weapon;
|
||||
kfpc.pawn.pendingWeapon = Weapon(inv);
|
||||
kfpc.pawn.changedWeapon();
|
||||
// Syringe(kfpc.pawn.weapon).HackClientStartFire();
|
||||
Syringe(kfpc.pawn.weapon).serverStartFire(1);
|
||||
kfpc.pawn.pendingWeapon = oldWeapon;
|
||||
// kfpc.pawn.changedWeapon();
|
||||
kfpc.pawn.weapon.putDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function fullReset()
|
||||
{
|
||||
local KFLevelRules kflr;
|
||||
|
||||
clearAllGroups();
|
||||
|
||||
foreach kfpc.dynamicActors(class'KFLevelRules', kflr)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(kflr == none)
|
||||
{
|
||||
kfpc.clientMessage("Can't access KFLevelRules. You are probably not in game.");
|
||||
return;
|
||||
}
|
||||
|
||||
parseItemForSale(kflr.mediItemForSale);
|
||||
parseItemForSale(kflr.suppItemForSale);
|
||||
parseItemForSale(kflr.shrpItemForSale);
|
||||
parseItemForSale(kflr.commItemForSale);
|
||||
parseItemForSale(kflr.bersItemForSale);
|
||||
parseItemForSale(kflr.fireItemForSale);
|
||||
parseItemForSale(kflr.demoItemForSale);
|
||||
parseItemForSale(kflr.neutItemForSale);
|
||||
weaponGroup5[weaponGroup5.length] = "KFmod.Syringe";
|
||||
weaponGroup5[weaponGroup5.length] = "KFmod.Welder";
|
||||
updateUnusedWeapons();
|
||||
|
||||
prioritySortGroup(weaponGroup1);
|
||||
prioritySortGroup(weaponGroup2);
|
||||
prioritySortGroup(weaponGroup3);
|
||||
prioritySortGroup(weaponGroup4);
|
||||
}
|
||||
|
||||
|
||||
simulated function basicCleaning()
|
||||
{
|
||||
local Inventory inv;
|
||||
local array<class<Pickup> > inventoryWeapons;
|
||||
|
||||
clearAllGroups();
|
||||
|
||||
if(kfpc.pawn.inventory == none)
|
||||
{
|
||||
kfpc.clientMessage("This function requires you inventory.(Needs Pawn)");
|
||||
return;
|
||||
}
|
||||
|
||||
for(inv = kfpc.pawn.inventory; inv != none; inv = inv.inventory)
|
||||
{
|
||||
if(KFWeapon(inv) != none)
|
||||
{
|
||||
inventoryWeapons[inventoryWeapons.length] = KFWeapon(inv).pickupClass;
|
||||
}
|
||||
}
|
||||
|
||||
parseItemForSale(inventoryWeapons);
|
||||
updateUnusedWeapons();
|
||||
}
|
||||
|
||||
|
||||
simulated function fullCleaning()
|
||||
{
|
||||
clearAllGroups();
|
||||
updateUnusedWeapons();
|
||||
}
|
||||
|
||||
|
||||
// part of fullReset()
|
||||
simulated function parseItemForSale(array<class<Pickup> > itemForSale)
|
||||
{
|
||||
local int i;
|
||||
local class<KFWeapon> tempKFWeapon;
|
||||
|
||||
for(i = 0; i < itemForSale.length; i++)
|
||||
{
|
||||
tempKFWeapon = class<KFWeapon>(itemForSale[i].default.inventoryType);
|
||||
if(tempKFWeapon.default.inventoryGroup == 1)
|
||||
{
|
||||
weaponGroup1[weaponGroup1.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
if(tempKFWeapon.default.inventoryGroup == 2)
|
||||
{
|
||||
weaponGroup2[weaponGroup2.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
if(tempKFWeapon.default.inventoryGroup == 3)
|
||||
{
|
||||
weaponGroup3[weaponGroup3.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
if(tempKFWeapon.default.inventoryGroup == 4)
|
||||
{
|
||||
weaponGroup4[weaponGroup4.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
if(tempKFWeapon.default.inventoryGroup == 5)
|
||||
{
|
||||
weaponGroup5[weaponGroup5.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// part of fullReset()
|
||||
simulated function prioritySortGroup(out array<string> weaponGroup)
|
||||
{
|
||||
local int i,j;
|
||||
local string tempString;
|
||||
local class<KFWeapon> tempKFWeapon1, tempKFWeapon2;
|
||||
|
||||
for(i = 0; i < weaponGroup.length; i++)
|
||||
{
|
||||
for(j = i; j < weaponGroup.length; j++)
|
||||
{
|
||||
tempKFWeapon1 = class<KFWeapon>(dynamicLoadObject(weaponGroup[i], class'Class', true));
|
||||
tempKFWeapon2 = class<KFWeapon>(dynamicLoadObject(weaponGroup[j], class'Class', true));
|
||||
if(tempKFWeapon1.default.priority < tempKFWeapon2.default.priority)
|
||||
{
|
||||
tempString = weaponGroup[i];
|
||||
weaponGroup[i] = weaponGroup[j];
|
||||
weaponGroup[j] = tempString;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function clearAllGroups()
|
||||
{
|
||||
weaponGroup1.remove(0, weaponGroup1.length);
|
||||
weaponGroup2.remove(0, weaponGroup2.length);
|
||||
weaponGroup3.remove(0, weaponGroup3.length);
|
||||
weaponGroup4.remove(0, weaponGroup4.length);
|
||||
weaponGroup5.remove(0, weaponGroup5.length);
|
||||
weaponGroup6.remove(0, weaponGroup6.length);
|
||||
weaponGroup7.remove(0, weaponGroup7.length);
|
||||
weaponGroup8.remove(0, weaponGroup8.length);
|
||||
weaponGroup9.remove(0, weaponGroup9.length);
|
||||
}
|
||||
|
||||
|
||||
simulated function updateUnusedWeapons()
|
||||
{
|
||||
local KFLevelRules kflr;
|
||||
local array<class<Pickup> > welderSyringe;
|
||||
|
||||
updateAllUsedWeapons();
|
||||
|
||||
foreach dynamicActors(class'KFLevelRules', kflr)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(kflr == none)
|
||||
{
|
||||
if(kfpc != none)
|
||||
kfpc.clientMessage("Can't access KFLevelRules. You are probably not in game.");
|
||||
return;
|
||||
}
|
||||
|
||||
weaponGroup9.remove(0, weaponGroup9.length);
|
||||
updateUnusedWeapons_Internal(kflr.mediItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.suppItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.shrpItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.commItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.bersItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.fireItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.demoItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.neutItemForSale);
|
||||
welderSyringe[welderSyringe.length] = class'SyringePickup';
|
||||
welderSyringe[welderSyringe.length] = class'WelderPickup';
|
||||
updateUnusedWeapons_Internal(welderSyringe);
|
||||
prioritySortGroup(weaponGroup9);
|
||||
}
|
||||
|
||||
|
||||
simulated function updateUnusedWeapons_Internal(array<class<Pickup> > parsedWeapons)
|
||||
{
|
||||
local int i, j;
|
||||
local class<KFWeapon> tempKFWeapon;
|
||||
|
||||
for(i = 0; i < parsedWeapons.length; i++)
|
||||
{
|
||||
tempKFWeapon = class<KFWeapon>(parsedWeapons[i].default.inventoryType);
|
||||
if(tempKFWeapon == None)
|
||||
continue;
|
||||
if(allUsedWeapons.length == 0)
|
||||
{
|
||||
weaponGroup9[weaponGroup9.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
|
||||
for(j = 0; j < allUsedWeapons.length; j++)
|
||||
{
|
||||
if(string(tempKFWeapon) == allUsedWeapons[j])
|
||||
break;
|
||||
if(j == (allUsedWeapons.length - 1))
|
||||
weaponGroup9[weaponGroup9.length] = string(tempKFWeapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function updateAllUsedWeapons()
|
||||
{
|
||||
local int i;
|
||||
|
||||
allUsedWeapons.remove(0, allUsedWeapons.length);
|
||||
|
||||
for(i = 0; i < weaponGroup1.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup1[i];
|
||||
}
|
||||
for(i = 0; i < weaponGroup2.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup2[i];
|
||||
}
|
||||
for(i = 0; i < weaponGroup3.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup3[i];
|
||||
}
|
||||
for(i = 0; i < weaponGroup4.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup4[i];
|
||||
}
|
||||
for(i = 0; i < weaponGroup5.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup5[i];
|
||||
}
|
||||
for(i = 0; i < weaponGroup6.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup6[i];
|
||||
}
|
||||
for(i = 0; i < weaponGroup7.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup7[i];
|
||||
}
|
||||
for(i = 0; i < weaponGroup8.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup8[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getAllPresetNames()
|
||||
{
|
||||
local array<string> names;
|
||||
local int i;
|
||||
|
||||
names = getPerObjectNames("HideMutWeapons", string(class'WeaponManagerList'.name));
|
||||
for(i = 0; i < names.length; i++)
|
||||
{
|
||||
if (names[i] ~= "CurrentWeaponList")
|
||||
{
|
||||
names.remove(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
|
||||
simulated event destroyed()
|
||||
{
|
||||
kfpc = none;
|
||||
interaction = none;
|
||||
super.destroyed();
|
||||
}
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bHidden=True
|
||||
}
|
||||
165
kf_sources/HideMut/Classes.backup/a_WeaponTosser.uc
Normal file
165
kf_sources/HideMut/Classes.backup/a_WeaponTosser.uc
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
class a_WeaponTosser extends Actor;
|
||||
|
||||
var KFPlayerController PC;
|
||||
var bool bPrintingMode, bSellingMode, bTossingMode;
|
||||
var int minWeight;
|
||||
|
||||
|
||||
function startTossWeapons(KFPlayerController inPC)
|
||||
{
|
||||
PC = inPC;
|
||||
bTossingMode = true;
|
||||
|
||||
SetTimer(0.01, true);
|
||||
}
|
||||
|
||||
|
||||
function startPrinting(KFPlayerController inPC)
|
||||
{
|
||||
local inventory inv;
|
||||
|
||||
PC = inPC;
|
||||
bPrintingMode = true;
|
||||
minWeight = KFHumanPawn(inPC.pawn).CurrentWeight;
|
||||
|
||||
for(Inv = inPC.Pawn.Inventory; Inv != none; Inv = Inv.Inventory)
|
||||
{
|
||||
if (KFWeapon(Inv) != none)
|
||||
{
|
||||
if(KFWeapon(Inv).class == class'KFMod.DualMK23Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Dual44Magnum' ||
|
||||
KFWeapon(Inv).class == class'KFMod.GoldenDualDeagle' ||
|
||||
KFWeapon(Inv).class == class'KFMod.DualDeagle')
|
||||
{
|
||||
minWeight = minWeight - 4;
|
||||
}
|
||||
if(KFWeapon(Inv).class == class'KFMod.MK23Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Magnum44Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.GoldenDeagle' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Deagle')
|
||||
{
|
||||
minWeight = minWeight - 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
minWeight = minWeight + 1;
|
||||
|
||||
SetTimer(0.01, true);
|
||||
}
|
||||
|
||||
|
||||
function startSellWeapons(KFPlayerController inPC)
|
||||
{
|
||||
PC = inPC;
|
||||
bSellingMode = true;
|
||||
|
||||
SetTimer(0.01, true);
|
||||
}
|
||||
|
||||
|
||||
function stopAnyActions()
|
||||
{
|
||||
SetTimer(0.00, false);
|
||||
}
|
||||
|
||||
|
||||
function Timer()
|
||||
{
|
||||
local KFPawn me;
|
||||
local Inventory inv;
|
||||
local int i;
|
||||
local array<KFWeapon> sellingWeapons;
|
||||
|
||||
me = KFPawn(PC.pawn);
|
||||
|
||||
if (me == none)
|
||||
return;
|
||||
|
||||
if (bPrintingMode)
|
||||
{
|
||||
if (KFHumanPawn(me).CurrentWeight < minWeight)
|
||||
{
|
||||
me.ServerBuyWeapon(class'DualMK23Pistol', 0);
|
||||
me.ServerBuyWeapon(class'Dual44Magnum', 0);
|
||||
me.ServerBuyWeapon(class'DualDeagle', 0);
|
||||
}
|
||||
|
||||
for (Inv = me.Inventory; Inv != none; Inv = Inv.Inventory)
|
||||
{
|
||||
if (KFWeapon(Inv) != none)
|
||||
{
|
||||
if(!KFWeapon(Inv).bKFNeverThrow)
|
||||
{
|
||||
if(KFWeapon(Inv).class == class'KFMod.DualMK23Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.MK23Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Dual44Magnum' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Magnum44Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.GoldenDualDeagle' ||
|
||||
KFWeapon(Inv).class == class'KFMod.GoldenDeagle' ||
|
||||
KFWeapon(Inv).class == class'KFMod.DualDeagle' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Deagle')
|
||||
{
|
||||
me.PendingWeapon = Weapon(Inv);
|
||||
me.ChangedWeapon();
|
||||
PC.ThrowWeapon();
|
||||
// return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bSellingMode)
|
||||
{
|
||||
//PC.ToggleDuck();
|
||||
|
||||
for (Inv = me.Inventory; Inv != none; Inv = Inv.Inventory)
|
||||
{
|
||||
if (KFWeapon(Inv) != none)
|
||||
{
|
||||
if (!KFWeapon(Inv).bKFNeverThrow)
|
||||
{
|
||||
sellingWeapons[sellingWeapons.length] = KFWeapon(Inv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = sellingWeapons.length - 1; i > -1 ; i--)
|
||||
{
|
||||
me.ServerSellWeapon(sellingWeapons[i].class);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (bTossingMode)
|
||||
{
|
||||
for (Inv = me.Inventory; Inv != none; Inv = Inv.Inventory)
|
||||
{
|
||||
if (KFWeapon(Inv) != none)
|
||||
{
|
||||
if (!KFWeapon(Inv).bKFNeverThrow && KFWeapon(Inv).bCanThrow)
|
||||
{
|
||||
Inv.Velocity = me.Velocity;
|
||||
Inv.DropFrom(me.Location + VRand() * 10);
|
||||
// me.PendingWeapon = Weapon(Inv);
|
||||
// me.ChangedWeapon();
|
||||
// PC.ThrowWeapon();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated event Destroyed()
|
||||
{
|
||||
pc = none;
|
||||
super.Destroyed();
|
||||
}
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bHidden=True
|
||||
}
|
||||
62
kf_sources/HideMut/Classes.backup/index.html
Normal file
62
kf_sources/HideMut/Classes.backup/index.html
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<html>
|
||||
<head><title>Index of /kf_sources/HideMut/Classes.backup/</title></head>
|
||||
<body>
|
||||
<h1>Index of /kf_sources/HideMut/Classes.backup/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="ActortList.uc">ActortList.uc</a> 16-Apr-2021 08:50 415
|
||||
<a href="ActortListController.uc">ActortListController.uc</a> 16-Apr-2021 08:50 1898
|
||||
<a href="BackgroundArea.uc">BackgroundArea.uc</a> 16-Apr-2021 08:50 201
|
||||
<a href="ChatAnimator.uc">ChatAnimator.uc</a> 16-Apr-2021 08:50 608
|
||||
<a href="ExportWAV.uc">ExportWAV.uc</a> 16-Apr-2021 08:50 260
|
||||
<a href="GetNameProj.uc">GetNameProj.uc</a> 16-Apr-2021 08:50 2245
|
||||
<a href="Halo.uc">Halo.uc</a> 16-Apr-2021 08:50 220
|
||||
<a href="HideMenu.uc">HideMenu.uc</a> 16-Apr-2021 08:50 40972
|
||||
<a href="HideMenuPreset.uc">HideMenuPreset.uc</a> 16-Apr-2021 08:50 187
|
||||
<a href="HideMut.uc">HideMut.uc</a> 16-Apr-2021 08:50 6772
|
||||
<a href="HideMutInteraction.uc">HideMutInteraction.uc</a> 16-Apr-2021 09:01 40386
|
||||
<a href="HideMutMenu.uc">HideMutMenu.uc</a> 16-Apr-2021 08:50 61374
|
||||
<a href="HideMutMenuOld.uc">HideMutMenuOld.uc</a> 16-Apr-2021 08:50 26773
|
||||
<a href="HideShopVolume.uc">HideShopVolume.uc</a> 16-Apr-2021 08:50 353
|
||||
<a href="HideTeleporter.uc">HideTeleporter.uc</a> 16-Apr-2021 08:50 105
|
||||
<a href="Implementation.uc">Implementation.uc</a> 16-Apr-2021 08:50 497
|
||||
<a href="KFBurnEffect_FPS.uc">KFBurnEffect_FPS.uc</a> 16-Apr-2021 08:50 2012
|
||||
<a href="LightMenu.uc">LightMenu.uc</a> 16-Apr-2021 08:50 31370
|
||||
<a href="NewMenu.uc">NewMenu.uc</a> 16-Apr-2021 08:50 1365
|
||||
<a href="OptimizerMenu.uc">OptimizerMenu.uc</a> 16-Apr-2021 08:50 73647
|
||||
<a href="PickActorProj.uc">PickActorProj.uc</a> 16-Apr-2021 08:50 728
|
||||
<a href="Settings.uc">Settings.uc</a> 16-Apr-2021 08:50 315
|
||||
<a href="WeaponManagerList.uc">WeaponManagerList.uc</a> 16-Apr-2021 08:50 489
|
||||
<a href="WeaponManagerMenu.uc">WeaponManagerMenu.uc</a> 16-Apr-2021 08:50 29339
|
||||
<a href="WhosYourDaddy.uc">WhosYourDaddy.uc</a> 16-Apr-2021 08:50 1313
|
||||
<a href="ZoneInfoMenu.uc">ZoneInfoMenu.uc</a> 16-Apr-2021 08:50 13386
|
||||
<a href="ZonerMenu.uc">ZonerMenu.uc</a> 16-Apr-2021 08:50 7594
|
||||
<a href="a_CashTosser.uc">a_CashTosser.uc</a> 16-Apr-2021 08:50 444
|
||||
<a href="a_CharFix.uc">a_CharFix.uc</a> 16-Apr-2021 08:50 2388
|
||||
<a href="a_DebugActor.uc">a_DebugActor.uc</a> 16-Apr-2021 08:50 508
|
||||
<a href="a_MapOptimizer.uc">a_MapOptimizer.uc</a> 16-Apr-2021 08:50 4790
|
||||
<a href="a_MonsterOptimizer.uc">a_MonsterOptimizer.uc</a> 16-Apr-2021 08:50 49282
|
||||
<a href="a_SpectateManager.uc">a_SpectateManager.uc</a> 16-Apr-2021 08:50 600
|
||||
<a href="a_VisibilityHandler.uc">a_VisibilityHandler.uc</a> 16-Apr-2021 08:50 40912
|
||||
<a href="a_WeaponManager.uc">a_WeaponManager.uc</a> 16-Apr-2021 08:50 14566
|
||||
<a href="a_WeaponTosser.uc">a_WeaponTosser.uc</a> 16-Apr-2021 08:50 3961
|
||||
<a href="stub_FlameTendril.uc">stub_FlameTendril.uc</a> 16-Apr-2021 08:50 1489
|
||||
<a href="stub_HUD.uc">stub_HUD.uc</a> 16-Apr-2021 08:50 3315
|
||||
<a href="stub_LobbyFooter.uc">stub_LobbyFooter.uc</a> 16-Apr-2021 08:50 4334
|
||||
<a href="stub_LobbyMenu.uc">stub_LobbyMenu.uc</a> 16-Apr-2021 08:50 4013
|
||||
<a href="stub_MainMenu.uc">stub_MainMenu.uc</a> 16-Apr-2021 08:50 930
|
||||
<a href="stub_Monster.uc">stub_Monster.uc</a> 16-Apr-2021 08:50 847
|
||||
<a href="stub_Nade.uc">stub_Nade.uc</a> 16-Apr-2021 08:50 12131
|
||||
<a href="stub_PC.uc">stub_PC.uc</a> 16-Apr-2021 08:50 2067
|
||||
<a href="stub_Pawn.uc">stub_Pawn.uc</a> 16-Apr-2021 08:50 287
|
||||
<a href="stub_ProjFlare.uc">stub_ProjFlare.uc</a> 16-Apr-2021 08:50 1291
|
||||
<a href="stub_VoicePack.uc">stub_VoicePack.uc</a> 16-Apr-2021 08:50 2445
|
||||
<a href="u_AdminInfo.uc">u_AdminInfo.uc</a> 16-Apr-2021 08:50 1009
|
||||
<a href="u_BindHelper.uc">u_BindHelper.uc</a> 16-Apr-2021 08:50 2320
|
||||
<a href="u_CharList.uc">u_CharList.uc</a> 16-Apr-2021 08:50 222
|
||||
<a href="u_CrashTool.uc">u_CrashTool.uc</a> 16-Apr-2021 08:50 1566
|
||||
<a href="u_Helper.uc">u_Helper.uc</a> 16-Apr-2021 08:50 17188
|
||||
<a href="u_MeshMod.uc">u_MeshMod.uc</a> 16-Apr-2021 08:50 159
|
||||
<a href="u_PerkList.uc">u_PerkList.uc</a> 16-Apr-2021 08:50 2342
|
||||
<a href="u_RenderHelper.uc">u_RenderHelper.uc</a> 16-Apr-2021 08:50 3581
|
||||
<a href="u_WeaponHelper.uc">u_WeaponHelper.uc</a> 16-Apr-2021 08:50 4678
|
||||
</pre><hr></body>
|
||||
</html>
|
||||
58
kf_sources/HideMut/Classes.backup/stub_FlameTendril.uc
Normal file
58
kf_sources/HideMut/Classes.backup/stub_FlameTendril.uc
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
class stub_FlameTendril extends FlameTendril;
|
||||
|
||||
|
||||
simulated function PostBeginPlay()
|
||||
{
|
||||
SetTimer(0.2, true);
|
||||
|
||||
// addition!
|
||||
// turn off pulsating lights, perf +++
|
||||
bDynamicLight = false;
|
||||
LightType = LT_None;
|
||||
|
||||
Velocity = Speed * Vector(Rotation);
|
||||
if (Level.NetMode != NM_DedicatedServer && !class'Settings'.default.bHideFlamethrowerEffects)
|
||||
{
|
||||
if (!PhysicsVolume.bWaterVolume)
|
||||
{
|
||||
FlameTrail = spawn(class'FlameThrowerFlameB', self);
|
||||
Trail = spawn(class'FlameThrowerFlame', self);
|
||||
}
|
||||
}
|
||||
Velocity.z += TossZ;
|
||||
}
|
||||
|
||||
|
||||
simulated function PostNetBeginPlay()
|
||||
{
|
||||
super(ShotgunBullet).PostNetBeginPlay();
|
||||
|
||||
if (Level.NetMode == NM_DedicatedServer)
|
||||
return;
|
||||
|
||||
// have to do this light hack since ProcessTouch() is not simulated
|
||||
// and we can't prevent spawning of zed burning flame effect
|
||||
// at least no pulsing shit with -10-50fps
|
||||
bDynamicLight = false;
|
||||
LightType = LT_None;
|
||||
}
|
||||
|
||||
|
||||
simulated function Explode(vector HitLocation,vector HitNormal)
|
||||
{
|
||||
if (Role == ROLE_Authority)
|
||||
HurtRadius(Damage, DamageRadius, MyDamageType, MomentumTransfer, HitLocation);
|
||||
|
||||
// emitter-effect toggle
|
||||
if (KFHumanPawn(Instigator) != none && !class'Settings'.default.bHideFlamethrowerEffects)
|
||||
{
|
||||
if (EffectIsRelevant(Location,false))
|
||||
{
|
||||
Spawn(ExplosionDecal,self,,Location, rotator(-HitNormal));
|
||||
Spawn(class'FuelFlame',self,,Location);
|
||||
}
|
||||
}
|
||||
|
||||
SetCollisionSize(0.0, 0.0);
|
||||
Destroy();
|
||||
}
|
||||
139
kf_sources/HideMut/Classes.backup/stub_HUD.uc
Normal file
139
kf_sources/HideMut/Classes.backup/stub_HUD.uc
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
class stub_HUD extends HUD_StoryMode;
|
||||
|
||||
|
||||
// functions to replace
|
||||
struct MsgStruct
|
||||
{
|
||||
var string Msg;
|
||||
var int count;
|
||||
var float time;
|
||||
};
|
||||
var transient array<MsgStruct> MsgArray;
|
||||
|
||||
|
||||
simulated function DrawHudPassC(Canvas C)
|
||||
{
|
||||
DrawFadeEffect(C);
|
||||
|
||||
if (bShowScoreBoard && ScoreBoard != none)
|
||||
{
|
||||
ScoreBoard.DrawScoreboard(C);
|
||||
}
|
||||
|
||||
// portrait
|
||||
if (bShowPortrait && Portrait != none)
|
||||
{
|
||||
DrawPortrait(C);
|
||||
}
|
||||
|
||||
// Comment Out for Release
|
||||
if (Level.NetMode == NM_StandAlone)
|
||||
{
|
||||
DrawCrosshair(C);
|
||||
}
|
||||
|
||||
// TEST
|
||||
DrawPointSphere();
|
||||
// Slow, for debugging only
|
||||
// if ( bDebugPlayerCollision && (class'ROEngine.ROLevelInfo'.static.RODebugMode() || Level.NetMode == NM_StandAlone) )
|
||||
// {
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
simulated function Message(PlayerReplicationInfo PRI, coerce string Msg, name MsgType)
|
||||
{
|
||||
local class<LocalMessage> LocalMessageClass;
|
||||
|
||||
// portrait switch
|
||||
if (!class'Settings'.default.bHidePortraits && PRI != none && MsgType == 'Say' || MsgType == 'TeamSay')
|
||||
DisplayPortrait(PRI);
|
||||
|
||||
if (class'Settings'.default.bHideNoPRImessages && PRI == none)
|
||||
return;
|
||||
|
||||
// do not allow spam bullshit
|
||||
// if (!class'stub_HUD'.static.AllowMessage(class'stub_HUD'.default.MsgArray, PlayerOwner.Level.TimeSeconds, PRI, Msg, MsgType))
|
||||
// return;
|
||||
|
||||
switch (MsgType)
|
||||
{
|
||||
case 'Trader':
|
||||
Msg = TraderString$":" @ Msg;
|
||||
LocalMessageClass = class'SayMessagePlus';
|
||||
break;
|
||||
case 'Voice':
|
||||
case 'Say':
|
||||
if (PRI == none)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Msg = PRI.PlayerName $ ":" @ Msg;
|
||||
LocalMessageClass = class'SayMessagePlus';
|
||||
break;
|
||||
case 'TeamSay':
|
||||
if (PRI == none)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Msg = PRI.PlayerName $ "(" $ PRI.GetLocationName() $ "):" @ Msg;
|
||||
LocalMessageClass = class'TeamSayMessagePlus';
|
||||
break;
|
||||
case 'CriticalEvent':
|
||||
LocalMessageClass = class'KFCriticalEventPlus';
|
||||
LocalizedMessage(LocalMessageClass, 0, None, None, None, Msg);
|
||||
return;
|
||||
case 'DeathMessage':
|
||||
LocalMessageClass = class'xDeathMessage';
|
||||
break;
|
||||
default:
|
||||
LocalMessageClass = class'StringMessagePlus';
|
||||
break;
|
||||
}
|
||||
AddTextMessage(Msg, LocalMessageClass, PRI);
|
||||
}
|
||||
|
||||
|
||||
// final static function bool AllowMessage(array<MsgStruct> MsgArray, float TimeSeconds, PlayerReplicationInfo PRI, coerce string Msg, name MsgType)
|
||||
// {
|
||||
// local int i, idx, len, nonPRI_limit, PRI_limit;
|
||||
// local bool bFoundEntry;
|
||||
|
||||
// len = MsgArray.length;
|
||||
|
||||
// // at first search string in DB array
|
||||
// if (len > 0)
|
||||
// {
|
||||
// for (i = 0; i < len; i++)
|
||||
// {
|
||||
// if (Msg ~= MsgArray[i].Msg)
|
||||
// {
|
||||
// idx = i;
|
||||
// bFoundEntry = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// MsgArray[0].Msg = Msg;
|
||||
// MsgArray[0].count = 0;
|
||||
// MsgArray[0].time = TimeSeconds;
|
||||
// return true;
|
||||
// }
|
||||
|
||||
|
||||
// // add to DB array if its unique string
|
||||
// if (!bFoundEntry)
|
||||
// {
|
||||
// MsgArray[len].Msg = Msg;
|
||||
// MsgArray[len].count = 0;
|
||||
// MsgArray[len].time = TimeSeconds;
|
||||
// log("Message : " $ Msg $ " added at " $ TimeSeconds);
|
||||
// // break here, this is an unique msg
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
142
kf_sources/HideMut/Classes.backup/stub_LobbyFooter.uc
Normal file
142
kf_sources/HideMut/Classes.backup/stub_LobbyFooter.uc
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
class stub_LobbyFooter extends LobbyFooter;
|
||||
|
||||
|
||||
function bool InternalOnPreDraw(Canvas C)
|
||||
{
|
||||
if ( PlayerOwner().PlayerReplicationInfo != none && PlayerOwner().PlayerReplicationInfo.bReadyToPlay )
|
||||
{
|
||||
b_Ready.Caption = UnreadyString;
|
||||
}
|
||||
else
|
||||
{
|
||||
b_Ready.Caption = ReadyString;
|
||||
}
|
||||
|
||||
b_Options.Caption = "View Map";
|
||||
|
||||
return super(ButtonFooter).InternalOnPreDraw(C);
|
||||
}
|
||||
|
||||
|
||||
function bool OnFooterClick(GUIComponent Sender)
|
||||
{
|
||||
local GUIController C;
|
||||
local PlayerController PC;
|
||||
local int i;
|
||||
|
||||
PC = PlayerOwner();
|
||||
C = Controller;
|
||||
if(Sender == b_Cancel)
|
||||
{
|
||||
//Kill Window and exit game/disconnect from server
|
||||
LobbyMenu(PageOwner).bAllowClose = true;
|
||||
C.ViewportOwner.Console.ConsoleCommand("DISCONNECT");
|
||||
KFGUIController(C).ReturnToMainMenu();
|
||||
}
|
||||
else if(Sender == b_Ready)
|
||||
{
|
||||
if ( PC.PlayerReplicationInfo.Team != none )
|
||||
{
|
||||
if ( PC.Level.NetMode == NM_Standalone || !PC.PlayerReplicationInfo.bReadyToPlay )
|
||||
{
|
||||
if ( KFPlayerController(PC) != none )
|
||||
{
|
||||
KFPlayerController(PC).SendSelectedVeterancyToServer(true);
|
||||
}
|
||||
|
||||
//Set Ready
|
||||
PC.ServerRestartPlayer();
|
||||
PC.PlayerReplicationInfo.bReadyToPlay = True;
|
||||
if ( PC.Level.GRI.bMatchHasBegun )
|
||||
PC.ClientCloseMenu(true, false);
|
||||
|
||||
b_Ready.Caption = UnreadyString;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( KFPlayerController(PC) != none )
|
||||
{
|
||||
KFPlayerController(PC).ServerUnreadyPlayer();
|
||||
PC.PlayerReplicationInfo.bReadyToPlay = False;
|
||||
b_Ready.Caption = ReadyString;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (Sender == b_Options)
|
||||
{
|
||||
// Spectate map while waiting for players to get ready
|
||||
LobbyMenu(PageOwner).bAllowClose = true;
|
||||
PC.ClientCloseMenu(true, false);
|
||||
// PC.ClientOpenMenu("KFGUI.KFSettingsPage", false);
|
||||
}
|
||||
|
||||
// else if (Sender == b_Options)
|
||||
// {
|
||||
// PC.ClientOpenMenu("KFGUI.KFSettingsPage", false);
|
||||
// }
|
||||
else if ( Sender == b_Perks )
|
||||
{
|
||||
if( !Controller.CheckSteam() )
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(class'KFMainMenu'.default.SteamMustBeRunningText, QBTN_Ok, QBTN_Ok);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( PC != none )
|
||||
{
|
||||
if ( PC.SteamStatsAndAchievements == none )
|
||||
{
|
||||
if ( PC.Level.NetMode != NM_Client )
|
||||
{
|
||||
PC.SteamStatsAndAchievements = PC.Spawn(PC.default.SteamStatsAndAchievementsClass, PC);
|
||||
if ( !PC.SteamStatsAndAchievements.Initialize(PC) )
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(class'KFMainMenu'.default.UnknownSteamErrorText, QBTN_Ok, QBTN_Ok);
|
||||
PC.SteamStatsAndAchievements.Destroy();
|
||||
PC.SteamStatsAndAchievements = none;
|
||||
}
|
||||
else
|
||||
{
|
||||
PC.SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(class'KFMainMenu'.default.UnknownSteamErrorText, QBTN_Ok, QBTN_Ok);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
else if ( !PC.SteamStatsAndAchievements.bInitialized )
|
||||
{
|
||||
PC.SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
|
||||
PC.SteamStatsAndAchievements.GetStatsAndAchievements();
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( i = 0; i < class'KFGameType'.default.LoadedSkills.Length; i++ )
|
||||
{
|
||||
if ( KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements).GetPerkProgress(i) < 0.0 )
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(class'KFMainMenu'.default.UnknownSteamErrorText, QBTN_Ok, QBTN_Ok);
|
||||
PC.SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
|
||||
PC.SteamStatsAndAchievements.GetStatsAndAchievements();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
PC.ClientOpenMenu("KFGUI.KFProfilePage", false);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
116
kf_sources/HideMut/Classes.backup/stub_LobbyMenu.uc
Normal file
116
kf_sources/HideMut/Classes.backup/stub_LobbyMenu.uc
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
class stub_LobbyMenu extends LobbyMenu;
|
||||
|
||||
|
||||
// remove video box
|
||||
function DrawPerk(Canvas Canvas)
|
||||
{
|
||||
local float X, Y, Width, Height;
|
||||
local int CurIndex, LevelIndex;
|
||||
local float TempX, TempY;
|
||||
local float TempWidth, TempHeight;
|
||||
local float IconSize, ProgressBarWidth, PerkProgress;
|
||||
local string PerkName, PerkLevelString;
|
||||
|
||||
DrawPortrait();
|
||||
|
||||
// remove video background box
|
||||
if (AdBackground != none)
|
||||
{
|
||||
AdBackground.WinWidth = 0;
|
||||
AdBackground.WinHeight = 0;
|
||||
}
|
||||
|
||||
// and remove all video ad related code
|
||||
|
||||
if ( KFPlayerController(PlayerOwner()) == none || KFPlayerController(PlayerOwner()).SelectedVeterancy == none ||
|
||||
KFSteamStatsAndAchievements(PlayerOwner().SteamStatsAndAchievements) == none )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// WTF is this else? TWI??!
|
||||
else
|
||||
|
||||
CurIndex = KFPlayerController(PlayerOwner()).SelectedVeterancy.default.PerkIndex;
|
||||
LevelIndex = KFSteamStatsAndAchievements(PlayerOwner().SteamStatsAndAchievements).PerkHighestLevelAvailable(CurIndex);
|
||||
PerkName = KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName;
|
||||
PerkLevelString = LvAbbrString @ LevelIndex;
|
||||
PerkProgress = KFSteamStatsAndAchievements(PlayerOwner().SteamStatsAndAchievements).GetPerkProgress(CurIndex);
|
||||
|
||||
// Get the position size etc in pixels
|
||||
X = i_BGPerk.ActualLeft() + 5;
|
||||
Y = i_BGPerk.ActualTop() + 30;
|
||||
|
||||
Width = i_BGPerk.ActualWidth() - 10;
|
||||
Height = i_BGPerk.ActualHeight() - 37;
|
||||
|
||||
// Offset for the Background
|
||||
TempX = X;
|
||||
TempY = Y + ItemSpacing / 2.0;
|
||||
|
||||
// Initialize the Canvas
|
||||
Canvas.Style = 1;
|
||||
Canvas.Font = class'ROHUD'.Static.GetSmallMenuFont(Canvas);
|
||||
Canvas.SetDrawColor(255, 255, 255, 255);
|
||||
|
||||
// Draw Item Background
|
||||
Canvas.SetPos(TempX, TempY);
|
||||
// Canvas.DrawTileStretched(ItemBackground, Width, Height);
|
||||
|
||||
IconSize = Height - ItemSpacing;
|
||||
|
||||
// Draw Item Background
|
||||
Canvas.DrawTileStretched(PerkBackground, IconSize, IconSize);
|
||||
Canvas.SetPos(TempX + IconSize - 1.0, Y + 7.0);
|
||||
Canvas.DrawTileStretched(InfoBackground, Width - IconSize, Height - ItemSpacing - 14);
|
||||
|
||||
IconSize -= IconBorder * 2.0 * Height;
|
||||
|
||||
// Draw Icon
|
||||
Canvas.SetPos(TempX + IconBorder * Height, TempY + IconBorder * Height);
|
||||
Canvas.DrawTile(class'KFGameType'.default.LoadedSkills[CurIndex].default.OnHUDIcon, IconSize, IconSize, 0, 0, 256, 256);
|
||||
|
||||
TempX += IconSize + (IconToInfoSpacing * Width);
|
||||
TempY += TextTopOffset * Height + ItemBorder * Height;
|
||||
|
||||
ProgressBarWidth = Width - (TempX - X) - (IconToInfoSpacing * Width);
|
||||
|
||||
// Select Text Color
|
||||
Canvas.SetDrawColor(0, 0, 0, 255);
|
||||
|
||||
// Draw the Perk's Level name
|
||||
Canvas.StrLen(PerkName, TempWidth, TempHeight);
|
||||
Canvas.SetPos(TempX, TempY);
|
||||
Canvas.DrawText(PerkName);
|
||||
|
||||
// Draw the Perk's Level
|
||||
if ( PerkLevelString != "" )
|
||||
{
|
||||
Canvas.StrLen(PerkLevelString, TempWidth, TempHeight);
|
||||
Canvas.SetPos(TempX + ProgressBarWidth - TempWidth, TempY);
|
||||
Canvas.DrawText(PerkLevelString);
|
||||
}
|
||||
|
||||
TempY += TempHeight + (0.04 * Height);
|
||||
|
||||
// Draw Progress Bar
|
||||
Canvas.SetDrawColor(255, 255, 255, 255);
|
||||
Canvas.SetPos(TempX, TempY);
|
||||
Canvas.DrawTileStretched(ProgressBarBackground, ProgressBarWidth, ProgressBarHeight * Height);
|
||||
Canvas.SetPos(TempX + 3.0, TempY + 3.0);
|
||||
Canvas.DrawTileStretched(ProgressBarForeground, (ProgressBarWidth - 6.0) * PerkProgress, (ProgressBarHeight * Height) - 6.0);
|
||||
|
||||
if ( PlayerOwner().SteamStatsAndAchievements.bUsedCheats )
|
||||
{
|
||||
if ( CurrentVeterancyLevel != 255 )
|
||||
{
|
||||
lb_PerkEffects.SetContent(PerksDisabledString);
|
||||
CurrentVeterancyLevel = 255;
|
||||
}
|
||||
}
|
||||
else if ( CurrentVeterancy != KFPlayerController(PlayerOwner()).SelectedVeterancy || CurrentVeterancyLevel != LevelIndex )
|
||||
{
|
||||
lb_PerkEffects.SetContent(KFPlayerController(PlayerOwner()).SelectedVeterancy.default.LevelEffects[LevelIndex]);
|
||||
CurrentVeterancy = KFPlayerController(PlayerOwner()).SelectedVeterancy;
|
||||
CurrentVeterancyLevel = LevelIndex;
|
||||
}
|
||||
}
|
||||
43
kf_sources/HideMut/Classes.backup/stub_MainMenu.uc
Normal file
43
kf_sources/HideMut/Classes.backup/stub_MainMenu.uc
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
// main menu hacks and co
|
||||
class stub_MainMenu extends KFMainMenu;
|
||||
|
||||
|
||||
// we set DLC boxes to none, so have to fix this function to prevent log spam
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
super(GUIMultiComponent).Opened(Sender);
|
||||
}
|
||||
|
||||
|
||||
function InternalOnOpen()
|
||||
{
|
||||
if (bNoInitDelay)
|
||||
Timer();
|
||||
else
|
||||
SetTimer(4.5, false);
|
||||
|
||||
Controller.PerformRestore();
|
||||
|
||||
// removed old and unused cinematic code
|
||||
|
||||
PlayerOwner().ClientSetInitialMusic(MenuSong,MTRAN_Segue);
|
||||
|
||||
// NO EULA!!
|
||||
|
||||
// Begin Syncing Subscribed Steam Workshop Files (if necessary)
|
||||
if (PlayerOwner() == none)
|
||||
{
|
||||
log("> KFMainMenu -> InternalOnOpen() -> PlayerOwner() WAS NONE!!! PLEASE CHECK ME!");
|
||||
return;
|
||||
}
|
||||
PlayerOwner().SyncSteamWorkshop();
|
||||
}
|
||||
|
||||
|
||||
// simulated function OpenFavServer()
|
||||
// {
|
||||
// Controller.ViewportOwner.Console.ConsoleCommand("OPEN KF-Intro?Game=unrealgame.cinematicgame");
|
||||
// }
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
29
kf_sources/HideMut/Classes.backup/stub_Monster.uc
Normal file
29
kf_sources/HideMut/Classes.backup/stub_Monster.uc
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
class stub_Monster extends KFMonster;
|
||||
|
||||
|
||||
// block the whole code, becuase i dont give a fuck about flame effects
|
||||
simulated function StartBurnFX()
|
||||
{
|
||||
local class<emitter> Effect;
|
||||
|
||||
if (bDeleteMe || class'Settings'.default.bHideZedFlames)
|
||||
return;
|
||||
|
||||
// No real flames when low gore, make them smoke, smoking kills
|
||||
if (class'GameInfo'.static.UseLowGore())
|
||||
Effect = AltBurnEffect;
|
||||
else
|
||||
Effect = BurnEffect;
|
||||
|
||||
if (FlamingFXs == none)
|
||||
FlamingFXs = spawn(Effect);
|
||||
|
||||
FlamingFXs.SetBase(self);
|
||||
FlamingFXs.Emitters[0].SkeletalMeshActor = self;
|
||||
FlamingFXs.Emitters[0].UseSkeletalLocationAs = PTSU_SpawnOffset;
|
||||
AttachEmitterEffect(Effect, HeadBone, Location, Rotation);
|
||||
bBurnApplied = true;
|
||||
}
|
||||
|
||||
|
||||
// N.B. look into SetBurningBehavior() maybe we can set normal animations for us and get normal headshots
|
||||
402
kf_sources/HideMut/Classes.backup/stub_Nade.uc
Normal file
402
kf_sources/HideMut/Classes.backup/stub_Nade.uc
Normal file
|
|
@ -0,0 +1,402 @@
|
|||
class stub_Nade extends Nade;
|
||||
|
||||
|
||||
function PostNetBeginPlay()
|
||||
{
|
||||
SetTimer(ExplodeTimer, false);
|
||||
}
|
||||
|
||||
|
||||
simulated function PostNetReceive()
|
||||
{
|
||||
if (bHidden && !bDisintegrated)
|
||||
{
|
||||
Disintegrate(Location, vect(0,0,1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Timer()
|
||||
{
|
||||
if (!bHidden)
|
||||
{
|
||||
Explode(Location, vect(0,0,1));
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Shoot nades in mid-air
|
||||
// Alex
|
||||
function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex)
|
||||
{
|
||||
if (Monster(instigatedBy) != none || instigatedBy == Instigator)
|
||||
{
|
||||
if (damageType == class'SirenScreamDamage')
|
||||
{
|
||||
Disintegrate(HitLocation, vect(0,0,1));
|
||||
}
|
||||
else
|
||||
{
|
||||
Explode(HitLocation, vect(0,0,1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// cut-n-paste to remove grenade smoke trail
|
||||
simulated function PostBeginPlay()
|
||||
{
|
||||
if (Role == ROLE_Authority)
|
||||
{
|
||||
Velocity = Speed * Vector(Rotation);
|
||||
RandSpin(25000);
|
||||
bCanHitOwner = false;
|
||||
if (Instigator.HeadVolume.bWaterVolume)
|
||||
{
|
||||
bHitWater = true;
|
||||
Velocity = 0.6*Velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function Explode(vector HitLocation, vector HitNormal)
|
||||
{
|
||||
local PlayerController LocalPlayer;
|
||||
local Projectile P;
|
||||
local byte i;
|
||||
|
||||
bHasExploded = True;
|
||||
BlowUp(HitLocation);
|
||||
PlaySound(ExplodeSounds[rand(ExplodeSounds.length)],,2.0);
|
||||
|
||||
// Shrapnel
|
||||
for (i=Rand(6); i<10; i++)
|
||||
{
|
||||
P = Spawn(ShrapnelClass,,,,RotRand(True));
|
||||
if (P != none)
|
||||
P.RemoteRole = ROLE_None;
|
||||
}
|
||||
if (EffectIsRelevant(Location,false))
|
||||
{
|
||||
Spawn(Class'KFmod.KFNadeExplosion',,, HitLocation, rotator(vect(0,0,1)));
|
||||
Spawn(ExplosionDecal,self,,HitLocation, rotator(-HitNormal));
|
||||
}
|
||||
|
||||
// Shake nearby players screens
|
||||
LocalPlayer = Level.GetLocalPlayerController();
|
||||
if ( (LocalPlayer != None) && (VSize(Location - LocalPlayer.ViewTarget.Location) < (DamageRadius * 1.5)) )
|
||||
LocalPlayer.ShakeView(RotMag, RotRate, RotTime, OffsetMag, OffsetRate, OffsetTime);
|
||||
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
// Make the projectile distintegrate, instead of explode
|
||||
simulated function Disintegrate(vector HitLocation, vector HitNormal)
|
||||
{
|
||||
bDisintegrated = true;
|
||||
bHidden = true;
|
||||
|
||||
if( Role == ROLE_Authority )
|
||||
{
|
||||
SetTimer(0.1, false);
|
||||
NetUpdateTime = Level.TimeSeconds - 1;
|
||||
}
|
||||
|
||||
PlaySound(DisintegrateSound,,2.0);
|
||||
|
||||
if ( EffectIsRelevant(Location,false) )
|
||||
{
|
||||
Spawn(Class'KFMod.SirenNadeDeflect',,, HitLocation, rotator(vect(0,0,1)));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function Destroyed()
|
||||
{
|
||||
if ( Trail != None )
|
||||
Trail.mRegen = false; // stop the emitter from regenerating
|
||||
if( !bHasExploded && !bHidden )
|
||||
Explode(Location,vect(0,0,1));
|
||||
if( bHidden && !bDisintegrated )
|
||||
Disintegrate(Location,vect(0,0,1));
|
||||
if ( Fear != None )
|
||||
Fear.Destroy();
|
||||
Super.Destroyed();
|
||||
}
|
||||
|
||||
simulated function ProcessTouch( actor Other, vector HitLocation )
|
||||
{
|
||||
// local vector Other2dLocation, TwoDLocation;
|
||||
// local float DistToOtherCenter;
|
||||
// local bool bHitIsCloseToCenter;
|
||||
|
||||
if( KFBulletWhipAttachment(Other) != none )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't allow hits on poeple on the same team
|
||||
if( KFHumanPawn(Other) != none && Instigator != none
|
||||
&& KFHumanPawn(Other).PlayerReplicationInfo.Team.TeamIndex == Instigator.PlayerReplicationInfo.Team.TeamIndex )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// more realistic interactions with karma objects.
|
||||
if (Other.IsA('NetKActor'))
|
||||
KAddImpulse(Velocity,HitLocation,);
|
||||
|
||||
// Failed attempt at making nades only stop if they are close to the center of the
|
||||
// collision. When I have more time, try and do a closest point along the ray test - Ramm
|
||||
// if ( !Other.bWorldGeometry && Other != Instigator )
|
||||
// {
|
||||
// Other2dLocation = Other.Location;
|
||||
// Other2dLocation.Z = 0;
|
||||
// TwoDLocation = Location;
|
||||
// TwoDLocation.Z = 0;
|
||||
// DistToOtherCenter = VSize(Other2dLocation - TwoDLocation);
|
||||
// bHitIsCloseToCenter = DistToOtherCenter < Other.CollisionRadius/2.0;
|
||||
// log("DistToOtherCenter = "$DistToOtherCenter$" Other.CollisionRadius/2.0 "$Other.CollisionRadius/2.0 );
|
||||
// }
|
||||
|
||||
// Stop the grenade in its tracks if it hits an enemy.
|
||||
if ( !Other.bWorldGeometry && ((Other != Instigator && Other.Base != Instigator /*&& bHitIsCloseToCenter*/ )|| bCanHitOwner) )
|
||||
Velocity = Vect(0,0,0);
|
||||
}
|
||||
|
||||
/* HurtRadius()
|
||||
Hurt locally authoritative actors within the radius.
|
||||
*/
|
||||
simulated function HurtRadius( float DamageAmount, float DamageRadius, class<DamageType> DamageType, float Momentum, vector HitLocation )
|
||||
{
|
||||
local actor Victims;
|
||||
local float damageScale, dist;
|
||||
local vector dir;
|
||||
local int NumKilled;
|
||||
local KFMonster KFMonsterVictim;
|
||||
local Pawn P;
|
||||
local KFPawn KFP;
|
||||
local array<Pawn> CheckedPawns;
|
||||
local int i;
|
||||
local bool bAlreadyChecked;
|
||||
|
||||
|
||||
if ( bHurtEntry )
|
||||
return;
|
||||
|
||||
bHurtEntry = true;
|
||||
|
||||
foreach CollidingActors (class 'Actor', Victims, DamageRadius, HitLocation)
|
||||
{
|
||||
// don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag
|
||||
if( (Victims != self) && (Hurtwall != Victims) && (Victims.Role == ROLE_Authority) && !Victims.IsA('FluidSurfaceInfo')
|
||||
&& ExtendedZCollision(Victims)==None )
|
||||
{
|
||||
if( (Instigator==None || Instigator.Health<=0) && KFPawn(Victims)!=None )
|
||||
Continue;
|
||||
dir = Victims.Location - HitLocation;
|
||||
dist = FMax(1,VSize(dir));
|
||||
dir = dir/dist;
|
||||
damageScale = 1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius);
|
||||
|
||||
if ( Instigator == None || Instigator.Controller == None )
|
||||
{
|
||||
Victims.SetDelayedDamageInstigatorController( InstigatorController );
|
||||
}
|
||||
|
||||
P = Pawn(Victims);
|
||||
|
||||
if( P != none )
|
||||
{
|
||||
for (i = 0; i < CheckedPawns.Length; i++)
|
||||
{
|
||||
if (CheckedPawns[i] == P)
|
||||
{
|
||||
bAlreadyChecked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( bAlreadyChecked )
|
||||
{
|
||||
bAlreadyChecked = false;
|
||||
P = none;
|
||||
continue;
|
||||
}
|
||||
|
||||
KFMonsterVictim = KFMonster(Victims);
|
||||
|
||||
if( KFMonsterVictim != none && KFMonsterVictim.Health <= 0 )
|
||||
{
|
||||
KFMonsterVictim = none;
|
||||
}
|
||||
|
||||
KFP = KFPawn(Victims);
|
||||
|
||||
if( KFMonsterVictim != none )
|
||||
{
|
||||
damageScale *= KFMonsterVictim.GetExposureTo(Location + 15 * -Normal(PhysicsVolume.Gravity));
|
||||
}
|
||||
else if( KFP != none )
|
||||
{
|
||||
damageScale *= KFP.GetExposureTo(Location + 15 * -Normal(PhysicsVolume.Gravity));
|
||||
}
|
||||
|
||||
CheckedPawns[CheckedPawns.Length] = P;
|
||||
|
||||
if ( damageScale <= 0)
|
||||
{
|
||||
P = none;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Victims = P;
|
||||
P = none;
|
||||
}
|
||||
}
|
||||
|
||||
Victims.TakeDamage(damageScale * DamageAmount,Instigator,Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius)
|
||||
* dir,(damageScale * Momentum * dir),DamageType);
|
||||
|
||||
if( Role == ROLE_Authority && KFMonsterVictim != none && KFMonsterVictim.Health <= 0 )
|
||||
{
|
||||
NumKilled++;
|
||||
}
|
||||
|
||||
if (Vehicle(Victims) != None && Vehicle(Victims).Health > 0)
|
||||
{
|
||||
Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( Role == ROLE_Authority )
|
||||
{
|
||||
if ( NumKilled >= 8 && Instigator != none && Instigator.PlayerReplicationInfo != none &&
|
||||
KFSteamStatsAndAchievements(Instigator.PlayerReplicationInfo.SteamStatsAndAchievements) != none )
|
||||
{
|
||||
KFSteamStatsAndAchievements(Instigator.PlayerReplicationInfo.SteamStatsAndAchievements).Killed8ZedsWithGrenade();
|
||||
}
|
||||
|
||||
if ( NumKilled >= 4 )
|
||||
{
|
||||
KFGameType(Level.Game).DramaticEvent(0.05);
|
||||
}
|
||||
else if ( NumKilled >= 2 )
|
||||
{
|
||||
KFGameType(Level.Game).DramaticEvent(0.03);
|
||||
}
|
||||
}
|
||||
|
||||
bHurtEntry = false;
|
||||
}
|
||||
|
||||
// Overridden to tweak the handling of the impact sound
|
||||
simulated function HitWall( vector HitNormal, actor Wall )
|
||||
{
|
||||
local Vector VNorm;
|
||||
local PlayerController PC;
|
||||
|
||||
if ( (Pawn(Wall) != None) || (GameObjective(Wall) != None) )
|
||||
{
|
||||
Explode(Location, HitNormal);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bTimerSet)
|
||||
{
|
||||
SetTimer(ExplodeTimer, false);
|
||||
bTimerSet = true;
|
||||
}
|
||||
|
||||
// Reflect off Wall w/damping
|
||||
VNorm = (Velocity dot HitNormal) * HitNormal;
|
||||
Velocity = -VNorm * DampenFactor + (Velocity - VNorm) * DampenFactorParallel;
|
||||
|
||||
RandSpin(100000);
|
||||
DesiredRotation.Roll = 0;
|
||||
RotationRate.Roll = 0;
|
||||
Speed = VSize(Velocity);
|
||||
|
||||
if ( Speed < 20 )
|
||||
{
|
||||
bBounce = False;
|
||||
PrePivot.Z = -1.5;
|
||||
SetPhysics(PHYS_None);
|
||||
DesiredRotation = Rotation;
|
||||
DesiredRotation.Roll = 0;
|
||||
DesiredRotation.Pitch = 0;
|
||||
SetRotation(DesiredRotation);
|
||||
|
||||
if( Fear == none )
|
||||
{
|
||||
Fear = Spawn(class'AvoidMarker');
|
||||
Fear.SetCollisionSize(DamageRadius,DamageRadius);
|
||||
Fear.StartleBots();
|
||||
}
|
||||
|
||||
if ( Trail != None )
|
||||
Trail.mRegen = false; // stop the emitter from regenerating
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (Level.NetMode != NM_DedicatedServer) && (Speed > 50) )
|
||||
PlaySound(ImpactSound, SLOT_Misc );
|
||||
else
|
||||
{
|
||||
bFixedRotationDir = false;
|
||||
bRotateToDesired = true;
|
||||
DesiredRotation.Pitch = 0;
|
||||
RotationRate.Pitch = 50000;
|
||||
}
|
||||
if ( !Level.bDropDetail && (Level.DetailMode != DM_Low) && (Level.TimeSeconds - LastSparkTime > 0.5) && EffectIsRelevant(Location,false) )
|
||||
{
|
||||
PC = Level.GetLocalPlayerController();
|
||||
if ( (PC.ViewTarget != None) && VSize(PC.ViewTarget.Location - Location) < 6000 )
|
||||
Spawn(HitEffectClass,,, Location, Rotator(HitNormal));
|
||||
LastSparkTime = Level.TimeSeconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
RotMag=(X=600.000000,Y=600.000000,Z=600.000000)
|
||||
RotRate=(X=12500.000000,Y=12500.000000,Z=12500.000000)
|
||||
RotTime=6.000000
|
||||
OffsetMag=(X=5.000000,Y=10.000000,Z=5.000000)
|
||||
OffsetRate=(X=300.000000,Y=300.000000,Z=300.000000)
|
||||
OffsetTime=3.500000
|
||||
|
||||
ShrapnelClass=Class'KFShrapnel'
|
||||
DampenFactor=0.250000
|
||||
DampenFactorParallel=0.400000
|
||||
HitEffectClass=None
|
||||
Speed=160.000000
|
||||
MaxSpeed=850//350.000000
|
||||
Damage=300.000000 // Increased in Balance Round 2
|
||||
DamageRadius=420.000000 // Increased in Balance Round 2
|
||||
MomentumTransfer=100000.000000
|
||||
MyDamageType=Class'KFMod.DamTypeFrag'
|
||||
ExplosionDecal=Class'KFMod.KFScorchMark'
|
||||
StaticMesh=StaticMesh'KillingFloorStatics.FragProjectile'
|
||||
DrawScale=0.400000
|
||||
AmbientGlow=0
|
||||
bUnlit=False
|
||||
TransientSoundVolume=200.000000
|
||||
bNetTemporary=False
|
||||
bNetNotify=true
|
||||
|
||||
ImpactSound=sound'KF_GrenadeSnd.Nade_HitSurf'
|
||||
ExplodeSounds(0)=sound'KF_GrenadeSnd.Nade_Explode_1'
|
||||
ExplodeSounds(1)=sound'KF_GrenadeSnd.Nade_Explode_2'
|
||||
ExplodeSounds(2)=sound'KF_GrenadeSnd.Nade_Explode_3'
|
||||
DisintegrateSound=Sound'Inf_Weapons.faust_explode_distant02'
|
||||
bBlockHitPointTraces=false
|
||||
}
|
||||
81
kf_sources/HideMut/Classes.backup/stub_PC.uc
Normal file
81
kf_sources/HideMut/Classes.backup/stub_PC.uc
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
// stub KFPlayerController for hooks
|
||||
class stub_PC extends KFPlayerController_Story;
|
||||
|
||||
|
||||
// empty function stub
|
||||
simulated function noop(){}
|
||||
|
||||
|
||||
// always true bool
|
||||
simulated function bool bTrue()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// =========================================================
|
||||
// zed time sound effect switch
|
||||
simulated function CheckZEDMessage()
|
||||
{
|
||||
if (!bHadZED && !class'Settings'.default.bHideZedTimeSounds)
|
||||
{
|
||||
ReceiveLocalizedMessage(class'KFMod.WaitingMessage', 5);
|
||||
bHadZED = true;
|
||||
SaveConfig();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function ClientEnterZedTime()
|
||||
{
|
||||
if (class'Settings'.default.bHideZedTimeSounds)
|
||||
return;
|
||||
|
||||
CheckZEDMessage();
|
||||
|
||||
if ( Pawn != none && Pawn.Weapon != none )
|
||||
Pawn.Weapon.PlaySound(Sound'KF_PlayerGlobalSnd.Zedtime_Enter', SLOT_Talk, 2.0,false,500.0,1.1/Level.TimeDilation,false);
|
||||
else
|
||||
PlaySound(Sound'KF_PlayerGlobalSnd.Zedtime_Enter', SLOT_Talk, 2.0,false,500.0,1.1/Level.TimeDilation,false);
|
||||
}
|
||||
|
||||
|
||||
simulated function ClientExitZedTime()
|
||||
{
|
||||
if (class'Settings'.default.bHideZedTimeSounds)
|
||||
return;
|
||||
|
||||
if ( Pawn != none && Pawn.Weapon != none )
|
||||
Pawn.Weapon.PlaySound(Sound'KF_PlayerGlobalSnd.Zedtime_Exit', SLOT_Talk, 2.0,false,500.0,1.1/Level.TimeDilation,false);
|
||||
else
|
||||
PlaySound(Sound'KF_PlayerGlobalSnd.Zedtime_Exit', SLOT_Talk, 2.0,false,500.0,1.1/Level.TimeDilation,false);
|
||||
}
|
||||
|
||||
|
||||
// =========================================================
|
||||
// show lobby menu if we press Esc during pending game state
|
||||
exec function ShowMenu()
|
||||
{
|
||||
if (Level.GRI.bMatchHasBegun || PlayerReplicationInfo.bOnlySpectator)
|
||||
super.ShowMenu();
|
||||
else
|
||||
ShowLobbyMenu();
|
||||
}
|
||||
|
||||
|
||||
// Steam Workshop
|
||||
simulated function SyncSteamWorkshop()
|
||||
{
|
||||
log("> IM TRYING TO GET STEAM WORKSHOP FILES!!!!!");
|
||||
EnumerateSubscribedSteamWorkshopFiles();
|
||||
}
|
||||
|
||||
|
||||
// The player wants to switch to weapon group number F.
|
||||
exec function SwitchWeapon(byte F)
|
||||
{
|
||||
if (!class'a_WeaponManager'.static.checkVanillaSys(self, F))
|
||||
return;
|
||||
if (Pawn != none)
|
||||
Pawn.SwitchWeapon(F);
|
||||
}
|
||||
9
kf_sources/HideMut/Classes.backup/stub_Pawn.uc
Normal file
9
kf_sources/HideMut/Classes.backup/stub_Pawn.uc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// stub KFHumanPawn for hooks
|
||||
class stub_Pawn extends KFHumanPawn_Story;
|
||||
|
||||
|
||||
// remove bile effects
|
||||
simulated function DoHitCamEffects(vector HitDirection, float JarrScale, float BlurDuration, float JarDurationScale ){}
|
||||
|
||||
// remove burning effects
|
||||
simulated function StartBurnFX(){}
|
||||
58
kf_sources/HideMut/Classes.backup/stub_ProjFlare.uc
Normal file
58
kf_sources/HideMut/Classes.backup/stub_ProjFlare.uc
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
class stub_ProjFlare extends FlareRevolverProjectile;
|
||||
|
||||
|
||||
simulated function PostBeginPlay()
|
||||
{
|
||||
// if (Level.NetMode != NM_DedicatedServer && !PhysicsVolume.bWaterVolume)
|
||||
// FlameTrail = Spawn(FlameTrailEmitterClass,self);
|
||||
|
||||
// turn off pulsating lights, perf +++
|
||||
bDynamicLight = false;
|
||||
LightType = LT_None;
|
||||
|
||||
OrigLoc = Location;
|
||||
|
||||
if (!bDud)
|
||||
{
|
||||
Dir = vector(Rotation);
|
||||
Velocity = speed * Dir;
|
||||
}
|
||||
|
||||
super(ROBallisticProjectile).PostBeginPlay();
|
||||
}
|
||||
|
||||
|
||||
simulated function Explode(vector HitLocation, vector HitNormal)
|
||||
{
|
||||
bHasExploded = true;
|
||||
|
||||
// Don't explode if this is a dud
|
||||
if (bDud)
|
||||
{
|
||||
Velocity = vect(0,0,0);
|
||||
LifeSpan = 1.0;
|
||||
SetPhysics(PHYS_Falling);
|
||||
}
|
||||
|
||||
PlaySound(ExplosionSound,,ExplosionSoundVolume);
|
||||
// if (EffectIsRelevant(Location,false))
|
||||
// {
|
||||
// Spawn(ExplosionEmitter,,,HitLocation + HitNormal*20,rotator(HitNormal));
|
||||
// Spawn(ExplosionDecal,self,,HitLocation, rotator(-HitNormal));
|
||||
// }
|
||||
|
||||
BlowUp(HitLocation);
|
||||
Destroy();
|
||||
|
||||
// let's remove our client code, server will try to do shaking anyways
|
||||
}
|
||||
|
||||
|
||||
// so we prevent shaking from this function
|
||||
simulated function float GetShakeScale(vector ViewLocation, vector EventLocation)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
83
kf_sources/HideMut/Classes.backup/stub_VoicePack.uc
Normal file
83
kf_sources/HideMut/Classes.backup/stub_VoicePack.uc
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
class stub_Voicepack extends KFVoicePack;
|
||||
|
||||
|
||||
function Timer()
|
||||
{
|
||||
local PlayerController PlayerOwner;
|
||||
local Actor soundPlayer;
|
||||
|
||||
PlayerOwner = PlayerController(Owner);
|
||||
// ADDITION, portrait switch
|
||||
if (!class'Settings'.default.bHidePortraits && bDisplayPortrait && PhraseNum == 0)
|
||||
{
|
||||
if (bTraderMessage)
|
||||
HUDKillingFloor(PlayerController(Owner).myHUD).DisplayTraderPortrait();
|
||||
else
|
||||
PlayerController(Owner).myHUD.DisplayPortrait(PortraitPRI);
|
||||
}
|
||||
|
||||
if (bTraderMessage)
|
||||
{
|
||||
if (bUseLocationalVoice)
|
||||
{
|
||||
if (PawnSender != none)
|
||||
PawnSender.DemoPlaySound(Phrase[PhraseNum], SLOT_None, ShoutVolume, true, , 1.1 / Level.TimeDilation, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PlayerOwner.ViewTarget != none)
|
||||
PlayerOwner.ViewTarget.DemoPlaySound(Phrase[PhraseNum], SLOT_Interface,ShoutVolume, true, , 1.1 / Level.TimeDilation, false);
|
||||
else
|
||||
PlayerOwner.DemoPlaySound(Phrase[PhraseNum], SLOT_Interface,ShoutVolume, true, , 1.1 / Level.TimeDilation, false);
|
||||
}
|
||||
}
|
||||
|
||||
else if (Phrase[PhraseNum] != none && (Level.TimeSeconds - PlayerOwner.LastPlaySpeech > 2 || PhraseNum > 0))
|
||||
{
|
||||
PlayerOwner.LastPlaySpeech = Level.TimeSeconds;
|
||||
|
||||
if (bUseLocationalVoice)
|
||||
{
|
||||
if (PawnSender != none)
|
||||
PawnSender.DemoPlaySound(Phrase[PhraseNum], SLOT_None,ShoutVolume,,,1.0,false);
|
||||
else
|
||||
{
|
||||
soundPlayer = Spawn(Class'ROVoiceMessageEffect',,, SenderLoc);
|
||||
|
||||
if (soundPlayer != none)
|
||||
soundPlayer.DemoPlaySound(Phrase[PhraseNum], SLOT_None,ShoutVolume,,,1.0,false);
|
||||
else
|
||||
warn("Unable to spawn ROVoiceMessageEffect at " $ SenderLoc $ "!");
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (PlayerOwner.ViewTarget != none)
|
||||
PlayerOwner.ViewTarget.DemoPlaySound(Phrase[PhraseNum], SLOT_Interface,ShoutVolume,,,1.0,false);
|
||||
else
|
||||
PlayerOwner.DemoPlaySound(Phrase[PhraseNum], SLOT_Interface,ShoutVolume,,,1.0,false);
|
||||
}
|
||||
|
||||
if (MessageAnim != '')
|
||||
{
|
||||
UnrealPlayer(PlayerOwner).Taunt(MessageAnim);
|
||||
}
|
||||
|
||||
if (Phrase[PhraseNum+1] == none)
|
||||
Destroy();
|
||||
else
|
||||
{
|
||||
if (GetSoundDuration(Phrase[PhraseNum]) == 0)
|
||||
log("ROVoicePack Setting the timer for a sound to zero");
|
||||
|
||||
SetTimer(FMax(0.1,GetSoundDuration(Phrase[PhraseNum])), false);
|
||||
PhraseNum++;
|
||||
}
|
||||
}
|
||||
else
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
defaultproperties{}
|
||||
45
kf_sources/HideMut/Classes.backup/u_AdminInfo.uc
Normal file
45
kf_sources/HideMut/Classes.backup/u_AdminInfo.uc
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
class u_AdminInfo extends Object
|
||||
config(HideMut);
|
||||
|
||||
struct adminAccount
|
||||
{
|
||||
var string Name;
|
||||
var string ip;
|
||||
var string login;
|
||||
var string pass;
|
||||
};
|
||||
var config array<adminAccount> adminAccounts;
|
||||
|
||||
var config string AdminUserName;
|
||||
var config string AdminPassword;
|
||||
|
||||
// admin login-logout
|
||||
final static function login(KFPlayerController pc)
|
||||
{
|
||||
local int i;
|
||||
local string serverIp;
|
||||
|
||||
if (pc == none || pc.playerReplicationInfo == none)
|
||||
return;
|
||||
|
||||
if (pc.playerReplicationInfo.bAdmin == true)
|
||||
{
|
||||
pc.adminLogout();
|
||||
return;
|
||||
}
|
||||
|
||||
serverIp = pc.getServerNetworkAddress();
|
||||
|
||||
for(i = 0; i < default.adminAccounts.length; i++)
|
||||
{
|
||||
if(serverIp == default.adminAccounts[i].ip)
|
||||
{
|
||||
if(default.adminAccounts[i].login != "")
|
||||
pc.adminLogin(default.adminAccounts[i].login@default.adminAccounts[i].pass);
|
||||
else
|
||||
pc.adminLogin(default.adminAccounts[i].pass);
|
||||
}
|
||||
}
|
||||
|
||||
pc.adminLogin(default.AdminUserName@default.AdminPassword);
|
||||
}
|
||||
BIN
kf_sources/HideMut/Classes.backup/u_BindHelper.uc
Normal file
BIN
kf_sources/HideMut/Classes.backup/u_BindHelper.uc
Normal file
Binary file not shown.
12
kf_sources/HideMut/Classes.backup/u_CharList.uc
Normal file
12
kf_sources/HideMut/Classes.backup/u_CharList.uc
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
class u_CharList extends Object;
|
||||
|
||||
|
||||
final static function string GetChar(string s)
|
||||
{
|
||||
local int i;
|
||||
|
||||
// default skins are 56!
|
||||
i = clamp(int(s), 0, 55);
|
||||
|
||||
return class'KFGameType'.default.AvailableChars[i];
|
||||
}
|
||||
85
kf_sources/HideMut/Classes.backup/u_CrashTool.uc
Normal file
85
kf_sources/HideMut/Classes.backup/u_CrashTool.uc
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
class u_CrashTool extends Object;
|
||||
|
||||
|
||||
// dosh spam for CrashServer()
|
||||
final static function doshspam(KFHumanPawn p)
|
||||
{
|
||||
local int i;
|
||||
|
||||
while (p != none && i < 10000)
|
||||
{
|
||||
p.tossCash(1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// spec-join spam for CrashServer2()
|
||||
final static function nadespam(KFHumanPawn p, int i)
|
||||
{
|
||||
local int n;
|
||||
|
||||
// StopWatch(false);
|
||||
while (p != none && n < i)
|
||||
{
|
||||
ThrowNade(p);
|
||||
n++;
|
||||
}
|
||||
// StopWatch(true);
|
||||
}
|
||||
|
||||
|
||||
// spec-join spam for CrashServer3()
|
||||
final static function specspam(KFPlayerController pc)
|
||||
{
|
||||
local int i;
|
||||
|
||||
while (pc != none && i < 10000)
|
||||
{
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final static function Frag FindNade(KFHumanPawn p)
|
||||
{
|
||||
local inventory inv;
|
||||
|
||||
if (p == none)
|
||||
return none;
|
||||
|
||||
for(inv = p.Inventory; inv != None; inv = inv.Inventory)
|
||||
{
|
||||
if(ClassIsChildOf(inv.class, class'Frag'))
|
||||
{
|
||||
return Frag(inv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final static function ThrowNade(KFHumanPawn p)
|
||||
{
|
||||
if (p == none || FindNade(p) == none)
|
||||
return;
|
||||
|
||||
FindNade(p).ServerThrow();
|
||||
}
|
||||
BIN
kf_sources/HideMut/Classes.backup/u_Helper.uc
Normal file
BIN
kf_sources/HideMut/Classes.backup/u_Helper.uc
Normal file
Binary file not shown.
8
kf_sources/HideMut/Classes.backup/u_MeshMod.uc
Normal file
8
kf_sources/HideMut/Classes.backup/u_MeshMod.uc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// MeshMod - Written by Marco
|
||||
class u_MeshMod extends Object;
|
||||
|
||||
|
||||
final static function SetMeshDefault(class<Actor> AC, Mesh M)
|
||||
{
|
||||
AC.Default.Mesh = M;
|
||||
}
|
||||
59
kf_sources/HideMut/Classes.backup/u_PerkList.uc
Normal file
59
kf_sources/HideMut/Classes.backup/u_PerkList.uc
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
class u_PerkList extends Object;
|
||||
|
||||
// perk level related
|
||||
struct PerkInfoStruct
|
||||
{
|
||||
var class <KFVeterancyTypes> Perk;
|
||||
var array<byte> Index;
|
||||
var array<int> Value;
|
||||
var bool bSingleIndex;
|
||||
};
|
||||
var array<PerkInfoStruct> PerkInfo;
|
||||
|
||||
|
||||
final static function PerkSwitch(KFPlayerController kfpc, int i, optional string level)
|
||||
{
|
||||
local int j;
|
||||
|
||||
// failsafe
|
||||
if (kfpc == none)
|
||||
return;
|
||||
|
||||
// failsafe for perk index
|
||||
// tho we make sure we pass right values to here
|
||||
i = clamp(i,0,7);
|
||||
|
||||
// what level we want
|
||||
// if we don't specify it force to 6
|
||||
if(level ~= "")
|
||||
j = 6;
|
||||
else
|
||||
j = clamp(int(level),0,6);
|
||||
|
||||
// fix log spam in console
|
||||
// "you will become bla bla" x100
|
||||
kfpc.SelectedVeterancy = default.PerkInfo[i].Perk;
|
||||
kfpc.SaveConfig();
|
||||
// finally set the veterancy
|
||||
kfpc.selectVeterancy(default.PerkInfo[i].Perk, true);
|
||||
kfpc.SetSelectedVeterancy(default.PerkInfo[i].Perk);
|
||||
// set levels
|
||||
kfpc.serverInitializeSteamStatInt(default.PerkInfo[i].Index[0],default.PerkInfo[i].Value[j]);
|
||||
// if we have 2'nd index - use it!
|
||||
if(!default.PerkInfo[i].bSingleIndex)
|
||||
kfpc.serverInitializeSteamStatInt(default.PerkInfo[i].Index[1],default.PerkInfo[i].Value[j+7]);
|
||||
kfpc.serverSteamStatsAndAchievementsInitialized();
|
||||
}
|
||||
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
PerkInfo[0]=(Perk=class'KFMod.KFVetSharpshooter',Index=(3),Value=(0,30,100,700,2500,5500,8500),bSingleIndex=true)
|
||||
PerkInfo[1]=(Perk=class'KFMod.KFVetFieldMedic',Index=(0),Value=(0,200,750,4000,12000,25000,100000),bSingleIndex=true)
|
||||
PerkInfo[2]=(Perk=class'KFMod.KFVetBerserker',Index=(6),Value=(0,25000,100000,500000,1500000,3500000,5500000),bSingleIndex=true)
|
||||
PerkInfo[3]=(Perk=class'KFMod.KFVetCommando',Index=(5,4),Value=(0,25000,100000,500000,1500000,3500000,5500000,0,30,100,350,1200,2400,3600),bSingleIndex=false)
|
||||
PerkInfo[4]=(Perk=class'KFMod.KFVetDemolitions',Index=(21),Value=(0,25000,100000,500000,1500000,3500000,5500000),bSingleIndex=true)
|
||||
PerkInfo[5]=(Perk=class'KFMod.KFVetFirebug',Index=(7),Value=(0,25000,100000,500000,1500000,3500000,5500000),bSingleIndex=true)
|
||||
PerkInfo[6]=(Perk=class'KFMod.KFVetSupportSpec',Index=(2,1),Value=(0,25000,100000,500000,1500000,3500000,5500000,0,2000,7000,35000,120000,250000,370000),bSingleIndex=false)
|
||||
PerkInfo[7]=(Perk=class'KFMod.KFVeterancyTypes')
|
||||
}
|
||||
124
kf_sources/HideMut/Classes.backup/u_RenderHelper.uc
Normal file
124
kf_sources/HideMut/Classes.backup/u_RenderHelper.uc
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
class u_RenderHelper extends Object;
|
||||
|
||||
var float LastRunTime;
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// stalker and Pat visibility hax
|
||||
final static function RevealStalkers(out KFHumanPawn p)
|
||||
{
|
||||
local KFMonster m;
|
||||
|
||||
if (p == none || p.Level.TimeSeconds < default.LastRunTime)
|
||||
return;
|
||||
|
||||
default.LastRunTime = p.Level.TimeSeconds + 1.0f;
|
||||
|
||||
// VisibleCollidingActors must be as fast
|
||||
foreach p.CollidingActors(class'KFMonster', m, 2000)
|
||||
{
|
||||
if (m == none || m.Health <= 0 || M.bDeleteMe || m.IsInState('Dying'))
|
||||
continue;
|
||||
|
||||
if (ClassIsChildOf(m.class, class'ZombieStalker'))
|
||||
m.SetOverlayMaterial(Material'KFX.StalkerGlow', 999, true);
|
||||
if (ClassIsChildOf(m.class, class'ZombieBoss'))
|
||||
m.SetOverlayMaterial(Material'KFZED_FX_T.Energy.ZED_overlay_Hit_Shdr', 999, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// zed health
|
||||
final static function DrawHealthBars(out KFHumanPawn p, out Canvas C, out float f)
|
||||
{
|
||||
local HUDKillingFloor KFH;
|
||||
local KFMonster m;
|
||||
|
||||
KFH = HUDKillingFloor(C.ViewPort.Actor.myHUD);
|
||||
// this draws debug sphere for pawns
|
||||
// HKF.DrawPointSphere();
|
||||
// draw dem bars, using the fastest iterator at least up to 2000UU
|
||||
if (p == none || KFH == none)
|
||||
return;
|
||||
|
||||
foreach p.CollidingActors(class'KFMonster', m, f)
|
||||
{
|
||||
if(m == none || m.Health <= 0)
|
||||
continue;
|
||||
KFH.DrawHealthBar(C, m, m.Health, m.HealthMax , 50.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// crosshair
|
||||
final static function DrawXhair(out Canvas C, out Color cl, out float l, out float w)
|
||||
{
|
||||
C.SetPos((float(C.sizeX) - w) / 2, (float(C.sizeY) - l) / 2);
|
||||
C.DrawColor = cl;
|
||||
C.DrawTile(Texture'Engine.WhiteSquareTexture', w, l, 0, 0, 2, 2);
|
||||
C.SetPos((float(C.sizeX) - l) / 2, (float(C.sizeY) - w) / 2);
|
||||
C.DrawTile(Texture'Engine.WhiteSquareTexture', l, w, 0, 0, 2, 2);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// paths
|
||||
final static function ShowPaths(out KFPlayerController pc, optional bool b)
|
||||
{
|
||||
local NavigationPoint P;
|
||||
local int i;
|
||||
local ReachSpec Spec;
|
||||
local vector SpecColor;
|
||||
|
||||
if (!b)
|
||||
{
|
||||
pc.ClearStayingDebugLines();
|
||||
return;
|
||||
}
|
||||
|
||||
for (P = pc.Level.NavigationPointList; P != none; P = P.NextNavigationPoint )
|
||||
{
|
||||
log( "Checking "$P$" with pathlist length "$P.Pathlist.Length );
|
||||
for( i = 0; i < P.PathList.Length; i++ )
|
||||
{
|
||||
Spec = P.PathList[ i ];
|
||||
SpecColor = vect( 0,255,0 );
|
||||
// 260 = MAXVEHICLERADIUS 80 = MINCOMMONHEIGHT
|
||||
if (( Spec.CollisionRadius >= 260 ) && (Spec.CollisionHeight >= 80))
|
||||
{
|
||||
SpecColor = vect( 255,255,255 );
|
||||
}
|
||||
// Jump spec
|
||||
else if( ( Spec.reachFlags & 8 ) == Spec.reachFlags )
|
||||
{
|
||||
SpecColor = vect( 191, 165, 99 );
|
||||
}
|
||||
// Proscribed
|
||||
else if( ( Spec.reachFlags & 128 ) == Spec.reachFlags )
|
||||
{
|
||||
SpecColor = vect( 255, 0, 0 );
|
||||
}
|
||||
// Forced
|
||||
else if( ( Spec.reachFlags & 256 ) == Spec.reachFlags )
|
||||
{
|
||||
SpecColor = vect( 255, 255, 0 );
|
||||
}
|
||||
// Blue (narrow)
|
||||
else if( ( Spec.CollisionRadius < 72 || Spec.CollisionHeight < 80 ) )
|
||||
{
|
||||
SpecColor = vect( 0, 0, 255 );
|
||||
}
|
||||
|
||||
pc.DrawStayingDebugLine( P.PathList[ i ].Start.Location, P.PathList[ i ].End.Location, SpecColor.X, SpecColor.Y, SpecColor.Z );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
defaultproperties
|
||||
{
|
||||
LastRunTime=1.0
|
||||
}
|
||||
BIN
kf_sources/HideMut/Classes.backup/u_WeaponHelper.uc
Normal file
BIN
kf_sources/HideMut/Classes.backup/u_WeaponHelper.uc
Normal file
Binary file not shown.
16
kf_sources/HideMut/Classes/ActortList.uc
Normal file
16
kf_sources/HideMut/Classes/ActortList.uc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
class ActortList extends Object
|
||||
PerObjectConfig
|
||||
Config(HideMut);
|
||||
|
||||
|
||||
var config array<string> uselessStaticMeshes;
|
||||
var config array<string> uselessEmitters;
|
||||
var config array<string> uselessLights;
|
||||
var config array<string> uselessDecorations;
|
||||
var config array<string> uselessMovers;
|
||||
var config array<string> uselessProjectors;
|
||||
var config array<string> uselessRotatingMeshActors;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
78
kf_sources/HideMut/Classes/ActortListController.uc
Normal file
78
kf_sources/HideMut/Classes/ActortListController.uc
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
class ActortListController extends object;
|
||||
|
||||
|
||||
simulated function array<string> getUselessStaticMeshes(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(none, listName) class'ActortList';
|
||||
return currentActortList.uselessStaticMeshes;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessEmitters(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(none, listName) class'ActortList';
|
||||
return currentActortList.uselessEmitters;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessLights(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(none, listName) class'ActortList';
|
||||
return currentActortList.uselessLights;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessDecorations(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(none, listName) class'ActortList';
|
||||
return currentActortList.uselessDecorations;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessMovers(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(none, listName) class'ActortList';
|
||||
return currentActortList.uselessMovers;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessProjectors(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(none, listName) class'ActortList';
|
||||
return currentActortList.uselessProjectors;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getUselessRotatingMeshActors(string listName)
|
||||
{
|
||||
local ActortList currentActortList;
|
||||
|
||||
currentActortList = new(none, listName) class'ActortList';
|
||||
return currentActortList.uselessRotatingMeshActors;
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> GetAllActortLists()
|
||||
{
|
||||
local array<string> Names;
|
||||
// local int i;
|
||||
|
||||
Names = GetPerObjectNames("HideMut", string(class'ActortList'.name));
|
||||
return Names;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
8
kf_sources/HideMut/Classes/BackgroundArea.uc
Normal file
8
kf_sources/HideMut/Classes/BackgroundArea.uc
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class BackgroundArea extends GUIImage;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border_SlightTransparent'
|
||||
ImageStyle=ISTY_Stretched
|
||||
ImageRenderStyle=MSTY_Normal
|
||||
}
|
||||
36
kf_sources/HideMut/Classes/ChatAnimator.uc
Normal file
36
kf_sources/HideMut/Classes/ChatAnimator.uc
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
class ChatAnimator extends Object;
|
||||
|
||||
|
||||
// var KFPlayerController pc;
|
||||
// var string chatMessage;
|
||||
var int spamLoops;
|
||||
|
||||
|
||||
static function textspam(KFPlayerController pc, string msg)
|
||||
{
|
||||
local int i;
|
||||
// local float f;
|
||||
|
||||
while (pc != none && i <= default.spamLoops)
|
||||
{
|
||||
pc.serverSay(msg);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// function timer()
|
||||
// {
|
||||
// local int i;
|
||||
// while
|
||||
// // pc.myHUD.AddTextMessage(chatMessage, class'LocalMessage', pc.playerReplicationInfo);
|
||||
// spamLoops++;
|
||||
// if(spamLoops > 100)
|
||||
// {
|
||||
// }
|
||||
// }
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
spamLoops=100
|
||||
}
|
||||
13
kf_sources/HideMut/Classes/Halo.uc
Normal file
13
kf_sources/HideMut/Classes/Halo.uc
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
class Halo extends Light
|
||||
transient;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
LightBrightness=60.000000
|
||||
LightRadius=50.000000
|
||||
bStatic=False
|
||||
bNoDelete=False
|
||||
bDynamicLight=True
|
||||
RemoteRole=ROLE_None
|
||||
bMovable=True
|
||||
}
|
||||
1077
kf_sources/HideMut/Classes/HideHUD.uc
Normal file
1077
kf_sources/HideMut/Classes/HideHUD.uc
Normal file
File diff suppressed because it is too large
Load diff
242
kf_sources/HideMut/Classes/HideLobbyChat.uc
Normal file
242
kf_sources/HideMut/Classes/HideLobbyChat.uc
Normal file
|
|
@ -0,0 +1,242 @@
|
|||
// base class, not vanilla
|
||||
class HideLobbyChat extends FloatingWindow;
|
||||
|
||||
|
||||
var automated GUISectionBackground sB_Main;
|
||||
var automated moEditBox eb_Send;
|
||||
var automated GUIScrollTextBox lb_Chat;
|
||||
var bool bVoiceRepeat;
|
||||
|
||||
var() editinline array<byte> CloseKey;
|
||||
var() editinlinenotify color TextColor[3];
|
||||
|
||||
|
||||
// Marco SP, don't keep this one around..
|
||||
function bool NotifyLevelChange()
|
||||
{
|
||||
bPersistent = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function InitComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
super(PopupPageBase).InitComponent(MyController, MyOwner);
|
||||
|
||||
TextColor[0] = class'SayMessagePlus'.default.RedTeamColor;
|
||||
TextColor[1] = class'SayMessagePlus'.default.BlueTeamColor;
|
||||
TextColor[2] = class'SayMessagePlus'.default.DrawColor;
|
||||
|
||||
eb_Send.MyEditBox.OnKeyEvent = InternalOnKeyEvent;
|
||||
lb_Chat.MyScrollText.bNeverFocus = true;
|
||||
|
||||
// Marco SP: Why the fuck we handle text from console in this class? REMOVED!!!
|
||||
}
|
||||
|
||||
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
local int i;
|
||||
local string KeyName;
|
||||
local array<string> KeyNames;
|
||||
local PlayerController PC;
|
||||
|
||||
super.Opened(Sender);
|
||||
PC = PlayerOwner();
|
||||
|
||||
CloseKey.Remove(0, CloseKey.Length);
|
||||
KeyName = PC.ConsoleCommand("BINDINGTOKEY InGameChat");
|
||||
Split(KeyName, ",", KeyNames);
|
||||
for ( i = 0; i < KeyNames.Length; i++ )
|
||||
CloseKey[CloseKey.Length] = byte(PC.ConsoleCommand("KEYNUMBER"@KeyNames[i]));
|
||||
|
||||
// Advance the cursor position to the end of the text
|
||||
lb_Chat.MyScrollText.End();
|
||||
|
||||
FocusFirst(none);
|
||||
}
|
||||
|
||||
|
||||
function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
|
||||
{
|
||||
local string cmd;
|
||||
local int i;
|
||||
local bool bVoiceChatKey;
|
||||
local array<string> BindKeyNames, LocalizedBindKeyNames;
|
||||
local string TempString;
|
||||
|
||||
Controller.GetAssignedKeys("VoiceTalk", BindKeyNames, LocalizedBindKeyNames);
|
||||
|
||||
for (i = 0; i < BindKeyNames.Length; i++)
|
||||
{
|
||||
if (Mid(GetEnum(enum'EInputKey', Key), 3) ~= BindKeyNames[i])
|
||||
{
|
||||
bVoiceChatKey = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bVoiceChatKey)
|
||||
{
|
||||
if (bVoiceRepeat)
|
||||
{
|
||||
TempString = left(eb_send.MyEditBox.TextStr, len(eb_send.MyEditBox.TextStr) - 1);
|
||||
}
|
||||
|
||||
if (State == 1)
|
||||
{
|
||||
if (PlayerOwner() != none)
|
||||
{
|
||||
PlayerOwner().bVoiceTalk = 1;
|
||||
|
||||
if (bVoiceRepeat)
|
||||
{
|
||||
eb_send.MyEditBox.TextStr = TempString;
|
||||
eb_send.MyEditBox.CaretPos = len(eb_send.MyEditBox.TextStr);
|
||||
}
|
||||
|
||||
bVoiceRepeat = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (State == 2)
|
||||
{
|
||||
if (PlayerOwner() != none)
|
||||
{
|
||||
PlayerOwner().bVoiceTalk = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
bVoiceRepeat = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PlayerOwner() != none)
|
||||
{
|
||||
PlayerOwner().bVoiceTalk = 0;
|
||||
}
|
||||
|
||||
bVoiceRepeat = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (state == 1)
|
||||
{
|
||||
for (i = 0; i < CloseKey.Length; i++)
|
||||
{
|
||||
if (Key == CloseKey[i])
|
||||
{
|
||||
Controller.CloseMenu(false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state == 3)
|
||||
{
|
||||
if (Key == 0x0D)
|
||||
{
|
||||
cmd = eb_Send.GetText();
|
||||
|
||||
if (cmd == "")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Left(cmd, 1) == "/")
|
||||
{
|
||||
cmd = Mid(cmd, 1);
|
||||
}
|
||||
else if (Left(cmd, 1) == ".")
|
||||
{
|
||||
cmd = "teamsay" @ Mid(cmd, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd = "say" @ cmd;
|
||||
}
|
||||
|
||||
PlayerOwner().ConsoleCommand(cmd);
|
||||
eb_Send.SetText("");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return eb_Send.MyEditBox.InternalOnKeyEvent(key, state, delta);
|
||||
}
|
||||
|
||||
|
||||
function InternalOnCreateComponent(GUIComponent NewComp, GUIComponent Sender)
|
||||
{
|
||||
if (NewComp != eb_Send)
|
||||
NewComp.bNeverFocus = true;
|
||||
|
||||
super.InternalOnCreateComponent(NewComp, Sender);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=moEditBox Name=ebSend
|
||||
CaptionWidth=0.100000
|
||||
Caption="Say: "
|
||||
OnCreateComponent=ebSend.InternalOnCreateComponent
|
||||
Hint="Prefix a message with a dot (.) to send a team message or a slash (/) to send a command."
|
||||
WinTop=0.973152
|
||||
WinLeft=0.044128
|
||||
WinWidth=0.920000
|
||||
WinHeight=0.060000
|
||||
TabOrder=0
|
||||
bBoundToParent=True
|
||||
bScaleToParent=True
|
||||
ToolTip=None
|
||||
|
||||
End Object
|
||||
eb_Send=moEditBox'HideMut.HideLobbyChat.ebSend'
|
||||
|
||||
Begin Object Class=GUIScrollTextBox Name=lbChat
|
||||
bNoTeletype=True
|
||||
CharDelay=0.002500
|
||||
EOLDelay=0.000000
|
||||
Separator="<22>"
|
||||
OnCreateComponent=lbChat.InternalOnCreateComponent
|
||||
FontScale=FNS_Small
|
||||
StyleName="none"
|
||||
WinWidth=0.000000
|
||||
bBoundToParent=True
|
||||
bScaleToParent=True
|
||||
bNeverFocus=True
|
||||
ToolTip=None
|
||||
|
||||
End Object
|
||||
lb_Chat=GUIScrollTextBox'HideMut.HideLobbyChat.lbChat'
|
||||
|
||||
Begin Object Class=GUIHeader Name=TitleBar
|
||||
bUseTextHeight=True
|
||||
WinWidth=0.000000
|
||||
RenderWeight=0.010000
|
||||
bBoundToParent=True
|
||||
bScaleToParent=True
|
||||
bVisible=False
|
||||
bNeverFocus=False
|
||||
ScalingType=SCALE_X
|
||||
End Object
|
||||
t_WindowTitle=GUIHeader'HideMut.HideLobbyChat.TitleBar'
|
||||
|
||||
bResizeWidthAllowed=False
|
||||
bResizeHeightAllowed=False
|
||||
bMoveAllowed=False
|
||||
DefaultLeft=0.025000
|
||||
DefaultTop=0.460000
|
||||
DefaultWidth=0.400000
|
||||
DefaultHeight=0.050000
|
||||
i_FrameBG=None
|
||||
|
||||
bPersistent=True
|
||||
bAllowedAsLast=True
|
||||
WinTop=0.430000
|
||||
WinLeft=0.025000
|
||||
WinWidth=0.400000
|
||||
WinHeight=0.050000
|
||||
}
|
||||
437
kf_sources/HideMut/Classes/HideLobbyFooter.uc
Normal file
437
kf_sources/HideMut/Classes/HideLobbyFooter.uc
Normal file
|
|
@ -0,0 +1,437 @@
|
|||
// base class, not vanilla
|
||||
class HideLobbyFooter extends ButtonFooter;
|
||||
|
||||
|
||||
var automated GUIButton b_Menu, b_MapVote, b_KickVote, b_Ready, b_ViewMap, b_Cancel;
|
||||
var string ReadyString, UnreadyString;
|
||||
|
||||
var string MidGameMenuString;
|
||||
|
||||
|
||||
function bool InternalOnPreDraw(Canvas C)
|
||||
{
|
||||
// disable view map if its not a lobby state
|
||||
if (!PlayerOwner().GameReplicationInfo.bMatchHasBegun)
|
||||
b_ViewMap.EnableMe();
|
||||
else
|
||||
b_ViewMap.DisableMe();
|
||||
|
||||
// ready-unready text switch
|
||||
if (PlayerOwner().PlayerReplicationInfo != none && PlayerOwner().PlayerReplicationInfo.bReadyToPlay)
|
||||
b_Ready.Caption = UnreadyString;
|
||||
else
|
||||
b_Ready.Caption = ReadyString;
|
||||
|
||||
return super.InternalOnPreDraw(C);
|
||||
}
|
||||
|
||||
|
||||
// took poosh ScrnLobbyFooter as a reference
|
||||
// 1. overrided to position buttons by TabOrder
|
||||
// 2. moved some buttons to left side
|
||||
function PositionButtons(Canvas C)
|
||||
{
|
||||
local int j;
|
||||
local GUIButton b;
|
||||
local array<GUIButton> buttonsLEFT, buttonsRIGHT;
|
||||
local float x, s, m;
|
||||
|
||||
s = GetSpacer();
|
||||
m = GetMargin() / 2;
|
||||
x = ActualLeft() + ActualWidth() - m;
|
||||
// position the Disconnect button on the left, others on the right
|
||||
|
||||
// right buttons
|
||||
buttonsRIGHT = GetButtons(false);
|
||||
for (j = buttonsRIGHT.length - 1; j >= 0; --j)
|
||||
{
|
||||
b = buttonsRIGHT[j];
|
||||
x -= b.ActualWidth();
|
||||
b.WinLeft = b.RelativeLeft(x, true);
|
||||
x -= s;
|
||||
}
|
||||
|
||||
// left buttons
|
||||
buttonsLEFT = GetButtons(true);
|
||||
for (j = 0; j < buttonsLEFT.length; j++)
|
||||
{
|
||||
b = buttonsLEFT[j];
|
||||
b.WinLeft = b.RelativeLeft(m, true);
|
||||
m += b.ActualWidth();
|
||||
m += s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final private function array<GUIButton> GetButtons(optional bool bLEFTSIDED)
|
||||
{
|
||||
local int i, j;
|
||||
local GUIButton b;
|
||||
local array<GUIButton> buttons;
|
||||
|
||||
if (bLEFTSIDED)
|
||||
{
|
||||
for (i = 0; i < Controls.Length; ++i)
|
||||
{
|
||||
b = GUIButton(Controls[i]);
|
||||
if (b != none && bIsButtonLeft(b) && b.bVisible)
|
||||
{
|
||||
// compare tab orders and kepp the array sorted
|
||||
for (j = 0; j < buttons.length; ++j)
|
||||
{
|
||||
if (buttons[j].TabOrder >= b.TabOrder)
|
||||
break;
|
||||
}
|
||||
// fill the array
|
||||
buttons.insert(j, 1);
|
||||
buttons[j] = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < Controls.Length; ++i)
|
||||
{
|
||||
b = GUIButton(Controls[i]);
|
||||
if (b != none && !bIsButtonLeft(b) && b.bVisible)
|
||||
{
|
||||
// compare tab orders and kepp the array sorted
|
||||
for (j = 0; j < buttons.length; ++j)
|
||||
{
|
||||
if (buttons[j].TabOrder >= b.TabOrder)
|
||||
break;
|
||||
}
|
||||
// fill the array
|
||||
buttons.insert(j, 1);
|
||||
buttons[j] = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return buttons;
|
||||
}
|
||||
|
||||
|
||||
// which buttons are left sided
|
||||
final private function bool bIsButtonLeft(GUIButton b)
|
||||
{
|
||||
// mapvote, kickvote and main menu must be on left side
|
||||
if (b == b_MapVote || b == b_KickVote || b == b_Menu)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function bool ButtonsSized(Canvas C)
|
||||
{
|
||||
local int i;
|
||||
local GUIButton b;
|
||||
local bool bResult;
|
||||
local string str;
|
||||
local float T, AH, AT;
|
||||
|
||||
if (!bPositioned)
|
||||
return false;
|
||||
|
||||
bResult = true;
|
||||
str = GetLongestCaption(C);
|
||||
|
||||
AH = ActualHeight();
|
||||
AT = ActualTop();
|
||||
|
||||
for (i = 0; i < Controls.Length; i++)
|
||||
{
|
||||
b = GUIButton(Controls[i]);
|
||||
if (b != none)
|
||||
{
|
||||
if (bAutoSize && bFixedWidth)
|
||||
{
|
||||
if (b.Caption == "")
|
||||
b.SizingCaption = Left(str, Len(str) / 2);
|
||||
else
|
||||
b.SizingCaption = str;
|
||||
}
|
||||
else
|
||||
b.SizingCaption = "";
|
||||
|
||||
bResult = bResult && b.bPositioned;
|
||||
if (bFullHeight)
|
||||
b.WinHeight = b.RelativeHeight(AH, true);
|
||||
else b.WinHeight = b.RelativeHeight(ActualHeight(ButtonHeight), true);
|
||||
|
||||
switch ( Justification )
|
||||
{
|
||||
case TXTA_Left:
|
||||
T = ClientBounds[1];
|
||||
break;
|
||||
|
||||
case TXTA_Center:
|
||||
T = (AT + AH / 2) - (b.ActualHeight() / 2);
|
||||
break;
|
||||
|
||||
case TXTA_Right:
|
||||
T = ClientBounds[3] - b.ActualHeight();
|
||||
break;
|
||||
}
|
||||
|
||||
//b.WinTop = AT + ((AH - ActualHeight(ButtonHeight)) / 2);
|
||||
b.WinTop = b.RelativeTop(T, true ) + ((WinHeight - ButtonHeight) / 2);
|
||||
}
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
|
||||
function float GetButtonLeft()
|
||||
{
|
||||
local int i;
|
||||
local GUIButton b;
|
||||
local float TotalWidth, AW, AL;
|
||||
local float FooterMargin;
|
||||
|
||||
AL = ActualLeft();
|
||||
AW = ActualWidth();
|
||||
FooterMargin = GetMargin();
|
||||
|
||||
for (i = 0; i < Controls.Length; i++)
|
||||
{
|
||||
b = GUIButton(Controls[i]);
|
||||
if (b != none)
|
||||
{
|
||||
if (TotalWidth > 0)
|
||||
TotalWidth += GetSpacer();
|
||||
|
||||
TotalWidth += b.ActualWidth();
|
||||
}
|
||||
}
|
||||
|
||||
if (Alignment == TXTA_Center)
|
||||
return (AL + AW) / 2 - FooterMargin / 2 - TotalWidth / 2;
|
||||
|
||||
if (Alignment == TXTA_Right)
|
||||
return (AL + AW - FooterMargin / 2) - TotalWidth;
|
||||
|
||||
return AL + (FooterMargin / 2);
|
||||
}
|
||||
|
||||
|
||||
// Finds the longest caption of all the buttons
|
||||
function string GetLongestCaption(Canvas C)
|
||||
{
|
||||
local int i;
|
||||
local float XL, YL, LongestW;
|
||||
local string str;
|
||||
local GUIButton b;
|
||||
|
||||
if (C == none)
|
||||
return "";
|
||||
|
||||
for (i = 0; i < Controls.Length; i++)
|
||||
{
|
||||
b = GUIButton(Controls[i]);
|
||||
if (b != none)
|
||||
{
|
||||
if (b.Style != none)
|
||||
b.Style.TextSize(C, b.MenuState, b.Caption, XL, YL, b.FontScale);
|
||||
else
|
||||
C.StrLen( b.Caption, XL, YL );
|
||||
|
||||
if (LongestW == 0 || XL > LongestW)
|
||||
{
|
||||
str = b.Caption;
|
||||
LongestW = XL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
function bool OnFooterClick(GUIComponent Sender)
|
||||
{
|
||||
local GUIController C;
|
||||
local PlayerController PC;
|
||||
|
||||
PC = PlayerOwner();
|
||||
C = Controller;
|
||||
|
||||
// midgame menu
|
||||
if (Sender == b_Menu)
|
||||
{
|
||||
PC.ClientOpenMenu(MidGameMenuString, false);
|
||||
}
|
||||
// ready-unready us
|
||||
else if (Sender == b_Ready)
|
||||
{
|
||||
if (PC.Level.NetMode == NM_Standalone || !PC.PlayerReplicationInfo.bReadyToPlay)
|
||||
{
|
||||
if (KFPlayerController(PC) != none)
|
||||
KFPlayerController(PC).SendSelectedVeterancyToServer(true);
|
||||
|
||||
// Set Ready
|
||||
PC.ServerRestartPlayer();
|
||||
PC.PlayerReplicationInfo.bReadyToPlay = True;
|
||||
if (PC.Level.GRI.bMatchHasBegun)
|
||||
PC.ClientCloseMenu(true, false);
|
||||
|
||||
b_Ready.Caption = UnreadyString;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (KFPlayerController(PC) != none)
|
||||
{
|
||||
KFPlayerController(PC).ServerUnreadyPlayer();
|
||||
PC.PlayerReplicationInfo.bReadyToPlay = false;
|
||||
b_Ready.Caption = ReadyString;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Kill Window and exit game / disconnect from server
|
||||
else if (Sender == b_Cancel)
|
||||
{
|
||||
// change class to ours
|
||||
HideLobbyMenu(PageOwner).bAllowClose = true;
|
||||
C.ViewportOwner.Console.ConsoleCommand("DISCONNECT");
|
||||
// Marco SP
|
||||
PC.ClientCloseMenu(true, false);
|
||||
C.AutoLoadMenus();
|
||||
}
|
||||
// Spectate map while waiting for players to get ready
|
||||
else if (Sender == b_ViewMap)
|
||||
{
|
||||
// change class to ours
|
||||
HideLobbyMenu(PageOwner).bAllowClose = true;
|
||||
PC.ClientCloseMenu(true, false);
|
||||
}
|
||||
// open kick vote
|
||||
else if (Sender == b_KickVote)
|
||||
{
|
||||
Controller.OpenMenu(Controller.KickVotingMenu);
|
||||
}
|
||||
// open map vote
|
||||
else if (Sender == b_MapVote)
|
||||
{
|
||||
PC.ShowVoteMenu();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function OnSteamStatsAndAchievementsReady()
|
||||
{
|
||||
PlayerOwner().ClientOpenMenu("KFGUI.KFProfilePage", false);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=GUIButton Name=MenuButton
|
||||
Caption="Main Menu"
|
||||
Hint="Open midgame menu."
|
||||
WinTop=0.966146
|
||||
WinLeft=0.280000
|
||||
WinWidth=0.120000
|
||||
WinHeight=0.033203
|
||||
RenderWeight=2.000000
|
||||
TabOrder=0
|
||||
bBoundToParent=True
|
||||
ToolTip=None
|
||||
|
||||
OnClick=HideLobbyFooter.OnFooterClick
|
||||
OnKeyEvent=Cancel.InternalOnKeyEvent
|
||||
End Object
|
||||
b_Menu=GUIButton'HideMut.HideLobbyFooter.MenuButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=MapVote
|
||||
Caption="Map Vote"
|
||||
Hint="Shortcut to map vote."
|
||||
WinTop=0.966146
|
||||
WinLeft=1.500000
|
||||
WinWidth=0.120000
|
||||
WinHeight=0.033203
|
||||
RenderWeight=2.000000
|
||||
TabOrder=1
|
||||
bBoundToParent=True
|
||||
ToolTip=None
|
||||
|
||||
OnClick=HideLobbyFooter.OnFooterClick
|
||||
OnKeyEvent=Cancel.InternalOnKeyEvent
|
||||
End Object
|
||||
b_MapVote=GUIButton'HideMut.HideLobbyFooter.MapVote'
|
||||
|
||||
Begin Object Class=GUIButton Name=KickVote
|
||||
Caption="Kick Vote"
|
||||
Hint="Shortcut to kick vote."
|
||||
WinTop=0.966146
|
||||
WinLeft=-0.500000
|
||||
WinWidth=0.120000
|
||||
WinHeight=0.033203
|
||||
RenderWeight=2.000000
|
||||
TabOrder=2
|
||||
bBoundToParent=True
|
||||
ToolTip=None
|
||||
|
||||
OnClick=HideLobbyFooter.OnFooterClick
|
||||
OnKeyEvent=Cancel.InternalOnKeyEvent
|
||||
End Object
|
||||
b_KickVote=GUIButton'HideMut.HideLobbyFooter.KickVote'
|
||||
|
||||
Begin Object Class=GUIButton Name=ReadyButton
|
||||
Caption="Ready"
|
||||
Hint="Click to indicate you are ready to play"
|
||||
WinTop=0.966146
|
||||
WinLeft=0.280000
|
||||
WinWidth=0.120000
|
||||
WinHeight=0.033203
|
||||
RenderWeight=2.000000
|
||||
TabOrder=3
|
||||
bBoundToParent=True
|
||||
ToolTip=None
|
||||
|
||||
OnClick=HideLobbyFooter.OnFooterClick
|
||||
OnKeyEvent=ReadyButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_Ready=GUIButton'HideMut.HideLobbyFooter.ReadyButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=ViewMap
|
||||
Caption="View Map"
|
||||
Hint="Hover around while other players afk to death."
|
||||
WinTop=0.966146
|
||||
WinLeft=-0.500000
|
||||
WinWidth=0.120000
|
||||
WinHeight=0.033203
|
||||
RenderWeight=2.000000
|
||||
TabOrder=4
|
||||
bBoundToParent=True
|
||||
ToolTip=None
|
||||
|
||||
OnClick=HideLobbyFooter.OnFooterClick
|
||||
OnKeyEvent=Cancel.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ViewMap=GUIButton'HideMut.HideLobbyFooter.ViewMap'
|
||||
|
||||
Begin Object Class=GUIButton Name=Cancel
|
||||
Caption="Disconnect"
|
||||
Hint="Disconnect From This Server"
|
||||
WinTop=0.966146
|
||||
WinLeft=-0.500000
|
||||
WinWidth=0.120000
|
||||
WinHeight=0.033203
|
||||
RenderWeight=2.000000
|
||||
TabOrder=5
|
||||
bBoundToParent=True
|
||||
ToolTip=None
|
||||
|
||||
OnClick=HideLobbyFooter.OnFooterClick
|
||||
OnKeyEvent=Cancel.InternalOnKeyEvent
|
||||
End Object
|
||||
b_Cancel=GUIButton'HideMut.HideLobbyFooter.Cancel'
|
||||
|
||||
ReadyString="Ready"
|
||||
UnreadyString="Unready"
|
||||
MidGameMenuString="KFGUI.KFInvasionLoginMenu"
|
||||
OnPreDraw=HideLobbyFooter.InternalOnPreDraw
|
||||
}
|
||||
875
kf_sources/HideMut/Classes/HideLobbyMenu.uc
Normal file
875
kf_sources/HideMut/Classes/HideLobbyMenu.uc
Normal file
|
|
@ -0,0 +1,875 @@
|
|||
class HideLobbyMenu extends UT2k4MainPage;
|
||||
|
||||
|
||||
struct FPlayerBoxEntry
|
||||
{
|
||||
var moCheckBox ReadyBox;
|
||||
var KFPlayerReadyBar PlayerBox;
|
||||
var GUIImage PlayerPerk;
|
||||
var GUILabel PlayerVetLabel;
|
||||
var bool bIsEmpty;
|
||||
};
|
||||
var array<FPlayerBoxEntry> PlayerBoxes;
|
||||
|
||||
var const int MaxPlayersOnList;
|
||||
var const string str_Beginner, str_Normal, str_Hard, str_Sui, str_HOE;
|
||||
|
||||
var const string str_LvlAbbr;
|
||||
var const string str_CurrentMap;
|
||||
var const string str_Difficulty;
|
||||
|
||||
var const string SelectPerkInformationString;
|
||||
var const string PerksDisabledString;
|
||||
|
||||
var bool bShowProfilePage;
|
||||
|
||||
var automated HideLobbyChat t_ChatBox;
|
||||
var automated KFMapStoryLabel l_StoryBox;
|
||||
var automated AltSectionBackground StoryBoxBG;
|
||||
|
||||
var automated AltSectionBackground GameInfoBG;
|
||||
var automated GUILabel CurrentMapLabel;
|
||||
var automated GUILabel DifficultyLabel;
|
||||
|
||||
var automated GUIImage WaveBG;
|
||||
var automated GUILabel WaveLabel;
|
||||
|
||||
var automated GUILabel label_TimeOutCounter;
|
||||
var automated GUILabel PerkClickLabel;
|
||||
|
||||
var bool bStoryBoxFilled;
|
||||
var bool bAllowClose;
|
||||
|
||||
// Perks / Profile
|
||||
var() string sChar, sCharD;
|
||||
var() int nFOV;
|
||||
var() xUtil.PlayerRecord PlayerRec;
|
||||
|
||||
var automated GUISectionBackground i_BGPerks;
|
||||
var automated GUISectionBackground i_BGPerk;
|
||||
|
||||
var automated GUISectionBackground i_BGPerkEffects;
|
||||
var automated GUIScrollTextBox lb_PerkEffects;
|
||||
|
||||
var automated GUIImage i_Portrait;
|
||||
var automated GUISectionBackground PlayerPortraitBG;
|
||||
|
||||
var float IconBorder; // Percent of Height to leave blank inside Icon Background
|
||||
var float ItemBorder; // Percent of Height to leave blank inside Item Background
|
||||
var float ItemSpacing; // Number of Pixels between Items
|
||||
var float ProgressBarHeight; // Percent of Height to make Progress Bar's Height
|
||||
var float TextTopOffset; // Percent of Height to off Progress String from top of Progress Bar(typically negative)
|
||||
var float IconToInfoSpacing; // Percent of Width to offset Info from right side of Icon
|
||||
|
||||
var texture ItemBackground;
|
||||
var texture ProgressBarBackground;
|
||||
var texture ProgressBarForeground;
|
||||
var texture PerkBackground;
|
||||
var texture InfoBackground;
|
||||
|
||||
//var bool bAdminUse; // If you're not an admin, gtfo!
|
||||
|
||||
var int ActivateTimeoutTime; // When was the lobby timeout turned on?
|
||||
var bool bTimeoutTimeLogged; // Was it already logged once?
|
||||
var bool bTimedOut; // Have we timed out out successfully?
|
||||
|
||||
var const string WaitingForServerStatus;
|
||||
var const string WaitingForOtherPlayers;
|
||||
var const string AutoCommence;
|
||||
|
||||
var bool bShouldUpdateVeterancy;
|
||||
var class<KFVeterancyTypes> CurrentVeterancy;
|
||||
var int CurrentVeterancyLevel;
|
||||
|
||||
|
||||
function InitComponent(GUIController MyC, GUIComponent MyO)
|
||||
{
|
||||
super(UT2k4MainPage).InitComponent(MyC, MyO);
|
||||
|
||||
i_Portrait.WinTop = PlayerPortraitBG.ActualTop() + 30;
|
||||
i_Portrait.WinHeight = PlayerPortraitBG.ActualHeight() - 36;
|
||||
|
||||
t_ChatBox.FocusInstead = PerkClickLabel;
|
||||
}
|
||||
|
||||
|
||||
// if we don't reset persistence, playerboxes will continue to pile
|
||||
function bool NotifyLevelChange()
|
||||
{
|
||||
bPersistent = false;
|
||||
bAllowClose = true;
|
||||
Controller.CloseMenu(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
|
||||
{
|
||||
local int i;
|
||||
local bool bVoiceChatKey;
|
||||
local array<string> BindKeyNames, LocalizedBindKeyNames;
|
||||
|
||||
Controller.GetAssignedKeys("VoiceTalk", BindKeyNames, LocalizedBindKeyNames);
|
||||
|
||||
for (i = 0; i < BindKeyNames.Length; i++)
|
||||
{
|
||||
if (Mid(GetEnum(enum'EInputKey', Key), 3) ~= BindKeyNames[i])
|
||||
{
|
||||
bVoiceChatKey = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bVoiceChatKey)
|
||||
{
|
||||
if (state == 1 || state == 2)
|
||||
{
|
||||
if (PlayerOwner() != none)
|
||||
{
|
||||
PlayerOwner().bVoiceTalk = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PlayerOwner() != none)
|
||||
{
|
||||
PlayerOwner().bVoiceTalk = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function ClearChatBox()
|
||||
{
|
||||
t_ChatBox.lb_Chat.SetContent("");
|
||||
}
|
||||
|
||||
|
||||
function TimedOut()
|
||||
{
|
||||
bTimedOut = true;
|
||||
PlayerOwner().ServerRestartPlayer();
|
||||
bAllowClose = true;
|
||||
}
|
||||
|
||||
|
||||
function bool InternalOnPreDraw(Canvas C)
|
||||
{
|
||||
local int i, j;
|
||||
local string StoryString;
|
||||
local String SkillString;
|
||||
local KFGameReplicationInfo KFGRI;
|
||||
local PlayerController PC;
|
||||
|
||||
PC = PlayerOwner();
|
||||
|
||||
if (PC == none || PC.Level == none) // Error?
|
||||
return false;
|
||||
|
||||
if ((PC.PlayerReplicationInfo != none && (!PC.PlayerReplicationInfo.bWaitingPlayer || PC.PlayerReplicationInfo.bOnlySpectator)) || PC.Outer.Name == 'Entry')
|
||||
{
|
||||
bAllowClose = true;
|
||||
PC.ClientCloseMenu(true,false);
|
||||
return false;
|
||||
}
|
||||
|
||||
t_Footer.InternalOnPreDraw(C);
|
||||
KFGRI = KFGameReplicationInfo(PC.GameReplicationInfo);
|
||||
|
||||
if (KFGRI != none)
|
||||
{
|
||||
WaveLabel.Caption = string(KFGRI.WaveNumber + 1) $ "/" $ string(KFGRI.FinalWave);
|
||||
}
|
||||
else
|
||||
{
|
||||
WaveLabel.Caption = "?/?";
|
||||
return false;
|
||||
}
|
||||
C.DrawColor.A = 255;
|
||||
|
||||
// CHECK ME LATER
|
||||
if (KFPlayerController(PC) != none && bShouldUpdateVeterancy)
|
||||
{
|
||||
if (KFPlayerController(PC).SelectedVeterancy == none)
|
||||
{
|
||||
bShowProfilePage = true;
|
||||
|
||||
if (PC.SteamStatsAndAchievements == none)
|
||||
{
|
||||
if (PC.Level.NetMode != NM_Client)
|
||||
{
|
||||
PC.SteamStatsAndAchievements = PC.Spawn(PC.default.SteamStatsAndAchievementsClass, PC);
|
||||
if (!PC.SteamStatsAndAchievements.Initialize(PC))
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(class'KFMainMenu'.default.UnknownSteamErrorText, QBTN_Ok, QBTN_Ok);
|
||||
PC.SteamStatsAndAchievements.Destroy();
|
||||
PC.SteamStatsAndAchievements = none;
|
||||
}
|
||||
else
|
||||
{
|
||||
PC.SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
|
||||
}
|
||||
}
|
||||
|
||||
bShowProfilePage = false;
|
||||
}
|
||||
else if (!PC.SteamStatsAndAchievements.bInitialized)
|
||||
{
|
||||
PC.SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
|
||||
PC.SteamStatsAndAchievements.GetStatsAndAchievements();
|
||||
bShowProfilePage = false;
|
||||
}
|
||||
|
||||
if (KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements) != none)
|
||||
{
|
||||
for (i = 0; i < class'KFGameType'.default.LoadedSkills.Length; i++)
|
||||
{
|
||||
if (KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements).GetPerkProgress(i) < 0.0)
|
||||
{
|
||||
PC.SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
|
||||
PC.SteamStatsAndAchievements.GetStatsAndAchievements();
|
||||
bShowProfilePage = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bShowProfilePage)
|
||||
{
|
||||
OnSteamStatsAndAchievementsReady();
|
||||
}
|
||||
|
||||
bShouldUpdateVeterancy = false;
|
||||
}
|
||||
else if (PC.SteamStatsAndAchievements != none && PC.SteamStatsAndAchievements.bInitialized)
|
||||
{
|
||||
KFPlayerController(PC).SendSelectedVeterancyToServer();
|
||||
bShouldUpdateVeterancy = false;
|
||||
}
|
||||
}
|
||||
|
||||
// First fill in non-ready players.
|
||||
for (i = 0; i < KFGRI.PRIArray.Length; i++)
|
||||
{
|
||||
if (!bValidPRI(KFGRI.PRIArray[i]) || KFGRI.PRIArray[i].bReadyToPlay)
|
||||
continue;
|
||||
|
||||
// start from 0
|
||||
AddPlayer(KFPlayerReplicationInfo(KFGRI.PRIArray[i]), j, C);
|
||||
if (++j >= MaxPlayersOnList)
|
||||
GoTo'DoneIt';
|
||||
}
|
||||
|
||||
// Then comes rest.
|
||||
for (i = 0; i < KFGRI.PRIArray.Length; i++)
|
||||
{
|
||||
if (!bValidPRI(KFGRI.PRIArray[i]) || !KFGRI.PRIArray[i].bReadyToPlay)
|
||||
continue;
|
||||
|
||||
if (KFGRI.PRIArray[i].bReadyToPlay)
|
||||
{
|
||||
if (!bTimeoutTimeLogged)
|
||||
{
|
||||
ActivateTimeoutTime = PC.Level.TimeSeconds;
|
||||
bTimeoutTimeLogged = true;
|
||||
}
|
||||
}
|
||||
// continue from last idx
|
||||
AddPlayer(KFPlayerReplicationInfo(KFGRI.PRIArray[i]), j, C);
|
||||
if (++j >= MaxPlayersOnList)
|
||||
GoTo'DoneIt';
|
||||
}
|
||||
|
||||
if (j < MaxPlayersOnList)
|
||||
EmptyPlayers(j);
|
||||
|
||||
DoneIt:
|
||||
StoryString = PC.Level.Description;
|
||||
|
||||
if (!bStoryBoxFilled)
|
||||
{
|
||||
l_StoryBox.LoadStoryText();
|
||||
bStoryBoxFilled = true;
|
||||
}
|
||||
|
||||
if (KFGRI.BaseDifficulty <= 1)
|
||||
SkillString = str_Beginner;
|
||||
else if (KFGRI.BaseDifficulty <= 2)
|
||||
SkillString = str_Normal;
|
||||
else if (KFGRI.BaseDifficulty <= 4)
|
||||
SkillString = str_Hard;
|
||||
else if (KFGRI.BaseDifficulty <= 5)
|
||||
SkillString = str_Sui;
|
||||
else
|
||||
SkillString = str_HOE;
|
||||
|
||||
CurrentMapLabel.Caption = str_CurrentMap @ PC.Level.Title;
|
||||
DifficultyLabel.Caption = str_Difficulty @ SkillString;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// filter none, spectators, non-KFPRI ones
|
||||
final private function bool bValidPRI(PlayerReplicationInfo PRI)
|
||||
{
|
||||
if (PRI == none || PRI.bOnlySpectator || KFPlayerReplicationInfo(PRI) == none)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
final private function AddPlayer(KFPlayerReplicationInfo PRI, int Index, Canvas C)
|
||||
{
|
||||
local float Top;
|
||||
|
||||
if (Index >= PlayerBoxes.Length)
|
||||
{
|
||||
Top = Index * 0.045;
|
||||
PlayerBoxes.Length = Index + 1;
|
||||
// create GUIComponents and set defaults
|
||||
PlayerBoxes[Index].ReadyBox = new (none) Class'moCheckBox';
|
||||
PlayerBoxes[Index].ReadyBox.bValueReadOnly = true;
|
||||
PlayerBoxes[Index].ReadyBox.ComponentJustification = TXTA_Left;
|
||||
PlayerBoxes[Index].ReadyBox.CaptionWidth = 0.82;
|
||||
PlayerBoxes[Index].ReadyBox.LabelColor.B = 0;
|
||||
PlayerBoxes[Index].ReadyBox.WinTop = 0.0475+Top;
|
||||
PlayerBoxes[Index].ReadyBox.WinLeft = 0.075;
|
||||
PlayerBoxes[Index].ReadyBox.WinWidth = 0.4;
|
||||
PlayerBoxes[Index].ReadyBox.WinHeight = 0.045;
|
||||
PlayerBoxes[Index].ReadyBox.RenderWeight = 0.55;
|
||||
PlayerBoxes[Index].ReadyBox.bAcceptsInput = false;
|
||||
PlayerBoxes[Index].PlayerBox = new (none) Class'KFPlayerReadyBar';
|
||||
PlayerBoxes[Index].PlayerBox.WinTop = 0.04+Top;
|
||||
PlayerBoxes[Index].PlayerBox.WinLeft = 0.04;
|
||||
PlayerBoxes[Index].PlayerBox.WinWidth = 0.35;
|
||||
PlayerBoxes[Index].PlayerBox.WinHeight = 0.045;
|
||||
PlayerBoxes[Index].PlayerBox.RenderWeight = 0.35;
|
||||
PlayerBoxes[Index].PlayerPerk = new (none) Class'GUIImage';
|
||||
PlayerBoxes[Index].PlayerPerk.ImageStyle = ISTY_Justified;
|
||||
PlayerBoxes[Index].PlayerPerk.WinTop = 0.043+Top;
|
||||
PlayerBoxes[Index].PlayerPerk.WinLeft = 0.0418;
|
||||
PlayerBoxes[Index].PlayerPerk.WinWidth = 0.039;
|
||||
PlayerBoxes[Index].PlayerPerk.WinHeight = 0.039;
|
||||
PlayerBoxes[Index].PlayerPerk.RenderWeight = 0.56;
|
||||
PlayerBoxes[Index].PlayerVetLabel = new (none) Class'GUILabel';
|
||||
PlayerBoxes[Index].PlayerVetLabel.TextAlign = TXTA_Right;
|
||||
PlayerBoxes[Index].PlayerVetLabel.TextColor = Class'Canvas'.Static.MakeColor(19,19,19);
|
||||
PlayerBoxes[Index].PlayerVetLabel.TextFont = "UT2SmallFont";
|
||||
PlayerBoxes[Index].PlayerVetLabel.WinTop = 0.04+Top;
|
||||
PlayerBoxes[Index].PlayerVetLabel.WinLeft = 0.22907;
|
||||
PlayerBoxes[Index].PlayerVetLabel.WinWidth = 0.151172;
|
||||
PlayerBoxes[Index].PlayerVetLabel.WinHeight = 0.045;
|
||||
PlayerBoxes[Index].PlayerVetLabel.RenderWeight = 0.5;
|
||||
|
||||
// finally add the GUIComponents
|
||||
AppendComponent(PlayerBoxes[Index].ReadyBox, true);
|
||||
AppendComponent(PlayerBoxes[Index].PlayerBox, true);
|
||||
AppendComponent(PlayerBoxes[Index].PlayerPerk, true);
|
||||
AppendComponent(PlayerBoxes[Index].PlayerVetLabel, true);
|
||||
|
||||
Top = (PlayerBoxes[Index].PlayerBox.WinTop + PlayerBoxes[Index].PlayerBox.WinHeight);
|
||||
}
|
||||
PlayerBoxes[Index].ReadyBox.Checked(PRI.bReadyToPlay);
|
||||
PlayerBoxes[Index].ReadyBox.SetCaption(" "$Left(PRI.PlayerName,20));
|
||||
|
||||
if (PRI.ClientVeteranSkill != none)
|
||||
{
|
||||
PlayerBoxes[Index].PlayerVetLabel.Caption = str_LvlAbbr @ PRI.ClientVeteranSkillLevel @ PRI.ClientVeteranSkill.default.VeterancyName;
|
||||
|
||||
PlayerBoxes[Index].PlayerPerk.Image = PRI.ClientVeteranSkill.default.OnHUDIcon;
|
||||
PlayerBoxes[Index].PlayerPerk.ImageColor = class'Canvas'.Static.MakeColor(255, 255, 255);
|
||||
}
|
||||
else
|
||||
{
|
||||
// REVERT!
|
||||
PlayerBoxes[Index].PlayerPerk.Image = none;
|
||||
PlayerBoxes[Index].PlayerVetLabel.Caption = "";
|
||||
|
||||
// // try KFPC
|
||||
// PlayerBoxes[Index].PlayerVetLabel.Caption = str_LvlAbbr @ PRI.ClientVeteranSkillLevel @ PRI.ClientVeteranSkill.default.VeterancyName;
|
||||
|
||||
// PlayerBoxes[Index].PlayerPerk.Image = KFPlayerController(PRI.Owner).SelectedVeterancy.default.OnHUDIcon;
|
||||
// PlayerBoxes[Index].PlayerPerk.ImageColor = class'Canvas'.Static.MakeColor(255, 255, 255);
|
||||
}
|
||||
PlayerBoxes[Index].bIsEmpty = false;
|
||||
}
|
||||
|
||||
|
||||
final private function EmptyPlayers(int Index)
|
||||
{
|
||||
local int i;
|
||||
|
||||
while (Index < PlayerBoxes.Length && !PlayerBoxes[Index].bIsEmpty)
|
||||
{
|
||||
PlayerBoxes[Index].ReadyBox.Checked(false);
|
||||
PlayerBoxes[Index].PlayerPerk.Image = none;
|
||||
PlayerBoxes[Index].PlayerVetLabel.Caption = "";
|
||||
PlayerBoxes[Index].ReadyBox.SetCaption("");
|
||||
PlayerBoxes[Index].bIsEmpty = true;
|
||||
++Index;
|
||||
}
|
||||
|
||||
for (i = 0; i < PlayerBoxes.Length; i++)
|
||||
{
|
||||
if (PlayerBoxes[i].bIsEmpty)
|
||||
{
|
||||
// remove GUIComponents
|
||||
RemoveComponent(PlayerBoxes[i].ReadyBox, false);
|
||||
RemoveComponent(PlayerBoxes[i].PlayerBox, false);
|
||||
RemoveComponent(PlayerBoxes[i].PlayerPerk, false);
|
||||
RemoveComponent(PlayerBoxes[i].PlayerVetLabel, false);
|
||||
// remove refs
|
||||
PlayerBoxes[i].ReadyBox = none;
|
||||
PlayerBoxes[i].PlayerBox = none;
|
||||
PlayerBoxes[i].PlayerPerk = none;
|
||||
PlayerBoxes[i].PlayerVetLabel = none;
|
||||
// remove from array
|
||||
PlayerBoxes.remove(i, 1);
|
||||
log(">>> HideLobbyMenu: EmptyPlayers executed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function bool StopClose(optional bool bCancelled)
|
||||
{
|
||||
bStoryBoxFilled = false;
|
||||
|
||||
ClearChatBox();
|
||||
|
||||
// this is for the OnCanClose delegate
|
||||
// can't close now unless done by call to CloseAll,
|
||||
// or the bool has been set to true by LobbyFooter
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Called when the Menu Owner is opened
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
bShouldUpdateVeterancy = true;
|
||||
SetTimer(1, true);
|
||||
}
|
||||
|
||||
|
||||
function InternalOnClosed(bool bCancelled)
|
||||
{
|
||||
if (PlayerOwner() != none)
|
||||
{
|
||||
PlayerOwner().Advertising_ExitZone();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
event Timer()
|
||||
{
|
||||
local KFGameReplicationInfo KF;
|
||||
|
||||
if (PlayerOwner().PlayerReplicationInfo == none)
|
||||
return;
|
||||
|
||||
if (PlayerOwner().PlayerReplicationInfo.bOnlySpectator)
|
||||
{
|
||||
label_TimeOutCounter.caption = "You are a spectator.";
|
||||
return;
|
||||
}
|
||||
|
||||
KF = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo);
|
||||
|
||||
if (KF == none)
|
||||
{
|
||||
label_TimeOutCounter.caption = WaitingForServerStatus;
|
||||
}
|
||||
else if (KF.LobbyTimeout <= 0)
|
||||
{
|
||||
label_TimeOutCounter.caption = WaitingForOtherPlayers;
|
||||
}
|
||||
else
|
||||
{
|
||||
label_TimeOutCounter.caption = AutoCommence$":" @ KF.LobbyTimeout;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final private function DrawPerk(Canvas Canvas)
|
||||
{
|
||||
local float X, Y, Width, Height;
|
||||
local int LevelIndex, CurIndex;
|
||||
local float TempX, TempY;
|
||||
local float TempWidth, TempHeight;
|
||||
local float IconSize, ProgressBarWidth;
|
||||
local string PerkName, PerkLevelString;
|
||||
local KFPlayerReplicationInfo KFPRI;
|
||||
local Material M;
|
||||
|
||||
DrawPortrait();
|
||||
|
||||
KFPRI = KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo);
|
||||
|
||||
if (KFPRI == none || KFPRI.ClientVeteranSkill == None)
|
||||
{
|
||||
if (CurrentVeterancyLevel != 255)
|
||||
{
|
||||
CurrentVeterancyLevel = 255;
|
||||
lb_PerkEffects.SetContent("None perk active");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
CurIndex = KFPlayerController(PlayerOwner()).SelectedVeterancy.default.PerkIndex;
|
||||
LevelIndex = KFSteamStatsAndAchievements(PlayerOwner().SteamStatsAndAchievements).PerkHighestLevelAvailable(CurIndex);
|
||||
PerkName = KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName;
|
||||
PerkLevelString = str_LvlAbbr @ LevelIndex;
|
||||
|
||||
//Get the position size etc in pixels
|
||||
X = (i_BGPerk.WinLeft + 0.003) * Canvas.ClipX;
|
||||
Y = (i_BGPerk.WinTop + 0.040) * Canvas.ClipY;
|
||||
|
||||
Width = (i_BGPerk.WinWidth - 0.006) * Canvas.ClipX;
|
||||
Height = (i_BGPerk.WinHeight - 0.043) * Canvas.ClipY;
|
||||
|
||||
// Offset for the Background
|
||||
TempX = X;
|
||||
TempY = Y;
|
||||
|
||||
// Initialize the Canvas
|
||||
Canvas.Style = 1;
|
||||
Canvas.Font = class'ROHUD'.Static.GetSmallMenuFont(Canvas);
|
||||
Canvas.SetDrawColor(255, 255, 255, 255);
|
||||
|
||||
// Draw Item Background
|
||||
Canvas.SetPos(TempX, TempY);
|
||||
//Canvas.DrawTileStretched(ItemBackground, Width, Height);
|
||||
|
||||
// Offset and Calculate Icon's Size
|
||||
TempX += ItemBorder * Height;
|
||||
TempY += ItemBorder * Height;
|
||||
IconSize = Height - (ItemBorder * 2.0 * Height);
|
||||
|
||||
// Draw Icon
|
||||
Canvas.SetPos(TempX, TempY);
|
||||
M = class'KFGameType'.default.LoadedSkills[CurIndex].default.OnHUDIcon;
|
||||
Canvas.DrawTile(M, IconSize, IconSize, 0, 0, M.MaterialUSize(), M.MaterialVSize());
|
||||
|
||||
TempX += IconSize + (IconToInfoSpacing * Width);
|
||||
TempY += TextTopOffset * Height;
|
||||
|
||||
ProgressBarWidth = Width - (TempX - X) - (IconToInfoSpacing * Width);
|
||||
|
||||
// Select Text Color
|
||||
Canvas.SetDrawColor(255, 255, 255, 255);
|
||||
|
||||
// Draw the Perk's Level name
|
||||
Canvas.StrLen(PerkName, TempWidth, TempHeight);
|
||||
Canvas.SetPos(TempX, TempY);
|
||||
Canvas.DrawText(PerkName);
|
||||
|
||||
// Draw the Perk's Level
|
||||
if (PerkLevelString != "")
|
||||
{
|
||||
Canvas.StrLen(PerkLevelString, TempWidth, TempHeight);
|
||||
Canvas.SetPos(TempX + ProgressBarWidth - TempWidth, TempY);
|
||||
Canvas.DrawText(PerkLevelString);
|
||||
}
|
||||
|
||||
TempY += TempHeight + (0.01 * Height);
|
||||
|
||||
if (CurrentVeterancy != KFPRI.ClientVeteranSkill || CurrentVeterancyLevel != LevelIndex)
|
||||
{
|
||||
CurrentVeterancy = KFPRI.ClientVeteranSkill;
|
||||
CurrentVeterancyLevel = LevelIndex;
|
||||
lb_PerkEffects.SetContent(KFPRI.ClientVeteranSkill.default.LevelEffects[LevelIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final private function DrawPortrait()
|
||||
{
|
||||
if (PlayerOwner().PlayerReplicationInfo != none)
|
||||
sChar = PlayerOwner().PlayerReplicationInfo.CharacterName;
|
||||
else
|
||||
sChar = PlayerOwner().GetUrlOption("Character");
|
||||
|
||||
if (sCharD != sChar)
|
||||
{
|
||||
sCharD = sChar;
|
||||
SetPlayerRec();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final private function SetPlayerRec()
|
||||
{
|
||||
PlayerRec = Class'xUtil'.Static.FindPlayerRecord(sChar);
|
||||
i_Portrait.Image = PlayerRec.Portrait;
|
||||
}
|
||||
|
||||
|
||||
final private function bool ShowPerkMenu(GUIComponent Sender)
|
||||
{
|
||||
if (PlayerOwner() != none)
|
||||
{
|
||||
PlayerOwner().ClientOpenMenu("KFGUI.KFProfilePage", false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
final private function OnSteamStatsAndAchievementsReady()
|
||||
{
|
||||
Controller.OpenMenu("KFGUI.KFProfilePage");
|
||||
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(SelectPerkInformationString, QBTN_Ok, QBTN_Ok);
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// DEFAULTPROPERTIES
|
||||
//=============================================================================
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
MaxPlayersOnList=18
|
||||
str_Beginner="Beginner"
|
||||
STR_Normal="Normal"
|
||||
str_Hard="Hard"
|
||||
str_Sui="Suicidal"
|
||||
str_HOE="Hell on Earth"
|
||||
str_LvlAbbr="Lv"
|
||||
str_CurrentMap="Current Map:"
|
||||
str_Difficulty="Difficulty Level:"
|
||||
SelectPerkInformationString="Perks enhance certain abilities of your character.|There are 6 Perks to choose from in the center of the screen.|Each has different Effects shown in the upper right.|Perks improve as you complete the Level Requirements shown on the right."
|
||||
PerksDisabledString="Perk Progress has been disabled because the Game Length is set to Custom, Sandbox Mode is on, or you have previously used Cheats."
|
||||
Begin Object Class=HideLobbyChat Name=ChatBox
|
||||
OnCreateComponent=ChatBox.InternalOnCreateComponent
|
||||
WinTop=0.807600
|
||||
WinLeft=0.016090
|
||||
WinWidth=0.971410
|
||||
WinHeight=0.100000
|
||||
RenderWeight=0.010000
|
||||
TabOrder=1
|
||||
OnPreDraw=ChatBox.FloatingPreDraw
|
||||
OnRendered=ChatBox.FloatingRendered
|
||||
OnHover=ChatBox.FloatingHover
|
||||
OnMousePressed=ChatBox.FloatingMousePressed
|
||||
OnMouseRelease=ChatBox.FloatingMouseRelease
|
||||
End Object
|
||||
t_ChatBox=HideLobbyChat'HideMut.HideLobbyMenu.ChatBox'
|
||||
|
||||
Begin Object Class=KFMapStoryLabel Name=LobbyMapStoryBox
|
||||
OnCreateComponent=LobbyMapStoryBox.InternalOnCreateComponent
|
||||
ToolTip=None
|
||||
|
||||
End Object
|
||||
l_StoryBox=KFMapStoryLabel'HideMut.HideLobbyMenu.LobbyMapStoryBox'
|
||||
|
||||
Begin Object Class=AltSectionBackground Name=StoryBoxBackground
|
||||
bNoCaption=True
|
||||
WinTop=0.109808
|
||||
WinLeft=0.489062
|
||||
WinWidth=0.487374
|
||||
WinHeight=0.309092
|
||||
OnPreDraw=StoryBoxBackground.InternalPreDraw
|
||||
End Object
|
||||
StoryBoxBG=AltSectionBackground'HideMut.HideLobbyMenu.StoryBoxBackground'
|
||||
|
||||
Begin Object Class=AltSectionBackground Name=GameInfoB
|
||||
WinTop=0.037851
|
||||
WinLeft=0.489062
|
||||
WinWidth=0.487374
|
||||
WinHeight=0.075000
|
||||
OnPreDraw=GameInfoB.InternalPreDraw
|
||||
End Object
|
||||
GameInfoBG=AltSectionBackground'HideMut.HideLobbyMenu.GameInfoB'
|
||||
|
||||
Begin Object Class=GUILabel Name=CurrentMapL
|
||||
Caption="LAlalala Map"
|
||||
TextColor=(B=158,G=176,R=175)
|
||||
WinTop=0.042179
|
||||
WinLeft=0.496524
|
||||
WinWidth=0.360000
|
||||
WinHeight=0.035714
|
||||
RenderWeight=0.900000
|
||||
End Object
|
||||
CurrentMapLabel=GUILabel'HideMut.HideLobbyMenu.CurrentMapL'
|
||||
|
||||
Begin Object Class=GUILabel Name=DifficultyL
|
||||
Caption="Difficulty"
|
||||
TextColor=(B=158,G=176,R=175)
|
||||
WinTop=0.072381
|
||||
WinLeft=0.496524
|
||||
WinWidth=0.360000
|
||||
WinHeight=0.035714
|
||||
RenderWeight=0.900000
|
||||
End Object
|
||||
DifficultyLabel=GUILabel'HideMut.HideLobbyMenu.DifficultyL'
|
||||
|
||||
Begin Object Class=GUIImage Name=WaveB
|
||||
Image=Texture'KillingFloorHUD.HUD.Hud_Bio_Circle'
|
||||
ImageStyle=ISTY_Justified
|
||||
ImageRenderStyle=MSTY_Normal
|
||||
WinTop=0.043810
|
||||
WinLeft=0.923238
|
||||
WinWidth=0.051642
|
||||
WinHeight=0.061783
|
||||
RenderWeight=0.800000
|
||||
End Object
|
||||
WaveBG=GUIImage'HideMut.HideLobbyMenu.WaveB'
|
||||
|
||||
Begin Object Class=GUILabel Name=WaveL
|
||||
Caption="1/4"
|
||||
TextAlign=TXTA_Center
|
||||
TextColor=(B=158,G=176,R=175)
|
||||
VertAlign=TXTA_Center
|
||||
FontScale=FNS_Small
|
||||
WinTop=0.043810
|
||||
WinLeft=0.923238
|
||||
WinWidth=0.051642
|
||||
WinHeight=0.061783
|
||||
RenderWeight=0.900000
|
||||
End Object
|
||||
WaveLabel=GUILabel'HideMut.HideLobbyMenu.WaveL'
|
||||
|
||||
Begin Object Class=GUILabel Name=TimeOutCounter
|
||||
Caption="Game will auto-commence in: "
|
||||
TextAlign=TXTA_Center
|
||||
TextColor=(B=158,G=176,R=175)
|
||||
WinTop=0.000010
|
||||
WinLeft=0.059552
|
||||
WinWidth=0.346719
|
||||
WinHeight=0.045704
|
||||
TabOrder=6
|
||||
End Object
|
||||
label_TimeOutCounter=GUILabel'HideMut.HideLobbyMenu.TimeOutCounter'
|
||||
|
||||
Begin Object Class=GUILabel Name=PerkClickArea
|
||||
WinTop=0.432395
|
||||
WinLeft=0.488851
|
||||
WinWidth=0.444405
|
||||
WinHeight=0.437312
|
||||
bAcceptsInput=True
|
||||
OnClickSound=CS_Click
|
||||
OnClick=HideLobbyMenu.ShowPerkMenu
|
||||
End Object
|
||||
PerkClickLabel=GUILabel'HideMut.HideLobbyMenu.PerkClickArea'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=BGPerk
|
||||
bFillClient=True
|
||||
Caption="Current Perk"
|
||||
WinTop=0.432291
|
||||
WinLeft=0.650976
|
||||
WinWidth=0.325157
|
||||
WinHeight=0.138086
|
||||
OnPreDraw=BGPerk.InternalPreDraw
|
||||
End Object
|
||||
i_BGPerk=GUISectionBackground'HideMut.HideLobbyMenu.BGPerk'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=BGPerkEffects
|
||||
bFillClient=True
|
||||
Caption="Perk Effects"
|
||||
WinTop=0.568448
|
||||
WinLeft=0.650976
|
||||
WinWidth=0.325157
|
||||
WinHeight=0.307442
|
||||
OnPreDraw=BGPerkEffects.InternalPreDraw
|
||||
End Object
|
||||
i_BGPerkEffects=GUISectionBackground'HideMut.HideLobbyMenu.BGPerkEffects'
|
||||
|
||||
Begin Object Class=GUIScrollTextBox Name=PerkEffectsScroll
|
||||
CharDelay=0.002500
|
||||
EOLDelay=0.100000
|
||||
OnCreateComponent=PerkEffectsScroll.InternalOnCreateComponent
|
||||
WinTop=0.626094
|
||||
WinLeft=0.659687
|
||||
WinWidth=0.309454
|
||||
WinHeight=0.244961
|
||||
TabOrder=9
|
||||
ToolTip=None
|
||||
|
||||
End Object
|
||||
lb_PerkEffects=GUIScrollTextBox'HideMut.HideLobbyMenu.PerkEffectsScroll'
|
||||
|
||||
Begin Object Class=GUIImage Name=PlayerPortrait
|
||||
Image=Texture'InterfaceArt_tex.Menu.changeme_texture'
|
||||
ImageStyle=ISTY_Scaled
|
||||
ImageRenderStyle=MSTY_Normal
|
||||
IniOption="@Internal"
|
||||
WinTop=0.472396
|
||||
WinLeft=0.492522
|
||||
WinWidth=0.156368
|
||||
WinHeight=0.397022
|
||||
RenderWeight=0.300000
|
||||
End Object
|
||||
i_Portrait=GUIImage'HideMut.HideLobbyMenu.PlayerPortrait'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=PlayerPortraitB
|
||||
WinTop=0.432291
|
||||
WinLeft=0.489062
|
||||
WinWidth=0.163305
|
||||
WinHeight=0.443451
|
||||
OnPreDraw=PlayerPortraitB.InternalPreDraw
|
||||
End Object
|
||||
PlayerPortraitBG=GUISectionBackground'HideMut.HideLobbyMenu.PlayerPortraitB'
|
||||
|
||||
IconBorder=0.050000
|
||||
ItemBorder=0.110000
|
||||
ProgressBarHeight=0.300000
|
||||
TextTopOffset=0.050000
|
||||
IconToInfoSpacing=0.050000
|
||||
ProgressBarBackground=Texture'KF_InterfaceArt_tex.Menu.Innerborder'
|
||||
ProgressBarForeground=Texture'InterfaceArt_tex.Menu.progress_bar'
|
||||
PerkBackground=Texture'KF_InterfaceArt_tex.Menu.Item_box_box'
|
||||
InfoBackground=Texture'KF_InterfaceArt_tex.Menu.Item_box_bar'
|
||||
WaitingForServerStatus="Awaiting server status..."
|
||||
WaitingForOtherPlayers="Waiting for players to be ready..."
|
||||
AutoCommence="Game will auto-commence in"
|
||||
Begin Object Class=GUITabControl Name=PageTabs
|
||||
bDockPanels=True
|
||||
TabHeight=0.040000
|
||||
WinLeft=0.010000
|
||||
WinWidth=0.980000
|
||||
WinHeight=0.040000
|
||||
RenderWeight=0.490000
|
||||
TabOrder=3
|
||||
bAcceptsInput=True
|
||||
OnActivate=PageTabs.InternalOnActivate
|
||||
End Object
|
||||
c_Tabs=GUITabControl'KFGui.GUILibraryMenu.PageTabs'
|
||||
|
||||
Begin Object Class=GUIHeader Name=ServerBrowserHeader
|
||||
bVisible=False
|
||||
End Object
|
||||
t_Header=GUIHeader'HideMut.HideLobbyMenu.ServerBrowserHeader'
|
||||
|
||||
Begin Object Class=HideLobbyFooter Name=BuyFooter
|
||||
RenderWeight=0.300000
|
||||
TabOrder=8
|
||||
bBoundToParent=False
|
||||
bScaleToParent=False
|
||||
OnPreDraw=BuyFooter.InternalOnPreDraw
|
||||
End Object
|
||||
t_Footer=HideLobbyFooter'HideMut.HideLobbyMenu.BuyFooter'
|
||||
|
||||
i_Background=None
|
||||
|
||||
i_bkChar=None
|
||||
|
||||
bRenderWorld=True
|
||||
bAllowedAsLast=True
|
||||
OnClose=HideLobbyMenu.InternalOnClosed
|
||||
OnCanClose=HideLobbyMenu.StopClose
|
||||
WinHeight=0.500000
|
||||
OnPreDraw=HideLobbyMenu.InternalOnPreDraw
|
||||
OnRendered=HideLobbyMenu.DrawPerk
|
||||
OnKeyEvent=HideLobbyMenu.InternalOnKeyEvent
|
||||
}
|
||||
785
kf_sources/HideMut/Classes/HideMainMenu.uc
Normal file
785
kf_sources/HideMut/Classes/HideMainMenu.uc
Normal file
|
|
@ -0,0 +1,785 @@
|
|||
// base class, not vanilla
|
||||
class HideMainMenu extends UT2K4GUIPage;
|
||||
|
||||
|
||||
#exec OBJ LOAD FILE=InterfaceContent.utx
|
||||
#exec OBJ LOAD FIlE=2K4Menus.utx
|
||||
// #exec OBJ LOAD FIlE=2K4MenuSounds.uax
|
||||
|
||||
#exec OBJ LOAD FIlE=2K4Menus.utx
|
||||
#exec OBJ LOAD FIlE=PatchTex.utx
|
||||
#exec OBJ LOAD FIlE=KF_DLC.utx
|
||||
|
||||
#exec OBJ LOAD FIlE=KillingFloorHUD_SUMMER.utx
|
||||
#exec OBJ LOAD FIlE=KillingFloorHUD_HALLOWEEN.utx
|
||||
#exec OBJ LOAD FIlE=KillingFloorHUD_XMAS.utx
|
||||
|
||||
//=============================================================================
|
||||
// VARIABLES
|
||||
//=============================================================================
|
||||
//var KFDataObject SPAmmo;
|
||||
var bool bOpenAlready;
|
||||
var bool bMovingOnTraining, bMovingOnResume, bMovingOnSP;
|
||||
|
||||
var automated FloatingImage KFBackground;
|
||||
var automated FloatingImage KFBackgroundOverlay;
|
||||
var automated GUIImage KFLogoBit;
|
||||
var automated GUILabel KFVersionNum; // Keep track of updates from now on ! :D
|
||||
var automated GUILabel KFWorkshopDownload;
|
||||
|
||||
// Variable Name Legend
|
||||
|
||||
// l_ GUILabel lb_ GUIListBox
|
||||
// i_ GUIImage li_ GUIList
|
||||
// b_ GUIButton tp_ GUITabPanel
|
||||
// t_ GUITitleBar sp_ GUISplitter
|
||||
// c_ GUITabControl
|
||||
// p_ GUIPanel
|
||||
|
||||
// ch_ moCheckBox
|
||||
// co_ moComboBox
|
||||
// nu_ moNumericEdit
|
||||
// ed_ moEditBox
|
||||
// fl_ moFloatEdit
|
||||
// sl_ moSlider
|
||||
|
||||
|
||||
var automated BackgroundImage i_BkChar,
|
||||
i_Background;
|
||||
var automated GUIImage i_UT2Logo,
|
||||
i_PanHuge,
|
||||
i_PanBig,
|
||||
i_PanSmall,
|
||||
i_UT2Shader,
|
||||
i_TV;
|
||||
var automated GUIButton b_SinglePlayer,
|
||||
b_MultiPlayer, b_Host,
|
||||
b_InstantAction,
|
||||
b_ModsAndDemo,
|
||||
b_Profile,
|
||||
b_JoinLH,
|
||||
b_Workshop,
|
||||
b_Settings,
|
||||
b_Quit;
|
||||
|
||||
var bool bAllowClose;
|
||||
|
||||
var array<material> CharShots;
|
||||
|
||||
var float CharFade, DesiredCharFade, CharFadeTime;
|
||||
|
||||
var GUIButton Selected;
|
||||
var() bool bNoInitDelay;
|
||||
|
||||
var() config string MenuSong;
|
||||
|
||||
var bool bNewNews;
|
||||
var float FadeTime;
|
||||
var bool FadeOut;
|
||||
|
||||
var localized string NewNewsMsg,
|
||||
FireWallTitle,
|
||||
FireWallMsg,
|
||||
SteamMustBeRunningText,
|
||||
UnknownSteamErrorText,
|
||||
DownloadingText,
|
||||
DownloadedText;
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// LOGIC
|
||||
//=============================================================================
|
||||
|
||||
// DISABLED
|
||||
function OnClose(optional Bool bCancelled){}
|
||||
|
||||
|
||||
// remove NEWS tab and all logs spam / lags caused by it
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
super(GUIMultiComponent).Opened(Sender);
|
||||
|
||||
class'KFServerBrowser'.default.PanelClass[0] = "none";
|
||||
}
|
||||
|
||||
|
||||
function InitComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
local byte SpecialEventType;
|
||||
|
||||
super.InitComponent(MyController, MyOwner);
|
||||
|
||||
Background = none;
|
||||
i_BkChar.Image = CharShots[rand(CharShots.Length)];
|
||||
|
||||
SpecialEventType = class'KFGameType'.static.GetSpecialEventType();
|
||||
|
||||
if (SpecialEventType == 1)
|
||||
{
|
||||
KFBackground.Image = MaterialSequence'KillingFloorHUD_SUMMER.MainMenu.kf_menu_seq';
|
||||
KFLogoBit.Image = FinalBlend'KillingFloorHUD_SUMMER.KFLogoFB';
|
||||
}
|
||||
else if (SpecialEventType == 2)
|
||||
{
|
||||
KFBackground.Image = MaterialSequence'KillingFloorHUD_HALLOWEEN.MainMenu.kf_menu_seq_HALLOWEEN';
|
||||
KFLogoBit.Image = FinalBlend'KillingFloorHUD_HALLOWEEN.KFLogoFB_halloween';
|
||||
}
|
||||
else if (SpecialEventType == 3)
|
||||
{
|
||||
KFBackground.Image = MaterialSequence'KillingFloorHUD_XMAS.MainMenu.kf_menu_seq_XMAS';
|
||||
KFLogoBit.Image = FinalBlend'KillingFloorHUD_XMAS.KFLogoFB_XMAS';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function InternalOnOpen()
|
||||
{
|
||||
if (bNoInitDelay)
|
||||
Timer();
|
||||
else
|
||||
SetTimer(4.5, false);
|
||||
|
||||
Controller.PerformRestore();
|
||||
|
||||
// if ( !PlayerOwner().level.game.IsA('KFCinematicGame') )
|
||||
// {
|
||||
// bOpenAlready = True;
|
||||
// PlayerOwner().ConsoleCommand("OPEN Entry?Game=KFMod.KFCinematicGame");
|
||||
// PlayerOwner().ClientSetInitialMusic(MenuSong,MTRAN_Segue);
|
||||
// }
|
||||
|
||||
PlayerOwner().ClientSetInitialMusic(MenuSong,MTRAN_Segue);
|
||||
|
||||
// Begin Syncing Subscribed Steam Workshop Files(if necessary)
|
||||
PlayerOwner().SyncSteamWorkshop();
|
||||
}
|
||||
|
||||
|
||||
function bool MyOnDraw(Canvas Canvas)
|
||||
{
|
||||
local GUIButton FButton;
|
||||
local int i,x2;
|
||||
local float XL,YL;
|
||||
local float DeltaTime;
|
||||
local int percentage;
|
||||
|
||||
if (PlayerOwner().SubscribedFileDownloadTitle != "")
|
||||
{
|
||||
if (PlayerOwner().SubscribedFileDownloadIndex != -1)
|
||||
{
|
||||
percentage = int(PlayerOwner().DownloadFileProgress * 100);
|
||||
KFWorkshopDownload.Caption = DownloadingText @ "|" @ PlayerOwner().SubscribedFileDownloadTitle @ "|" @percentage $ "%";
|
||||
}
|
||||
else
|
||||
{
|
||||
KFWorkshopDownload.Caption = PlayerOwner().SubscribedFileDownloadTitle @ "|" @ DownloadedText;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( bAnimating || !Controller.bCurMenuInitialized )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DeltaTime = Controller.RenderDelta;
|
||||
|
||||
for ( i = 0; i < Controls.Length; i++ )
|
||||
{
|
||||
if ( GUIButton(Controls[i]) != none )
|
||||
{
|
||||
FButton = GUIButton(Controls[i]);
|
||||
|
||||
if ( FButton.Tag > 0 && FButton.MenuState != MSAT_Focused )
|
||||
{
|
||||
FButton.Tag -= 784 * DeltaTime;
|
||||
|
||||
if ( FButton.Tag < 0 )
|
||||
{
|
||||
FButton.Tag = 0;
|
||||
}
|
||||
}
|
||||
else if ( FButton.MenuState == MSAT_Focused )
|
||||
{
|
||||
FButton.Tag = 200;
|
||||
}
|
||||
|
||||
if ( FButton.Tag > 0 )
|
||||
{
|
||||
fButton.Style.TextSize(Canvas, MSAT_Focused, FButton.Caption, XL, YL, FButton.FontScale);
|
||||
x2 = FButton.ActualLeft() + XL + 16;
|
||||
Canvas.Style = 5;
|
||||
Canvas.SetDrawColor(150, 25, 25, FButton.Tag);
|
||||
Canvas.SetPos(0, fButton.ActualTop());
|
||||
Canvas.DrawTilePartialStretched(material'Highlight', x2, FButton.ActualHeight());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
event Timer()
|
||||
{
|
||||
if (!bMovingOnTraining && !bMovingOnResume && !bMovingOnSP)
|
||||
{
|
||||
bNoInitDelay = true;
|
||||
|
||||
if (!Controller.bQuietMenu)
|
||||
{
|
||||
PlayerOwner().PlaySound(SlideInSound,SLOT_None);
|
||||
}
|
||||
i_TV.Animate(-0.000977, 0.332292, 0.35);
|
||||
i_UT2Logo.Animate(0.007226,0.016926,0.35);
|
||||
i_UT2Shader.Animate(0.249023,0.180988,0.35);
|
||||
i_TV.OnEndAnimation = MenuIn_OnArrival;
|
||||
i_UT2Logo.OnEndAnimation = MenuIn_OnArrival;
|
||||
i_UT2Shader.OnEndAnimation = MenuIn_OnArrival;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bMovingOnResume)
|
||||
{
|
||||
bMovingOnResume = false;
|
||||
Controller.ConsoleCommand("OPEN KFS-RESUMEGAME?Game=KFmod.KFSPGameType");
|
||||
}
|
||||
|
||||
if (bMovingOnTraining)
|
||||
{
|
||||
bMovingOnTraining = false;
|
||||
Controller.ConsoleCommand("OPEN KF-MANOR?Game=KFmod.KFGameType");
|
||||
}
|
||||
|
||||
if (bMovingOnSP)
|
||||
{
|
||||
bMovingOnSP = false;
|
||||
Controller.ConsoleCommand("OPEN KF-G-BIOTICSLAB?Game=KFmod.KFGameType");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function MoveOn()
|
||||
{
|
||||
local int i;
|
||||
local bool bShowPerkInfo;
|
||||
|
||||
switch (Selected)
|
||||
{
|
||||
case b_SinglePlayer:
|
||||
return;
|
||||
|
||||
case b_MultiPlayer:
|
||||
if (!Controller.CheckSteam())
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(SteamMustBeRunningText, QBTN_Ok, QBTN_Ok);
|
||||
return;
|
||||
}
|
||||
Profile("ServerBrowser");
|
||||
Controller.OpenMenu("KFGUI.KFServerBrowser");
|
||||
Profile("ServerBrowser");
|
||||
return;
|
||||
|
||||
case b_Host:
|
||||
if (!Controller.CheckSteam())
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(SteamMustBeRunningText, QBTN_Ok, QBTN_Ok);
|
||||
return;
|
||||
}
|
||||
Profile("MPHost");
|
||||
if (PlayerOwner() != none)
|
||||
{
|
||||
PlayerOwner().OpenUPNPPorts();
|
||||
}
|
||||
Controller.OpenMenu("KFGUI.KFGamePageMP");
|
||||
Profile("MPHost");
|
||||
return;
|
||||
|
||||
case b_InstantAction:
|
||||
Profile("InstantAction");
|
||||
Controller.OpenMenu("KFGUI.KFGamePageSP");
|
||||
Profile("InstantAction");
|
||||
return;
|
||||
|
||||
case b_Profile:
|
||||
if (!Controller.CheckSteam())
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(SteamMustBeRunningText, QBTN_Ok, QBTN_Ok);
|
||||
return;
|
||||
}
|
||||
if (PlayerOwner() != none)
|
||||
{
|
||||
if (PlayerOwner().SteamStatsAndAchievements == none)
|
||||
{
|
||||
PlayerOwner().SteamStatsAndAchievements = PlayerOwner().Spawn(PlayerOwner().default.SteamStatsAndAchievementsClass, PlayerOwner());
|
||||
if (!PlayerOwner().SteamStatsAndAchievements.Initialize(PlayerOwner()))
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(UnknownSteamErrorText, QBTN_Ok, QBTN_Ok);
|
||||
PlayerOwner().SteamStatsAndAchievements.Destroy();
|
||||
PlayerOwner().SteamStatsAndAchievements = none;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerOwner().SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (!PlayerOwner().SteamStatsAndAchievements.bInitialized)
|
||||
{
|
||||
PlayerOwner().SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
|
||||
PlayerOwner().SteamStatsAndAchievements.GetStatsAndAchievements();
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < class'KFGameType'.default.LoadedSkills.Length; i++)
|
||||
{
|
||||
if (KFSteamStatsAndAchievements(PlayerOwner().SteamStatsAndAchievements).GetPerkProgress(i) < 0.0)
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(class'HideMainMenu'.default.UnknownSteamErrorText, QBTN_Ok, QBTN_Ok);
|
||||
PlayerOwner().SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
|
||||
PlayerOwner().SteamStatsAndAchievements.GetStatsAndAchievements();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (class'KFPlayerController'.default.SelectedVeterancy == none)
|
||||
{
|
||||
bShowPerkInfo = true;
|
||||
}
|
||||
Profile("Profile");
|
||||
Controller.OpenMenu("KFGUI.KFProfileAndAchievements");
|
||||
Profile("Profile");
|
||||
if (bShowPerkInfo)
|
||||
{
|
||||
Controller.OpenMenu(Controller.QuestionMenuClass);
|
||||
GUIQuestionPage(Controller.TopPage()).SetupQuestion(class'LobbyMenu'.default.SelectPerkInformationString, QBTN_Ok, QBTN_Ok);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
case b_JoinLH:
|
||||
Controller.ViewportOwner.Console.ConsoleCommand("open 127.0.0.1");
|
||||
return;
|
||||
|
||||
case b_Workshop:
|
||||
PlayerOwner().SteamStatsAndAchievements.ShowWorkshopContent();
|
||||
return;
|
||||
|
||||
case b_ModsAndDemo:
|
||||
Profile("ModsandDemos");
|
||||
Controller.ViewportOwner.Console.ConsoleCommand("OPEN KF-Intro?Game=unrealgame.cinematicgame");
|
||||
Controller.CloseAll(True);
|
||||
SetTimer(0.5,false);
|
||||
Profile("ModsandDemos");
|
||||
return;
|
||||
|
||||
case b_Settings:
|
||||
Profile("Settings");
|
||||
Controller.OpenMenu("KFGUI.KFSettingsPage");
|
||||
Profile("Settings");
|
||||
return;
|
||||
|
||||
case b_Quit:
|
||||
Profile("Quit");
|
||||
Controller.OpenMenu(Controller.GetQuitPage());
|
||||
Profile("Quit");
|
||||
return;
|
||||
|
||||
default:
|
||||
StopWatch(True);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function MenuIn_OnArrival(GUIComponent Sender, EAnimationType Type)
|
||||
{
|
||||
Sender.OnArrival = none;
|
||||
if (bAnimating)
|
||||
return;
|
||||
|
||||
i_UT2Shader.OnDraw = MyOnDraw;
|
||||
DesiredCharFade=255;
|
||||
CharFadeTime = 0.75;
|
||||
|
||||
if (!Controller.bQuietMenu)
|
||||
PlayerOwner().PlaySound(FadeInSound);
|
||||
}
|
||||
|
||||
|
||||
function MainReopened()
|
||||
{
|
||||
if (!PlayerOwner().Level.IsPendingConnection())
|
||||
{
|
||||
i_BkChar.Image = CharShots[rand(CharShots.Length)];
|
||||
Opened(none);
|
||||
Timer();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function bool MyKeyEvent(out byte Key,out byte State,float delta)
|
||||
{
|
||||
// Escape pressed
|
||||
if (Key == 0x1B && state == 1)
|
||||
bAllowClose = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function bool CanClose(optional bool bCancelled)
|
||||
{
|
||||
if (bAllowClose)
|
||||
ButtonClick(b_Quit);
|
||||
|
||||
bAllowClose = false;
|
||||
return PlayerOwner().Level.IsPendingConnection();
|
||||
}
|
||||
|
||||
|
||||
function PlayPopSound(GUIComponent Sender, EAnimationType Type)
|
||||
{
|
||||
if (!Controller.bQuietMenu)
|
||||
PlayerOwner().PlaySound(PopInSound);
|
||||
}
|
||||
|
||||
|
||||
function MenuIn_Done(GUIComponent Sender, EAnimationType Type)
|
||||
{
|
||||
Sender.OnArrival = none;
|
||||
PlayPopSound(Sender,Type);
|
||||
}
|
||||
|
||||
|
||||
function bool ButtonClick(GUIComponent Sender)
|
||||
{
|
||||
Selected = GUIButton(Sender);
|
||||
if (Selected == none)
|
||||
return false;
|
||||
|
||||
DesiredCharFade=0;
|
||||
CharFadeTime = 0.35;
|
||||
|
||||
MoveOn();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function MenuOut_Done(GUIComponent Sender, EAnimationType Type)
|
||||
{
|
||||
Sender.OnArrival = none;
|
||||
if (bAnimating)
|
||||
return;
|
||||
|
||||
MoveOn();
|
||||
}
|
||||
|
||||
|
||||
event bool NotifyLevelChange()
|
||||
{
|
||||
if (bDebugging)
|
||||
log(Name@"NotifyLevelChange PendingConnection:"$PlayerOwner().Level.IsPendingConnection());
|
||||
|
||||
return PlayerOwner().Level.IsPendingConnection();
|
||||
}
|
||||
|
||||
|
||||
function bool CommunityDraw(canvas c)
|
||||
{
|
||||
local float x,y,xl,yl,a;
|
||||
|
||||
if (bNewNews)
|
||||
{
|
||||
a = 255.0 * (FadeTime/1.0);
|
||||
if (FadeOut)
|
||||
a = 255 - a;
|
||||
|
||||
FadeTime += Controller.RenderDelta;
|
||||
if (FadeTime>=1.0)
|
||||
{
|
||||
FadeTime = 0;
|
||||
FadeOut = !FadeOut;
|
||||
}
|
||||
|
||||
a = fclamp(a,1.0,254.0);
|
||||
x = b_ModsAndDemo.ActualLeft();
|
||||
y = b_Settings.ActualTop();
|
||||
C.Font = Controller.GetMenuFont("UT2MenuFont").GetFont(C.ClipX);
|
||||
C.Strlen("Qz,q",xl,yl);
|
||||
y -= yl - 5;
|
||||
C.Style=5;
|
||||
C.SetPos(x+1,y+1);
|
||||
C.SetDrawColor(0,0,0,A);
|
||||
C.DrawText(NewNewsMsg);
|
||||
|
||||
C.SetPos(x,y);
|
||||
C.SetDrawColor(207,185,103,A);
|
||||
C.DrawText(NewNewsMsg);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function OnSteamStatsAndAchievementsReady()
|
||||
{
|
||||
Profile("Profile");
|
||||
Controller.OpenMenu("KFGUI.KFProfileAndAchievements");
|
||||
Profile("Profile");
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// DEFAULTPROPERTIES
|
||||
//=============================================================================
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=FloatingImage Name=FloatingBackground
|
||||
Image=MaterialSequence'KillingFloorHUD.MainMenu.kf_menu_seq'
|
||||
DropShadow=None
|
||||
ImageStyle=ISTY_Scaled
|
||||
WinTop=0.136089
|
||||
WinLeft=0.273078
|
||||
WinWidth=0.802660
|
||||
WinHeight=1.080918
|
||||
RenderWeight=0.000003
|
||||
End Object
|
||||
KFBackground=FloatingImage'HideMut.HideMainMenu.FloatingBackground'
|
||||
|
||||
Begin Object Class=FloatingImage Name=FloatingBackgroundOverlay
|
||||
Image=FinalBlend'InterfaceArt2_tex.filmgrain.FilmgrainOverlayFB'
|
||||
DropShadow=None
|
||||
ImageStyle=ISTY_Scaled
|
||||
WinTop=0.000000
|
||||
WinLeft=0.000000
|
||||
WinWidth=1.000000
|
||||
WinHeight=1.000000
|
||||
RenderWeight=0.900000
|
||||
End Object
|
||||
KFBackgroundOverlay=FloatingImage'HideMut.HideMainMenu.FloatingBackgroundOverlay'
|
||||
|
||||
Begin Object Class=GUIImage Name=KFMenuLogo
|
||||
Image=FinalBlend'KillingFloorHUD.KFLogoFB'
|
||||
ImageStyle=ISTY_Scaled
|
||||
WinTop=0.012000
|
||||
WinLeft=0.008000
|
||||
WinWidth=0.620000
|
||||
WinHeight=0.300000
|
||||
RenderWeight=0.050000
|
||||
End Object
|
||||
KFLogoBit=GUIImage'HideMut.HideMainMenu.KFMenuLogo'
|
||||
|
||||
Begin Object Class=GUILabel Name=WorkshopDownloadLabel
|
||||
TextAlign=TXTA_Right
|
||||
TextColor=(B=200,G=200,R=200)
|
||||
bMultiLine=True
|
||||
FontScale=FNS_Small
|
||||
WinTop=0.050000
|
||||
WinLeft=0.600000
|
||||
WinWidth=0.390000
|
||||
WinHeight=0.150000
|
||||
RenderWeight=0.950000
|
||||
End Object
|
||||
KFWorkshopDownload=GUILabel'HideMut.HideMainMenu.WorkshopDownloadLabel'
|
||||
|
||||
Begin Object Class=BackgroundImage Name=ImgBkChar
|
||||
ImageColor=(A=160)
|
||||
ImageRenderStyle=MSTY_Alpha
|
||||
X1=0
|
||||
Y1=0
|
||||
X2=1024
|
||||
Y2=768
|
||||
RenderWeight=0.040000
|
||||
Tag=0
|
||||
End Object
|
||||
i_bkChar=BackgroundImage'HideMut.HideMainMenu.ImgBkChar'
|
||||
|
||||
Begin Object Class=BackgroundImage Name=PageBackground
|
||||
ImageStyle=ISTY_Scaled
|
||||
ImageRenderStyle=MSTY_Alpha
|
||||
X1=0
|
||||
Y1=0
|
||||
X2=1024
|
||||
Y2=768
|
||||
End Object
|
||||
i_Background=BackgroundImage'HideMut.HideMainMenu.PageBackground'
|
||||
|
||||
Begin Object Class=GUIImage Name=ImgUT2Logo
|
||||
End Object
|
||||
i_UT2Logo=GUIImage'HideMut.HideMainMenu.ImgUT2Logo'
|
||||
|
||||
Begin Object Class=GUIImage Name=iPanHuge
|
||||
End Object
|
||||
i_PanHuge=GUIImage'HideMut.HideMainMenu.iPanHuge'
|
||||
|
||||
Begin Object Class=GUIImage Name=iPanBig
|
||||
End Object
|
||||
i_PanBig=GUIImage'HideMut.HideMainMenu.iPanBig'
|
||||
|
||||
Begin Object Class=GUIImage Name=iPanSmall
|
||||
End Object
|
||||
i_PanSmall=GUIImage'HideMut.HideMainMenu.iPanSmall'
|
||||
|
||||
Begin Object Class=GUIImage Name=ImgUT2Shader
|
||||
End Object
|
||||
i_UT2Shader=GUIImage'HideMut.HideMainMenu.ImgUT2Shader'
|
||||
|
||||
Begin Object Class=GUIImage Name=ImgTV
|
||||
End Object
|
||||
i_TV=GUIImage'HideMut.HideMainMenu.ImgTV'
|
||||
|
||||
Begin Object Class=GUIButton Name=MultiplayerButton
|
||||
CaptionAlign=TXTA_Left
|
||||
CaptionEffectStyleName="TextButtonEffect"
|
||||
Caption="Multiplayer"
|
||||
StyleName="ListSelection"
|
||||
Hint="All hell breaks loose..."
|
||||
WinTop=0.290000
|
||||
WinLeft=0.050000
|
||||
WinWidth=0.200000
|
||||
WinHeight=0.035000
|
||||
TabOrder=1
|
||||
bFocusOnWatch=True
|
||||
OnClick=HideMainMenu.ButtonClick
|
||||
OnKeyEvent=MultiplayerButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_MultiPlayer=GUIButton'HideMut.HideMainMenu.MultiplayerButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=HostButton
|
||||
CaptionAlign=TXTA_Left
|
||||
CaptionEffectStyleName="TextButtonEffect"
|
||||
Caption="Host Game"
|
||||
StyleName="ListSelection"
|
||||
Hint="Start a server and invite others to join your game"
|
||||
WinTop=0.325000
|
||||
WinLeft=0.050000
|
||||
WinWidth=0.200000
|
||||
WinHeight=0.035000
|
||||
TabOrder=2
|
||||
bFocusOnWatch=True
|
||||
OnClick=HideMainMenu.ButtonClick
|
||||
OnKeyEvent=HostButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_Host=GUIButton'HideMut.HideMainMenu.HostButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=InstantActionButton
|
||||
CaptionAlign=TXTA_Left
|
||||
CaptionEffectStyleName="TextButtonEffect"
|
||||
Caption="Solo"
|
||||
StyleName="ListSelection"
|
||||
Hint="Play Killing Floor Solo Mode"
|
||||
WinTop=0.360000
|
||||
WinLeft=0.050000
|
||||
WinWidth=0.200000
|
||||
TabOrder=3
|
||||
bFocusOnWatch=True
|
||||
OnClick=HideMainMenu.ButtonClick
|
||||
OnKeyEvent=InstantActionButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_InstantAction=GUIButton'HideMut.HideMainMenu.InstantActionButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=ProfileButton
|
||||
CaptionAlign=TXTA_Left
|
||||
CaptionEffectStyleName="TextButtonEffect"
|
||||
Caption="Profile and Achievements"
|
||||
StyleName="ListSelection"
|
||||
Hint="Your profile and achievements"
|
||||
WinTop=0.420000
|
||||
WinLeft=0.050000
|
||||
WinWidth=0.220000
|
||||
TabOrder=4
|
||||
bFocusOnWatch=True
|
||||
OnDraw=HideMainMenu.CommunityDraw
|
||||
OnClick=HideMainMenu.ButtonClick
|
||||
OnKeyEvent=ModsAndDemosButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_Profile=GUIButton'HideMut.HideMainMenu.ProfileButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=JoinLHButton
|
||||
CaptionAlign=TXTA_Left
|
||||
CaptionEffectStyleName="TextButtonEffect"
|
||||
Caption="Join Local Host"
|
||||
StyleName="ListSelection"
|
||||
Hint="Joins local host server."
|
||||
WinTop=0.455000
|
||||
WinLeft=0.050000
|
||||
WinWidth=0.220000
|
||||
TabOrder=4
|
||||
bFocusOnWatch=True
|
||||
OnClick=HideMainMenu.ButtonClick
|
||||
OnKeyEvent=ModsAndDemosButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_JoinLH=GUIButton'HideMut.HideMainMenu.JoinLHButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=WorkshopButton
|
||||
CaptionAlign=TXTA_Left
|
||||
CaptionEffectStyleName="TextButtonEffect"
|
||||
Caption="Steam Workshop Content"
|
||||
StyleName="ListSelection"
|
||||
Hint="Custom Content in the Steam Workshop"
|
||||
WinTop=0.490000
|
||||
WinLeft=0.050000
|
||||
WinWidth=0.220000
|
||||
TabOrder=4
|
||||
bFocusOnWatch=True
|
||||
OnClick=HideMainMenu.ButtonClick
|
||||
OnKeyEvent=ModsAndDemosButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_Workshop=GUIButton'HideMut.HideMainMenu.WorkshopButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=SettingsButton
|
||||
CaptionAlign=TXTA_Left
|
||||
CaptionEffectStyleName="TextButtonEffect"
|
||||
Caption="Settings"
|
||||
StyleName="ListSelection"
|
||||
Hint="Change your controls and settings"
|
||||
WinTop=0.550000
|
||||
WinLeft=0.050000
|
||||
WinWidth=0.200000
|
||||
WinHeight=0.035000
|
||||
TabOrder=6
|
||||
bFocusOnWatch=True
|
||||
OnClick=HideMainMenu.ButtonClick
|
||||
OnKeyEvent=SettingsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_Settings=GUIButton'HideMut.HideMainMenu.SettingsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=QuitButton
|
||||
CaptionAlign=TXTA_Left
|
||||
CaptionEffectStyleName="TextButtonEffect"
|
||||
Caption="Exit"
|
||||
StyleName="ListSelection"
|
||||
Hint="Leave this loose game"
|
||||
WinTop=0.585000
|
||||
WinLeft=0.050000
|
||||
WinWidth=0.200000
|
||||
WinHeight=0.035000
|
||||
TabOrder=7
|
||||
bFocusOnWatch=True
|
||||
OnClick=HideMainMenu.ButtonClick
|
||||
OnKeyEvent=QuitButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_Quit=GUIButton'HideMut.HideMainMenu.QuitButton'
|
||||
|
||||
MenuSong="KFMenu"
|
||||
SteamMustBeRunningText="Steam must be running and you must have an active internet connection to access this"
|
||||
UnknownSteamErrorText="Unknown Steam error prevented access to this"
|
||||
PopInSound=Sound'PatchSounds.slide1-1'
|
||||
SlideInSound=Sound'PatchSounds.slide1-1'
|
||||
BeepSound=Sound'KFWeaponSound.bullethitmetal3'
|
||||
bRenderWorld=True
|
||||
bPersistent=True
|
||||
OnOpen=HideMainMenu.InternalOnOpen
|
||||
OnReOpen=HideMainMenu.MainReopened
|
||||
OnCanClose=HideMainMenu.CanClose
|
||||
WinTop=0.000000
|
||||
WinHeight=1.000000
|
||||
OnKeyEvent=HideMainMenu.MyKeyEvent
|
||||
}
|
||||
10
kf_sources/HideMut/Classes/HideMenuPreset.uc
Normal file
10
kf_sources/HideMut/Classes/HideMenuPreset.uc
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
class HideMenuPreset extends Object
|
||||
PerObjectConfig
|
||||
Config(HideMut);
|
||||
|
||||
var config array<string> uselessActors;
|
||||
var config string presetDescription;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
168
kf_sources/HideMut/Classes/HideMut.uc
Normal file
168
kf_sources/HideMut/Classes/HideMut.uc
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
class HideMut extends Mutator
|
||||
config(HideMut);
|
||||
|
||||
|
||||
// =============================================================
|
||||
struct FunctionRecord
|
||||
{
|
||||
var config string About, Replace, With;
|
||||
};
|
||||
var config array<FunctionRecord> List;
|
||||
|
||||
var HideMut ref_HideMut;
|
||||
|
||||
|
||||
// var newMainMenuClass class'HideMainMenu';
|
||||
|
||||
// =============================================================
|
||||
event PreBeginPlay()
|
||||
{
|
||||
super.PreBeginPlay();
|
||||
|
||||
ref_HideMut = self;
|
||||
default.ref_HideMut = self;
|
||||
|
||||
// remove some annoying messages
|
||||
class'WaitingMessage'.default.DoorMessage = "";
|
||||
class'WaitingMessage'.default.WeldedShutMessage = "";
|
||||
class'WaitingMessage'.default.ZEDTimeActiveMessage = "";
|
||||
|
||||
// CrossbuzzsawBlade sound spam fix
|
||||
class'CrossbuzzsawBlade'.default.AmbientSoundRef = "";
|
||||
class'FNFALFire'.default.AmbientFireVolume = 0;
|
||||
class'CashPickup'.default.TransientSoundVolume = 0.0;
|
||||
class'CashPickup'.default.AmbientGlow = 0;
|
||||
class'machete'.default.priority = 3;
|
||||
|
||||
// replacing vanilla functions with ours
|
||||
replace_Functions();
|
||||
replace_LobbyMenu();
|
||||
replace_MainMenu();
|
||||
|
||||
// EXPERIMENTAL!!!
|
||||
// ReplaceDefaults();
|
||||
}
|
||||
|
||||
|
||||
final private function replace_LobbyMenu()
|
||||
{
|
||||
class'KFPlayerController'.default.LobbyMenuClassString = string(class'HideLobbyMenu');
|
||||
class'KFPlayerController_Story'.default.LobbyMenuClassString = string(class'HideLobbyMenu');
|
||||
}
|
||||
|
||||
|
||||
// replace main menu with fixed one
|
||||
final private function replace_MainMenu()
|
||||
{
|
||||
local bool bChan;
|
||||
local string newmenuclass;
|
||||
local GameEngine GE;
|
||||
|
||||
// our class
|
||||
newmenuclass = string(class'HideMainMenu');
|
||||
|
||||
if (class'GameEngine'.default.MainMenuClass != newmenuclass || class'GameEngine'.default.SinglePlayerMenuClass != newmenuclass)
|
||||
{
|
||||
// change defaults
|
||||
class'GameEngine'.default.MainMenuClass = newmenuclass;
|
||||
class'GameEngine'.default.SinglePlayerMenuClass = newmenuclass;
|
||||
// strange variable, not used anywhere??
|
||||
// class'GameEngine'.default.InstantActionMenuClass = class'HideMainMenu';
|
||||
// save the config
|
||||
// class'GameEngine'.static.StaticSaveConfig();
|
||||
bChan = true;
|
||||
}
|
||||
|
||||
if (!bChan)
|
||||
return;
|
||||
|
||||
// change instanced ones
|
||||
foreach AllObjects(class'GameEngine', GE)
|
||||
{
|
||||
GE.MainMenuClass = class'GameEngine'.default.MainMenuClass;
|
||||
GE.SinglePlayerMenuClass = class'GameEngine'.default.SinglePlayerMenuClass;
|
||||
// save the config
|
||||
// GE.SaveConfig();
|
||||
}
|
||||
|
||||
// log(">>> HIDEMUT: MENU class changed to " $ newmenuclass);
|
||||
}
|
||||
|
||||
|
||||
// replace lot's of bugged functions / add our hacks
|
||||
final function replace_Functions()
|
||||
{
|
||||
local uFunction A, B;
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < List.Length; i++)
|
||||
{
|
||||
// This removes the need to declare variables for every new class we make.
|
||||
DynamicLoadObject(class.outer.name $ "." $ Left(List[i].With,InStr(List[i].With,".")), class'class',true);
|
||||
|
||||
A = class'UFunction'.static.CastFunction(FindObject(List[i].Replace, class'function'));
|
||||
B = class'UFunction'.static.CastFunction(FindObject(List[i].With, class'function'));
|
||||
|
||||
if (A == none)
|
||||
{
|
||||
log("> Failed to process " $ List[i].Replace);
|
||||
continue;
|
||||
}
|
||||
if (B == none)
|
||||
{
|
||||
log("> Failed to process " $ List[i].With);
|
||||
continue;
|
||||
}
|
||||
|
||||
A.Script = B.Script;
|
||||
log("> Processing " $ List[i].Replace $ " ----> " $ List[i].With);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// final function ReplaceDefaults()
|
||||
// {
|
||||
// local UClass a, b;
|
||||
|
||||
// a = class'UClass'.static.CastClass(FindObject("KFMod.CrossbuzzsawBlade", class'class'));
|
||||
// b = class'UClass'.static.CastClass(FindObject("HideMut.repl_proj_buzzsaw", class'class'));
|
||||
|
||||
// if (A == none)
|
||||
// {
|
||||
// log("> Failed to process " $ string(a));
|
||||
// return;
|
||||
// }
|
||||
// if (B == none)
|
||||
// {
|
||||
// log("> Failed to process " $ string(b));
|
||||
// return;
|
||||
// }
|
||||
|
||||
// a.Defaults = b.Defaults;
|
||||
// log("> Processing " $ string(a) $ " ----> " $ string(b));
|
||||
// }
|
||||
|
||||
|
||||
// get our GUIController and open our Daddy menu, which attaches HideMutInteraction and saves it from GC
|
||||
simulated function tick(float deltaTime)
|
||||
{
|
||||
local PlayerController pc;
|
||||
|
||||
pc = level.getLocalPlayerController();
|
||||
|
||||
if (pc != none)
|
||||
{
|
||||
GUIController(pc.player.guiController).openMenu(string(class'WhosYourDaddy'));
|
||||
GUIController(pc.player.guiController).closeMenu(false);
|
||||
// we don't want this running forever, we already did all the work
|
||||
disable('tick');
|
||||
destroyed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// =============================================================
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
1697
kf_sources/HideMut/Classes/HideMutInteraction.uc
Normal file
1697
kf_sources/HideMut/Classes/HideMutInteraction.uc
Normal file
File diff suppressed because it is too large
Load diff
110
kf_sources/HideMut/Classes/HideObjectPool.uc
Normal file
110
kf_sources/HideMut/Classes/HideObjectPool.uc
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
class HideObjectPool extends object;
|
||||
|
||||
|
||||
var array<Object> Objects;
|
||||
|
||||
|
||||
// AllocateObject
|
||||
simulated function Object AllocateObject(class ObjectClass)
|
||||
{
|
||||
local Object Result;
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < Objects.Length; i++)
|
||||
{
|
||||
if (Objects[i].Class == ObjectClass)
|
||||
{
|
||||
Result = Objects[i];
|
||||
Objects.Remove(i,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Result == none)
|
||||
Result = new(Outer) ObjectClass;
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
// create object with given name
|
||||
simulated function Object AllocateObjectParam(class ObjectClass, string objName)
|
||||
{
|
||||
local Object Result;
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < Objects.Length; i++)
|
||||
{
|
||||
if (Objects[i].Class == ObjectClass)
|
||||
{
|
||||
Result = Objects[i];
|
||||
Objects.Remove(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Result == none)
|
||||
{
|
||||
Result = new(outer, objName) ObjectClass;
|
||||
StoreObj(Result);
|
||||
}
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
simulated function StoreObj(object Obj)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < Objects.Length; i++)
|
||||
{
|
||||
// we already have it
|
||||
if (Obj.Class == Obj)
|
||||
{
|
||||
log(string(Obj) $ " was found in Objects array!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// else add it to array
|
||||
Objects[Objects.Length] = Obj;
|
||||
log(string(Obj) $ " was added to Objects array!");
|
||||
}
|
||||
|
||||
|
||||
// FreeObject
|
||||
simulated function FreeObject(Object Obj)
|
||||
{
|
||||
Objects.Length = Objects.Length + 1;
|
||||
Objects[Objects.Length - 1] = Obj;
|
||||
}
|
||||
|
||||
|
||||
// Shrink
|
||||
simulated function Shrink()
|
||||
{
|
||||
while (Objects.Length > 0)
|
||||
{
|
||||
// delete Objects[Objects.Length - 1];
|
||||
Objects.Remove(Objects.Length - 1, 1);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
final function string PrintObjList()
|
||||
{
|
||||
local string s;
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < Objects.Length; i++)
|
||||
{
|
||||
s $= string(Objects[i]);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
23
kf_sources/HideMut/Classes/HideShopVolume.uc
Normal file
23
kf_sources/HideMut/Classes/HideShopVolume.uc
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
class HideShopVolume extends ShopVolume;
|
||||
|
||||
/*
|
||||
simulated function postBeginPlay()
|
||||
{
|
||||
super.postBeginPlay();
|
||||
|
||||
telList[0] = spawn(class'HideTeleporter', , , location);
|
||||
bHasTeles = true;
|
||||
}
|
||||
|
||||
simulated function destroyed()
|
||||
{
|
||||
telList[0].destroyed();
|
||||
super.destroyed();
|
||||
}
|
||||
*/
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bStatic=False
|
||||
bNoDelete=False
|
||||
}
|
||||
7
kf_sources/HideMut/Classes/HideTeleporter.uc
Normal file
7
kf_sources/HideMut/Classes/HideTeleporter.uc
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class HideTeleporter extends Teleporter;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bStatic=False
|
||||
bNoDelete=False
|
||||
}
|
||||
220
kf_sources/HideMut/Classes/Hide_IngameChat.uc
Normal file
220
kf_sources/HideMut/Classes/Hide_IngameChat.uc
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
class Hide_IngameChat extends FloatingWindow;
|
||||
|
||||
|
||||
var automated GUISectionBackground sB_Main;
|
||||
var automated moEditBox eb_Send;
|
||||
var automated GUIScrollTextBox lb_Chat;
|
||||
var() int OldCMC;
|
||||
|
||||
var() editinline array<byte> CloseKey;
|
||||
|
||||
var const color TextColors[3];
|
||||
|
||||
|
||||
function InitComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
local int i;
|
||||
local PlayerController PC;
|
||||
local ExtendedConsole MyConsole;
|
||||
|
||||
super.InitComponent(MyController,MyOwner);
|
||||
|
||||
PC = PlayerOwner();
|
||||
|
||||
sb_Main.ManageComponent(lb_Chat);
|
||||
eb_Send.MyEditBox.OnKeyEvent = InternalOnKeyEvent;
|
||||
lb_Chat.MyScrollText.bNeverFocus=true;
|
||||
|
||||
MyConsole = ExtendedConsole(PC.Player.Console);
|
||||
if (MyConsole == none)
|
||||
return;
|
||||
|
||||
// delegate
|
||||
MyConsole.OnChat = HandleChat;
|
||||
|
||||
for (i = 0; i < MyConsole.ChatMessages.Length; i++)
|
||||
{
|
||||
if (!MyConsole.bTeamChatOnly || PC.PlayerReplicationInfo == none ||
|
||||
PC.PlayerReplicationInfo.Team == none || MyConsole.ChatMessages[i].Team == PC.PlayerReplicationInfo.Team.TeamIndex)
|
||||
HandleChat(MyConsole.ChatMessages[i].Message, MyConsole.ChatMessages[i].Team);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
local int i;
|
||||
local string KeyName;
|
||||
local array<string> KeyNames;
|
||||
local PlayerController PC;
|
||||
|
||||
super.Opened(Sender);
|
||||
PC = PlayerOwner();
|
||||
|
||||
CloseKey.Remove(0, CloseKey.Length);
|
||||
KeyName = PC.ConsoleCommand("BINDINGTOKEY InGameChat");
|
||||
Split(KeyName, ",", KeyNames);
|
||||
for (i = 0; i < KeyNames.Length; i++)
|
||||
CloseKey[CloseKey.Length] = byte(PC.ConsoleCommand("KEYNUMBER"@KeyNames[i]));
|
||||
|
||||
OldCMC = PC.myHud.ConsoleMessageCount;
|
||||
PC.myHUD.ConsoleMessageCount = 0;
|
||||
|
||||
// Advance the cursor position to the end of the text
|
||||
lb_Chat.MyScrollText.End();
|
||||
|
||||
FocusFirst(none);
|
||||
}
|
||||
|
||||
|
||||
function Closed(GUIComponent Sender, bool bCancelled)
|
||||
{
|
||||
super.Closed(Sender, bCancelled);
|
||||
PlayerOwner().MyHud.ConsoleMessageCount = OldCMC;
|
||||
}
|
||||
|
||||
|
||||
function HandleChat(string Msg, int TeamIndex)
|
||||
{
|
||||
local int i;
|
||||
local string str;
|
||||
|
||||
// normalize the text before any modification
|
||||
// Msg = class'o_Utility'.static.StripColorStatic(Msg);
|
||||
|
||||
// add word filtering
|
||||
if (class'Settings'.static.bIsWordBanned(Msg))
|
||||
return;
|
||||
|
||||
// convert cyrilic into barbaric
|
||||
Msg = class'o_CyrillicEncodeUtilities'.static.EnCodeStringHide(Msg);
|
||||
|
||||
i = InStr(Msg, ":");
|
||||
|
||||
if (TeamIndex < 2 && i != -1)
|
||||
str = nMakeColorCode(TextColors[TeamIndex]) $ Left(Msg, i) $ nMakeColorCode(TextColors[2]) $ ":" $ Mid(Msg, i+1);
|
||||
else
|
||||
str = nMakeColorCode(TextColors[2]) $ Msg;
|
||||
|
||||
lb_chat.AddText(str);
|
||||
}
|
||||
|
||||
|
||||
function string nMakeColorCode(color c)
|
||||
{
|
||||
return class'GameInfo'.static.MakeColorCode(c);
|
||||
}
|
||||
|
||||
|
||||
function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
|
||||
{
|
||||
local string cmd;
|
||||
local int i;
|
||||
|
||||
if (state == 1)
|
||||
{
|
||||
for (i = 0; i < CloseKey.Length; i++)
|
||||
{
|
||||
if (Key == CloseKey[i])
|
||||
{
|
||||
Controller.CloseMenu(false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state == 3)
|
||||
{
|
||||
if (Key == 0x0D)
|
||||
{
|
||||
cmd = eb_Send.GetText();
|
||||
if (cmd == "")
|
||||
return true;
|
||||
|
||||
if (Left(cmd, 1) == "/")
|
||||
cmd = Mid(cmd,1);
|
||||
else if (Left(cmd,1) == ".")
|
||||
cmd = "teamsay" @ Mid(cmd, 1);
|
||||
else
|
||||
cmd = "say" @ cmd;
|
||||
|
||||
PlayerOwner().ConsoleCommand(cmd);
|
||||
eb_Send.SetText("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return eb_Send.MyEditBox.InternalOnKeyEvent(key, state, delta);
|
||||
}
|
||||
|
||||
|
||||
function InternalOnCreateComponent(GUIComponent NewComp, GUIComponent Sender)
|
||||
{
|
||||
if (NewComp != eb_Send)
|
||||
NewComp.bNeverFocus = true;
|
||||
|
||||
super.InternalOnCreateComponent(NewComp, Sender);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=AltSectionBackground Name=sbMain
|
||||
bFillClient=True
|
||||
LeftPadding=0.000000
|
||||
RightPadding=0.000000
|
||||
TopPadding=0.000000
|
||||
BottomPadding=0.000000
|
||||
WinHeight=1.000000
|
||||
bBoundToParent=True
|
||||
bScaleToParent=True
|
||||
bNeverFocus=True
|
||||
OnPreDraw=sbMain.InternalPreDraw
|
||||
End Object
|
||||
sb_Main=AltSectionBackground'HideMut.Hide_IngameChat.sbMain'
|
||||
|
||||
Begin Object Class=moEditBox Name=ebSend
|
||||
CaptionWidth=0.100000
|
||||
Caption="Say: "
|
||||
OnCreateComponent=ebSend.InternalOnCreateComponent
|
||||
Hint="Prefix a message with a dot (.) to send a team message or a slash (/) to send a command."
|
||||
WinTop=0.943855
|
||||
WinLeft=0.099584
|
||||
WinWidth=0.818909
|
||||
WinHeight=0.035416
|
||||
TabOrder=0
|
||||
bBoundToParent=True
|
||||
bScaleToParent=True
|
||||
End Object
|
||||
eb_Send=moEditBox'HideMut.Hide_IngameChat.ebSend'
|
||||
|
||||
Begin Object Class=GUIScrollTextBox Name=lbChat
|
||||
bNoTeletype=True
|
||||
CharDelay=0.002500
|
||||
EOLDelay=0.000000
|
||||
OnCreateComponent=lbChat.InternalOnCreateComponent
|
||||
FontScale=FNS_Small
|
||||
WinTop=0.441667
|
||||
WinHeight=0.558333
|
||||
bBoundToParent=True
|
||||
bScaleToParent=True
|
||||
bNeverFocus=True
|
||||
End Object
|
||||
lb_Chat=GUIScrollTextBox'HideMut.Hide_IngameChat.lbChat'
|
||||
|
||||
TextColors(0)=(B=50,G=50,R=200,A=255)
|
||||
TextColors(1)=(B=200,G=100,R=50,A=255)
|
||||
TextColors(2)=(B=255,G=255,R=255)
|
||||
WindowName="Fancy Chat"
|
||||
bResizeWidthAllowed=False
|
||||
bResizeHeightAllowed=False
|
||||
DefaultLeft=0.110313
|
||||
DefaultTop=0.057916
|
||||
DefaultWidth=0.779688
|
||||
DefaultHeight=0.847083
|
||||
bPersistent=True
|
||||
bAllowedAsLast=True
|
||||
WinTop=0.057916
|
||||
WinLeft=0.110313
|
||||
WinWidth=0.779688
|
||||
WinHeight=0.847083
|
||||
}
|
||||
53
kf_sources/HideMut/Classes/KFBurnEffect_FPS.uc
Normal file
53
kf_sources/HideMut/Classes/KFBurnEffect_FPS.uc
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
// Fuk u SCHENDZEIK <3
|
||||
// Alt burn effect for low gore, same as twi BurnEffect, however fully static lighting, no lights on dynamic actors
|
||||
// Particles set to 4
|
||||
class KFBurnEffect_FPS extends Emitter;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=SpriteEmitter Name=SpriteEmitter2
|
||||
FadeOut=True
|
||||
FadeIn=True
|
||||
SpinParticles=True
|
||||
UseSizeScale=True
|
||||
UseRegularSizeScale=False
|
||||
UniformSize=True
|
||||
UseRandomSubdivision=True
|
||||
Acceleration=(Z=100.000000)
|
||||
ColorScale(1)=(RelativeTime=0.300000,Color=(B=255,G=255,R=255))
|
||||
ColorScale(2)=(RelativeTime=0.667857,Color=(B=89,G=172,R=247,A=255))
|
||||
ColorScale(3)=(RelativeTime=1.000000,Color=(B=128,G=128,R=128,A=255))
|
||||
ColorScale(4)=(RelativeTime=1.000000)
|
||||
ColorScale(5)=(RelativeTime=1.000000)
|
||||
FadeOutStartTime=0.520000
|
||||
FadeInEndTime=0.140000
|
||||
MaxParticles=4
|
||||
StartLocationShape=PTLS_Sphere
|
||||
SpinsPerSecondRange=(X=(Max=0.075000))
|
||||
StartSpinRange=(X=(Min=-0.500000,Max=0.500000))
|
||||
SizeScale(0)=(RelativeTime=1.000000,RelativeSize=0.500000)
|
||||
StartSizeRange=(X=(Min=15.000000,Max=28.000000),Y=(Min=0.000000,Max=0.000000),Z=(Min=0.000000,Max=0.000000))
|
||||
ScaleSizeByVelocityMultiplier=(X=0.000000,Y=0.000000,Z=0.000000)
|
||||
ScaleSizeByVelocityMax=0.000000
|
||||
Texture=Texture'KillingFloorTextures.LondonCommon.fire3'
|
||||
TextureUSubdivisions=4
|
||||
TextureVSubdivisions=4
|
||||
SecondsBeforeInactive=30.000000
|
||||
LifetimeRange=(Min=1.000000,Max=1.000000)
|
||||
StartVelocityRange=(X=(Min=-10.000000,Max=10.000000),Y=(Min=-10.000000,Max=10.000000),Z=(Min=10.000000,Max=50.000000))
|
||||
End Object
|
||||
Emitters(0)=SpriteEmitter'HideMut.KFBurnEffect_FPS.SpriteEmitter2'
|
||||
|
||||
LightType=LT_Steady
|
||||
LightHue=30
|
||||
LightSaturation=100
|
||||
LightBrightness=300.000000
|
||||
LightRadius=4.000000
|
||||
bSpecialLit=True
|
||||
bNoDelete=False
|
||||
bOnlyDrawIfAttached=True
|
||||
AmbientSound=Sound'KF_FlamethrowerSnd.SetFire.FT_SetFire_Self'
|
||||
bFullVolume=True
|
||||
SoundVolume=255
|
||||
bNotOnDedServer=False
|
||||
}
|
||||
46
kf_sources/HideMut/Classes/Settings.uc
Normal file
46
kf_sources/HideMut/Classes/Settings.uc
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
// a good place to store our 'global' variables
|
||||
class Settings extends object
|
||||
config(HideMut);
|
||||
|
||||
|
||||
// =============================================================================
|
||||
var config bool bRemoveSmoke; // remove smoke effects from most explosions
|
||||
var config bool bHideZedFlames; // remove burning effects from zeds
|
||||
var config bool bHideFlamethrowerEffects; // remove flamethrower bullshit
|
||||
var config bool bHideZedTimeSounds; // remove zed time notification sounds
|
||||
var config bool bHidePortraits; // remove player portraits from HUD when they chat
|
||||
var config bool bHideNoPRImessages; // remove messages from HUD when they have no player replication info
|
||||
var config bool bRandomName; // sets random name from your config collection
|
||||
var config bool bShowStalkers; // reveals stalkers
|
||||
var config bool bRemoveBlur; // remove all blur effects
|
||||
var config bool bRemoveAmbientShake; // remove ambient shake effects
|
||||
var config bool bRemoveWeaponShakeView; // remove weapon shaking
|
||||
var config bool bRemoveShakeView; // remove shake view effects
|
||||
var config bool bDeduceAdvancedInfo; // auto show stat net and fps
|
||||
var config bool bRemoveOverlays; // remove some bullshit TWI overlays
|
||||
var config bool bRemoveShitAnimations; // disable zapped / burning animations for zeds
|
||||
|
||||
var config array<string> BannedWords; // spam protection
|
||||
|
||||
// =============================================================================
|
||||
|
||||
// maybe don't normalize (caps) text for comparison?
|
||||
final static function bool bIsWordBanned(string Msg)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < default.BannedWords.length; i++)
|
||||
{
|
||||
if (InStr(caps(Msg), caps(default.BannedWords[i])) != -1)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// =============================================================================
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
57
kf_sources/HideMut/Classes/WhosYourDaddy.uc
Normal file
57
kf_sources/HideMut/Classes/WhosYourDaddy.uc
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
class WhosYourDaddy extends UT2K4InGameChat;
|
||||
|
||||
|
||||
// if store interaction in this variable, so garbage collector won't delete it
|
||||
var HideMutInteraction hmi;
|
||||
// TO TEST actors
|
||||
|
||||
function bool notifyLevelChange()
|
||||
{
|
||||
MLGizeTheGame();
|
||||
// hmi.notifyLevelChange();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
event opened(GUIComponent sender)
|
||||
{
|
||||
MLGizeTheGame();
|
||||
super.opened(sender);
|
||||
}
|
||||
|
||||
|
||||
function MLGizeTheGame()
|
||||
{
|
||||
local player p;
|
||||
local int i;
|
||||
|
||||
p = controller.viewportOwner;
|
||||
|
||||
// in case interaction is active (i.e. you opened InGameChat during the game)
|
||||
for (i = 0; i < p.localInteractions.length; i++)
|
||||
if (p.localInteractions[i].class == dynamicLoadObject(string(class'HideMutInteraction'), class'Class', true))
|
||||
return;
|
||||
|
||||
// interaction is not active, but exists (level changing)
|
||||
if (hmi != none)
|
||||
{
|
||||
//make it active again
|
||||
p.localInteractions.length = p.localInteractions.length + 1;
|
||||
p.localInteractions[p.LocalInteractions.Length - 1] = hmi;
|
||||
hmi.viewportOwner = p;
|
||||
return;
|
||||
}
|
||||
|
||||
// this is the first time this menu opened
|
||||
// create interaction and add it to this menu, so it won't be deleted
|
||||
p.interactionMaster.addInteraction(string(class'HideMutInteraction'), p);
|
||||
|
||||
forEach AllObjects(class'HideMutInteraction', hmi)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
52
kf_sources/HideMut/Classes/a_ActorBase.uc
Normal file
52
kf_sources/HideMut/Classes/a_ActorBase.uc
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
class a_ActorBase extends Actor;
|
||||
|
||||
//=============================================================================
|
||||
// woah, we are making our first linked list
|
||||
// var a_ActorManager Next;
|
||||
|
||||
|
||||
//=============================================================================
|
||||
function Termination()
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
|
||||
// add a new actor at the end of the list
|
||||
// final function element_Add(a_ActorManager a)
|
||||
// {
|
||||
// if (Next == none)
|
||||
// Next = a;
|
||||
// else
|
||||
// Next.element_Add(a);
|
||||
// }
|
||||
|
||||
|
||||
// in the SomeImportantActor class
|
||||
// Function RemoveElement(ListElement Element)
|
||||
// {
|
||||
// Local ListElement List;
|
||||
// If (Element==FirstElement)
|
||||
// FirstElement=Element.Next;
|
||||
// Else
|
||||
// For (List=FirstElement;List!=none;List=List.Next)
|
||||
// If (List.Next==Element)
|
||||
// {
|
||||
// List.Next=Element.Next;
|
||||
// Break;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// self cleanup
|
||||
// event Destroyed()
|
||||
// {
|
||||
// super.Destroyed();
|
||||
// }
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DrawType=DT_None
|
||||
}
|
||||
36
kf_sources/HideMut/Classes/a_CashTosser.uc
Normal file
36
kf_sources/HideMut/Classes/a_CashTosser.uc
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
class a_CashTosser extends a_ActorBase;
|
||||
|
||||
|
||||
var KFPlayerController pc;
|
||||
|
||||
|
||||
function startTossCash(KFPlayerController inPc)
|
||||
{
|
||||
pc = inPc;
|
||||
setTimer(0.01, true); //0.01
|
||||
}
|
||||
|
||||
|
||||
function stopTossCash()
|
||||
{
|
||||
setTimer(0.0, false);
|
||||
}
|
||||
|
||||
|
||||
function timer()
|
||||
{
|
||||
if (KFPawn(pc.pawn) != none)
|
||||
KFPawn(pc.pawn).tossCash(1);
|
||||
}
|
||||
|
||||
|
||||
// self cleanup
|
||||
function Termination()
|
||||
{
|
||||
pc = none;
|
||||
super.Termination();
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
41
kf_sources/HideMut/Classes/a_DebugActor.uc
Normal file
41
kf_sources/HideMut/Classes/a_DebugActor.uc
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
class a_DebugActor extends a_ActorBase;
|
||||
|
||||
|
||||
// var KFPlayerController pc;
|
||||
var HideMutInteraction hmi;
|
||||
var int counter;
|
||||
|
||||
|
||||
// function startSpam(KFPlayerController inPc)
|
||||
function startSpam()
|
||||
{
|
||||
// pc = inPc;
|
||||
setTimer(0.001, true);
|
||||
}
|
||||
|
||||
|
||||
function timer()
|
||||
{
|
||||
counter++;
|
||||
hmi.buyAmmo();
|
||||
hmi.buyKevlar();
|
||||
hmi.buyHP();
|
||||
|
||||
if (counter > 1000)
|
||||
{
|
||||
setTimer(0.00, false);
|
||||
Termination();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// self cleanup
|
||||
function Termination()
|
||||
{
|
||||
hmi = none;
|
||||
super.Termination();
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
164
kf_sources/HideMut/Classes/a_MapOptimizer.uc
Normal file
164
kf_sources/HideMut/Classes/a_MapOptimizer.uc
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
class a_MapOptimizer extends a_ActorBase
|
||||
config(HideMut);
|
||||
|
||||
struct MyZone
|
||||
{
|
||||
var int ZoneKey; //zone key
|
||||
var string ZoneName; //Zone name
|
||||
var array<Vector> VectorsCoord; //Coordinates of zone borders. Drawing from 0 to 1, 1 to 2 and etc.
|
||||
var float MinX, MinY, MaxX, MaxY; //Minimal coords for setting zoned actors
|
||||
var array<int> PortalActorsRefs; //Actors that are visible through "portal" aka hole between neighbouring zones. Neighbouring zones may have same set of this
|
||||
var array<int> DecorativeActorsRefs; //Decorative stuff between zones
|
||||
var bool IgnoreXAxis; //Ignore this axis when setting active zone
|
||||
var bool IgnoreYAxis;
|
||||
var bool IgnoreZAxis;
|
||||
var bool HideDecorativeActors;
|
||||
var bool HidePortalActors;
|
||||
};
|
||||
var config array<MyZone> MyZones;
|
||||
|
||||
struct MyZonedMap
|
||||
{
|
||||
//Struct for map zoning
|
||||
var string MapName;
|
||||
var array<int> MyZoneRef; //reference to my zone structure
|
||||
};
|
||||
var config array<MyZonedMap> ZonedMaps;
|
||||
|
||||
struct ZonedStaticMeshes
|
||||
{
|
||||
var int ZoneRef;
|
||||
var array<StaticMeshActor> SMA;
|
||||
};
|
||||
var array<ZonedStaticMeshes> ZonedSMA;
|
||||
|
||||
var PlayerController PC;
|
||||
var int ActiveZonedMap;
|
||||
var int ActiveZone, PrevActiveZone;
|
||||
var int i, k;
|
||||
|
||||
simulated function StartMapOptimizer()
|
||||
{
|
||||
local StaticMeshActor SMA;
|
||||
|
||||
PC = Level.GetLocalPlayerController();
|
||||
if(ZonedMaps.length == 0 || MyZones.length == 0 || PC == none || PC.Pawn == none)
|
||||
return;
|
||||
|
||||
ActiveZonedMap = -1;
|
||||
for(i=0; i<ZonedMaps.length;i++) //Let's find map profile
|
||||
{
|
||||
if(PC.Level.GetURLMap() ~= ZonedMaps[i].MapName);
|
||||
ActiveZonedMap = i; //and save it
|
||||
}
|
||||
|
||||
if(ActiveZonedMap == -1) //no profiles for this map
|
||||
return;
|
||||
|
||||
for(i=0;i<ZonedMaps[ActiveZonedMap].MyZoneRef.length;i++) //Let's cache static meshes
|
||||
{
|
||||
ZonedSMA.length = ZonedSMA.length + 1;
|
||||
ZonedSMA[ZonedSMA.length-1].ZoneRef = ZonedMaps[ActiveZonedMap].MyZoneRef[i];
|
||||
|
||||
ForEach PC.AllActors(class'StaticMeshActor', SMA)
|
||||
{
|
||||
if(Sma.bHidden)
|
||||
continue;
|
||||
if((SMA.Location.X <= MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MaxX && SMA.Location.Y <= MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MaxY)
|
||||
&& (SMA.Location.X >= MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MinX && SMA.Location.Y >= MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MinY))
|
||||
{
|
||||
ZonedSMA[ZonedSMA.length-1].SMA.length = ZonedSMA[ZonedSMA.length-1].SMA.length + 1;
|
||||
ZonedSMA[ZonedSMA.length-1].SMA[ZonedSMA[ZonedSMA.length-1].SMA.length-1] = SMA;
|
||||
SMA.bHidden = true;
|
||||
SMA.ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
}
|
||||
Enable('Tick');
|
||||
}
|
||||
|
||||
simulated function StopMapOptimizer()
|
||||
{
|
||||
Disable('Tick');
|
||||
for(i=0; i<ZonedSMA.length; i++)
|
||||
{
|
||||
for(k=0;k<ZonedSMA[i].SMA.length;k++) //show our hided static meshes
|
||||
{
|
||||
ZonedSMA[i].SMA[k].bHidden=false;
|
||||
ZonedSMA[i].SMA[k].ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
ZonedSMA.length = 0;
|
||||
}
|
||||
|
||||
function Timer(){}
|
||||
|
||||
simulated function Tick(float Delta)
|
||||
{
|
||||
if(PC.Pawn == none) //No pawn no optimizer
|
||||
StopMapOptimizer();
|
||||
|
||||
ActiveZone = -1;
|
||||
for(i=0;i<ZonedMaps[ActiveZonedMap].MyZoneRef.length;i++) //Let's find our active zone == where are we now?
|
||||
{
|
||||
if(PC.Pawn.Location.X > MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MinX && PC.Pawn.Location.Y > MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MinY)
|
||||
{
|
||||
if(PC.Pawn.Location.X < MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MaxX && PC.Pawn.Location.Y < MyZones[ZonedMaps[ActiveZonedMap].MyZoneRef[i]].MaxY)
|
||||
{
|
||||
ActiveZone = ZonedMaps[ActiveZonedMap].MyZoneRef[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(ActiveZone == -1 || ZonedSMA.length == 0) //No active zones - seems like we are out of rectangle borders
|
||||
return;
|
||||
|
||||
for(i=0; i<ZonedSMA.length; i++)
|
||||
{
|
||||
if(ZonedSMA[i].ZoneRef == ActiveZone) //Let's show our static meshes that situated in our active zone
|
||||
{
|
||||
if(ZonedSMA[i].SMA[0]!=none && !ZonedSMA[i].SMA[0].bHidden)
|
||||
continue;
|
||||
|
||||
For(k=0;k<ZonedSMA[i].SMA.length;k++)
|
||||
{
|
||||
if(ZonedSMA[i].SMA[k] != none)
|
||||
{
|
||||
ZonedSMA[i].SMA[k].bHidden=false;
|
||||
ZonedSMA[i].SMA[k].ResetStaticFilterState();
|
||||
}
|
||||
else
|
||||
{
|
||||
ZonedSMA[i].SMA.Remove(k,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else //hide statics that was in previous active zone
|
||||
{
|
||||
if(!ZonedSMA[i].SMA[0].bHidden)
|
||||
{
|
||||
For(k=0;k<ZonedSMA[i].SMA.length;k++)
|
||||
{
|
||||
ZonedSMA[i].SMA[k].bHidden=true;
|
||||
ZonedSMA[i].SMA[k].ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// self cleanup
|
||||
function Termination()
|
||||
{
|
||||
pc = none;
|
||||
ZonedSMA.length = 0;
|
||||
super.Termination();
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bUnlit=True
|
||||
}
|
||||
1388
kf_sources/HideMut/Classes/a_MonsterOptimizer.uc
Normal file
1388
kf_sources/HideMut/Classes/a_MonsterOptimizer.uc
Normal file
File diff suppressed because it is too large
Load diff
41
kf_sources/HideMut/Classes/a_SpectateManager.uc
Normal file
41
kf_sources/HideMut/Classes/a_SpectateManager.uc
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
class a_SpectateManager extends a_ActorBase;
|
||||
|
||||
var KFPlayerController PC;
|
||||
var bool isSpectator;
|
||||
|
||||
|
||||
function friendlyShoot(KFPlayerController inPC, float timerTime)
|
||||
{
|
||||
PC = inPC;
|
||||
KFHumanPawn(PC.pawn).weapon.serverStartFire(0);
|
||||
SetTimer(timerTime, true);
|
||||
}
|
||||
|
||||
|
||||
function Timer()
|
||||
{
|
||||
if(!isSpectator)
|
||||
{
|
||||
PC.BecomeSpectator();
|
||||
isSpectator = true;
|
||||
SetTimer(0.10, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
PC.BecomeActivePlayer();
|
||||
SetTimer(0.00, false);
|
||||
Destroyed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// self cleanup
|
||||
function Termination()
|
||||
{
|
||||
pc = none;
|
||||
super.Termination();
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
1785
kf_sources/HideMut/Classes/a_VisibilityHandler.uc
Normal file
1785
kf_sources/HideMut/Classes/a_VisibilityHandler.uc
Normal file
File diff suppressed because it is too large
Load diff
564
kf_sources/HideMut/Classes/a_WeaponManager.uc
Normal file
564
kf_sources/HideMut/Classes/a_WeaponManager.uc
Normal file
|
|
@ -0,0 +1,564 @@
|
|||
class a_WeaponManager extends a_ActorBase
|
||||
config(HideMutWeapons);
|
||||
|
||||
// when exit save weapon list as "CurrentWeaponList"
|
||||
|
||||
// clean me on destroy!!!
|
||||
var() KFPlayerController kfpc;
|
||||
var() HideMutInteraction interaction;
|
||||
|
||||
var() config bool bUseVanillaManagement;
|
||||
var() config bool bFastWeaponChanging;
|
||||
|
||||
// server preset basic support
|
||||
struct serverPreset
|
||||
{
|
||||
var string gameMode;
|
||||
var string weaponPreset;
|
||||
var string serverName;
|
||||
var bool bUseVanillaManagement;
|
||||
};
|
||||
var() config array<serverPreset> serverPresets;
|
||||
|
||||
var() array<string> weaponGroup1;
|
||||
var() array<string> weaponGroup2;
|
||||
var() array<string> weaponGroup3;
|
||||
var() array<string> weaponGroup4;
|
||||
var() array<string> weaponGroup5;
|
||||
var() array<string> weaponGroup6;
|
||||
var() array<string> weaponGroup7;
|
||||
var() array<string> weaponGroup8;
|
||||
var() array<string> weaponGroup9;
|
||||
var() array<string> allUsedWeapons;
|
||||
|
||||
|
||||
// self cleanup, coz simple Destroy aint enough
|
||||
function Termination()
|
||||
{
|
||||
// remove all refs
|
||||
kfpc = none;
|
||||
interaction = none;
|
||||
clearAllGroups();
|
||||
|
||||
super.Termination();
|
||||
}
|
||||
|
||||
|
||||
event postBeginPlay()
|
||||
{
|
||||
super.postBeginPlay();
|
||||
|
||||
forEach allObjects(class'HideMutInteraction', interaction)
|
||||
break;
|
||||
|
||||
loadWeaponList("CurrentWeaponList");
|
||||
|
||||
if (serverPresets.length > 0)
|
||||
checkGameType();
|
||||
}
|
||||
|
||||
|
||||
final protected function checkGameType()
|
||||
{
|
||||
local GameReplicationInfo tempGri;
|
||||
local int i;
|
||||
local bool highestPriority;
|
||||
local bool newBUseVanillaManagement;
|
||||
local bool bFoundMatchingPreset;
|
||||
local string newPreset;
|
||||
|
||||
foreach allActors(class'GameReplicationInfo', tempGri)
|
||||
{
|
||||
for (i = 0; i < serverPresets.length; i++)
|
||||
{
|
||||
if (tempGri.gameClass == serverPresets[i].gameMode)
|
||||
{
|
||||
// if server name is defined, this preset has higher priority (highestPriority = true)
|
||||
if (serverPresets[i].serverName != "")
|
||||
{
|
||||
if (inStr(caps(tempGri.serverName), caps(serverPresets[i].serverName)) != -1)
|
||||
{
|
||||
newBUseVanillaManagement = serverPresets[i].bUseVanillaManagement;
|
||||
|
||||
if (serverPresets[i].weaponPreset != "")
|
||||
newPreset = serverPresets[i].weaponPreset;
|
||||
|
||||
highestPriority = true;
|
||||
bFoundMatchingPreset = true;
|
||||
}
|
||||
}
|
||||
// if we found preset matching gameType and server name, we should skip presets without server name
|
||||
else if (!highestPriority)
|
||||
{
|
||||
newBUseVanillaManagement = serverPresets[i].bUseVanillaManagement;
|
||||
|
||||
if (serverPresets[i].weaponPreset != "")
|
||||
newPreset = serverPresets[i].weaponPreset;
|
||||
|
||||
bFoundMatchingPreset = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bFoundMatchingPreset)
|
||||
{
|
||||
bUseVanillaManagement = newBUseVanillaManagement;
|
||||
if (newPreset != "")
|
||||
loadWeaponList(newPreset);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function saveWeaponList(string listName)
|
||||
{
|
||||
local list_WeaponManager new_WeaponList;
|
||||
|
||||
new_WeaponList = new(none, listName) class'list_WeaponManager';
|
||||
new_WeaponList.clearConfig();
|
||||
|
||||
new_WeaponList.weaponGroup1 = weaponGroup1;
|
||||
new_WeaponList.weaponGroup2 = weaponGroup2;
|
||||
new_WeaponList.weaponGroup3 = weaponGroup3;
|
||||
new_WeaponList.weaponGroup4 = weaponGroup4;
|
||||
new_WeaponList.weaponGroup5 = weaponGroup5;
|
||||
new_WeaponList.weaponGroup6 = weaponGroup6;
|
||||
new_WeaponList.weaponGroup7 = weaponGroup7;
|
||||
new_WeaponList.weaponGroup8 = weaponGroup8;
|
||||
|
||||
new_WeaponList.saveConfig();
|
||||
}
|
||||
|
||||
|
||||
simulated function loadWeaponList(string listName)
|
||||
{
|
||||
local list_WeaponManager new_WeaponList;
|
||||
|
||||
clearAllGroups();
|
||||
|
||||
new_WeaponList = new(none, listName) class'list_WeaponManager';
|
||||
|
||||
weaponGroup1 = new_WeaponList.weaponGroup1;
|
||||
weaponGroup2 = new_WeaponList.weaponGroup2;
|
||||
weaponGroup3 = new_WeaponList.weaponGroup3;
|
||||
weaponGroup4 = new_WeaponList.weaponGroup4;
|
||||
weaponGroup5 = new_WeaponList.weaponGroup5;
|
||||
weaponGroup6 = new_WeaponList.weaponGroup6;
|
||||
weaponGroup7 = new_WeaponList.weaponGroup7;
|
||||
weaponGroup8 = new_WeaponList.weaponGroup8;
|
||||
updateUnusedWeapons();
|
||||
}
|
||||
|
||||
|
||||
simulated function deleteWeaponList(string listName)
|
||||
{
|
||||
local list_WeaponManager new_WeaponList;
|
||||
|
||||
new_WeaponList = new(none, listName) class'list_WeaponManager';
|
||||
|
||||
new_WeaponList.clearConfig();
|
||||
}
|
||||
|
||||
|
||||
final function hide_getWeapon(byte groupNumber)
|
||||
{
|
||||
local Inventory inv;
|
||||
local int i, currentWeapon;
|
||||
local array<string> loc_weaponGroup;
|
||||
|
||||
if (kfpc.pawn == none || kfpc.pawn.inventory == none)
|
||||
return;
|
||||
|
||||
switch (groupNumber)
|
||||
{
|
||||
case 1:
|
||||
loc_weaponGroup = weaponGroup1;
|
||||
break;
|
||||
case 2:
|
||||
loc_weaponGroup = weaponGroup2;
|
||||
break;
|
||||
case 3:
|
||||
loc_weaponGroup = weaponGroup3;
|
||||
break;
|
||||
case 4:
|
||||
loc_weaponGroup = weaponGroup4;
|
||||
break;
|
||||
case 5:
|
||||
loc_weaponGroup = weaponGroup5;
|
||||
break;
|
||||
case 6:
|
||||
loc_weaponGroup = weaponGroup6;
|
||||
break;
|
||||
case 7:
|
||||
loc_weaponGroup = weaponGroup7;
|
||||
break;
|
||||
case 8:
|
||||
loc_weaponGroup = weaponGroup8;
|
||||
break;
|
||||
case 9:
|
||||
loc_weaponGroup = weaponGroup9;
|
||||
break;
|
||||
// fallback
|
||||
default:
|
||||
loc_weaponGroup = weaponGroup1;
|
||||
}
|
||||
|
||||
if (loc_weaponGroup.length == 0)
|
||||
return;
|
||||
|
||||
currentWeapon = -1;
|
||||
|
||||
for (i = 0; i < loc_weaponGroup.length; i++)
|
||||
{
|
||||
if (string(kfpc.pawn.weapon.class) ~= loc_weaponGroup[i])
|
||||
{
|
||||
currentWeapon = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentWeapon < loc_weaponGroup.length - 1)
|
||||
{
|
||||
for (i = currentWeapon + 1; i < loc_weaponGroup.length; i++)
|
||||
{
|
||||
for (inv = kfpc.pawn.inventory; inv != none; inv = inv.inventory)
|
||||
{
|
||||
if (string(inv.class) ~= loc_weaponGroup[i])
|
||||
{
|
||||
kfpc.pawn.pendingWeapon = Weapon(inv);
|
||||
if (bFastWeaponChanging)
|
||||
kfpc.pawn.changedWeapon();
|
||||
else
|
||||
kfpc.pawn.weapon.putDown();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < currentWeapon; i++)
|
||||
{
|
||||
for (inv = kfpc.pawn.inventory; inv != none; inv = inv.inventory)
|
||||
{
|
||||
if (string(inv.class) ~= loc_weaponGroup[i])
|
||||
{
|
||||
kfpc.pawn.pendingWeapon = Weapon(inv);
|
||||
if(bFastWeaponChanging)
|
||||
kfpc.pawn.changedWeapon();
|
||||
else
|
||||
kfpc.pawn.weapon.putDown();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// quickest way to self heal
|
||||
simulated function reallyQuickHeal()
|
||||
{
|
||||
local Inventory inv;
|
||||
local Weapon oldWeapon;
|
||||
|
||||
if (kfpc == none || kfpc.pawn == none || kfpc.pawn.inventory == none)
|
||||
return;
|
||||
|
||||
for (inv = kfpc.pawn.inventory; inv != none; inv = inv.inventory)
|
||||
{
|
||||
if (ClassIsChildOf(inv.class, class'Syringe'))
|
||||
{
|
||||
oldWeapon = kfpc.pawn.weapon;
|
||||
kfpc.pawn.pendingWeapon = Weapon(inv);
|
||||
kfpc.pawn.changedWeapon();
|
||||
// Syringe(kfpc.pawn.weapon).HackClientStartFire();
|
||||
Syringe(kfpc.pawn.weapon).serverStartFire(1);
|
||||
kfpc.pawn.pendingWeapon = oldWeapon;
|
||||
// kfpc.pawn.changedWeapon();
|
||||
kfpc.pawn.weapon.putDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function fullReset()
|
||||
{
|
||||
local KFLevelRules kflr;
|
||||
|
||||
clearAllGroups();
|
||||
|
||||
foreach kfpc.dynamicActors(class'KFLevelRules', kflr)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (kflr == none)
|
||||
{
|
||||
kfpc.clientMessage("Can't access KFLevelRules. You are probably not in game.");
|
||||
return;
|
||||
}
|
||||
|
||||
parseItemForSale(kflr.mediItemForSale);
|
||||
parseItemForSale(kflr.suppItemForSale);
|
||||
parseItemForSale(kflr.shrpItemForSale);
|
||||
parseItemForSale(kflr.commItemForSale);
|
||||
parseItemForSale(kflr.bersItemForSale);
|
||||
parseItemForSale(kflr.fireItemForSale);
|
||||
parseItemForSale(kflr.demoItemForSale);
|
||||
parseItemForSale(kflr.neutItemForSale);
|
||||
// hardcode big nono
|
||||
weaponGroup5[weaponGroup5.length] = "KFmod.Syringe";
|
||||
weaponGroup5[weaponGroup5.length] = "KFmod.Welder";
|
||||
updateUnusedWeapons();
|
||||
|
||||
prioritySortGroup(weaponGroup1);
|
||||
prioritySortGroup(weaponGroup2);
|
||||
prioritySortGroup(weaponGroup3);
|
||||
prioritySortGroup(weaponGroup4);
|
||||
}
|
||||
|
||||
|
||||
simulated function basicCleaning()
|
||||
{
|
||||
local Inventory inv;
|
||||
local array<class<Pickup> > inventoryWeapons;
|
||||
|
||||
clearAllGroups();
|
||||
|
||||
if (kfpc.pawn.inventory == none)
|
||||
{
|
||||
kfpc.clientMessage("This function requires you inventory.(Needs Pawn)");
|
||||
return;
|
||||
}
|
||||
|
||||
for (inv = kfpc.pawn.inventory; inv != none; inv = inv.inventory)
|
||||
{
|
||||
if (KFWeapon(inv) != none)
|
||||
{
|
||||
inventoryWeapons[inventoryWeapons.length] = KFWeapon(inv).pickupClass;
|
||||
}
|
||||
}
|
||||
|
||||
parseItemForSale(inventoryWeapons);
|
||||
updateUnusedWeapons();
|
||||
}
|
||||
|
||||
|
||||
simulated function fullCleaning()
|
||||
{
|
||||
clearAllGroups();
|
||||
updateUnusedWeapons();
|
||||
}
|
||||
|
||||
|
||||
// part of fullReset()
|
||||
simulated function parseItemForSale(array<class<Pickup> > itemForSale)
|
||||
{
|
||||
local int i;
|
||||
local class<KFWeapon> tempKFWeapon;
|
||||
|
||||
for (i = 0; i < itemForSale.length; i++)
|
||||
{
|
||||
tempKFWeapon = class<KFWeapon>(itemForSale[i].default.inventoryType);
|
||||
// failsafe
|
||||
if (tempKFWeapon == none)
|
||||
continue;
|
||||
|
||||
if (tempKFWeapon.default.inventoryGroup == 1)
|
||||
{
|
||||
weaponGroup1[weaponGroup1.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
if (tempKFWeapon.default.inventoryGroup == 2)
|
||||
{
|
||||
weaponGroup2[weaponGroup2.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
if (tempKFWeapon.default.inventoryGroup == 3)
|
||||
{
|
||||
weaponGroup3[weaponGroup3.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
if (tempKFWeapon.default.inventoryGroup == 4)
|
||||
{
|
||||
weaponGroup4[weaponGroup4.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
if (tempKFWeapon.default.inventoryGroup == 5)
|
||||
{
|
||||
weaponGroup5[weaponGroup5.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// part of fullReset()
|
||||
simulated function prioritySortGroup(out array<string> weaponGroup)
|
||||
{
|
||||
local int i,j;
|
||||
local string tempString;
|
||||
local class<KFWeapon> tempKFWeapon1, tempKFWeapon2;
|
||||
|
||||
for (i = 0; i < weaponGroup.length; i++)
|
||||
{
|
||||
for (j = i; j < weaponGroup.length; j++)
|
||||
{
|
||||
tempKFWeapon1 = class<KFWeapon>(dynamicLoadObject(weaponGroup[i], class'Class', true));
|
||||
tempKFWeapon2 = class<KFWeapon>(dynamicLoadObject(weaponGroup[j], class'Class', true));
|
||||
if (tempKFWeapon1.default.priority < tempKFWeapon2.default.priority)
|
||||
{
|
||||
tempString = weaponGroup[i];
|
||||
weaponGroup[i] = weaponGroup[j];
|
||||
weaponGroup[j] = tempString;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function clearAllGroups()
|
||||
{
|
||||
weaponGroup1.remove(0, weaponGroup1.length);
|
||||
weaponGroup2.remove(0, weaponGroup2.length);
|
||||
weaponGroup3.remove(0, weaponGroup3.length);
|
||||
weaponGroup4.remove(0, weaponGroup4.length);
|
||||
weaponGroup5.remove(0, weaponGroup5.length);
|
||||
weaponGroup6.remove(0, weaponGroup6.length);
|
||||
weaponGroup7.remove(0, weaponGroup7.length);
|
||||
weaponGroup8.remove(0, weaponGroup8.length);
|
||||
weaponGroup9.remove(0, weaponGroup9.length);
|
||||
}
|
||||
|
||||
|
||||
simulated function updateUnusedWeapons()
|
||||
{
|
||||
local KFLevelRules kflr;
|
||||
local array<class<Pickup> > welderSyringe;
|
||||
|
||||
updateAllUsedWeapons();
|
||||
|
||||
foreach dynamicActors(class'KFLevelRules', kflr)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (kflr == none)
|
||||
{
|
||||
if (kfpc != none)
|
||||
kfpc.clientMessage("Can't access KFLevelRules. You are probably not in game.");
|
||||
return;
|
||||
}
|
||||
|
||||
weaponGroup9.remove(0, weaponGroup9.length);
|
||||
updateUnusedWeapons_Internal(kflr.mediItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.suppItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.shrpItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.commItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.bersItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.fireItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.demoItemForSale);
|
||||
updateUnusedWeapons_Internal(kflr.neutItemForSale);
|
||||
welderSyringe[welderSyringe.length] = class'SyringePickup';
|
||||
welderSyringe[welderSyringe.length] = class'WelderPickup';
|
||||
updateUnusedWeapons_Internal(welderSyringe);
|
||||
prioritySortGroup(weaponGroup9);
|
||||
}
|
||||
|
||||
|
||||
simulated function updateUnusedWeapons_Internal(array<class<Pickup> > parsedWeapons)
|
||||
{
|
||||
local int i, j;
|
||||
local class<KFWeapon> tempKFWeapon;
|
||||
|
||||
for (i = 0; i < parsedWeapons.length; i++)
|
||||
{
|
||||
tempKFWeapon = class<KFWeapon>(parsedWeapons[i].default.inventoryType);
|
||||
if (tempKFWeapon == none)
|
||||
continue;
|
||||
if (allUsedWeapons.length == 0)
|
||||
{
|
||||
weaponGroup9[weaponGroup9.length] = string(tempKFWeapon);
|
||||
continue;
|
||||
}
|
||||
|
||||
for (j = 0; j < allUsedWeapons.length; j++)
|
||||
{
|
||||
if (string(tempKFWeapon) == allUsedWeapons[j])
|
||||
break;
|
||||
if (j == (allUsedWeapons.length - 1))
|
||||
weaponGroup9[weaponGroup9.length] = string(tempKFWeapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function updateAllUsedWeapons()
|
||||
{
|
||||
local int i;
|
||||
|
||||
allUsedWeapons.remove(0, allUsedWeapons.length);
|
||||
|
||||
for (i = 0; i < weaponGroup1.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup1[i];
|
||||
}
|
||||
for (i = 0; i < weaponGroup2.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup2[i];
|
||||
}
|
||||
for (i = 0; i < weaponGroup3.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup3[i];
|
||||
}
|
||||
for (i = 0; i < weaponGroup4.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup4[i];
|
||||
}
|
||||
for (i = 0; i < weaponGroup5.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup5[i];
|
||||
}
|
||||
for (i = 0; i < weaponGroup6.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup6[i];
|
||||
}
|
||||
for (i = 0; i < weaponGroup7.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup7[i];
|
||||
}
|
||||
for (i = 0; i < weaponGroup8.length; i++)
|
||||
{
|
||||
allUsedWeapons[allUsedWeapons.length] = weaponGroup8[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function array<string> getAllPresetNames()
|
||||
{
|
||||
local array<string> names;
|
||||
local int i;
|
||||
|
||||
names = getPerObjectNames("HideMutWeapons", string(class'list_WeaponManager'.name));
|
||||
for (i = 0; i < names.length; i++)
|
||||
{
|
||||
if (names[i] ~= "CurrentWeaponList")
|
||||
{
|
||||
names.remove(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
|
||||
// are we a variant or no
|
||||
final protected function bool IsVariantClass(class<Inventory> aInventoryType)
|
||||
{
|
||||
return Left(aInventoryType, 12) ~= "KFMod.Golden" || Left(aInventoryType, 10) ~= "KFMod.Camo" || Left(aInventoryType, 10) ~= "KFMod.Neon";
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
164
kf_sources/HideMut/Classes/a_WeaponTosser.uc
Normal file
164
kf_sources/HideMut/Classes/a_WeaponTosser.uc
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
class a_WeaponTosser extends a_ActorBase;
|
||||
|
||||
var KFPlayerController PC;
|
||||
var bool bPrintingMode, bSellingMode, bTossingMode;
|
||||
var int minWeight;
|
||||
|
||||
|
||||
function startTossWeapons(KFPlayerController inPC)
|
||||
{
|
||||
PC = inPC;
|
||||
bTossingMode = true;
|
||||
|
||||
SetTimer(0.01, true);
|
||||
}
|
||||
|
||||
|
||||
function startPrinting(KFPlayerController inPC)
|
||||
{
|
||||
local inventory inv;
|
||||
|
||||
PC = inPC;
|
||||
bPrintingMode = true;
|
||||
minWeight = KFHumanPawn(inPC.pawn).CurrentWeight;
|
||||
|
||||
for(Inv = inPC.Pawn.Inventory; Inv != none; Inv = Inv.Inventory)
|
||||
{
|
||||
if (KFWeapon(Inv) != none)
|
||||
{
|
||||
if(KFWeapon(Inv).class == class'KFMod.DualMK23Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Dual44Magnum' ||
|
||||
KFWeapon(Inv).class == class'KFMod.GoldenDualDeagle' ||
|
||||
KFWeapon(Inv).class == class'KFMod.DualDeagle')
|
||||
{
|
||||
minWeight = minWeight - 4;
|
||||
}
|
||||
if(KFWeapon(Inv).class == class'KFMod.MK23Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Magnum44Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.GoldenDeagle' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Deagle')
|
||||
{
|
||||
minWeight = minWeight - 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
minWeight = minWeight + 1;
|
||||
|
||||
SetTimer(0.01, true);
|
||||
}
|
||||
|
||||
|
||||
function startSellWeapons(KFPlayerController inPC)
|
||||
{
|
||||
PC = inPC;
|
||||
bSellingMode = true;
|
||||
|
||||
SetTimer(0.01, true);
|
||||
}
|
||||
|
||||
|
||||
function stopAnyActions()
|
||||
{
|
||||
SetTimer(0.00, false);
|
||||
}
|
||||
|
||||
|
||||
function Timer()
|
||||
{
|
||||
local KFPawn me;
|
||||
local Inventory inv;
|
||||
local int i;
|
||||
local array<KFWeapon> sellingWeapons;
|
||||
|
||||
me = KFPawn(PC.pawn);
|
||||
|
||||
if (me == none)
|
||||
return;
|
||||
|
||||
if (bPrintingMode)
|
||||
{
|
||||
if (KFHumanPawn(me).CurrentWeight < minWeight)
|
||||
{
|
||||
me.ServerBuyWeapon(class'DualMK23Pistol', 0);
|
||||
me.ServerBuyWeapon(class'Dual44Magnum', 0);
|
||||
me.ServerBuyWeapon(class'DualDeagle', 0);
|
||||
}
|
||||
|
||||
for (Inv = me.Inventory; Inv != none; Inv = Inv.Inventory)
|
||||
{
|
||||
if (KFWeapon(Inv) != none)
|
||||
{
|
||||
if(!KFWeapon(Inv).bKFNeverThrow)
|
||||
{
|
||||
if(KFWeapon(Inv).class == class'KFMod.DualMK23Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.MK23Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Dual44Magnum' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Magnum44Pistol' ||
|
||||
KFWeapon(Inv).class == class'KFMod.GoldenDualDeagle' ||
|
||||
KFWeapon(Inv).class == class'KFMod.GoldenDeagle' ||
|
||||
KFWeapon(Inv).class == class'KFMod.DualDeagle' ||
|
||||
KFWeapon(Inv).class == class'KFMod.Deagle')
|
||||
{
|
||||
me.PendingWeapon = Weapon(Inv);
|
||||
me.ChangedWeapon();
|
||||
PC.ThrowWeapon();
|
||||
// return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bSellingMode)
|
||||
{
|
||||
//PC.ToggleDuck();
|
||||
|
||||
for (Inv = me.Inventory; Inv != none; Inv = Inv.Inventory)
|
||||
{
|
||||
if (KFWeapon(Inv) != none)
|
||||
{
|
||||
if (!KFWeapon(Inv).bKFNeverThrow)
|
||||
{
|
||||
sellingWeapons[sellingWeapons.length] = KFWeapon(Inv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = sellingWeapons.length - 1; i > -1 ; i--)
|
||||
{
|
||||
me.ServerSellWeapon(sellingWeapons[i].class);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (bTossingMode)
|
||||
{
|
||||
for (Inv = me.Inventory; Inv != none; Inv = Inv.Inventory)
|
||||
{
|
||||
if (KFWeapon(Inv) != none)
|
||||
{
|
||||
if (!KFWeapon(Inv).bKFNeverThrow && KFWeapon(Inv).bCanThrow)
|
||||
{
|
||||
Inv.Velocity = me.Velocity;
|
||||
Inv.DropFrom(me.Location + VRand() * 10);
|
||||
// me.PendingWeapon = Weapon(Inv);
|
||||
// me.ChangedWeapon();
|
||||
// PC.ThrowWeapon();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// self cleanup
|
||||
function Termination()
|
||||
{
|
||||
pc = none;
|
||||
super.Termination();
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
66
kf_sources/HideMut/Classes/index.html
Normal file
66
kf_sources/HideMut/Classes/index.html
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<html>
|
||||
<head><title>Index of /kf_sources/HideMut/Classes/</title></head>
|
||||
<body>
|
||||
<h1>Index of /kf_sources/HideMut/Classes/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="ActortList.uc">ActortList.uc</a> 06-Jan-2022 08:52 419
|
||||
<a href="ActortListController.uc">ActortListController.uc</a> 06-Jan-2022 08:52 1902
|
||||
<a href="BackgroundArea.uc">BackgroundArea.uc</a> 06-Jan-2022 08:52 210
|
||||
<a href="ChatAnimator.uc">ChatAnimator.uc</a> 06-Jan-2022 08:52 592
|
||||
<a href="Halo.uc">Halo.uc</a> 06-Jan-2022 08:52 241
|
||||
<a href="HideHUD.uc">HideHUD.uc</a> 06-Jan-2022 08:52 31295
|
||||
<a href="HideLobbyChat.uc">HideLobbyChat.uc</a> 06-Jan-2022 08:52 5657
|
||||
<a href="HideLobbyFooter.uc">HideLobbyFooter.uc</a> 06-Jan-2022 08:52 10795
|
||||
<a href="HideLobbyMenu.uc">HideLobbyMenu.uc</a> 06-Jan-2022 08:52 27139
|
||||
<a href="HideMainMenu.uc">HideMainMenu.uc</a> 06-Jan-2022 08:52 23268
|
||||
<a href="HideMenuPreset.uc">HideMenuPreset.uc</a> 06-Jan-2022 08:52 191
|
||||
<a href="HideMut.uc">HideMut.uc</a> 06-Jan-2022 08:52 4601
|
||||
<a href="HideMutInteraction.uc">HideMutInteraction.uc</a> 06-Jan-2022 08:52 38075
|
||||
<a href="HideObjectPool.uc">HideObjectPool.uc</a> 06-Jan-2022 08:52 1840
|
||||
<a href="HideShopVolume.uc">HideShopVolume.uc</a> 06-Jan-2022 08:52 361
|
||||
<a href="HideTeleporter.uc">HideTeleporter.uc</a> 06-Jan-2022 08:52 111
|
||||
<a href="Hide_IngameChat.uc">Hide_IngameChat.uc</a> 06-Jan-2022 08:52 5669
|
||||
<a href="KFBurnEffect_FPS.uc">KFBurnEffect_FPS.uc</a> 06-Jan-2022 08:52 2202
|
||||
<a href="Settings.uc">Settings.uc</a> 06-Jan-2022 08:52 1991
|
||||
<a href="WhosYourDaddy.uc">WhosYourDaddy.uc</a> 06-Jan-2022 08:52 1344
|
||||
<a href="a_ActorBase.uc">a_ActorBase.uc</a> 06-Jan-2022 08:52 1105
|
||||
<a href="a_CashTosser.uc">a_CashTosser.uc</a> 06-Jan-2022 08:52 448
|
||||
<a href="a_DebugActor.uc">a_DebugActor.uc</a> 06-Jan-2022 08:52 542
|
||||
<a href="a_MapOptimizer.uc">a_MapOptimizer.uc</a> 06-Jan-2022 08:52 4858
|
||||
<a href="a_MonsterOptimizer.uc">a_MonsterOptimizer.uc</a> 06-Jan-2022 08:52 49526
|
||||
<a href="a_SpectateManager.uc">a_SpectateManager.uc</a> 06-Jan-2022 08:52 618
|
||||
<a href="a_VisibilityHandler.uc">a_VisibilityHandler.uc</a> 06-Jan-2022 08:52 42999
|
||||
<a href="a_WeaponManager.uc">a_WeaponManager.uc</a> 06-Jan-2022 08:52 14575
|
||||
<a href="a_WeaponTosser.uc">a_WeaponTosser.uc</a> 06-Jan-2022 08:52 3966
|
||||
<a href="list_WeaponManager.uc">list_WeaponManager.uc</a> 06-Jan-2022 08:52 438
|
||||
<a href="menu_Hide.uc">menu_Hide.uc</a> 06-Jan-2022 08:52 41089
|
||||
<a href="menu_Old.uc">menu_Old.uc</a> 06-Jan-2022 08:52 26094
|
||||
<a href="menu_WeaponManager.uc">menu_WeaponManager.uc</a> 06-Jan-2022 08:52 24521
|
||||
<a href="menu_c_HideMut.uc">menu_c_HideMut.uc</a> 06-Jan-2022 08:52 60488
|
||||
<a href="menu_c_Light.uc">menu_c_Light.uc</a> 06-Jan-2022 08:52 31851
|
||||
<a href="menu_c_New.uc">menu_c_New.uc</a> 06-Jan-2022 08:52 1464
|
||||
<a href="menu_c_Optimizer.uc">menu_c_Optimizer.uc</a> 06-Jan-2022 08:52 73281
|
||||
<a href="menu_c_Zoner.uc">menu_c_Zoner.uc</a> 06-Jan-2022 08:52 7827
|
||||
<a href="o_AssetLoader.uc">o_AssetLoader.uc</a> 06-Jan-2022 08:52 3804
|
||||
<a href="o_CyrillicEncodeUtilities.uc">o_CyrillicEncodeUtilities.uc</a> 06-Jan-2022 08:52 11184
|
||||
<a href="o_Render.uc">o_Render.uc</a> 06-Jan-2022 08:52 2347
|
||||
<a href="o_Utility.uc">o_Utility.uc</a> 06-Jan-2022 08:52 16883
|
||||
<a href="proj_GetName.uc">proj_GetName.uc</a> 06-Jan-2022 08:52 2211
|
||||
<a href="proj_PickActor.uc">proj_PickActor.uc</a> 06-Jan-2022 08:52 736
|
||||
<a href="repl_Console.uc">repl_Console.uc</a> 06-Jan-2022 08:52 1200
|
||||
<a href="repl_FlameTendril.uc">repl_FlameTendril.uc</a> 06-Jan-2022 08:52 1778
|
||||
<a href="repl_GT.uc">repl_GT.uc</a> 06-Jan-2022 08:52 2638
|
||||
<a href="repl_InternetPage.uc">repl_InternetPage.uc</a> 06-Jan-2022 08:52 1061
|
||||
<a href="repl_KFSStats.uc">repl_KFSStats.uc</a> 06-Jan-2022 08:52 12162
|
||||
<a href="repl_LAWProj.uc">repl_LAWProj.uc</a> 06-Jan-2022 08:52 1955
|
||||
<a href="repl_M79Proj.uc">repl_M79Proj.uc</a> 06-Jan-2022 08:52 1983
|
||||
<a href="repl_MOTD.uc">repl_MOTD.uc</a> 06-Jan-2022 08:52 292
|
||||
<a href="repl_Monster.uc">repl_Monster.uc</a> 06-Jan-2022 08:52 4227
|
||||
<a href="repl_Nade.uc">repl_Nade.uc</a> 06-Jan-2022 08:52 1053
|
||||
<a href="repl_PC.uc">repl_PC.uc</a> 06-Jan-2022 08:52 8162
|
||||
<a href="repl_Pawn.uc">repl_Pawn.uc</a> 06-Jan-2022 08:52 3117
|
||||
<a href="repl_PipeProj.uc">repl_PipeProj.uc</a> 06-Jan-2022 08:52 1223
|
||||
<a href="repl_ProjFlare.uc">repl_ProjFlare.uc</a> 06-Jan-2022 08:52 1295
|
||||
<a href="repl_ServerBrowser.uc">repl_ServerBrowser.uc</a> 06-Jan-2022 08:52 974
|
||||
<a href="repl_proj_buzzsaw.uc">repl_proj_buzzsaw.uc</a> 06-Jan-2022 08:52 251
|
||||
</pre><hr></body>
|
||||
</html>
|
||||
17
kf_sources/HideMut/Classes/list_WeaponManager.uc
Normal file
17
kf_sources/HideMut/Classes/list_WeaponManager.uc
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class list_WeaponManager extends object
|
||||
PerObjectConfig
|
||||
config(HideMutWeapons);
|
||||
|
||||
|
||||
var config array<string> weaponGroup1;
|
||||
var config array<string> weaponGroup2;
|
||||
var config array<string> weaponGroup3;
|
||||
var config array<string> weaponGroup4;
|
||||
var config array<string> weaponGroup5;
|
||||
var config array<string> weaponGroup6;
|
||||
var config array<string> weaponGroup7;
|
||||
var config array<string> weaponGroup8;
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
1200
kf_sources/HideMut/Classes/menu_Hide.uc
Normal file
1200
kf_sources/HideMut/Classes/menu_Hide.uc
Normal file
File diff suppressed because it is too large
Load diff
976
kf_sources/HideMut/Classes/menu_Old.uc
Normal file
976
kf_sources/HideMut/Classes/menu_Old.uc
Normal file
|
|
@ -0,0 +1,976 @@
|
|||
class menu_Old extends PopupPageBase
|
||||
transient;
|
||||
|
||||
|
||||
var(DEBUG) transient array<StaticMeshActor> cachedStaticMeshes;
|
||||
var(DEBUG) transient array<Light> cachedLights;
|
||||
var(DEBUG) transient array<Emitter> cachedEmitters;
|
||||
var(DEBUG) transient array<Decoration> cachedDecorations;
|
||||
var(DEBUG) transient array<Mover> cachedMovers;
|
||||
var(DEBUG) transient array<Projector> cachedProjectors; // KFBloodSplatter
|
||||
var(DEBUG) transient array<KF_RotatingMeshActor> cachedRotatingMeshActors; // terraininfo
|
||||
|
||||
var PlayerController PC;
|
||||
var editinline array<byte> CloseKey;
|
||||
|
||||
var ActortListController ALC;
|
||||
var string mapName;
|
||||
|
||||
var automated GUIButton b_HideAllActors, b_ShowAllActors, b_CacheAllActors,
|
||||
b_UncacheAllActors, b_RefreshScreen, b_DisplayCachedActors,
|
||||
b_ValidateCachedActors, b_ClearCache, b_ActivateInteraction;
|
||||
var automated BackgroundArea a_List;
|
||||
var automated GUIListBox lb_ActortListsList;
|
||||
var GUIList li_ActortListsList;
|
||||
var automated GUILabel l_WeaponList;
|
||||
|
||||
var string colorG, colorB, colorY, colorW;
|
||||
|
||||
|
||||
simulated function InitComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
super.InitComponent(MyController,MyOwner);
|
||||
|
||||
PC = PlayerOwner();
|
||||
|
||||
colorG = chr(27) $ chr(1) $ chr(240) $ chr(1);
|
||||
colorB = chr(27) $ chr(90) $ chr(90) $ chr(240);
|
||||
colorY = chr(27) $ chr(127) $ chr(127) $ chr(1);
|
||||
colorW = chr(27) $ chr(255) $ chr(255) $ chr(255);
|
||||
}
|
||||
|
||||
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
local int i;
|
||||
local string KeyName;
|
||||
local array<string> KeyNames;
|
||||
|
||||
local array<string> ActortListNames;
|
||||
|
||||
super.Opened(Sender);
|
||||
|
||||
PC = PlayerOwner();
|
||||
|
||||
// write in KeyNames all bind keys that onen this window to use 'closeWindowWithBind()' then
|
||||
CloseKey.Remove(0, CloseKey.Length);
|
||||
KeyName = PC.ConsoleCommand("BINDINGTOKEY hideMenu");
|
||||
Split(KeyName, ",", KeyNames);
|
||||
for (i = 0; i < KeyNames.Length; i++)
|
||||
CloseKey[CloseKey.Length] = byte(PC.ConsoleCommand("KEYNUMBER"@KeyNames[i]));
|
||||
|
||||
mapName = class'KFGameType'.static.GetCurrentMapName(PC.Level);
|
||||
|
||||
// in case of 255.255.225.228:8080/KF-WestLondon
|
||||
i = InStr(mapName, "/") + 1;
|
||||
MapName = Mid(MapName, i, Len(MapName) - i);
|
||||
|
||||
l_WeaponList.caption = MapName;
|
||||
|
||||
// refresh list with ActortLists
|
||||
|
||||
GetALL().clear();
|
||||
ActortListNames = GetALC().GetAllActortLists();
|
||||
for (i = 0; i < ActortListNames.Length; i++)
|
||||
{
|
||||
if (Left(ActortListNames[i], Len(MapName)) ~= MapName)
|
||||
GetALL().add(ActortListNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function Closed(GUIComponent Sender, bool bCancelled)
|
||||
{
|
||||
super.Closed(Sender, bCancelled);
|
||||
|
||||
b_CacheAllActors.MenuState=MSAT_Disabled;
|
||||
b_UncacheAllActors.MenuState=MSAT_Disabled;
|
||||
}
|
||||
|
||||
|
||||
// safe cleanup
|
||||
event Free()
|
||||
{
|
||||
// all automated components are cleaned in super code
|
||||
pc = none;
|
||||
ALC = none;
|
||||
li_ActortListsList = none;
|
||||
// clear all arrays
|
||||
clearCache();
|
||||
|
||||
super.Free();
|
||||
}
|
||||
|
||||
|
||||
// =============================================================================
|
||||
// getters for safe calls
|
||||
|
||||
final private function PCMsg(coerce string s, optional Name Type)
|
||||
{
|
||||
if (pc != none)
|
||||
PC.ClientMessage(s, Type);
|
||||
}
|
||||
|
||||
|
||||
final private function ActortListController GetALC()
|
||||
{
|
||||
if (ALC == none)
|
||||
ALC = new class'ActortListController';
|
||||
|
||||
return ALC;
|
||||
}
|
||||
|
||||
|
||||
final private function GUIList GetALL()
|
||||
{
|
||||
if (li_ActortListsList == none)
|
||||
{
|
||||
li_ActortListsList = lb_ActortListsList.List;
|
||||
li_ActortListsList.TextAlign = TXTA_Left;
|
||||
li_ActortListsList.OnClick = ActivateAllButtons;
|
||||
li_ActortListsList.bMultiSelect = true;
|
||||
li_ActortListsList.bDropSource = true;
|
||||
li_ActortListsList.bDropTarget = true;
|
||||
}
|
||||
|
||||
return li_ActortListsList;
|
||||
}
|
||||
|
||||
|
||||
// =============================================================================
|
||||
simulated function bool ButtonClicked(GUIComponent Sender)
|
||||
{
|
||||
// local StaticMeshActor tempActor;
|
||||
// local Emitter tempEmitter;
|
||||
// local Light tempLight;
|
||||
// local mover tempMover;
|
||||
// local array<string> uselessActors;
|
||||
// local int i, count;
|
||||
|
||||
switch (Sender)
|
||||
{
|
||||
case b_CacheAllActors:
|
||||
cacheStaticMeshes();
|
||||
cacheLights();
|
||||
cacheEmitters();
|
||||
cacheDecorations();
|
||||
cacheMovers();
|
||||
cacheRotatingMeshActors();
|
||||
break;
|
||||
|
||||
case b_UncacheAllActors:
|
||||
// UNCACHE
|
||||
break;
|
||||
|
||||
case b_HideAllActors:
|
||||
checkAvailability();
|
||||
PCMsg(colorW$"----------------------------------------");
|
||||
PCMsg(colorG$"Following actors were hided:");
|
||||
hideStaticMeshes();
|
||||
hideLights();
|
||||
hideEmitters();
|
||||
hideDecorations();
|
||||
hideMovers();
|
||||
hideRotatingMeshActors();
|
||||
PCMsg(colorW$"----------------------------------------");
|
||||
break;
|
||||
|
||||
case b_ShowAllActors:
|
||||
checkAvailability();
|
||||
PCMsg(colorW$"----------------------------------------");
|
||||
PCMsg(colorG$"Following actors were unhided:");
|
||||
showStaticMeshes();
|
||||
showLights();
|
||||
showEmitters();
|
||||
showDecorations();
|
||||
showMovers();
|
||||
showRotatingMeshActors();
|
||||
PCMsg(colorW$"----------------------------------------");
|
||||
break;
|
||||
|
||||
case b_RefreshScreen:
|
||||
hideSMeshesWithoutColliding();
|
||||
break;
|
||||
|
||||
case b_DisplayCachedActors:
|
||||
checkAvailability();
|
||||
PCMsg(colorW$"----------------------------------------");
|
||||
PCMsg(colorG$"Cached actors:");
|
||||
displayCachedStaticMeshes();
|
||||
displayCachedLights();
|
||||
displayCachedEmitters();
|
||||
displayCachedDecorations();
|
||||
displayCachedMovers();
|
||||
displayCachedRotatingMeshActors();
|
||||
PCMsg(colorW$"----------------------------------------");
|
||||
break;
|
||||
|
||||
case b_ClearCache:
|
||||
clearCache();
|
||||
break;
|
||||
|
||||
case b_ActivateInteraction:
|
||||
// runInteraction();
|
||||
closeInteraction();
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
simulated function runInteraction()
|
||||
{
|
||||
// local int i;
|
||||
local PlayerController dude;
|
||||
|
||||
dude = PlayerOwner();
|
||||
|
||||
if (dude != none)
|
||||
{
|
||||
// dude.Player.LocalInteractions[dude.Player.LocalInteractions.Length] = none;
|
||||
// for(i = 0; i < dude.Player.LocalInteractions.Length; i++)
|
||||
// PCMsg(colorW$string(dude.Player.LocalInteractions[i].name));
|
||||
|
||||
dude.Player.LocalInteractions[0] = new class<Interaction>(DynamicLoadObject(string(class'HideMutInteraction'), class'Class', true));
|
||||
dude.Player.LocalInteractions[0].ViewportOwner = dude.Player;
|
||||
}
|
||||
|
||||
// dude.Player.InteractionMaster.AddInteraction(string(class'HideMutInteraction'), dude.Player);
|
||||
}
|
||||
|
||||
|
||||
simulated function closeInteraction()
|
||||
{
|
||||
PlayerOwner().Player.LocalInteractions[0].ViewportOwner = none;
|
||||
PlayerOwner().Player.LocalInteractions.Remove(0, 1);
|
||||
}
|
||||
|
||||
|
||||
// STATIC MESHES
|
||||
simulated function cacheStaticMeshes()
|
||||
{
|
||||
local StaticMeshActor tempSM;
|
||||
local array<string> uselessStaticMeshes;
|
||||
local int i, count;
|
||||
|
||||
uselessStaticMeshes = GetALC().getUselessStaticMeshes(GetALL().get(false));
|
||||
|
||||
PCMsg("Meshes in ini file:"$uselessStaticMeshes.length);
|
||||
|
||||
forEach AllObjects (class'StaticMeshActor', tempSM)
|
||||
{
|
||||
for (i = 0; i < uselessStaticMeshes.length; i++)
|
||||
{
|
||||
if (string(tempSM.name) == uselessStaticMeshes[i])
|
||||
{
|
||||
cachedStaticMeshes[cachedStaticMeshes.length] = tempSM;
|
||||
uselessStaticMeshes.remove(i,1);
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PCMsg("Meshes added:"$count);
|
||||
PCMsg(colorG$"All static meshes were cached sucessfully.");
|
||||
}
|
||||
|
||||
|
||||
simulated function hideStaticMeshes()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Static meshes");
|
||||
|
||||
for (i = 0; i < cachedStaticMeshes.length; i++)
|
||||
{
|
||||
if (cachedStaticMeshes[i].bHidden == false)
|
||||
{
|
||||
cachedStaticMeshes[i].bHidden = true;
|
||||
cachedStaticMeshes[i].ResetStaticFilterState();
|
||||
PCMsg(colorY$" "@string(cachedStaticMeshes[i].name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function showStaticMeshes()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Static meshes");
|
||||
|
||||
for (i = 0; i < cachedStaticMeshes.length; i++)
|
||||
{
|
||||
if (cachedStaticMeshes[i].bHidden == true)
|
||||
{
|
||||
cachedStaticMeshes[i].bHidden = false;
|
||||
cachedStaticMeshes[i].ResetStaticFilterState();
|
||||
PCMsg(colorY$" "@string(cachedStaticMeshes[i].name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function displayCachedStaticMeshes()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Static meshes ["$cachedStaticMeshes.length$"]");
|
||||
|
||||
for (i = 0; i < cachedStaticMeshes.length; i++)
|
||||
PCMsg(colorY$" "@string(cachedStaticMeshes[i].name));
|
||||
}
|
||||
|
||||
|
||||
// LIGHTS
|
||||
simulated function cacheLights()
|
||||
{
|
||||
local Light tempL;
|
||||
local array<string> uselessLights;
|
||||
local int i;
|
||||
|
||||
uselessLights = GetALC().getUselessLights(GetALL().get(false));
|
||||
|
||||
forEach AllObjects (class'Light', tempL)
|
||||
{
|
||||
for (i = 0; i < uselessLights.length; i++)
|
||||
{
|
||||
if (string(tempL.name) == uselessLights[i])
|
||||
{
|
||||
cachedLights[cachedLights.length] = tempL;
|
||||
uselessLights.remove(i,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PCMsg(colorG$"All lights were cached sucessfully.");
|
||||
}
|
||||
|
||||
|
||||
simulated function hideLights()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Lights[coronas]");
|
||||
|
||||
for (i = 0; i < cachedLights.length; i++)
|
||||
{
|
||||
if (cachedLights[i].bCorona == true)
|
||||
{
|
||||
cachedLights[i].bCorona = false;
|
||||
if (cachedLights[i].bStatic)
|
||||
cachedLights[i].ResetStaticFilterState();
|
||||
PCMsg(colorY$" "@string(cachedLights[i].name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function showLights()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Lights[coronas]");
|
||||
|
||||
for(i = 0; i < cachedLights.length; i++)
|
||||
if(cachedLights[i].bCorona == false)
|
||||
{
|
||||
cachedLights[i].bCorona = true;
|
||||
if(cachedLights[i].bStatic)
|
||||
cachedLights[i].ResetStaticFilterState();
|
||||
PCMsg(colorY$" "@string(cachedLights[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function displayCachedLights()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Lights ["$cachedLights.length$"]");
|
||||
|
||||
for(i = 0; i < cachedLights.length; i++)
|
||||
PCMsg(colorY$" "@string(cachedLights[i].name));
|
||||
}
|
||||
|
||||
/*EMITTERS*/
|
||||
simulated function cacheEmitters()
|
||||
{
|
||||
local Emitter tempE;
|
||||
local array<string> uselessEmitters;
|
||||
local int i;
|
||||
|
||||
uselessEmitters = GetALC().getUselessEmitters(GetALL().get(false));
|
||||
|
||||
forEach AllObjects (class'Emitter', tempE)
|
||||
{
|
||||
for(i = 0; i < uselessEmitters.length; i++)
|
||||
{
|
||||
if(string(tempE.name) == uselessEmitters[i])
|
||||
{
|
||||
cachedEmitters[cachedEmitters.length] = tempE;
|
||||
uselessEmitters.remove(i,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PCMsg(colorG$"All emitters were cached sucessfully.");
|
||||
}
|
||||
|
||||
simulated function hideEmitters()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Emitters");
|
||||
|
||||
for(i = 0; i < cachedEmitters.length; i++)
|
||||
if(cachedEmitters[i].bHidden == false)
|
||||
{
|
||||
cachedEmitters[i].bHidden = true;
|
||||
if(cachedEmitters[i].bStatic)
|
||||
cachedEmitters[i].ResetStaticFilterState();
|
||||
// PCMsg(colorY$" "@string(cachedEmitters[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function showEmitters()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Emitters");
|
||||
|
||||
for(i = 0; i < cachedEmitters.length; i++)
|
||||
if(cachedEmitters[i].bHidden == true)
|
||||
{
|
||||
cachedEmitters[i].bHidden = false;
|
||||
if(cachedEmitters[i].bStatic)
|
||||
cachedEmitters[i].ResetStaticFilterState();
|
||||
// PCMsg(colorY$" "@string(cachedEmitters[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
simulated function displayCachedEmitters()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Emitters ["$cachedEmitters.length$"]");
|
||||
|
||||
for(i = 0; i < cachedEmitters.length; i++)
|
||||
PCMsg(colorY$" "@string(cachedEmitters[i].name));
|
||||
}
|
||||
|
||||
|
||||
// DECORATIONS
|
||||
simulated function cacheDecorations()
|
||||
{
|
||||
local Decoration tempD;
|
||||
local array<string> uselessDecorations;
|
||||
local int i;
|
||||
|
||||
uselessDecorations = GetALC().getUselessDecorations(GetALL().get(false));
|
||||
|
||||
forEach AllObjects (class'Decoration', tempD)
|
||||
{
|
||||
for(i = 0; i < uselessDecorations.length; i++)
|
||||
{
|
||||
if(string(tempD.name) == uselessDecorations[i])
|
||||
{
|
||||
cachedDecorations[cachedDecorations.length] = tempD;
|
||||
uselessDecorations.remove(i,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PCMsg(colorG$"All decorations were cached sucessfully.");
|
||||
}
|
||||
|
||||
|
||||
simulated function hideDecorations()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Decorations");
|
||||
|
||||
for (i = 0; i < cachedDecorations.length; i++)
|
||||
if (cachedDecorations[i].bHidden == false)
|
||||
{
|
||||
cachedDecorations[i].bHidden = true;
|
||||
if (cachedDecorations[i].bStatic)
|
||||
cachedDecorations[i].ResetStaticFilterState();
|
||||
PCMsg(colorY$" "@string(cachedDecorations[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function showDecorations()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Decorations");
|
||||
|
||||
for (i = 0; i < cachedDecorations.length; i++)
|
||||
if (cachedDecorations[i].bHidden == true)
|
||||
{
|
||||
cachedDecorations[i].bHidden = false;
|
||||
if (cachedDecorations[i].bStatic)
|
||||
cachedDecorations[i].ResetStaticFilterState();
|
||||
PCMsg(colorY$" "@string(cachedDecorations[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function displayCachedDecorations()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Decorations ["$cachedDecorations.length$"]");
|
||||
|
||||
for (i = 0; i < cachedDecorations.length; i++)
|
||||
PCMsg(colorY$" "@string(cachedDecorations[i].name));
|
||||
}
|
||||
|
||||
|
||||
// MOVERS
|
||||
simulated function cacheMovers()
|
||||
{
|
||||
local Mover tempM;
|
||||
local array<string> uselessMovers;
|
||||
local int i;
|
||||
|
||||
uselessMovers = GetALC().getUselessMovers(GetALL().get(false));
|
||||
|
||||
forEach AllObjects (class'Mover', tempM)
|
||||
{
|
||||
for (i = 0; i < uselessMovers.length; i++)
|
||||
{
|
||||
if (string(tempM.name) == uselessMovers[i])
|
||||
{
|
||||
cachedMovers[cachedMovers.length] = tempM;
|
||||
uselessMovers.remove(i,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PCMsg(colorG$"All movers were cached sucessfully.");
|
||||
}
|
||||
|
||||
|
||||
simulated function hideMovers()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Movers");
|
||||
|
||||
for (i = 0; i < cachedMovers.length; i++)
|
||||
if (cachedMovers[i].bHidden == false)
|
||||
{
|
||||
cachedMovers[i].bHidden = true;
|
||||
if (cachedMovers[i].bStatic)
|
||||
cachedMovers[i].ResetStaticFilterState();
|
||||
PCMsg(colorY$" "@string(cachedMovers[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function showMovers()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Movers");
|
||||
|
||||
for (i = 0; i < cachedMovers.length; i++)
|
||||
if (cachedMovers[i].bHidden == true)
|
||||
{
|
||||
cachedMovers[i].bHidden = false;
|
||||
if (cachedMovers[i].bStatic)
|
||||
cachedMovers[i].ResetStaticFilterState();
|
||||
PCMsg(colorY$" "@string(cachedMovers[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function displayCachedMovers()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"Movers ["$cachedMovers.length$"]");
|
||||
|
||||
for (i = 0; i < cachedMovers.length; i++)
|
||||
PCMsg(colorY$" "@string(cachedMovers[i].name));
|
||||
}
|
||||
|
||||
|
||||
// KF_RotatingMeshActor
|
||||
// Chaos code
|
||||
simulated function cacheRotatingMeshActors()
|
||||
{
|
||||
local KF_RotatingMeshActor tempRM;
|
||||
local array<string> uselessRotatingMeshActors;
|
||||
local int i, count;
|
||||
|
||||
uselessRotatingMeshActors = GetALC().getuselessRotatingMeshActors(GetALL().get(false));
|
||||
|
||||
PCMsg("Rotating Movers in ini file:"$uselessRotatingMeshActors.length);
|
||||
|
||||
forEach AllObjects (class'KF_RotatingMeshActor', tempRM)
|
||||
{
|
||||
for (i = 0; i < uselessRotatingMeshActors.length; i++)
|
||||
{
|
||||
if (string(tempRM.name) == uselessRotatingMeshActors[i])
|
||||
{
|
||||
cachedRotatingMeshActors[cachedRotatingMeshActors.length] = tempRM;
|
||||
uselessRotatingMeshActors.remove(i,1);
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
PCMsg("RotatingMeshActors added:"$count);
|
||||
PCMsg(colorG$"All RotatingMeshActors were cached sucessfully.");
|
||||
}
|
||||
|
||||
|
||||
simulated function hideRotatingMeshActors()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"RotatingMeshActors");
|
||||
|
||||
for (i = 0; i < cachedRotatingMeshActors.length; i++)
|
||||
if (cachedRotatingMeshActors[i].bHidden == false)
|
||||
{
|
||||
cachedRotatingMeshActors[i].bHidden = true;
|
||||
cachedRotatingMeshActors[i].ResetStaticFilterState();
|
||||
PCMsg(colorY$" "@string(cachedRotatingMeshActors[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function showRotatingMeshActors()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"RotatingMeshActors");
|
||||
|
||||
for (i = 0; i < cachedRotatingMeshActors.length; i++)
|
||||
if (cachedRotatingMeshActors[i].bHidden == true)
|
||||
{
|
||||
cachedRotatingMeshActors[i].bHidden = false;
|
||||
cachedRotatingMeshActors[i].ResetStaticFilterState();
|
||||
PCMsg(colorY$" "@string(cachedRotatingMeshActors[i].name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function displayCachedRotatingMeshActors()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PCMsg(colorB$"RotatingMeshActors ["$cachedRotatingMeshActors.length$"]");
|
||||
|
||||
for (i = 0; i < cachedRotatingMeshActors.length; i++)
|
||||
PCMsg(colorY$" "@string(cachedRotatingMeshActors[i].name));
|
||||
}
|
||||
|
||||
// Chaos code
|
||||
simulated function clearCache()
|
||||
{
|
||||
if (cachedStaticMeshes.length > 0)
|
||||
cachedStaticMeshes.remove(0,cachedStaticMeshes.length);
|
||||
|
||||
if (cachedLights.length > 0)
|
||||
cachedLights.remove(0,cachedLights.length);
|
||||
|
||||
if (cachedEmitters.length > 0)
|
||||
cachedEmitters.remove(0,cachedEmitters.length);
|
||||
|
||||
if (cachedDecorations.length > 0)
|
||||
cachedDecorations.remove(0,cachedDecorations.length);
|
||||
|
||||
if (cachedMovers.length > 0)
|
||||
cachedMovers.remove(0,cachedMovers.length);
|
||||
|
||||
if (cachedProjectors.length > 0)
|
||||
cachedProjectors.remove(0,cachedProjectors.length);
|
||||
|
||||
if (cachedRotatingMeshActors.length > 0)
|
||||
cachedRotatingMeshActors.remove(0,cachedRotatingMeshActors.length);
|
||||
|
||||
PCMsg(colorG$"The cache was cleared.");
|
||||
}
|
||||
|
||||
|
||||
simulated function bool closeWindowWithBind(out byte Key, out byte State, float delta)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < CloseKey.Length; i++)
|
||||
if (Key == CloseKey[i])
|
||||
{
|
||||
Controller.CloseMenu(false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function bool ActivateAllButtons(GUIComponent Sender)
|
||||
{
|
||||
GetALL().InternalOnClick(Sender);
|
||||
b_CacheAllActors.MenuState=MSAT_Blurry;
|
||||
// b_UncacheAllActors.MenuState=MSAT_Blurry;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
simulated function hideSMeshesWithoutColliding()
|
||||
{
|
||||
local StaticMeshActor tempMesh;
|
||||
local Emitter tempE;
|
||||
local Light tempL;
|
||||
local Decoration tempD;
|
||||
local Mover tempM;
|
||||
local KF_RotatingMeshActor tempR;
|
||||
|
||||
forEach AllObjects (class'StaticMeshActor', tempMesh)
|
||||
{
|
||||
if(tempMesh.bBlockActors == false && tempMesh.bBlockZeroExtentTraces == false)
|
||||
{
|
||||
tempMesh.bHidden = true;
|
||||
tempMesh.ResetStaticFilterState();
|
||||
cachedStaticMeshes[cachedStaticMeshes.length] = tempMesh;
|
||||
}
|
||||
|
||||
}
|
||||
forEach AllObjects (class'Emitter', tempE)
|
||||
{
|
||||
if(tempE.Instigator == none)
|
||||
{
|
||||
tempE.bHidden = true;
|
||||
if(tempE.bStatic)
|
||||
tempE.ResetStaticFilterState();
|
||||
cachedEmitters[cachedEmitters.length] = tempE;
|
||||
}
|
||||
}
|
||||
forEach AllObjects (class'Light', tempL)
|
||||
{
|
||||
if(tempL.bCorona == true)
|
||||
{
|
||||
tempL.bCorona = false;
|
||||
if(tempL.bStatic)
|
||||
tempL.ResetStaticFilterState();
|
||||
cachedLights[cachedLights.length] = tempL;
|
||||
}
|
||||
}
|
||||
forEach AllObjects (class'Decoration', tempD)
|
||||
{
|
||||
tempD.bHidden = true;
|
||||
if(tempD.bStatic)
|
||||
tempD.ResetStaticFilterState();
|
||||
cachedDecorations[cachedDecorations.length] = tempD;
|
||||
}
|
||||
forEach AllObjects (class'Mover', tempM)
|
||||
{
|
||||
if(tempM.bBlockActors == false && tempM.bBlockZeroExtentTraces == false)
|
||||
{
|
||||
tempM.bHidden = true;
|
||||
if(tempM.bStatic)
|
||||
tempM.ResetStaticFilterState();
|
||||
cachedMovers[cachedMovers.length] = tempM;
|
||||
}
|
||||
|
||||
}
|
||||
// TODO:Check it later
|
||||
forEach AllObjects (class'KF_RotatingMeshActor', tempR)
|
||||
{
|
||||
if(tempR.bBlockActors == false)
|
||||
{
|
||||
tempR.bHidden = true;
|
||||
if(tempR.bStatic)
|
||||
tempR.ResetStaticFilterState();
|
||||
cachedRotatingMeshActors[cachedRotatingMeshActors.length] = tempR;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function checkAvailability()
|
||||
{
|
||||
local int i;
|
||||
|
||||
if (cachedStaticMeshes.length > 0)
|
||||
{
|
||||
for (i = 0; i < cachedStaticMeshes.length && cachedStaticMeshes[i] == none; i++)
|
||||
cachedStaticMeshes.remove(i, 1);
|
||||
}
|
||||
|
||||
if (cachedLights.length > 0)
|
||||
{
|
||||
for (i = 0; i < cachedLights.length && cachedLights[i] == none; i++)
|
||||
cachedLights.remove(i, 1);
|
||||
}
|
||||
|
||||
if (cachedEmitters.length > 0)
|
||||
{
|
||||
for (i = 0; i < cachedEmitters.length && (cachedEmitters[i] == none || cachedEmitters[i].bDeleteMe); i++)
|
||||
cachedEmitters.remove(i, 1);
|
||||
}
|
||||
|
||||
if (cachedDecorations.length > 0)
|
||||
{
|
||||
for (i = 0; i < cachedDecorations.length && cachedDecorations[i] == none; i++)
|
||||
cachedDecorations.remove(i, 1);
|
||||
}
|
||||
|
||||
if (cachedMovers.length > 0)
|
||||
{
|
||||
for (i = 0; i < cachedMovers.length && cachedMovers[i] == none; i++)
|
||||
cachedMovers.remove(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=GUIButton Name=HideAllActorsButton
|
||||
Caption="Hide cached"
|
||||
WinTop=0.722000
|
||||
WinLeft=0.605000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_Old.ButtonClicked
|
||||
OnKeyEvent=HideAllActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_HideAllActors=GUIButton'HideMut.menu_Old.HideAllActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=ShowAllActorsButton
|
||||
Caption="Unhide cached"
|
||||
WinTop=0.722000
|
||||
WinLeft=0.700000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_Old.ButtonClicked
|
||||
OnKeyEvent=ShowAllActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ShowAllActors=GUIButton'HideMut.menu_Old.ShowAllActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=CacheAllActorsButton
|
||||
Caption="Cache"
|
||||
MenuState=MSAT_Disabled
|
||||
WinTop=0.712000
|
||||
WinLeft=0.405000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_Old.ButtonClicked
|
||||
OnKeyEvent=CacheAllActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_CacheAllActors=GUIButton'HideMut.menu_Old.CacheAllActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=UncacheAllActorsButton
|
||||
Caption="Uncache"
|
||||
MenuState=MSAT_Disabled
|
||||
WinTop=0.712000
|
||||
WinLeft=0.505000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_Old.ButtonClicked
|
||||
OnKeyEvent=UncacheAllActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_UncacheAllActors=GUIButton'HideMut.menu_Old.UncacheAllActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=RefreshScreenButton
|
||||
Caption="Just button"
|
||||
WinTop=0.722000
|
||||
WinLeft=0.795000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_Old.ButtonClicked
|
||||
OnKeyEvent=RefreshScreenButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_RefreshScreen=GUIButton'HideMut.menu_Old.RefreshScreenButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=DisplayCachedActorsButton
|
||||
Caption="Display cached"
|
||||
WinTop=0.722000
|
||||
WinLeft=0.305000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_Old.ButtonClicked
|
||||
OnKeyEvent=DisplayCachedActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_DisplayCachedActors=GUIButton'HideMut.menu_Old.DisplayCachedActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=ValidateCachedActorsButton
|
||||
Caption="Validate cache"
|
||||
MenuState=MSAT_Disabled
|
||||
WinTop=0.722000
|
||||
WinLeft=0.210000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_Old.ButtonClicked
|
||||
OnKeyEvent=ValidateCachedActorsButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ValidateCachedActors=GUIButton'HideMut.menu_Old.ValidateCachedActorsButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=ClearCacheButton
|
||||
Caption="Clear cache"
|
||||
WinTop=0.722000
|
||||
WinLeft=0.115000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_Old.ButtonClicked
|
||||
OnKeyEvent=ClearCacheButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ClearCache=GUIButton'HideMut.menu_Old.ClearCacheButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=ActivateInteractionButton
|
||||
Caption="Run interaction"
|
||||
WinTop=0.712000
|
||||
WinLeft=0.015000
|
||||
WinWidth=0.090000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_Old.ButtonClicked
|
||||
OnKeyEvent=ActivateInteractionButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ActivateInteraction=GUIButton'HideMut.menu_Old.ActivateInteractionButton'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=ListArea
|
||||
WinTop=0.550000
|
||||
WinLeft=0.400000
|
||||
WinWidth=0.200000
|
||||
WinHeight=0.150000
|
||||
End Object
|
||||
a_List=BackgroundArea'HideMut.menu_Old.ListArea'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ActortListsListBox
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ActortListsListBox.InternalOnCreateComponent
|
||||
WinTop=0.557000
|
||||
WinLeft=0.403000
|
||||
WinWidth=0.194000
|
||||
WinHeight=0.140000
|
||||
End Object
|
||||
lb_ActortListsList=GUIListBox'HideMut.menu_Old.ActortListsListBox'
|
||||
|
||||
Begin Object Class=GUILabel Name=WeaponListLabel
|
||||
Caption="Current map"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
Hint="Current map"
|
||||
WinTop=0.530000
|
||||
WinLeft=0.400000
|
||||
WinWidth=0.200000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_WeaponList=GUILabel'HideMut.menu_Old.WeaponListLabel'
|
||||
|
||||
bPersistent=True
|
||||
bAllowedAsLast=True
|
||||
WinTop=0.700000
|
||||
WinLeft=0.400000
|
||||
WinWidth=0.200000
|
||||
WinHeight=0.100000
|
||||
OnKeyEvent=menu_Old.closeWindowWithBind
|
||||
}
|
||||
778
kf_sources/HideMut/Classes/menu_WeaponManager.uc
Normal file
778
kf_sources/HideMut/Classes/menu_WeaponManager.uc
Normal file
|
|
@ -0,0 +1,778 @@
|
|||
class menu_WeaponManager extends GUIPage
|
||||
transient;
|
||||
|
||||
|
||||
//=============================================================================
|
||||
var PlayerController pc;
|
||||
var a_WeaponManager a_weaponManager;
|
||||
var string colorG, colorR;
|
||||
|
||||
|
||||
var automated BackgroundArea ba_Group1, ba_Group2, ba_Group3, ba_Group4,
|
||||
ba_Group5, ba_Group6, ba_Group7, ba_Group8,
|
||||
ba_Group9, ba_Presets;
|
||||
|
||||
var automated GUIListBox lb_Group1, lb_Group2, lb_Group3, lb_Group4,
|
||||
lb_Group5, lb_Group6, lb_Group7, lb_Group8,
|
||||
lb_Group9, lb_Presets;
|
||||
|
||||
var GUIList li_Group1, li_Group2, li_Group3, li_Group4,
|
||||
li_Group5, li_Group6, li_Group7, li_Group8,
|
||||
li_Group9, li_Presets;
|
||||
|
||||
var automated GUIButton b_VanillaReset, b_BasicCleaning, b_FullCleaning,
|
||||
b_SavePreset, b_DeletePreset;
|
||||
|
||||
var automated moEditBox eb_PresetName;
|
||||
|
||||
var automated moCheckbox cb_UseVanillaManagement, cb_FastWeaponChanging;
|
||||
|
||||
var automated GUILabel l_Group1, l_Group2, l_Group3, l_Group4,
|
||||
l_Group5, l_Group6, l_Group7, l_Group8,
|
||||
l_Group9, l_Presets;
|
||||
|
||||
|
||||
//=============================================================================
|
||||
simulated function initComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
super.initComponent(MyController,MyOwner);
|
||||
|
||||
pc = playerOwner();
|
||||
SetupHmi();
|
||||
|
||||
li_Group1 = lb_Group1.List;
|
||||
li_Group1.TextAlign = TXTA_Left;
|
||||
li_Group1.bMultiSelect = true;
|
||||
li_Group1.bDropSource = true;
|
||||
li_Group1.bDropTarget = true;
|
||||
li_Group1.OnDblClick = ListDblClick;
|
||||
// li_Group1.bDrawSelectionBorder = true;
|
||||
|
||||
li_Group2 = lb_Group2.List;
|
||||
li_Group2.TextAlign = TXTA_Left;
|
||||
li_Group2.bMultiSelect = true;
|
||||
li_Group2.bDropSource = true;
|
||||
li_Group2.bDropTarget = true;
|
||||
li_Group2.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group3 = lb_Group3.List;
|
||||
li_Group3.TextAlign = TXTA_Left;
|
||||
li_Group3.bMultiSelect = true;
|
||||
li_Group3.bDropSource = true;
|
||||
li_Group3.bDropTarget = true;
|
||||
li_Group3.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group4 = lb_Group4.List;
|
||||
li_Group4.TextAlign = TXTA_Left;
|
||||
li_Group4.bMultiSelect = true;
|
||||
li_Group4.bDropSource = true;
|
||||
li_Group4.bDropTarget = true;
|
||||
li_Group4.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group5 = lb_Group5.List;
|
||||
li_Group5.TextAlign = TXTA_Left;
|
||||
li_Group5.bMultiSelect = true;
|
||||
li_Group5.bDropSource = true;
|
||||
li_Group5.bDropTarget = true;
|
||||
li_Group5.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group6 = lb_Group6.List;
|
||||
li_Group6.TextAlign = TXTA_Left;
|
||||
li_Group6.bMultiSelect = true;
|
||||
li_Group6.bDropSource = true;
|
||||
li_Group6.bDropTarget = true;
|
||||
li_Group6.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group7 = lb_Group7.List;
|
||||
li_Group7.TextAlign = TXTA_Left;
|
||||
li_Group7.bMultiSelect = true;
|
||||
li_Group7.bDropSource = true;
|
||||
li_Group7.bDropTarget = true;
|
||||
li_Group7.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group8 = lb_Group8.List;
|
||||
li_Group8.TextAlign = TXTA_Left;
|
||||
li_Group8.bMultiSelect = true;
|
||||
li_Group8.bDropSource = true;
|
||||
li_Group8.bDropTarget = true;
|
||||
li_Group8.OnDblClick = ListDblClick;
|
||||
|
||||
li_Group9 = lb_Group9.List;
|
||||
li_Group9.TextAlign = TXTA_Left;
|
||||
li_Group9.bMultiSelect = true;
|
||||
li_Group9.bDropSource = true;
|
||||
li_Group9.bDropTarget = true;
|
||||
li_Group9.OnDblClick = ListDblClick;
|
||||
|
||||
li_Presets = lb_Presets.List;
|
||||
li_Presets.TextAlign = TXTA_Left;
|
||||
li_Presets.bMultiSelect = true;
|
||||
li_Presets.bDropSource = true;
|
||||
li_Presets.bDropTarget = true;
|
||||
li_Presets.OnDblClick = ListDblClick;
|
||||
|
||||
colorG = chr(27)$chr(1)$chr(240)$chr(1);
|
||||
colorR = chr(27)$chr(240)$chr(1)$chr(1);
|
||||
|
||||
refreshLists();
|
||||
refreshPresetNames();
|
||||
}
|
||||
|
||||
|
||||
event opened(GUIComponent sender)
|
||||
{
|
||||
// local int i;
|
||||
// local string KeyName;
|
||||
// local array<string> KeyNames;
|
||||
|
||||
super.opened(sender);
|
||||
|
||||
pc = playerOwner();
|
||||
SetupHmi();
|
||||
|
||||
refreshLists();
|
||||
refreshPresetNames();
|
||||
|
||||
cb_UseVanillaManagement.SetComponentValue(a_weaponManager.bUseVanillaManagement, true);
|
||||
cb_FastWeaponChanging.SetComponentValue(a_weaponManager.bFastWeaponChanging, true);
|
||||
|
||||
// write in KeyNames all bind keys that onen this window to use 'closeWindowWithBind()' then
|
||||
// CloseKey.Remove(0, CloseKey.Length);
|
||||
// KeyName = PC.ConsoleCommand("BINDINGTOKEY hideMenu");
|
||||
// Split(KeyName, ",", KeyNames);
|
||||
// for (i = 0; i < KeyNames.Length; i++)
|
||||
// CloseKey[CloseKey.Length] = byte(PC.ConsoleCommand("KEYNUMBER"@KeyNames[i]));
|
||||
}
|
||||
|
||||
|
||||
final private function SetupHmi()
|
||||
{
|
||||
local HideMutInteraction tempHmi;
|
||||
|
||||
forEach AllObjects(class'HideMutInteraction', tempHmi)
|
||||
break;
|
||||
|
||||
if (tempHmi.a_weaponManager == none)
|
||||
tempHmi.a_weaponManager = pc.Spawn(class'a_WeaponManager');
|
||||
|
||||
tempHmi.a_weaponManager.kfpc = KFPlayerController(pc);
|
||||
a_weaponManager = tempHmi.a_weaponManager;
|
||||
}
|
||||
|
||||
|
||||
simulated function closed(GUIComponent sender, bool bCancelled)
|
||||
{
|
||||
eb_PresetName.SetComponentValue("");
|
||||
super.closed(sender, bCancelled);
|
||||
saveChanges();
|
||||
}
|
||||
|
||||
|
||||
simulated function refreshLists()
|
||||
{
|
||||
RefreshGUIList(li_Group1, a_weaponManager.weaponGroup1);
|
||||
RefreshGUIList(li_Group2, a_weaponManager.weaponGroup2);
|
||||
RefreshGUIList(li_Group3, a_weaponManager.weaponGroup3);
|
||||
RefreshGUIList(li_Group4, a_weaponManager.weaponGroup4);
|
||||
RefreshGUIList(li_Group5, a_weaponManager.weaponGroup5);
|
||||
RefreshGUIList(li_Group6, a_weaponManager.weaponGroup6);
|
||||
RefreshGUIList(li_Group7, a_weaponManager.weaponGroup7);
|
||||
RefreshGUIList(li_Group8, a_weaponManager.weaponGroup8);
|
||||
|
||||
a_weaponManager.updateUnusedWeapons();
|
||||
RefreshGUIList(li_Group9, a_weaponManager.weaponGroup9);
|
||||
}
|
||||
|
||||
|
||||
final private function RefreshGUIList(GUIList gList, array<string> weaponGroup)
|
||||
{
|
||||
local int i;
|
||||
local class<KFWeapon> tempWeaponClass;
|
||||
|
||||
// cleanup first
|
||||
gList.clear();
|
||||
|
||||
for (i = 0; i < weaponGroup.length; i++)
|
||||
{
|
||||
tempWeaponClass = class<KFWeapon>(DynamicLoadObject(weaponGroup[i], class'Class', true));
|
||||
if (tempWeaponClass != none)
|
||||
gList.add(getColor(weaponGroup[i])$tempWeaponClass.default.itemName,,weaponGroup[i]);
|
||||
else
|
||||
gList.add(colorR$weaponGroup[i],,weaponGroup[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function refreshPresetNames()
|
||||
{
|
||||
local array<String> names;
|
||||
local int i;
|
||||
|
||||
li_Presets.clear();
|
||||
|
||||
names = a_weaponManager.getAllPresetNames();
|
||||
for ( i = 0; i < names.length; i++ )
|
||||
li_Presets.add(names[i]);
|
||||
}
|
||||
|
||||
|
||||
simulated function string getColor(string weaponClass)
|
||||
{
|
||||
local Inventory inv;
|
||||
|
||||
if (pc.pawn == none)
|
||||
return "";
|
||||
|
||||
for (inv = pc.pawn.inventory; inv != none; inv = inv.inventory)
|
||||
{
|
||||
if (string(inv.class) ~= weaponClass)
|
||||
{
|
||||
return colorG;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
simulated function saveChanges()
|
||||
{
|
||||
local int i;
|
||||
|
||||
a_weaponManager.clearAllGroups();
|
||||
|
||||
for(i = 0; i < li_Group1.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup1[a_weaponManager.weaponGroup1.length] = li_Group1.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group2.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup2[a_weaponManager.weaponGroup2.length] = li_Group2.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group3.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup3[a_weaponManager.weaponGroup3.length] = li_Group3.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group4.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup4[a_weaponManager.weaponGroup4.length] = li_Group4.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group5.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup5[a_weaponManager.weaponGroup5.length] = li_Group5.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group6.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup6[a_weaponManager.weaponGroup6.length] = li_Group6.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group7.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup7[a_weaponManager.weaponGroup7.length] = li_Group7.elements[i].ExtraStrData;
|
||||
}
|
||||
for(i = 0; i < li_Group8.elements.length; i++)
|
||||
{
|
||||
a_weaponManager.weaponGroup8[a_weaponManager.weaponGroup8.length] = li_Group8.elements[i].ExtraStrData;
|
||||
}
|
||||
a_weaponManager.updateUnusedWeapons(); //weaponGroup9
|
||||
|
||||
a_weaponManager.saveWeaponList("CurrentWeaponList");
|
||||
}
|
||||
|
||||
|
||||
function checkboxUsed(GUIComponent sender)
|
||||
{
|
||||
switch (sender)
|
||||
{
|
||||
case cb_UseVanillaManagement:
|
||||
a_weaponManager.bUseVanillaManagement = cb_UseVanillaManagement.isChecked();
|
||||
a_weaponManager.SaveConfig();
|
||||
break;
|
||||
case cb_FastWeaponChanging:
|
||||
a_weaponManager.bFastWeaponChanging = cb_FastWeaponChanging.isChecked();
|
||||
a_weaponManager.SaveConfig();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function bool buttonClicked(GUIComponent sender)
|
||||
{
|
||||
switch (sender)
|
||||
{
|
||||
case b_VanillaReset:
|
||||
a_weaponManager.fullReset();
|
||||
refreshLists();
|
||||
break;
|
||||
case b_BasicCleaning:
|
||||
a_weaponManager.basicCleaning();
|
||||
refreshLists();
|
||||
break;
|
||||
case b_FullCleaning:
|
||||
a_weaponManager.fullCleaning();
|
||||
refreshLists();
|
||||
break;
|
||||
case b_SavePreset:
|
||||
addNewPreset();
|
||||
break;
|
||||
case b_DeletePreset:
|
||||
a_weaponManager.deleteWeaponList(li_Presets.get());
|
||||
li_Presets.removeItem(li_Presets.get());
|
||||
eb_PresetName.SetComponentValue("");
|
||||
break;
|
||||
}
|
||||
|
||||
// ADDITION
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function bool ListDblClick(GUIComponent C)
|
||||
{
|
||||
if (C == li_Group1 || C == li_Group2 || C == li_Group3 || C == li_Group4 || C == li_Group5 || C == li_Group6 || C == li_Group7 || C == li_Group8 || C == li_Group9)
|
||||
return buyWeaponFromList(c);
|
||||
if (C == li_Presets)
|
||||
{
|
||||
a_weaponManager.loadWeaponList(li_Presets.get());
|
||||
refreshLists();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
final private function bool buyWeaponFromList(GUIList gList)
|
||||
{
|
||||
local class<KFWeapon> weaponToBuy;
|
||||
|
||||
if (KFPawn(pc.pawn) == none)
|
||||
return false;
|
||||
|
||||
weaponToBuy = class<KFWeapon>(DynamicLoadObject(gList.getExtra(), class'Class', true));
|
||||
|
||||
if (weaponToBuy == none)
|
||||
return false;
|
||||
|
||||
KFPawn(pc.pawn).serverBuyWeapon(weaponToBuy, 0);
|
||||
saveChanges();
|
||||
refreshLists();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function addNewPreset()
|
||||
{
|
||||
if (len(eb_PresetName.getComponentValue()) == 0)
|
||||
{
|
||||
pc.clientMessage("Please, type at least 1 character of preset's name");
|
||||
return;
|
||||
}
|
||||
if (inStr(eb_PresetName.getComponentValue(), " ") > 0)
|
||||
{
|
||||
pc.clientMessage("Don't use spaces at preset's name");
|
||||
return;
|
||||
}
|
||||
|
||||
saveChanges();
|
||||
|
||||
a_weaponManager.saveWeaponList(eb_PresetName.GetComponentValue());
|
||||
li_Presets.add(eb_PresetName.GetComponentValue());
|
||||
eb_PresetName.SetComponentValue("");
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group1
|
||||
WinTop=0.100000
|
||||
WinLeft=0.180000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group1=BackgroundArea'HideMut.menu_WeaponManager.BackgroundArea_Group1'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group2
|
||||
WinTop=0.100000
|
||||
WinLeft=0.345000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group2=BackgroundArea'HideMut.menu_WeaponManager.BackgroundArea_Group2'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group3
|
||||
WinTop=0.100000
|
||||
WinLeft=0.510000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group3=BackgroundArea'HideMut.menu_WeaponManager.BackgroundArea_Group3'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group4
|
||||
WinTop=0.100000
|
||||
WinLeft=0.675000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group4=BackgroundArea'HideMut.menu_WeaponManager.BackgroundArea_Group4'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group5
|
||||
WinTop=0.100000
|
||||
WinLeft=0.840000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group5=BackgroundArea'HideMut.menu_WeaponManager.BackgroundArea_Group5'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group6
|
||||
WinTop=0.450000
|
||||
WinLeft=0.180000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group6=BackgroundArea'HideMut.menu_WeaponManager.BackgroundArea_Group6'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group7
|
||||
WinTop=0.450000
|
||||
WinLeft=0.345000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group7=BackgroundArea'HideMut.menu_WeaponManager.BackgroundArea_Group7'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group8
|
||||
WinTop=0.450000
|
||||
WinLeft=0.510000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Group8=BackgroundArea'HideMut.menu_WeaponManager.BackgroundArea_Group8'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Group9
|
||||
WinTop=0.100000
|
||||
WinLeft=0.015000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.800000
|
||||
End Object
|
||||
ba_Group9=BackgroundArea'HideMut.menu_WeaponManager.BackgroundArea_Group9'
|
||||
|
||||
Begin Object Class=BackgroundArea Name=BackgroundArea_Presets
|
||||
WinTop=0.450000
|
||||
WinLeft=0.840000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.304000
|
||||
End Object
|
||||
ba_Presets=BackgroundArea'HideMut.menu_WeaponManager.BackgroundArea_Presets'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group1
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group1.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.182000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group1=GUIListBox'HideMut.menu_WeaponManager.ListBox_Group1'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group2
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group2.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.347000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group2=GUIListBox'HideMut.menu_WeaponManager.ListBox_Group2'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group3
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group3.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.512000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group3=GUIListBox'HideMut.menu_WeaponManager.ListBox_Group3'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group4
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group4.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.677000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group4=GUIListBox'HideMut.menu_WeaponManager.ListBox_Group4'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group5
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group5.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.842000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group5=GUIListBox'HideMut.menu_WeaponManager.ListBox_Group5'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group6
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group6.InternalOnCreateComponent
|
||||
WinTop=0.452000
|
||||
WinLeft=0.182000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group6=GUIListBox'HideMut.menu_WeaponManager.ListBox_Group6'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group7
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group7.InternalOnCreateComponent
|
||||
WinTop=0.452000
|
||||
WinLeft=0.347000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group7=GUIListBox'HideMut.menu_WeaponManager.ListBox_Group7'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group8
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group8.InternalOnCreateComponent
|
||||
WinTop=0.452000
|
||||
WinLeft=0.512000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Group8=GUIListBox'HideMut.menu_WeaponManager.ListBox_Group8'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Group9
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Group9.InternalOnCreateComponent
|
||||
WinTop=0.102000
|
||||
WinLeft=0.017000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.796000
|
||||
End Object
|
||||
lb_Group9=GUIListBox'HideMut.menu_WeaponManager.ListBox_Group9'
|
||||
|
||||
Begin Object Class=GUIListBox Name=ListBox_Presets
|
||||
bVisibleWhenEmpty=True
|
||||
OnCreateComponent=ListBox_Presets.InternalOnCreateComponent
|
||||
WinTop=0.452000
|
||||
WinLeft=0.842000
|
||||
WinWidth=0.146000
|
||||
WinHeight=0.300000
|
||||
End Object
|
||||
lb_Presets=GUIListBox'HideMut.menu_WeaponManager.ListBox_Presets'
|
||||
|
||||
Begin Object Class=GUIButton Name=VanillaResetButton
|
||||
Caption="Full reset"
|
||||
WinTop=0.450000
|
||||
WinLeft=0.675000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_WeaponManager.ButtonClicked
|
||||
OnKeyEvent=VanillaResetButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_VanillaReset=GUIButton'HideMut.menu_WeaponManager.VanillaResetButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=BasicCleaningButton
|
||||
Caption="Basic cleaning"
|
||||
WinTop=0.550000
|
||||
WinLeft=0.675000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_WeaponManager.ButtonClicked
|
||||
OnKeyEvent=BasicCleaningButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_BasicCleaning=GUIButton'HideMut.menu_WeaponManager.BasicCleaningButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=FullCleaningButton
|
||||
Caption="Full cleaning"
|
||||
WinTop=0.650000
|
||||
WinLeft=0.675000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.080000
|
||||
OnClick=menu_WeaponManager.ButtonClicked
|
||||
OnKeyEvent=FullCleaningButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_FullCleaning=GUIButton'HideMut.menu_WeaponManager.FullCleaningButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=SavePresetButton
|
||||
Caption="Save"
|
||||
WinTop=0.787000
|
||||
WinLeft=0.840000
|
||||
WinWidth=0.074000
|
||||
WinHeight=0.050000
|
||||
OnClick=menu_WeaponManager.ButtonClicked
|
||||
OnKeyEvent=SavePresetButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_SavePreset=GUIButton'HideMut.menu_WeaponManager.SavePresetButton'
|
||||
|
||||
Begin Object Class=GUIButton Name=DeletePresetButton
|
||||
Caption="Delete"
|
||||
WinTop=0.787000
|
||||
WinLeft=0.916000
|
||||
WinWidth=0.073000
|
||||
WinHeight=0.050000
|
||||
OnClick=menu_WeaponManager.ButtonClicked
|
||||
OnKeyEvent=DeletePresetButton.InternalOnKeyEvent
|
||||
End Object
|
||||
b_DeletePreset=GUIButton'HideMut.menu_WeaponManager.DeletePresetButton'
|
||||
|
||||
Begin Object Class=moEditBox Name=EditBoxPresetName
|
||||
CaptionWidth=0.000000
|
||||
OnCreateComponent=EditBoxPresetName.InternalOnCreateComponent
|
||||
WinTop=0.754000
|
||||
WinLeft=0.840000
|
||||
WinWidth=0.150000
|
||||
End Object
|
||||
eb_PresetName=moEditBox'HideMut.menu_WeaponManager.EditBoxPresetName'
|
||||
|
||||
Begin Object Class=moCheckBox Name=checkBox_UseVanillaManagement
|
||||
Caption="Native system"
|
||||
OnCreateComponent=checkBox_UseVanillaManagement.InternalOnCreateComponent
|
||||
WinTop=0.020000
|
||||
WinLeft=0.050000
|
||||
WinWidth=0.100000
|
||||
WinHeight=0.100000
|
||||
OnChange=menu_WeaponManager.checkboxUsed
|
||||
End Object
|
||||
cb_UseVanillaManagement=moCheckBox'HideMut.menu_WeaponManager.checkBox_UseVanillaManagement'
|
||||
|
||||
Begin Object Class=moCheckBox Name=checkBox_FastWeaponChanging
|
||||
Caption="Instaswitching"
|
||||
OnCreateComponent=checkBox_FastWeaponChanging.InternalOnCreateComponent
|
||||
WinTop=0.020000
|
||||
WinLeft=0.250000
|
||||
WinWidth=0.100000
|
||||
WinHeight=0.100000
|
||||
OnChange=menu_WeaponManager.checkboxUsed
|
||||
End Object
|
||||
cb_FastWeaponChanging=moCheckBox'HideMut.menu_WeaponManager.checkBox_FastWeaponChanging'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group1Label
|
||||
Caption="Group 1"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.180000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group1=GUILabel'HideMut.menu_WeaponManager.Group1Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group2Label
|
||||
Caption="Group 2"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.345000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group2=GUILabel'HideMut.menu_WeaponManager.Group2Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group3Label
|
||||
Caption="Group 3"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.512000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group3=GUILabel'HideMut.menu_WeaponManager.Group3Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group4Label
|
||||
Caption="Group 4"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.677000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group4=GUILabel'HideMut.menu_WeaponManager.Group4Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group5Label
|
||||
Caption="Group 5"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.842000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group5=GUILabel'HideMut.menu_WeaponManager.Group5Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group6Label
|
||||
Caption="Group 6"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.422000
|
||||
WinLeft=0.180000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group6=GUILabel'HideMut.menu_WeaponManager.Group6Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group7Label
|
||||
Caption="Group 7"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.422000
|
||||
WinLeft=0.345000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group7=GUILabel'HideMut.menu_WeaponManager.Group7Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group8Label
|
||||
Caption="Group 8"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.422000
|
||||
WinLeft=0.510000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group8=GUILabel'HideMut.menu_WeaponManager.Group8Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=Group9Label
|
||||
Caption="Group 9 [Unused weapons]"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.070000
|
||||
WinLeft=0.015000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Group9=GUILabel'HideMut.menu_WeaponManager.Group9Label'
|
||||
|
||||
Begin Object Class=GUILabel Name=PresetsLabel
|
||||
Caption="Presets"
|
||||
TextAlign=TXTA_Center
|
||||
VertAlign=TXTA_Center
|
||||
StyleName="TextLabel"
|
||||
WinTop=0.422000
|
||||
WinLeft=0.842000
|
||||
WinWidth=0.150000
|
||||
WinHeight=0.020000
|
||||
End Object
|
||||
l_Presets=GUILabel'HideMut.menu_WeaponManager.PresetsLabel'
|
||||
|
||||
bRenderWorld=True
|
||||
bRequire640x480=False
|
||||
bPersistent=True
|
||||
bAllowedAsLast=True
|
||||
BackgroundRStyle=MSTY_Modulated
|
||||
}
|
||||
1948
kf_sources/HideMut/Classes/menu_c_HideMut.uc
Normal file
1948
kf_sources/HideMut/Classes/menu_c_HideMut.uc
Normal file
File diff suppressed because it is too large
Load diff
954
kf_sources/HideMut/Classes/menu_c_Light.uc
Normal file
954
kf_sources/HideMut/Classes/menu_c_Light.uc
Normal file
|
|
@ -0,0 +1,954 @@
|
|||
class menu_c_Light extends GUI2K4.MidGamePanel
|
||||
config(HideMut);
|
||||
|
||||
// =================================================================Interface section
|
||||
var automated GUISectionBackground sb_ControlsAllMap, sb_Stats, sb_Tweaker;
|
||||
|
||||
var automated moNumericEdit nu_Radius, nu_newRadius, nu_maxRadius, nu_LightCone,
|
||||
nu_LightPeriod, nu_LightBrightness,
|
||||
nu_LightHue, nu_LightSaturation, nu_LightEffect, nu_LightType;
|
||||
|
||||
var automated MOCheckBox ch_Optimize, ch_RemoveFlickering, ch_FlickeringToStatic,
|
||||
ch_ActorShadows, ch_AttenByLife, ch_bCorona,
|
||||
ch_bDirectionalCorona, ch_bDynamicLight, ch_bLightingVisibility,
|
||||
ch_bSpecialLit;
|
||||
|
||||
var automated GUIScrollTextBox lb_Actions;
|
||||
|
||||
var automated GUIButton b_HideLights, b_OptAllLights, b_MakeAllLightVisible, b_DisableCoronas,
|
||||
b_SaveConfig, b_OptStatic, b_ClearLog;
|
||||
|
||||
// ====================================================================End of interface section
|
||||
|
||||
var transient array<Light> CachedLights; // Cached lights for checks, stats and etc.
|
||||
var transient array<TriggerLight> CachedTriggerLights; // Cached trigger lights just in case
|
||||
var transient array<int> LightColors; // Unique light colors
|
||||
var bool bCached; // Prevents multiple caching
|
||||
var int maxRadius_L, maxRadius_TL; // Max radius for light sources(trigger light and lights)
|
||||
|
||||
// ==========================================config variables
|
||||
var config bool bActorShadows, bAttenByLife, bLightingVisibility, bCorona, bDirectionalCorona,
|
||||
bSpecialLit, // Tweaker
|
||||
Optimize, RemoveFlickering, FlickeringToStatic;
|
||||
|
||||
var config int NewRadius, maxRadius;
|
||||
|
||||
var config byte byteRadius, byteLightBrightness, byteLightHue, byteLightSaturation, byteLightType,
|
||||
byteLightEffect, byteLightCone, byteLightPeriod;
|
||||
|
||||
// ==========================================end of config variables
|
||||
var PlayerController PC;
|
||||
var bool IsUnlited, bConfigLoaded;
|
||||
|
||||
simulated function InitComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
local GUIButton B;
|
||||
local string s;
|
||||
local int i;
|
||||
|
||||
super.InitComponent(MyController,MyOwner);
|
||||
|
||||
PC = PlayerOwner();
|
||||
|
||||
sb_Stats.ManageComponent(lb_Actions);
|
||||
sb_Stats.ManageComponent(b_ClearLog);
|
||||
|
||||
sb_Tweaker.ManageComponent(nu_newRadius);
|
||||
sb_Tweaker.ManageComponent(nu_maxRadius);
|
||||
sb_Tweaker.ManageComponent(ch_Optimize);
|
||||
sb_Tweaker.ManageComponent(ch_RemoveFlickering);
|
||||
sb_Tweaker.ManageComponent(ch_FlickeringToStatic);
|
||||
sb_Tweaker.ManageComponent(b_HideLights);
|
||||
sb_Tweaker.ManageComponent(b_DisableCoronas);
|
||||
sb_Tweaker.ManageComponent(b_OptStatic);
|
||||
|
||||
sb_ControlsAllMap.ManageComponent(nu_Radius);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightCone);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightPeriod);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightBrightness);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightHue);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightSaturation);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightEffect);
|
||||
sb_ControlsAllMap.ManageComponent(nu_LightType);
|
||||
sb_ControlsAllMap.ManageComponent(ch_ActorShadows);
|
||||
sb_ControlsAllMap.ManageComponent(ch_AttenByLife);
|
||||
sb_ControlsAllMap.ManageComponent(ch_bCorona);
|
||||
sb_ControlsAllMap.ManageComponent(ch_bDirectionalCorona);
|
||||
sb_ControlsAllMap.ManageComponent(ch_bDynamicLight);
|
||||
sb_ControlsAllMap.ManageComponent(ch_bLightingVisibility);
|
||||
sb_ControlsAllMap.ManageComponent(ch_bSpecialLit);
|
||||
sb_ControlsAllMap.ManageComponent(b_OptAllLights);
|
||||
sb_ControlsAllMap.ManageComponent(b_SaveConfig);
|
||||
sb_ControlsAllMap.ManageComponent(b_MakeAllLightVisible);
|
||||
|
||||
// For resizing buttons
|
||||
s = GetSizingCaption();
|
||||
|
||||
for (i = 0; i < Controls.length; i++)
|
||||
{
|
||||
B = GUIButton(Controls[i]);
|
||||
if (B != none)
|
||||
{
|
||||
B.bAutoSize = true;
|
||||
B.SizingCaption = s;
|
||||
B.AutoSizePadding.HorzPerc = 0.04;
|
||||
B.AutoSizePadding.VertPerc = 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
ch_ActorShadows.Checked(bActorShadows);
|
||||
ch_AttenByLife.Checked(bAttenByLife);
|
||||
nu_Radius.SetValue(byteRadius);
|
||||
ch_bLightingVisibility.Checked(bLightingVisibility);
|
||||
ch_bCorona.Checked(bCorona);
|
||||
ch_bDirectionalCorona.Checked(bDirectionalCorona);
|
||||
nu_LightBrightness.SetValue(byteLightBrightness);
|
||||
nu_LightHue.SetValue(byteLightHue);
|
||||
nu_LightSaturation.SetValue(byteLightSaturation);
|
||||
ch_bSpecialLit.Checked(bSpecialLit);
|
||||
nu_LightType.SetValue(byteLightType);
|
||||
nu_LightEffect.SetValue(byteLightEffect);
|
||||
nu_LightCone.SetValue(byteLightCone);
|
||||
nu_LightPeriod.SetValue(byteLightPeriod);
|
||||
}
|
||||
|
||||
|
||||
function string GetSizingCaption()
|
||||
{
|
||||
local int i;
|
||||
local string S;
|
||||
|
||||
for (i = 0; i < Controls.length; i++)
|
||||
if (GUIButton(Controls[i]) != none)
|
||||
if (S == "" || Len(GUIButton(Controls[i]).Caption) > Len(S))
|
||||
S = GUIButton(Controls[i]).Caption;
|
||||
|
||||
return S;
|
||||
}
|
||||
|
||||
|
||||
function ShowPanel(bool bShow)
|
||||
{
|
||||
super.ShowPanel(bShow);
|
||||
|
||||
if (bShow)
|
||||
CacheLights();
|
||||
}
|
||||
|
||||
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
super.Opened(Sender);
|
||||
|
||||
// Caching lights
|
||||
if (!bCached)
|
||||
{
|
||||
CacheLights();
|
||||
}
|
||||
|
||||
if (!bConfigLoaded)
|
||||
{
|
||||
LoadLightConfig();
|
||||
bConfigLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function bool ButtonClicked(GUIComponent Sender)
|
||||
{
|
||||
// Caching lights
|
||||
if (!bCached)
|
||||
{
|
||||
CacheLights();
|
||||
}
|
||||
|
||||
switch (Sender)
|
||||
{
|
||||
case b_HideLights:
|
||||
OptLights(nu_newRadius.GetValue(), nu_maxRadius.GetValue(), ch_Optimize.IsChecked(), ch_RemoveFlickering.IsChecked(), ch_FlickeringToStatic.IsChecked());
|
||||
break;
|
||||
|
||||
case b_OptAllLights:
|
||||
OptAllLights();
|
||||
break;
|
||||
|
||||
case b_MakeAllLightVisible:
|
||||
AllLightVisible();
|
||||
break;
|
||||
|
||||
case b_DisableCoronas:
|
||||
RemoveCoronas();
|
||||
break;
|
||||
|
||||
case b_SaveConfig:
|
||||
SaveLightConfig();
|
||||
break;
|
||||
|
||||
case b_OptStatic:
|
||||
OptimizeStaticMeshes();
|
||||
break;
|
||||
|
||||
case b_ClearLog:
|
||||
lb_Actions.SetContent("");
|
||||
break;
|
||||
}
|
||||
|
||||
// Get lighting statistics
|
||||
StatLights();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
simulated function SaveLightConfig()
|
||||
{
|
||||
bActorShadows = ch_ActorShadows.IsChecked();
|
||||
bAttenByLife = ch_AttenByLife.IsChecked();
|
||||
byteRadius = nu_Radius.GetValue();
|
||||
bLightingVisibility = ch_bLightingVisibility.IsChecked();
|
||||
bCorona = ch_bCorona.IsChecked();
|
||||
bDirectionalCorona = ch_bDirectionalCorona.IsChecked();
|
||||
byteLightBrightness = nu_LightBrightness.GetValue();
|
||||
byteLightHue = nu_LightHue.GetValue();
|
||||
byteLightSaturation = nu_LightSaturation.GetValue();
|
||||
bSpecialLit = ch_bSpecialLit.IsChecked();
|
||||
byteLightType = nu_LightType.GetValue();
|
||||
byteLightEffect = nu_LightEffect.GetValue();
|
||||
byteLightCone = nu_LightCone.GetValue();
|
||||
byteLightPeriod = nu_LightPeriod.GetValue();
|
||||
|
||||
NewRadius = nu_newRadius.GetValue();
|
||||
maxRadius = nu_maxRadius.GetValue();
|
||||
Optimize = ch_Optimize.IsChecked();
|
||||
RemoveFlickering = ch_RemoveFlickering.IsChecked();
|
||||
FlickeringToStatic = ch_FlickeringToStatic.IsChecked();
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
|
||||
simulated function LoadLightConfig()
|
||||
{
|
||||
ch_ActorShadows.Checked(bActorShadows);
|
||||
ch_AttenByLife.Checked(bAttenByLife);
|
||||
nu_Radius.SetValue(byteRadius);
|
||||
ch_bLightingVisibility.Checked(bLightingVisibility);
|
||||
ch_bCorona.Checked(bCorona);
|
||||
ch_bDirectionalCorona.Checked(bDirectionalCorona);
|
||||
nu_LightBrightness.SetValue(byteLightBrightness);
|
||||
nu_LightHue.SetValue(byteLightHue);
|
||||
nu_LightSaturation.SetValue(byteLightSaturation);
|
||||
ch_bSpecialLit.Checked(bSpecialLit);
|
||||
nu_LightType.SetValue(byteLightType);
|
||||
nu_LightEffect.SetValue(byteLightEffect);
|
||||
nu_LightCone.SetValue(byteLightCone);
|
||||
nu_LightPeriod.SetValue(byteLightPeriod );
|
||||
|
||||
nu_newRadius.SetValue(NewRadius);
|
||||
nu_maxRadius.SetValue(maxRadius);
|
||||
ch_Optimize.Checked(Optimize);
|
||||
ch_RemoveFlickering.Checked(RemoveFlickering);
|
||||
ch_FlickeringToStatic.Checked(FlickeringToStatic);
|
||||
}
|
||||
|
||||
|
||||
simulated function AllLightVisible() // Toggle lights visibility
|
||||
{
|
||||
local int i;
|
||||
|
||||
for (i=0;i<CachedLights.length;i++)
|
||||
{
|
||||
if (CachedLights[i].bHidden)
|
||||
CachedLights[i].bHidden = false;
|
||||
else
|
||||
CachedLights[i].bHidden = true;
|
||||
|
||||
if (CachedLights[i].bStatic)
|
||||
CachedLights[i].ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function CacheLights() // Cache lights
|
||||
{
|
||||
local Light LE;
|
||||
local TriggerLight TL;
|
||||
local int i;
|
||||
|
||||
// Cached lights for checks, stats and etc.
|
||||
forEach AllObjects (class'Light', LE)
|
||||
{
|
||||
CachedLights[i] = LE;
|
||||
i++;
|
||||
}
|
||||
i=0;
|
||||
|
||||
// Cached TriggerLights
|
||||
forEach AllObjects (class'TriggerLight', TL)
|
||||
{
|
||||
CachedTriggerLights[i] = TL;
|
||||
i++;
|
||||
}
|
||||
|
||||
// Empty lights check
|
||||
if (CachedLights.length > 0 || CachedTriggerLights.Length > 0)
|
||||
bCached = true;
|
||||
}
|
||||
|
||||
|
||||
// Clear cache
|
||||
simulated function ClearCache()
|
||||
{
|
||||
CachedLights.Remove(0,CachedLights.Length);
|
||||
CachedTriggerLights.Remove(0,CachedTriggerLights.Length);
|
||||
bCached = false;
|
||||
}
|
||||
|
||||
|
||||
// Get max radius of light sources and triggerlight
|
||||
simulated function MaxRad(out int MRad, out int TlMRad)
|
||||
{
|
||||
local int i;
|
||||
|
||||
if (CachedLights.length == 0)
|
||||
return;
|
||||
|
||||
MRad = CachedLights[0].LightRadius;
|
||||
|
||||
// Find max radius
|
||||
for (i=0;i<CachedLights.length; i++)
|
||||
{
|
||||
if (CachedLights[i].LightRadius > MRad)
|
||||
{
|
||||
MRad = CachedLights[i].LightRadius ;
|
||||
}
|
||||
}
|
||||
|
||||
if (CachedTriggerLights.length == 0)
|
||||
return;
|
||||
|
||||
TlMRad = CachedTriggerLights[0].LightRadius;
|
||||
|
||||
// Find max radius
|
||||
for (i = 0; i < CachedTriggerLights.length; i++)
|
||||
{
|
||||
if (CachedLights[i].LightRadius > TlMRad)
|
||||
{
|
||||
TlMRad = CachedLights[i].LightRadius;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function GetUniqueColorsLights()
|
||||
{
|
||||
local int i, k, count;
|
||||
local bool bAlreadyIsIn;
|
||||
|
||||
if (CachedLights.Length == 0)
|
||||
return;
|
||||
|
||||
if (LightColors.Length == 0)
|
||||
{
|
||||
LightColors[0] = CachedLights[0].LightHue;
|
||||
count++;
|
||||
}
|
||||
|
||||
for (i = 0; i < CachedLights.length; i++)
|
||||
{
|
||||
for (k = 0; k < LightColors.length; k++) // Finding unique color
|
||||
{
|
||||
if (LightColors[k] == CachedLights[i].LightHue)
|
||||
{
|
||||
bAlreadyIsIn = true;
|
||||
break; // Already having dat color
|
||||
}
|
||||
}
|
||||
|
||||
if (!bAlreadyIsIn)
|
||||
{
|
||||
LightColors[count] = CachedLights[i].LightHue; // Adding unique light
|
||||
count++;
|
||||
}
|
||||
bAlreadyIsIn = false; // Next iteration
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Statistics
|
||||
simulated function StatLights() // Get light statistics
|
||||
{
|
||||
local int i, maxRadiusCountL, maxRadiusCountTL, SpecialLit_CountL, SpecialLit_CountTL;
|
||||
|
||||
if (maxRadius_TL == 0 || maxRadius_L == 0)
|
||||
{
|
||||
MaxRad(maxRadius_L, maxRadius_TL);
|
||||
}
|
||||
|
||||
if (CachedTriggerLights.length > 0)
|
||||
{
|
||||
for (i = 0; i < cachedTriggerLights.length; i++)
|
||||
{
|
||||
if (CachedTriggerLights[i].bSpecialLit)
|
||||
SpecialLit_CountTL++;
|
||||
if (CachedTriggerLights[i].LightRadius == maxRadius_TL)
|
||||
maxRadiusCountTL++;
|
||||
}
|
||||
}
|
||||
|
||||
if (CachedLights.length == 0) // if no lights on map == fuckoff
|
||||
return;
|
||||
|
||||
for (i = 0; i < CachedLights.length; i++)
|
||||
{
|
||||
if (CachedLights[i].bSpecialLit)
|
||||
SpecialLit_CountL++;
|
||||
if (CachedLights[i].LightRadius == maxRadius_L)
|
||||
maxRadiusCountL++;
|
||||
}
|
||||
|
||||
LightColors.Length = 0;
|
||||
GetUniqueColorsLights();
|
||||
lb_Actions.Addtext("There are" @ CachedLights.length @ "light sources" @ "and" @ cachedTriggerLights.length @ "Trigger light sources");
|
||||
lb_Actions.Addtext("Max Radius for light source is " @ maxRadius_L @ ". Light sources that uses max radius:" @ maxRadiusCountL
|
||||
@ "Max Radius for triggerlight source is " @ maxRadius_TL @ ". TriggerLight sources that uses max radius:" @ maxRadiusCountTL);
|
||||
|
||||
lb_Actions.Addtext("Detected" @ LightColors.length @ "unique lights");
|
||||
|
||||
lb_Actions.Addtext("Detected" @ SpecialLit_CountL @ " SpecialLit lights"
|
||||
@ "Detected" @ SpecialLit_CountTL @ " SpecialLit triggerlights");
|
||||
}
|
||||
|
||||
|
||||
// =======Lights
|
||||
// Light Optimization
|
||||
simulated function OptLights(Int Radius, Int maxRadius, bool Optimize, bool RemoveFlickering, bool FlickeringToStatic)
|
||||
{
|
||||
local Light LE;
|
||||
local TriggerLight TL;
|
||||
local int i, count;
|
||||
|
||||
if (Radius == 0 || maxRadius == 0)
|
||||
return;
|
||||
|
||||
forEach AllObjects (class'Light', LE)
|
||||
{
|
||||
if (LE.LightRadius > maxRadius)
|
||||
{
|
||||
LE.bSpecialLit = Optimize;
|
||||
LE.LightRadius = Radius;
|
||||
i++;
|
||||
}
|
||||
|
||||
if (RemoveFlickering)
|
||||
{
|
||||
switch (LE.LightType)
|
||||
{
|
||||
case LT_Pulse: // 3 Laggy types of lights
|
||||
LE.LightType = LT_Steady; // Replace this to steady light
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
LE.bSpecialLit = true;
|
||||
LE.bLightingVisibility = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case LT_Blink:
|
||||
LE.LightType = LT_Steady; // Replace this to steady light
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
LE.bSpecialLit = true;
|
||||
LE.bLightingVisibility = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case LT_Flicker:
|
||||
LE.LightType = LT_Steady; // Replace this to steady light
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
LE.bSpecialLit = true;
|
||||
LE.bLightingVisibility = false;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LE.bLightChanged = true; // Recalculate light now
|
||||
if (LE.bStatic)
|
||||
LE.ResetStaticFilterState();
|
||||
}
|
||||
|
||||
forEach AllObjects (class'TriggerLight', TL)
|
||||
{
|
||||
if (TL.LightRadius > maxRadius)
|
||||
{
|
||||
TL.bSpecialLit = Optimize;
|
||||
TL.LightRadius = Radius;
|
||||
i++;
|
||||
}
|
||||
if (RemoveFlickering)
|
||||
{
|
||||
switch (TL.LightType)
|
||||
{
|
||||
case LT_Pulse: // 3 Laggy types of lights
|
||||
TL.LightType = LT_Steady; // Replace this to steady light
|
||||
TL.InitialState = '';
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
TL.bSpecialLit = true;
|
||||
TL.bLightingVisibility = false;
|
||||
}
|
||||
break;
|
||||
case LT_Blink:
|
||||
TL.LightType = LT_Steady; // Replace this to steady light
|
||||
TL.InitialState = '';
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
TL.bSpecialLit = true;
|
||||
TL.bLightingVisibility = false;
|
||||
}
|
||||
break;
|
||||
case LT_Flicker:
|
||||
TL.LightType = LT_Steady; // Replace this to steady light
|
||||
TL.InitialState = '';
|
||||
count++;
|
||||
if (FlickeringToStatic)
|
||||
{
|
||||
TL.bSpecialLit = true;
|
||||
TL.bLightingVisibility = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
TL.bLightChanged = true; // Recalculate light now
|
||||
if (TL.bStatic)
|
||||
TL.ResetStaticFilterState();
|
||||
}
|
||||
|
||||
if (Optimize)
|
||||
lb_Actions.Addtext("Laggy lights are now fully static.");
|
||||
lb_Actions.Addtext("Radius for " @ i @ " lights set to " @ Radius @ ".Removed" @ count @ " flickering/pulsing/blinking light sources");
|
||||
|
||||
foreach AllObjects(class'Light', LE)
|
||||
if (LE.bLightChanged)
|
||||
LE.bLightChanged = false;
|
||||
}
|
||||
|
||||
|
||||
// RemoveCoronas
|
||||
simulated function RemoveCoronas()
|
||||
{
|
||||
local Light tempL;
|
||||
|
||||
// Corona will be rendered because map author decide to force dis. No freedom for players...
|
||||
// Somehow this slow down Mesh lighting quite a bit(x2, x3)...
|
||||
forEach AllObjects (class'Light', tempL)
|
||||
{
|
||||
if (tempL.bCorona == true)
|
||||
{
|
||||
tempL.bCorona = false;
|
||||
if (tempL.bStatic)
|
||||
tempL.ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
lb_Actions.Addtext("All coronas disabled!");
|
||||
}
|
||||
|
||||
|
||||
simulated function OptimizeStaticMeshes()
|
||||
{
|
||||
local StaticMeshActor SMA;
|
||||
local Decoration Deco;
|
||||
|
||||
IsUnlited = !IsUnlited;
|
||||
|
||||
foreach AllObjects(class'StaticMeshActor', SMA)
|
||||
{
|
||||
SMA.bUnlit = IsUnlited;
|
||||
SMA.ResetStaticFilterstate();
|
||||
}
|
||||
|
||||
foreach AllObjects(class'Decoration', Deco)
|
||||
{
|
||||
Deco.bUnlit = IsUnlited;
|
||||
if (Deco.bStatic)
|
||||
Deco.ResetStaticFilterstate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
simulated function OptAllLights()
|
||||
{
|
||||
local int i;
|
||||
local light L;
|
||||
|
||||
for (i = 0; i < CachedLights.length; i++)
|
||||
{
|
||||
CachedLights[i].bActorShadows = ch_ActorShadows.IsChecked();
|
||||
CachedLights[i].bAttenByLife = ch_AttenByLife.IsChecked();
|
||||
CachedLights[i].LightRadius = nu_Radius.GetValue();
|
||||
CachedLights[i].bLightingVisibility = ch_bLightingVisibility.IsChecked();
|
||||
CachedLights[i].bCorona = ch_bCorona.IsChecked(); // Must be tweak
|
||||
CachedLights[i].bDirectionalCorona = ch_bDirectionalCorona.IsChecked();
|
||||
|
||||
CachedLights[i].LightBrightness = nu_LightBrightness.GetValue();
|
||||
|
||||
CachedLights[i].LightHue = nu_LightHue.GetValue();
|
||||
CachedLights[i].LightSaturation = nu_LightSaturation.GetValue();
|
||||
|
||||
CachedLights[i].bSpecialLit = ch_bSpecialLit.IsChecked();
|
||||
CachedLights[i].LightType = ELightType(nu_LightType.GetValue());
|
||||
CachedLights[i].LightEffect = ELightEffect(nu_LightEffect.GetValue());
|
||||
CachedLights[i].LightCone = nu_LightCone.GetValue();
|
||||
CachedLights[i].LightPeriod = nu_LightPeriod.GetValue();
|
||||
|
||||
CachedLights[i].bDynamicLight=ch_bDynamicLight.IsChecked();
|
||||
|
||||
CachedLights[i].bLightChanged=true; // Recalculate light now
|
||||
|
||||
CachedLights[i].Style = STY_Additive; // Enabling bDeferRendering
|
||||
|
||||
CachedLights[i].bDeferRendering = true;
|
||||
CachedLights[i].bUnlit = true;
|
||||
CachedLights[i].bStaticLighting = false;
|
||||
|
||||
if (CachedLights[i].bStatic)
|
||||
CachedLights[i].ResetStaticFilterState();
|
||||
}
|
||||
|
||||
lb_Actions.Addtext("All lights on map set to given parameters");
|
||||
|
||||
if (CachedTriggerLights.length == 0)
|
||||
return;
|
||||
|
||||
for (i = 0; i < CachedTriggerLights.length; i++)
|
||||
{
|
||||
CachedTriggerLights[i].bActorShadows = ch_ActorShadows.IsChecked();
|
||||
CachedTriggerLights[i].bAttenByLife = ch_AttenByLife.IsChecked();
|
||||
CachedTriggerLights[i].LightCone = nu_Radius.GetValue();
|
||||
CachedTriggerLights[i].bLightingVisibility = ch_bLightingVisibility.IsChecked();
|
||||
CachedTriggerLights[i].bCorona = ch_bCorona.IsChecked(); // Must be tweak
|
||||
CachedTriggerLights[i].bDirectionalCorona = ch_bDirectionalCorona.IsChecked();
|
||||
CachedTriggerLights[i].LightBrightness = nu_LightBrightness.GetValue();
|
||||
CachedTriggerLights[i].LightHue = nu_LightHue.GetValue();
|
||||
CachedTriggerLights[i].LightSaturation = nu_LightSaturation.GetValue();
|
||||
CachedTriggerLights[i].bSpecialLit = ch_bSpecialLit.IsChecked();
|
||||
CachedTriggerLights[i].LightType = ELightType(nu_LightType.GetValue());
|
||||
CachedTriggerLights[i].LightEffect = ELightEffect(nu_LightEffect.GetValue());
|
||||
CachedTriggerLights[i].LightCone = nu_LightCone.GetValue();
|
||||
CachedTriggerLights[i].LightPeriod = nu_LightPeriod.GetValue();
|
||||
|
||||
CachedTriggerLights[i].bDynamicLight=ch_bDynamicLight.IsChecked();
|
||||
CachedTriggerLights[i].bLightChanged=true; // Recalculate light now
|
||||
|
||||
if (CachedTriggerLights[i].bStatic)
|
||||
CachedTriggerLights[i].ResetStaticFilterState();
|
||||
}
|
||||
|
||||
foreach AllObjects(class'Light', L)
|
||||
if (L.bLightChanged)
|
||||
L.bLightChanged = false;
|
||||
}
|
||||
|
||||
|
||||
// ===================================================================
|
||||
simulated function InternalOnChange(GUIComponent Sender)
|
||||
{
|
||||
// switch (Sender)
|
||||
// {
|
||||
// case ch_HideNiggaz:
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=GUISectionBackground Name=BGControlsAllMap
|
||||
bFillClient=True
|
||||
Caption="Control of light sources and shadows on all map"
|
||||
WinTop=0.010000
|
||||
WinLeft=0.400000
|
||||
WinWidth=0.500000
|
||||
WinHeight=0.900000
|
||||
OnPreDraw=BGControlsAllMap.InternalPreDraw
|
||||
End Object
|
||||
sb_ControlsAllMap=GUISectionBackground'HideMut.menu_c_Light.BGControlsAllMap'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=BGStats
|
||||
bFillClient=True
|
||||
Caption="Statistics of light sources on current map"
|
||||
WinTop=0.510000
|
||||
WinWidth=0.400000
|
||||
WinHeight=0.460000
|
||||
OnPreDraw=BGStats.InternalPreDraw
|
||||
End Object
|
||||
sb_Stats=GUISectionBackground'HideMut.menu_c_Light.BGStats'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=BGTweaker
|
||||
bFillClient=True
|
||||
Caption="Various lighting tweaks"
|
||||
WinTop=0.010000
|
||||
WinWidth=0.400000
|
||||
WinHeight=0.500000
|
||||
OnPreDraw=BGTweaker.InternalPreDraw
|
||||
End Object
|
||||
sb_Tweaker=GUISectionBackground'HideMut.menu_c_Light.BGTweaker'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=Radius
|
||||
MinValue=0
|
||||
MaxValue=1024
|
||||
Caption="Light Radius"
|
||||
OnCreateComponent=Radius.InternalOnCreateComponent
|
||||
Hint="Light radius for all lights"
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
nu_Radius=moNumericEdit'HideMut.menu_c_Light.Radius'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightnewRadius
|
||||
MinValue=0
|
||||
MaxValue=512
|
||||
Caption="New Light radius"
|
||||
OnCreateComponent=LightnewRadius.InternalOnCreateComponent
|
||||
Hint="New Light radius for laggy lights"
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
nu_newRadius=moNumericEdit'HideMut.menu_c_Light.LightnewRadius'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightmaxRadius
|
||||
MinValue=1
|
||||
MaxValue=1024
|
||||
Caption="Max light Radius"
|
||||
OnCreateComponent=LightmaxRadius.InternalOnCreateComponent
|
||||
Hint="Max Light radius for laggy lights"
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
nu_maxRadius=moNumericEdit'HideMut.menu_c_Light.LightmaxRadius'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightCone
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="LightCone"
|
||||
OnCreateComponent=LightCone.InternalOnCreateComponent
|
||||
Hint="Changes the size of the lightbeam in specific lights such as the spotlight."
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
nu_LightCone=moNumericEdit'HideMut.menu_c_Light.LightCone'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightPeriod
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="LightPeriod"
|
||||
OnCreateComponent=LightPeriod.InternalOnCreateComponent
|
||||
Hint="Sets speed of selected LightType and/or LightEffect."
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
nu_LightPeriod=moNumericEdit'HideMut.menu_c_Light.LightPeriod'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightBrightness
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="LightBrightness"
|
||||
OnCreateComponent=LightPeriod.InternalOnCreateComponent
|
||||
Hint="How bright the light should be from source and outwards."
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
nu_LightBrightness=moNumericEdit'HideMut.menu_c_Light.LightBrightness'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightHue
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="LightHue"
|
||||
OnCreateComponent=LightPeriod.InternalOnCreateComponent
|
||||
Hint="Allows you to select a color through the default color spectrum. Affects the color chosen."
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
nu_LightHue=moNumericEdit'HideMut.menu_c_Light.LightHue'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightSaturation
|
||||
MinValue=0
|
||||
MaxValue=255
|
||||
Caption="LightSaturation"
|
||||
OnCreateComponent=LightSaturation.InternalOnCreateComponent
|
||||
Hint="This value sets the amount of white light to mix with the color selected. If the value is set to 0, it will be the pure color. The higher the value, the less rich the color becomes. This is very effective when creating realistic lighting schemes. The default saturation is 127. Affects the chosen color."
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
nu_LightSaturation=moNumericEdit'HideMut.menu_c_Light.LightSaturation'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightEffect
|
||||
MinValue=0
|
||||
MaxValue=15
|
||||
Caption="LightEffect"
|
||||
OnCreateComponent=LightEffect.InternalOnCreateComponent
|
||||
Hint="Adds an animation to the light."
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
nu_LightEffect=moNumericEdit'HideMut.menu_c_Light.LightEffect'
|
||||
|
||||
Begin Object Class=moNumericEdit Name=LightType
|
||||
MinValue=0
|
||||
MaxValue=8
|
||||
Caption="LightType"
|
||||
OnCreateComponent=LightType.InternalOnCreateComponent
|
||||
Hint="Light types affect the brightness and darkness values of a lights' lighteffect."
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
nu_LightType=moNumericEdit'HideMut.menu_c_Light.LightType'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moOptimize
|
||||
Caption="Toggle static lighting on laggy lights"
|
||||
OnCreateComponent=moOptimize.InternalOnCreateComponent
|
||||
Hint="Toggle static lighting on laggy lights(if they are >maxRadus)"
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
ch_Optimize=moCheckBox'HideMut.menu_c_Light.moOptimize'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moRemoveFlickering
|
||||
Caption="Remove flickering lights"
|
||||
OnCreateComponent=moRemoveFlickering.InternalOnCreateComponent
|
||||
Hint="Remove flickering, blinking, pulse lights cuz fuk TWI optimization bullcrap"
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
ch_RemoveFlickering=moCheckBox'HideMut.menu_c_Light.moRemoveFlickering'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moFlickeringToStatic
|
||||
Caption="Flickering to Static lighting"
|
||||
OnCreateComponent=moFlickeringToStatic.InternalOnCreateComponent
|
||||
Hint="Makes all flickering lights static and steady"
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
ch_FlickeringToStatic=moCheckBox'HideMut.menu_c_Light.moFlickeringToStatic'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moActorShadows
|
||||
Caption="Actor Shadows"
|
||||
OnCreateComponent=moActorShadows.InternalOnCreateComponent
|
||||
Hint="Light casts actor shadows."
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
ch_ActorShadows=moCheckBox'HideMut.menu_c_Light.moActorShadows'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moAttenByLife
|
||||
Caption="Attenuate light"
|
||||
OnCreateComponent=moAttenByLife.InternalOnCreateComponent
|
||||
Hint="Attenuate light by diminishing lifespan"
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
ch_AttenByLife=moCheckBox'HideMut.menu_c_Light.moAttenByLife'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moCorona
|
||||
Caption="Light Corona"
|
||||
OnCreateComponent=moCorona.InternalOnCreateComponent
|
||||
Hint="Toggle Coronas"
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
ch_bCorona=moCheckBox'HideMut.menu_c_Light.moCorona'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moDirectionalCorona
|
||||
Caption="Directional Corona"
|
||||
OnCreateComponent=moDirectionalCorona.InternalOnCreateComponent
|
||||
Hint="(if bCorona) Make corona bigger if it faces you, and zero and 90 degrees or beyond."
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
ch_bDirectionalCorona=moCheckBox'HideMut.menu_c_Light.moDirectionalCorona'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moDynamicLight
|
||||
Caption="DynamicLight"
|
||||
OnCreateComponent=moDirectionalCorona.InternalOnCreateComponent
|
||||
Hint="Use dynamic light on lightsources"
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
ch_bDynamicLight=moCheckBox'HideMut.menu_c_Light.moDynamicLight'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moLightingVisibility
|
||||
Caption="LightingVisibility"
|
||||
OnCreateComponent=moDirectionalCorona.InternalOnCreateComponent
|
||||
Hint="Calculate Lighting Visibility by using line checks"
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
ch_bLightingVisibility=moCheckBox'HideMut.menu_c_Light.moLightingVisibility'
|
||||
|
||||
Begin Object Class=moCheckBox Name=moSpecialLit
|
||||
Caption="SpecialLit"
|
||||
OnCreateComponent=moDirectionalCorona.InternalOnCreateComponent
|
||||
Hint="Special Lit adds another layer of lighting used to isolate lighting to specific surfaces."
|
||||
OnChange=menu_c_Light.InternalOnChange
|
||||
End Object
|
||||
ch_bSpecialLit=moCheckBox'HideMut.menu_c_Light.moSpecialLit'
|
||||
|
||||
Begin Object Class=GUIScrollTextBox Name=lbActions
|
||||
bNoTeletype=True
|
||||
CharDelay=0.000000
|
||||
EOLDelay=0.000000
|
||||
RepeatDelay=0.000000
|
||||
OnCreateComponent=lbActions.InternalOnCreateComponent
|
||||
FontScale=FNS_Small
|
||||
bNeverFocus=True
|
||||
End Object
|
||||
lb_Actions=GUIScrollTextBox'HideMut.menu_c_Light.lbActions'
|
||||
|
||||
Begin Object Class=GUIButton Name=HideLights_Button
|
||||
Caption="Optimize lights!"
|
||||
Hint="Optimize light radius to your value(if light radius >maxRadius)"
|
||||
OnClick=menu_c_Light.ButtonClicked
|
||||
OnKeyEvent=HideLights_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_HideLights=GUIButton'HideMut.menu_c_Light.HideLights_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=OptAllLights_Button
|
||||
Caption="Optimize all lights!"
|
||||
Hint="Optimize all lights on map by given parameters"
|
||||
OnClick=menu_c_Light.ButtonClicked
|
||||
OnKeyEvent=OptAllLights_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_OptAllLights=GUIButton'HideMut.menu_c_Light.OptAllLights_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=MakeAllLightVisible_Button
|
||||
Caption="Make all lights visible to player(debug)"
|
||||
Hint="Debug light sources"
|
||||
OnClick=menu_c_Light.ButtonClicked
|
||||
OnKeyEvent=MakeAllLightVisible_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_MakeAllLightVisible=GUIButton'HideMut.menu_c_Light.MakeAllLightVisible_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=DisableCoronas_Button
|
||||
Caption="Remove coronas"
|
||||
Hint="Remove coronas from light sources"
|
||||
OnClick=menu_c_Light.ButtonClicked
|
||||
OnKeyEvent=DisableCoronas_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_DisableCoronas=GUIButton'HideMut.menu_c_Light.DisableCoronas_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=SaveConfig_Button
|
||||
Caption="Save config variables"
|
||||
Hint="Remove coronas from light sources"
|
||||
OnClick=menu_c_Light.ButtonClicked
|
||||
OnKeyEvent=SaveConfig_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_SaveConfig=GUIButton'HideMut.menu_c_Light.SaveConfig_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=OptStatic_Button
|
||||
Caption="Optimize lighting on static meshes"
|
||||
Hint="Apply bUnlit to all static meshes. Fixes retarded light calculate render to static meshes"
|
||||
OnClick=menu_c_Light.ButtonClicked
|
||||
OnKeyEvent=OptStatic_Button.InternalOnKeyEvent
|
||||
End Object
|
||||
b_OptStatic=GUIButton'HideMut.menu_c_Light.OptStatic_Button'
|
||||
|
||||
Begin Object Class=GUIButton Name=clearLog
|
||||
Caption="Clear log spam"
|
||||
Hint="Clear log"
|
||||
OnClick=menu_c_Light.ButtonClicked
|
||||
OnKeyEvent=clearLog.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ClearLog=GUIButton'HideMut.menu_c_Light.clearLog'
|
||||
|
||||
PropagateVisibility=False
|
||||
WinHeight=1.000000
|
||||
}
|
||||
40
kf_sources/HideMut/Classes/menu_c_New.uc
Normal file
40
kf_sources/HideMut/Classes/menu_c_New.uc
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
class menu_c_New extends UT2K4PlayerLoginMenu;
|
||||
|
||||
var bool bNoSteam;
|
||||
|
||||
function InitComponent(GUIController MyController, GUIComponent MyComponent)
|
||||
{
|
||||
// just to remove that "help" tab
|
||||
Panels.remove(4, 1);
|
||||
super.InitComponent(MyController, MyComponent);
|
||||
|
||||
// c_Main.ActivateTabByName(Panels[1].Caption, true);
|
||||
}
|
||||
|
||||
// Overridden to stop the unnecessary removal of Panels
|
||||
function RemoveMultiplayerTabs(GameInfo Game){}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Panels(0)=(ClassName="HideMut.menu_c_HideMut",Caption="HideMenu",Hint="Some tweaks, cheats and etc.")
|
||||
Panels(1)=(ClassName="HideMut.menu_c_Optimizer",Caption="OptimizerMenu",Hint="Module aimed for game optimization and clientside zed modifications")
|
||||
Panels(2)=(ClassName="HideMut.menu_c_Light",Caption="LightMenu",Hint="Module aimed for analysis of light sources and their optimization")
|
||||
Panels(3)=(ClassName="HideMut.menu_c_Zoner",Caption="ZonerMenu")
|
||||
Begin Object Class=GUITabControl Name=NewLoginMenu
|
||||
bDockPanels=True
|
||||
BackgroundStyleName="TabBackground"
|
||||
WinTop=0.026336
|
||||
WinLeft=0.012500
|
||||
WinWidth=0.974999
|
||||
WinHeight=0.050000
|
||||
bScaleToParent=True
|
||||
bAcceptsInput=True
|
||||
OnActivate=NewLoginMenu.InternalOnActivate
|
||||
End Object
|
||||
c_Main=GUITabControl'HideMut.menu_c_New.NewLoginMenu'
|
||||
|
||||
WinTop=0.000000
|
||||
WinLeft=0.000000
|
||||
WinWidth=1.000000
|
||||
WinHeight=1.000000
|
||||
}
|
||||
1810
kf_sources/HideMut/Classes/menu_c_Optimizer.uc
Normal file
1810
kf_sources/HideMut/Classes/menu_c_Optimizer.uc
Normal file
File diff suppressed because it is too large
Load diff
256
kf_sources/HideMut/Classes/menu_c_Zoner.uc
Normal file
256
kf_sources/HideMut/Classes/menu_c_Zoner.uc
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
class menu_c_Zoner extends GUI2K4.MidGamePanel
|
||||
config(HideMut);
|
||||
|
||||
//=================================================================Interface section
|
||||
/*
|
||||
|
||||
var automated MOCheckBox
|
||||
var automated MoComboBox
|
||||
var automated moNumericEdit
|
||||
var automated moFloatEdit
|
||||
|
||||
var Automated GUIListBox
|
||||
var Automated GUISectionBackground
|
||||
|
||||
var automated moNumericEdit
|
||||
*/
|
||||
var automated GUIButton b_SetStart, b_SetEnd, b_SaveConfig, b_DrawZones, b_ShowZonedStaticMeshes;
|
||||
|
||||
var automated GUISectionBackground sb_ZonerDraw;
|
||||
//=================================================================Interface section
|
||||
//=================================================================Structs start
|
||||
struct MyZone
|
||||
{
|
||||
var int ZoneKey; //zone key
|
||||
var string ZoneName; //Zone name
|
||||
var array<Vector> VectorsCoord; //Coordinates of zone borders. Drawing from 0 to 1, 1 to 2 and etc.
|
||||
var float MinX, MinY, MaxX, MaxY; //Minimal coords for setting zoned actors
|
||||
var array<int> PortalActorsRefs; //Actors that are visible through "portal" aka hole between neighbouring zones. Neighbouring zones may have same set of this
|
||||
var array<int> DecorativeActorsRefs; //Decorative stuff between zones
|
||||
var bool IgnoreXAxis; //Ignore this axis when setting active zone
|
||||
var bool IgnoreYAxis;
|
||||
var bool IgnoreZAxis;
|
||||
var bool HideDecorativeActors;
|
||||
var bool HidePortalActors;
|
||||
};
|
||||
|
||||
// Struct for map zoning
|
||||
struct MyZonedMap
|
||||
{
|
||||
var string MapName;
|
||||
var array<int> MyZoneRef; //reference to my zone structure
|
||||
var int MinVectorRef; //currently all vectors are 1 big array for all maps
|
||||
var int MaxVectorRef;
|
||||
};
|
||||
|
||||
var config array<MyZonedMap> ZonedMaps;
|
||||
var config array<MyZone> MyZones;
|
||||
|
||||
var PlayerController PC;
|
||||
var vector LineStart, LineEnd;
|
||||
var byte R, G, B; //colors for vectors
|
||||
var config array<Vector> ZVectors;
|
||||
var config array<string> ZZones;
|
||||
var config array<StaticMeshActor> SMAS;
|
||||
var int LinesCount, NextZone;
|
||||
//=================================================================Structs end
|
||||
|
||||
simulated function InitComponent(GUIController MyController, GUIComponent MyOwner)
|
||||
{
|
||||
super.InitComponent(MyController,MyOwner);
|
||||
|
||||
sb_ZonerDraw.ManageComponent(b_SetStart);
|
||||
sb_ZonerDraw.ManageComponent(b_SetEnd);
|
||||
sb_ZonerDraw.ManageComponent(b_SaveConfig);
|
||||
sb_ZonerDraw.ManageComponent(b_DrawZones);
|
||||
sb_ZonerDraw.ManageComponent(b_ShowZonedStaticMeshes);
|
||||
PC = PlayerOwner();
|
||||
R = 255; //Line color
|
||||
G = 0;
|
||||
B = 0;
|
||||
}
|
||||
|
||||
function ShowPanel(bool bShow)
|
||||
{
|
||||
super.ShowPanel(bShow);
|
||||
}
|
||||
|
||||
event Opened(GUIComponent Sender)
|
||||
{
|
||||
super.Opened(Sender);
|
||||
}
|
||||
|
||||
function StartDrawing()
|
||||
{
|
||||
LineStart = PC.Pawn.Location;
|
||||
}
|
||||
|
||||
function DrawLine()
|
||||
{
|
||||
LineEnd = PC.Pawn.Location;
|
||||
PC.Pawn.DrawStayingDebugLine(LineStart, LineEnd, R, G, B); //Draw line for visual zone representation
|
||||
ZVectors[LinesCount] = LineStart; //Save our vectors
|
||||
LinesCount++;
|
||||
ZVectors[LinesCount] = LineEnd;
|
||||
LinesCount++;
|
||||
LineStart = LineEnd; //Next line
|
||||
}
|
||||
|
||||
function SaveConfigStr()
|
||||
{
|
||||
local int i,k; //,l;
|
||||
|
||||
ZonedMaps.length = ZonedMaps.length + 1;
|
||||
ZonedMaps[ZonedMaps.length-1].MapName = PC.Level.GetURLMap(); //save variables
|
||||
for (i=0; i<9;i++)
|
||||
{
|
||||
ZonedMaps[ZonedMaps.length-1].MyZoneRef[i] = i;
|
||||
}
|
||||
|
||||
for (i=0; i<ZVectors.length;i++)
|
||||
{
|
||||
if (i==0 || i==5 || i==10 || i==15 || i==20 || i==25 || i==30 || i==35 || i==40 || i==45)
|
||||
{
|
||||
MyZones.Insert(MyZones.length, 1);
|
||||
MyZones[MyZones.length-1].ZoneName = "Zone" @ MyZones.length-1; //Create new zone
|
||||
MyZones[MyZones.length-1].ZoneKey = MyZones.length-1;
|
||||
k=0;
|
||||
}
|
||||
MyZones[MyZones.length-1].VectorsCoord[k] = ZVectors[i];
|
||||
k++;
|
||||
}
|
||||
|
||||
for (i=0; i<MyZones.length;i++) //Let's add min|max values to structure
|
||||
{
|
||||
for (k=0; k<MyZones[i].VectorsCoord.length;k++)
|
||||
{
|
||||
if (MyZones[i].VectorsCoord[k].X < MyZones[i].MinX || MyZones[i].MinX==0)
|
||||
MyZones[i].MinX = MyZones[i].VectorsCoord[k].X;
|
||||
if (MyZones[i].VectorsCoord[k].Y < MyZones[i].MinY || MyZones[i].MinY==0)
|
||||
MyZones[i].MinY = MyZones[i].VectorsCoord[k].Y;
|
||||
if (MyZones[i].VectorsCoord[k].X > MyZones[i].MaxX || MyZones[i].MaxX==0)
|
||||
MyZones[i].MaxX = MyZones[i].VectorsCoord[k].X;
|
||||
if (MyZones[i].VectorsCoord[k].Y > MyZones[i].MaxY || MyZones[i].MaxY==0)
|
||||
MyZones[i].MaxY = MyZones[i].VectorsCoord[k].Y;
|
||||
}
|
||||
}
|
||||
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
function DrawZonesFromConfig()
|
||||
{
|
||||
local int i;
|
||||
|
||||
PC.Pawn.ClearStayingDebugLines();
|
||||
for (i=0; i<ZVectors.length; i++)
|
||||
{
|
||||
if (i==4 || i==9 || i==14 || i==19 || i==24 || i==29 || i==34 || i==39 || i==44)
|
||||
continue;
|
||||
PC.Pawn.DrawStayingDebugLine(ZVectors[i], ZVectors[i+1], R, G, B);
|
||||
}
|
||||
}
|
||||
|
||||
function ShowZonedStaticMeshes()
|
||||
{
|
||||
local int i; // k;
|
||||
local StaticMeshActor SMA;
|
||||
local float MaxX,MaxY,MinX,MinY;
|
||||
|
||||
for (i=0; i<5; i++) //For each 5 vectors get MaxX,MaxY,MinX,MinY
|
||||
{
|
||||
if (ZVectors[i].X > MaxX || MaxX==0)
|
||||
MaxX = ZVectors[i].X;
|
||||
if (ZVectors[i].Y > MaxY || MaxY==0)
|
||||
MaxY = ZVectors[i].Y;
|
||||
if (ZVectors[i].X < MinX || MinX==0)
|
||||
MinX = ZVectors[i].X;
|
||||
if (ZVectors[i].Y < MinY || MinY==0)
|
||||
MinY = ZVectors[i].Y;
|
||||
}
|
||||
PC.ClientMessage(MaxX @ MaxY @ MinX @ MinY);
|
||||
|
||||
forEach PC.AllActors(class'StaticMeshActor', SMA)
|
||||
{
|
||||
if((SMA.Location.X <= MaxX && SMA.Location.Y <= MaxY) && (SMA.Location.X >= MinX && SMA.Location.Y >= MinY))
|
||||
{
|
||||
SMA.bHidden = false;
|
||||
SMA.ResetStaticFilterState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
simulated function bool ButtonClicked(GUIComponent Sender)
|
||||
{
|
||||
switch (Sender)
|
||||
{
|
||||
case b_SetStart:
|
||||
StartDrawing();
|
||||
break;
|
||||
case b_SetEnd:
|
||||
DrawLine();
|
||||
break;
|
||||
case b_SaveConfig:
|
||||
SaveConfigStr();
|
||||
break;
|
||||
case b_DrawZones:
|
||||
DrawZonesFromConfig();
|
||||
break;
|
||||
case b_ShowZonedStaticMeshes:
|
||||
ShowZonedStaticMeshes();
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
simulated function InternalOnChange(GUIComponent Sender){}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Begin Object Class=GUIButton Name=bSetStart
|
||||
Caption="Set Start vector"
|
||||
OnClick=menu_c_Zoner.ButtonClicked
|
||||
OnKeyEvent=bSetStart.InternalOnKeyEvent
|
||||
End Object
|
||||
b_SetStart=GUIButton'HideMut.menu_c_Zoner.bSetStart'
|
||||
|
||||
Begin Object Class=GUIButton Name=bSetEnd
|
||||
Caption="Set End vector"
|
||||
OnClick=menu_c_Zoner.ButtonClicked
|
||||
OnKeyEvent=bSetEnd.InternalOnKeyEvent
|
||||
End Object
|
||||
b_SetEnd=GUIButton'HideMut.menu_c_Zoner.bSetEnd'
|
||||
|
||||
Begin Object Class=GUIButton Name=bSaveConfig
|
||||
Caption="Save config"
|
||||
OnClick=menu_c_Zoner.ButtonClicked
|
||||
OnKeyEvent=bSaveConfig.InternalOnKeyEvent
|
||||
End Object
|
||||
b_SaveConfig=GUIButton'HideMut.menu_c_Zoner.bSaveConfig'
|
||||
|
||||
Begin Object Class=GUIButton Name=bDrawZones
|
||||
Caption="Draw zones"
|
||||
OnClick=menu_c_Zoner.ButtonClicked
|
||||
OnKeyEvent=bDrawZones.InternalOnKeyEvent
|
||||
End Object
|
||||
b_DrawZones=GUIButton'HideMut.menu_c_Zoner.bDrawZones'
|
||||
|
||||
Begin Object Class=GUIButton Name=bShowZonedStaticMeshes
|
||||
Caption="Draw zoned static meshes"
|
||||
OnClick=menu_c_Zoner.ButtonClicked
|
||||
OnKeyEvent=bShowZonedStaticMeshes.InternalOnKeyEvent
|
||||
End Object
|
||||
b_ShowZonedStaticMeshes=GUIButton'HideMut.menu_c_Zoner.bShowZonedStaticMeshes'
|
||||
|
||||
Begin Object Class=GUISectionBackground Name=BGZonerDraw
|
||||
bFillClient=True
|
||||
Caption="Zoner Draw"
|
||||
WinWidth=0.900000
|
||||
WinHeight=0.900000
|
||||
OnPreDraw=BGZonerDraw.InternalPreDraw
|
||||
End Object
|
||||
sb_ZonerDraw=GUISectionBackground'HideMut.menu_c_Zoner.BGZonerDraw'
|
||||
|
||||
}
|
||||
88
kf_sources/HideMut/Classes/o_AssetLoader.uc
Normal file
88
kf_sources/HideMut/Classes/o_AssetLoader.uc
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
// helps to get rid of first time zed spawn lags
|
||||
// source: https://github.com/poosh/KF-ScrnBalance/blob/master/Classes/ScrnGameLength.uc#L190
|
||||
class o_AssetLoader extends object;
|
||||
|
||||
|
||||
// ====================================================
|
||||
// contains all vanilla zeds for easy access
|
||||
var array < class<KFMonster> > ZedsArray_std;
|
||||
var array < class<KFMonster> > ZedsArray_xmas;
|
||||
var array < class<KFMonster> > ZedsArray_halow;
|
||||
var array < class<KFMonster> > ZedsArray_circus;
|
||||
|
||||
|
||||
// ====================================================
|
||||
// tbh when we load vanilla zed assets, it removes most of the hitches
|
||||
// but let's set all variants if we ever need them
|
||||
final static function LoadZedAsset(string event, LevelInfo Level)
|
||||
{
|
||||
local int i;
|
||||
local array < class<KFMonster> > tmpZedsArray;
|
||||
|
||||
// failsafe
|
||||
if (level == none)
|
||||
return;
|
||||
|
||||
if (event ~= "c")
|
||||
tmpZedsArray = default.ZedsArray_circus;
|
||||
else if (event ~= "h")
|
||||
tmpZedsArray = default.ZedsArray_halow;
|
||||
else if (event ~= "x")
|
||||
tmpZedsArray = default.ZedsArray_xmas;
|
||||
// by default load standard zed assets
|
||||
else
|
||||
tmpZedsArray = default.ZedsArray_std;
|
||||
|
||||
for (i = 0; i < tmpZedsArray.length && Level != none; i++)
|
||||
{
|
||||
tmpZedsArray[i].static.PreCacheAssets(Level);
|
||||
// log(string(tmpZedsArray[i]) $ " assets cached!!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ====================================================
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
ZedsArray_std(0)=Class'KFChar.ZombieClot_STANDARD'
|
||||
ZedsArray_std(1)=Class'KFChar.ZombieCrawler_STANDARD'
|
||||
ZedsArray_std(2)=Class'KFChar.ZombieFleshpound_STANDARD'
|
||||
ZedsArray_std(3)=Class'KFChar.ZombieScrake_STANDARD'
|
||||
ZedsArray_std(4)=Class'KFChar.ZombieSiren_STANDARD'
|
||||
ZedsArray_std(5)=Class'KFChar.ZombieStalker_STANDARD'
|
||||
ZedsArray_std(6)=Class'KFChar.ZombieHusk_STANDARD'
|
||||
ZedsArray_std(7)=Class'KFChar.ZombieBloat_STANDARD'
|
||||
ZedsArray_std(8)=Class'KFChar.ZombieBoss_STANDARD'
|
||||
ZedsArray_std(9)=Class'KFChar.ZombieGorefast_STANDARD'
|
||||
ZedsArray_xmas(0)=Class'KFChar.ZombieCLot_XMas'
|
||||
ZedsArray_xmas(1)=Class'KFChar.ZombieCrawler_XMas'
|
||||
ZedsArray_xmas(2)=Class'KFChar.ZombieFleshPound_XMas'
|
||||
ZedsArray_xmas(3)=Class'KFChar.ZombieScrake_XMas'
|
||||
ZedsArray_xmas(4)=Class'KFChar.ZombieSiren_XMas'
|
||||
ZedsArray_xmas(5)=Class'KFChar.ZombieStalker_XMas'
|
||||
ZedsArray_xmas(6)=Class'KFChar.ZombieHusk_XMas'
|
||||
ZedsArray_xmas(7)=Class'KFChar.ZombieBloat_XMas'
|
||||
ZedsArray_xmas(8)=Class'KFChar.ZombieBoss_XMas'
|
||||
ZedsArray_xmas(9)=Class'KFChar.ZombieGoreFast_XMas'
|
||||
ZedsArray_halow(0)=Class'KFChar.ZombieClot_HALLOWEEN'
|
||||
ZedsArray_halow(1)=Class'KFChar.ZombieCrawler_HALLOWEEN'
|
||||
ZedsArray_halow(2)=Class'KFChar.ZombieFleshPound_HALLOWEEN'
|
||||
ZedsArray_halow(3)=Class'KFChar.ZombieScrake_HALLOWEEN'
|
||||
ZedsArray_halow(4)=Class'KFChar.ZombieSiren_HALLOWEEN'
|
||||
ZedsArray_halow(5)=Class'KFChar.ZombieStalker_HALLOWEEN'
|
||||
ZedsArray_halow(6)=Class'KFChar.ZombieHusk_HALLOWEEN'
|
||||
ZedsArray_halow(7)=Class'KFChar.ZombieBloat_HALLOWEEN'
|
||||
ZedsArray_halow(8)=Class'KFChar.ZombieBoss_HALLOWEEN'
|
||||
ZedsArray_halow(9)=Class'KFChar.ZombieGorefast_HALLOWEEN'
|
||||
ZedsArray_circus(0)=Class'KFChar.ZombieClot_CIRCUS'
|
||||
ZedsArray_circus(1)=Class'KFChar.ZombieCrawler_CIRCUS'
|
||||
ZedsArray_circus(2)=Class'KFChar.ZombieFleshPound_CIRCUS'
|
||||
ZedsArray_circus(3)=Class'KFChar.ZombieScrake_CIRCUS'
|
||||
ZedsArray_circus(4)=Class'KFChar.ZombieSiren_CIRCUS'
|
||||
ZedsArray_circus(5)=Class'KFChar.ZombieStalker_CIRCUS'
|
||||
ZedsArray_circus(6)=Class'KFChar.ZombieHusk_CIRCUS'
|
||||
ZedsArray_circus(7)=Class'KFChar.ZombieBloat_CIRCUS'
|
||||
ZedsArray_circus(8)=Class'KFChar.ZombieBoss_CIRCUS'
|
||||
ZedsArray_circus(9)=Class'KFChar.ZombieGoreFast_CIRCUS'
|
||||
}
|
||||
421
kf_sources/HideMut/Classes/o_CyrillicEncodeUtilities.uc
Normal file
421
kf_sources/HideMut/Classes/o_CyrillicEncodeUtilities.uc
Normal file
|
|
@ -0,0 +1,421 @@
|
|||
class o_CyrillicEncodeUtilities extends object;
|
||||
|
||||
// source: http://killingfloor.ru/xforum/threads/ispravlenie-russkix-imen.4023/#post-121031 @Flame
|
||||
// Пусть для определённости SpecialOpen="([{", а SpecialClose="}])"
|
||||
|
||||
// Функция конвертирует строку. Символы кириллицы заменяются на символы латиницы, а так же спец символы
|
||||
// Например слово проверка конвертируется в строку ([{proverka}]), теsт->([{te}])s([{t}])
|
||||
// То есть все блоки символов кириллицы выделяются с помощью набора спец символов. Спец символы можно задавать в настройках
|
||||
final static function string EnCodeString(string Source, string SpecialOpen, string SpecialClose)
|
||||
{
|
||||
local int i;
|
||||
local int code;
|
||||
local int sLength;
|
||||
local bool bOpened;
|
||||
local string result;
|
||||
|
||||
sLength = Len(Source);
|
||||
|
||||
for (i = 0; i < sLength; i++)
|
||||
{
|
||||
// Получаем код первого символа строки
|
||||
code = Asc(Source);
|
||||
// Если кодировка за 1000 - вычитаем 848. Подробнее в теме про кириллицу в линуксе и винде
|
||||
if (code > 848)
|
||||
code -= 848;
|
||||
|
||||
// Параметр bOpened отвечает за индикацию, того что сейчас идут символы кириллицы.
|
||||
// Если code <= 160, значит встретился символ латиницы и надо закрывать блок отвечающий за русский язык
|
||||
// То есть ранее был прописан спец набор символов SpecialOpen и надо закрывать этот набор символов с помощью SpecialClose
|
||||
if (bOpened && code <= 160)
|
||||
{
|
||||
bOpened = false;
|
||||
result $= SpecialClose;
|
||||
}
|
||||
|
||||
// Если кириллица и не добавлен спец символы открытия блока русского языка SpecialOpen - добавляем
|
||||
// Если же либо символ латиницы, либо уже были символы открытия - пытаемся конвертировать символ с помощью EnCodeSymbol
|
||||
// EnCodeSymbol конвертирует только кириллицу, остальные символы он не трогает
|
||||
if(code > 160 && !bOpened)
|
||||
{
|
||||
bOpened = true;
|
||||
result $= SpecialOpen $ Chr(EnCodeSymbol(code));
|
||||
}
|
||||
else
|
||||
result $= Chr(EnCodeSymbol(code));
|
||||
|
||||
// "Отрезаем" первый символ от входной строки - мы его уже обработали. Теперь новый первый символ и цикл повторяется
|
||||
Source = Mid(Source, 1);
|
||||
// Если исходная строка заканчивается кириллицей, то надо закрыть строку символами SpecialClose
|
||||
if (i >= sLength-1 && bOpened)
|
||||
result $= SpecialClose;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// our version without any open / close symbols
|
||||
final static function string EnCodeStringHide(string Source)
|
||||
{
|
||||
local int i;
|
||||
local int code;
|
||||
local int sLength;
|
||||
local string result;
|
||||
|
||||
sLength = Len(Source);
|
||||
|
||||
for (i = 0; i < sLength; i++)
|
||||
{
|
||||
// Получаем код первого символа строки
|
||||
code = Asc(Source);
|
||||
// Если кодировка за 1000 - вычитаем 848. Подробнее в теме про кириллицу в линуксе и винде
|
||||
if (code > 848)
|
||||
code -= 848;
|
||||
|
||||
result $= Chr(EnCodeSymbol(code));
|
||||
|
||||
// "Отрезаем" первый символ от входной строки - мы его уже обработали. Теперь новый первый символ и цикл повторяется
|
||||
Source = Mid(Source, 1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// Получаем исходную строку на кириллице из преобразованной
|
||||
// ([{proverka}])->проверка, ([{te}])s([{t}])->теsт
|
||||
final static function string DeCodeString(string Source, string SpecialOpen, string SpecialClose)
|
||||
{
|
||||
local string result;
|
||||
local int i;
|
||||
local array<string> Parts, InnerParts;
|
||||
local string Part;
|
||||
|
||||
// Разбиваем строку на подстроки. Строка по которой разбиваем - SpecialClose набор символов
|
||||
// "([{te}])s([{t}])" разбивается на "([{te" и "s([{t"
|
||||
Split(Source, SpecialClose, Parts);
|
||||
|
||||
for (i = 0; i < Parts.Length; i++)
|
||||
{
|
||||
Part = Parts[i];
|
||||
// Для каждой подстроки проверяем содержит ли она спец символы открытия SpecialOpen
|
||||
// Если содержут, то разбивам на 2 подстроки по ([{
|
||||
// Например. ([{te-> "пустая строка" и "te", s([{t-> "s" и "t"
|
||||
// Левая из двух подстрок - чистая латиница, правая - кириллица и её надо конвертировать
|
||||
// DeCodePart конвертирует строку на латинице в строку на кириллице, согласно правилам определённых выше
|
||||
if (InStr(Part, SpecialOpen) >= 0)
|
||||
{
|
||||
Split(Part, SpecialOpen, InnerParts);
|
||||
result $= InnerParts[0] $ DeCodePart(InnerParts[1]);
|
||||
}
|
||||
else
|
||||
result $= Part;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// Конвертация символов из латиницы в кириллицу
|
||||
final static function string DeCodePart(string Source)
|
||||
{
|
||||
local int sLength;
|
||||
local int i;
|
||||
local int code;
|
||||
local string result;
|
||||
|
||||
sLength = Len(Source);
|
||||
for (i = 0; i < sLength; i++)
|
||||
{
|
||||
code = Asc(Source);
|
||||
result $= Chr(DeCodeSymbol(code) + 848); // Для Windows надо добавить. Для Linux надо проверять
|
||||
Source = Mid(Source,1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// Конвертация символа из кириллицы в латиницу. Передаётся и возвращается код символа
|
||||
final static function int EnCodeSymbol(int code)
|
||||
{
|
||||
switch(code)
|
||||
{
|
||||
case 224:
|
||||
return 97;
|
||||
case 225:
|
||||
return 98;
|
||||
case 226:
|
||||
return 118;
|
||||
case 227:
|
||||
return 103;
|
||||
case 228:
|
||||
return 100;
|
||||
case 229:
|
||||
return 101;
|
||||
case 184:
|
||||
return 42;
|
||||
case 230:
|
||||
return 106;
|
||||
case 231:
|
||||
return 122;
|
||||
case 232:
|
||||
return 105;
|
||||
case 233:
|
||||
return 94;
|
||||
case 234:
|
||||
return 107;
|
||||
case 235:
|
||||
return 108;
|
||||
case 236:
|
||||
return 109;
|
||||
case 237:
|
||||
return 110;
|
||||
case 238:
|
||||
return 111;
|
||||
case 239:
|
||||
return 112;
|
||||
case 240:
|
||||
return 114;
|
||||
case 241:
|
||||
return 115;
|
||||
case 242:
|
||||
return 116;
|
||||
case 243:
|
||||
return 117;
|
||||
case 244:
|
||||
return 102;
|
||||
case 245:
|
||||
return 104;
|
||||
case 246:
|
||||
return 99;
|
||||
case 247:
|
||||
return 121;
|
||||
case 248:
|
||||
return 119;
|
||||
case 249:
|
||||
return 36;
|
||||
case 250:
|
||||
return 33;
|
||||
case 251:
|
||||
return 37;
|
||||
case 252:
|
||||
return 63;
|
||||
case 253:
|
||||
return 41;
|
||||
case 254:
|
||||
return 124;
|
||||
case 255:
|
||||
return 47;
|
||||
case 192:
|
||||
return 65;
|
||||
case 193:
|
||||
return 66;
|
||||
case 194:
|
||||
return 86;
|
||||
case 195:
|
||||
return 71;
|
||||
case 196:
|
||||
return 68;
|
||||
case 197:
|
||||
return 69;
|
||||
case 168:
|
||||
return 64;
|
||||
case 198:
|
||||
return 74;
|
||||
case 199:
|
||||
return 90;
|
||||
case 200:
|
||||
return 73;
|
||||
case 201:
|
||||
return 38;
|
||||
case 202:
|
||||
return 75;
|
||||
case 203:
|
||||
return 76;
|
||||
case 204:
|
||||
return 77;
|
||||
case 205:
|
||||
return 78;
|
||||
case 206:
|
||||
return 79;
|
||||
case 207:
|
||||
return 80;
|
||||
case 208:
|
||||
return 82;
|
||||
case 209:
|
||||
return 83;
|
||||
case 210:
|
||||
return 84;
|
||||
case 211:
|
||||
return 85;
|
||||
case 212:
|
||||
return 70;
|
||||
case 213:
|
||||
return 72;
|
||||
case 214:
|
||||
return 67;
|
||||
case 215:
|
||||
return 89;
|
||||
case 216:
|
||||
return 87;
|
||||
case 217:
|
||||
return 55;
|
||||
case 218:
|
||||
return 56;
|
||||
case 219:
|
||||
return 57;
|
||||
case 220:
|
||||
return 48;
|
||||
case 221:
|
||||
return 49;
|
||||
case 222:
|
||||
return 50;
|
||||
case 223:
|
||||
return 51;
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
// Конвертация символа из латиницы в кириллицу. Передаётся и возвращается код символа
|
||||
final static function int DeCodeSymbol(int code)
|
||||
{
|
||||
switch(code)
|
||||
{
|
||||
case 97:
|
||||
return 224;
|
||||
case 98:
|
||||
return 225;
|
||||
case 118:
|
||||
return 226;
|
||||
case 103:
|
||||
return 227;
|
||||
case 100:
|
||||
return 228;
|
||||
case 101:
|
||||
return 229;
|
||||
case 42:
|
||||
return 184;
|
||||
case 106:
|
||||
return 230;
|
||||
case 122:
|
||||
return 231;
|
||||
case 105:
|
||||
return 232;
|
||||
case 94:
|
||||
return 233;
|
||||
case 107:
|
||||
return 234;
|
||||
case 108:
|
||||
return 235;
|
||||
case 109:
|
||||
return 236;
|
||||
case 110:
|
||||
return 237;
|
||||
case 111:
|
||||
return 238;
|
||||
case 112:
|
||||
return 239;
|
||||
case 114:
|
||||
return 240;
|
||||
case 115:
|
||||
return 241;
|
||||
case 116:
|
||||
return 242;
|
||||
case 117:
|
||||
return 243;
|
||||
case 102:
|
||||
return 244;
|
||||
case 104:
|
||||
return 245;
|
||||
case 99:
|
||||
return 246;
|
||||
case 121:
|
||||
return 247;
|
||||
case 119:
|
||||
return 248;
|
||||
case 36:
|
||||
return 249;
|
||||
case 33:
|
||||
return 250;
|
||||
case 37:
|
||||
return 251;
|
||||
case 63:
|
||||
return 252;
|
||||
case 41:
|
||||
return 253;
|
||||
case 124:
|
||||
return 254;
|
||||
case 47:
|
||||
return 255;
|
||||
case 65:
|
||||
return 192;
|
||||
case 66:
|
||||
return 193;
|
||||
case 86:
|
||||
return 194;
|
||||
case 71:
|
||||
return 195;
|
||||
case 68:
|
||||
return 196;
|
||||
case 69:
|
||||
return 197;
|
||||
case 64:
|
||||
return 168;
|
||||
case 74:
|
||||
return 198;
|
||||
case 90:
|
||||
return 199;
|
||||
case 73:
|
||||
return 200;
|
||||
case 38:
|
||||
return 201;
|
||||
case 75:
|
||||
return 202;
|
||||
case 76:
|
||||
return 203;
|
||||
case 77:
|
||||
return 204;
|
||||
case 78:
|
||||
return 205;
|
||||
case 79:
|
||||
return 206;
|
||||
case 80:
|
||||
return 207;
|
||||
case 82:
|
||||
return 208;
|
||||
case 83:
|
||||
return 209;
|
||||
case 84:
|
||||
return 210;
|
||||
case 85:
|
||||
return 211;
|
||||
case 70:
|
||||
return 212;
|
||||
case 72:
|
||||
return 213;
|
||||
case 67:
|
||||
return 214;
|
||||
case 89:
|
||||
return 215;
|
||||
case 87:
|
||||
return 216;
|
||||
case 55:
|
||||
return 217;
|
||||
case 56:
|
||||
return 218;
|
||||
case 57:
|
||||
return 219;
|
||||
case 48:
|
||||
return 220;
|
||||
case 49:
|
||||
return 221;
|
||||
case 50:
|
||||
return 222;
|
||||
case 51:
|
||||
return 223;
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
74
kf_sources/HideMut/Classes/o_Render.uc
Normal file
74
kf_sources/HideMut/Classes/o_Render.uc
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
class o_Render extends object;
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// draw zed health
|
||||
final function DrawHealthBars(Canvas C, float f)
|
||||
{
|
||||
local HUDKillingFloor KFH;
|
||||
local KFMonster m;
|
||||
|
||||
KFH = HUDKillingFloor(C.ViewPort.Actor.myHUD);
|
||||
// this draws debug sphere for pawns
|
||||
// HKF.DrawPointSphere();
|
||||
// draw dem bars, using the fastest iterator at least up to 2000UU
|
||||
if (KFH == none)
|
||||
return;
|
||||
|
||||
foreach C.ViewPort.Actor.CollidingActors(class'KFMonster', m, f)
|
||||
{
|
||||
if (m == none || m.Health <= 0)
|
||||
continue;
|
||||
KFH.DrawHealthBar(C, m, m.Health, m.HealthMax , 50.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// draw crosshair
|
||||
final function DrawXhair(Canvas C, Color cl, float l, float w)
|
||||
{
|
||||
C.SetPos((float(C.sizeX) - w) / 2, (float(C.sizeY) - l) / 2);
|
||||
C.DrawColor = cl;
|
||||
C.DrawTile(Texture'Engine.WhiteSquareTexture', w, l, 0, 0, 2, 2);
|
||||
C.SetPos((float(C.sizeX) - l) / 2, (float(C.sizeY) - w) / 2);
|
||||
C.DrawTile(Texture'Engine.WhiteSquareTexture', l, w, 0, 0, 2, 2);
|
||||
}
|
||||
|
||||
|
||||
// For debugging headshots
|
||||
// simulated function DrawHeadShotSphere(out Canvas C) // Dave@Psyonix
|
||||
// {
|
||||
// local HUDKillingFloor KFH;
|
||||
// local KFHumanPawn p;
|
||||
// local KFMonster KFM;
|
||||
// local coords CO;
|
||||
// local vector HeadLoc;
|
||||
|
||||
// KFH = HUDKillingFloor(C.ViewPort.Actor.myHUD);
|
||||
// p = getPawn();
|
||||
|
||||
// if ( p == none || KFH == none)
|
||||
// return;
|
||||
|
||||
// //super.DrawHeadShotSphere();
|
||||
|
||||
// foreach p.DynamicActors(class'KFMonster', KFM)
|
||||
// {
|
||||
// if ( KFM == none ) // && KFM.ServerHeadLocation != KFM.LastServerHeadLocation )
|
||||
// continue;
|
||||
// //KFM.DrawDebugSphere(KFM.Location + (KFM.OnlineHeadshotOffset >> KFM.Rotation), KFM.HeadRadius * KFM.HeadScale * KFM.OnlineHeadshotScale, 10, 0, 255, 0);
|
||||
// KFH.ClearStayingDebugLines();
|
||||
// // KFM.LastServerHeadLocation = KFM.ServerHeadLocation;
|
||||
// // DrawStayingDebugSphere(KFM.ServerHeadLocation, KFM.HeadRadius * KFM.HeadScale, 10, 128, 255, 255);
|
||||
// CO = KFM.GetBoneCoords(KFM.HeadBone);
|
||||
// HeadLoc = CO.Origin + (KFM.HeadHeight * KFM.HeadScale * CO.XAxis);
|
||||
// KFH.DrawStayingDebugSphere(HeadLoc, KFM.HeadRadius * KFM.HeadScale, 10, 0, 255, 0);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
657
kf_sources/HideMut/Classes/o_Utility.uc
Normal file
657
kf_sources/HideMut/Classes/o_Utility.uc
Normal file
|
|
@ -0,0 +1,657 @@
|
|||
class o_Utility extends object
|
||||
config(HideMut_Utility);
|
||||
|
||||
|
||||
var const string DIVIDER;
|
||||
|
||||
// ===========================================================================
|
||||
// VARIABLES
|
||||
// ===========================================================================
|
||||
|
||||
// some complicated structure to hold all required perk data
|
||||
struct sData
|
||||
{
|
||||
var byte Index;
|
||||
var array<int> Value;
|
||||
};
|
||||
struct sPerkInfo
|
||||
{
|
||||
var class<KFVeterancyTypes> Perk;
|
||||
var array<sData> PerkData;
|
||||
};
|
||||
var array<sPerkInfo> PerkInfo;
|
||||
|
||||
// colors and tags, maybe later I will convert this to a config array
|
||||
struct ColorRecord
|
||||
{
|
||||
var string ColorName; // color name, for comfort
|
||||
var string ColorTag; // color tag
|
||||
var Color Color; // RGBA values
|
||||
};
|
||||
var config array<ColorRecord> ColorList; // color list
|
||||
|
||||
var config array<string> MsgHelp; // help messages
|
||||
var config array<string> SPHelp; // help messages
|
||||
|
||||
// admin login-pass, server ip info
|
||||
struct adminAccount
|
||||
{
|
||||
var string Name;
|
||||
var string ip;
|
||||
var string login;
|
||||
var string pass;
|
||||
};
|
||||
var config array<adminAccount> adminAccounts;
|
||||
|
||||
// shit bind strings
|
||||
var config string SC_names;
|
||||
var config string FP_names;
|
||||
|
||||
var config string tnames;
|
||||
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// UTILITY
|
||||
// ===========================================================================
|
||||
|
||||
// get gametype string
|
||||
final function GetGT(player player)
|
||||
{
|
||||
local GameReplicationInfo gri;
|
||||
|
||||
foreach allObjects(class'GameReplicationInfo', gri)
|
||||
{
|
||||
if (gri == none)
|
||||
continue;
|
||||
print_Console_s(gri.gameClass, player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// TEXT
|
||||
// ===========================================================================
|
||||
|
||||
// help list for zed spawning
|
||||
final function TellAbout(player player, string whatToTell)
|
||||
{
|
||||
local int i;
|
||||
local array<string> StrTemp;
|
||||
|
||||
switch (whatToTell)
|
||||
{
|
||||
case "MsgHelp":
|
||||
StrTemp = MsgHelp;
|
||||
break;
|
||||
case "Chars":
|
||||
StrTemp = class'KFGameType'.default.AvailableChars;
|
||||
for(i = 0; i < StrTemp.Length; i++)
|
||||
{
|
||||
StrTemp[i] = "^w^" $ i $ ". ^y^" $ StrTemp[i];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// fallback warning
|
||||
StrTemp[0] = "^r^HIDE MENU HELPER: We shouldn't get to this so this means you used WRONG modifier!";
|
||||
}
|
||||
|
||||
print_Console_arr(StrTemp, player);
|
||||
}
|
||||
|
||||
|
||||
// help list for zed spawning
|
||||
final function string getRandString(byte i)
|
||||
{
|
||||
local string s;
|
||||
local array<string> loc_arr;
|
||||
|
||||
// get exact string
|
||||
if (i == 1)
|
||||
s = SC_names;
|
||||
else if (i == 2)
|
||||
s = FP_names;
|
||||
else
|
||||
s = tnames;
|
||||
|
||||
// fill the array
|
||||
split(s, DIVIDER, loc_arr);
|
||||
|
||||
return loc_arr[rand(loc_arr.length)];
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// COLORS
|
||||
// ===========================================================================
|
||||
|
||||
// converts color tags to colors
|
||||
final function string ParseTags(string input)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < ColorList.Length; i++)
|
||||
{
|
||||
ReplaceText(input, ColorList[i].ColorTag, class'GameInfo'.static.MakeColorCode(ColorList[i].Color));
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
|
||||
// same thing ^ but as a static function
|
||||
final static function string ParseTagsStatic(string input)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < default.ColorList.Length; i++)
|
||||
{
|
||||
ReplaceText(input, default.ColorList[i].ColorTag, class'GameInfo'.static.MakeColorCode(default.ColorList[i].Color));
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
|
||||
// to make a color: class'Canvas'.Static.MakeColor(R,G,B, optional A)
|
||||
|
||||
// Engine.GameInfo
|
||||
// removes colors from a string
|
||||
final function string StripColor(string s)
|
||||
{
|
||||
local int p;
|
||||
|
||||
p = InStr(s, chr(27));
|
||||
|
||||
while (p >= 0)
|
||||
{
|
||||
s = left(s, p) $ mid(S, p + 4);
|
||||
p = InStr(s, Chr(27));
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
// same thing ^ but as a static function
|
||||
final static function string StripColorStatic(string s)
|
||||
{
|
||||
local int p;
|
||||
|
||||
p = InStr(s, chr(27));
|
||||
|
||||
while (p >= 0)
|
||||
{
|
||||
s = left(s, p) $ mid(S, p + 4);
|
||||
p = InStr(s, Chr(27));
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// ADMIN STUFF
|
||||
// ===========================================================================
|
||||
|
||||
// admin login-logout
|
||||
final function adlog(KFPlayerController pc)
|
||||
{
|
||||
local int i;
|
||||
local string serverIp;
|
||||
|
||||
if (!bIsValid(pc))
|
||||
return;
|
||||
|
||||
if (pc.playerReplicationInfo.bAdmin == true)
|
||||
{
|
||||
pc.adminLogout();
|
||||
return;
|
||||
}
|
||||
|
||||
serverIp = pc.getServerNetworkAddress();
|
||||
|
||||
for (i = 0; i < adminAccounts.length; i++)
|
||||
{
|
||||
if (serverIp == adminAccounts[i].ip)
|
||||
{
|
||||
if (adminAccounts[i].login != "")
|
||||
pc.adminLogin(adminAccounts[i].login @ adminAccounts[i].pass);
|
||||
else
|
||||
pc.adminLogin(adminAccounts[i].pass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// print aviablable admin - pass pairs, optionally to console
|
||||
final function adlog_Info(KFPlayerController pc, optional bool toConsole)
|
||||
{
|
||||
local int i;
|
||||
|
||||
if (!bIsValid(pc))
|
||||
return;
|
||||
|
||||
for (i = 0; i < adminAccounts.length; i++)
|
||||
{
|
||||
if (toConsole)
|
||||
{
|
||||
pc.Player.Console.Chat(adminAccounts[i].login, 6.0, pc.playerReplicationInfo);
|
||||
pc.Player.Console.Chat(adminAccounts[i].pass, 6.0, pc.playerReplicationInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
pc.myHUD.AddTextMessage(adminAccounts[i].login, class'LocalMessage', pc.playerReplicationInfo);
|
||||
pc.myHUD.AddTextMessage(adminAccounts[i].pass, class'LocalMessage', pc.playerReplicationInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final function adlog_Control(KFPlayerController pc, bool bAdd, string Param)
|
||||
{
|
||||
local int i;
|
||||
local string serverIp, serverName;
|
||||
local array<string> Params;
|
||||
local GameReplicationInfo tempGri;
|
||||
local adminAccount loc_adminAccount;
|
||||
|
||||
if (!bIsValid(pc))
|
||||
return;
|
||||
|
||||
// get server IP
|
||||
serverIp = pc.getServerNetworkAddress();
|
||||
|
||||
if (bAdd)
|
||||
{
|
||||
// get login, pass
|
||||
split(Param, ",", Params);
|
||||
|
||||
// get server name
|
||||
foreach pc.allActors(class'GameReplicationInfo', tempGri)
|
||||
{
|
||||
if (tempGri == none)
|
||||
continue;
|
||||
serverName = tempGri.ServerName;
|
||||
log(tempGri.ServerName);
|
||||
}
|
||||
|
||||
loc_adminAccount.Name = serverName;
|
||||
loc_adminAccount.ip = serverIp;
|
||||
loc_adminAccount.login = Params[0];
|
||||
loc_adminAccount.pass = Params[1];
|
||||
|
||||
adminAccounts[adminAccounts.Length] = loc_adminAccount;
|
||||
pc.myHUD.AddTextMessage(Params[0] @ Params[1] @ "added to admin info config!", class'LocalMessage', pc.playerReplicationInfo);
|
||||
// save the config!
|
||||
StaticSaveConfig();
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < adminAccounts.length; i++)
|
||||
{
|
||||
if (serverIp == adminAccounts[i].ip)
|
||||
{
|
||||
pc.myHUD.AddTextMessage(adminAccounts[i].login @ adminAccounts[i].pass @ "removed from admin info config!", class'LocalMessage', pc.playerReplicationInfo);
|
||||
adminAccounts.Remove(i, 1);
|
||||
StaticSaveConfig();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// check for nones
|
||||
final function bool bIsValid(KFPlayerController pc)
|
||||
{
|
||||
if (pc == none || pc.playerReplicationInfo == none)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// CRASHING
|
||||
// ===========================================================================
|
||||
|
||||
// dosh spam for CrashServer()
|
||||
final function doshspam(KFHumanPawn p)
|
||||
{
|
||||
local int i;
|
||||
|
||||
while (p != none && i < 10000)
|
||||
{
|
||||
p.tossCash(1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// nade spam for CrashServer2()
|
||||
final function nadespam(KFHumanPawn p, int i)
|
||||
{
|
||||
local int n;
|
||||
|
||||
// StopWatch(false);
|
||||
while (p != none && n < i)
|
||||
{
|
||||
ThrowNade(p);
|
||||
n++;
|
||||
}
|
||||
// StopWatch(true);
|
||||
}
|
||||
|
||||
|
||||
// spec-join spam for CrashServer3()
|
||||
final function specspam(KFPlayerController pc)
|
||||
{
|
||||
local int i;
|
||||
|
||||
if (pc == none)
|
||||
return;
|
||||
|
||||
while (i < 100)
|
||||
{
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
pc.BecomeActivePlayer();
|
||||
pc.BecomeSpectator();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final function Frag FindNade(KFHumanPawn p)
|
||||
{
|
||||
local inventory inv;
|
||||
|
||||
if (p == none)
|
||||
return none;
|
||||
|
||||
for (inv = p.Inventory; inv != none; inv = inv.Inventory)
|
||||
{
|
||||
if (ClassIsChildOf(inv.class, class'Frag'))
|
||||
{
|
||||
return Frag(inv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final function ThrowNade(KFHumanPawn p)
|
||||
{
|
||||
if (p == none || FindNade(p) == none)
|
||||
return;
|
||||
|
||||
FindNade(p).ServerThrow();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// helper messages
|
||||
final function string GetChar(string s)
|
||||
{
|
||||
local int i;
|
||||
|
||||
// default skins are 56!
|
||||
i = clamp(int(s), 0, 55);
|
||||
|
||||
return class'KFGameType'.default.AvailableChars[i];
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// return all avialable KFWeapon classes array
|
||||
final function array< class<KFWeapon> > getALLWeapons(KFPlayerController pc)
|
||||
{
|
||||
local KFLevelRules lr;
|
||||
local array< class<KFWeapon> > array_wep;
|
||||
|
||||
// failsafe
|
||||
if (pc == none)
|
||||
return array_wep;
|
||||
|
||||
foreach pc.dynamicActors(class'KFLevelRules', lr)
|
||||
{
|
||||
if (lr == none)
|
||||
return array_wep;
|
||||
break;
|
||||
}
|
||||
|
||||
// fill weapon class array
|
||||
MergeSellArrays(array_wep, lr.mediItemForSale);
|
||||
MergeSellArrays(array_wep, lr.suppItemForSale);
|
||||
MergeSellArrays(array_wep, lr.shrpItemForSale);
|
||||
MergeSellArrays(array_wep, lr.commItemForSale);
|
||||
MergeSellArrays(array_wep, lr.bersItemForSale);
|
||||
MergeSellArrays(array_wep, lr.fireItemForSale);
|
||||
MergeSellArrays(array_wep, lr.demoItemForSale);
|
||||
MergeSellArrays(array_wep, lr.neutItemForSale);
|
||||
|
||||
return array_wep;
|
||||
}
|
||||
|
||||
|
||||
// convert pickups to weapon class and add to out array
|
||||
final private function MergeSellArrays(out array< class<KFWeapon> > array_wep, array< class<Pickup> > sellItems)
|
||||
{
|
||||
local int i;
|
||||
|
||||
for (i = 0; i < sellItems.length; i++)
|
||||
{
|
||||
array_wep[array_wep.Length] = class<KFWeapon>(sellItems[i].default.inventoryType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// PERKS
|
||||
// ===========================================================================
|
||||
final function PerkSwitch(KFPlayerController pc, int i, optional string level)
|
||||
{
|
||||
local int j, n;
|
||||
|
||||
// failsafe
|
||||
if (pc == none)
|
||||
return;
|
||||
|
||||
// failsafe for perk index
|
||||
// tho we make sure we pass right values to here
|
||||
i = clamp(i, 0, 7);
|
||||
|
||||
// what level we want
|
||||
// if we don't specify it force to 6
|
||||
if (level ~= "")
|
||||
j = 6;
|
||||
else
|
||||
j = clamp(int(level), 0, 6);
|
||||
|
||||
n = PerkInfo[i].PerkData.Length;
|
||||
|
||||
// set SelectedVeterancy
|
||||
pc.SelectedVeterancy = PerkInfo[i].Perk;
|
||||
pc.SaveConfig();
|
||||
// set the veterancy
|
||||
pc.selectVeterancy(PerkInfo[i].Perk, true);
|
||||
pc.SetSelectedVeterancy(PerkInfo[i].Perk);
|
||||
|
||||
// set levels
|
||||
if (n > 0)
|
||||
{
|
||||
pc.serverInitializeSteamStatInt(PerkInfo[i].PerkData[0].Index, PerkInfo[i].PerkData[0].Value[j]);
|
||||
// if we have 2'nd index - use it!
|
||||
if (n > 1)
|
||||
pc.serverInitializeSteamStatInt(PerkInfo[i].PerkData[1].Index, PerkInfo[i].PerkData[1].Value[j]);
|
||||
}
|
||||
|
||||
pc.serverSteamStatsAndAchievementsInitialized();
|
||||
}
|
||||
|
||||
|
||||
// get perk index byte
|
||||
// Fail = 99
|
||||
// KFVeterancyTypes = 255
|
||||
// Perk Neutral = 7
|
||||
// Medic = 0 || Sup = 1 || Sharp = 2
|
||||
// Mando = 3 || Zerk = 4 || Pyro = 5 || Demo = 6
|
||||
final function byte Get_Perk_Index(KFPlayerController pc)
|
||||
{
|
||||
local KFPlayerReplicationInfo PRI;
|
||||
|
||||
PRI = KFPlayerReplicationInfo(PC.PlayerReplicationInfo);
|
||||
|
||||
// fail indicator
|
||||
if (pc == none || PRI == none)
|
||||
return 99;
|
||||
|
||||
if (PRI.ClientVeteranSkill != none)
|
||||
return PRI.ClientVeteranSkill.default.perkIndex;
|
||||
else
|
||||
return 7; // Perk Neutral
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// CONSOLE SHIT
|
||||
// ===========================================================================
|
||||
|
||||
// privately prints from ARRAY to console
|
||||
final function print_Console_arr(array<string> s, player player)
|
||||
{
|
||||
local KFConsole console;
|
||||
local int i;
|
||||
|
||||
// fail safe. Console must be always present
|
||||
if (player == none)
|
||||
return;
|
||||
|
||||
console = KFConsole(player.console);
|
||||
for (i = 0; i < s.length; i++)
|
||||
{
|
||||
console.Message(ParseTags(s[i]), 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// privately prints from STRING to console, accepts arrays with DIVIDER DIVIDER
|
||||
final function print_Console_s(string s, player player)
|
||||
{
|
||||
local KFConsole console;
|
||||
local array<string> array_s;
|
||||
local int i;
|
||||
|
||||
// fail safe. Console must be always present
|
||||
if (player == none)
|
||||
return;
|
||||
|
||||
console = KFConsole(player.console);
|
||||
|
||||
// fill the array
|
||||
split(s, DIVIDER, array_s);
|
||||
|
||||
// if we have an array
|
||||
if (array_s.length > 0)
|
||||
{
|
||||
for (i = 0; i < array_s.length; i++)
|
||||
{
|
||||
console.Message(ParseTags(array_s[i]), 0.0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
console.Message(ParseTags(s), 0.0f);
|
||||
}
|
||||
|
||||
|
||||
// toss a string array, get the Console, and execute everything in a safe, clean way, divider - DIVIDER
|
||||
final function write_Console(string s, player player)
|
||||
{
|
||||
local KFConsole console;
|
||||
local array<string> array_s;
|
||||
local int i;
|
||||
|
||||
// fail safe. Console must be always present
|
||||
if (player == none)
|
||||
return;
|
||||
|
||||
console = KFConsole(player.console);
|
||||
|
||||
// fill the array
|
||||
split(s, DIVIDER, array_s);
|
||||
|
||||
// we are using delayed to allow huuuuge console spam
|
||||
for (i = 0; i < array_s.length; i++)
|
||||
{
|
||||
console.DelayedConsoleCommand(array_s[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
// DEFS
|
||||
// ===========================================================================
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Divider=";"
|
||||
PerkInfo(0)=(Perk=Class'KFMod.KFVetFieldMedic',PerkData=((Value=(0,200,750,4000,12000,25000,100000))))
|
||||
PerkInfo(1)=(Perk=Class'KFMod.KFVetSupportSpec',PerkData=((Index=2,Value=(0,25000,100000,500000,1500000,3500000,5500000)),(Index=1,Value=(0,2000,7000,35000,120000,250000,370000))))
|
||||
PerkInfo(2)=(Perk=Class'KFMod.KFVetSharpshooter',PerkData=((Index=3,Value=(0,30,100,700,2500,5500,8500))))
|
||||
PerkInfo(3)=(Perk=Class'KFMod.KFVetCommando',PerkData=((Index=5,Value=(0,25000,100000,500000,1500000,3500000,5500000)),(Index=4,Value=(0,30,100,350,1200,2400,3600))))
|
||||
PerkInfo(4)=(Perk=Class'KFMod.KFVetBerserker',PerkData=((Index=6,Value=(0,25000,100000,500000,1500000,3500000,5500000))))
|
||||
PerkInfo(5)=(Perk=Class'KFMod.KFVetFirebug',PerkData=((Index=7,Value=(0,25000,100000,500000,1500000,3500000,5500000))))
|
||||
PerkInfo(6)=(Perk=Class'KFMod.KFVetDemolitions',PerkData=((Index=21,Value=(0,25000,100000,500000,1500000,3500000,5500000))))
|
||||
PerkInfo(7)=(Perk=Class'KFMod.KFVeterancyTypes')
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue