Skip to content

Commit

Permalink
Slightly change code to suppress compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
MAFINS committed Nov 6, 2022
1 parent a1c2b84 commit f139bd6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Solution/source/Submenus/VehicleModShop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "..\Natives\natives2.h"
#include "..\Util\GTAmath.h"
#include "..\Util\StringManip.h"
#include "..\Scripting\enums.h"
#include "..\main.h"
#include "..\Scripting\GTAvehicle.h"
Expand Down Expand Up @@ -1330,12 +1331,11 @@ namespace sub

if (ms_paints_hexinput)
{
char buffer[2041];
std::size_t hexcheck;
std::string titlestring,
hexr = _itoa(ms_paints_rgb_r, buffer, 16), //compiler says this may be unsafe
hexg = _itoa(ms_paints_rgb_g, buffer, 16), //I say fuck the compiler
hexb = _itoa(ms_paints_rgb_b, buffer, 16);
std::string titlestring;
std::string hexr = int_to_hexstring(ms_paints_rgb_r, false);
std::string hexg = int_to_hexstring(ms_paints_rgb_g, false);
std::string hexb = int_to_hexstring(ms_paints_rgb_b, false);
if (hexr.length() == 1)
hexr = "0" + hexr;
if (hexg.length() == 1)
Expand Down Expand Up @@ -2597,6 +2597,7 @@ namespace sub


Model Static_12_veh_model = GET_ENTITY_MODEL(Static_12);
bool isBike = Static_12_veh_model.IsBike();
INT wheel_no = GET_VEHICLE_MOD(Static_12, 23);
INT ms_custom_tyres = GET_VEHICLE_MOD_VARIATION(Static_12, 23);
BOOL ms_drift_tyres = _GET_DRIFT_TYRES_ENABLED(Static_12);
Expand All @@ -2618,9 +2619,9 @@ namespace sub

for (i = 0; i < vWheelTNames.size(); i++)
{
if (i == WheelType::BikeWheels && !Static_12_veh_model.IsBike()) continue;
if (i != WheelType::BikeWheels && Static_12_veh_model.IsBike()) continue; //removes all non-bike wheels from bike menu. Wheels don't render properly on bikes so makes sense to remove them to me. - ijc
__AddpointOption(vWheelTNames[i], i);
const bool ibw = (i == WheelType::BikeWheels);
if (isBike && ibw || !isBike && !ibw)
__AddpointOption(vWheelTNames[i], i);
}

AddLocal("CMOD_TYR_1", ms_custom_tyres, MSWheelsCustomTyres_, MSWheelsCustomTyres_, true); // Custom Tyres
Expand Down

0 comments on commit f139bd6

Please sign in to comment.