minor optimizations and formatting

This commit is contained in:
thrust26 2019-01-10 21:08:12 +01:00
parent cadfbdd767
commit f80f291cec
3 changed files with 10 additions and 11 deletions

View File

@ -165,9 +165,10 @@ bool Ball::movementTick(uInt32 clock, bool apply)
{
myLastMovementTick = myCounter;
if (clock == myHmmClocks) myIsMoving = false;
if (myIsMoving && apply) tick(false);
if (clock == myHmmClocks)
myIsMoving = false;
else if (myIsMoving && apply)
tick(false);
return myIsMoving;
}

View File

@ -167,9 +167,10 @@ bool Missile::movementTick(uInt8 clock, uInt8 hclock, bool apply)
{
myLastMovementTick = myCounter;
if (clock == myHmmClocks) myIsMoving = false;
if (myIsMoving && apply) tick(hclock, false);
if(clock == myHmmClocks)
myIsMoving = false;
else if(myIsMoving && apply)
tick(hclock, false);
return myIsMoving;
}

View File

@ -268,12 +268,9 @@ void Player::startMovement()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Player::movementTick(uInt32 clock, bool apply)
{
if (clock == myHmmClocks) {
if (clock == myHmmClocks)
myIsMoving = false;
}
//if(myIsMoving && apply) tick();
if(myIsMoving)
else if(myIsMoving)
{
if(apply) tick();
else myStuffedClock = true;