And another collision fix.

This commit is contained in:
Christian Speckner 2018-02-07 23:13:16 +01:00
parent 6b6fb9140f
commit b30fa0df98
1 changed files with 6 additions and 6 deletions

View File

@ -52,9 +52,9 @@ void Player::reset()
mySampleCounter = 0;
myDividerPending = 0;
myDividerChangeCounter = -1;
myPattern = 0;
setDivider(1);
updatePattern();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -67,11 +67,6 @@ void Player::grp(uInt8 pattern)
if (!myIsDelaying && myPatternNew != oldPatternNew) {
myTIA->flushLineCache();
updatePattern();
if (myIsRendering && myRenderCounter >= myRenderCounterTripPoint) {
collision = (myPattern & (1 << mySampleCounter)) ? myCollisionMaskEnabled : myCollisionMaskDisabled;
myTIA->updateCollision();
}
}
}
@ -386,6 +381,11 @@ void Player::updatePattern()
((myPattern & 0x80) >> 7)
);
}
if (myIsRendering && myRenderCounter >= myRenderCounterTripPoint) {
collision = (myPattern & (1 << mySampleCounter)) ? myCollisionMaskEnabled : myCollisionMaskDisabled;
myTIA->updateCollision();
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -