Prevent ghosts from calling emergencies
This commit is contained in:
parent
3d49bbdc32
commit
5af8c9ae24
2
main.c
2
main.c
|
@ -854,6 +854,8 @@ adventure(size_t pid, char *input)
|
||||||
} else if (strcmp(input, "press emergency button") == 0) {
|
} else if (strcmp(input, "press emergency button") == 0) {
|
||||||
if (players[pid].location != LOC_CAFETERIA) {
|
if (players[pid].location != LOC_CAFETERIA) {
|
||||||
snprintf(buf, sizeof(buf), "You can't do that here");
|
snprintf(buf, sizeof(buf), "You can't do that here");
|
||||||
|
} else if (!alive(players[pid])) {
|
||||||
|
snprintf(buf, sizeof(buf), "Ghosts can't call emergencies");
|
||||||
} else {
|
} else {
|
||||||
start_discussion(pid, SIZE_MAX);
|
start_discussion(pid, SIZE_MAX);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue