Skip to content

Commit

Permalink
Fix #145 (#146) — generating unique seeds when shuffling
Browse files Browse the repository at this point in the history
* Fix #145

* Revert changes to ink.js in templates
  • Loading branch information
Nat Quayle Nelson authored and y-lohse committed Jun 5, 2018
1 parent b000e11 commit eb235b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/Story.js
Expand Up @@ -1494,7 +1494,7 @@ export class Story extends InkObject{
var seqPathStr = seqContainer.path.toString();
var sequenceHash = 0;
for (var i = 0, l = seqPathStr.length; i < l; i++){
sequenceHash += seqPathStr.charCodeAt[i] || 0;
sequenceHash += seqPathStr.charCodeAt(i) || 0;
}
var randomSeed = sequenceHash + loopIndex + this.state.storySeed;
var random = new PRNG(parseInt(randomSeed));
Expand Down

0 comments on commit eb235b4

Please sign in to comment.