Skip to content

Commit

Permalink
Fixed so that useChance applies in last transition back to parent obj…
Browse files Browse the repository at this point in the history
…ect (example: refilling last step of pond should have 1/5 chance of taking pond to full state, when before it had 1/1 chance, allowing for an infinite water exploit). Thanks Eve, YAHG, and Rebel.
  • Loading branch information
jasonrohrer committed Jun 4, 2018
1 parent dd7a33d commit b05f93a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
14 changes: 14 additions & 0 deletions documentation/changeLog.txt
Expand Up @@ -3,6 +3,20 @@ This file only list changes to game code. Changes to content can be found here:
http://onehouronelife.com/updateLog.php





Server Fixes:

--Fixed so that useChance applies in last transition back to parent object
(example: refilling last step of pond should have 1/5 chance of taking pond
to full state, when before it had 1/1 chance, allowing for an infinite water
exploit). Thanks Eve, YAHG, and Rebel.





Version 105 2018-June-1

--Fixed crash in transition bank pattern code. Thanks Enforcerke and Jookia.
Expand Down
11 changes: 10 additions & 1 deletion gameSource/transitionBank.cpp
Expand Up @@ -869,7 +869,16 @@ void initTransBankFinish() {
}
else if( uTo >= target->numUses - 1 ) {
tp.toID = newTarget->id;
tp.noChangeID = newTarget->id;
if( dir == 1 && tp.fromID != -1 ) {
// transition back to parent object
// if we have a use chance, it should
// apply here too, leaving us at last use dummy
// object if use chance doesn't happen.
tp.noChangeID = tp.fromID;
}
else {
tp.noChangeID = newTarget->id;
}
}

if( tp.fromID != -1 && tp.toID != -1 ) {
Expand Down

0 comments on commit b05f93a

Please sign in to comment.