Precipitation.cc BUG and FIX; please add to CVS
by Steven Peterson · in Torque Game Engine · 03/16/2006 (9:16 am) · 0 replies
Problem
This applies to 1.4 and earlier.
(Torque-script)
In this sequence modifyStorm does NOT work, although it works in other places in that file. Apparently it can't be called right after setPercentage.
Solution
The fix is already posted in the GameManager Resource
Just do a find for 'modifyStorm' on that page and read that entire thread-post by Clint S. Brewer.
It involves changeing one line in packUpdate in precipitation.cc around liine 339
Is it possible to get this permanetly resolved in the CVS-HEAD?
Thanks!
This applies to 1.4 and earlier.
(Torque-script)
$WetSnow = new Precipitation()
{
datablock = "WetSnow";
minSpeed = 0.5;
maxSpeed = 1.0;
numDrops = %intensity;
boxWidth = 200;
boxHeight = 100;
minMass = 1.0;
maxMass = 2.0;
rotateWithCamVel = true;
doCollision = true;
useTurbulence = true;
};
$WetSnow.setPercentage(0.1);
$WetSnow.modifyStorm(1.0, $fadeTime);In this sequence modifyStorm does NOT work, although it works in other places in that file. Apparently it can't be called right after setPercentage.
Solution
The fix is already posted in the GameManager Resource
Just do a find for 'modifyStorm' on that page and read that entire thread-post by Clint S. Brewer.
It involves changeing one line in packUpdate in precipitation.cc around liine 339
[b]old code[/b] if (stream->writeFlag(!(mask & ~(DataMask | PercentageMask | StormMask)) && (mask & StormMask))) [b]New code[/b] if (stream->writeFlag( mask & StormMask))
Is it possible to get this permanetly resolved in the CVS-HEAD?
Thanks!