mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 04:44:25 +00:00
Don't serialize the technology modifications cache. Fixes #1384.
This was SVN commit r11761.
This commit is contained in:
@@ -2,6 +2,21 @@ function TechnologyManager() {}
|
||||
|
||||
TechnologyManager.prototype.Schema =
|
||||
"<a:component type='system'/><empty/>";
|
||||
|
||||
TechnologyManager.prototype.Serialize = function()
|
||||
{
|
||||
// The modifications cache will be affected by property reads from the GUI and other places so we shouldn't
|
||||
// serialize it.
|
||||
|
||||
var ret = {};
|
||||
for (i in this)
|
||||
{
|
||||
if (this.hasOwnProperty(i))
|
||||
ret[i] = this[i];
|
||||
}
|
||||
ret.modificationCache = {};
|
||||
return ret;
|
||||
};
|
||||
|
||||
TechnologyManager.prototype.Init = function ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user