mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 10:53:51 +00:00
Clean up handling of stat packets on client, part 2
This commit is contained in:
parent
25026a9b95
commit
6ae4cc15e4
1 changed files with 5 additions and 6 deletions
|
@ -357,12 +357,11 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
|
||||||
MWMechanics::CreatureStats *ptrCreatureStats = &ptrPlayer.getClass().getCreatureStats(ptrPlayer);
|
MWMechanics::CreatureStats *ptrCreatureStats = &ptrPlayer.getClass().getCreatureStats(ptrPlayer);
|
||||||
MWMechanics::DynamicStat<float> value;
|
MWMechanics::DynamicStat<float> value;
|
||||||
|
|
||||||
value.readState(pl->CreatureStats()->mDynamic[0]);
|
for (int i = 0; i < 3; ++i)
|
||||||
ptrCreatureStats->setHealth(value);
|
{
|
||||||
value.readState(pl->CreatureStats()->mDynamic[1]);
|
value.readState(pl->CreatureStats()->mDynamic[i]);
|
||||||
ptrCreatureStats->setMagicka(value);
|
ptrCreatureStats->setDynamic(i, value);
|
||||||
value.readState(pl->CreatureStats()->mDynamic[2]);
|
}
|
||||||
ptrCreatureStats->setFatigue(value);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue