mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:29:50 +00:00
Gamesetup: make sure GameSpeed is a number
The dropdown converted the numbers to string, and the code expected numbers. Differential Revision: https://code.wildfiregames.com/D3924 This was SVN commit r25376.
This commit is contained in:
+7
-2
@@ -221,8 +221,13 @@ void CGame::RegisterInit(const JS::HandleValue attribs, const std::string& saved
|
||||
scriptInterface.GetProperty(attribs, "mapType", mapType);
|
||||
|
||||
float speed;
|
||||
if (scriptInterface.HasProperty(attribs, "gameSpeed") && scriptInterface.GetProperty(attribs, "gameSpeed", speed))
|
||||
SetSimRate(speed);
|
||||
if (scriptInterface.HasProperty(attribs, "gameSpeed"))
|
||||
{
|
||||
if (scriptInterface.GetProperty(attribs, "gameSpeed", speed))
|
||||
SetSimRate(speed);
|
||||
else
|
||||
LOGERROR("GameSpeed could not be parsed.");
|
||||
}
|
||||
|
||||
LDR_BeginRegistering();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user