Permalink
Browse files

Made qBot not serialize the metadata which conatins too complicated a…

… data structure and wasn't being used in any case. Fixes #1185.

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@11198 3db68df2-c116-0410-a063-a993310a9797
  • Loading branch information...
1 parent dcf5c00 commit fff339c1309d4de30ae0b00ccb101f581062a9ae quantumstate committed Feb 28, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 binaries/data/mods/public/simulation/ai/qbot/qbot.js
@@ -137,6 +137,17 @@ QBotAI.prototype.Deserialize = function(data)
this._entityMetadata = {};
};
+// Override the default serializer
+QBotAI.prototype.Serialize = function()
+{
+ return {
+ _rawEntities: this._rawEntities,
+ _ownEntities: this._ownEntities,
+ _entityMetadata: {} // We store fancy data structures in entity metadata so
+ //don't try and serialize it
+ };
+};
+
function debug(output){
if (Config.debug){
if (typeof output === "string"){

0 comments on commit fff339c

Please sign in to comment.