• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Where is floorchange handled?

Itutorial

Legendary OT User
Joined
Dec 23, 2014
Messages
2,426
Solutions
68
Reaction score
1,075
Where in the sources is floorchange handled? It seems in my 1.4 version after the player moves up or down stairs their direction is opposite from what it should be.
 
Where in the sources is floorchange handled? It seems in my 1.4 version after the player moves up or down stairs their direction is opposite from what it should be.
directly in items.xml i guess? floorchange attribute then u have lib or globals or in actions that define stairs / ladders in table
 
I found where the issue was. After the position updates in the sources to constexpr some of the values were added backwards.

In tools.cpp
C++:
Direction getDirectionTo(const Position& from, const Position& to)

C++:
int32_t x_offset = to.getOffsetX(from);
int32_t y_offset = to.getOffsetY(from);

Needs to be opposite
C++:
int32_t x_offset = from.getOffsetX(to);
int32_t y_offset = from.getOffsetY(to);

There is a couple places I have found this.
 
Just want to note I did apply these and two of those fixes are opposite and need to be reversed. I believe it is: updateLookDirection and getDirectionTo.
its not first time any "feature" is put on the forum with 20 different commits all scattered around so that people eventually give up and pay someone else to input "few missing" things. e.g aura wings shaders and stuff like that.
 
Back
Top