Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] Refill Costs Money
Re: [SSGM 4.0 Plugin] Refill Costs Money [message #471422 is a reply to message #471418] Thu, 12 July 2012 07:25 Go to previous messageGo to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
It calculates the percentage of the HP you lost as fraction of your max HP, where HP is health + shield strength. Which is then multiplied with the preset cost and the base power multiplier. Then it's multiplied with the fraction of that cost you want to make the refill cost.

Your right, it would, but internally that part of the calculation gets converted to integer (so everything below 1 is rounded to 0) before I use it as floating point, so the issue doesn't occur (otherwise I can test for MaxHP == CurrentHP).

Your formula does the same thing as mine but accounts for that.


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Thu, 12 July 2012 07:35]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [4.1 Sidebar] Mauler's Renegade Sidebar
Next Topic: [SSGM 4.0 Plugin] GameSpy Support
Goto Forum:
  


Current Time: Mon Dec 02 10:29:19 MST 2024

Total time taken to generate the page: 0.00908 seconds