diff options
author | Chris Want <cwant@ualberta.ca> | 2006-03-05 17:56:51 +0300 |
---|---|---|
committer | Chris Want <cwant@ualberta.ca> | 2006-03-05 17:56:51 +0300 |
commit | 58f4fcfd6e9f91441f476e05dd2bb9ad14911310 (patch) | |
tree | 41c445eb89f19b1615e9d8f19c6d7a18c4acd931 /source/blender/src/fluidsim.c | |
parent | 6d6f539d031b8de4196f58a535fa40a018340fc1 (diff) |
Some C conpilers only want variables to be initialized with constants,
and will not allow variables to be initialized with the contents of
other variables.
Diffstat (limited to 'source/blender/src/fluidsim.c')
-rw-r--r-- | source/blender/src/fluidsim.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/src/fluidsim.c b/source/blender/src/fluidsim.c index a608b079266..ef1d5fc3dc2 100644 --- a/source/blender/src/fluidsim.c +++ b/source/blender/src/fluidsim.c @@ -591,10 +591,14 @@ void fluidsimBake(struct Object *ob) { int timeIcu[1] = { FLUIDSIM_TIME }; float timeDef[1] = { 1. }; int gravIcu[3] = { FLUIDSIM_GRAV_X, FLUIDSIM_GRAV_Y, FLUIDSIM_GRAV_Z }; - float gravDef[3] = { domainSettings->gravx, domainSettings->gravy, domainSettings->gravz }; + float gravDef[3]; int viscIcu[1] = { FLUIDSIM_VISC }; float viscDef[1] = { 1. }; + gravDef[0] = domainSettings->gravx; + gravDef[1] = domainSettings->gravy; + gravDef[2] = domainSettings->gravz; + // time channel is a bit special, init by hand... timeAtIndex = MEM_callocN( (allchannelSize+1)*1*sizeof(float), "fluidsiminit_timeatindex"); for(i=0; i<=G.scene->r.efra; i++) { @@ -653,10 +657,14 @@ void fluidsimBake(struct Object *ob) float vals[3] = {0.0,0.0,0.0}; int o = channelObjCount; int inivelIcu[3] = { FLUIDSIM_VEL_X, FLUIDSIM_VEL_Y, FLUIDSIM_VEL_Z }; - float inivelDefs[3] = { obit->fluidsimSettings->iniVelx, obit->fluidsimSettings->iniVely, obit->fluidsimSettings->iniVelz }; + float inivelDefs[3]; int activeIcu[1] = { FLUIDSIM_ACTIVE }; float activeDefs[1] = { 1 }; // default to on + inivelDefs[0] = obit->fluidsimSettings->iniVelx; + inivelDefs[1] = obit->fluidsimSettings->iniVely; + inivelDefs[2] = obit->fluidsimSettings->iniVelz; + // check & init loc,rot,size for(j=0; j<3; j++) { for(k=0; k<3; k++) { |