Only set player dirty flag if values change

stable-0.4
ShadowNinja 2014-08-28 20:22:19 -04:00
parent cd0df0d5e7
commit 8b3135a643
1 changed files with 8 additions and 4 deletions

View File

@ -142,18 +142,21 @@ public:
virtual void setPosition(const v3f &position)
{
if (position != m_position)
m_dirty = true;
m_position = position;
}
void setPitch(f32 pitch)
{
if (pitch != m_pitch)
m_dirty = true;
m_pitch = pitch;
}
virtual void setYaw(f32 yaw)
{
if (yaw != m_yaw)
m_dirty = true;
m_yaw = yaw;
}
@ -175,6 +178,7 @@ public:
virtual void setBreath(u16 breath)
{
if (breath != m_breath)
m_dirty = true;
m_breath = breath;
}