mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Turn size and number of items for item circle into function parameters (in preparation for UDMF)
This commit is contained in:
parent
6939da0164
commit
50dd0a71db
1 changed files with 7 additions and 11 deletions
18
src/p_mobj.c
18
src/p_mobj.c
|
@ -13322,7 +13322,7 @@ static void P_SpawnDiagonalSpringRings(mapthing_t* mthing, fixed_t x, fixed_t y,
|
|||
}
|
||||
}
|
||||
|
||||
static void P_SpawnItemCircle(mapthing_t* mthing, fixed_t x, fixed_t y, fixed_t z, boolean bonustime)
|
||||
static void P_SpawnItemCircle(mapthing_t* mthing, fixed_t x, fixed_t y, fixed_t z, INT32 numitems, fixed_t size, boolean bonustime)
|
||||
{
|
||||
mobjtype_t ringthing = MT_RING;
|
||||
mobj_t *mobj = NULL;
|
||||
|
@ -13330,14 +13330,6 @@ static void P_SpawnItemCircle(mapthing_t* mthing, fixed_t x, fixed_t y, fixed_t
|
|||
angle_t closestangle, fa;
|
||||
INT32 i;
|
||||
TVector v, *res;
|
||||
INT32 numitems = 8;
|
||||
INT32 size = 96*FRACUNIT;
|
||||
|
||||
if (mthing->type & 1)
|
||||
{
|
||||
numitems = 16;
|
||||
size = 192*FRACUNIT;
|
||||
}
|
||||
|
||||
z = P_GetMobjSpawnHeight(ringthing, x, y, z, false);
|
||||
|
||||
|
@ -13430,13 +13422,17 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing, boolean bonustime)
|
|||
P_SpawnDiagonalSpringRings(mthing, x, y, z);
|
||||
return;
|
||||
case 604: // Circle of rings (8 items)
|
||||
case 605: // Circle of rings (16 bits)
|
||||
case 605: // Circle of rings (16 items)
|
||||
case 606: // Circle of blue spheres (8 items)
|
||||
case 607: // Circle of blue spheres (16 items)
|
||||
case 608: // Circle of rings and blue spheres (8 items)
|
||||
case 609: // Circle of rings and blue spheres (16 items)
|
||||
P_SpawnItemCircle(mthing, x, y, z, bonustime);
|
||||
{
|
||||
INT32 numitems = (mthing->type & 1) ? 16 : 8;
|
||||
fixed_t size = (mthing->type & 1) ? 192*FRACUNIT : 96*FRACUNIT;
|
||||
P_SpawnItemCircle(mthing, x, y, z, numitems, size, bonustime);
|
||||
return;
|
||||
}
|
||||
// Hoops
|
||||
case 1705: // Generic NiGHTS hoop
|
||||
P_SpawnHoop(mthing, x, y, z, 24, 4*FRACUNIT);
|
||||
|
|
Loading…
Reference in a new issue