Opened 11 years ago

Closed 11 years ago

#1042 closed bug (fixed (in master))

A better fix for the lite room bug.

Reported by: Tobias Owned by:
Milestone: 3.1.2 beta Keywords: patch


I have been looking into the lite room bug bug1022 and the rather clungy fix for it [f163806] (SVN r1809).

I have logged some variables and found the real culprit.
in the function lite_room the loop assumes that temp_n was 0 when cave_temp_room_aux is called the first time in line 2545.

If temp_n wasn't 0 but 1 (what sometimes happens). the starting values y1 and y2 are in temp_x[1], instead of temp_x[0], and temp_x[0] is uninitialized.

The loop now ties to find the rooms around both temp_x[1] (the real room) and temp_x[0] ( a random value).

With the current fix, if temp_x[0] is in a real room, it will get lighted.

Setting temp_n =0 at the start of lite_room fixes the problem more cleanly.

Although there might be some more functions that assume temp_n to be 0 when it isn't.

Attachments (1)

lite.diff (690 bytes) - added by Tobias 11 years ago.
patch, undoes r1809 implements my fix

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by Tobias

patch, undoes r1809 implements my fix

comment:1 Changed 11 years ago by magnate

  • Milestone changed from Triage to 3.1.2 beta
  • Resolution set to fixed
  • Status changed from new to closed

Applied in [d1edebe] (SVN r1841) - thanks for the patch.

Note: See TracTickets for help on using tickets.