diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2009-07-21 02:36:56 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2009-07-21 02:36:56 +0400 |
commit | 01b787636b468a1d37a27bb7601de5b0dea9c4b0 (patch) | |
tree | e9a71b270b1d6d4c58099303c83c5cdec880e148 /source/blender/blenloader/intern/readfile.c | |
parent | a3366cb8f03b2bd5d050c61ba794acb939e75f05 (diff) |
fix for recent stereo changes+tweaks
(it's the 3rd commit in a row. But as they say, the 3rd is always a charm ;)
I still think we have a little mess with the DEFINE parameters in BGE (as in RAS_IRasterizer::StereoMode).
We used to have them duplicated and hardcoded in 2.4xx, but I think we can do it in another way now.
(I didn't change gameplayer, but I can do it once we have it linking and building properly)
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 46db4109440..f258746dafe 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9214,6 +9214,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* TODO: should be moved into one of the version blocks once this branch moves to trunk and we can bump the version (or sub-version.) */ { + World *wo; Object *ob; Material *ma; Scene *sce; @@ -9347,7 +9348,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) sce->gm.stereomode = STEREO_ANAGLYPH; } else - sce->gm.stereoflag = STEREO_ENABLE; + sce->gm.stereoflag = STEREO_ENABLED; //Framing sce->gm.framing = sce->framing; @@ -9357,16 +9358,17 @@ static void do_versions(FileData *fd, Library *lib, Main *main) sce->gm.depth= sce->r.depth; //Physic (previously stored in world) - if (0){ -// if (sce->world){ // XXX I think we need to run lib_link_all() before do_version() - sce->gm.gravity = sce->world->gravity; - sce->gm.physicsEngine= sce->world->physicsEngine; - sce->gm.mode = sce->world->mode; - sce->gm.occlusionRes = sce->world->occlusionRes; - sce->gm.ticrate = sce->world->ticrate; - sce->gm.maxlogicstep = sce->world->maxlogicstep; - sce->gm.physubstep = sce->world->physubstep; - sce->gm.maxphystep = sce->world->maxphystep; + //temporarily getting the correct world address + wo = newlibadr(fd, sce->id.lib, sce->world); + if (wo){ + sce->gm.gravity = wo->gravity; + sce->gm.physicsEngine= wo->physicsEngine; + sce->gm.mode = wo->mode; + sce->gm.occlusionRes = wo->occlusionRes; + sce->gm.ticrate = wo->ticrate; + sce->gm.maxlogicstep = wo->maxlogicstep; + sce->gm.physubstep = wo->physubstep; + sce->gm.maxphystep = wo->maxphystep; } else{ sce->gm.gravity =9.8f; |