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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user