fix style

This commit is contained in:
GenZmeY 2023-05-14 09:38:02 +03:00
parent b781db3329
commit 281d67d9d3
15 changed files with 1605 additions and 1605 deletions

View File

@ -16,7 +16,7 @@ No. This mod is not whitelisted and will de-rank your server. Any XP gained will
[h1]Usage (single player)[/h1]
[olist]
[*]Subscribe to this mutator;
[*]Start KF2;
[*]Start KF2;
[*]Open console (~) and input:
[b]open KF-BioticsLab?Mutator=ZedSpawner.ZedSpawnerMut[/b]
(replace the map and add the parameters you need)

View File

@ -5,12 +5,12 @@ public function Array<class<KFPawn_Monster> > GetAIClassList(E_LogLevel LogLevel
{
local Array<class<KFPawn_Monster> > RV;
local class<KFPawn_Monster> KFPMC;
`Log_Trace();
foreach AIClassList(KFPMC)
RV.AddItem(KFPMC);
return RV;
}
@ -18,12 +18,12 @@ public function Array<class<KFPawn_Monster> > GetNonSpawnAIClassList(E_LogLevel
{
local Array<class<KFPawn_Monster> > RV;
local class<KFPawn_Monster> KFPMC;
`Log_Trace();
foreach NonSpawnAIClassList(KFPMC)
RV.AddItem(KFPMC);
return RV;
}
@ -31,12 +31,12 @@ public function Array<class<KFPawn_Monster> > GetAIBossClassList(E_LogLevel LogL
{
local Array<class<KFPawn_Monster> > RV;
local class<KFPawn_Monster> KFPMC;
`Log_Trace();
foreach AIBossClassList(KFPMC)
RV.AddItem(KFPMC);
return RV;
}
@ -51,39 +51,39 @@ public function bool IsCustomZed(class<KFPawn_Monster> KFPM, E_LogLevel LogLevel
public function bool IsOriginalAI(class<KFPawn_Monster> KFPM, optional out EAIType AIType, optional E_LogLevel LogLevel = LL_None)
{
local int Type;
`Log_Trace();
Type = AIClassList.Find(KFPM);
if (Type != INDEX_NONE)
{
AIType = EAIType(Type);
return true;
}
return false;
}
public function bool IsOriginalAIBoss(class<KFPawn_Monster> KFPM, optional out EBossAIType AIType, optional E_LogLevel LogLevel = LL_None)
{
local int Type;
`Log_Trace();
Type = AIBossClassList.Find(KFPM);
if (Type != INDEX_NONE)
{
AIType = EBossAIType(Type);
return true;
}
return false;
}
public function class<KFPawn_Monster> AITypePawn(EAIType AIType, E_LogLevel LogLevel)
{
`Log_Trace();
if (AIType < AIClassList.Length)
return AIClassList[AIType];
else
@ -93,7 +93,7 @@ public function class<KFPawn_Monster> AITypePawn(EAIType AIType, E_LogLevel LogL
public function class<KFPawn_Monster> BossAITypePawn(EBossAIType AIType, E_LogLevel LogLevel)
{
`Log_Trace();
if (AIType < AIBossClassList.Length)
return AIBossClassList[AIType];
else
@ -102,5 +102,5 @@ public function class<KFPawn_Monster> BossAITypePawn(EBossAIType AIType, E_LogLe
defaultproperties
{
}

View File

@ -1,107 +1,107 @@
class Spawn extends Object
dependson(ZedSpawner)
config(ZedSpawner);
var public config bool bCyclicalSpawn;
var public config bool bShadowSpawn;
var public config float ZedTotalMultiplier;
var public config float SpawnTotalPlayerMultiplier;
var public config float SpawnTotalCycleMultiplier;
var public config float SingleSpawnLimitMultiplier;
var public config float SingleSpawnLimitPlayerMultiplier;
var public config float SingleSpawnLimitCycleMultiplier;
var public config int AliveSpawnLimit;
var public config bool bSmoothSpawn;
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
{
`Log_TraceStatic();
switch (Version)
{
case `NO_CONFIG:
ApplyDefault(LogLevel);
case 3:
default.bSmoothSpawn = false;
default: break;
}
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault(E_LogLevel LogLevel)
{
`Log_TraceStatic();
default.bCyclicalSpawn = true;
default.bShadowSpawn = true;
default.bSmoothSpawn = true;
default.ZedTotalMultiplier = 1.0;
default.SpawnTotalPlayerMultiplier = 0.75;
default.SpawnTotalCycleMultiplier = 0.75;
default.SingleSpawnLimitMultiplier = 1.0;
default.SingleSpawnLimitPlayerMultiplier = 0.75;
default.SingleSpawnLimitCycleMultiplier = 0.75;
default.AliveSpawnLimit = 0;
}
public static function bool Load(E_LogLevel LogLevel)
{
local bool Errors;
`Log_TraceStatic();
if (default.ZedTotalMultiplier <= 0.f)
{
`Log_Error("ZedTotalMultiplier" @ "(" $ default.ZedTotalMultiplier $ ")" @ "must be greater than 0.0");
Errors = true;
}
if (default.SpawnTotalPlayerMultiplier < 0.f)
{
`Log_Error("SpawnTotalPlayerMultiplier" @ "(" $ default.SpawnTotalPlayerMultiplier $ ")" @ "must be greater than or equal 0.0");
Errors = true;
}
if (default.SpawnTotalCycleMultiplier < 0.f)
{
`Log_Error("SpawnTotalCycleMultiplier" @ "(" $ default.SpawnTotalCycleMultiplier $ ")" @ "must be greater than or equal 0.0");
Errors = true;
}
if (default.SingleSpawnLimitMultiplier <= 0.f)
{
`Log_Error("SingleSpawnLimitMultiplier" @ "(" $ default.SingleSpawnLimitMultiplier $ ")" @ "must be greater than 0.0");
Errors = true;
}
if (default.SingleSpawnLimitPlayerMultiplier < 0.f)
{
`Log_Error("SingleSpawnLimitPlayerMultiplier" @ "(" $ default.SingleSpawnLimitPlayerMultiplier $ ")" @ "must be greater than or equal 0.0");
Errors = true;
}
if (default.SingleSpawnLimitCycleMultiplier < 0.f)
{
`Log_Error("SingleSpawnLimitCycleMultiplier" @ "(" $ default.SingleSpawnLimitCycleMultiplier $ ")" @ "must be greater than or equal 0.0");
Errors = true;
}
if (default.AliveSpawnLimit < 0)
{
`Log_Error("AliveSpawnLimit" @ "(" $ default.AliveSpawnLimit $ ")" @ "must be greater than or equal 0");
Errors = true;
}
return !Errors;
}
defaultproperties
{
}
class Spawn extends Object
dependson(ZedSpawner)
config(ZedSpawner);
var public config bool bCyclicalSpawn;
var public config bool bShadowSpawn;
var public config float ZedTotalMultiplier;
var public config float SpawnTotalPlayerMultiplier;
var public config float SpawnTotalCycleMultiplier;
var public config float SingleSpawnLimitMultiplier;
var public config float SingleSpawnLimitPlayerMultiplier;
var public config float SingleSpawnLimitCycleMultiplier;
var public config int AliveSpawnLimit;
var public config bool bSmoothSpawn;
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
{
`Log_TraceStatic();
switch (Version)
{
case `NO_CONFIG:
ApplyDefault(LogLevel);
case 3:
default.bSmoothSpawn = false;
default: break;
}
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault(E_LogLevel LogLevel)
{
`Log_TraceStatic();
default.bCyclicalSpawn = true;
default.bShadowSpawn = true;
default.bSmoothSpawn = true;
default.ZedTotalMultiplier = 1.0;
default.SpawnTotalPlayerMultiplier = 0.75;
default.SpawnTotalCycleMultiplier = 0.75;
default.SingleSpawnLimitMultiplier = 1.0;
default.SingleSpawnLimitPlayerMultiplier = 0.75;
default.SingleSpawnLimitCycleMultiplier = 0.75;
default.AliveSpawnLimit = 0;
}
public static function bool Load(E_LogLevel LogLevel)
{
local bool Errors;
`Log_TraceStatic();
if (default.ZedTotalMultiplier <= 0.f)
{
`Log_Error("ZedTotalMultiplier" @ "(" $ default.ZedTotalMultiplier $ ")" @ "must be greater than 0.0");
Errors = true;
}
if (default.SpawnTotalPlayerMultiplier < 0.f)
{
`Log_Error("SpawnTotalPlayerMultiplier" @ "(" $ default.SpawnTotalPlayerMultiplier $ ")" @ "must be greater than or equal 0.0");
Errors = true;
}
if (default.SpawnTotalCycleMultiplier < 0.f)
{
`Log_Error("SpawnTotalCycleMultiplier" @ "(" $ default.SpawnTotalCycleMultiplier $ ")" @ "must be greater than or equal 0.0");
Errors = true;
}
if (default.SingleSpawnLimitMultiplier <= 0.f)
{
`Log_Error("SingleSpawnLimitMultiplier" @ "(" $ default.SingleSpawnLimitMultiplier $ ")" @ "must be greater than 0.0");
Errors = true;
}
if (default.SingleSpawnLimitPlayerMultiplier < 0.f)
{
`Log_Error("SingleSpawnLimitPlayerMultiplier" @ "(" $ default.SingleSpawnLimitPlayerMultiplier $ ")" @ "must be greater than or equal 0.0");
Errors = true;
}
if (default.SingleSpawnLimitCycleMultiplier < 0.f)
{
`Log_Error("SingleSpawnLimitCycleMultiplier" @ "(" $ default.SingleSpawnLimitCycleMultiplier $ ")" @ "must be greater than or equal 0.0");
Errors = true;
}
if (default.AliveSpawnLimit < 0)
{
`Log_Error("AliveSpawnLimit" @ "(" $ default.AliveSpawnLimit $ ")" @ "must be greater than or equal 0");
Errors = true;
}
return !Errors;
}
defaultproperties
{
}

View File

@ -1,80 +1,80 @@
class SpawnAtPlayerStart extends Object
dependson(ZedSpawner)
config(ZedSpawner);
var private config Array<String> ZedClass;
var public config Array<String> Map;
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
{
`Log_TraceStatic();
switch (Version)
{
case `NO_CONFIG:
case 2:
ApplyDefault(LogLevel);
default: break;
}
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault(E_LogLevel LogLevel)
{
`Log_TraceStatic();
default.ZedClass.Length = 0;
default.ZedClass.AddItem("HL2Monsters.Combine_Strider");
default.ZedClass.AddItem("HL2Monsters.Combine_Gunship");
default.ZedClass.AddItem("HL2Monsters.Hunter_Chopper");
default.ZedClass.AddItem("SomePackage.SomeZedClassYouWantToSpawnAtPlayerStart");
default.Map.Length = 0;
default.Map.AddItem("KF-SomeMapNameWhereYouWantSpawnZedsAtPlayerStart");
}
public static function Array<class<KFPawn_Monster> > Load(E_LogLevel LogLevel)
{
local Array<class<KFPawn_Monster> > ZedList;
local class<KFPawn_Monster> KFPMC;
local String ZedClassTmp;
local int Line;
`Log_TraceStatic();
`Log_Info("Load zeds to spawn at player start:");
foreach default.ZedClass(ZedClassTmp, Line)
{
KFPMC = class<KFPawn_Monster>(DynamicLoadObject(ZedClassTmp, class'Class'));
if (KFPMC == None)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ ZedClassTmp);
}
else
{
ZedList.AddItem(KFPMC);
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully:" @ ZedClassTmp);
}
}
if (ZedList.Length == default.ZedClass.Length)
{
`Log_Info("Spawn at player start list (Zeds) loaded successfully (" $ default.ZedClass.Length @ "entries)");
}
else
{
`Log_Info("Spawn at player start list (Zeds): loaded" @ ZedList.Length @ "of" @ default.ZedClass.Length @ "entries");
}
return ZedList;
}
defaultproperties
{
}
class SpawnAtPlayerStart extends Object
dependson(ZedSpawner)
config(ZedSpawner);
var private config Array<String> ZedClass;
var public config Array<String> Map;
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
{
`Log_TraceStatic();
switch (Version)
{
case `NO_CONFIG:
case 2:
ApplyDefault(LogLevel);
default: break;
}
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault(E_LogLevel LogLevel)
{
`Log_TraceStatic();
default.ZedClass.Length = 0;
default.ZedClass.AddItem("HL2Monsters.Combine_Strider");
default.ZedClass.AddItem("HL2Monsters.Combine_Gunship");
default.ZedClass.AddItem("HL2Monsters.Hunter_Chopper");
default.ZedClass.AddItem("SomePackage.SomeZedClassYouWantToSpawnAtPlayerStart");
default.Map.Length = 0;
default.Map.AddItem("KF-SomeMapNameWhereYouWantSpawnZedsAtPlayerStart");
}
public static function Array<class<KFPawn_Monster> > Load(E_LogLevel LogLevel)
{
local Array<class<KFPawn_Monster> > ZedList;
local class<KFPawn_Monster> KFPMC;
local String ZedClassTmp;
local int Line;
`Log_TraceStatic();
`Log_Info("Load zeds to spawn at player start:");
foreach default.ZedClass(ZedClassTmp, Line)
{
KFPMC = class<KFPawn_Monster>(DynamicLoadObject(ZedClassTmp, class'Class'));
if (KFPMC == None)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ ZedClassTmp);
}
else
{
ZedList.AddItem(KFPMC);
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully:" @ ZedClassTmp);
}
}
if (ZedList.Length == default.ZedClass.Length)
{
`Log_Info("Spawn at player start list (Zeds) loaded successfully (" $ default.ZedClass.Length @ "entries)");
}
else
{
`Log_Info("Spawn at player start list (Zeds): loaded" @ ZedList.Length @ "of" @ default.ZedClass.Length @ "entries");
}
return ZedList;
}
defaultproperties
{
}

View File

@ -1,142 +1,142 @@
class SpawnListBossWaves extends Object
dependson(ZedSpawner)
config(ZedSpawner);
struct S_SpawnEntryCfg
{
var String BossClass;
var String ZedClass;
var int Delay;
var int Probability;
var int SpawnCountBase;
var int SingleSpawnLimit;
};
var public config bool bStopRegularSpawn;
var private config Array<S_SpawnEntryCfg> Spawn;
public static function InitConfig(int Version, int LatestVersion, KFGI_Access KFGIA, E_LogLevel LogLevel)
{
`Log_TraceStatic();
switch (Version)
{
case `NO_CONFIG:
ApplyDefault(KFGIA, LogLevel);
default: break;
}
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault(KFGI_Access KFGIA, E_LogLevel LogLevel)
{
local S_SpawnEntryCfg SpawnEntry;
local Array<class<KFPawn_Monster> > KFPM_Bosses;
local class<KFPawn_Monster> KFPMC;
`Log_TraceStatic();
default.Spawn.Length = 0;
default.bStopRegularSpawn = true;
default.Spawn.Length = 0;
SpawnEntry.ZedClass = "SomePackage.SomeClass";
SpawnEntry.SpawnCountBase = 2;
SpawnEntry.SingleSpawnLimit = 1;
SpawnEntry.Delay = 30;
SpawnEntry.Probability = 100;
KFPM_Bosses = KFGIA.GetAIBossClassList(LogLevel);
foreach KFPM_Bosses(KFPMC)
{
SpawnEntry.BossClass = "KFGameContent." $ String(KFPMC);
default.Spawn.AddItem(SpawnEntry);
}
}
public static function Array<S_SpawnEntry> Load(E_LogLevel LogLevel)
{
local Array<S_SpawnEntry> SpawnList;
local S_SpawnEntryCfg SpawnEntryCfg;
local S_SpawnEntry SpawnEntry;
local int Line;
local bool Errors;
`Log_TraceStatic();
`Log_Info("Load boss waves spawn list:");
foreach default.Spawn(SpawnEntryCfg, Line)
{
Errors = false;
SpawnEntry.BossClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.BossClass, class'Class'));
if (SpawnEntry.BossClass == None)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load boss class:" @ SpawnEntryCfg.BossClass);
Errors = true;
}
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
if (SpawnEntry.ZedClass == None)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
Errors = true;
}
SpawnEntry.RelativeStartDefault = 0.f;
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
if (SpawnEntryCfg.Delay <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
Errors = true;
}
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
if (SpawnEntry.SpawnCountBase <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
if (SpawnEntry.SingleSpawnLimit < 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
Errors = true;
}
if (!Errors)
{
SpawnList.AddItem(SpawnEntry);
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully: (" $ SpawnEntryCfg.BossClass $ ")" @ SpawnEntryCfg.ZedClass);
}
}
if (SpawnList.Length == default.Spawn.Length)
{
`Log_Info("Boss spawn list loaded successfully (" $ default.Spawn.Length @ "entries)");
}
else
{
`Log_Info("Boss spawn list: loaded" @ SpawnList.Length @ "of" @ default.Spawn.Length @ "entries");
}
return SpawnList;
}
defaultproperties
{
}
class SpawnListBossWaves extends Object
dependson(ZedSpawner)
config(ZedSpawner);
struct S_SpawnEntryCfg
{
var String BossClass;
var String ZedClass;
var int Delay;
var int Probability;
var int SpawnCountBase;
var int SingleSpawnLimit;
};
var public config bool bStopRegularSpawn;
var private config Array<S_SpawnEntryCfg> Spawn;
public static function InitConfig(int Version, int LatestVersion, KFGI_Access KFGIA, E_LogLevel LogLevel)
{
`Log_TraceStatic();
switch (Version)
{
case `NO_CONFIG:
ApplyDefault(KFGIA, LogLevel);
default: break;
}
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault(KFGI_Access KFGIA, E_LogLevel LogLevel)
{
local S_SpawnEntryCfg SpawnEntry;
local Array<class<KFPawn_Monster> > KFPM_Bosses;
local class<KFPawn_Monster> KFPMC;
`Log_TraceStatic();
default.Spawn.Length = 0;
default.bStopRegularSpawn = true;
default.Spawn.Length = 0;
SpawnEntry.ZedClass = "SomePackage.SomeClass";
SpawnEntry.SpawnCountBase = 2;
SpawnEntry.SingleSpawnLimit = 1;
SpawnEntry.Delay = 30;
SpawnEntry.Probability = 100;
KFPM_Bosses = KFGIA.GetAIBossClassList(LogLevel);
foreach KFPM_Bosses(KFPMC)
{
SpawnEntry.BossClass = "KFGameContent." $ String(KFPMC);
default.Spawn.AddItem(SpawnEntry);
}
}
public static function Array<S_SpawnEntry> Load(E_LogLevel LogLevel)
{
local Array<S_SpawnEntry> SpawnList;
local S_SpawnEntryCfg SpawnEntryCfg;
local S_SpawnEntry SpawnEntry;
local int Line;
local bool Errors;
`Log_TraceStatic();
`Log_Info("Load boss waves spawn list:");
foreach default.Spawn(SpawnEntryCfg, Line)
{
Errors = false;
SpawnEntry.BossClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.BossClass, class'Class'));
if (SpawnEntry.BossClass == None)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load boss class:" @ SpawnEntryCfg.BossClass);
Errors = true;
}
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
if (SpawnEntry.ZedClass == None)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
Errors = true;
}
SpawnEntry.RelativeStartDefault = 0.f;
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
if (SpawnEntryCfg.Delay <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
Errors = true;
}
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
if (SpawnEntry.SpawnCountBase <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
if (SpawnEntry.SingleSpawnLimit < 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
Errors = true;
}
if (!Errors)
{
SpawnList.AddItem(SpawnEntry);
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully: (" $ SpawnEntryCfg.BossClass $ ")" @ SpawnEntryCfg.ZedClass);
}
}
if (SpawnList.Length == default.Spawn.Length)
{
`Log_Info("Boss spawn list loaded successfully (" $ default.Spawn.Length @ "entries)");
}
else
{
`Log_Info("Boss spawn list: loaded" @ SpawnList.Length @ "of" @ default.Spawn.Length @ "entries");
}
return SpawnList;
}
defaultproperties
{
}

View File

@ -1,155 +1,155 @@
class SpawnListRegular extends Object
dependson(ZedSpawner)
config(ZedSpawner);
struct S_SpawnEntryCfg
{
var int Wave;
var String ZedClass;
var int RelativeStart;
var int Delay;
var int Probability;
var int SpawnCountBase;
var int SingleSpawnLimit;
};
var public config Array<S_SpawnEntryCfg> Spawn;
delegate int SpawnListSort(S_SpawnEntryCfg A, S_SpawnEntryCfg B)
{
return A.Wave > B.Wave ? -1 : 0;
}
public static function InitConfig(int Version, int LatestVersion, KFGI_Access KFGIA, E_LogLevel LogLevel)
{
`Log_TraceStatic();
switch (Version)
{
case `NO_CONFIG:
ApplyDefault(KFGIA, LogLevel);
default: break;
}
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault(KFGI_Access KFGIA, E_LogLevel LogLevel)
{
local S_SpawnEntryCfg SpawnEntry;
local Array<class<KFPawn_Monster> > KFPM_Zeds;
local class<KFPawn_Monster> KFPMC;
`Log_TraceStatic();
default.Spawn.Length = 0;
SpawnEntry.Wave = 0;
SpawnEntry.SpawnCountBase = 2;
SpawnEntry.SingleSpawnLimit = 1;
SpawnEntry.RelativeStart = 25;
SpawnEntry.Delay = 60;
SpawnEntry.Probability = 100;
KFPM_Zeds = KFGIA.GetAIClassList(LogLevel);
foreach KFPM_Zeds(KFPMC)
{
++SpawnEntry.Wave;
SpawnEntry.ZedClass = "KFGameContent." $ String(KFPMC);
default.Spawn.AddItem(SpawnEntry);
}
}
public static function Array<S_SpawnEntry> Load(E_LogLevel LogLevel)
{
local Array<S_SpawnEntry> SpawnList;
local S_SpawnEntryCfg SpawnEntryCfg;
local S_SpawnEntry SpawnEntry;
local int Line;
local bool Errors;
`Log_TraceStatic();
`Log_Info("Load spawn list:");
foreach default.Spawn(SpawnEntryCfg, Line)
{
Errors = false;
SpawnEntry.Wave = SpawnEntryCfg.Wave;
if (SpawnEntryCfg.Wave <= 0 || SpawnEntryCfg.Wave > 255)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Wave" @ "(" $ SpawnEntryCfg.ZedClass $ ")" @ "must be greater than 0 and less than 256");
Errors = true;
}
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
if (SpawnEntry.ZedClass == None)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
Errors = true;
}
SpawnEntry.RelativeStartDefault = SpawnEntryCfg.RelativeStart / 100.f;
if (SpawnEntryCfg.RelativeStart < 0 || SpawnEntryCfg.RelativeStart > 100)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "RelativeStart" @ "(" $ SpawnEntryCfg.RelativeStart $ ")" @ "must be greater than or equal 0 and less than or equal 100");
Errors = true;
}
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
if (SpawnEntryCfg.Delay <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
Errors = true;
}
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
if (SpawnEntry.SpawnCountBase <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
if (SpawnEntry.SingleSpawnLimit < 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
Errors = true;
}
if (!Errors)
{
SpawnList.AddItem(SpawnEntry);
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully: (w" $ SpawnEntryCfg.Wave $ ")" @ SpawnEntryCfg.ZedClass);
}
}
default.Spawn.Sort(SpawnListSort);
if (SpawnList.Length == default.Spawn.Length)
{
`Log_Info("Regular spawn list loaded successfully (" $ default.Spawn.Length @ "entries)");
}
else
{
`Log_Info("Regular spawn list: loaded" @ SpawnList.Length @ "of" @ default.Spawn.Length @ "entries");
}
return SpawnList;
}
defaultproperties
{
}
class SpawnListRegular extends Object
dependson(ZedSpawner)
config(ZedSpawner);
struct S_SpawnEntryCfg
{
var int Wave;
var String ZedClass;
var int RelativeStart;
var int Delay;
var int Probability;
var int SpawnCountBase;
var int SingleSpawnLimit;
};
var public config Array<S_SpawnEntryCfg> Spawn;
delegate int SpawnListSort(S_SpawnEntryCfg A, S_SpawnEntryCfg B)
{
return A.Wave > B.Wave ? -1 : 0;
}
public static function InitConfig(int Version, int LatestVersion, KFGI_Access KFGIA, E_LogLevel LogLevel)
{
`Log_TraceStatic();
switch (Version)
{
case `NO_CONFIG:
ApplyDefault(KFGIA, LogLevel);
default: break;
}
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault(KFGI_Access KFGIA, E_LogLevel LogLevel)
{
local S_SpawnEntryCfg SpawnEntry;
local Array<class<KFPawn_Monster> > KFPM_Zeds;
local class<KFPawn_Monster> KFPMC;
`Log_TraceStatic();
default.Spawn.Length = 0;
SpawnEntry.Wave = 0;
SpawnEntry.SpawnCountBase = 2;
SpawnEntry.SingleSpawnLimit = 1;
SpawnEntry.RelativeStart = 25;
SpawnEntry.Delay = 60;
SpawnEntry.Probability = 100;
KFPM_Zeds = KFGIA.GetAIClassList(LogLevel);
foreach KFPM_Zeds(KFPMC)
{
++SpawnEntry.Wave;
SpawnEntry.ZedClass = "KFGameContent." $ String(KFPMC);
default.Spawn.AddItem(SpawnEntry);
}
}
public static function Array<S_SpawnEntry> Load(E_LogLevel LogLevel)
{
local Array<S_SpawnEntry> SpawnList;
local S_SpawnEntryCfg SpawnEntryCfg;
local S_SpawnEntry SpawnEntry;
local int Line;
local bool Errors;
`Log_TraceStatic();
`Log_Info("Load spawn list:");
foreach default.Spawn(SpawnEntryCfg, Line)
{
Errors = false;
SpawnEntry.Wave = SpawnEntryCfg.Wave;
if (SpawnEntryCfg.Wave <= 0 || SpawnEntryCfg.Wave > 255)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Wave" @ "(" $ SpawnEntryCfg.ZedClass $ ")" @ "must be greater than 0 and less than 256");
Errors = true;
}
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
if (SpawnEntry.ZedClass == None)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
Errors = true;
}
SpawnEntry.RelativeStartDefault = SpawnEntryCfg.RelativeStart / 100.f;
if (SpawnEntryCfg.RelativeStart < 0 || SpawnEntryCfg.RelativeStart > 100)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "RelativeStart" @ "(" $ SpawnEntryCfg.RelativeStart $ ")" @ "must be greater than or equal 0 and less than or equal 100");
Errors = true;
}
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
if (SpawnEntryCfg.Delay <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
Errors = true;
}
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
if (SpawnEntry.SpawnCountBase <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
if (SpawnEntry.SingleSpawnLimit < 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
Errors = true;
}
if (!Errors)
{
SpawnList.AddItem(SpawnEntry);
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully: (w" $ SpawnEntryCfg.Wave $ ")" @ SpawnEntryCfg.ZedClass);
}
}
default.Spawn.Sort(SpawnListSort);
if (SpawnList.Length == default.Spawn.Length)
{
`Log_Info("Regular spawn list loaded successfully (" $ default.Spawn.Length @ "entries)");
}
else
{
`Log_Info("Regular spawn list: loaded" @ SpawnList.Length @ "of" @ default.Spawn.Length @ "entries");
}
return SpawnList;
}
defaultproperties
{
}

View File

@ -1,151 +1,151 @@
class SpawnListSpecialWaves extends Object
dependson(ZedSpawner)
config(ZedSpawner);
struct S_SpawnEntryCfg
{
var EAIType Wave;
var String ZedClass;
var int RelativeStart;
var int Delay;
var int Probability;
var int SpawnCountBase;
var int SingleSpawnLimit;
};
var public config bool bStopRegularSpawn;
var private config Array<S_SpawnEntryCfg> Spawn;
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
{
`Log_TraceStatic();
switch (Version)
{
case `NO_CONFIG:
ApplyDefault(LogLevel);
default: break;
}
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault(E_LogLevel LogLevel)
{
local S_SpawnEntryCfg SpawnEntry;
local EAIType AIType;
`Log_TraceStatic();
default.bStopRegularSpawn = true;
default.Spawn.Length = 0;
SpawnEntry.ZedClass = "SomePackage.SomeClass";
SpawnEntry.SpawnCountBase = 2;
SpawnEntry.SingleSpawnLimit = 1;
SpawnEntry.RelativeStart = 0;
SpawnEntry.Delay = 60;
SpawnEntry.Probability = 100;
foreach class'KFGameInfo_Endless'.default.SpecialWaveTypes(AIType)
{
SpawnEntry.Wave = AIType;
default.Spawn.AddItem(SpawnEntry);
}
}
public static function Array<S_SpawnEntry> Load(KFGameInfo_Endless KFGIE, E_LogLevel LogLevel)
{
local Array<S_SpawnEntry> SpawnList;
local S_SpawnEntryCfg SpawnEntryCfg;
local S_SpawnEntry SpawnEntry;
local int Line;
local bool Errors;
`Log_TraceStatic();
if (KFGIE == None)
{
`Log_Info("Not Endless mode, skip loading special waves");
return SpawnList;
}
`Log_Info("Load special waves spawn list:");
foreach default.Spawn(SpawnEntryCfg, Line)
{
Errors = false;
SpawnEntry.Wave = SpawnEntryCfg.Wave;
if (KFGIE.SpecialWaveTypes.Find(EAIType(SpawnEntryCfg.Wave)) == INDEX_NONE)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Unknown special wave:" @ SpawnEntryCfg.Wave);
Errors = true;
}
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
if (SpawnEntry.ZedClass == None)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
Errors = true;
}
SpawnEntry.RelativeStartDefault = SpawnEntryCfg.RelativeStart / 100.f;
if (SpawnEntryCfg.RelativeStart < 0 || SpawnEntryCfg.RelativeStart > 100)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "RelativeStart" @ "(" $ SpawnEntryCfg.RelativeStart $ ")" @ "must be greater than or equal 0 and less than or equal 100");
Errors = true;
}
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
if (SpawnEntryCfg.Delay <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
Errors = true;
}
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
if (SpawnEntry.SpawnCountBase <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
if (SpawnEntry.SingleSpawnLimit < 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
Errors = true;
}
if (!Errors)
{
SpawnList.AddItem(SpawnEntry);
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully: (" $ SpawnEntryCfg.Wave $ ")" @ SpawnEntryCfg.ZedClass);
}
}
if (SpawnList.Length == default.Spawn.Length)
{
`Log_Info("Special spawn list loaded successfully (" $ default.Spawn.Length @ "entries)");
}
else
{
`Log_Info("Special spawn list: loaded" @ SpawnList.Length @ "of" @ default.Spawn.Length @ "entries");
}
return SpawnList;
}
defaultproperties
{
}
class SpawnListSpecialWaves extends Object
dependson(ZedSpawner)
config(ZedSpawner);
struct S_SpawnEntryCfg
{
var EAIType Wave;
var String ZedClass;
var int RelativeStart;
var int Delay;
var int Probability;
var int SpawnCountBase;
var int SingleSpawnLimit;
};
var public config bool bStopRegularSpawn;
var private config Array<S_SpawnEntryCfg> Spawn;
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
{
`Log_TraceStatic();
switch (Version)
{
case `NO_CONFIG:
ApplyDefault(LogLevel);
default: break;
}
if (LatestVersion != Version)
{
StaticSaveConfig();
}
}
private static function ApplyDefault(E_LogLevel LogLevel)
{
local S_SpawnEntryCfg SpawnEntry;
local EAIType AIType;
`Log_TraceStatic();
default.bStopRegularSpawn = true;
default.Spawn.Length = 0;
SpawnEntry.ZedClass = "SomePackage.SomeClass";
SpawnEntry.SpawnCountBase = 2;
SpawnEntry.SingleSpawnLimit = 1;
SpawnEntry.RelativeStart = 0;
SpawnEntry.Delay = 60;
SpawnEntry.Probability = 100;
foreach class'KFGameInfo_Endless'.default.SpecialWaveTypes(AIType)
{
SpawnEntry.Wave = AIType;
default.Spawn.AddItem(SpawnEntry);
}
}
public static function Array<S_SpawnEntry> Load(KFGameInfo_Endless KFGIE, E_LogLevel LogLevel)
{
local Array<S_SpawnEntry> SpawnList;
local S_SpawnEntryCfg SpawnEntryCfg;
local S_SpawnEntry SpawnEntry;
local int Line;
local bool Errors;
`Log_TraceStatic();
if (KFGIE == None)
{
`Log_Info("Not Endless mode, skip loading special waves");
return SpawnList;
}
`Log_Info("Load special waves spawn list:");
foreach default.Spawn(SpawnEntryCfg, Line)
{
Errors = false;
SpawnEntry.Wave = SpawnEntryCfg.Wave;
if (KFGIE.SpecialWaveTypes.Find(EAIType(SpawnEntryCfg.Wave)) == INDEX_NONE)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Unknown special wave:" @ SpawnEntryCfg.Wave);
Errors = true;
}
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
if (SpawnEntry.ZedClass == None)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
Errors = true;
}
SpawnEntry.RelativeStartDefault = SpawnEntryCfg.RelativeStart / 100.f;
if (SpawnEntryCfg.RelativeStart < 0 || SpawnEntryCfg.RelativeStart > 100)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "RelativeStart" @ "(" $ SpawnEntryCfg.RelativeStart $ ")" @ "must be greater than or equal 0 and less than or equal 100");
Errors = true;
}
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
if (SpawnEntryCfg.Delay <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
Errors = true;
}
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
if (SpawnEntry.SpawnCountBase <= 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
Errors = true;
}
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
if (SpawnEntry.SingleSpawnLimit < 0)
{
`Log_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
Errors = true;
}
if (!Errors)
{
SpawnList.AddItem(SpawnEntry);
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully: (" $ SpawnEntryCfg.Wave $ ")" @ SpawnEntryCfg.ZedClass);
}
}
if (SpawnList.Length == default.Spawn.Length)
{
`Log_Info("Special spawn list loaded successfully (" $ default.Spawn.Length @ "entries)");
}
else
{
`Log_Info("Special spawn list: loaded" @ SpawnList.Length @ "of" @ default.Spawn.Length @ "entries");
}
return SpawnList;
}
defaultproperties
{
}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
[Flags]
AllowDownload=True
ClientOptional=False
ServerSideOnly=False
[Flags]
AllowDownload=True
ClientOptional=False
ServerSideOnly=False

View File

@ -1,56 +1,56 @@
class ZedSpawnerMut extends KFMutator
dependson(ZedSpawner);
var private ZedSpawner ZS;
public event PreBeginPlay()
{
Super.PreBeginPlay();
if (WorldInfo.NetMode == NM_Client) return;
foreach WorldInfo.DynamicActors(class'ZedSpawner', ZS)
{
break;
}
if (ZS == None)
{
ZS = WorldInfo.Spawn(class'ZedSpawner');
}
if (ZS == None)
{
`Log_Base("FATAL: Can't Spawn 'ZedSpawner'");
Destroy();
}
}
public function AddMutator(Mutator Mut)
{
if (Mut == Self) return;
if (Mut.Class == Class)
Mut.Destroy();
else
Super.AddMutator(Mut);
}
public function NotifyLogin(Controller C)
{
ZS.NotifyLogin(C);
Super.NotifyLogin(C);
}
public function NotifyLogout(Controller C)
{
ZS.NotifyLogout(C);
Super.NotifyLogout(C);
}
defaultproperties
{
class ZedSpawnerMut extends KFMutator
dependson(ZedSpawner);
var private ZedSpawner ZS;
public event PreBeginPlay()
{
Super.PreBeginPlay();
if (WorldInfo.NetMode == NM_Client) return;
foreach WorldInfo.DynamicActors(class'ZedSpawner', ZS)
{
break;
}
if (ZS == None)
{
ZS = WorldInfo.Spawn(class'ZedSpawner');
}
if (ZS == None)
{
`Log_Base("FATAL: Can't Spawn 'ZedSpawner'");
Destroy();
}
}
public function AddMutator(Mutator Mut)
{
if (Mut == Self) return;
if (Mut.Class == Class)
Mut.Destroy();
else
Super.AddMutator(Mut);
}
public function NotifyLogin(Controller C)
{
ZS.NotifyLogin(C);
Super.NotifyLogin(C);
}
public function NotifyLogout(Controller C)
{
ZS.NotifyLogout(C);
Super.NotifyLogout(C);
}
defaultproperties
{
}

View File

@ -3,7 +3,7 @@ class ZedSpawnerRepInfo extends ReplicationInfo;
var public ZedSpawner ZS;
var public E_LogLevel LogLevel;
var public Array<class<KFPawn_Monster> > CustomZeds;
var private int Recieved;
var private int Recieved;
replication
{
@ -19,7 +19,7 @@ public simulated function bool SafeDestroy()
public reliable client function ClientSync(class<KFPawn_Monster> CustomZed)
{
`Log_Trace();
`Log_Debug("Received:" @ CustomZed);
CustomZeds.AddItem(CustomZed);
ServerSync();
@ -28,24 +28,24 @@ public reliable client function ClientSync(class<KFPawn_Monster> CustomZed)
public reliable client function SyncFinished()
{
local class<KFPawn_Monster> CustomZed;
`Log_Trace();
foreach CustomZeds(CustomZed)
{
`Log_Debug("Preload Content for" @ CustomZed);
CustomZed.static.PreloadContent();
}
SafeDestroy();
}
public reliable server function ServerSync()
{
`Log_Trace();
if (bPendingDelete || bDeleteMe) return;
if (CustomZeds.Length == Recieved || WorldInfo.NetMode == NM_StandAlone)
{
`Log_Debug("Sync finished");
@ -67,6 +67,6 @@ defaultproperties
bAlwaysRelevant = false;
bOnlyRelevantToOwner = true;
bSkipActorPropertyReplication = false;
Recieved = 0
}

View File

@ -1,20 +1,20 @@
class _Logger extends Object
abstract;
enum E_LogLevel
{
LL_WrongLevel,
LL_None,
LL_Fatal,
LL_Error,
LL_Warning,
LL_Info,
LL_Debug,
LL_Trace,
LL_All
};
defaultproperties
{
}
class _Logger extends Object
abstract;
enum E_LogLevel
{
LL_WrongLevel,
LL_None,
LL_Fatal,
LL_Error,
LL_Warning,
LL_Info,
LL_Debug,
LL_Trace,
LL_All
};
defaultproperties
{
}

View File

@ -1,2 +1,2 @@
// Constants
`define NO_CONFIG 0
// Constants
`define NO_CONFIG 0

View File

@ -1,15 +1,15 @@
// Logger
`define Log_Tag 'ZedSpawner'
`define LocationStatic "`{ClassName}::" $ GetFuncName()
`define Log_Base(msg, cond) `log(`msg `if(`cond), `cond`{endif}, `Log_Tag)
`define Log_Fatal(msg) `log("FATAL:" @ `msg, (LogLevel >= LL_Fatal), `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_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)
// Logger
`define Log_Tag 'ZedSpawner'
`define LocationStatic "`{ClassName}::" $ GetFuncName()
`define Log_Base(msg, cond) `log(`msg `if(`cond), `cond`{endif}, `Log_Tag)
`define Log_Fatal(msg) `log("FATAL:" @ `msg, (LogLevel >= LL_Fatal), `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_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)

View File

@ -7,7 +7,7 @@ StripSource="True"
# Mutators to be compiled
# Specify them with a space as a separator,
# Mutators will be compiled in the specified order
# Mutators will be compiled in the specified order
PackageBuildOrder="ZedSpawner"
@ -16,7 +16,7 @@ PackageBuildOrder="ZedSpawner"
# Packages you want to brew using @peelz's patched KFEditor.
# Useful for cases where regular brew doesn't put *.upk inside the package.
# Specify them with a space as a separator,
# The order doesn't matter
# The order doesn't matter
PackagePeelzBrew=""
@ -24,7 +24,7 @@ PackagePeelzBrew=""
# Mutators that will be uploaded to the workshop
# Specify them with a space as a separator,
# The order doesn't matter
# The order doesn't matter
PackageUpload="ZedSpawner"