Hello retry on mission complete; pushToBack fix

This commit is contained in:
RallyBlock committed 2026-11-09 05:57:51 -05:00
1 parent 7edd647a89
commit f54039af89
1 file changed
+22 -5
+22 -5
View File
@@ -103,7 +103,7 @@ function RPGClient_EnableOverlay()
enabled = "1"; enabled = "1";
}; };
PlayGui.add(RPGClient_Mouse); PlayGui.add(RPGClient_Mouse);
RPGClient_Mouse.pushToBack(); PlayGui.pushToBack(RPGClient_Mouse);
if (isObject(RPGClient_KeyMap)) if (isObject(RPGClient_KeyMap))
{ {
RPGClient_KeyMap.delete(); RPGClient_KeyMap.delete();
@@ -113,8 +113,8 @@ function RPGClient_EnableOverlay()
RPGClient_KeyMap.bind(keyboard0, d, RPGClient_YawRight); RPGClient_KeyMap.bind(keyboard0, d, RPGClient_YawRight);
RPGClient_KeyMap.bind(keyboard0, left, RPGClient_YawLeft); RPGClient_KeyMap.bind(keyboard0, left, RPGClient_YawLeft);
RPGClient_KeyMap.bind(keyboard0, right, RPGClient_YawRight); RPGClient_KeyMap.bind(keyboard0, right, RPGClient_YawRight);
RPGClient_KeyMap.bind(keyboard0, pgup, RPGClient_ZoomIn); RPGClient_KeyMap.bind(keyboard0, "pageup", RPGClient_ZoomIn);
RPGClient_KeyMap.bind(keyboard0, pgdn, RPGClient_ZoomOut); RPGClient_KeyMap.bind(keyboard0, "pagedown", RPGClient_ZoomOut);
RPGClient_KeyMap.bind(keyboard0, equals, RPGClient_ZoomIn); RPGClient_KeyMap.bind(keyboard0, equals, RPGClient_ZoomIn);
RPGClient_KeyMap.bind(keyboard0, minus, RPGClient_ZoomOut); RPGClient_KeyMap.bind(keyboard0, minus, RPGClient_ZoomOut);
Canvas.pushDialog(RPGClient_Mouse, 0); Canvas.pushDialog(RPGClient_Mouse, 0);
@@ -202,12 +202,18 @@ function RPGClient_ZoomOut(%val)
RPGClient_ApplyCamera(); RPGClient_ApplyCamera();
} }
function clientCmdRPG_Probe() function RPGClient_SendHello()
{ {
if (isObject(serverConnection)) if (!isObject(serverConnection))
{ {
return;
}
commandToServer('RPG_Hello', $RPGClient::Version); commandToServer('RPG_Hello', $RPGClient::Version);
} }
function clientCmdRPG_Probe()
{
RPGClient_SendHello();
} }
function clientCmdRPG_Welcome(%serverProto, %accepted) function clientCmdRPG_Welcome(%serverProto, %accepted)
@@ -362,4 +368,15 @@ package RPGClient_Cleanup
}; };
activatePackage(RPGClient_Cleanup); activatePackage(RPGClient_Cleanup);
package RPGClient_Mission
{
function onMissionDownloadComplete()
{
Parent::onMissionDownloadComplete();
schedule(200, 0, RPGClient_SendHello);
schedule(2000, 0, RPGClient_SendHello);
}
};
activatePackage(RPGClient_Mission);
echo("Client_RPG loaded (protocol " @ $RPGClient::Version @ ")"); echo("Client_RPG loaded (protocol " @ $RPGClient::Version @ ")");