Zed fixes #16
@ -309,29 +309,61 @@ simulated function Timer(){
|
||||
}
|
||||
maxPlayersInGame = Max(maxPlayersInGame, currentPlayersMax);
|
||||
}
|
||||
simulated function Tick(float Delta){
|
||||
local int i;
|
||||
|
||||
// add interaction
|
||||
auto state loadInteractionnSpawnRate
|
||||
{
|
||||
// state timer, overrides global
|
||||
simulated function Tick(float Delta)
|
||||
{
|
||||
local NiceInteraction niceInt;
|
||||
local NicePlayerController localPlayer;
|
||||
|
||||
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;
|
||||
if(ScrnMut != none && !bSpawnRateEnforced && ScrnMut.bTickExecuted){
|
||||
bSpawnRateEnforced = true;
|
||||
ScrnMut.OriginalWaveSpawnPeriod = FMax(minSpawnRate, FMin(maxSpawnRate, ScrnMut.OriginalWaveSpawnPeriod));
|
||||
}
|
||||
localPlayer = NicePlayerController(Level.GetLocalPlayerController());
|
||||
// Check if the local PlayerController is available yet
|
||||
if (localPlayer == none)
|
||||
return;
|
||||
if (Role < Role_AUTHORITY && !bClientLinkEstablished
|
||||
&& localPlayer.storageClient != none && localPlayer.remoteRI != none){
|
||||
&& localPlayer.storageClient != none && localPlayer.remoteRI != none)
|
||||
{
|
||||
bClientLinkEstablished = true;
|
||||
localPlayer.storageClient.remoteRI = localPlayer.remoteRI;
|
||||
localPlayer.storageClient.events.static.CallLinkEstablished();
|
||||
}
|
||||
if(localPlayer.bFlagDisplayCounters){
|
||||
for(i = 0;i < niceCounterSet.Length;i ++){
|
||||
if(localPlayer.bFlagDisplayCounters)
|
||||
{
|
||||
for (i = 0; i < niceCounterSet.Length; i++)
|
||||
{
|
||||
if (niceCounterSet[i].ownerSkill == none)
|
||||
niceCounterSet[i].value = UpdateCounterValue(niceCounterSet[i].cName);
|
||||
else if(class'NiceVeterancyTypes'.static.hasSkill(localPlayer, niceCounterSet[i].ownerSkill))
|
||||
@ -344,21 +376,16 @@ simulated function Tick(float Delta){
|
||||
// Reset tick counter for traces
|
||||
localPlayer.tracesThisTick = 0;
|
||||
// Manage resetting of effects' limits
|
||||
if(Level.TimeSeconds >= localPlayer.nextEffectsResetTime){
|
||||
if (Level.TimeSeconds >= localPlayer.nextEffectsResetTime)
|
||||
{
|
||||
localPlayer.nextEffectsResetTime = Level.TimeSeconds + 0.1;
|
||||
localPlayer.currentEffectTimeWindow ++;
|
||||
if (localPlayer.currentEffectTimeWindow >= 10)
|
||||
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){
|
||||
local int i;
|
||||
local NiceMonster niceMonster;
|
||||
|
Loading…
Reference in New Issue
Block a user