More HMOVE collision fixes.

This commit is contained in:
Christian Speckner 2018-02-07 23:00:43 +01:00
parent 5764a73d89
commit 6b6fb9140f
2 changed files with 8 additions and 8 deletions

View File

@ -50,8 +50,7 @@ void Ball::reset()
myIsRendering = false;
myDebugEnabled = false;
myRenderCounter = 0;
updateEnabled();
myIsEnabled = false;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -65,7 +64,6 @@ void Ball::enabl(uInt8 value)
myTIA->flushLineCache();
updateEnabled();
collision = (myIsVisible && myIsEnabled) ? myCollisionMaskEnabled : myCollisionMaskDisabled;
myTIA->updateCollision();
}
@ -244,6 +242,9 @@ void Ball::shuffleStatus()
void Ball::updateEnabled()
{
myIsEnabled = !myIsSuppressed && (myIsDelaying ? myIsEnabledOld : myIsEnabledNew);
collision = (myIsVisible && myIsEnabled) ? myCollisionMaskEnabled : myCollisionMaskDisabled;
myTIA->updateCollision();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -52,8 +52,7 @@ void Missile::reset()
myColor = myObjectColor = myDebugColor = 0;
myDebugEnabled = false;
collision = myCollisionMaskDisabled;
updateEnabled();
myIsEnabled = false;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -67,9 +66,6 @@ void Missile::enam(uInt8 value)
myTIA->flushLineCache();
updateEnabled();
collision = (myIsVisible && myIsEnabled) ? myCollisionMaskEnabled : myCollisionMaskDisabled;
myTIA->updateCollision();
}
}
@ -258,6 +254,9 @@ void Missile::applyColorLoss()
void Missile::updateEnabled()
{
myIsEnabled = !myIsSuppressed && myEnam && !myResmp;
collision = (myIsVisible && myIsEnabled) ? myCollisionMaskEnabled : myCollisionMaskDisabled;
myTIA->updateCollision();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -