GameObject's OnAdded is being executed before spawn notification
cabeca1143 opened this issue · 1 comments
This results in client's not being properly notified by a few things, such as some particles, minimap icons and animation pauses applied by CharScripts.
There is a workaround, that is to delay changes by a single tick in OnUpdate, or make a manual Spawn Notification (resulting in 2 spawn notifications), but both are far from optimal.
A similar issue is spawning an unit and start making changes to it right after. Same thing, since the unit wasn't notified yet, the client wont be properly notified. You'd have to use one of the workarounds stated above.
I believe that ideally, a spawn notification should be made instantly on creation for all objects, or at least have the option to do so.
Possibly partially implemented:
GameServer/GameServerLib/ObjectManager.cs
Line 140 in b18de15