summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/EntityEffects.h48
-rw-r--r--src/Entities/Pawn.cpp20
-rw-r--r--src/Entities/Player.cpp12
-rw-r--r--src/Entities/WitherSkullEntity.cpp2
4 files changed, 41 insertions, 41 deletions
diff --git a/src/Entities/EntityEffects.h b/src/Entities/EntityEffects.h
index e6b5bdd5d..26d2c92e5 100644
--- a/src/Entities/EntityEffects.h
+++ b/src/Entities/EntityEffects.h
@@ -9,30 +9,30 @@ public:
/** All types of entity effects (numbers correspond to IDs) */
enum eType
{
- efNoEffect = 0,
- efSpeed = 1,
- efSlowness = 2,
- efHaste = 3,
- efMiningFatigue = 4,
- efStrength = 5,
- efInstantHealth = 6,
- efInstantDamage = 7,
- efJumpBoost = 8,
- efNausia = 9,
- efRegeneration = 10,
- efResistance = 11,
- efFireResistance = 12,
- efWaterBreathing = 13,
- efInvisibility = 14,
- efBlindness = 15,
- efNightVision = 16,
- efHunger = 17,
- efWeakness = 18,
- efPoison = 19,
- efWither = 20,
- efHealthBoost = 21,
- efAbsorption = 22,
- efSaturation = 23,
+ effNoEffect = 0,
+ effSpeed = 1,
+ effSlowness = 2,
+ effHaste = 3,
+ effMiningFatigue = 4,
+ effStrength = 5,
+ effInstantHealth = 6,
+ effInstantDamage = 7,
+ effJumpBoost = 8,
+ effNausea = 9,
+ effRegeneration = 10,
+ effResistance = 11,
+ effFireResistance = 12,
+ effWaterBreathing = 13,
+ effInvisibility = 14,
+ effBlindness = 15,
+ effNightVision = 16,
+ effHunger = 17,
+ effWeakness = 18,
+ effPoison = 19,
+ effWither = 20,
+ effHealthBoost = 21,
+ effAbsorption = 22,
+ effSaturation = 23,
} ;
/** The duration of the effect */
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index 5cd493a06..a1f24138d 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -63,7 +63,7 @@ void cPawn::KilledBy(cEntity *a_Killer)
void cPawn::AddEntityEffect(cEntityEffect::eType a_EffectType, cEntityEffect a_Effect)
{
- if (a_EffectType == cEntityEffect::efNoEffect)
+ if (a_EffectType == cEntityEffect::effNoEffect)
{
return;
}
@@ -112,7 +112,7 @@ void cPawn::HandleEntityEffects(cEntityEffect::eType a_EffectType, cEntityEffect
switch (a_EffectType)
{
// Default effect behaviors
- case cEntityEffect::efInstantHealth:
+ case cEntityEffect::effInstantHealth:
{
// Base heal = 6, doubles for every increase in intensity
Heal(6 * std::pow(2, a_Effect.GetIntensity()) * a_Effect.GetDistanceModifier());
@@ -120,7 +120,7 @@ void cPawn::HandleEntityEffects(cEntityEffect::eType a_EffectType, cEntityEffect
// TODO: Harms undead
return;
}
- case cEntityEffect::efInstantDamage:
+ case cEntityEffect::effInstantDamage:
{
// Base damage = 6, doubles for every increase in intensity
int damage = 6 * std::pow(2, a_Effect.GetIntensity());
@@ -129,12 +129,12 @@ void cPawn::HandleEntityEffects(cEntityEffect::eType a_EffectType, cEntityEffect
// TODO: Heals undead
return;
}
- case cEntityEffect::efStrength:
+ case cEntityEffect::effStrength:
{
// TODO: Implement me!
return;
}
- case cEntityEffect::efWeakness:
+ case cEntityEffect::effWeakness:
{
// Damage reduction = 0.5 damage, multiplied by potion level (Weakness II = 1 damage)
//double dmg_reduc = 0.5 * (a_Effect.GetIntensity() + 1);
@@ -143,7 +143,7 @@ void cPawn::HandleEntityEffects(cEntityEffect::eType a_EffectType, cEntityEffect
// TODO: Weakened villager zombies can be turned back to villagers with the god apple
return;
}
- case cEntityEffect::efRegeneration:
+ case cEntityEffect::effRegeneration:
{
// Regen frequency = 50 ticks, divided by potion level (Regen II = 25 ticks)
int frequency = std::floor(50.0 / (double)(a_Effect.GetIntensity() + 1));
@@ -158,7 +158,7 @@ void cPawn::HandleEntityEffects(cEntityEffect::eType a_EffectType, cEntityEffect
// TODO: Doesn't effect undead
return;
}
- case cEntityEffect::efPoison:
+ case cEntityEffect::effPoison:
{
// Poison frequency = 25 ticks, divided by potion level (Poison II = 25 ticks)
int frequency = std::floor(25.0 / (double)(a_Effect.GetIntensity() + 1));
@@ -177,17 +177,17 @@ void cPawn::HandleEntityEffects(cEntityEffect::eType a_EffectType, cEntityEffect
// TODO: Doesn't effect undead or spiders
return;
}
- case cEntityEffect::efFireResistance:
+ case cEntityEffect::effFireResistance:
{
// TODO: Implement me!
return;
}
- case cEntityEffect::efSpeed:
+ case cEntityEffect::effSpeed:
{
// TODO: Implement me!
return;
}
- case cEntityEffect::efSlowness:
+ case cEntityEffect::effSlowness:
{
// TODO: Implement me!
return;
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index b4b344584..6bceab26f 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -570,7 +570,7 @@ bool cPlayer::Feed(int a_Food, double a_Saturation)
void cPlayer::FoodPoison(int a_NumTicks)
{
- AddEntityEffect(cEntityEffect::efHunger, cEntityEffect(a_NumTicks, 0, NULL));
+ AddEntityEffect(cEntityEffect::effHunger, cEntityEffect(a_NumTicks, 0, NULL));
}
@@ -1872,17 +1872,17 @@ void cPlayer::HandleEntityEffects(cEntityEffect::eType a_EffectType, cEntityEffe
switch (a_EffectType)
{
// Effects whose behaviors are overridden
- case cEntityEffect::efMiningFatigue:
+ case cEntityEffect::effMiningFatigue:
{
// TODO: Implement me!
return;
}
- case cEntityEffect::efHunger:
+ case cEntityEffect::effHunger:
{
m_FoodExhaustionLevel += 0.025; // 0.5 per second = 0.025 per tick
return;
}
- case cEntityEffect::efSaturation:
+ case cEntityEffect::effSaturation:
{
// Increase saturation 1 per tick, adds 1 for every increase in level
m_FoodSaturationLevel += (1 + a_Effect.GetIntensity());
@@ -1890,8 +1890,8 @@ void cPlayer::HandleEntityEffects(cEntityEffect::eType a_EffectType, cEntityEffe
}
// Client-side-only effects
- case cEntityEffect::efNausia:
- case cEntityEffect::efNightVision:
+ case cEntityEffect::effNausea:
+ case cEntityEffect::effNightVision:
{
return;
}
diff --git a/src/Entities/WitherSkullEntity.cpp b/src/Entities/WitherSkullEntity.cpp
index ea78bba5d..03e36a3f4 100644
--- a/src/Entities/WitherSkullEntity.cpp
+++ b/src/Entities/WitherSkullEntity.cpp
@@ -8,7 +8,7 @@
cWitherSkullEntity::cWitherSkullEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed) :
-super(pkSplashPotion, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25)
+super(pkWitherSkull, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25)
{
SetSpeed(a_Speed);
}