summaryrefslogtreecommitdiffstats
path: root/src/Entities/Minecart.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-26 14:13:54 +0100
committerMattes D <github@xoft.cz>2014-01-26 14:13:54 +0100
commit09ee8a1bb66106823bf16b658b9942a9ec936db9 (patch)
tree4bf5ee54c2b13adc1582d4c4af85088d0a6831d7 /src/Entities/Minecart.h
parentMerge pull request #590 from mc-server/Wolf_Fix (diff)
parentReduced unnecessary echoes (thanks xoft) (diff)
downloadcuberite-09ee8a1bb66106823bf16b658b9942a9ec936db9.tar
cuberite-09ee8a1bb66106823bf16b658b9942a9ec936db9.tar.gz
cuberite-09ee8a1bb66106823bf16b658b9942a9ec936db9.tar.bz2
cuberite-09ee8a1bb66106823bf16b658b9942a9ec936db9.tar.lz
cuberite-09ee8a1bb66106823bf16b658b9942a9ec936db9.tar.xz
cuberite-09ee8a1bb66106823bf16b658b9942a9ec936db9.tar.zst
cuberite-09ee8a1bb66106823bf16b658b9942a9ec936db9.zip
Diffstat (limited to 'src/Entities/Minecart.h')
-rw-r--r--src/Entities/Minecart.h24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/Entities/Minecart.h b/src/Entities/Minecart.h
index 874d0204e..073e78953 100644
--- a/src/Entities/Minecart.h
+++ b/src/Entities/Minecart.h
@@ -15,20 +15,6 @@
-inline bool IsBlockRail(BLOCKTYPE a_BlockType)
- {
- return (
- (a_BlockType == E_BLOCK_RAIL) ||
- (a_BlockType == E_BLOCK_ACTIVATOR_RAIL) ||
- (a_BlockType == E_BLOCK_DETECTOR_RAIL) ||
- (a_BlockType == E_BLOCK_POWERED_RAIL)
- ) ;
- }
-
-
-
-
-
class cMinecart :
public cEntity
{
@@ -79,10 +65,16 @@ protected:
*/
void HandleDetectorRailPhysics(NIBBLETYPE a_RailMeta, float a_Dt);
- /** Snaps a minecart to a rail's axis, resetting its speed */
+ /** Handles activator rails - placeholder for future implementation */
+ void HandleActivatorRailPhysics(NIBBLETYPE a_RailMeta, float a_Dt);
+
+ /** Snaps a mincecart to a rail's axis, resetting its speed
+ For curved rails, it changes the cart's direction as well as snapping it to axis */
void SnapToRail(NIBBLETYPE a_RailMeta);
- /** Tests is a solid block is in front of a cart, and stops the cart (and returns true) if so; returns false if no obstruction*/
+ /** Tests if a solid block is in front of a cart, and stops the cart (and returns true) if so; returns false if no obstruction */
bool TestBlockCollision(NIBBLETYPE a_RailMeta);
+ /** Tests if this mincecart's bounding box is intersecting another entity's bounding box (collision) and pushes mincecart away */
+ bool TestEntityCollision(NIBBLETYPE a_RailMeta);
} ;