mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-01 20:06:21 +00:00
Adds game speed option to match setup, adds in-game control for single player games, fixes #785.
Refactors some GUI utility functions. This was SVN commit r13340.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -526,6 +526,11 @@ void SetSimRate(void* UNUSED(cbdata), float rate)
|
||||
g_Game->SetSimRate(rate);
|
||||
}
|
||||
|
||||
float GetSimRate(void* UNUSED(cbdata))
|
||||
{
|
||||
return g_Game->GetSimRate();
|
||||
}
|
||||
|
||||
void SetTurnLength(void* UNUSED(cbdata), int length)
|
||||
{
|
||||
if (g_NetServer)
|
||||
@@ -680,6 +685,7 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
|
||||
|
||||
// Development/debugging functions
|
||||
scriptInterface.RegisterFunction<void, float, &SetSimRate>("SetSimRate");
|
||||
scriptInterface.RegisterFunction<float, &GetSimRate>("GetSimRate");
|
||||
scriptInterface.RegisterFunction<void, int, &SetTurnLength>("SetTurnLength");
|
||||
scriptInterface.RegisterFunction<void, float, float, float, &SetCameraTarget>("SetCameraTarget");
|
||||
scriptInterface.RegisterFunction<int, &Crash>("Crash");
|
||||
|
||||
Reference in New Issue
Block a user