forked from 0ad/0ad
Fix previous commit and OOS and rejoin. I need to get my hands on the guy that decided "init" wasn't called on deserialize.
This was SVN commit r17254.
This commit is contained in:
parent
3473828735
commit
14f53315d6
@ -102,8 +102,13 @@ Identity.prototype.Schema =
|
|||||||
Identity.prototype.Init = function()
|
Identity.prototype.Init = function()
|
||||||
{
|
{
|
||||||
// caching
|
// caching
|
||||||
this.classesList = GetIdentityClasses(this.template);;
|
this.classesList = GetIdentityClasses(this.template);
|
||||||
this.visibleClassesList = GetVisibleIdentityClasses(this.template);;
|
this.visibleClassesList = GetVisibleIdentityClasses(this.template);
|
||||||
|
};
|
||||||
|
|
||||||
|
Identity.prototype.Deserialize = function ()
|
||||||
|
{
|
||||||
|
this.Init();
|
||||||
};
|
};
|
||||||
|
|
||||||
Identity.prototype.Serialize = null; // we have no dynamic state to save
|
Identity.prototype.Serialize = null; // we have no dynamic state to save
|
||||||
|
@ -69,6 +69,11 @@ ResourceGatherer.prototype.Init = function()
|
|||||||
this.RecalculateGatherRatesAndCapacities();
|
this.RecalculateGatherRatesAndCapacities();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ResourceGatherer.prototype.Deserialize = function ()
|
||||||
|
{
|
||||||
|
this.RecalculateGatherRatesAndCapacities();
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns data about what resources the unit is currently carrying,
|
* Returns data about what resources the unit is currently carrying,
|
||||||
* in the form [ {"type":"wood", "amount":7, "max":10} ]
|
* in the form [ {"type":"wood", "amount":7, "max":10} ]
|
||||||
|
Loading…
Reference in New Issue
Block a user