summaryrefslogtreecommitdiffstats
path: root/source/Entities/ProjectileEntity.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-30 14:24:03 +0200
committermadmaxoft <github@xoft.cz>2013-08-30 14:24:03 +0200
commit17ad4c2610f2c33d5b4a8b42b7d4b8fbda9ade32 (patch)
treefeaaf5bf652bfdc542dee9b9c452391531aee6ba /source/Entities/ProjectileEntity.h
parentImplemented basic physics for projectiles. (diff)
downloadcuberite-17ad4c2610f2c33d5b4a8b42b7d4b8fbda9ade32.tar
cuberite-17ad4c2610f2c33d5b4a8b42b7d4b8fbda9ade32.tar.gz
cuberite-17ad4c2610f2c33d5b4a8b42b7d4b8fbda9ade32.tar.bz2
cuberite-17ad4c2610f2c33d5b4a8b42b7d4b8fbda9ade32.tar.lz
cuberite-17ad4c2610f2c33d5b4a8b42b7d4b8fbda9ade32.tar.xz
cuberite-17ad4c2610f2c33d5b4a8b42b7d4b8fbda9ade32.tar.zst
cuberite-17ad4c2610f2c33d5b4a8b42b7d4b8fbda9ade32.zip
Diffstat (limited to 'source/Entities/ProjectileEntity.h')
-rw-r--r--source/Entities/ProjectileEntity.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/Entities/ProjectileEntity.h b/source/Entities/ProjectileEntity.h
index 7a97a2215..de0366014 100644
--- a/source/Entities/ProjectileEntity.h
+++ b/source/Entities/ProjectileEntity.h
@@ -103,8 +103,17 @@ public:
/// Creates a new arrow with psNoPickup state and default damage modifier coeff
cArrowEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d a_Speed);
+ /// Creates a new arrow as shot by a player, initializes it from the player object
+ cArrowEntity(cPlayer & a_Player, double a_Force);
+
// tolua_begin
+ /// Returns the initial arrow position, as defined by the player eye position + adjustment.
+ static Vector3d PosFromPlayerPos(const cPlayer & a_Player);
+
+ /// Returns the initial arrow speed, as defined by the player look vector and the force coefficient
+ static Vector3d SpeedFromPlayerLook(const cPlayer & a_Player, double a_Force);
+
/// Returns whether the arrow can be picked up by players
ePickupState GetPickupState(void) const { return m_PickupState; }