summaryrefslogtreecommitdiff
path: root/src/clientenvironment.cpp
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2017-09-12 19:48:09 +0200
committerGitHub <noreply@github.com>2017-09-12 19:48:09 +0200
commitee9a442ecc26f2623a1b085344d37636342973eb (patch)
tree69ee10a648f777b1086ad9c9ea12a85af6162af6 /src/clientenvironment.cpp
parent7f2a19da11f2106ecab7a074e7a7465912454e40 (diff)
downloadminetest-ee9a442ecc26f2623a1b085344d37636342973eb.tar.gz
minetest-ee9a442ecc26f2623a1b085344d37636342973eb.tar.bz2
minetest-ee9a442ecc26f2623a1b085344d37636342973eb.zip
Network: Remove large parts of deprecated legacy code (#6404)
Also remove the setting 'send_pre_v25_init' Keep old enum entries for obsolete commands
Diffstat (limited to 'src/clientenvironment.cpp')
-rw-r--r--src/clientenvironment.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/clientenvironment.cpp b/src/clientenvironment.cpp
index c409c3528..af00586c5 100644
--- a/src/clientenvironment.cpp
+++ b/src/clientenvironment.cpp
@@ -242,78 +242,6 @@ void ClientEnvironment::step(float dtime)
m_script->environment_step(dtime);
}
- // Protocol v29 make this behaviour obsolete
- if (getGameDef()->getProtoVersion() < 29) {
- if (m_lava_hurt_interval.step(dtime, 1.0)) {
- v3f pf = lplayer->getPosition();
-
- // Feet, middle and head
- v3s16 p1 = floatToInt(pf + v3f(0, BS * 0.1, 0), BS);
- MapNode n1 = m_map->getNodeNoEx(p1);
- v3s16 p2 = floatToInt(pf + v3f(0, BS * 0.8, 0), BS);
- MapNode n2 = m_map->getNodeNoEx(p2);
- v3s16 p3 = floatToInt(pf + v3f(0, BS * 1.6, 0), BS);
- MapNode n3 = m_map->getNodeNoEx(p3);
-
- u32 damage_per_second = 0;
- damage_per_second = MYMAX(damage_per_second,
- m_client->ndef()->get(n1).damage_per_second);
- damage_per_second = MYMAX(damage_per_second,
- m_client->ndef()->get(n2).damage_per_second);
- damage_per_second = MYMAX(damage_per_second,
- m_client->ndef()->get(n3).damage_per_second);
-
- if (damage_per_second != 0)
- damageLocalPlayer(damage_per_second, true);
- }
-
- /*
- Drowning
- */
- if (m_drowning_interval.step(dtime, 2.0)) {
- v3f pf = lplayer->getPosition();
-
- // head
- v3s16 p = floatToInt(pf + v3f(0, BS * 1.6, 0), BS);
- MapNode n = m_map->getNodeNoEx(p);
- ContentFeatures c = m_client->ndef()->get(n);
- u8 drowning_damage = c.drowning;
- if (drowning_damage > 0 && lplayer->hp > 0) {
- u16 breath = lplayer->getBreath();
- if (breath > 10) {
- breath = 11;
- }
- if (breath > 0) {
- breath -= 1;
- }
- lplayer->setBreath(breath);
- updateLocalPlayerBreath(breath);
- }
-
- if (lplayer->getBreath() == 0 && drowning_damage > 0) {
- damageLocalPlayer(drowning_damage, true);
- }
- }
- if (m_breathing_interval.step(dtime, 0.5)) {
- v3f pf = lplayer->getPosition();
-
- // head
- v3s16 p = floatToInt(pf + v3f(0, BS * 1.6, 0), BS);
- MapNode n = m_map->getNodeNoEx(p);
- ContentFeatures c = m_client->ndef()->get(n);
- if (!lplayer->hp) {
- lplayer->setBreath(11);
- } else if (c.drowning == 0) {
- u16 breath = lplayer->getBreath();
- if (breath <= 10) {
- breath += 1;
- lplayer->setBreath(breath);
- updateLocalPlayerBreath(breath);
- }
- }
- }
- }
-
// Update lighting on local player (used for wield item)
u32 day_night_ratio = getDayNightRatio();
{