Public feed #2051661

Someone

public cpp v1 · immutable
Raw Edit
·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;}