forked from 0ad/0ad
Minor change to support on-demand texture loading; fixed backwards orientation issue.
This was SVN commit r413.
This commit is contained in:
parent
6caf7c7466
commit
05ae51351c
@ -110,7 +110,7 @@ void CMapReader::UnpackTerrain(CFileUnpacker& unpacker)
|
|||||||
// ack; mismatch between texture datasets?
|
// ack; mismatch between texture datasets?
|
||||||
handle=0;
|
handle=0;
|
||||||
} else {
|
} else {
|
||||||
handle=texentry->m_Handle;
|
handle=texentry->GetHandle();
|
||||||
}
|
}
|
||||||
m_TerrainTextures.push_back(handle);
|
m_TerrainTextures.push_back(handle);
|
||||||
}
|
}
|
||||||
@ -157,7 +157,7 @@ void CMapReader::ApplyData(CFileUnpacker& unpacker)
|
|||||||
CBaseEntity* templateObject = g_EntityTemplateCollection.getTemplateByActor( objentry );
|
CBaseEntity* templateObject = g_EntityTemplateCollection.getTemplateByActor( objentry );
|
||||||
if( templateObject )
|
if( templateObject )
|
||||||
{
|
{
|
||||||
CVector3D orient = -((CMatrix3D*)m_Objects[i].m_Transform)->GetIn();
|
CVector3D orient = ((CMatrix3D*)m_Objects[i].m_Transform)->GetIn();
|
||||||
CVector3D position = ((CMatrix3D*)m_Objects[i].m_Transform)->GetTranslation();
|
CVector3D position = ((CMatrix3D*)m_Objects[i].m_Transform)->GetTranslation();
|
||||||
|
|
||||||
g_EntityManager.create( templateObject, position, atan2( -orient.X, -orient.Z ) );
|
g_EntityManager.create( templateObject, position, atan2( -orient.X, -orient.Z ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user