Zed fixes #16

Merged
dkanus merged 24 commits from :fpfix into master 2022-03-03 15:43:35 +03:00
Showing only changes of commit 90599fd6b7 - Show all commits

View File

@ -62,7 +62,6 @@ var NiceGameType NiceGT;
var NicePack Mut;
var NiceRules GameRules;
var NiceStorageServer serverStorage;
var bool bClientLinkEstablished;
var bool interactionAdded;
var bool bIsPreGame;
var bool bIsTraderTime;
@ -309,10 +308,10 @@ simulated function Timer(){
maxPlayersInGame = Max(maxPlayersInGame, currentPlayersMax);
}
// add interaction
// initial tick, does some job and shuts down
auto state loadInteractionnSpawnRate
{
// state timer, overrides global
// state tick, overrides global
simulated function Tick(float Delta)
{
local NiceInteraction niceInt;
@ -332,14 +331,23 @@ auto state loadInteractionnSpawnRate
if (localPlayer == none)
return;
// spawn some magic
if (localPlayer.storageClient != none && localPlayer.remoteRI != none)
{
localPlayer.storageClient.remoteRI = localPlayer.remoteRI;
localPlayer.storageClient.events.static.CallLinkEstablished();
}
// 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
// break this state and go to global
GoToState('');
}
}
// global tick
simulated function Tick(float Delta)
{
local int i;
@ -351,13 +359,7 @@ simulated function Tick(float Delta)
// Check if the local PlayerController is available yet
if (localPlayer == none)
return;
if (Role < Role_AUTHORITY && !bClientLinkEstablished
&& 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++)