Disarming a chest trap was setting obj->tknown = 0 even though the hero just discovered that it isn't trapped. Triggering a chest trap behaved similarly. Since there are no repeating chest traps, hero should know that the chest whose trap just went off is no longer trapped. chest_trap() didn't document its return value but was clearly meant to return True if the chest was destroyed. It didn't handle that correctly when the chest was being carried. However, none of the callers actually use the return value. [This fix tracks whether the chest gets deleted; a better fix would be to destroy an exploding chest even when it is being carried.]
193 KiB
193 KiB