In some cases (doors specifically for this bug), setting an open_heading or close_heading to 0 (zero) degrees seems to make World think there is no value. Default for these fields appears to be -1, which according to SOE seems to be a valid heading on the compass (ie., open_heading of -20 is the same as an open_heading of 340).
For doors who's spawn heading is 90 and swing counter-clockwise, setting the open_heading to 0 results in the door not opening. Set the value to 1, or -1, the door opens properly. 1 degree is not a huge deal visually, but it adds excessive data entry we would otherwise not need to do if "0" were considered Zero Degrees.
Heading "0" (zero) as a value ignored
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Heading "0" (zero) as a value ignored
Devs,
I am trying to fix this issue where if a door's Heading = 0, the door won't open until you set the open_heading to something not "0" (zero).
Would this be the solution? Change:
To:
There is also another check in Widget::CloseDoor()
The reason I think Zero is valid is that by default, all these values are -1. I think they only get set to 0 if the DB has 0 as a value, which should be valid.
Going to test this on my server, but I am not sure of the long-term effects of OpenHeading = 0, so input would be appreciated.
I am trying to fix this issue where if a door's Heading = 0, the door won't open until you set the open_heading to something not "0" (zero).
Would this be the solution? Change:
Code: Select all
void Widget::OpenDoor(){
if(GetOpenHeading() = 0)
SetHeading(GetOpenHeading());
if(GetOpenY() > 0){Code: Select all
void Widget::OpenDoor(){
if(GetOpenHeading() >= 0) <-- added =
SetHeading(GetOpenHeading());
if(GetOpenY() > 0){Code: Select all
void Widget::CloseDoor(){
if(GetClosedHeading() >= 0) <-- added =
SetHeading(GetClosedHeading());
else if(GetOpenHeading() >= 0) <-- added =
SetHeading(GetSpawnOrigHeading());
if(GetCloseY() >= 0){
Going to test this on my server, but I am not sure of the long-term effects of OpenHeading = 0, so input would be appreciated.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Re: Heading "0" (zero) as a value ignored
I don't see why it would have issues, but I haven't messed with that code in a while so who knows 
Who is online
Users browsing this forum: No registered users and 0 guests