From 0c0c762412922b784aaf154b51a8d5d547d3f86f Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 21 Oct 2014 21:25:52 +0200 Subject: Exported individual projectile classes to Lua API. They used to be exported, but then they were moved to separate files and those werent' added to the ToLua processing list. --- src/Entities/ThrownSnowballEntity.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/Entities/ThrownSnowballEntity.cpp') diff --git a/src/Entities/ThrownSnowballEntity.cpp b/src/Entities/ThrownSnowballEntity.cpp index 496397100..88e39d22e 100644 --- a/src/Entities/ThrownSnowballEntity.cpp +++ b/src/Entities/ThrownSnowballEntity.cpp @@ -43,3 +43,28 @@ void cThrownSnowballEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & m_DestroyTimer = 5; } + + + + + +void cThrownSnowballEntity::Tick(float a_Dt, cChunk & a_Chunk) +{ + if (m_DestroyTimer > 0) + { + m_DestroyTimer--; + if (m_DestroyTimer == 0) + { + Destroy(); + return; + } + } + else + { + super::Tick(a_Dt, a_Chunk); + } +} + + + + -- cgit v1.2.3