weapon pickup voxels spinning in place

This commit is contained in:
Fabian Greffrath 2023-11-21 22:47:56 +01:00
parent 0de9800c97
commit 351881cbdd

View File

@ -393,10 +393,28 @@ static int VX_RotateModeForThing (mobj_t * thing)
break; break;
} }
// in most maps, items don't have "nice" facing directions, so this if (vx_rotate_items)
// option orientates them in a way similar to sprites. {
if (vx_rotate_items && (thing->flags & MF_SPECIAL)) switch (thing->sprite)
return 1; {
case SPR_SHOT:
case SPR_MGUN:
case SPR_LAUN:
case SPR_PLAS:
case SPR_BFUG:
case SPR_CSAW:
case SPR_SGN2:
return 3;
default:
break;
}
// in most maps, items don't have "nice" facing directions, so this
// option orientates them in a way similar to sprites.
if (thing->flags & MF_SPECIAL)
return 1;
}
// use existing angle // use existing angle
return 0; return 0;
@ -534,6 +552,10 @@ boolean VX_ProjectVoxel (mobj_t * thing)
case 2: case 2:
angle = R_PointToAngle (gx, gy) + ANG180; angle = R_PointToAngle (gx, gy) + ANG180;
break; break;
case 3:
angle = 4 * leveltime * ANG1;
break;
} }
angle_t ang2 = ANG180 - viewangle + angle; angle_t ang2 = ANG180 - viewangle + angle;