- bugfix for observers to see water effects

This commit is contained in:
Mark Vejvoda 2011-01-27 22:17:31 +00:00
parent ab7cf4d22b
commit 1c558abef0

View File

@ -2652,7 +2652,13 @@ void Renderer::renderWaterEffects(){
//render only if visible
Vec2i intPos= Vec2i(static_cast<int>(ws->getPos().x), static_cast<int>(ws->getPos().y));
const Vec2i &mapPos = Map::toSurfCoords(intPos);
if(map->getSurfaceCell(mapPos)->isVisible(world->getThisTeamIndex())){
bool visible = map->getSurfaceCell(mapPos)->isVisible(world->getThisTeamIndex());
if(visible == false && world->showWorldForPlayer(world->getThisFactionIndex()) == true) {
visible = true;
}
if(visible == true) {
float scale= ws->getAnim()*ws->getSize();