just use Z_SetUser

instead of duplicating what RotatedPatch_Create does lul
This commit is contained in:
Alug committed 2025-04-16 19:19:38 +02:00
1 parent 0ef5a80d84
commit 58e12d620f
1 file changed
+2 -3
+2 -3
View File
@@ -1819,9 +1819,8 @@ void *W_GetCachedRotPatchPwad(UINT16 wadnum, UINT16 lumpnum)
if (!rotcache[lumpnum])
{
rotsprite_t *rspr = Z_Calloc(sizeof(rotsprite_t), PU_STATIC, &rotcache[lumpnum]);
rspr->angles = ROTANGLES;
rspr->patches = Z_Calloc(rspr->angles * 2 * sizeof(void *), PU_STATIC, NULL);
rotsprite_t *rspr = RotatedPatch_Create(ROTANGLES);
Z_SetUser(rspr, (void **)(&rotcache[lumpnum]));
}
return (void *)(rotcache[lumpnum]);