mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
FIXE ERROR: CCmpPosition::GetPosition called on entity when IsInWorld is false, when you save a map with garrisoned units, thx to daniel for report
This was SVN commit r16769.
This commit is contained in:
@@ -347,7 +347,10 @@ void CMapWriter::WriteXML(const VfsPath& filename,
|
||||
CmpPtr<ICmpPosition> cmpPosition(sim, ent);
|
||||
if (cmpPosition)
|
||||
{
|
||||
CFixedVector3D pos = cmpPosition->GetPosition();
|
||||
CFixedVector3D pos;
|
||||
if (cmpPosition->IsInWorld())
|
||||
pos = cmpPosition->GetPosition();
|
||||
|
||||
CFixedVector3D rot = cmpPosition->GetRotation();
|
||||
{
|
||||
XML_Element("Position");
|
||||
|
||||
Reference in New Issue
Block a user