diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-10-23 14:59:42 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-10-23 14:59:42 +0200 |
commit | 72bb299a4a4f74840c3b368c6669ddc3d32006ee (patch) | |
tree | 748fee756010b1f36aa95162f762e21ee0d19c0a /src/Entities/ThrownSnowballEntity.cpp | |
parent | Merge branch 'master' into ChunkLoader (diff) | |
parent | Fixed a crash in redstone simulator. (diff) | |
download | cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.gz cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.bz2 cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.lz cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.xz cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.zst cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.zip |
Diffstat (limited to 'src/Entities/ThrownSnowballEntity.cpp')
-rw-r--r-- | src/Entities/ThrownSnowballEntity.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
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); + } +} + + + + |