10 / 100 * 255 = 0

When a player dont have full life, he is on ground with 0 HP ;)
This commit is contained in:
SouNourS 2018-02-22 16:02:16 +01:00
parent 599d767598
commit d34817c5a8
2 changed files with 3 additions and 2 deletions

View file

@ -15,8 +15,8 @@ class AvatarConverter extends ObjectCreateConverter[Player]() {
Success(
CharacterData(
MakeAppearanceData(obj),
obj.Health / obj.MaxHealth * 255, //TODO not precise
if(MaxArmor == 0) { 0 } else { obj.Armor / MaxArmor * 255 }, //TODO not precise
255 * obj.Health / obj.MaxHealth, //TODO not precise
if(MaxArmor == 0) { 0 } else { 255 * obj.Armor / MaxArmor }, //TODO not precise
DressBattleRank(obj),
DressCommandRank(obj),
recursiveMakeImplantEffects(obj.Implants.iterator),