1
This commit is contained in:
parent
707729778e
commit
861848b946
@ -236,6 +236,9 @@ void Bullet::ProcSmokeBomb()
|
||||
|
||||
bool Bullet::IsBomb()
|
||||
{
|
||||
if (!meta) {
|
||||
return false;
|
||||
}
|
||||
return
|
||||
meta->i->_inventory_slot() == IS_RPG ||
|
||||
meta->i->_inventory_slot() == IS_FRAG ||
|
||||
|
@ -84,6 +84,18 @@ void GridService::GetAllCellsByXy(Room* room, int x, int y, std::set<GridCell*>&
|
||||
|
||||
bool GridService::CanAdd(float x, float y)
|
||||
{
|
||||
if (x < 0) {
|
||||
return false;
|
||||
}
|
||||
if (y < 0) {
|
||||
return false;
|
||||
}
|
||||
if (x > map_width_) {
|
||||
return false;
|
||||
}
|
||||
if (y > map_height_) {
|
||||
return false;
|
||||
}
|
||||
int new_x = (int)x + cell_width_;
|
||||
int new_y = (int)x + cell_width_;
|
||||
return !BroderOverFlow(new_x, new_y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user