diff options
author | Charadon <dev@iotib.net> | 2022-06-13 19:28:09 -0400 |
---|---|---|
committer | Charadon <dev@iotib.net> | 2022-06-13 19:28:09 -0400 |
commit | 4b25b1e9f6cc9b1fc3f1342b32aa66f55e5135c1 (patch) | |
tree | 3f4d85393bb037f81e0dba06331b8fa7c2d2fd0a /src/ball.c | |
parent | e33f20ad8e35a736996eca1f6a3a63b85a38b3d0 (diff) | |
download | Pong-C-4b25b1e9f6cc9b1fc3f1342b32aa66f55e5135c1.tar.gz |
Revert "Revert "Added liberapay link, and more fruitless work on the internal_clock""
This reverts commit e33f20ad8e35a736996eca1f6a3a63b85a38b3d0.
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 af210bb..20d3c09 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 = SDL_AtomicGet(&Ticks); + int CurrentTick = 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 = SDL_AtomicGet(&Ticks)+1; + Ball->NextTick = Ticks+1; // printf("%d,%d\n", SDL_AtomicGet(&Ticks), Ball->NextTick); } // printf("%d,%d\n", SDL_AtomicGet(&Ticks), Ball->NextTick); |