diff --git a/source/pickups/pickup.cpp b/source/pickups/pickup.cpp index 3cb8d9684..44e6e8a97 100644 --- a/source/pickups/pickup.cpp +++ b/source/pickups/pickup.cpp @@ -183,13 +183,13 @@ void CBasePickup::collidedWith(CThing *_thisThing) switch(_thisThing->getThingType()) { case TYPE_PLAYER: - case TYPE_NPC: collect((CPlayer*)_thisThing); CSoundMediator::playSfx(sfxToPlayWhenCollected()); break; default: ASSERT(0); + case TYPE_NPC: break; } } diff --git a/source/pickups/pkelp.cpp b/source/pickups/pkelp.cpp index 3ece84ff5..97f77352a 100644 --- a/source/pickups/pkelp.cpp +++ b/source/pickups/pkelp.cpp @@ -130,6 +130,28 @@ void CKelpTokenPickup::renderPickup(DVECTOR *_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 */ diff --git a/source/pickups/pkelp.h b/source/pickups/pkelp.h index ed53719e9..ac906f843 100644 --- a/source/pickups/pkelp.h +++ b/source/pickups/pkelp.h @@ -45,6 +45,7 @@ public: void setTokenNumber(int _number) {m_tokenNumber=_number;} protected: + virtual void collidedWith(CThing *_thisThing); virtual void renderPickup(DVECTOR *_pos); private: