negodyaeff

01-15-2018, 04:47 PM

subj

just add this line into code already :nonchalance:

source code:

void __fastcall tr::BikeManager::setupBikeLevel(tr::BikeManager *this, float *bikelevel,

float sum_of_upgrades, float min_upgrade_level, float max_upgrade_level)

{

*bikelevel = min_upgrade_level + ((max_upgrade_level - min_upgrade_level) * (sum_of_upgrades / 1000.0));

}

fixed code:

void __fastcall tr::BikeManager::setupBikeLevel(tr::BikeManager *this, float *bikelevel,

float sum_of_upgrades, float min_upgrade_level, float max_upgrade_level)

{

if (sum_of_upgrades > 1000.0) sum_of_upgrades = 1000.0; // <-- here's the check

*bikelevel = min_upgrade_level + ((max_upgrade_level - min_upgrade_level) * (sum_of_upgrades / 1000.0));

}

just add this line into code already :nonchalance:

source code:

void __fastcall tr::BikeManager::setupBikeLevel(tr::BikeManager *this, float *bikelevel,

float sum_of_upgrades, float min_upgrade_level, float max_upgrade_level)

{

*bikelevel = min_upgrade_level + ((max_upgrade_level - min_upgrade_level) * (sum_of_upgrades / 1000.0));

}

fixed code:

void __fastcall tr::BikeManager::setupBikeLevel(tr::BikeManager *this, float *bikelevel,

float sum_of_upgrades, float min_upgrade_level, float max_upgrade_level)

{

if (sum_of_upgrades > 1000.0) sum_of_upgrades = 1000.0; // <-- here's the check

*bikelevel = min_upgrade_level + ((max_upgrade_level - min_upgrade_level) * (sum_of_upgrades / 1000.0));

}