DoctorGester / crumbling-island-arena

63 stars 17 forks source link

Hiding some heroes doesn't hide their attached particles #374

Open vocalpocal opened 6 years ago

vocalpocal commented 6 years ago

When I started making my Tagteam mode, I noticed some weird behavior with modifier particles on certain heroes. The idea of Tagteam mode is that one of the two selecter heroes is hidden when the other is active, which made me realize some weird stuff on heroes with cosmetic ambient effects only.

When Hiding heroes such as Ember, WR and Tusk (all have particle effects on their items), all applied modifier particles stay visible - Such as Cold Snap rune modifier effect. This wasn't the case with heroes such as QoP who have no particle effects bound in their items. Interestingly enough SF who has some ambient particles didn't follow this behaviour. I guess they need to be attached in some certain manner.

Right now in game you can see this in Tusk Snowball, where his tiny hat tuft is visible even when he is snowballing, among ColdSnap rune and his M1 charge effect, as well as Zeus' with his eyes when he is casting R.

DoctorGester commented 6 years ago

This correlates with DrawParticlesWhileHidden flag in hero txt files. To 'fix' this you need to call hero:DestroyAllVisuals() and then hero:RecreateAllVisuals() like done in zeus_r. So basically this is "by design". I thought tusk hat thingy wasn't visible enough to remove his particles. Zeus eyes should have been fixed a while ago, if they are still there then they are bugged. Rune effect is a different thing though and removing it would take additional code.

vocalpocal commented 6 years ago

Ooh I see. I am not entirely sure but this might be a tiny lead for fixing #324