fix init
This commit is contained in:
parent
bf7b763d77
commit
24a7fcbe3e
@ -16,6 +16,7 @@ var config array<string> AdminList;
|
|||||||
var config array<int> PerPlayerMaxMonsters;
|
var config array<int> PerPlayerMaxMonsters;
|
||||||
|
|
||||||
var bool bXpNotifications;
|
var bool bXpNotifications;
|
||||||
|
var bool bInitialized;
|
||||||
|
|
||||||
var array<MskGsRepInfo> RepClients;
|
var array<MskGsRepInfo> RepClients;
|
||||||
var array<Controller> MskGsMemberList;
|
var array<Controller> MskGsMemberList;
|
||||||
@ -29,6 +30,7 @@ function InitMutator(string Options, out string ErrorMessage)
|
|||||||
|
|
||||||
if (MyKFGI == none)
|
if (MyKFGI == none)
|
||||||
{
|
{
|
||||||
|
`log("[MskGsMut] Error: can't init, MyKFGI is none");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,11 +117,15 @@ function Initialize()
|
|||||||
local string Person;
|
local string Person;
|
||||||
local UniqueNetId PersonUID;
|
local UniqueNetId PersonUID;
|
||||||
|
|
||||||
|
if (bInitialized) return;
|
||||||
|
|
||||||
if (MyKFGI == None || MyKFGI.MyKFGRI == None)
|
if (MyKFGI == None || MyKFGI.MyKFGRI == None)
|
||||||
{
|
{
|
||||||
SetTimer(1.f, false, nameof(Initialize));
|
SetTimer(1.f, false, nameof(Initialize));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bInitialized = true;
|
||||||
|
|
||||||
InitConfig();
|
InitConfig();
|
||||||
|
|
||||||
@ -294,6 +300,8 @@ function NotifyLogin(Controller C)
|
|||||||
|
|
||||||
if (C == None) return;
|
if (C == None) return;
|
||||||
|
|
||||||
|
Initialize();
|
||||||
|
|
||||||
RepInfo = Spawn(class'MskGsRepInfo', KFPlayerController(C));
|
RepInfo = Spawn(class'MskGsRepInfo', KFPlayerController(C));
|
||||||
RepInfo.C = C;
|
RepInfo.C = C;
|
||||||
RepInfo.Mut = Self;
|
RepInfo.Mut = Self;
|
||||||
@ -312,6 +320,8 @@ function NotifyLogout(Controller C)
|
|||||||
|
|
||||||
if (C == None) return;
|
if (C == None) return;
|
||||||
|
|
||||||
|
Initialize();
|
||||||
|
|
||||||
VoteCollector = MskGsVoteCollector(MyKFGI.MyKFGRI.VoteCollector);
|
VoteCollector = MskGsVoteCollector(MyKFGI.MyKFGRI.VoteCollector);
|
||||||
VoteCollector.NotifyLogout(C);
|
VoteCollector.NotifyLogout(C);
|
||||||
|
|
||||||
@ -355,5 +365,5 @@ function NotifyLogout(Controller C)
|
|||||||
|
|
||||||
defaultproperties
|
defaultproperties
|
||||||
{
|
{
|
||||||
|
bInitialized=false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user