summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2012-03-13 18:56:12 +0100
committerPerttu Ahola <celeron55@gmail.com>2012-03-15 21:45:44 +0200
commit807a0d313ba667356ee8af8ef5ae82b6c4881d15 (patch)
treec4674e1c193cfcf8359c788ed5894d3cc1849648 /src/game.cpp
parentf9a66c5d46b225d0ddbbad939232348bc5ebf959 (diff)
downloadminetest-807a0d313ba667356ee8af8ef5ae82b6c4881d15.tar.gz
minetest-807a0d313ba667356ee8af8ef5ae82b6c4881d15.tar.bz2
minetest-807a0d313ba667356ee8af8ef5ae82b6c4881d15.zip
MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric light, removed footprints
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 90856effc..b1cc0bfe5 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1038,8 +1038,6 @@ void the_game(
float object_hit_delay_timer = 0.0;
float time_from_last_punch = 10;
- float crack_update_timer = 0.0;
-
bool invert_mouse = g_settings->getBool("invert_mouse");
bool respawn_menu_active = false;
@@ -1185,7 +1183,6 @@ void the_game(
if(object_hit_delay_timer >= 0)
object_hit_delay_timer -= dtime;
time_from_last_punch += dtime;
- crack_update_timer += dtime;
g_profiler->add("Elapsed time", dtime);
g_profiler->avg("FPS", 1./dtime);
@@ -1908,7 +1905,7 @@ void the_game(
if(!digging)
{
client.interact(1, pointed_old);
- client.clearTempMod(pointed_old.node_undersurface);
+ client.setCrack(-1, v3s16(0,0,0));
dig_time = 0.0;
}
}
@@ -2003,20 +2000,15 @@ void the_game(
}
else if(dig_index < CRACK_ANIMATION_LENGTH)
{
- // Limit crack update speed
- if(crack_update_timer >= 0.1){
- crack_update_timer = 0.0;
- //infostream<<"dig_index="<<dig_index<<std::endl;
- //TimeTaker timer("client.setTempMod");
- client.setTempMod(nodepos,
- NodeMod(NODEMOD_CRACK, dig_index));
- }
+ //TimeTaker timer("client.setTempMod");
+ //infostream<<"dig_index="<<dig_index<<std::endl;
+ client.setCrack(dig_index, nodepos);
}
else
{
infostream<<"Digging completed"<<std::endl;
client.interact(2, pointed);
- client.clearTempMod(nodepos);
+ client.setCrack(-1, v3s16(0,0,0));
client.removeNode(nodepos);
dig_time = 0;
@@ -2171,8 +2163,6 @@ void the_game(
u32 daynight_ratio = client.getDayNightRatio();
u8 light8 = decode_light((daynight_ratio * LIGHT_SUN) / 1000);
brightness = (float)light8/255.0;
- // Make night look good
- brightness = brightness * 1.15 - 0.15;
video::SColor bgcolor;
if(brightness >= 0.2 && brightness < 0.7)
bgcolor = video::SColor(