summaryrefslogtreecommitdiffstats
path: root/src/Entities/EntityEffect.cpp
diff options
context:
space:
mode:
authormathiascode <8754153+mathiascode@users.noreply.github.com>2017-08-24 11:19:40 +0200
committerLukas Pioch <lukas@zgow.de>2017-08-24 11:19:40 +0200
commit02775e52c43dbc82e08b6af8b87d8f320c05cb73 (patch)
tree66b9fd743c4e4d04a2ec8d5ffc107585bd2f963a /src/Entities/EntityEffect.cpp
parentAdded check to deactivate existing entity effects when new entity effects are added. (diff)
downloadcuberite-02775e52c43dbc82e08b6af8b87d8f320c05cb73.tar
cuberite-02775e52c43dbc82e08b6af8b87d8f320c05cb73.tar.gz
cuberite-02775e52c43dbc82e08b6af8b87d8f320c05cb73.tar.bz2
cuberite-02775e52c43dbc82e08b6af8b87d8f320c05cb73.tar.lz
cuberite-02775e52c43dbc82e08b6af8b87d8f320c05cb73.tar.xz
cuberite-02775e52c43dbc82e08b6af8b87d8f320c05cb73.tar.zst
cuberite-02775e52c43dbc82e08b6af8b87d8f320c05cb73.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/EntityEffect.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp
index cc9aaca5a..0ae50be80 100644
--- a/src/Entities/EntityEffect.cpp
+++ b/src/Entities/EntityEffect.cpp
@@ -23,7 +23,7 @@ cEntityEffect::eType cEntityEffect::GetPotionEffectType(short a_ItemDamage)
{
// Lowest four bits
// Potion effect bits are different from entity effect values
- // For reference: http://minecraft.gamepedia.com/Data_values#.22Potion_effect.22_bits
+ // For reference: https://minecraft.gamepedia.com/Data_values#.22Potion_effect.22_bits
switch (a_ItemDamage & 0x0f)
{
case 0x01: return cEntityEffect::effRegeneration;
@@ -112,9 +112,9 @@ int cEntityEffect::GetPotionEffectDuration(short a_ItemDamage)
SplashCoeff = IsPotionDrinkable(a_ItemDamage) ? 1 : 0.75;
// Ref.:
- // http://minecraft.gamepedia.com/Data_values#.22Tier.22_bit
- // http://minecraft.gamepedia.com/Data_values#.22Extended_duration.22_bit
- // http://minecraft.gamepedia.com/Data_values#.22Splash_potion.22_bit
+ // https://minecraft.gamepedia.com/Data_values#.22Tier.22_bit
+ // https://minecraft.gamepedia.com/Data_values#.22Extended_duration.22_bit
+ // https://minecraft.gamepedia.com/Data_values#.22Splash_potion.22_bit
return static_cast<int>(base * TierCoeff * ExtCoeff * SplashCoeff);
}
@@ -126,7 +126,7 @@ int cEntityEffect::GetPotionEffectDuration(short a_ItemDamage)
bool cEntityEffect::IsPotionDrinkable(short a_ItemDamage)
{
// Drinkable potion if 13th lowest bit is set
- // Ref.: http://minecraft.gamepedia.com/Potions#Data_value_table
+ // Ref.: https://minecraft.gamepedia.com/Potions#Data_value_table
return ((a_ItemDamage & 0x2000) != 0);
}