mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 20:31:30 +00:00
Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart-Public into kpubnext
This commit is contained in:
commit
289de329eb
5 changed files with 56 additions and 20 deletions
|
@ -42,12 +42,12 @@ jobs:
|
||||||
paths:
|
paths:
|
||||||
- /var/cache/apt/archives
|
- /var/cache/apt/archives
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
#- run:
|
||||||
name: Compile without network support and BLUA
|
# name: Compile without network support and BLUA
|
||||||
command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1
|
# command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1
|
||||||
- run:
|
#- run:
|
||||||
name: wipe build
|
# name: wipe build
|
||||||
command: make -C src LINUX=1 cleandep
|
# command: make -C src LINUX=1 cleandep
|
||||||
- run:
|
- run:
|
||||||
name: rebuild depend
|
name: rebuild depend
|
||||||
command: make -C src LINUX=1 clean
|
command: make -C src LINUX=1 clean
|
||||||
|
|
|
@ -1034,7 +1034,10 @@ boolean P_BlockThingsIterator(INT32 x, INT32 y, boolean (*func)(mobj_t *))
|
||||||
{
|
{
|
||||||
P_SetTarget(&bnext, mobj->bnext); // We want to note our reference to bnext here incase it is MF_NOTHINK and gets removed!
|
P_SetTarget(&bnext, mobj->bnext); // We want to note our reference to bnext here incase it is MF_NOTHINK and gets removed!
|
||||||
if (!func(mobj))
|
if (!func(mobj))
|
||||||
|
{
|
||||||
|
P_SetTarget(&bnext, NULL);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
if (P_MobjWasRemoved(tmthing) // func just popped our tmthing, cannot continue.
|
if (P_MobjWasRemoved(tmthing) // func just popped our tmthing, cannot continue.
|
||||||
|| (bnext && P_MobjWasRemoved(bnext))) // func just broke blockmap chain, cannot continue.
|
|| (bnext && P_MobjWasRemoved(bnext))) // func just broke blockmap chain, cannot continue.
|
||||||
{
|
{
|
||||||
|
@ -1042,6 +1045,7 @@ boolean P_BlockThingsIterator(INT32 x, INT32 y, boolean (*func)(mobj_t *))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
P_SetTarget(&bnext, NULL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
42
src/p_mobj.c
42
src/p_mobj.c
|
@ -9893,6 +9893,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(mobj->flags & MF_NOTHINK))
|
||||||
|
P_AddThinker(&mobj->thinker); // Needs to come before the shadow spawn, or else the shadow's reference gets forgotten
|
||||||
|
|
||||||
switch (mobj->type)
|
switch (mobj->type)
|
||||||
{
|
{
|
||||||
case MT_PLAYER:
|
case MT_PLAYER:
|
||||||
|
@ -9916,9 +9919,6 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(mobj->flags & MF_NOTHINK))
|
|
||||||
P_AddThinker(&mobj->thinker);
|
|
||||||
|
|
||||||
// Call action functions when the state is set
|
// Call action functions when the state is set
|
||||||
if (st->action.acp1 && (mobj->flags & MF_RUNSPAWNFUNC))
|
if (st->action.acp1 && (mobj->flags & MF_RUNSPAWNFUNC))
|
||||||
{
|
{
|
||||||
|
@ -10298,21 +10298,41 @@ void P_RemovePrecipMobj(precipmobj_t *mobj)
|
||||||
void P_RemoveSavegameMobj(mobj_t *mobj)
|
void P_RemoveSavegameMobj(mobj_t *mobj)
|
||||||
{
|
{
|
||||||
// unlink from sector and block lists
|
// unlink from sector and block lists
|
||||||
P_UnsetThingPosition(mobj);
|
if (((thinker_t *)mobj)->function.acp1 == (actionf_p1)P_NullPrecipThinker)
|
||||||
|
|
||||||
// Remove touching_sectorlist from mobj.
|
|
||||||
if (sector_list)
|
|
||||||
{
|
{
|
||||||
P_DelSeclist(sector_list);
|
P_UnsetPrecipThingPosition((precipmobj_t *)mobj);
|
||||||
sector_list = NULL;
|
|
||||||
|
if (precipsector_list)
|
||||||
|
{
|
||||||
|
P_DelPrecipSeclist(precipsector_list);
|
||||||
|
precipsector_list = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// unlink from sector and block lists
|
||||||
|
P_UnsetThingPosition(mobj);
|
||||||
|
|
||||||
|
// Remove touching_sectorlist from mobj.
|
||||||
|
if (sector_list)
|
||||||
|
{
|
||||||
|
P_DelSeclist(sector_list);
|
||||||
|
sector_list = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// stop any playing sound
|
// stop any playing sound
|
||||||
S_StopSound(mobj);
|
S_StopSound(mobj);
|
||||||
|
R_RemoveMobjInterpolator(mobj);
|
||||||
|
|
||||||
// free block
|
// free block
|
||||||
P_RemoveThinker((thinker_t *)mobj);
|
// Here we use the same code as R_RemoveThinkerDelayed, but without reference counting (we're removing everything so it shouldn't matter) and without touching currentthinker since we aren't in P_RunThinkers
|
||||||
R_RemoveMobjInterpolator(mobj);
|
{
|
||||||
|
thinker_t *thinker = (thinker_t *)mobj;
|
||||||
|
thinker_t *next = thinker->next;
|
||||||
|
(next->prev = thinker->prev)->next = next;
|
||||||
|
Z_Free(thinker);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static CV_PossibleValue_t respawnitemtime_cons_t[] = {{1, "MIN"}, {300, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t respawnitemtime_cons_t[] = {{1, "MIN"}, {300, "MAX"}, {0, NULL}};
|
||||||
|
|
|
@ -2166,6 +2166,14 @@ static void LoadMobjThinker(actionf_p1 thinker)
|
||||||
mobj->player->viewz = mobj->player->mo->z + mobj->player->viewheight;
|
mobj->player->viewz = mobj->player->mo->z + mobj->player->viewheight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mobj->type == MT_SKYBOX)
|
||||||
|
{
|
||||||
|
if (mobj->spawnpoint->options & MTF_OBJECTSPECIAL)
|
||||||
|
skyboxmo[1] = mobj;
|
||||||
|
else
|
||||||
|
skyboxmo[0] = mobj;
|
||||||
|
}
|
||||||
|
|
||||||
P_AddThinker(&mobj->thinker);
|
P_AddThinker(&mobj->thinker);
|
||||||
|
|
||||||
if (diff2 & MD2_WAYPOINTCAP)
|
if (diff2 & MD2_WAYPOINTCAP)
|
||||||
|
@ -2666,10 +2674,14 @@ static void P_NetUnArchiveThinkers(void)
|
||||||
{
|
{
|
||||||
next = currentthinker->next;
|
next = currentthinker->next;
|
||||||
|
|
||||||
if (currentthinker->function.acp1 == (actionf_p1)P_MobjThinker)
|
if (currentthinker->function.acp1 == (actionf_p1)P_MobjThinker || currentthinker->function.acp1 == (actionf_p1)P_NullPrecipThinker)
|
||||||
P_RemoveSavegameMobj((mobj_t *)currentthinker); // item isn't saved, don't remove it
|
P_RemoveSavegameMobj((mobj_t *)currentthinker); // item isn't saved, don't remove it
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
(next->prev = currentthinker->prev)->next = next;
|
||||||
|
R_DestroyLevelInterpolators(currentthinker);
|
||||||
Z_Free(currentthinker);
|
Z_Free(currentthinker);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// we don't want the removed mobjs to come back
|
// we don't want the removed mobjs to come back
|
||||||
|
|
|
@ -3130,14 +3130,14 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
if (!playerstarts[numcoopstarts])
|
if (!playerstarts[numcoopstarts])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
globalweather = mapheaderinfo[gamemap-1]->weather;
|
||||||
|
|
||||||
// set up world state
|
// set up world state
|
||||||
P_SpawnSpecials(fromnetsave);
|
P_SpawnSpecials(fromnetsave);
|
||||||
|
|
||||||
if (loadprecip) // ugly hack for P_NetUnArchiveMisc (and P_LoadNetGame)
|
if (loadprecip) // ugly hack for P_NetUnArchiveMisc (and P_LoadNetGame)
|
||||||
P_SpawnPrecipitation();
|
P_SpawnPrecipitation();
|
||||||
|
|
||||||
globalweather = mapheaderinfo[gamemap-1]->weather;
|
|
||||||
|
|
||||||
#ifdef HWRENDER // not win32 only 19990829 by Kin
|
#ifdef HWRENDER // not win32 only 19990829 by Kin
|
||||||
if (rendermode != render_soft && rendermode != render_none)
|
if (rendermode != render_soft && rendermode != render_none)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue