decore_torchflame: animation added

This commit is contained in:
Marco Cawthorne 2022-07-23 08:51:55 -07:00
parent 9656d9dff7
commit 898bc490c5
Signed by: eukara
GPG key ID: CE2032F0A2882A22

View file

@ -29,8 +29,20 @@ class decore_torchflame:RWDecore
void(void) decore_torchflame; void(void) decore_torchflame;
virtual void(void) Respawn; virtual void(void) Respawn;
virtual void(void) UpdateFrame;
}; };
void
decore_torchflame:: UpdateFrame(void)
{
frame++;
if (frame > 22)
frame = 0;
nextthink = time + 0.1f;
}
void void
decore_torchflame::Respawn(void) decore_torchflame::Respawn(void)
{ {
@ -39,6 +51,8 @@ decore_torchflame::Respawn(void)
SetRenderMode(RM_ADDITIVE); SetRenderMode(RM_ADDITIVE);
SetRenderColor([1,1,1]); SetRenderColor([1,1,1]);
SetRenderAmt(1.0f); SetRenderAmt(1.0f);
think = UpdateFrame;
nextthink = time + 0.1f;
} }
void void