1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add particles

This commit is contained in:
Jeija 2012-12-31 19:33:36 +01:00 committed by PilzAdam
parent 443bbe6a78
commit 61f5ca6b16
9 changed files with 370 additions and 1 deletions

View file

@ -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