Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(client/vehicleproperties): Reset colors to 0 when changing painttype #692

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jag3dagster
Copy link
Member

Paint type appears to be overridden / ignored depending on what value is passed in for color. By passing in the default 0, paint type should be respected once the custom rgb is applied.

Resolves #598

Paint type appears to be overridden / ignored depending on what value is passed in for color. By passing in the default `0`, paint type should be respected once the custom rgb is applied.
@@ -348,7 +348,7 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle)
ClearVehicleCustomPrimaryColour(vehicle)
SetVehicleColours(vehicle, props.color1 --[[@as number]], colorSecondary --[[@as number]])
else
if props.paintType1 then SetVehicleModColor_1(vehicle, props.paintType1, colorPrimary, pearlescentColor) end
if props.paintType1 then SetVehicleModColor_1(vehicle, props.paintType1, 0, props.pearlescentColor or pearlescentColor) end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially will want to actually have the pearl bit be props.pearlescentColor or 0 for a similar reason, but I didn't test that portion too deeply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Setting paintType1/paintType2 with vehicleProperties does not work with custom colors
1 participant