This commit is contained in:
Charles 2001-06-08 14:05:48 +00:00
parent 01fca54fb1
commit 24dc221b50
3 changed files with 24 additions and 1 deletions

View File

@ -183,13 +183,13 @@ void CBasePickup::collidedWith(CThing *_thisThing)
switch(_thisThing->getThingType()) switch(_thisThing->getThingType())
{ {
case TYPE_PLAYER: case TYPE_PLAYER:
case TYPE_NPC:
collect((CPlayer*)_thisThing); collect((CPlayer*)_thisThing);
CSoundMediator::playSfx(sfxToPlayWhenCollected()); CSoundMediator::playSfx(sfxToPlayWhenCollected());
break; break;
default: default:
ASSERT(0); ASSERT(0);
case TYPE_NPC:
break; break;
} }
} }

View File

@ -130,6 +130,28 @@ void CKelpTokenPickup::renderPickup(DVECTOR *_pos)
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS); sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
} }
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CKelpTokenPickup::collidedWith(CThing *_thisThing)
{
switch(_thisThing->getThingType())
{
case TYPE_PLAYER:
case TYPE_NPC:
collect((CPlayer*)_thisThing);
CSoundMediator::playSfx(sfxToPlayWhenCollected());
break;
default:
ASSERT(0);
break;
}
}
/*=========================================================================== /*===========================================================================
end */ end */

View File

@ -45,6 +45,7 @@ public:
void setTokenNumber(int _number) {m_tokenNumber=_number;} void setTokenNumber(int _number) {m_tokenNumber=_number;}
protected: protected:
virtual void collidedWith(CThing *_thisThing);
virtual void renderPickup(DVECTOR *_pos); virtual void renderPickup(DVECTOR *_pos);
private: private: