Skip to content

MD2 vertex/frame/triangle/etc limits checking

Monster Iestyn requested to merge md2-limits-check into master

Fix for this bug: http://mb.srb2.org/showthread.php?t=42099

The model reading code didn't properly check if the model had too many vertices, so models with higher counts freely broke the game. This fix now stops that and prints an error message if that is the case.

However, it seems some models happily exceed other limits such as texcoords without problem (to my knowledge), so I've not bothered with checking those limits for now. Perhaps this could be a time to discuss if we need to change such limits again or not? Either way, one can easily uncomment my lines for checking texcoords/skins/triangles limits later if needed.

EDIT: I've allowed checking for triangle and frame limits too now, after some discussion.

Merge request reports