This commit is contained in:
Charles 2001-07-13 20:17:16 +00:00
parent be9da24743
commit d9f745fd8b
2 changed files with 35 additions and 1 deletions

View File

@ -30,6 +30,10 @@
#include "friend\fgary.h" #include "friend\fgary.h"
#endif #endif
#ifndef __PICKUPS_PICKUP_H__
#include "pickups\pickup.h"
#endif
/* Std Lib /* Std Lib
------- */ ------- */
@ -54,6 +58,19 @@
---- */ ---- */
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CGaryStopTrigger::init()
{
CTrigger::init();
m_dropped = false;
}
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
Function: Function:
Purpose: Purpose:
@ -71,6 +88,19 @@ void CGaryStopTrigger::collidedWith(CThing *_thisThing)
CNpcGaryFriend *gary = (CNpcGaryFriend *) _thisThing; CNpcGaryFriend *gary = (CNpcGaryFriend *) _thisThing;
gary->stop(); gary->stop();
if ( !m_dropped )
{
if ( GameScene.getChapterNumber() != 6 )
{
DVECTOR newPos = Pos;
newPos.vy -= 8;
createPickup(PICKUP__LIFE,&newPos);
}
m_dropped = true;
}
} }
break; break;

View File

@ -36,8 +36,12 @@
class CGaryStopTrigger : public CTrigger class CGaryStopTrigger : public CTrigger
{ {
public:
void init();
protected: protected:
virtual void collidedWith(CThing *_thisThing); void collidedWith(CThing *_thisThing);
u8 m_dropped;
}; };
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------