Only show shadow BELOW current piece

This commit is contained in:
zvon 2020-09-11 11:47:24 +02:00
parent 625e7866a4
commit a10f3cf47e

View File

@ -746,7 +746,8 @@ void updateShadow(SDLPP::Scene &scene) {
auto colY = col->getPos().second;
if(std::find(invalid_objects.begin(), invalid_objects.end(), col) != invalid_objects.end())
continue;
if(colY - curY < shadow_drop)
auto possible_drop = colY - curY;
if(possible_drop < shadow_drop && possible_drop >= 0)
shadow_drop = colY - curY;
}
}