OnPlayerTakeDamage reliability issue
#5

Quote:
Originally Posted by CuervO
Посмотреть сообщение
I have a scripted health system and I do round down values of HP unless weapons used are not those where the damage is below 1. Just in case, but it's great to know this.
Exactly, just round up the health and it'll match.

pawn Код:
new iHealth = 1.0, iHealthEx, Float: fHealth = 1.4;

iHealthEx = floatround(fHealth, floatround_round);

if(iHealth != iHealthEx) { return false; } // It doesn't match
else if(iHealth == iHealthEx) { return true; } // It does match
Reply


Messages In This Thread
OnPlayerTakeDamage reliability issue - by Zhao - 22.01.2014, 14:32
Re: OnPlayerTakeDamage reliability issue - by Kalcor - 22.01.2014, 15:02
Re: OnPlayerTakeDamage reliability issue - by Zhao - 22.01.2014, 19:33
Re: OnPlayerTakeDamage reliability issue - by CuervO - 22.01.2014, 22:51
Re: OnPlayerTakeDamage reliability issue - by ViruZz - 24.01.2014, 13:29

Forum Jump:


Users browsing this thread: 1 Guest(s)