Room and exit loop

Posted by Zeno on Tue 10 May 2005 09:52 PM — 3 posts, 9,257 views.

USA #0
Does anyone know how to do a loop through all rooms and then exits, setting all exit distances and keypads to 0? I need this done because of an error in the code that set these to random numbers, and they need to be reset back to 0.
USA #1
Seems to me it would be far simpler to intercept them all during load - in db.c somewhere in load_rooms where it's assigning the exdistance value to the exits. Read the number, but ignore it and assign 0. Then when you boot up they'll all be reset. Fold your areas, then get rid of the temporary hack and you should be golden.
USA #2
Yeah I figured that, but turns out I already had a function that searched for room flags. Modified that (temp) to reset distance and keypad.