1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 09:44:02 +00:00

fix quad coloring when overridden by parent (eg. entity damage flash)

This commit is contained in:
fgenesis 2022-06-05 23:40:26 +02:00
parent b4ae208886
commit 8b3c00dc76

View file

@ -397,6 +397,12 @@ void Quad::onRender(const RenderState& rs) const
if (!drawGrid)
{
const float red = rs.color.x * this->color.x;
const float green = rs.color.y * this->color.y;
const float blue = rs.color.z * this->color.z;
const float alpha = rs.alpha * this->alpha.x * this->alphaMod;
glColor4f(red, green, blue, alpha);
glBegin(GL_QUADS);
{
glTexCoord2f(upperLeftTextureCoordinates.x, 1.0f-upperLeftTextureCoordinates.y);