fix bug G vision a travers P/E

This commit is contained in:
nemo 2025-06-10 23:19:47 +02:00
parent 3854821657
commit f174114b2a
1 changed files with 5 additions and 2 deletions

7
main.c
View File

@ -342,6 +342,9 @@ int kill(Map map, Vec2i pos)
map[pos.y][pos.x] = ' ';
door_open = 1;
break;
case 'P': case 'E':
killed = 1;
break;
case 'A':
map[pos.y][pos.x] = ' ';
alarme_sonne = 1.2;
@ -539,7 +542,7 @@ int main(void)
int max = pos.y > guard.pos.y ? pos.y : guard.pos.y;
int walled = 0;
for (int i=min; i<max; i++) {
if (map[i][x] == 'M' || map[i][x] == 'O' || map[i][x] == 'A') {
if (map[i][x] != ' ') {
walled = 1;
break;
}
@ -553,7 +556,7 @@ int main(void)
int max = pos.x > guard.pos.x ? pos.x : guard.pos.x;
int walled = 0;
for (int i=min; i<max; i++) {
if (map[y][i] == 'M' || map[y][i] == 'O' || map[y][i] == 'A') {
if (map[y][i] != ' ') {
walled = 1;
break;
}