summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pickup.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-09-29 14:59:24 +0200
committerGitHub <noreply@github.com>2019-09-29 14:59:24 +0200
commit365cbc6e1cea96741e26c9ce912b003f8fd2c62c (patch)
treef23682c47928597791c53f3a300b03494ffde417 /src/Entities/Pickup.cpp
parentCactus can now grow and will be dropped if there is no place to grow. (diff)
downloadcuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.gz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.bz2
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.lz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.xz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.zst
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Pickup.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index c63c720c0..be64e9e2f 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -93,20 +93,23 @@ protected:
-cPickup::cPickup(double a_PosX, double a_PosY, double a_PosZ, const cItem & a_Item, bool IsPlayerCreated, float a_SpeedX, float a_SpeedY, float a_SpeedZ, int a_LifetimeTicks, bool a_CanCombine)
- : cEntity(etPickup, a_PosX, a_PosY, a_PosZ, 0.2, 0.2)
- , m_Timer(0)
- , m_Item(a_Item)
- , m_bCollected(false)
- , m_bIsPlayerCreated(IsPlayerCreated)
- , m_bCanCombine(a_CanCombine)
- , m_Lifetime(cTickTime(a_LifetimeTicks))
+////////////////////////////////////////////////////////////////////////////////
+// cPickup:
+
+cPickup::cPickup(Vector3d a_Pos, const cItem & a_Item, bool IsPlayerCreated, Vector3f a_Speed, int a_LifetimeTicks, bool a_CanCombine):
+ super(etPickup, a_Pos, 0.2, 0.2),
+ m_Timer(0),
+ m_Item(a_Item),
+ m_bCollected(false),
+ m_bIsPlayerCreated(IsPlayerCreated),
+ m_bCanCombine(a_CanCombine),
+ m_Lifetime(cTickTime(a_LifetimeTicks))
{
SetGravity(-16.0f);
SetAirDrag(0.02f);
SetMaxHealth(5);
SetHealth(5);
- SetSpeed(a_SpeedX, a_SpeedY, a_SpeedZ);
+ SetSpeed(a_Speed);
}