diff options
author | Andrey Nazarov <skuller@skuller.net> | 2013-03-22 13:43:06 +0400 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2013-03-22 13:51:50 +0400 |
commit | 8afc649d1f53606a4bd1c46dd6f8f9ab165b8303 (patch) | |
tree | 6ca81f90e8f84ccd699e5a0176124dbe46bd18b3 /src/refresh/sw/alias.c | |
parent | 376bef83ff1fef84baa45631038a9bd9df46e2e8 (diff) |
Clean up and fix MD2 model loading code.
Bump maximum number of vertices MD2 model can have to 4096 from original
limit of 2048. Some semi-broken models exist that have triangles with
indices set to -1. Simply skip such bad triangles and make GL renderer
load the model anyway. Correctly cap total number of vertices after
remapping. Ignore invalid light normal indices instead of exiting with
error.
Diffstat (limited to 'src/refresh/sw/alias.c')
-rw-r--r-- | src/refresh/sw/alias.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/refresh/sw/alias.c b/src/refresh/sw/alias.c index 5d2c2e0..9d7e402 100644 --- a/src/refresh/sw/alias.c +++ b/src/refresh/sw/alias.c @@ -277,7 +277,7 @@ static void R_AliasPreparePoints(void) maliasst_t *pstverts; maliastri_t *ptri; finalvert_t *pfv[3]; - finalvert_t finalverts[MAXALIASVERTS + + finalvert_t finalverts[MAX_ALIAS_VERTS + ((CACHE_SIZE - 1) / sizeof(finalvert_t)) + 3]; finalvert_t *pfinalverts; |