1
0

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
This commit is contained in:
keyboard.osh@gmail.com
2013-03-23 04:33:47 +00:00
parent f41b33ba80
commit b32a60106f
6 changed files with 107 additions and 24 deletions

View File

@@ -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