remove this

This commit is contained in:
Alug committed 2025-06-28 01:47:43 +02:00
1 parent 2b4111bd2c
commit 9561c4098e
3 files changed
+18 -32

No files matched your search

+18 -23
View File
@@ -740,7 +740,23 @@ void P_UnsetThingPosition(mobj_t *thing)
thing->touching_sectorlist = NULL; //to be restored by P_SetThingPosition
}
P_UnlinkfromBlockMap(thing);
if (!(thing->flags & MF_NOBLOCKMAP))
{
/* inert things don't need to be in blockmap
*
* killough 8/11/98: simpler scheme using pointers-to-pointers for prev
* pointers, allows head node pointers to be treated like everything else
*
* Also more robust, since it doesn't depend on current position for
* unlinking. Old method required computing head node based on position
* at time of unlinking, assuming it was the same position as during
* linking.
*/
mobj_t *bnext, **bprev = thing->bprev;
if (bprev && (*bprev = bnext = thing->bnext) != NULL) // unlink from block map
bnext->bprev = bprev;
}
}
void P_UnsetPrecipThingPosition(precipmobj_t *thing)
@@ -752,7 +768,7 @@ void P_UnsetPrecipThingPosition(precipmobj_t *thing)
bnext->bprev = bprev;
}
void P_LinkToBlockMap(mobj_t *thing, mobj_t **bmap)
static void P_LinkToBlockMap(mobj_t *thing, mobj_t **bmap)
{
const INT32 blockx = (unsigned)(thing->x - bmaporgx) >> MAPBLOCKSHIFT;
const INT32 blocky = (unsigned)(thing->y - bmaporgy) >> MAPBLOCKSHIFT;
@@ -781,27 +797,6 @@ void P_LinkToBlockMap(mobj_t *thing, mobj_t **bmap)
}
}
void P_UnlinkfromBlockMap(mobj_t *thing)
{
if (!(thing->flags & MF_NOBLOCKMAP))
{
/* inert things don't need to be in blockmap
*
* killough 8/11/98: simpler scheme using pointers-to-pointers for prev
* pointers, allows head node pointers to be treated like everything else
*
* Also more robust, since it doesn't depend on current position for
* unlinking. Old method required computing head node based on position
* at time of unlinking, assuming it was the same position as during
* linking.
*/
mobj_t *bnext, **bprev = thing->bprev;
if (bprev && (*bprev = bnext = thing->bnext) != NULL) // unlink from block map
bnext->bprev = bprev;
}
}
//
// P_SetThingPosition
// Links a thing into both a block and a subsector
-2
View File
@@ -51,8 +51,6 @@ fixed_t P_InterceptVector(divline_t *v2, divline_t *v1);
INT32 P_BoxOnLineSide(fixed_t *tmbox, const line_t *ld);
void P_UnsetPrecipThingPosition(precipmobj_t *thing);
void P_SetPrecipitationThingPosition(precipmobj_t *thing);
void P_LinkToBlockMap(mobj_t *thing, mobj_t **bmap);
void P_UnlinkfromBlockMap(mobj_t *thing);
void P_CreatePrecipSecNodeList(precipmobj_t *thing, fixed_t x,fixed_t y);
boolean P_SceneryTryMove(mobj_t *thing, fixed_t x, fixed_t y);
-7
View File
@@ -5643,8 +5643,6 @@ void P_SetScale(mobj_t *mobj, fixed_t newscale)
oldscale = mobj->scale; //keep for adjusting stuff below
P_UnlinkfromBlockMap(mobj);
mobj->scale = newscale;
mobj->radius = FixedMul(mobj->info->radius, newscale);
@@ -5658,11 +5656,6 @@ void P_SetScale(mobj_t *mobj, fixed_t newscale)
player->viewheight = FixedMul(FixedDiv(player->viewheight, oldscale), newscale); // Nonono don't calculate viewheight elsewhere, this is the best place for it!
player->dashspeed = FixedMul(FixedDiv(player->dashspeed, oldscale), newscale); // Prevents the player from having to re-charge up spindash if the player grew in size
}
if (!(mobj->flags & MF_NOBLOCKMAP))
{
P_LinkToBlockMap(mobj, blocklinks);
}
}
void P_Attract(mobj_t *source, mobj_t *dest, boolean nightsgrab) // Home in on your target