Revert "- avoid double linking to and unlinking from the world for actors."
This reverts commit 8fc9f1e5ef.
As I already feared, this does not work right. The entire linking/unlinking code is simply too fragile. So no protection here against inept tinkering.
This commit is contained in:
parent
3ef806c2e9
commit
043de8c780
3 changed files with 1 additions and 15 deletions
|
|
@ -286,12 +286,6 @@ void P_LineOpening (FLineOpening &open, AActor *actor, const line_t *linedef, co
|
|||
void AActor::UnlinkFromWorld (FLinkContext *ctx)
|
||||
{
|
||||
if (ctx != nullptr) ctx->sector_list = nullptr;
|
||||
if (!(flags8 & MF8_LINKEDTOWORLD))
|
||||
{
|
||||
//assert(false);
|
||||
return;
|
||||
}
|
||||
flags8 &= ~MF8_LINKEDTOWORLD;
|
||||
if (!(flags & MF_NOSECTOR))
|
||||
{
|
||||
// invisible things don't need to be in sector list
|
||||
|
|
@ -449,12 +443,6 @@ bool AActor::FixMapthingPos()
|
|||
|
||||
void AActor::LinkToWorld(FLinkContext *ctx, bool spawningmapthing, sector_t *sector)
|
||||
{
|
||||
if (flags8 & MF8_LINKEDTOWORLD)
|
||||
{
|
||||
//assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
bool spawning = spawningmapthing;
|
||||
|
||||
if (spawning)
|
||||
|
|
@ -480,7 +468,6 @@ void AActor::LinkToWorld(FLinkContext *ctx, bool spawningmapthing, sector_t *sec
|
|||
Sector = sector;
|
||||
subsector = Level->PointInRenderSubsector(Pos()); // this is from the rendering nodes, not the gameplay nodes!
|
||||
section = subsector->section;
|
||||
flags8 |= MF8_LINKEDTOWORLD;
|
||||
|
||||
if (!(flags & MF_NOSECTOR))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue