fiddling with energy usage and hunger

This commit is contained in:
darkrose 2015-07-25 22:47:03 +10:00
parent cb866f6407
commit 1069721a08
2 changed files with 5 additions and 5 deletions

View File

@ -3550,9 +3550,9 @@ void ClientEnvironment::step(float dtime)
if (m_hunger_interval.step(dtime,5.0)) {
f32 speed = lplayer->getSpeed().getLength();
s8 hungry = 0;
s32 chance = 100;
s32 chance = 200;
if (speed > 1.0) {
chance = 20;
chance = 50;
if (speed > 50.0) {
chance = 0;
hungry = 1;

View File

@ -1009,13 +1009,13 @@ void LocalPlayer::applyControl(float dtime)
// Use the oscillating value for getting out of water
// (so that the player doesn't fly on the surface)
v3f speed = getSpeed();
speed.Y = 1.2*BS;
speed.Y = 0.8*BS;
setSpeed(speed);
swimming_up = true;
if (!energy_effectf)
m_energy -= dtime;
m_energy -= dtime*0.8;
}else if (in_water_stable && !energy_effectf) {
m_energy -= dtime;
m_energy -= dtime*0.8;
}
}
if (control.up) {