mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-03-15 06:30:54 +00:00
Do not crash on undefined LOD
This commit is contained in:
parent
0a22991ff3
commit
0441ba1ab0
1 changed files with 2 additions and 0 deletions
|
@ -172,6 +172,8 @@ int R_ComputeLOD( trRefEntity_t *ent ) {
|
|||
int lod = r_lodbias->integer + r_lodbias->integer;
|
||||
if (lod >= tr.currentModel->numLods)
|
||||
lod = tr.currentModel->numLods - 1;
|
||||
if (lod < 0)
|
||||
lod = 0;
|
||||
return lod;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue