Don't show movement notifications for ghosts

This commit is contained in:
Eyal Sawady 2020-10-19 17:59:46 -04:00
parent 385bae9c74
commit 889111b734
No known key found for this signature in database
GPG Key ID: 604D3459E53A9952
1 changed files with 2 additions and 2 deletions

4
main.c
View File

@ -306,8 +306,8 @@ player_move(size_t pid, enum player_location location)
// Notify players you're moving
if (MOVEMENT_NOTIFICATIONS) {
for (size_t i = 0; i < NUM_PLAYERS; i++) {
if (players[i].fd == -1 || i == pid
|| !alive(players[i]))
if (players[i].fd == -1 || !alive(players[i])
|| !alive(players[pid]) || i == pid)
continue;
if (players[i].location == players[pid].location) {