texture forcefields had a bug where uninitialized values could be used.

do_texture_effector assumed multitex_ext would assign r/g/b colors which isnt true for grey textures.
Fallback to PFIELD_TEX_GRAD with grey textures, node this in tooltip also.
This commit is contained in:
2008-02-17 23:53:48 +00:00
parent a207d14958
commit 0fe6abbfa3
3 changed files with 9 additions and 9 deletions

View File

@@ -1210,6 +1210,8 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
return retval;
}
/* Warning, if the texres's values are not declared zero, check the return value to be sure
* the color values are set before using the r/g/b values, otherwise you may use uninitialized values - Campbell */
int multitex_ext(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexResult *texres)
{