Fix PCs allowed to step sideways onto giants' legs
This commit is contained in:
@@ -323,9 +323,11 @@ int cCreature::get_level() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool cCreature::on_space(location loc) const {
|
bool cCreature::on_space(location loc) const {
|
||||||
if(loc.x - cur_loc.x >= 0 && loc.x - cur_loc.x <= x_width - 1 &&
|
for(int x = cur_loc.x; x < cur_loc.x + x_width; ++x){
|
||||||
loc.y - cur_loc.y >= 0 && loc.y - cur_loc.y <= y_width - 1)
|
for(int y = cur_loc.y; y < cur_loc.y + y_width; ++y){
|
||||||
return true;
|
if(loc.x == x && loc.y == y) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user