All pastes #2051661 Raw Edit

Someone

public cpp v1 · immutable
#2051661 ·published 2011-04-28 18:31 UTC
rendered paste body
float PercHealth (int current, string shipName, int healthType){	ship myShip=LoadShip(shipName);	float fcurrent = current;	float fpoints;	if(healthType==1)		fpoints = myShip.shieldHitPoints;	else if(healthType==2)		fpoints = myShip.armorHitPoints;	else if(healthType==3)		fpoints = myShip.hullHitPoints;			return (fcurrent/fpoints) * 100;}