Zed fixes #16
@ -309,56 +309,83 @@ simulated function Timer(){
|
|||||||
}
|
}
|
||||||
maxPlayersInGame = Max(maxPlayersInGame, currentPlayersMax);
|
maxPlayersInGame = Max(maxPlayersInGame, currentPlayersMax);
|
||||||
}
|
}
|
||||||
simulated function Tick(float Delta){
|
|
||||||
local int i;
|
// add interaction
|
||||||
local NiceInteraction niceInt;
|
auto state loadInteractionnSpawnRate
|
||||||
local NicePlayerController localPlayer;
|
{
|
||||||
super.Tick(Delta);
|
// state timer, overrides global
|
||||||
if(ScrnGT != none && ScrnGT.WaveCountDown <= 5)
|
simulated function Tick(float Delta)
|
||||||
bIsPreGame = false;
|
{
|
||||||
if(ScrnMut != none && !bSpawnRateEnforced && ScrnMut.bTickExecuted){
|
local NiceInteraction niceInt;
|
||||||
bSpawnRateEnforced = true;
|
local NicePlayerController localPlayer;
|
||||||
ScrnMut.OriginalWaveSpawnPeriod = FMax(minSpawnRate, FMin(maxSpawnRate, ScrnMut.OriginalWaveSpawnPeriod));
|
|
||||||
|
if (level.netMode == NM_DedicatedServer)
|
||||||
|
{
|
||||||
|
// set spawn rate!
|
||||||
|
if (ScrnMut != none)
|
||||||
|
ScrnMut.OriginalWaveSpawnPeriod = FMax(minSpawnRate, FMin(maxSpawnRate, ScrnMut.OriginalWaveSpawnPeriod));
|
||||||
|
// do not execute below code on dedicated servers!
|
||||||
|
GoToState('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
localPlayer = NicePlayerController(Level.GetLocalPlayerController());
|
||||||
|
if (localPlayer == none)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Actually add the interaction
|
||||||
|
niceInt = NiceInteraction(localPlayer.Player.InteractionMaster.AddInteraction(string(class'NiceInteraction'), localPlayer.Player));
|
||||||
|
niceInt.RegisterMutator(Self);
|
||||||
|
// break this and go to global state
|
||||||
|
GoToState('');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
simulated function Tick(float Delta)
|
||||||
|
{
|
||||||
|
local int i;
|
||||||
|
local NicePlayerController localPlayer;
|
||||||
|
|
||||||
|
super.Tick(Delta);
|
||||||
|
if (ScrnGT != none && ScrnGT.WaveCountDown <= 5)
|
||||||
|
bIsPreGame = false;
|
||||||
localPlayer = NicePlayerController(Level.GetLocalPlayerController());
|
localPlayer = NicePlayerController(Level.GetLocalPlayerController());
|
||||||
// Check if the local PlayerController is available yet
|
// Check if the local PlayerController is available yet
|
||||||
if(localPlayer == none)
|
if (localPlayer == none)
|
||||||
return;
|
return;
|
||||||
if( Role < Role_AUTHORITY && !bClientLinkEstablished
|
if (Role < Role_AUTHORITY && !bClientLinkEstablished
|
||||||
&& localPlayer.storageClient != none && localPlayer.remoteRI != none){
|
&& localPlayer.storageClient != none && localPlayer.remoteRI != none)
|
||||||
|
{
|
||||||
bClientLinkEstablished = true;
|
bClientLinkEstablished = true;
|
||||||
localPlayer.storageClient.remoteRI = localPlayer.remoteRI;
|
localPlayer.storageClient.remoteRI = localPlayer.remoteRI;
|
||||||
localPlayer.storageClient.events.static.CallLinkEstablished();
|
localPlayer.storageClient.events.static.CallLinkEstablished();
|
||||||
}
|
}
|
||||||
if(localPlayer.bFlagDisplayCounters){
|
if(localPlayer.bFlagDisplayCounters)
|
||||||
for(i = 0;i < niceCounterSet.Length;i ++){
|
{
|
||||||
if(niceCounterSet[i].ownerSkill == none)
|
for (i = 0; i < niceCounterSet.Length; i++)
|
||||||
niceCounterSet[i].value = UpdateCounterValue(niceCounterSet[i].cName);
|
{
|
||||||
else if(class'NiceVeterancyTypes'.static.hasSkill(localPlayer, niceCounterSet[i].ownerSkill))
|
if (niceCounterSet[i].ownerSkill == none)
|
||||||
niceCounterSet[i].value = niceCounterSet[i].ownerSkill.static.
|
niceCounterSet[i].value = UpdateCounterValue(niceCounterSet[i].cName);
|
||||||
|
else if(class'NiceVeterancyTypes'.static.hasSkill(localPlayer, niceCounterSet[i].ownerSkill))
|
||||||
|
niceCounterSet[i].value = niceCounterSet[i].ownerSkill.static.
|
||||||
UpdateCounterValue(niceCounterSet[i].cName, localPlayer);
|
UpdateCounterValue(niceCounterSet[i].cName, localPlayer);
|
||||||
else
|
else
|
||||||
niceCounterSet[i].value = 0;
|
niceCounterSet[i].value = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Reset tick counter for traces
|
// Reset tick counter for traces
|
||||||
localPlayer.tracesThisTick = 0;
|
localPlayer.tracesThisTick = 0;
|
||||||
// Manage resetting of effects' limits
|
// Manage resetting of effects' limits
|
||||||
if(Level.TimeSeconds >= localPlayer.nextEffectsResetTime){
|
if (Level.TimeSeconds >= localPlayer.nextEffectsResetTime)
|
||||||
localPlayer.nextEffectsResetTime = Level.TimeSeconds + 0.1;
|
{
|
||||||
localPlayer.currentEffectTimeWindow ++;
|
localPlayer.nextEffectsResetTime = Level.TimeSeconds + 0.1;
|
||||||
if(localPlayer.currentEffectTimeWindow >= 10)
|
localPlayer.currentEffectTimeWindow ++;
|
||||||
localPlayer.currentEffectTimeWindow = 0;
|
if (localPlayer.currentEffectTimeWindow >= 10)
|
||||||
localPlayer.effectsSpawned[localPlayer.currentEffectTimeWindow] = 0;
|
localPlayer.currentEffectTimeWindow = 0;
|
||||||
|
localPlayer.effectsSpawned[localPlayer.currentEffectTimeWindow] = 0;
|
||||||
}
|
}
|
||||||
// Add interaction
|
|
||||||
if(interactionAdded)
|
|
||||||
return;
|
|
||||||
// Actually add the interaction
|
|
||||||
niceInt = NiceInteraction(localPlayer.Player.InteractionMaster.AddInteraction(string(class'NiceInteraction'), localPlayer.Player));
|
|
||||||
niceInt.RegisterMutator(Self);
|
|
||||||
interactionAdded = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){
|
simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){
|
||||||
local int i;
|
local int i;
|
||||||
local NiceMonster niceMonster;
|
local NiceMonster niceMonster;
|
||||||
|
Loading…
Reference in New Issue
Block a user