mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Stop unprocessing flag events when serializing the flag history so that flag history is properly deterministic again
This commit is contained in:
parent
409b170891
commit
109de55185
1 changed files with 2 additions and 2 deletions
|
@ -364,8 +364,8 @@ module.exports = class World
|
||||||
endFrame = @frames.length
|
endFrame = @frames.length
|
||||||
#console.log "... world serializing frames from", startFrame, "to", endFrame, "of", @totalFrames
|
#console.log "... world serializing frames from", startFrame, "to", endFrame, "of", @totalFrames
|
||||||
[transferableObjects, nontransferableObjects] = [0, 0]
|
[transferableObjects, nontransferableObjects] = [0, 0]
|
||||||
delete flag.processed for flag in @flagHistory
|
serializedFlagHistory = (_.omit(_.clone(flag), 'processed') for flag in @flagHistory)
|
||||||
o = {totalFrames: @totalFrames, maxTotalFrames: @maxTotalFrames, frameRate: @frameRate, dt: @dt, victory: @victory, userCodeMap: {}, trackedProperties: {}, flagHistory: @flagHistory, difficulty: @difficulty, scores: @getScores(), randomSeed: @randomSeed, picoCTFFlag: @picoCTFFlag}
|
o = {totalFrames: @totalFrames, maxTotalFrames: @maxTotalFrames, frameRate: @frameRate, dt: @dt, victory: @victory, userCodeMap: {}, trackedProperties: {}, flagHistory: serializedFlagHistory, difficulty: @difficulty, scores: @getScores(), randomSeed: @randomSeed, picoCTFFlag: @picoCTFFlag}
|
||||||
o.trackedProperties[prop] = @[prop] for prop in @trackedProperties or []
|
o.trackedProperties[prop] = @[prop] for prop in @trackedProperties or []
|
||||||
|
|
||||||
for thangID, methods of @userCodeMap
|
for thangID, methods of @userCodeMap
|
||||||
|
|
Loading…
Reference in a new issue