View Single Post
  #1  
Old 06-09-2012, 10:12 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default Fix for Inverted Doors

(All changes are located in 'doors.cpp')

Step 1: Add the following to definitions:
Code:
#define INVOPEN_DOOR 0x03
#define INVCLOSE_DOOR 0x02
(All of the following changes made to 'HandleClick')

Step 2: Change all 'md->action = OPEN_DOOR' to this:
Code:
md->action = invert_state == 0 ? OPEN_DOOR : INVOPEN_DOOR;
Step 3: Change all 'md->action = CLOSE_DOOR' to this:
Code:
md->action = invert_state == 0 ? CLOSE_DOOR : INVCLOSE_DOOR;
Step 4: Change the 'return' on 'md->action == CLOSE_DOOR' conditional criteria to this:
Code:
if((md->action == CLOSE_DOOR && invert_state == 0) || (md->action == INVCLOSE_DOOR && invert_state == 1))
{
	safe_delete(outapp);
	return;
}
This should fix the proper operation of inverted doors. My limited testing in-game has not found any door that will not function
properly, unless there are issues not related to 'doors.cpp'

(There is an apparent bug in the actual GFay client door model. Sometimes you will 'miss' the elevator and you'll be left floating in
the air. I remember this behavior from early 'live'.)

I'm still running into other issues with incorrect or missing database values.

I'll post updates for 'NPCOpen', 'ForceOpen' and 'ForceClose' after I make the proper changes in them. This should add my fix as well
as the fix to 'ForceClose' suggested by someone else.


U
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote