summaryrefslogtreecommitdiffstats
path: root/src/Entities/ThrownSnowballEntity.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-23 08:40:39 +0200
committerMattes D <github@xoft.cz>2014-10-23 08:40:39 +0200
commitf8c54f4243049abbcafff1e96f994f742ea9f50d (patch)
tree67fe10bfea90cbb21952039bd795666682d43ad5 /src/Entities/ThrownSnowballEntity.h
parentCompile fix? (diff)
parentMerge pull request #1559 from mc-server/nullptr (diff)
downloadcuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar
cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar.gz
cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar.bz2
cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar.lz
cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar.xz
cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar.zst
cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.zip
Diffstat (limited to 'src/Entities/ThrownSnowballEntity.h')
-rw-r--r--src/Entities/ThrownSnowballEntity.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/Entities/ThrownSnowballEntity.h b/src/Entities/ThrownSnowballEntity.h
index 8d195ced1..f806996cc 100644
--- a/src/Entities/ThrownSnowballEntity.h
+++ b/src/Entities/ThrownSnowballEntity.h
@@ -1,6 +1,11 @@
-//
-// ThrownSnowballEntity.h
-//
+
+// ThrownSnowballEntity.h
+
+// Declares the cThrownSnowballEntity representing a snowball that has been thrown
+
+
+
+
#pragma once
@@ -29,23 +34,8 @@ protected:
// cProjectileEntity overrides:
virtual void OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) override;
- virtual void OnHitEntity (cEntity & a_EntityHit, const Vector3d & a_HitPos) override;
- virtual void Tick (float a_Dt, cChunk & a_Chunk) override
- {
- if (m_DestroyTimer > 0)
- {
- m_DestroyTimer--;
- if (m_DestroyTimer == 0)
- {
- Destroy();
- return;
- }
- }
- else
- {
- super::Tick(a_Dt, a_Chunk);
- }
- }
+ virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) override;
+ virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
private:
@@ -53,3 +43,7 @@ private:
int m_DestroyTimer;
} ; // tolua_export
+
+
+
+