summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-19 14:55:22 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-19 14:55:22 +0100
commit82b2290b74519ab86d6abae463cbe0c1d8ac5868 (patch)
tree98855d56f18990731d88c283c6990d98b3d26245 /src/Entities/ProjectileEntity.cpp
parentMinecart collision and general improvements (diff)
parentUpdated core (diff)
downloadcuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar.gz
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar.bz2
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar.lz
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar.xz
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar.zst
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.zip
Diffstat (limited to 'src/Entities/ProjectileEntity.cpp')
-rw-r--r--src/Entities/ProjectileEntity.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index 9e5069ba6..12ce9a303 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -206,7 +206,7 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, const Ve
m_IsInGround(false)
{
SetSpeed(a_Speed);
- SetRotationFromSpeed();
+ SetYawFromSpeed();
SetPitchFromSpeed();
}
@@ -350,7 +350,7 @@ void cProjectileEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
NewSpeed.y += m_Gravity / 20;
NewSpeed *= TracerCallback.GetSlowdownCoeff();
SetSpeed(NewSpeed);
- SetRotationFromSpeed();
+ SetYawFromSpeed();
SetPitchFromSpeed();
// DEBUG:
@@ -358,7 +358,7 @@ void cProjectileEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
m_UniqueID,
GetPosX(), GetPosY(), GetPosZ(),
GetSpeedX(), GetSpeedY(), GetSpeedZ(),
- GetRotation(), GetPitch()
+ GetYaw(), GetPitch()
);
}
@@ -369,7 +369,7 @@ void cProjectileEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
void cProjectileEntity::SpawnOn(cClientHandle & a_Client)
{
// Default spawning - use the projectile kind to spawn an object:
- a_Client.SendSpawnObject(*this, m_ProjectileKind, 12, ANGLE_TO_PROTO(GetRotation()), ANGLE_TO_PROTO(GetPitch()));
+ a_Client.SendSpawnObject(*this, m_ProjectileKind, 12, ANGLE_TO_PROTO(GetYaw()), ANGLE_TO_PROTO(GetPitch()));
a_Client.SendEntityMetadata(*this);
}
@@ -402,11 +402,11 @@ cArrowEntity::cArrowEntity(cEntity * a_Creator, double a_X, double a_Y, double a
{
SetSpeed(a_Speed);
SetMass(0.1);
- SetRotationFromSpeed();
+ SetYawFromSpeed();
SetPitchFromSpeed();
LOGD("Created arrow %d with speed {%.02f, %.02f, %.02f} and rot {%.02f, %.02f}",
m_UniqueID, GetSpeedX(), GetSpeedY(), GetSpeedZ(),
- GetRotation(), GetPitch()
+ GetYaw(), GetPitch()
);
}