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/FallingBlock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/FallingBlock.cpp') diff --git a/source/FallingBlock.cpp b/source/FallingBlock.cpp index 9fbf498e2..5edae6283 100644 --- a/source/FallingBlock.cpp +++ b/source/FallingBlock.cpp @@ -43,8 +43,8 @@ void cFallingBlock::SpawnOn(cClientHandle & a_ClientHandle) void cFallingBlock::Tick(float a_Dt, MTRand & a_TickRandom) { float MilliDt = a_Dt * 0.001f; - SetSpeedY(GetSpeedY() - (MilliDt * 9.8f)); - SetPosY(GetPosY() + (GetSpeedY() * MilliDt)); + AddSpeedY(MilliDt * -9.8f); + AddPosY(GetSpeedY() * MilliDt); // GetWorld()->BroadcastTeleportEntity(*this); // Test position -- cgit v1.2.3