mpstark / DynamicCam

A more dynamic camera for World of Warcraft.
MIT License
22 stars 11 forks source link

The addon doesn't always detect the situation of the character #64

Closed Darkhibaris closed 1 year ago

Darkhibaris commented 1 year ago

Version: DynamicCam-2.0.0.zip

Hi,

When I change the location/situation (ex. mount/dismount), the addon often doesn't detect it. (Situations settings) --> The configuration of the situation that I have made is therefore not carried out. bug_situation_tracking_1 bug_situation_tracking_2

(Sometimes, it works.) bug_situation_tracking_3

I have no error message.

LudiusMaximus commented 1 year ago

Hm, I cannot reproduce this.

It looks like your are changing into being mounted without the game event "SPELL_UPDATE_USABLE" or "UNIT_AURA" being fired. These are the two events at which DynamicCam checks if the condition for the Mounted situation is fulfilled.

Maybe you could open the event trace window (typing /eventtrace into the console) and check which events get fired when you mount up and when it is not detected by DynamicCam? Thanks

Darkhibaris commented 1 year ago

The problem seems to happen when they are some players in the area.

I spammed "mount/dismount" and there it is. eventtrace

I tried on a moutain, far away from players and it worked everytime. eventtrace2

LudiusMaximus commented 1 year ago

Thank you very much for your investigations!

This looks interesting. In both cases, UNIT_AURA and SPELL_UPDATE_USABLE are fired. But in the first case (situation not detected) these events come after the PLAYER_MOUNT_DISPLAY_CHANGED event and not before. Maybe the IsMounted() condition is only evaluated to true after the PLAYER_MOUNT_DISPLAY_CHANGED event.

I just tried using PLAYER_MOUNT_DISPLAY_CHANGED as the only event for the "Mounted" situation. And it seems to work just fine. Maybe you want to try this too and check if your problem still persists?

Darkhibaris commented 1 year ago

No problem :)

How do I do that?

LudiusMaximus commented 1 year ago

image

Darkhibaris commented 1 year ago

It worked indeed. Thank you! Maybe I should do this for all situations, because the addon doesn't detect the other. image

Darkhibaris commented 1 year ago

Nevermind, it's seems it's because some are desactivated by default. :)

LudiusMaximus commented 1 year ago

Glad it works now! I will make PLAYER_MOUNT_DISPLAY_CHANGED the default event for the "Mounted" situation in the next release.

If you find other situations that are not recognised, please let me know.