File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,11 @@ void Creeper::tick()
2929
3030 m_swell += swellDir;
3131
32- if (m_swell < 0 ) {
32+ if (m_swell < 0 )
33+ {
3334 m_swell = 0 ;
3435 }
35-
36- if (m_swell >= MAX_SWELL)
36+ else if (m_swell > MAX_SWELL)
3737 {
3838 m_swell = MAX_SWELL;
3939 }
@@ -82,7 +82,7 @@ void Creeper::checkHurtTarget(Entity* pEnt, float f)
8282 }
8383}
8484
85- float Creeper::getSwelling (float f)
85+ float Creeper::getSwelling (float f) const
8686{
8787 return (m_oldSwell + (m_swell - m_oldSwell) * f) / 28 .0f ;
8888}
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ class Creeper : public Monster
1313 void tick () override ;
1414 std::string getHurtSound () const override { return " mob.creeper" ; }
1515 std::string getDeathSound () const override { return " mob.creeperdeath" ; }
16- float getSwelling (float f);
17- int getSwellDir () { return m_entityData.get <int >(DATA_SWELL_DIR); }
16+ float getSwelling (float f) const ;
17+ int getSwellDir () const { return m_entityData.get <int >(DATA_SWELL_DIR); }
1818 void setSwellDir (int value) { m_entityData.set <int >(DATA_SWELL_DIR, value); }
1919 int getDeathLoot () const override { return ITEM_SULPHUR; }
2020
You can’t perform that action at this time.
0 commit comments