From b09e04612e8f4828522ba0df1fc5ba7d576b9288 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 5 Jan 2018 15:39:34 +0100 Subject: [PATCH] Fixed the color of snake endings. Fixed snakes freezing. --- game.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/game.cpp b/game.cpp index 6a0e051a..90c574b5 100644 --- a/game.cpp +++ b/game.cpp @@ -4625,9 +4625,14 @@ void movehex(bool mounted, int colorpair) { hexvisit(c->mov[t], c, t, mounted, colorpair); } } + } + +void movehex_rest(bool mounted) { for(int i=0; imonst == moHexSnake && snake_pair(c) == colorpair) { + int colorpair; + if(c->monst == moHexSnake) { + colorpair = snake_pair(c); if(!goodmount(c, mounted)) continue; int t[MAX_EDGE]; for(int i=0; itype; i++) t[i] = i; @@ -4638,7 +4643,7 @@ void movehex(bool mounted, int colorpair) { hexvisit(c, c->mov[t[u]], c->spn(t[u]), mounted, colorpair); } } - if(c->monst == moHexSnake && snake_pair(c) == colorpair) { + if(c->monst == moHexSnake) { snakeAttack(c, mounted); kills[moHexSnake]++; playSound(c, "die-troll"); @@ -5693,6 +5698,8 @@ void movehex_all() { movehex(false, i); if(!shmup::on && haveMount()) movehex(true, i); } + movehex_rest(false); + movehex_rest(true); } void movemonsters() {