• 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!

center creature img

GhostWD

I'm in love with the var_dump()
Joined
Jan 25, 2009
Messages
185
Solutions
6
Reaction score
29
Hello OTClienters,
I was looking for this feature and I found anything about that, could someone point me where I can make it? tile.cpp or what? editing compiling and checking if it's that what i'm looking for is hard for me because of my slow pc...
Thank You!
 
Hello.
In creature.cpp this:
C++:
internalDrawOutfit(dest + animationOffset * scaleFactor, scaleFactor, animate, animate, m_direction);
m_footStepDrawn = true;
To this:
C++:
int exactSize;
if (m_outfit.getCategory() == ThingCategoryCreature)
exactSize = getExactSize();
else
exactSize = g_things.rawGetThingType(m_outfit.getAuxId(), m_outfit.getCategory())->getExactSize();
internalDrawOutfit(dest + ((animationOffset + Point((exactSize - 32) / 2, 0))) * scaleFactor, scaleFactor, animate, animate, m_direction);
m_footStepDrawn = true;
 
Any idea on how to set the sprite to be behind all outfit sprites that are to the right during both standing and walking?
 
I've created a topic in 2014 on github:
Centered outfit · Issue #562 · edubart/otclient · GitHub
There you can see hrsantiado's helpful post.

If you will understand how the tiles are ordered for drawing you can change it and do things like ground effects and ofc. fix centered outfit drawing:
GRXpHmbA.png
 
Thanks for your feedback.
I've accomplish this by loop through drawing two times as hrsantido suggests. It should not increase the cpu usage too much because the loop itself (and discovery of every tile) is not very memory demanding.
When I was working on this I've encountered funny situations :D
GTUuneD9dQD8unP1g8P0IyPw.png


Pz8fP2ounPwB5Pz8unPwZOVQ.png
 
Last edited:
Back
Top