I'm currently trying to enable a check for doors that won't close automatically, and so far it seems to of worked, but while the code does work, it doesn't work completely.
My Automatic Door Closing code looks like this:
::: CODE :::
= Close the door after three seconds
void DoorOpen (int door)
// This splits up doors to either open/close automatically
// or they have to be closed by hand
if ( (doorobjlist[door].ticcount += (short) tics) >= OPENTICS)
// Do not close door automatically
//if ( (doorobjlist[door].ticcount += (short) tics) >= OPENTICS) // These two lines of code behave normally when activated
//CloseDoor (door); // These two lines of code behave normally when activated
The original code works fine, but when I toggle this code, the game behaves very oddly (such as specific doors closing when supposed to, and others not even though they're the same type of door and facing the same direction).
I've witnessed this odd behavior:
1. Doors I've set to close automatically don't while others that I've set to never close will (such as a locked door).
2. Doors facing specific angles will close, but oddities occur even amongst those (The Northern-most doors will close, but the southern-most won't).
3. It seems that according to how the game likes to spawn the Doors, even if I try to set dr_normal to close and dr_elevator to stay open, the opposite will be true (The elevator door will close and the regular door will stay open).
Can someone help me out, or provide a working code string to fix my problem?