This commit is contained in:
parent
b4c67ab838
commit
395a740e59
15 changed files with 133 additions and 0 deletions
|
@ -229,6 +229,31 @@ void CThingManager::thinkAllThings(int _frames)
|
|||
thing1=thing1->m_nextThing;
|
||||
}
|
||||
|
||||
// Enemy -> Enemy collision
|
||||
thing1=s_thingLists[CThing::TYPE_ENEMY];
|
||||
while(thing1)
|
||||
{
|
||||
thing2=s_thingLists[CThing::TYPE_ENEMY];
|
||||
|
||||
while(thing2)
|
||||
{
|
||||
if ( thing1 != thing2 )
|
||||
{
|
||||
if ( thing1->canCollide() &&
|
||||
thing2->canCollide() &&
|
||||
thing1->checkCollisionAgainst( thing2, _frames ) )
|
||||
{
|
||||
thing1->collidedWith( thing2 );
|
||||
//thing2->collidedWith( thing1 );
|
||||
}
|
||||
}
|
||||
|
||||
thing2 = thing2->m_nextThing;
|
||||
}
|
||||
|
||||
thing1 = thing1->m_nextThing;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue