Skip to content

Commit

Permalink
Merge pull request #747 from xunder-matth/fix-GetObjectMaterial
Browse files Browse the repository at this point in the history
Correctly retrieve `modelid` and material colors in `GetObjectMaterial(Text)`
  • Loading branch information
AmyrAhmady authored Oct 21, 2023
2 parents 87710d4 + 4ac63eb commit fe77600
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Server/Components/Pawn/Scripting/Object/Natives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,10 @@ SCRIPT_API(GetObjectMaterial, bool(IObject& object, int materialIndex, int& mode
bool result = object.getMaterialData(materialIndex, data);
if (result)
{
modelid = data->model;
textureLibrary = data->textOrTXD;
textureName = data->fontOrTexture;
materialColour = data->materialColour.RGBA();
materialColour = data->materialColour.ARGB();
}
return result;
}
Expand All @@ -300,8 +301,8 @@ SCRIPT_API(GetObjectMaterialText, bool(IObject& object, int materialIndex, Outpu
fontFace = data->fontOrTexture;
fontSize = data->fontSize;
bold = data->bold;
fontColour = data->fontColour.RGBA();
backgroundColour = data->backgroundColour.RGBA();
fontColour = data->fontColour.ARGB();
backgroundColour = data->backgroundColour.ARGB();
textAlignment = data->alignment;
}
return result;
Expand Down

0 comments on commit fe77600

Please sign in to comment.