Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1900 in orxonox.OLD for orxonox/trunk/core/world.cc


Ignore:
Timestamp:
May 23, 2004, 11:21:38 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: hardware independant game speed, more shoots, more speed - see mail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/core/world.cc

    r1899 r1900  
    1 
    21
    32/*
     
    232231void World::detectCollision()
    233232{
     233  //cout << "World::detectCollision" << endl;
    234234  float xOff, yOff, zOff, radius;
    235235  npcList* tmpNPC;
     
    263263  /* second: check if any player hits an enemy */
    264264
     265  /*
     266  tmpPlayer = lastPlayer;
     267  while( tmpPlayer != null )
     268    {
     269      tmpNPC = lastNPC;
     270      while( tmpNPC != null )
     271        {
     272          radius = tmpNPC->npc->collisionRadius + tmpPlayer->player->collisionRadius;
     273          xOff = tmpPlayer->player->xCor - tmpNPC->npc->xCor;
     274          yOff = tmpPlayer->player->yCor - tmpNPC->npc->yCor;
     275          zOff = tmpPlayer->player->zCor - tmpNPC->npc->zCor;
     276          if ( sqrt(xOff*xOff + yOff*yOff + zOff*zOff) < radius )
     277            cout << "COLLISION " << endl;
     278         
     279          tmpNPC = tmpNPC->next;
     280        }
     281     
     282      tmpPlayer = tmpPlayer->next;
     283    }
     284 
     285  */
     286
    265287  /* third: check if any enemy shoots a player */
    266288
Note: See TracChangeset for help on using the changeset viewer.