summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-17 10:44:23 +0100
committermadmaxoft <github@xoft.cz>2014-01-17 10:44:23 +0100
commited1d336614173daaecf0f5c43e8a174970cef631 (patch)
tree3d3526ac7a8bd61a6eaf03293d4197a71dd9200f /src/Entities/ProjectileEntity.cpp
parentProtocol 1.7: More output on unknown packets / protocol states. (diff)
parentChanged newline character because of issues (diff)
downloadcuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar
cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar.gz
cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar.bz2
cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar.lz
cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar.xz
cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.tar.zst
cuberite-ed1d336614173daaecf0f5c43e8a174970cef631.zip
Diffstat (limited to '')
-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..76365076f 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()
+ GetRot().x, 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(GetRot().x), 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()
+ GetRot().x, GetPitch()
);
}