Windows10 version
This commit is contained in:
parent
45ed006825
commit
7d0c523562
@ -101,8 +101,6 @@ function PostBeginPlay()
|
||||
SetTimer(dt,true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Timer()
|
||||
{
|
||||
//setup total amount multiplier
|
||||
@ -125,35 +123,35 @@ function SpawnCustomZeds()
|
||||
local array< class<KFPawn_Monster> > CSquad;
|
||||
local KFSpawnVolume KFSV;
|
||||
|
||||
if(!KFGT.IsWaveActive() || NeedMoreZeds<=0)
|
||||
return;
|
||||
KFSV = KFGT.SpawnManager.GetBestSpawnVolume(CSquad);
|
||||
|
||||
for(i=0;i<LoadedCustomZeds.Length;i++)
|
||||
{
|
||||
if(LoadedCustomZeds[i].Wave==KFGT.WaveNum)
|
||||
if( !KFGT.IsWaveActive() || NeedMoreZeds<=0 || KFGT.AIAliveCount>128 || KFSV.Location==PlayerController(Owner).StartSpot.Location )
|
||||
return; // Maxmonsters, ????, ?? ???? ?? //VSize(KFSV.Location-PlayerController(Owner).Pawn.Location)<650.f //KFSV.bNoCollisionFailForSpawn==true
|
||||
|
||||
for(i=0;i<LoadedCustomZeds.Length;i++)
|
||||
{
|
||||
LoadedCustomZeds[i].Delay-=dt;
|
||||
|
||||
if(LoadedCustomZeds[i].Delay<=0 && LoadedCustomZeds[i].SpawnsLeft>0 && LoadedCustomZeds[i].MaxSpawns>=0 && (LoadedCustomZeds[i].SpawnsDone<LoadedCustomZeds[i].MaxSpawns) )
|
||||
if(LoadedCustomZeds[i].Wave==KFGT.WaveNum)
|
||||
{
|
||||
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;
|
||||
CSquad.AddItem(LoadedCustomZeds[i].Zed);
|
||||
LoadedCustomZeds[i].Delay=LoadedCustomZeds[i].DefDelay;
|
||||
|
||||
KFSV = KFGT.SpawnManager.GetBestSpawnVolume(CSquad);
|
||||
|
||||
for(j=0;j<LoadedCustomZeds[i].SpawnAtOnce;j++)
|
||||
if(FRand()<=LoadedCustomZeds[i].Probability)
|
||||
{
|
||||
TryToSpawnZed(KFSV.Location, LoadedCustomZeds[i].Zed);
|
||||
LoadedCustomZeds[i].SpawnsDone++;
|
||||
CSquad.Length=0;
|
||||
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 )
|
||||
@ -161,7 +159,14 @@ function TryToSpawnZed( vector L, class<KFPawn_Monster> ZedClass )
|
||||
local KFPawn_Monster M;
|
||||
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);
|
||||
|
||||
if( M==None )
|
||||
@ -169,12 +174,11 @@ function TryToSpawnZed( vector L, class<KFPawn_Monster> ZedClass )
|
||||
|
||||
C = M.Spawn(M.ControllerClass);
|
||||
C.Possess(M,false);
|
||||
KFGT.MyKFGRI.AIRemaining+=1; //added
|
||||
KFGT.MyKFGRI.AIRemaining+=1; //added
|
||||
KFGT.NumAISpawnsQueued++;
|
||||
KFGT.AIAliveCount++;
|
||||
KFGT.RefreshMonsterAliveCount();
|
||||
NeedMoreZeds--;
|
||||
|
||||
}
|
||||
|
||||
//Kill original boss
|
||||
@ -278,7 +282,7 @@ function bool TryToSpawnBoss( Pawn A, class<KFPawn_Monster> MC )
|
||||
E.Y = E.X;
|
||||
E.Z = A.GetCollisionHeight()*0.8;
|
||||
V=A.Location;
|
||||
V.Z+=32;
|
||||
V.Z+=32; //32
|
||||
|
||||
if(FRand()>0.5)
|
||||
V.X+= FRand()>0.5 ? 100 : -100;
|
||||
|
Loading…
x
Reference in New Issue
Block a user