This commit is contained in:
parent
be9da24743
commit
d9f745fd8b
@ -30,6 +30,10 @@
|
||||
#include "friend\fgary.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PICKUPS_PICKUP_H__
|
||||
#include "pickups\pickup.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
@ -54,6 +58,19 @@
|
||||
---- */
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CGaryStopTrigger::init()
|
||||
{
|
||||
CTrigger::init();
|
||||
|
||||
m_dropped = false;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
@ -71,6 +88,19 @@ void CGaryStopTrigger::collidedWith(CThing *_thisThing)
|
||||
CNpcGaryFriend *gary = (CNpcGaryFriend *) _thisThing;
|
||||
|
||||
gary->stop();
|
||||
|
||||
if ( !m_dropped )
|
||||
{
|
||||
if ( GameScene.getChapterNumber() != 6 )
|
||||
{
|
||||
DVECTOR newPos = Pos;
|
||||
newPos.vy -= 8;
|
||||
|
||||
createPickup(PICKUP__LIFE,&newPos);
|
||||
}
|
||||
|
||||
m_dropped = true;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -36,8 +36,12 @@
|
||||
|
||||
class CGaryStopTrigger : public CTrigger
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
protected:
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
void collidedWith(CThing *_thisThing);
|
||||
|
||||
u8 m_dropped;
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user