Fixes bug in map reader that caused actor variations to default to seed 0. Fixes #1861.
Fixes maps that were affected by this bug. This was SVN commit r13264.
This commit is contained in:
parent
dab9175f30
commit
ca40764dc6
BIN
binaries/data/mods/public/maps/scenarios/Sandbox - Britons.xml
(Stored with Git LFS)
BIN
binaries/data/mods/public/maps/scenarios/Sandbox - Britons.xml
(Stored with Git LFS)
Binary file not shown.
BIN
binaries/data/mods/public/maps/scenarios/Sandbox - Mauryans.xml
(Stored with Git LFS)
BIN
binaries/data/mods/public/maps/scenarios/Sandbox - Mauryans.xml
(Stored with Git LFS)
Binary file not shown.
BIN
binaries/data/mods/public/maps/scenarios/Sandbox - Persians.xml
(Stored with Git LFS)
BIN
binaries/data/mods/public/maps/scenarios/Sandbox - Persians.xml
(Stored with Git LFS)
Binary file not shown.
@ -954,7 +954,7 @@ int CXMLReader::ReadEntities(XMBElement parent, double end_time)
|
||||
int PlayerID = 0;
|
||||
CFixedVector3D Position;
|
||||
CFixedVector3D Orientation;
|
||||
long Seed = 0;
|
||||
long Seed = -1;
|
||||
|
||||
// Obstruction control groups.
|
||||
entity_id_t ControlGroup = INVALID_ENTITY;
|
||||
@ -1004,7 +1004,12 @@ int CXMLReader::ReadEntities(XMBElement parent, double end_time)
|
||||
else if (element_name == el_actor)
|
||||
{
|
||||
XMBAttributeList attrs = setting.GetAttributes();
|
||||
Seed = attrs.GetNamedItem(at_seed).ToLong();
|
||||
CStr seedStr = attrs.GetNamedItem(at_seed);
|
||||
if (!seedStr.empty())
|
||||
{
|
||||
Seed = seedStr.ToLong();
|
||||
ENSURE(Seed >= 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
debug_warn(L"Invalid map XML data");
|
||||
|
Loading…
Reference in New Issue
Block a user