OsgCar.cpp: Do not create SDCarShader on "none" shaders
Even if "none" shaders were selected, the game would still parse car.frag and execute the shaders, which is not the expected behaviour.
This commit is contained in:
parent
e8d92ca8be
commit
e0b766bc6e
1 changed files with 2 additions and 1 deletions
|
@ -644,7 +644,8 @@ osg::ref_ptr<osg::Node> SDCar::loadCar(tCarElt *Car, bool tracktype, bool subcat
|
||||||
else
|
else
|
||||||
this->reflectionMappingMethod = REFLECTIONMAPPING_OFF;
|
this->reflectionMappingMethod = REFLECTIONMAPPING_OFF;
|
||||||
|
|
||||||
this->shader = new SDCarShader(car_shaded_body.get(), this);
|
if (_carShader > 0)
|
||||||
|
this->shader = new SDCarShader(car_shaded_body.get(), this);
|
||||||
|
|
||||||
this->reflectionMapping = new SDReflectionMapping(this);
|
this->reflectionMapping = new SDReflectionMapping(this);
|
||||||
this->setReflectionMap(this->reflectionMapping->getReflectionMap());
|
this->setReflectionMap(this->reflectionMapping->getReflectionMap());
|
||||||
|
|
Loading…
Reference in a new issue