- Fix bug with shadow mapping on cars and backgroundsky

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4545 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 98bcb59ce399002f307ba30570ae9705a4c799a6
Former-commit-id: db9bd656185a45ffc00bf112158bbff7bf638f6b
This commit is contained in:
torcs-ng 2012-02-26 23:36:28 +00:00
parent ea29c4488a
commit c99291023d

View file

@ -200,6 +200,13 @@ grLoadScene(tTrack *track)
GfLogError("No specified track 3D model file\n");
return -1;
}
if (grSkyDomeDistance > 0 && grTrack->skyversion > 0)
{
grBGSky = strcmp(GfParmGetStr(grHandle, GR_SCT_GRAPHIC, GR_ATT_BGSKY, GR_ATT_BGSKY_DISABLED), GR_ATT_BGSKY_ENABLED) == 0;
if (grBGSky)
grLoadBackgroundSky();
}
snprintf(buf, sizeof(buf), "tracks/%s/%s;data/textures;data/img;.", grTrack->category, grTrack->internalname);
ssgTexturePath(buf);
@ -207,14 +214,7 @@ grLoadScene(tTrack *track)
ssgModelPath(buf);
desc = grssgLoadAC3D(acname, NULL);
LandAnchor->addKid(desc);
if (grSkyDomeDistance > 0 && grTrack->skyversion > 0)
{
grBGSky = strcmp(GfParmGetStr(grHandle, GR_SCT_GRAPHIC, GR_ATT_BGSKY, GR_ATT_BGSKY_DISABLED), GR_ATT_BGSKY_ENABLED) == 0;
if (grBGSky)
grLoadBackgroundSky();
}
LandAnchor->addKid(desc);
return 0;
}//grLoadScene