Skip to content
Snippets Groups Projects
Commit 6c0e1055 authored by Lactozilla's avatar Lactozilla :speech_balloon:
Browse files

Merge branch 'fix-trnslate-lumps-being-recognized-as-sprite-names' into 'next'

Prevent TRNSLATE lumps from being recognized as valid sprite names

See merge request STJr/SRB2!2524
parents 085e2d66 438de82c
Branches
No related tags found
No related merge requests found
......@@ -279,6 +279,14 @@ static boolean GetFramesAndRotationsFromShortLumpName(
*ret_rotation2 = R_Char2Rotation(name[7]);
if (*ret_frame2 >= 64 || *ret_rotation2 == 255)
return false;
// TRNSLATE is a valid but extremely unlikely sprite name:
// * The sprite name is "TRNS"
// * The frame is L, rotation A; mirrored to frame T, rotation E
// In the very unfortunate event that TRNSLATE is found between sprite lumps,
// this name check prevents it from being added as a sprite, when it actually isn't.
if (memcmp(name, "TRNSLATE", 8) == 0)
return false;
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment