mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-11 20:31:06 +00:00
Merge branch 'you_can_sometimes_have_too_many_rings' into 'master'
You can sometimes have too many rings See merge request KartKrew/Kart!47
This commit is contained in:
commit
9a818ae7fb
1 changed files with 28 additions and 16 deletions
44
src/p_mobj.c
44
src/p_mobj.c
|
@ -11263,7 +11263,7 @@ ML_NOCLIMB : Direction not controllable
|
|||
void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
||||
{
|
||||
mobj_t *mobj = NULL;
|
||||
INT32 r, i;
|
||||
INT32 /*r,*/ i;
|
||||
fixed_t x, y, z, finalx, finaly, finalz;
|
||||
sector_t *sec;
|
||||
TVector v, *res;
|
||||
|
@ -11337,8 +11337,8 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
|||
|
||||
mobj = P_SpawnMobj(finalx, finaly, finalz, MT_HOOP);
|
||||
|
||||
if (maptol & TOL_XMAS)
|
||||
P_SetMobjState(mobj, mobj->info->seestate + (i & 1));
|
||||
//if (maptol & TOL_XMAS)
|
||||
//P_SetMobjState(mobj, mobj->info->seestate + (i & 1));
|
||||
|
||||
mobj->z -= mobj->height/2;
|
||||
P_SetTarget(&mobj->target, hoopcenter); // Link the sprite to the center.
|
||||
|
@ -11347,8 +11347,10 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
|||
// Link all the sprites in the hoop together
|
||||
if (nextmobj)
|
||||
{
|
||||
mobj->hprev = nextmobj;
|
||||
mobj->hprev->hnext = mobj;
|
||||
P_SetTarget(&mobj->hprev, nextmobj);
|
||||
P_SetTarget(&mobj->hprev->hnext, mobj);
|
||||
//mobj->hprev = nextmobj;
|
||||
//mobj->hprev->hnext = mobj;
|
||||
}
|
||||
else
|
||||
mobj->hprev = mobj->hnext = NULL;
|
||||
|
@ -11378,8 +11380,10 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
|||
|
||||
// Link all the collision sprites together.
|
||||
mobj->hnext = NULL;
|
||||
mobj->hprev = nextmobj;
|
||||
mobj->hprev->hnext = mobj;
|
||||
P_SetTarget(&mobj->hprev, nextmobj);
|
||||
P_SetTarget(&mobj->hprev->hnext, mobj);
|
||||
//mobj->hprev = nextmobj;
|
||||
//mobj->hprev->hnext = mobj;
|
||||
|
||||
nextmobj = mobj;
|
||||
}
|
||||
|
@ -11405,8 +11409,10 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
|||
|
||||
// Link all the collision sprites together.
|
||||
mobj->hnext = NULL;
|
||||
mobj->hprev = nextmobj;
|
||||
mobj->hprev->hnext = mobj;
|
||||
P_SetTarget(&mobj->hprev, nextmobj);
|
||||
P_SetTarget(&mobj->hprev->hnext, mobj);
|
||||
//mobj->hprev = nextmobj;
|
||||
//mobj->hprev->hnext = mobj;
|
||||
|
||||
nextmobj = mobj;
|
||||
}
|
||||
|
@ -11479,8 +11485,8 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
|||
|
||||
mobj = P_SpawnMobj(finalx, finaly, finalz, MT_HOOP);
|
||||
|
||||
if (maptol & TOL_XMAS)
|
||||
P_SetMobjState(mobj, mobj->info->seestate + (i & 1));
|
||||
//if (maptol & TOL_XMAS)
|
||||
//P_SetMobjState(mobj, mobj->info->seestate + (i & 1));
|
||||
|
||||
mobj->z -= mobj->height/2;
|
||||
P_SetTarget(&mobj->target, hoopcenter); // Link the sprite to the center.
|
||||
|
@ -11489,8 +11495,10 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
|||
// Link all the sprites in the hoop together
|
||||
if (nextmobj)
|
||||
{
|
||||
mobj->hprev = nextmobj;
|
||||
mobj->hprev->hnext = mobj;
|
||||
P_SetTarget(&mobj->hprev, nextmobj);
|
||||
P_SetTarget(&mobj->hprev->hnext, mobj);
|
||||
//mobj->hprev = nextmobj;
|
||||
//mobj->hprev->hnext = mobj;
|
||||
}
|
||||
else
|
||||
mobj->hprev = mobj->hnext = NULL;
|
||||
|
@ -11531,8 +11539,10 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
|||
|
||||
// Link all the collision sprites together.
|
||||
mobj->hnext = NULL;
|
||||
mobj->hprev = nextmobj;
|
||||
mobj->hprev->hnext = mobj;
|
||||
P_SetTarget(&mobj->hprev, nextmobj);
|
||||
P_SetTarget(&mobj->hprev->hnext, mobj);
|
||||
//mobj->hprev = nextmobj;
|
||||
//mobj->hprev->hnext = mobj;
|
||||
|
||||
nextmobj = mobj;
|
||||
}
|
||||
|
@ -11540,6 +11550,8 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
|||
|
||||
return;
|
||||
}
|
||||
else return; // srb2kart - no rings or ring-like objects in R1
|
||||
/*
|
||||
// Wing logo item.
|
||||
else if (mthing->type == mobjinfo[MT_NIGHTSWING].doomednum)
|
||||
{
|
||||
|
@ -11833,7 +11845,7 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
|||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue