This commit is contained in:
parent
bcc448ecca
commit
edc12f1ab1
2 changed files with 24 additions and 7 deletions
|
@ -41,13 +41,10 @@ bool hasParent=getFXParentPos(Pos);
|
|||
|
||||
/*****************************************************************************/
|
||||
CFXBaseTrail::sList &CFXBaseTrail::moveHead()
|
||||
{
|
||||
if ( !( Flags & FX_FLAG_HIDDEN ) )
|
||||
{
|
||||
HeadIdx--;
|
||||
if (HeadIdx<0) HeadIdx+=LIST_SIZE;
|
||||
if (ListCount<LIST_SIZE) ListCount++;
|
||||
}
|
||||
|
||||
return(List[HeadIdx]);
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "enemy\npc.h"
|
||||
#endif
|
||||
|
||||
#include "fx\fxsteam.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -32,14 +33,33 @@ void CSteamSwitchEmitterTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
|
|||
|
||||
m_effect = CFX::Create( CFX::FX_TYPE_STEAM, Pos );
|
||||
m_active = true;
|
||||
|
||||
CFXSteam *steam = (CFXSteam *) m_effect;
|
||||
DVECTOR velocity;
|
||||
velocity.vx = 0;
|
||||
velocity.vy = -1;
|
||||
steam->SetVel( velocity );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CSteamSwitchEmitterTrigger::toggleVisible()
|
||||
{
|
||||
m_effect->toggleVisible();
|
||||
m_active = !m_active;
|
||||
|
||||
CFXSteam *steam = (CFXSteam *) m_effect;
|
||||
DVECTOR velocity;
|
||||
velocity.vx = 0;
|
||||
velocity.vy = -4 * m_active;
|
||||
if ( m_active )
|
||||
{
|
||||
steam->SetSize( 4 * ONE );
|
||||
}
|
||||
else
|
||||
{
|
||||
steam->SetSize( ONE );
|
||||
}
|
||||
steam->SetVel( velocity );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue