forked from electronicarts/CnC_Generals_Zero_Hour
-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Labels
FixIs fixing something, but is not user facingIs fixing something, but is not user facingMinorSeverity: Minor < Major < Critical < BlockerSeverity: Minor < Major < Critical < Blocker
Description
- Related patch issue Incorrect low and high values for GameClientRandomVariable in ParticleSystem.ini GeneralsGamePatch#2842
GeneralsGameCode/Core/GameEngine/Source/Common/INI/INI.cpp
Lines 1731 to 1751 in c8c809c
| void INI::parseGameClientRandomVariable( INI* ini, void * /*instance*/, void *store, const void* /*userData*/ ) | |
| { | |
| GameClientRandomVariable *var = static_cast<GameClientRandomVariable *>(store); | |
| const char* token; | |
| token = ini->getNextToken(); | |
| Real low = INI::scanReal(token); | |
| token = ini->getNextToken(); | |
| Real high = INI::scanReal(token); | |
| // if omitted, assume uniform | |
| GameClientRandomVariable::DistributionType type = GameClientRandomVariable::UNIFORM; | |
| token = ini->getNextTokenOrNull(); | |
| if (token) | |
| type = (GameClientRandomVariable::DistributionType)INI::scanIndexList(token, GameClientRandomVariable::DistributionTypeNames); | |
| // set the range of the random variable | |
| var->setRange( low, high, type ); | |
| } |
Perhaps it would be good if we checked that high is greater than low. There are many such mistakes in the particle system data files.
if (low > high)
{
std::swap(low, high);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FixIs fixing something, but is not user facingIs fixing something, but is not user facingMinorSeverity: Minor < Major < Critical < BlockerSeverity: Minor < Major < Critical < Blocker