mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 13:21:20 +00:00
Fix TRNSLATE lumps being recognized as valid sprite names
This commit is contained in:
parent
fafa522c50
commit
438de82c69
1 changed files with 8 additions and 0 deletions
|
@ -279,6 +279,14 @@ static boolean GetFramesAndRotationsFromShortLumpName(
|
||||||
*ret_rotation2 = R_Char2Rotation(name[7]);
|
*ret_rotation2 = R_Char2Rotation(name[7]);
|
||||||
if (*ret_frame2 >= 64 || *ret_rotation2 == 255)
|
if (*ret_frame2 >= 64 || *ret_rotation2 == 255)
|
||||||
return false;
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue