View Single Post
Old April 14, 2014, 23:51   #4
Join Date: Aug 2011
Posts: 414
BlueFish is on a distinguished road
Based on my reading of the code, this is a bug. It unintentionally adds 5 difficulty to the following actions (since sil 1.0 presumably)

Finding a secret door
Opening a locked door
Finding a trap
Disarming a trap
Opening a locked chest

The common thread is the call to "no_light()", which calls the macro "player_can_see_bold(y, x)", which works but for one case: when it's called for the player's current square. Throughout the code, only no_light() cares whether player_can_see_bold works for the player's current square.

To fix this, you'd change the following in cave.c:

void update_view(void)
/* Assume viewable */
info |= (CAVE_VIEW | CAVE_FIRE);

To add in the "CAVE_SEEN" flag, which is what player_can_see_bold checks for.

I can't verify this since I can't compile the code, but based on my reading of it, that's the bug.

I hope I'm not the only one to have ever had the subjective impression that it's absurdly difficult to disarm traps and open chests and find secret doors...
BlueFish is offline   Reply With Quote