Game Development Community

[1.1beta1] ShapeImage Code Fix [RESOLVED]

by Steve Acaster · in Torque 3D Professional · 02/11/2010 (10:55 pm) · 1 replies

Ported my custom code over (yay me!), and whilst doing so I checked on all of the bug fixes which I've previously added. The vast majority of them were in the stock code (yay devs!) and a few code segments were completely different (as you'd expected with all the changes).

One thing I thought that was missing was this:

"correctMuzzleVector in ShapeImage.cpp"

This needs to be changed from true to false in code, or it will override the correctMuzzleVector in script on any datablock ShapeBaseImageData(the_weapon_Image). Set to false in code, the script takes over and uses the script's bool (false in code doesn't override true in script - but it does the other way around).

And this old pic shows what correctMuzzleVector does if it's always on. CorrectMuzzleVector=true is good for when using eyeOffset, but bad when not using it (see pic) so having the exposed script working correctly and being free from being overridden is important.

correctMuzzleVector, circa line 110, ShapeImage.cpp.
ShapeBaseImageData::ShapeBaseImageData()
{
//...
   correctMuzzleVector = false;//yorks changed bool from true
//...
}

#1
02/16/2010 (7:47 pm)
Ahem ... actually it looks like this might have been fixed elsewhere, should tested more thoroughly before whinging.

Thread sheepishly moved to Resolved in the hope that no-one has noticed it ...