July 29 2009 build
| This is the article of a development build of Skyscraper Simulator.|
It has been confirmed a good-faith contribution to the Skyscraper wiki.
This is mainly a bugfix build, and contains major fixes and cleanups to the elevator queue and call processing code (so test it out and make sure it's working realistically). This also has the 7/28 call buttons fix, and I added Crystal Space DLLs to support TGA, DDS and JNG/MNG image formats. The elevator editor has been updated with some new stuff.
Just so you can see if I'm doing things right, here's how the call processing works (when a user clicks a call button - most of this is somewhat taken from my code comments) - this is in the function CallButton::Call() in callbutton.cpp:
First it exits if the button is already active (call has already been made), and if it's not active, goes through all associated elevators to find the closest available one.
Then it checks elevators with these:
-if elevator is closer than the previously checked one or we're starting the checks
-and if it's above the current floor and should be called down, or below the current floor and called up, or on the same floor, or idle (not moving, doors not open and doors not moving)
-and if it's either going the same direction as the call or idle
-and if it's not in any service mode
Then, if the closest elevator is already on the called floor, if the call direction is the same, and if the elevator is not idle, it turns off the button light, sets the directional indicator, plays the chime, and opens the doors. Otherwise, it adds a route to that floor with the direction specified by the button clicked.