mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- fixed: UpdateSectorRenderList may not be called when spawning mapthings.
At this time the portals have not been initialized yet and doing this here would trash the cached previous coordinate.
This commit is contained in:
parent
8c1eb201eb
commit
c30d5d42a2
1 changed files with 10 additions and 4 deletions
|
@ -396,14 +396,19 @@ bool AActor::FixMapthingPos()
|
||||||
|
|
||||||
void AActor::LinkToWorld(bool spawningmapthing, sector_t *sector)
|
void AActor::LinkToWorld(bool spawningmapthing, sector_t *sector)
|
||||||
{
|
{
|
||||||
if (spawningmapthing && (flags4 & MF4_FIXMAPTHINGPOS) && sector == NULL)
|
bool spawning = spawningmapthing;
|
||||||
|
|
||||||
|
if (spawning)
|
||||||
{
|
{
|
||||||
if (FixMapthingPos()) spawningmapthing = false;
|
if ((flags4 & MF4_FIXMAPTHINGPOS) && sector == NULL)
|
||||||
|
{
|
||||||
|
if (FixMapthingPos()) spawning = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sector == NULL)
|
if (sector == NULL)
|
||||||
{
|
{
|
||||||
if (!spawningmapthing || numgamenodes == 0)
|
if (!spawning || numgamenodes == 0)
|
||||||
{
|
{
|
||||||
sector = P_PointInSector(Pos());
|
sector = P_PointInSector(Pos());
|
||||||
}
|
}
|
||||||
|
@ -499,7 +504,8 @@ void AActor::LinkToWorld(bool spawningmapthing, sector_t *sector)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UpdateRenderSectorList();
|
// Portal links cannot be done unless the level is fully initialized.
|
||||||
|
if (!spawningmapthing) UpdateRenderSectorList();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AActor::SetOrigin(double x, double y, double z, bool moving)
|
void AActor::SetOrigin(double x, double y, double z, bool moving)
|
||||||
|
|
Loading…
Reference in a new issue