Check for missing patch earlier in W_CachePatchNameRotated

This commit is contained in:
indev committed 2025-03-08 18:14:26 +03:00
1 parent 2aff0ed03a
commit 422e63a93d
1 file changed
+3 -2
+3 -2
View File
@@ -1806,6 +1806,9 @@ void *W_CachePatchNameRotated(const char *name, INT32 rotationangle, INT32 tag)
num = W_CheckNumForName(finalname);
if (num == LUMPERROR)
num = W_GetNumForName("MISSING");
// No rotation? No need to do any of this nonsense.
if (rotationangle < 1 || rotationangle >= ROTANGLES)
return W_CachePatchNum(num, tag);
@@ -1816,8 +1819,6 @@ void *W_CachePatchNameRotated(const char *name, INT32 rotationangle, INT32 tag)
{
INT32 xpivot = 0, ypivot = 0;
if (num == LUMPERROR)
ptr = (patch_t *)(W_CacheLumpNum(W_GetNumForName("MISSING"), PU_STATIC));
ptr = (patch_t *)(W_CacheLumpNum(num, PU_STATIC));
// >y pivot centered