Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(302)

Issue 4991047: bgefix for [#28167] Restart game actuator don't get changed material mode (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by dfelinto
Modified:
12 years, 5 months ago
Reviewers:
benoit.bolsee, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

http://projects.blender.org/tracker/?func=detail&aid=28167&group_id=9&atid=306 Game Actuator (restart or load a new file) will not keep some settings alive (as we had in 2.49). In 2.49 the solution used was to use Blender globals (G.fileflags) to get/set those settings. That was causing the blender file to change if you change the material mode from the game. In 2.5 this never worked, and the implementation was buggy (it's relying in the scene settings, which get reset ever time we restart/load a new file). My idea for fixing this is to create a new struct (GlobalSettings) where we store any setting to be preserver during the course of the game. This is specially important for options that require the game to restart/load new file (graphic ones). But it later can be expanded to support other things such as audio settings (e.g. volume), ... I'm also planning to expand it for stereo and dome settings, but I prefer to first get this committed and then build a new patch on top of that. I had some problems in finding a correct way for build/link the blenderplayer changes, so although it's working I'm not sure this is the best code (e.g. I couldn't make forward declaration to work in GPG_Application.h for the struct GlobalSettings so I ended up including KX_KetsjiEngine.h)

Patch Set 1 #

Patch Set 2 : Patch finished - I fixed the bplayer (Benoit adding you as reviewer Brecht already gave the go here) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -26 lines) Patch
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp View 1 4 chunks +12 lines, -3 lines 0 comments Download
source/gameengine/GamePlayer/ghost/GPG_Application.h View 1 4 chunks +6 lines, -1 line 0 comments Download
source/gameengine/GamePlayer/ghost/GPG_Application.cpp View 1 7 chunks +17 lines, -5 lines 0 comments Download
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp View 1 4 chunks +12 lines, -2 lines 0 comments Download
source/gameengine/Ketsji/KX_KetsjiEngine.h View 1 3 chunks +12 lines, -1 line 0 comments Download
source/gameengine/Ketsji/KX_KetsjiEngine.cpp View 1 1 chunk +10 lines, -0 lines 0 comments Download
source/gameengine/Ketsji/KX_PythonInit.cpp View 1 6 chunks +14 lines, -14 lines 0 comments Download

Messages

Total messages: 2
dfelinto
12 years, 8 months ago (2011-09-09 08:40:34 UTC) #1
dfelinto
12 years, 8 months ago (2011-09-09 17:24:52 UTC) #2
Patch finished - I fixed the bplayer (Benoit adding you as reviewer Brecht
already gave the go here)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b