Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2008-10-06 21:37:03 +0400
committerMartin Poirier <theeth@yahoo.com>2008-10-06 21:37:03 +0400
commitd16a8649ff6c2b65492a78eab80bcdbefa9dbe9d (patch)
tree5d2a2bd518cc7de908ad516a28ee8011d9a7e590 /source/blender/blenloader
parent1513e96857538a5a686439247c0608bd1dfce64a (diff)
parentde6a9d0194abacb1bd2de5283e72440b4916325c (diff)
merge runk 16887:16950
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c918a82f36a..bc9b6465516 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7944,9 +7944,27 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
la->sky_exposure= 1.0f;
}
}
+
+ /* BGE message actuators needed OB prefix, very confusing */
+ if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 10)) {
+ bActuator *act;
+ Object *ob;
-
-
+ for(ob = main->object.first; ob; ob= ob->id.next) {
+ for(act= ob->actuators.first; act; act= act->next) {
+ if (act->type == ACT_MESSAGE) {
+ bMessageActuator *msgAct = (bMessageActuator *) act->data;
+ if (strlen(msgAct->toPropName) > 2) {
+ /* strip first 2 chars, would have only worked if these were OB anyway */
+ strncpy(msgAct->toPropName, msgAct->toPropName+2, sizeof(msgAct->toPropName));
+ } else {
+ msgAct->toPropName[0] = '\0';
+ }
+ }
+ }
+ }
+ }
+
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */