mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
- fixed: ADynamicLight::visibletoplayer was not initialized for placed lights when restoring a savegame.
This commit is contained in:
parent
ad713b1c25
commit
b90173ed21
1 changed files with 8 additions and 2 deletions
|
@ -48,6 +48,7 @@
|
|||
#include "doomdata.h"
|
||||
#include "r_utility.h"
|
||||
#include "portal.h"
|
||||
#include "doomstat.h"
|
||||
|
||||
|
||||
#include "gl/renderer/gl_renderer.h"
|
||||
|
@ -143,8 +144,13 @@ void ADynamicLight::Serialize(FArchive &arc)
|
|||
arc << m_Radius[0] << m_Radius[1];
|
||||
|
||||
if (lighttype == PulseLight) arc << m_lastUpdate << m_cycler;
|
||||
if (arc.IsLoading()) LinkLight();
|
||||
|
||||
if (arc.IsLoading())
|
||||
{
|
||||
// The default constructor which is used for creating objects before deserialization will not set this variable.
|
||||
// It needs to be true for all placed lights.
|
||||
visibletoplayer = true;
|
||||
LinkLight();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue