1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

The server ignores the API call completely whenever a null pointer is given for a value that isn't needed. Apparently that feature is missing from the API.

This commit is contained in:
Sandu Liviu Catalin 2018-01-30 18:05:47 +02:00
parent ed9998873b
commit 2a5a1821ad

View File

@ -807,9 +807,9 @@ Int32 CVehicle::GetPrimaryColor() const
// Validate the managed identifier
Validate();
// The color value
Int32 primary = -1;
Int32 primary = -1, dummy;
// Query the server for the requested color
_Func->GetVehicleColour(m_ID, &primary, nullptr);
_Func->GetVehicleColour(m_ID, &primary, &dummy);
// Return the requested information
return primary;
}
@ -820,9 +820,9 @@ void CVehicle::SetPrimaryColor(Int32 col) const
// Validate the managed identifier
Validate();
// The unchanged color value
Int32 secondary;
Int32 secondary = -1, dummy;
// Query the server for the unchanged color
_Func->GetVehicleColour(m_ID, nullptr, &secondary);
_Func->GetVehicleColour(m_ID, &dummy, &secondary);
// Perform the requested operation
_Func->SetVehicleColour(m_ID, col, secondary);
}
@ -833,9 +833,9 @@ Int32 CVehicle::GetSecondaryColor() const
// Validate the managed identifier
Validate();
// The color value
Int32 secondary = -1;
Int32 secondary = -1, dummy;
// Query the server for the requested color
_Func->GetVehicleColour(m_ID, nullptr, &secondary);
_Func->GetVehicleColour(m_ID, &dummy, &secondary);
// Return the requested information
return secondary;
}
@ -846,9 +846,9 @@ void CVehicle::SetSecondaryColor(Int32 col) const
// Validate the managed identifier
Validate();
// The unchanged color value
Int32 primary;
Int32 primary = -1, dummy;
// Query the server for the unchanged color
_Func->GetVehicleColour(m_ID, &primary, nullptr);
_Func->GetVehicleColour(m_ID, &primary, &dummy);
// Perform the requested operation
_Func->SetVehicleColour(m_ID, primary, col);
}