Save StaticSaveVar as property in Objects.c

Otherwise, you'd have to re-set it every time you edit objects files in the editor.
stable-5.4
Sven Eberhardt 2013-12-30 03:09:13 +01:00
parent 56f985a017
commit 0db19586c8
1 changed files with 1 additions and 0 deletions

View File

@ -286,6 +286,7 @@ global func SaveScenarioObject(props)
v = GetEnergy(); if (v != def.MaxEnergy/1000) props->AddCall("Energy", this, "DoEnergy", v-def.MaxEnergy/1000);
v = this.Visibility; if (v != def.Visibility) props->AddSet ("Visibility", this, "Visibility", GetBitmaskNameByValue(v, "VIS_"));
v = this.Plane; if (v != def.Plane) props->AddSet ("Plane", this, "Plane", v);
v = this.StaticSaveVar; if (v) props->AddSet ("StaticSaveVar", this, "StaticSaveVar", v);
// update position on objects that had a shape change through rotation because creation at def bottom would incur a vertical offset
if (GetR() && !Contained()) props->AddCall("SetPosition", this, "SetPosition", GetX(), GetY());
// Commands: Could store the whole command stack using AppendCommand.