From b32a60106f78971da034a457cd091c7e69c5aec8 Mon Sep 17 00:00:00 2001 From: "keyboard.osh@gmail.com" Date: Sat, 23 Mar 2013 04:33:47 +0000 Subject: Added helper functions AddSpeed, AddSpeedX, AddSpeedY, AddSpeedZ, AddPosition, AddPosX, AddPosY, AddPosZ. Made sure that all entites use these helper functions. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1299 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Mobs/Monster.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/Mobs/Monster.cpp') diff --git a/source/Mobs/Monster.cpp b/source/Mobs/Monster.cpp index e8d8f7571..8867c7e60 100644 --- a/source/Mobs/Monster.cpp +++ b/source/Mobs/Monster.cpp @@ -142,7 +142,11 @@ void cMonster::Tick(float a_Dt, MTRand & a_TickRandom) } } } - + + HandlePhysics(a_Dt); + BroadcastMovementUpdate(); + MoveToCorrectChunk(); + Vector3d Distance = m_Destination - GetPosition(); if (Distance.SqrLength() > 0.1f) { @@ -153,10 +157,6 @@ void cMonster::Tick(float a_Dt, MTRand & a_TickRandom) SetPitch( Pitch ); } - HandlePhysics(a_Dt); - BroadcastMovementUpdate(); - MoveToCorrectChunk(); - switch (m_EMState) { case IDLE: -- cgit v1.2.3