Merge branch 'development' into cmake/warn_virtual
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -618,12 +618,6 @@ bool CBaseObject::SetPos(const Vec3& pos, int flags)
|
||||
StoreUndo("Position", true, flags);
|
||||
}
|
||||
|
||||
float terrainElevation = AzFramework::Terrain::TerrainDataRequests::GetDefaultTerrainHeight();
|
||||
AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult(terrainElevation
|
||||
, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats
|
||||
, pos.x, pos.y, AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR, nullptr);
|
||||
m_height = pos.z - terrainElevation;
|
||||
|
||||
if (!bPositionDelegated)
|
||||
{
|
||||
m_pos = pos;
|
||||
@@ -1275,14 +1269,6 @@ void CBaseObject::OnEvent(ObjectEvent event)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case EVENT_KEEP_HEIGHT:
|
||||
{
|
||||
float h = m_height;
|
||||
float newz = GetIEditor()->GetTerrainElevation(m_pos.x, m_pos.y) + m_height;
|
||||
SetPos(Vec3(m_pos.x, m_pos.y, newz));
|
||||
m_height = h;
|
||||
}
|
||||
break;
|
||||
case EVENT_CONFIG_SPEC_CHANGE:
|
||||
UpdateVisibility(!IsHidden());
|
||||
break;
|
||||
|
||||
@@ -795,8 +795,6 @@ private:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Area radius around object, where terrain is flatten and static objects removed.
|
||||
float m_flattenArea;
|
||||
//! Every object keeps for itself height above terrain.
|
||||
float m_height;
|
||||
//! Object's name.
|
||||
QString m_name;
|
||||
//! Class description for this object.
|
||||
|
||||
Reference in New Issue
Block a user