update logger
This commit is contained in:
parent
a390cffbb8
commit
de44bfe00f
@ -1,40 +1,46 @@
|
|||||||
class KFGI_Access extends Object
|
class KFGI_Access extends Object
|
||||||
within KFGameInfo;
|
within KFGameInfo;
|
||||||
|
|
||||||
public function Array<class<KFPawn_Monster> > GetAIClassList()
|
public function Array<class<KFPawn_Monster> > GetAIClassList(E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
local Array<class<KFPawn_Monster> > RV;
|
local Array<class<KFPawn_Monster> > RV;
|
||||||
local class<KFPawn_Monster> KFPMC;
|
local class<KFPawn_Monster> KFPMC;
|
||||||
|
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
foreach AIClassList(KFPMC)
|
foreach AIClassList(KFPMC)
|
||||||
RV.AddItem(KFPMC);
|
RV.AddItem(KFPMC);
|
||||||
|
|
||||||
return RV;
|
return RV;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Array<class<KFPawn_Monster> > GetNonSpawnAIClassList()
|
public function Array<class<KFPawn_Monster> > GetNonSpawnAIClassList(E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
local Array<class<KFPawn_Monster> > RV;
|
local Array<class<KFPawn_Monster> > RV;
|
||||||
local class<KFPawn_Monster> KFPMC;
|
local class<KFPawn_Monster> KFPMC;
|
||||||
|
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
foreach NonSpawnAIClassList(KFPMC)
|
foreach NonSpawnAIClassList(KFPMC)
|
||||||
RV.AddItem(KFPMC);
|
RV.AddItem(KFPMC);
|
||||||
|
|
||||||
return RV;
|
return RV;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Array<class<KFPawn_Monster> > GetAIBossClassList()
|
public function Array<class<KFPawn_Monster> > GetAIBossClassList(E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
local Array<class<KFPawn_Monster> > RV;
|
local Array<class<KFPawn_Monster> > RV;
|
||||||
local class<KFPawn_Monster> KFPMC;
|
local class<KFPawn_Monster> KFPMC;
|
||||||
|
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
foreach AIBossClassList(KFPMC)
|
foreach AIBossClassList(KFPMC)
|
||||||
RV.AddItem(KFPMC);
|
RV.AddItem(KFPMC);
|
||||||
|
|
||||||
return RV;
|
return RV;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bool IsCustomZed(class<KFPawn_Monster> KFPM)
|
public function bool IsCustomZed(class<KFPawn_Monster> KFPM, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
if (AIClassList.Find(KFPM) != INDEX_NONE) return false;
|
if (AIClassList.Find(KFPM) != INDEX_NONE) return false;
|
||||||
if (NonSpawnAIClassList.Find(KFPM) != INDEX_NONE) return false;
|
if (NonSpawnAIClassList.Find(KFPM) != INDEX_NONE) return false;
|
||||||
@ -42,10 +48,12 @@ public function bool IsCustomZed(class<KFPawn_Monster> KFPM)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bool IsOriginalAI(class<KFPawn_Monster> KFPM, optional out EAIType AIType)
|
public function bool IsOriginalAI(class<KFPawn_Monster> KFPM, optional out EAIType AIType, optional E_LogLevel LogLevel = LL_None)
|
||||||
{
|
{
|
||||||
local int Type;
|
local int Type;
|
||||||
|
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
Type = AIClassList.Find(KFPM);
|
Type = AIClassList.Find(KFPM);
|
||||||
if (Type != INDEX_NONE)
|
if (Type != INDEX_NONE)
|
||||||
{
|
{
|
||||||
@ -56,10 +64,12 @@ public function bool IsOriginalAI(class<KFPawn_Monster> KFPM, optional out EAITy
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bool IsOriginalAIBoss(class<KFPawn_Monster> KFPM, optional out EBossAIType AIType)
|
public function bool IsOriginalAIBoss(class<KFPawn_Monster> KFPM, optional out EBossAIType AIType, optional E_LogLevel LogLevel = LL_None)
|
||||||
{
|
{
|
||||||
local int Type;
|
local int Type;
|
||||||
|
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
Type = AIBossClassList.Find(KFPM);
|
Type = AIBossClassList.Find(KFPM);
|
||||||
if (Type != INDEX_NONE)
|
if (Type != INDEX_NONE)
|
||||||
{
|
{
|
||||||
@ -70,16 +80,20 @@ public function bool IsOriginalAIBoss(class<KFPawn_Monster> KFPM, optional out E
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function class<KFPawn_Monster> AITypePawn(EAIType AIType)
|
public function class<KFPawn_Monster> AITypePawn(EAIType AIType, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
if (AIType < AIClassList.Length)
|
if (AIType < AIClassList.Length)
|
||||||
return AIClassList[AIType];
|
return AIClassList[AIType];
|
||||||
else
|
else
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function class<KFPawn_Monster> BossAITypePawn(EBossAIType AIType)
|
public function class<KFPawn_Monster> BossAITypePawn(EBossAIType AIType, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
if (AIType < AIBossClassList.Length)
|
if (AIType < AIBossClassList.Length)
|
||||||
return AIBossClassList[AIType];
|
return AIBossClassList[AIType];
|
||||||
else
|
else
|
||||||
|
@ -13,12 +13,14 @@ var public config float SingleSpawnLimitCycleMultiplier;
|
|||||||
var public config int AliveSpawnLimit;
|
var public config int AliveSpawnLimit;
|
||||||
var public config bool bSmoothSpawn;
|
var public config bool bSmoothSpawn;
|
||||||
|
|
||||||
public static function InitConfig(int Version, int LatestVersion)
|
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
switch (Version)
|
switch (Version)
|
||||||
{
|
{
|
||||||
case `NO_CONFIG:
|
case `NO_CONFIG:
|
||||||
ApplyDefault();
|
ApplyDefault(LogLevel);
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
default.bSmoothSpawn = false;
|
default.bSmoothSpawn = false;
|
||||||
@ -32,8 +34,10 @@ public static function InitConfig(int Version, int LatestVersion)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function ApplyDefault()
|
private static function ApplyDefault(E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
default.bCyclicalSpawn = true;
|
default.bCyclicalSpawn = true;
|
||||||
default.bShadowSpawn = true;
|
default.bShadowSpawn = true;
|
||||||
default.bSmoothSpawn = true;
|
default.bSmoothSpawn = true;
|
||||||
@ -50,6 +54,8 @@ public static function bool Load(E_LogLevel LogLevel)
|
|||||||
{
|
{
|
||||||
local bool Errors;
|
local bool Errors;
|
||||||
|
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
if (default.ZedTotalMultiplier <= 0.f)
|
if (default.ZedTotalMultiplier <= 0.f)
|
||||||
{
|
{
|
||||||
`Log_Error("ZedTotalMultiplier" @ "(" $ default.ZedTotalMultiplier $ ")" @ "must be greater than 0.0");
|
`Log_Error("ZedTotalMultiplier" @ "(" $ default.ZedTotalMultiplier $ ")" @ "must be greater than 0.0");
|
||||||
|
@ -5,13 +5,15 @@ class SpawnAtPlayerStart extends Object
|
|||||||
var private config Array<String> ZedClass;
|
var private config Array<String> ZedClass;
|
||||||
var public config Array<String> Map;
|
var public config Array<String> Map;
|
||||||
|
|
||||||
public static function InitConfig(int Version, int LatestVersion)
|
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
switch (Version)
|
switch (Version)
|
||||||
{
|
{
|
||||||
case `NO_CONFIG:
|
case `NO_CONFIG:
|
||||||
case 2:
|
case 2:
|
||||||
ApplyDefault();
|
ApplyDefault(LogLevel);
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
@ -22,8 +24,10 @@ public static function InitConfig(int Version, int LatestVersion)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function ApplyDefault()
|
private static function ApplyDefault(E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
default.ZedClass.Length = 0;
|
default.ZedClass.Length = 0;
|
||||||
default.ZedClass.AddItem("HL2Monsters.Combine_Strider");
|
default.ZedClass.AddItem("HL2Monsters.Combine_Strider");
|
||||||
default.ZedClass.AddItem("HL2Monsters.Combine_Gunship");
|
default.ZedClass.AddItem("HL2Monsters.Combine_Gunship");
|
||||||
@ -41,6 +45,8 @@ public static function Array<class<KFPawn_Monster> > Load(E_LogLevel LogLevel)
|
|||||||
local String ZedClassTmp;
|
local String ZedClassTmp;
|
||||||
local int Line;
|
local int Line;
|
||||||
|
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
`Log_Info("Load zeds to spawn at player start:");
|
`Log_Info("Load zeds to spawn at player start:");
|
||||||
foreach default.ZedClass(ZedClassTmp, Line)
|
foreach default.ZedClass(ZedClassTmp, Line)
|
||||||
{
|
{
|
||||||
|
@ -15,12 +15,14 @@ struct S_SpawnEntryCfg
|
|||||||
var public config bool bStopRegularSpawn;
|
var public config bool bStopRegularSpawn;
|
||||||
var private config Array<S_SpawnEntryCfg> Spawn;
|
var private config Array<S_SpawnEntryCfg> Spawn;
|
||||||
|
|
||||||
public static function InitConfig(int Version, int LatestVersion, KFGI_Access KFGIA)
|
public static function InitConfig(int Version, int LatestVersion, KFGI_Access KFGIA, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
switch (Version)
|
switch (Version)
|
||||||
{
|
{
|
||||||
case `NO_CONFIG:
|
case `NO_CONFIG:
|
||||||
ApplyDefault(KFGIA);
|
ApplyDefault(KFGIA, LogLevel);
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
@ -31,12 +33,14 @@ public static function InitConfig(int Version, int LatestVersion, KFGI_Access KF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function ApplyDefault(KFGI_Access KFGIA)
|
private static function ApplyDefault(KFGI_Access KFGIA, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
local S_SpawnEntryCfg SpawnEntry;
|
local S_SpawnEntryCfg SpawnEntry;
|
||||||
local Array<class<KFPawn_Monster> > KFPM_Bosses;
|
local Array<class<KFPawn_Monster> > KFPM_Bosses;
|
||||||
local class<KFPawn_Monster> KFPMC;
|
local class<KFPawn_Monster> KFPMC;
|
||||||
|
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
default.Spawn.Length = 0;
|
default.Spawn.Length = 0;
|
||||||
|
|
||||||
default.bStopRegularSpawn = true;
|
default.bStopRegularSpawn = true;
|
||||||
@ -46,7 +50,7 @@ private static function ApplyDefault(KFGI_Access KFGIA)
|
|||||||
SpawnEntry.SingleSpawnLimit = 1;
|
SpawnEntry.SingleSpawnLimit = 1;
|
||||||
SpawnEntry.Delay = 30;
|
SpawnEntry.Delay = 30;
|
||||||
SpawnEntry.Probability = 100;
|
SpawnEntry.Probability = 100;
|
||||||
KFPM_Bosses = KFGIA.GetAIBossClassList();
|
KFPM_Bosses = KFGIA.GetAIBossClassList(LogLevel);
|
||||||
foreach KFPM_Bosses(KFPMC)
|
foreach KFPM_Bosses(KFPMC)
|
||||||
{
|
{
|
||||||
SpawnEntry.BossClass = "KFGameContent." $ String(KFPMC);
|
SpawnEntry.BossClass = "KFGameContent." $ String(KFPMC);
|
||||||
@ -62,6 +66,8 @@ public static function Array<S_SpawnEntry> Load(E_LogLevel LogLevel)
|
|||||||
local int Line;
|
local int Line;
|
||||||
local bool Errors;
|
local bool Errors;
|
||||||
|
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
`Log_Info("Load boss waves spawn list:");
|
`Log_Info("Load boss waves spawn list:");
|
||||||
foreach default.Spawn(SpawnEntryCfg, Line)
|
foreach default.Spawn(SpawnEntryCfg, Line)
|
||||||
{
|
{
|
||||||
|
@ -20,12 +20,14 @@ delegate int SpawnListSort(S_SpawnEntryCfg A, S_SpawnEntryCfg B)
|
|||||||
return A.Wave > B.Wave ? -1 : 0;
|
return A.Wave > B.Wave ? -1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function InitConfig(int Version, int LatestVersion, KFGI_Access KFGIA)
|
public static function InitConfig(int Version, int LatestVersion, KFGI_Access KFGIA, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
switch (Version)
|
switch (Version)
|
||||||
{
|
{
|
||||||
case `NO_CONFIG:
|
case `NO_CONFIG:
|
||||||
ApplyDefault(KFGIA);
|
ApplyDefault(KFGIA, LogLevel);
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
@ -36,12 +38,14 @@ public static function InitConfig(int Version, int LatestVersion, KFGI_Access KF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function ApplyDefault(KFGI_Access KFGIA)
|
private static function ApplyDefault(KFGI_Access KFGIA, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
local S_SpawnEntryCfg SpawnEntry;
|
local S_SpawnEntryCfg SpawnEntry;
|
||||||
local Array<class<KFPawn_Monster> > KFPM_Zeds;
|
local Array<class<KFPawn_Monster> > KFPM_Zeds;
|
||||||
local class<KFPawn_Monster> KFPMC;
|
local class<KFPawn_Monster> KFPMC;
|
||||||
|
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
default.Spawn.Length = 0;
|
default.Spawn.Length = 0;
|
||||||
|
|
||||||
SpawnEntry.Wave = 0;
|
SpawnEntry.Wave = 0;
|
||||||
@ -51,7 +55,7 @@ private static function ApplyDefault(KFGI_Access KFGIA)
|
|||||||
SpawnEntry.Delay = 60;
|
SpawnEntry.Delay = 60;
|
||||||
SpawnEntry.Probability = 100;
|
SpawnEntry.Probability = 100;
|
||||||
|
|
||||||
KFPM_Zeds = KFGIA.GetAIClassList();
|
KFPM_Zeds = KFGIA.GetAIClassList(LogLevel);
|
||||||
foreach KFPM_Zeds(KFPMC)
|
foreach KFPM_Zeds(KFPMC)
|
||||||
{
|
{
|
||||||
++SpawnEntry.Wave;
|
++SpawnEntry.Wave;
|
||||||
@ -68,6 +72,8 @@ public static function Array<S_SpawnEntry> Load(E_LogLevel LogLevel)
|
|||||||
local int Line;
|
local int Line;
|
||||||
local bool Errors;
|
local bool Errors;
|
||||||
|
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
`Log_Info("Load spawn list:");
|
`Log_Info("Load spawn list:");
|
||||||
foreach default.Spawn(SpawnEntryCfg, Line)
|
foreach default.Spawn(SpawnEntryCfg, Line)
|
||||||
{
|
{
|
||||||
|
@ -16,12 +16,14 @@ struct S_SpawnEntryCfg
|
|||||||
var public config bool bStopRegularSpawn;
|
var public config bool bStopRegularSpawn;
|
||||||
var private config Array<S_SpawnEntryCfg> Spawn;
|
var private config Array<S_SpawnEntryCfg> Spawn;
|
||||||
|
|
||||||
public static function InitConfig(int Version, int LatestVersion)
|
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
switch (Version)
|
switch (Version)
|
||||||
{
|
{
|
||||||
case `NO_CONFIG:
|
case `NO_CONFIG:
|
||||||
ApplyDefault();
|
ApplyDefault(LogLevel);
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
@ -32,11 +34,13 @@ public static function InitConfig(int Version, int LatestVersion)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function ApplyDefault()
|
private static function ApplyDefault(E_LogLevel LogLevel)
|
||||||
{
|
{
|
||||||
local S_SpawnEntryCfg SpawnEntry;
|
local S_SpawnEntryCfg SpawnEntry;
|
||||||
local EAIType AIType;
|
local EAIType AIType;
|
||||||
|
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
default.bStopRegularSpawn = true;
|
default.bStopRegularSpawn = true;
|
||||||
default.Spawn.Length = 0;
|
default.Spawn.Length = 0;
|
||||||
SpawnEntry.ZedClass = "SomePackage.SomeClass";
|
SpawnEntry.ZedClass = "SomePackage.SomeClass";
|
||||||
@ -60,6 +64,8 @@ public static function Array<S_SpawnEntry> Load(KFGameInfo_Endless KFGIE, E_LogL
|
|||||||
local int Line;
|
local int Line;
|
||||||
local bool Errors;
|
local bool Errors;
|
||||||
|
|
||||||
|
`Log_TraceStatic();
|
||||||
|
|
||||||
if (KFGIE == None)
|
if (KFGIE == None)
|
||||||
{
|
{
|
||||||
`Log_Info("Not Endless mode, skip loading special waves");
|
`Log_Info("Not Endless mode, skip loading special waves");
|
||||||
|
@ -73,7 +73,7 @@ public simulated function bool SafeDestroy()
|
|||||||
|
|
||||||
public event PreBeginPlay()
|
public event PreBeginPlay()
|
||||||
{
|
{
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
if (WorldInfo.NetMode == NM_Client)
|
if (WorldInfo.NetMode == NM_Client)
|
||||||
{
|
{
|
||||||
@ -87,7 +87,7 @@ public event PreBeginPlay()
|
|||||||
|
|
||||||
public event PostBeginPlay()
|
public event PostBeginPlay()
|
||||||
{
|
{
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
if (bPendingDelete || bDeleteMe) return;
|
if (bPendingDelete || bDeleteMe) return;
|
||||||
|
|
||||||
@ -104,11 +104,11 @@ private function InitConfig()
|
|||||||
SaveConfig();
|
SaveConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
CfgSpawn.static.InitConfig(Version, LatestVersion);
|
CfgSpawn.static.InitConfig(Version, LatestVersion, LogLevel);
|
||||||
CfgSpawnAtPlayerStart.static.InitConfig(Version, LatestVersion);
|
CfgSpawnAtPlayerStart.static.InitConfig(Version, LatestVersion, LogLevel);
|
||||||
CfgSpawnListRW.static.InitConfig(Version, LatestVersion, KFGIA);
|
CfgSpawnListRW.static.InitConfig(Version, LatestVersion, KFGIA, LogLevel);
|
||||||
CfgSpawnListBW.static.InitConfig(Version, LatestVersion, KFGIA);
|
CfgSpawnListBW.static.InitConfig(Version, LatestVersion, KFGIA, LogLevel);
|
||||||
CfgSpawnListSW.static.InitConfig(Version, LatestVersion);
|
CfgSpawnListSW.static.InitConfig(Version, LatestVersion, LogLevel);
|
||||||
|
|
||||||
switch (Version)
|
switch (Version)
|
||||||
{
|
{
|
||||||
@ -148,7 +148,7 @@ private function Init()
|
|||||||
local S_SpawnEntry SE;
|
local S_SpawnEntry SE;
|
||||||
local String CurrentMap;
|
local String CurrentMap;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
KFGIS = KFGameInfo_Survival(WorldInfo.Game);
|
KFGIS = KFGameInfo_Survival(WorldInfo.Game);
|
||||||
if (KFGIS == None)
|
if (KFGIS == None)
|
||||||
@ -220,6 +220,8 @@ private function PreloadContent()
|
|||||||
{
|
{
|
||||||
local class<KFPawn_Monster> PawnClass;
|
local class<KFPawn_Monster> PawnClass;
|
||||||
|
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
ExtractCustomZedsFromSpawnList(SpawnListRW, CustomZeds);
|
ExtractCustomZedsFromSpawnList(SpawnListRW, CustomZeds);
|
||||||
ExtractCustomZedsFromSpawnList(SpawnListBW, CustomZeds);
|
ExtractCustomZedsFromSpawnList(SpawnListBW, CustomZeds);
|
||||||
ExtractCustomZedsFromSpawnList(SpawnListSW, CustomZeds);
|
ExtractCustomZedsFromSpawnList(SpawnListSW, CustomZeds);
|
||||||
@ -235,10 +237,12 @@ private function ExtractCustomZedsFromSpawnList(Array<S_SpawnEntry> SpawnList, o
|
|||||||
{
|
{
|
||||||
local S_SpawnEntry SE;
|
local S_SpawnEntry SE;
|
||||||
|
|
||||||
|
`Log_Trace();
|
||||||
|
|
||||||
foreach SpawnList(SE)
|
foreach SpawnList(SE)
|
||||||
{
|
{
|
||||||
if (Out.Find(SE.ZedClass) == INDEX_NONE
|
if (Out.Find(SE.ZedClass) == INDEX_NONE
|
||||||
&& KFGIA.IsCustomZed(SE.ZedClass))
|
&& KFGIA.IsCustomZed(SE.ZedClass, LogLevel))
|
||||||
{
|
{
|
||||||
Out.AddItem(SE.ZedClass);
|
Out.AddItem(SE.ZedClass);
|
||||||
}
|
}
|
||||||
@ -251,7 +255,7 @@ private function SpawnTimer()
|
|||||||
local int Index;
|
local int Index;
|
||||||
local float Threshold;
|
local float Threshold;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
if (KFGIS.WaveNum != 0 && CurrentWave < KFGIS.WaveNum)
|
if (KFGIS.WaveNum != 0 && CurrentWave < KFGIS.WaveNum)
|
||||||
{
|
{
|
||||||
@ -323,7 +327,7 @@ private function SetupWave()
|
|||||||
local S_SpawnEntry SE;
|
local S_SpawnEntry SE;
|
||||||
local EAIType SWType;
|
local EAIType SWType;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
if (CfgSpawn.default.bCyclicalSpawn && KFGIS.WaveNum > 1 && KFGIS.WaveNum == CycleWaveShift + CycleWaveSize * CurrentCycle)
|
if (CfgSpawn.default.bCyclicalSpawn && KFGIS.WaveNum > 1 && KFGIS.WaveNum == CycleWaveShift + CycleWaveSize * CurrentCycle)
|
||||||
{
|
{
|
||||||
@ -350,7 +354,7 @@ private function SetupWave()
|
|||||||
|
|
||||||
if (KFGIS.MyKFGRI.IsBossWave())
|
if (KFGIS.MyKFGRI.IsBossWave())
|
||||||
{
|
{
|
||||||
CurrentBossClass = KFGIA.BossAITypePawn(EBossAIType(KFGIS.MyKFGRI.BossIndex));
|
CurrentBossClass = KFGIA.BossAITypePawn(EBossAIType(KFGIS.MyKFGRI.BossIndex), LogLevel);
|
||||||
if (CurrentBossClass == None)
|
if (CurrentBossClass == None)
|
||||||
{
|
{
|
||||||
`Log_Error("Can't determine boss class. Boss index:" @ KFGIS.MyKFGRI.BossIndex);
|
`Log_Error("Can't determine boss class. Boss index:" @ KFGIS.MyKFGRI.BossIndex);
|
||||||
@ -432,7 +436,7 @@ private function AdjustSpawnList(out Array<S_SpawnEntry> List)
|
|||||||
local float PawnTotalF, PawnLimitF;
|
local float PawnTotalF, PawnLimitF;
|
||||||
local int ZedNameMaxLength;
|
local int ZedNameMaxLength;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
Cycle = float(CurrentCycle);
|
Cycle = float(CurrentCycle);
|
||||||
Players = float(PlayerCount());
|
Players = float(PlayerCount());
|
||||||
@ -487,7 +491,7 @@ private function SpawnTimerLogger(bool Stop, optional String Comment)
|
|||||||
{
|
{
|
||||||
local String Message;
|
local String Message;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
if (Stop)
|
if (Stop)
|
||||||
Message = "Stop spawn";
|
Message = "Stop spawn";
|
||||||
@ -511,7 +515,7 @@ private function SpawnEntry(out Array<S_SpawnEntry> SpawnList, int Index)
|
|||||||
local String Action, Comment, NextSpawn;
|
local String Action, Comment, NextSpawn;
|
||||||
local bool SpawnAtPlayerStart;
|
local bool SpawnAtPlayerStart;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
SE = SpawnList[Index];
|
SE = SpawnList[Index];
|
||||||
|
|
||||||
@ -628,7 +632,7 @@ private function int PlayerCount()
|
|||||||
local int HumanPlayers;
|
local int HumanPlayers;
|
||||||
local KFOnlineGameSettings KFGameSettings;
|
local KFOnlineGameSettings KFGameSettings;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
if (KFGIS.PlayfabInter != None && KFGIS.PlayfabInter.GetGameSettings() != None)
|
if (KFGIS.PlayfabInter != None && KFGIS.PlayfabInter.GetGameSettings() != None)
|
||||||
{
|
{
|
||||||
@ -653,7 +657,7 @@ private function Vector PlayerStartLocation()
|
|||||||
{
|
{
|
||||||
local PlayerController PC;
|
local PlayerController PC;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
foreach WorldInfo.AllControllers(class'PlayerController', PC)
|
foreach WorldInfo.AllControllers(class'PlayerController', PC)
|
||||||
return KFGIS.FindPlayerStart(PC, 0).Location;
|
return KFGIS.FindPlayerStart(PC, 0).Location;
|
||||||
@ -672,7 +676,7 @@ private function int SpawnZed(class<KFPawn_Monster> ZedClass, int PawnCount, opt
|
|||||||
local int Failed, Spawned;
|
local int Failed, Spawned;
|
||||||
local int Index;
|
local int Index;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
PlayerStart = PlayerStartLocation();
|
PlayerStart = PlayerStartLocation();
|
||||||
if (SpawnAtPlayerStart)
|
if (SpawnAtPlayerStart)
|
||||||
@ -750,14 +754,14 @@ private function int SpawnZed(class<KFPawn_Monster> ZedClass, int PawnCount, opt
|
|||||||
|
|
||||||
public function NotifyLogin(Controller C)
|
public function NotifyLogin(Controller C)
|
||||||
{
|
{
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
CreateRepLink(C);
|
CreateRepLink(C);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function NotifyLogout(Controller C)
|
public function NotifyLogout(Controller C)
|
||||||
{
|
{
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
DestroyRepLink(C);
|
DestroyRepLink(C);
|
||||||
}
|
}
|
||||||
@ -766,7 +770,7 @@ public function bool CreateRepLink(Controller C)
|
|||||||
{
|
{
|
||||||
local ZedSpawnerRepLink RepLink;
|
local ZedSpawnerRepLink RepLink;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
if (C == None) return false;
|
if (C == None) return false;
|
||||||
|
|
||||||
@ -789,7 +793,7 @@ public function bool DestroyRepLink(Controller C)
|
|||||||
{
|
{
|
||||||
local ZedSpawnerRepLink RepLink;
|
local ZedSpawnerRepLink RepLink;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
if (C == None) return false;
|
if (C == None) return false;
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ var private ZedSpawner ZS;
|
|||||||
|
|
||||||
public event PreBeginPlay()
|
public event PreBeginPlay()
|
||||||
{
|
{
|
||||||
Super.PreBeginPlay();
|
Super.PreBeginPlay();
|
||||||
|
|
||||||
if (WorldInfo.NetMode == NM_Client) return;
|
if (WorldInfo.NetMode == NM_Client) return;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public simulated function bool SafeDestroy()
|
|||||||
|
|
||||||
public reliable client function ClientSync(class<KFPawn_Monster> CustomZed)
|
public reliable client function ClientSync(class<KFPawn_Monster> CustomZed)
|
||||||
{
|
{
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
`Log_Debug("Received:" @ CustomZed);
|
`Log_Debug("Received:" @ CustomZed);
|
||||||
CustomZeds.AddItem(CustomZed);
|
CustomZeds.AddItem(CustomZed);
|
||||||
@ -29,7 +29,7 @@ public reliable client function SyncFinished()
|
|||||||
{
|
{
|
||||||
local class<KFPawn_Monster> CustomZed;
|
local class<KFPawn_Monster> CustomZed;
|
||||||
|
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
foreach CustomZeds(CustomZed)
|
foreach CustomZeds(CustomZed)
|
||||||
{
|
{
|
||||||
@ -42,7 +42,7 @@ public reliable client function SyncFinished()
|
|||||||
|
|
||||||
public reliable server function ServerSync()
|
public reliable server function ServerSync()
|
||||||
{
|
{
|
||||||
`Log_Trace(`Location);
|
`Log_Trace();
|
||||||
|
|
||||||
if (bPendingDelete || bDeleteMe) return;
|
if (bPendingDelete || bDeleteMe) return;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ class _Logger extends Object
|
|||||||
enum E_LogLevel
|
enum E_LogLevel
|
||||||
{
|
{
|
||||||
LL_WrongLevel,
|
LL_WrongLevel,
|
||||||
|
LL_None,
|
||||||
LL_Fatal,
|
LL_Fatal,
|
||||||
LL_Error,
|
LL_Error,
|
||||||
LL_Warning,
|
LL_Warning,
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
// Logger
|
// Logger
|
||||||
`define Log_Tag 'ZedSpawner'
|
`define Log_Tag 'ZedSpawner'
|
||||||
|
|
||||||
`define Log_Base(msg, cond) `log(`msg `if(`cond), `cond`{endif}, `Log_Tag)
|
`define LocationStatic "`{ClassName}::" $ GetFuncName()
|
||||||
|
|
||||||
`define Log_Fatal(msg) `log("FATAL:" @ `msg, (LogLevel >= LL_Fatal), `Log_Tag)
|
`define Log_Base(msg, cond) `log(`msg `if(`cond), `cond`{endif}, `Log_Tag)
|
||||||
`define Log_Error(msg) `log("ERROR:" @ `msg, (LogLevel >= LL_Error), `Log_Tag)
|
|
||||||
`define Log_Warn(msg) `log("WARN:" @ `msg, (LogLevel >= LL_Warning), `Log_Tag)
|
`define Log_Fatal(msg) `log("FATAL:" @ `msg, (LogLevel >= LL_Fatal), `Log_Tag)
|
||||||
`define Log_Info(msg) `log("INFO:" @ `msg, (LogLevel >= LL_Info), `Log_Tag)
|
`define Log_Error(msg) `log("ERROR:" @ `msg, (LogLevel >= LL_Error), `Log_Tag)
|
||||||
`define Log_Debug(msg) `log("DEBUG:" @ `msg, (LogLevel >= LL_Debug), `Log_Tag)
|
`define Log_Warn(msg) `log("WARN:" @ `msg, (LogLevel >= LL_Warning), `Log_Tag)
|
||||||
`define Log_Trace(msg) `log("TRACE:" @ `msg, (LogLevel >= LL_Trace), `Log_Tag)
|
`define Log_Info(msg) `log("INFO:" @ `msg, (LogLevel >= LL_Info), `Log_Tag)
|
||||||
|
`define Log_Debug(msg) `log("DEBUG:" @ `msg, (LogLevel >= LL_Debug), `Log_Tag)
|
||||||
|
|
||||||
|
`define Log_Trace(msg) `log("TRACE:" @ `Location `if(`msg) @ `msg`{endif}, (LogLevel >= LL_Trace), `Log_Tag)
|
||||||
|
`define Log_TraceStatic(msg) `log("TRACE:" @ `LocationStatic `if(`msg) @ `msg`{endif}, (LogLevel >= LL_Trace), `Log_Tag)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user