Patch/Bugfix so wind noise got controlable seed and therefore redoable cloth sims - bug reported by istvan

This commit is contained in:
2009-06-06 21:49:00 +00:00
parent 8ed66c5691
commit 580e69b365
6 changed files with 29 additions and 10 deletions

View File

@@ -162,6 +162,8 @@
#include "mydevice.h"
#include "blendef.h"
#include "PIL_time.h"
#include <errno.h>
/*
@@ -8144,6 +8146,16 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
// correct introduce of seed for wind force
if (main->versionfile < 249 && main->subversionfile < 1) {
Object *ob;
for(ob = main->object.first; ob; ob= ob->id.next) {
if(ob->pd)
ob->pd->seed = ((unsigned int)(ceil(PIL_check_seconds_timer()))+1) % 128;
}
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */