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

Broken effects drawing.

Strange. I don't have that issue. Trying several ways and CAN'T reproduce this error.
The only thing that I changed in my 'project' is extending magic effects variable to uint32 because there is an limit of effects by default.
I changed it server-side and client-side. Idk if this can help but you can guys try that.
So... as I said above, I f***ing can't reproduce this glitch o_O .
 
Strange. I don't have that issue. Trying several ways and CAN'T reproduce this error.
The only thing that I changed in my 'project' is extending magic effects variable to uint32 because there is an limit of effects by default.
I changed it server-side and client-side. Idk if this can help but you can guys try that.
So... as I said above, I f***ing can't reproduce this glitch o_O .
Even if you just use command !z 53 and start moving? :eek:

Found the reason. It's about patterns, however I have no idea how they are supposed to work, right now patterns are based on offset (players distance to effect). So this glitch happens only to effects with patterns (and when offset % patterns != 0). If we force patternX and patternY to 0 then effect is rendered properly.
 
Last edited:
Found the reason. It's about patterns, however I have no idea how they are supposed to work, right now patterns are based on offset (players distance to effect). So this glitch happens only to effects with patterns (and when offset % patterns != 0). If we force patternX and patternY to 0 then effect is rendered properly.

It might be broken then. The pattern calculation should not be based on offset from player position since the position changes while moving and a different pattern will simply "jump in" with previous animation phase. It should rather be based on its own global position (like certain items such as grounds or pavements). The code responsible for it is here:


So try to change:

C++:
int xPattern = offsetX % getNumPatternX();
if(xPattern < 0)
    xPattern += getNumPatternX();

int yPattern = offsetY % getNumPatternY();
if(yPattern < 0)
    yPattern += getNumPatternY();

To:

C++:
int xPattern = m_position.x % getNumPatternX();
int yPattern = m_position.y % getNumPatternY();

I am unsure about the implications of such approach and whether the author who coded it that way perhaps had something else in mind.
 
It might be broken then. The pattern calculation should not be based on offset from player position since the position changes while moving and a different pattern will simply "jump in" with previous animation phase. It should rather be based on its own global position (like certain items such as grounds or pavements). The code responsible for it is here:


So try to change:

C++:
int xPattern = offsetX % getNumPatternX();
if(xPattern < 0)
    xPattern += getNumPatternX();

int yPattern = offsetY % getNumPatternY();
if(yPattern < 0)
    yPattern += getNumPatternY();

To:

C++:
int xPattern = m_position.x % getNumPatternX();
int yPattern = m_position.y % getNumPatternY();

I am unsure about the implications of such approach and whether the author who coded it that way perhaps had something else in mind.
So patterns are supposed to be based on world position, interesting.
 
Last edited:
They should be based on position where effects are released - when creature "casted/placed" effects on position where spell was released.
It should be good now with Iryont fix, even with addEvent's.
 
So patterns are supposed to be based on players position, interesting.

It is actually quite normal, but not on player position, but its own position (m_position from Thing class). I'm unsure why effects were done that way in OTClient (with an offset). You can check how items are drawn if they have specific pattern based on position:

 
It is actually quite normal, but not on player position, but its own position (m_position from Thing class). I'm unsure why effects were done that way in OTClient (with an offset). You can check how items are drawn if they have specific pattern based on position:

Honestly if we are talking about "how did this end like this" then
I don't even know for how long this is a thing 😂 😂
 
What you can set uniqueID and actionID through client o_O
for what is that thing for 🤔
 
What you can set uniqueID and actionID through client o_O
for what is that thing for 🤔
Whatever you want, I have used this for items tooltip, lost few hours while doing so because of such silly thing...
 
Effects used to be drawn like this and that's also the reason for the implementation.

Items can have action and unique ids since OTC can be used as a framework for other tools.
 
It worked the same way in older CipSoft clients, I can confirm that for 8.6 in particular, maybe that's why it was implemented in this way. However, I was never really a fan of it and wouldn't mind if OTC didn't follow that trend.
 
oh shiet, didnt see its from 2020! <.<
 
Back
Top