summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. 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)
commit74904bd7f54e63c1068a8165a71940866205dfbe (patch)
tree9d1a0d884e4cbc632881d7097e62df22fa9a970a
parent459c30627d9a2192d0f79280efaafc1d3a737be5 (diff)
downloadmazefight-74904bd7f54e63c1068a8165a71940866205dfbe.zip
mazefight-74904bd7f54e63c1068a8165a71940866205dfbe.tar.gz
mazefight-74904bd7f54e63c1068a8165a71940866205dfbe.tar.bz2
game: Slow down on enemy collision
-rw-r--r--src/game.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game.c b/src/game.c
index 0c94202..183e0ad 100644
--- a/src/game.c
+++ b/src/game.c
@@ -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,