I’ve been fighting an issue for 2 days and I don’t know how to fix it, and tbh I don’t even know what causes the issue and I’d appreciate some explanations about what’s going on.
When my ability is locally predicted (Cost GE included) the AttributeChange delegate fires 3 times :
- client GE cost called → applies let’s say -10 energy (1st call)
- prediction key caught up message
- energy is restored (2nd call)
- then server cost is forced on client → removes 10 energy again (3rd call).
This behavior makes me think that client is corrected although value is correct ; and it may be due to the fact that
Ability X caught up to PredictionKey but instance is still active and in predicting state.
When not predicting the ability, no issue, delegate is fired once.
In any case, damage is not predicted and Health delegate only fires once.
I’m using 4.26 with spatialOS
I don’t get why the delegate fires multiple times the set/unset/reset the value while my OnRep_Energy change is called only once.
And I don’t get why my ability is still in predicting state (message is consistent).
Any ideas ?