From f17bd7703021bda5fe028021c6df7196f4a86fa8 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Sat, 5 Feb 2022 15:21:39 +0000 Subject: [PATCH] WS30: Better water detection --- simgear/scene/material/matlib.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/simgear/scene/material/matlib.cxx b/simgear/scene/material/matlib.cxx index 02ec3d44..bd2179b5 100644 --- a/simgear/scene/material/matlib.cxx +++ b/simgear/scene/material/matlib.cxx @@ -426,8 +426,7 @@ SGMaterialCache::Atlas SGMaterialLib::getMaterialTextureAtlas(SGVec2f center, co atlas.materialParams2->setElement(materialLookupIndex, osg::Vec4f(mat->get_parameter("dot_density"), mat->get_parameter("dot_size"), mat->get_parameter("dust_resistance"), mat->get_parameter("rock_strata"))); float water = 0.0; - if (mat->get_effect_name() == "Effects/water") { - SG_LOG(SG_GENERAL, SG_ALERT, " Found water effect " << mat->get_names()[0]); + if (atlas.waterAtlas[landclass]) { water = 1.0; }