This commit is contained in:
parent
e04f52731f
commit
9e55dc3eb2
2 changed files with 17 additions and 0 deletions
|
@ -183,6 +183,7 @@ 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;
|
||||||
|
|
|
@ -488,6 +488,22 @@ DVECTOR const &CamPos=CLevel::getCameraPos();
|
||||||
thing1=thing1->m_nextCollisionThing;
|
thing1=thing1->m_nextCollisionThing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Friend -> Pickup collision
|
||||||
|
thing1=s_CollisionLists[CThing::TYPE_PICKUP];
|
||||||
|
while(thing1)
|
||||||
|
{
|
||||||
|
thing2=s_CollisionLists[CThing::TYPE_NPC];
|
||||||
|
while(thing2)
|
||||||
|
{
|
||||||
|
if(thing1->checkCollisionAgainst(thing2, _frames))
|
||||||
|
{
|
||||||
|
thing1->collidedWith(thing2);
|
||||||
|
}
|
||||||
|
thing2=thing2->m_nextCollisionThing;
|
||||||
|
}
|
||||||
|
thing1=thing1->m_nextCollisionThing;
|
||||||
|
}
|
||||||
|
|
||||||
// Player -> Enemy collision
|
// Player -> Enemy collision
|
||||||
thing1=s_CollisionLists[CThing::TYPE_ENEMY];
|
thing1=s_CollisionLists[CThing::TYPE_ENEMY];
|
||||||
while(thing1)
|
while(thing1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue