summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index bed99837d..488d18f7a 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -36,6 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "guiChatConsole.h"
#include "config.h"
#include "clouds.h"
+#include "particles.h"
#include "camera.h"
#include "farmesh.h"
#include "mapblock.h"
@@ -2399,6 +2400,13 @@ void the_game(
else
{
dig_time_complete = params.time;
+ if (g_settings->getBool("enable_particles"))
+ {
+ const ContentFeatures &features =
+ client.getNodeDefManager()->get(n);
+ addPunchingParticles
+ (gamedef, smgr, player, nodepos, features.tiles);
+ }
}
if(dig_time_complete >= 0.001)
@@ -2430,6 +2438,14 @@ void the_game(
MapNode wasnode = map.getNode(nodepos);
client.removeNode(nodepos);
+ if (g_settings->getBool("enable_particles"))
+ {
+ const ContentFeatures &features =
+ client.getNodeDefManager()->get(wasnode);
+ addDiggingParticles
+ (gamedef, smgr, player, nodepos, features.tiles);
+ }
+
dig_time = 0;
digging = false;
@@ -2698,6 +2714,12 @@ void the_game(
farmesh->update(v2f(player_position.X, player_position.Z),
brightness, farmesh_range);
}
+
+ /*
+ Update particles
+ */
+
+ allparticles_step(dtime, client.getEnv());
/*
Fog