- // CO_BULLET & CO_BADGUY check
- for(unsigned int i = 0; i < bullets.size(); ++i)
- {
- for(unsigned int j = 0; j < bad_guys.size(); ++j)
- {
- if(bad_guys[j].dying != DYING_NOT)
- continue;
- if(rectcollision(&bullets[i].base, &bad_guys[j].base))
- {
- // We have detected a collision and now call the
- // collision functions of the collided objects.
- // collide with bad_guy first, since bullet_collision will
- // delete the bullet
- bad_guys[j].collision(0, CO_BULLET);
- bullet_collision(&bullets[i], CO_BADGUY);
- break; // bullet is invalid now, so break
- }
- }
- }
+ const TileMap& tilemap = *Sector::current()->solids;
+ return tilemap.get_tile_at(Vector(x, y));
+}