mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-05-31 09:21:36 +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
|
@ -5229,12 +5229,13 @@ void A_Weave(AActor *self, int xyspeed, int zspeed, double xydist, double zdist)
|
|||
}
|
||||
else
|
||||
{
|
||||
self->UnlinkFromWorld ();
|
||||
FLinkContext ctx;
|
||||
self->UnlinkFromWorld (&ctx);
|
||||
self->flags |= MF_NOBLOCKMAP;
|
||||
// We need to do portal offsetting here explicitly, because SetXY cannot do that.
|
||||
newpos -= self->Pos().XY();
|
||||
self->SetXY(self->Vec2Offset(newpos.X, newpos.Y));
|
||||
self->LinkToWorld ();
|
||||
self->LinkToWorld (&ctx);
|
||||
}
|
||||
self->WeaveIndexXY = weaveXY;
|
||||
}
|
||||
|
@ -6862,17 +6863,18 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetSize)
|
|||
double oldradius = self->radius;
|
||||
double oldheight = self->Height;
|
||||
|
||||
self->UnlinkFromWorld();
|
||||
FLinkContext ctx;
|
||||
self->UnlinkFromWorld(&ctx);
|
||||
self->radius = newradius;
|
||||
self->Height = newheight;
|
||||
self->LinkToWorld();
|
||||
self->LinkToWorld(&ctx);
|
||||
|
||||
if (testpos && !P_TestMobjLocation(self))
|
||||
{
|
||||
self->UnlinkFromWorld();
|
||||
self->UnlinkFromWorld(&ctx);
|
||||
self->radius = oldradius;
|
||||
self->Height = oldheight;
|
||||
self->LinkToWorld();
|
||||
self->LinkToWorld(&ctx);
|
||||
ACTION_RETURN_BOOL(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue