3 minor sample game cleanups:

* changed bitwise & to logical &&
* removed redundant state check
* moved a strcpy inside a NULL check to prevent a crash.
  NOTE: nothing sensible will happen as a result, but no crash at least.
This commit is contained in:
noshbar
2018-10-10 22:05:13 +02:00
parent f238b9ea3c
commit 1d548eaa4b
3 changed files with 8 additions and 6 deletions

View File

@ -954,7 +954,7 @@ void UpdateGameplayScreen(void)
playerActive = false;
killer = 5;
}
else if (CheckCollisionRecs(bee, player) && (state == FINALFORM) && (state != KICK))
else if (CheckCollisionRecs(bee, player) && (state == FINALFORM))
{
isHitBee = true;
beeVelocity = 8;