mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Fix P_GetMobjByTag so that it iterates through mapthings
This commit is contained in:
parent
3505c90d5c
commit
5996c8a5ac
2 changed files with 7 additions and 11 deletions
15
src/p_spec.c
15
src/p_spec.c
|
@ -6295,17 +6295,12 @@ boolean P_CompareSectorPortals(sectorportal_t *a, sectorportal_t *b)
|
||||||
|
|
||||||
static mobj_t *P_GetMobjByTag(INT32 tag)
|
static mobj_t *P_GetMobjByTag(INT32 tag)
|
||||||
{
|
{
|
||||||
for (thinker_t *th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
INT32 mtnum = -1;
|
||||||
|
|
||||||
|
TAG_ITER_THINGS(tag, mtnum)
|
||||||
{
|
{
|
||||||
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
mobj_t *mo = mapthings[mtnum].mobj;
|
||||||
continue;
|
if (mo)
|
||||||
|
|
||||||
mobj_t *mo = (mobj_t *)th;
|
|
||||||
|
|
||||||
if (mo->spawnpoint == NULL)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (Tag_Find(&mo->spawnpoint->tags, tag))
|
|
||||||
return mo;
|
return mo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -329,7 +329,8 @@ static boolean Portal_AddSkybox (const visplane_t* plane)
|
||||||
|
|
||||||
static void Portal_GetViewpointForSecPortal(portal_t *portal, sectorportal_t *secportal)
|
static void Portal_GetViewpointForSecPortal(portal_t *portal, sectorportal_t *secportal)
|
||||||
{
|
{
|
||||||
fixed_t x, y, z, angle;
|
fixed_t x, y, z;
|
||||||
|
angle_t angle;
|
||||||
|
|
||||||
switch (secportal->type)
|
switch (secportal->type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue