Draw model name in its ground color if relevant (#651)

Co-authored-by: Diavolo <edoardo.sanguineti222@gmail.com>
This commit is contained in:
Louve 2022-12-16 15:55:50 +01:00 committed by GitHub
parent 696ff5629a
commit 3cdd4d0636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -440,7 +440,15 @@ namespace Components
const auto dist = Utils::Maths::Vec3SqrDistance(playerPosition, staticModel.placement.origin);
if (dist < static_cast<float>(sqrDist))
{
Game::R_AddDebugString(staticModelsColor, staticModel.placement.origin, 1.0, staticModel.model->name);
float rgb01Color[] =
{
staticModel.groundLighting.array[0] / 255.f,
staticModel.groundLighting.array[1] / 255.f,
staticModel.groundLighting.array[2] / 255.f,
1.f,
};
Game::R_AddDebugString(staticModel.flags & 0x20 ? rgb01Color : staticModelsColor, staticModel.placement.origin, 1.0f, staticModel.model->name);
}
}
}