This commit is contained in:
Christoph Oelckers 2019-01-10 16:13:41 +01:00
commit 203110c6fe
3 changed files with 24 additions and 9 deletions

View file

@ -2007,7 +2007,7 @@ class DSectorMarker : public DObject
};
DECLARE_CLASS(DSectorMarker, DObject)
public:
DSectorMarker(FLevelLocals *l) : SecNum(0),PolyNum(0),SideNum(0) {}
DSectorMarker(FLevelLocals *l) : Level(l), SecNum(0),PolyNum(0),SideNum(0) {}
size_t PropagateMark();
FLevelLocals *Level;
int SecNum;

View file

@ -535,7 +535,10 @@ void DSectorPlaneInterpolation::Serialize(FSerializer &arc)
("oldtexz", oldtexz)
("attached", attached);
sector->Level->interpolator.AddInterpolation(this);
if (arc.isReading())
{
sector->Level->interpolator.AddInterpolation(this);
}
}
@ -656,7 +659,10 @@ void DSectorScrollInterpolation::Serialize(FSerializer &arc)
("oldx", oldx)
("oldy", oldy);
sector->Level->interpolator.AddInterpolation(this);
if (arc.isReading())
{
sector->Level->interpolator.AddInterpolation(this);
}
}
@ -755,8 +761,10 @@ void DWallScrollInterpolation::Serialize(FSerializer &arc)
("oldx", oldx)
("oldy", oldy);
side->sector->Level->interpolator.AddInterpolation(this);
if (arc.isReading())
{
side->sector->Level->interpolator.AddInterpolation(this);
}
}
//==========================================================================
@ -879,10 +887,11 @@ void DPolyobjInterpolation::Serialize(FSerializer &arc)
("oldverts", oldverts)
("oldcx", oldcx)
("oldcy", oldcy);
if (arc.isReading()) bakverts.Resize(oldverts.Size());
poly->GetLevel()->interpolator.AddInterpolation(this);
if (arc.isReading())
{
bakverts.Resize(oldverts.Size());
poly->GetLevel()->interpolator.AddInterpolation(this);
}
}

View file

@ -1881,6 +1881,12 @@ FxExpression *FxMinusSign::Resolve(FCompileContext& ctx)
delete this;
return e;
}
else if (Operand->ValueType == TypeBool)
{
Operand = new FxIntCast(Operand, true);
Operand = Operand->Resolve(ctx);
assert(Operand != nullptr);
}
ValueType = Operand->ValueType;
return this;
}