Windows10 version
This commit is contained in:
parent
45ed006825
commit
7d0c523562
@ -49,7 +49,7 @@ var int NeedMoreZeds;
|
|||||||
var int MaxSpawns;
|
var int MaxSpawns;
|
||||||
var int SpawnsLeft;
|
var int SpawnsLeft;
|
||||||
var int SpawnsDone;
|
var int SpawnsDone;
|
||||||
|
|
||||||
function PostBeginPlay()
|
function PostBeginPlay()
|
||||||
{
|
{
|
||||||
local int i;
|
local int i;
|
||||||
@ -101,8 +101,6 @@ function PostBeginPlay()
|
|||||||
SetTimer(dt,true);
|
SetTimer(dt,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function Timer()
|
function Timer()
|
||||||
{
|
{
|
||||||
//setup total amount multiplier
|
//setup total amount multiplier
|
||||||
@ -124,57 +122,63 @@ function SpawnCustomZeds()
|
|||||||
local int i, j;
|
local int i, j;
|
||||||
local array< class<KFPawn_Monster> > CSquad;
|
local array< class<KFPawn_Monster> > CSquad;
|
||||||
local KFSpawnVolume KFSV;
|
local KFSpawnVolume KFSV;
|
||||||
|
|
||||||
if(!KFGT.IsWaveActive() || NeedMoreZeds<=0)
|
KFSV = KFGT.SpawnManager.GetBestSpawnVolume(CSquad);
|
||||||
return;
|
|
||||||
|
if( !KFGT.IsWaveActive() || NeedMoreZeds<=0 || KFGT.AIAliveCount>128 || KFSV.Location==PlayerController(Owner).StartSpot.Location )
|
||||||
for(i=0;i<LoadedCustomZeds.Length;i++)
|
return; // Maxmonsters, ????, ?? ???? ?? //VSize(KFSV.Location-PlayerController(Owner).Pawn.Location)<650.f //KFSV.bNoCollisionFailForSpawn==true
|
||||||
{
|
|
||||||
if(LoadedCustomZeds[i].Wave==KFGT.WaveNum)
|
for(i=0;i<LoadedCustomZeds.Length;i++)
|
||||||
{
|
{
|
||||||
LoadedCustomZeds[i].Delay-=dt;
|
if(LoadedCustomZeds[i].Wave==KFGT.WaveNum)
|
||||||
|
|
||||||
if(LoadedCustomZeds[i].Delay<=0 && LoadedCustomZeds[i].SpawnsLeft>0 && LoadedCustomZeds[i].MaxSpawns>=0 && (LoadedCustomZeds[i].SpawnsDone<LoadedCustomZeds[i].MaxSpawns) )
|
|
||||||
{
|
{
|
||||||
LoadedCustomZeds[i].Delay=LoadedCustomZeds[i].DefDelay;
|
LoadedCustomZeds[i].Delay-=dt;
|
||||||
|
|
||||||
if(FRand()<=LoadedCustomZeds[i].Probability)
|
if(LoadedCustomZeds[i].Delay<=0 && LoadedCustomZeds[i].SpawnsLeft>0 && LoadedCustomZeds[i].MaxSpawns>=0 && (LoadedCustomZeds[i].SpawnsDone<LoadedCustomZeds[i].MaxSpawns) )
|
||||||
{
|
{
|
||||||
CSquad.Length=0;
|
LoadedCustomZeds[i].Delay=LoadedCustomZeds[i].DefDelay;
|
||||||
CSquad.AddItem(LoadedCustomZeds[i].Zed);
|
|
||||||
|
|
||||||
KFSV = KFGT.SpawnManager.GetBestSpawnVolume(CSquad);
|
if(FRand()<=LoadedCustomZeds[i].Probability)
|
||||||
|
|
||||||
for(j=0;j<LoadedCustomZeds[i].SpawnAtOnce;j++)
|
|
||||||
{
|
{
|
||||||
TryToSpawnZed(KFSV.Location, LoadedCustomZeds[i].Zed);
|
CSquad.Length=0;
|
||||||
LoadedCustomZeds[i].SpawnsDone++;
|
CSquad.AddItem(LoadedCustomZeds[i].Zed);
|
||||||
}
|
|
||||||
|
for(j=0;j<LoadedCustomZeds[i].SpawnAtOnce;j++)
|
||||||
|
{
|
||||||
|
TryToSpawnZed(KFSV.Location,LoadedCustomZeds[i].Zed);
|
||||||
|
LoadedCustomZeds[i].SpawnsDone++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function TryToSpawnZed( vector L, class<KFPawn_Monster> ZedClass )
|
function TryToSpawnZed( vector L, class<KFPawn_Monster> ZedClass )
|
||||||
{
|
{
|
||||||
local KFPawn_Monster M;
|
local KFPawn_Monster M;
|
||||||
local Controller C;
|
local Controller C;
|
||||||
|
|
||||||
L.z+=10;
|
if( ZedClass==class'HL2Monsters.Combine_Strider' || ZedClass==class'HL2Monsters.Combine_Gunship' || ZedClass==class'HL2Monsters.Hunter_Chopper' )
|
||||||
|
{
|
||||||
|
L = KFGameInfo(WorldInfo.Game).FindPlayerStart(PlayerController(Owner),0).Location;
|
||||||
|
L.Y += 64;
|
||||||
|
L.Z += 64;
|
||||||
|
}
|
||||||
|
else L.Z += 10;
|
||||||
|
|
||||||
M = Spawn(ZedClass,,,L,rot(0,0,1),,true);
|
M = Spawn(ZedClass,,,L,rot(0,0,1),,true);
|
||||||
|
|
||||||
if( M==None )
|
if( M==None )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
C = M.Spawn(M.ControllerClass);
|
C = M.Spawn(M.ControllerClass);
|
||||||
C.Possess(M,false);
|
C.Possess(M,false);
|
||||||
KFGT.MyKFGRI.AIRemaining+=1; //added
|
KFGT.MyKFGRI.AIRemaining+=1; //added
|
||||||
KFGT.NumAISpawnsQueued++;
|
KFGT.NumAISpawnsQueued++;
|
||||||
KFGT.AIAliveCount++;
|
KFGT.AIAliveCount++;
|
||||||
KFGT.RefreshMonsterAliveCount();
|
KFGT.RefreshMonsterAliveCount();
|
||||||
NeedMoreZeds--;
|
NeedMoreZeds--;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Kill original boss
|
//Kill original boss
|
||||||
@ -182,7 +186,7 @@ function TryToSpawnZed( vector L, class<KFPawn_Monster> ZedClass )
|
|||||||
//{
|
//{
|
||||||
// if(OriginalBoss!=None)
|
// if(OriginalBoss!=None)
|
||||||
// {
|
// {
|
||||||
// OriginalBoss.Suicide();
|
// OriginalBoss.Suicide();
|
||||||
// SetTimer(1, false, 'ResetCamera');
|
// SetTimer(1, false, 'ResetCamera');
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
@ -278,7 +282,7 @@ function bool TryToSpawnBoss( Pawn A, class<KFPawn_Monster> MC )
|
|||||||
E.Y = E.X;
|
E.Y = E.X;
|
||||||
E.Z = A.GetCollisionHeight()*0.8;
|
E.Z = A.GetCollisionHeight()*0.8;
|
||||||
V=A.Location;
|
V=A.Location;
|
||||||
V.Z+=32;
|
V.Z+=32; //32
|
||||||
|
|
||||||
if(FRand()>0.5)
|
if(FRand()>0.5)
|
||||||
V.X+= FRand()>0.5 ? 100 : -100;
|
V.X+= FRand()>0.5 ? 100 : -100;
|
||||||
@ -303,4 +307,4 @@ function bool TryToSpawnBoss( Pawn A, class<KFPawn_Monster> MC )
|
|||||||
DefaultProperties
|
DefaultProperties
|
||||||
{
|
{
|
||||||
dt=1.0f
|
dt=1.0f
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user