Leave LoadingGui: ensure PlayGui before RPG mode
This commit is contained in:
1 parent
06a77797ca
commit
c074f866fe
1 file changed
+19
-1
@@ -124,7 +124,7 @@ function RPGClient_EnableOverlay()
|
|||||||
RPGClient_KeyMap.bind(keyboard0, minus, RPGClient_ZoomOut);
|
RPGClient_KeyMap.bind(keyboard0, minus, RPGClient_ZoomOut);
|
||||||
Canvas.pushDialog(RPGClient_Mouse, 0);
|
Canvas.pushDialog(RPGClient_Mouse, 0);
|
||||||
RPGClient_KeyMap.push();
|
RPGClient_KeyMap.push();
|
||||||
if (isObject(moveMap) && !$RPGClient::MoveMapHeld)
|
if (isObject(PlayGui) && isObject(Canvas) && Canvas.getContent() == PlayGui.getId() && isObject(moveMap) && !$RPGClient::MoveMapHeld)
|
||||||
{
|
{
|
||||||
moveMap.pop();
|
moveMap.pop();
|
||||||
$RPGClient::MoveMapHeld = 1;
|
$RPGClient::MoveMapHeld = 1;
|
||||||
@@ -322,8 +322,26 @@ function RPGClient_TopDownWatch()
|
|||||||
$RPGClient::TopDownWatchSched = schedule(2500, 0, RPGClient_TopDownWatch);
|
$RPGClient::TopDownWatchSched = schedule(2500, 0, RPGClient_TopDownWatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function RPGClient_EnsurePlayGui()
|
||||||
|
{
|
||||||
|
if (!isObject(PlayGui) || !isObject(Canvas))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (Canvas.getContent() != PlayGui.getId())
|
||||||
|
{
|
||||||
|
Canvas.setContent(PlayGui);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
function clientCmdRPG_TopDown(%on, %yaw, %dist)
|
function clientCmdRPG_TopDown(%on, %yaw, %dist)
|
||||||
{
|
{
|
||||||
|
if (%on && !RPGClient_EnsurePlayGui())
|
||||||
|
{
|
||||||
|
schedule(200, 0, clientCmdRPG_TopDown, %on, %yaw, %dist);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (%on)
|
if (%on)
|
||||||
{
|
{
|
||||||
cancel($RPGClient::TopDownWatchSched);
|
cancel($RPGClient::TopDownWatchSched);
|
||||||
|
|||||||
Reference in new issue
Block a user