mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-05-30 08:31:29 +00:00
- removed the global 'sector_list' variable.
If the calling code wants to recycle this it will have to pass a container variable to AActor::UnlinkFromWorld and AActor::LinkToWorld. This was changed because keeping such data in a global variable is dangerous for a set of functions that can be called from a script. Note that the scripted versions do not yet support saving of the touching_sectorlist.
This commit is contained in:
parent
5723f10cc3
commit
04ff4282ef
14 changed files with 95 additions and 107 deletions
|
@ -216,9 +216,10 @@ bool ModActorFlag(AActor *actor, FString &flagname, bool set, bool printerror)
|
|||
// If these 2 flags get changed we need to update the blockmap and sector links.
|
||||
bool linkchange = flagp == &actor->flags && (fd->flagbit == MF_NOBLOCKMAP || fd->flagbit == MF_NOSECTOR);
|
||||
|
||||
if (linkchange) actor->UnlinkFromWorld();
|
||||
FLinkContext ctx;
|
||||
if (linkchange) actor->UnlinkFromWorld(&ctx);
|
||||
ModActorFlag(actor, fd, set);
|
||||
if (linkchange) actor->LinkToWorld();
|
||||
if (linkchange) actor->LinkToWorld(&ctx);
|
||||
}
|
||||
|
||||
if (actor->CountsAsKill() && actor->health > 0) ++level.total_monsters;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue