[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16225] trunk/blender/source/gameengine/ Converter/KX_ConvertActuators.cpp: BGE data conversion was making sound paths absolute, modify a copy rather then the original.
Campbell Barton
ideasman42 at gmail.com
Fri Aug 22 12:27:16 CEST 2008
Revision: 16225
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16225
Author: campbellbarton
Date: 2008-08-22 12:27:16 +0200 (Fri, 22 Aug 2008)
Log Message:
-----------
BGE data conversion was making sound paths absolute, modify a copy rather then the original.
Modified Paths:
--------------
trunk/blender/source/gameengine/Converter/KX_ConvertActuators.cpp
Modified: trunk/blender/source/gameengine/Converter/KX_ConvertActuators.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/KX_ConvertActuators.cpp 2008-08-22 09:44:27 UTC (rev 16224)
+++ trunk/blender/source/gameengine/Converter/KX_ConvertActuators.cpp 2008-08-22 10:27:16 UTC (rev 16225)
@@ -384,9 +384,13 @@
else
{
/* but we need to convert the samplename into absolute pathname first */
- BLI_convertstringcode(soundact->sound->name, maggiename);
- samplename = soundact->sound->name;
+ char fullpath[sizeof(soundact->sound->name)];
+ /* dont modify soundact->sound->name, only change a copy */
+ BLI_strncpy(fullpath, soundact->sound->name, sizeof(fullpath));
+ BLI_convertstringcode(fullpath, maggiename);
+ samplename = fullpath;
+
/* and now we can load it */
if (soundscene->LoadSample(samplename, NULL, 0) > -1)
sampleisloaded = true;
More information about the Bf-blender-cvs
mailing list