diff options
author | Charadon <dev@iotib.net> | 2022-06-13 19:28:37 -0400 |
---|---|---|
committer | Charadon <dev@iotib.net> | 2022-06-13 19:28:37 -0400 |
commit | 520a610a8db7c07423fec086806b48ff2890c9c0 (patch) | |
tree | bbe7ad6f4050304eb922abd6fc6fd89f6d0a7f40 /src/ball.c | |
parent | 0e1a3565cd077a297c07bad7466f317025758b31 (diff) | |
download | Pong-C-520a610a8db7c07423fec086806b48ff2890c9c0.tar.gz |
Revert "Revert "Revert "Revert "Revert "Added liberapay link, and more fruitless work on the internal_clock"""""
This reverts commit 0e1a3565cd077a297c07bad7466f317025758b31.
Diffstat (limited to 'src/ball.c')
-rw-r--r-- | src/ball.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ball.c b/src/ball.c index 20d3c09..af210bb 100644 --- a/src/ball.c +++ b/src/ball.c @@ -8,7 +8,7 @@ void ball(Rectangle *Player, Rectangle *Enemy, struct Balls *Ball, int *PlayerSc } // Moves - int CurrentTick = Ticks; + int CurrentTick = SDL_AtomicGet(&Ticks); if(Ball->NextTick <= CurrentTick){ int RunThisManyTimes = 0; if (CurrentTick > Ball->NextTick) { @@ -61,7 +61,7 @@ void ball(Rectangle *Player, Rectangle *Enemy, struct Balls *Ball, int *PlayerSc play_audio(SOUND_BOUNCE); } } - Ball->NextTick = Ticks+1; + Ball->NextTick = SDL_AtomicGet(&Ticks)+1; // printf("%d,%d\n", SDL_AtomicGet(&Ticks), Ball->NextTick); } // printf("%d,%d\n", SDL_AtomicGet(&Ticks), Ball->NextTick); |