projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support loud locations.
[open-adventure.git]
/
actions.c
diff --git
a/actions.c
b/actions.c
index 45dd8b66fe11ed0ac1bdec3a93690a9d727846d0..b6cfc33d0210328c7a2f7ed81c9fc180dfa229d6 100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-552,7
+552,7
@@
int fill(token_t verb, token_t obj)
if (LIQUID() != 0)
spk = BOTTLE_FULL;
if (spk == BOTTLED_WATER) {
if (LIQUID() != 0)
spk = BOTTLE_FULL;
if (spk == BOTTLED_WATER) {
- game.prop[BOTTLE] = MOD(
COND
[game.loc], 4) / 2 * 2;
+ game.prop[BOTTLE] = MOD(
conditions
[game.loc], 4) / 2 * 2;
k = LIQUID();
if (TOTING(BOTTLE))
game.place[k] = CARRIED;
k = LIQUID();
if (TOTING(BOTTLE))
game.place[k] = CARRIED;
@@
-671,13
+671,15
@@
static int light(token_t verb, token_t obj)
static int listen(void)
/* Listen. Intransitive only. Print stuff based on objsnd/locsnd. */
{
static int listen(void)
/* Listen. Intransitive only. Print stuff based on objsnd/locsnd. */
{
-
int
k;
+
long
k;
int spk = ALL_SILENT;
int spk = ALL_SILENT;
- k = LOCSND[game.loc];
- if (k != 0) {
- rspeak(labs(k));
- if (k < 0) return GO_CLEAROBJ;
- spk = NO_MESSAGE;
+ k = locations[game.loc].sound;
+ if (k != SILENT) {
+ rspeak(k);
+ if (locations[game.loc].loud)
+ return GO_CLEAROBJ;
+ else
+ spk = NO_MESSAGE;
}
for (int i = 1; i <= NOBJECTS; i++) {
if (!HERE(i) || OBJSND[i] == 0 || game.prop[i] < 0)
}
for (int i = 1; i <= NOBJECTS; i++) {
if (!HERE(i) || OBJSND[i] == 0 || game.prop[i] < 0)