Patch/Bugfix so wind noise got controlable seed and therefore redoable cloth sims - bug reported by istvan
This commit is contained in:
@@ -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! */
|
||||
|
||||
Reference in New Issue
Block a user