This commit is contained in:
parent
5fca5c9d64
commit
a3f8004ada
5 changed files with 21 additions and 6 deletions
Binary file not shown.
Binary file not shown.
|
@ -76,8 +76,9 @@ int ThisFrame=CurrentFrame>>BaseData->FrameShift;
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CFXBaseAnim::render()
|
void CFXBaseAnim::render()
|
||||||
{
|
{
|
||||||
DVECTOR RenderPos;
|
if (!HasInit) return;
|
||||||
|
|
||||||
|
DVECTOR RenderPos;
|
||||||
getFXRenderPos(RenderPos);
|
getFXRenderPos(RenderPos);
|
||||||
if (!canRender() || Flags & FX_FLAG_HIDDEN) return;
|
if (!canRender() || Flags & FX_FLAG_HIDDEN) return;
|
||||||
|
|
||||||
|
|
|
@ -30,20 +30,29 @@ CFXBaseAnim::sFXBaseData FXValveBaseData=
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
int TVExplodeVel=8;
|
static const int TVExplodeVel=8;
|
||||||
int TVExplodeCogs=8;
|
static const int TVExplodeCogs=4;
|
||||||
int TVExplodeValves=8;
|
static const int TVExplodeValves=4;
|
||||||
void CFXTVExplode::init(DVECTOR const &Pos)
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CFXTVExplode::init(DVECTOR const &_Pos)
|
||||||
|
{
|
||||||
|
CFX::init(_Pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CFXTVExplode::think(int _frames)
|
||||||
{
|
{
|
||||||
CFX *NewFX;
|
CFX *NewFX;
|
||||||
|
|
||||||
int VelX,VelY;
|
int VelX,VelY;
|
||||||
|
|
||||||
// NewFX=CFX::Create(CFX::FX_TYPE_SMOKE,Pos);
|
|
||||||
NewFX=CFX::Create(CFX::FX_TYPE_SMOKE_PUFF,Pos);
|
NewFX=CFX::Create(CFX::FX_TYPE_SMOKE_PUFF,Pos);
|
||||||
|
NewFX->SetOtPos(1);
|
||||||
|
|
||||||
NewFX=CFX::Create(CFX::FX_TYPE_EXPLODE,Pos);
|
NewFX=CFX::Create(CFX::FX_TYPE_EXPLODE,Pos);
|
||||||
((CFXBaseAnim*)NewFX)->SetScale(ONE*2);
|
((CFXBaseAnim*)NewFX)->SetScale(ONE*2);
|
||||||
|
NewFX->SetOtPos(1);
|
||||||
|
|
||||||
|
|
||||||
for (int i=0;i<TVExplodeCogs; i++)
|
for (int i=0;i<TVExplodeCogs; i++)
|
||||||
|
@ -53,6 +62,7 @@ int VelX,VelY;
|
||||||
VelX=getRndRange(TVExplodeVel*2)-TVExplodeVel;
|
VelX=getRndRange(TVExplodeVel*2)-TVExplodeVel;
|
||||||
VelY=-getRndRange(TVExplodeVel);
|
VelY=-getRndRange(TVExplodeVel);
|
||||||
NewFX->setVelocity(VelX,VelY);
|
NewFX->setVelocity(VelX,VelY);
|
||||||
|
NewFX->SetOtPos(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0;i<TVExplodeValves; i++)
|
for (int i=0;i<TVExplodeValves; i++)
|
||||||
|
@ -62,7 +72,9 @@ int VelX,VelY;
|
||||||
VelX=getRndRange(TVExplodeVel*2)-TVExplodeVel;
|
VelX=getRndRange(TVExplodeVel*2)-TVExplodeVel;
|
||||||
VelY=-getRndRange(TVExplodeVel);
|
VelY=-getRndRange(TVExplodeVel);
|
||||||
NewFX->setVelocity(VelX,VelY);
|
NewFX->setVelocity(VelX,VelY);
|
||||||
|
NewFX->SetOtPos(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
killFX();
|
killFX();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ class CFXTVExplode : public CFX
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void init(DVECTOR const &Pos);
|
void init(DVECTOR const &Pos);
|
||||||
|
void think(int _frames);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue