mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
Don't error in the network delay notifier.
Differential Revision: https://code.wildfiregames.com/D3788 This was SVN commit r25181.
This commit is contained in:
parent
2d53308e1b
commit
8ed1bc2fd1
3 changed files with 2 additions and 6 deletions
|
|
@ -7,7 +7,6 @@ class NetworkDelayOverlay
|
|||
{
|
||||
this.netDelayOverlay = Engine.GetGUIObjectByName("netDelayOverlay");
|
||||
|
||||
this.netDelayOverlay.caption="toto";
|
||||
this.caption = translate(this.Caption);
|
||||
this.sprintfData = {};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<!-- Put this under the regular gamestateNotifications. -->
|
||||
<object name="netDelayOverlay"
|
||||
type="text"
|
||||
hidden="false"
|
||||
hidden="true"
|
||||
ghost="true"
|
||||
z="199"
|
||||
size="100%-300 60 100%-110 80"
|
||||
|
|
|
|||
|
|
@ -98,13 +98,10 @@ void SetSimRate(float rate)
|
|||
g_Game->SetSimRate(rate);
|
||||
}
|
||||
|
||||
int GetPendingTurns(const ScriptRequest& rq)
|
||||
int GetPendingTurns()
|
||||
{
|
||||
if (!g_Game || !g_Game->GetTurnManager())
|
||||
{
|
||||
ScriptException::Raise(rq, "Game is not started");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return g_Game->GetTurnManager()->GetPendingTurns();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue