This commit is contained in:
Charles 2001-06-27 18:28:21 +00:00
parent 2c9b448264
commit 14fe98ab08
13 changed files with 71 additions and 22 deletions

View file

@ -42,6 +42,11 @@ void CFXNRGBar::think(int _frames)
CNpcEnemy *P=(CNpcEnemy*)ParentThing;
int Health=P->getHealth();
if ( Health < 0 )
{
Health = 0;
}
CurrentW=((NRGW/MaxHealth)*Health);
int Diff=DrawW-CurrentW;
@ -49,7 +54,8 @@ int Diff=DrawW-CurrentW;
DrawW-=(Diff+1)>>1;
if (DrawW<=0 && Health==0)
{
setToShutdown();
//setToShutdown();
DrawW = 0;
}
}