fix: skip trader button
This commit is contained in:
parent
1fbc134d80
commit
ea292fa6e0
@ -7,7 +7,7 @@ var KFGUI_Button AdminButton,SpectateButton,SkipTraderButton;
|
|||||||
|
|
||||||
var transient KFGUI_Button PrevButton;
|
var transient KFGUI_Button PrevButton;
|
||||||
var transient int NumButtons,NumButtonRows;
|
var transient int NumButtons,NumButtonRows;
|
||||||
var transient bool bInitSpectate,bOldSpectate,bInitSkipTrader;
|
var transient bool bInitSpectate,bOldSpectate;
|
||||||
|
|
||||||
var localized string MapVoteButtonText;
|
var localized string MapVoteButtonText;
|
||||||
var localized string MapVoteButtonToolTip;
|
var localized string MapVoteButtonToolTip;
|
||||||
@ -74,19 +74,12 @@ function bool SkipTraderIsAviable(PlayerReplicationInfo PRI)
|
|||||||
local KFPlayerReplicationInfo KFPRI;
|
local KFPlayerReplicationInfo KFPRI;
|
||||||
|
|
||||||
KFPRI = KFPlayerReplicationInfo(PRI);
|
KFPRI = KFPlayerReplicationInfo(PRI);
|
||||||
if (KFPRI == none)
|
KFGRI = KFGameReplicationInfo(KFPRI.WorldInfo.GRI);
|
||||||
|
|
||||||
|
if ( KFGRI == none || KFPRI == none)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
KFGRI = KFGameReplicationInfo(KFPRI.WorldInfo.GRI);
|
return KFGRI.bMatchHasBegun && KFGRI.bTraderIsOpen && KFPRI.bHasSpawnedIn && !KFPRI.bVotedToSkipTraderTime;
|
||||||
if (KFGRI.bMatchHasBegun && KFGRI.bTraderIsOpen && KFPRI.bHasSpawnedIn)
|
|
||||||
{
|
|
||||||
return !bInitSkipTrader;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bInitSkipTrader=false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ShowMenu()
|
function ShowMenu()
|
||||||
@ -131,7 +124,6 @@ function ButtonClicked( KFGUI_Button Sender )
|
|||||||
break;
|
break;
|
||||||
case 'SkipTrader':
|
case 'SkipTrader':
|
||||||
KFPlayerController(GetPlayer()).RequestSkipTrader();
|
KFPlayerController(GetPlayer()).RequestSkipTrader();
|
||||||
bInitSkipTrader=true;
|
|
||||||
SkipTraderButton.SetDisabled(true);
|
SkipTraderButton.SetDisabled(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -186,7 +178,6 @@ defaultproperties
|
|||||||
Pages.Add(Class'UIP_AdminMenu')
|
Pages.Add(Class'UIP_AdminMenu')
|
||||||
Pages.Add(Class'UIP_About')
|
Pages.Add(Class'UIP_About')
|
||||||
Pages.Add(Class'UIP_MiniGame')
|
Pages.Add(Class'UIP_MiniGame')
|
||||||
bInitSkipTrader=false
|
|
||||||
|
|
||||||
Begin Object Class=KFGUI_SwitchMenuBar Name=MultiPager
|
Begin Object Class=KFGUI_SwitchMenuBar Name=MultiPager
|
||||||
ID="Pager"
|
ID="Pager"
|
||||||
|
Loading…
Reference in New Issue
Block a user