- give thinkers a 'level' member and change linking to the chain to happen outside the constructor.

This commit is contained in:
Christoph Oelckers 2019-01-27 01:49:20 +01:00
commit 8323524014
43 changed files with 201 additions and 228 deletions

View file

@ -1415,7 +1415,7 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target, bool onsky)
}
}
DImpactDecal::StaticCreate(base->GetDecal(), linepos, line->sidedef[side], ffloor);
DImpactDecal::StaticCreate(mo->Level, base->GetDecal(), linepos, line->sidedef[side], ffloor);
}
}
}
@ -4369,7 +4369,7 @@ AActor *AActor::StaticSpawn (PClassActor *type, const DVector3 &pos, replace_t a
AActor *actor;
actor = static_cast<AActor *>(const_cast<PClassActor *>(type)->CreateNew ());
actor = static_cast<AActor *>(level.CreateThinker(type));
actor->SpawnTime = level.totaltime;
actor->SpawnOrder = level.spawnindex++;