Skip to content

Commit

Permalink
Fixed so that instant-apply of 1-second transition to target object d…
Browse files Browse the repository at this point in the history
…oesn't happen if that transition is a moving transition. This fixes glitches where clicking on a moving cart causes it to crash. Fixes #607
  • Loading branch information
jasonrohrer committed May 7, 2020
1 parent ae58db4 commit 9f3520e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions documentation/changeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ Server Fixes
kill command from just in radius in a way that reduces the population around
the killer.

--Fixed so that instant-apply of 1-second transition to target object doesn't
happen if that transition is a moving transition. This fixes glitches where
clicking on a moving cart causes it to crash. Fixes #607





Expand Down
11 changes: 9 additions & 2 deletions server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15516,10 +15516,17 @@ static int checkTargetInstantDecay( int inTarget, int inX, int inY ) {
int newTarget = inTarget;

TransRecord *targetDecay = getPTrans( -1, inTarget );


// do NOT auto-apply movement transitions here
// don't want result of move to repace this object in place, because
// moving object might leave something behind, or require something to
// land on in its destination (like a moving cart leaving one track
// and landing on another)

if( targetDecay != NULL &&
targetDecay->autoDecaySeconds == 1 &&
targetDecay->newTarget > 0 ) {
targetDecay->newTarget > 0 &&
targetDecay->move == 0 ) {

newTarget = targetDecay->newTarget;

Expand Down

0 comments on commit 9f3520e

Please sign in to comment.