fix bug G vision a travers P/E
This commit is contained in:
parent
3854821657
commit
f174114b2a
7
main.c
7
main.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue