Add in floating-point support for collision boxes. Remove ceil() calls for transformed view DrawRectDecal and FillRectDecal functions (why are they there?)
This commit is contained in:
@@ -50,7 +50,7 @@ void Pathfinding::Initialize(){
|
||||
sNode&node=nodes[{x,y}];
|
||||
node.x = x; // ...because we give each node its own coordinates
|
||||
node.y = y; // ...because we give each node its own coordinates
|
||||
geom2d::rect<int>tile=game->GetTileCollision(game->GetCurrentLevel(),{float(x*gridSpacing.x),float(y*gridSpacing.y)});
|
||||
geom2d::rect<float>tile=game->GetTileCollision(game->GetCurrentLevel(),{float(x*gridSpacing.x),float(y*gridSpacing.y)});
|
||||
node.bObstacle = tile.pos!=game->NO_COLLISION.pos||tile.size!=game->NO_COLLISION.size;
|
||||
tile=game->GetTileCollision(game->GetCurrentLevel(),{float(x*gridSpacing.x),float(y*gridSpacing.y)},true);
|
||||
node.bObstacleUpper = tile.pos!=game->NO_COLLISION.pos||tile.size!=game->NO_COLLISION.size;
|
||||
|
||||
Reference in New Issue
Block a user