diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-08-18 11:39:29 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-08-18 11:39:29 (EDT) |
commit | 74904bd7f54e63c1068a8165a71940866205dfbe (patch) | |
tree | 9d1a0d884e4cbc632881d7097e62df22fa9a970a | |
parent | 459c30627d9a2192d0f79280efaafc1d3a737be5 (diff) | |
download | mazefight-74904bd7f54e63c1068a8165a71940866205dfbe.zip mazefight-74904bd7f54e63c1068a8165a71940866205dfbe.tar.gz mazefight-74904bd7f54e63c1068a8165a71940866205dfbe.tar.bz2 |
game: Slow down on enemy collision
-rw-r--r-- | src/game.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -249,8 +249,12 @@ mf_game(long seed, int size, int fow, int reveal, int enemies, } for (i = 1; i < 1 + enemies; ++i) { for (j = i + 1; j < 1 + enemies; ++j) { - mf_char_collision(chars[i], chars[j], - SDL_TRUE); + if (mf_char_collision(chars[i], + chars[j], + SDL_TRUE) + == SDL_TRUE) { + fr = 1; + } } } mf_char_get_vector(chars[0], &game.player_cx, |