[Client] Use forceUpdate correctly in LocalPlayer::updateStatsDynamic()

Previously, the forceUpdate argument was useless, preventing dynamic stats from being sent by certain newly created characters.
pull/484/head
David Cernat 6 years ago
parent bfd7c83c4d
commit 17f13872aa

@ -225,16 +225,16 @@ void LocalPlayer::updateStatsDynamic(bool forceUpdate)
|| abs(oldVal.getCurrent() - newVal.getCurrent()) >= limit); || abs(oldVal.getCurrent() - newVal.getCurrent()) >= limit);
}; };
if (needUpdate(oldHealth, health, 2)) if (forceUpdate || needUpdate(oldHealth, health, 2))
statsDynamicIndexChanges.push_back(0); statsDynamicIndexChanges.push_back(0);
if (needUpdate(oldMagicka, magicka, 4)) if (forceUpdate || needUpdate(oldMagicka, magicka, 4))
statsDynamicIndexChanges.push_back(1); statsDynamicIndexChanges.push_back(1);
if (needUpdate(oldFatigue, fatigue, 4)) if (forceUpdate || needUpdate(oldFatigue, fatigue, 4))
statsDynamicIndexChanges.push_back(2); statsDynamicIndexChanges.push_back(2);
if (statsDynamicIndexChanges.size() > 0 || forceUpdate) if (forceUpdate || statsDynamicIndexChanges.size() > 0)
{ {
oldHealth = health; oldHealth = health;
oldMagicka = magicka; oldMagicka = magicka;

Loading…
Cancel
Save