summaryrefslogtreecommitdiffstats
path: root/src/Entities/Boat.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-02-24 12:58:57 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2014-02-24 12:58:57 +0100
commit145b3492e7b27abb5a5a8aca1b37cb98ba03a772 (patch)
tree2d66d781228cd46e99b37bc94830b63648d6e222 /src/Entities/Boat.cpp
parentMerge pull request #669 from xdot/master (diff)
downloadcuberite-145b3492e7b27abb5a5a8aca1b37cb98ba03a772.tar
cuberite-145b3492e7b27abb5a5a8aca1b37cb98ba03a772.tar.gz
cuberite-145b3492e7b27abb5a5a8aca1b37cb98ba03a772.tar.bz2
cuberite-145b3492e7b27abb5a5a8aca1b37cb98ba03a772.tar.lz
cuberite-145b3492e7b27abb5a5a8aca1b37cb98ba03a772.tar.xz
cuberite-145b3492e7b27abb5a5a8aca1b37cb98ba03a772.tar.zst
cuberite-145b3492e7b27abb5a5a8aca1b37cb98ba03a772.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Boat.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Entities/Boat.cpp b/src/Entities/Boat.cpp
index 67df201ce..94b24c5af 100644
--- a/src/Entities/Boat.cpp
+++ b/src/Entities/Boat.cpp
@@ -89,6 +89,7 @@ void cBoat::Tick(float a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
BroadcastMovementUpdate();
+
SetSpeed(GetSpeed() * 0.97); // Slowly decrease the speed
if ((POSY_TOINT < 0) || (POSY_TOINT > cChunkDef::Height))
@@ -98,7 +99,10 @@ void cBoat::Tick(float a_Dt, cChunk & a_Chunk)
if (IsBlockWater(m_World->GetBlock(POSX_TOINT, POSY_TOINT, POSZ_TOINT)))
{
- SetSpeedY(1);
+ if (GetSpeedY() < 2)
+ {
+ AddSpeedY(0.2);
+ }
}
}
@@ -108,12 +112,12 @@ void cBoat::Tick(float a_Dt, cChunk & a_Chunk)
void cBoat::HandleSpeedFromAttachee(float a_Forward, float a_Sideways)
{
- if (GetSpeed().Length() > 7)
+ if (GetSpeed().Length() > 7.5)
{
return;
}
- Vector3d ToAddSpeed(m_Attachee->GetLookVector() * (a_Sideways * 1.5));
+ Vector3d ToAddSpeed = m_Attachee->GetLookVector() * (a_Sideways * 0.4) ;
ToAddSpeed.y = 0;
AddSpeed(ToAddSpeed);