["Coords"] = "coords",
["Tracers"] = "enable_tracers",
["ESP"] = "enable_esp",
+ ["NodeTracers"] = "enable_node_tracers",
+ ["NodeESP"] = "enable_node_esp",
["CheatHUD"] = "cheat_hud",
},
["World"] = {
core.register_list_command("xray", "Configure X-Ray", "xray_nodes")
+core.register_list_command("search", "Configure NodeESP", "node_esp_nodes")
friendlist (Killaura / Forcefield Friendlist) string
cheat_hud (CheatHUD) bool true
+
+enable_node_esp (NodeESP) bool false
+
+enable_node_tracers (NodeTracers) bool false
+
+node_esp_nodes (NodeESP Nodes) string
}
#endif
RenderingEngine::draw_scene(skycolor, m_game_ui->m_flags.show_hud,
- m_game_ui->m_flags.show_minimap, draw_wield_tool, draw_crosshair, g_settings->getBool("enable_tracers"), g_settings->getBool("enable_esp"));
+ m_game_ui->m_flags.show_minimap, draw_wield_tool, draw_crosshair, g_settings->getBool("enable_esp"), g_settings->getBool("enable_tracers"), g_settings->getBool("enable_node_esp"), g_settings->getBool("enable_node_tracers"));
/*
Profiler graph
u16 *lights,
u8 &waving,
TileSpec &tile,
+ // lol more Input
bool xray,
- std::set<content_t> xraySet
- )
+ std::set<content_t> xraySet,
+ std::set<content_t> nodeESPSet)
{
VoxelManipulator &vmanip = data->m_vmanip;
const NodeDefManager *ndef = data->m_client->ndef();
content_t c0 = n0.getContent();
if (xray && xraySet.find(c0) != xraySet.end())
c0 = CONTENT_AIR;
-
+ if (nodeESPSet.find(c0) != nodeESPSet.end())
+ data->m_esp_nodes.insert(blockpos_nodes + p);
// Don't even try to get n1 if n0 is already CONTENT_IGNORE
if (c0 == CONTENT_IGNORE) {
makes_face = false;
const v3s16 &&face_dir,
std::vector<FastFace> &dest,
bool xray,
- std::set<content_t> xraySet)
+ std::set<content_t> xraySet,
+ std::set<content_t> nodeESPSet)
{
static thread_local const bool waving_liquids =
g_settings->getBool("enable_shaders") &&
// Get info of first tile
getTileInfo(data, p, face_dir,
makes_face, p_corrected, face_dir_corrected,
- lights, waving, tile, xray, xraySet);
+ lights, waving, tile, xray, xraySet, nodeESPSet);
// Unroll this variable which has a significant build cost
TileSpec next_tile;
// the face must be drawn anyway
if (j != MAP_BLOCKSIZE - 1) {
p += translate_dir;
-
+
getTileInfo(data, p, face_dir,
next_makes_face, next_p_corrected,
next_face_dir_corrected, next_lights,
waving,
next_tile,
xray,
- xraySet);
-
+ xraySet,
+ nodeESPSet);
+
if (next_makes_face == makes_face
&& next_p_corrected == p_corrected + translate_dir
&& next_face_dir_corrected == face_dir_corrected
}
static void updateAllFastFaceRows(MeshMakeData *data,
- std::vector<FastFace> &dest, bool xray, std::set<content_t> xraySet)
+ std::vector<FastFace> &dest, bool xray, std::set<content_t> xraySet, std::set<content_t> nodeESPSet)
{
/*
Go through every y,z and get top(y+) faces in rows of x+
v3s16(0, 1, 0), //face dir
dest,
xray,
- xraySet);
+ xraySet,
+ nodeESPSet);
/*
Go through every x,y and get right(x+) faces in rows of z+
v3s16(1, 0, 0), //face dir
dest,
xray,
- xraySet);
+ xraySet,
+ nodeESPSet);
/*
Go through every y,z and get back(z+) faces in rows of x+
v3s16(0, 0, 1), //face dir
dest,
xray,
- xraySet);
+ xraySet,
+ nodeESPSet);
}
static void applyTileColor(PreMeshBuffer &pmb)
X-Ray
*/
bool xray = g_settings->getBool("xray");
- std::set<content_t> xraySet;
+ std::set<content_t> xraySet, nodeESPSet;
if (xray)
xraySet = splitToContentT(g_settings->get("xray_nodes"), data->m_client->ndef());
+ nodeESPSet = splitToContentT(g_settings->get("node_esp_nodes"), data->m_client->ndef());
+
/*
We are including the faces of the trailing edges of the block.
This means that when something changes, the caller must
{
// 4-23ms for MAP_BLOCKSIZE=16 (NOTE: probably outdated)
//TimeTaker timer2("updateAllFastFaceRows()");
- updateAllFastFaceRows(data, fastfaces_new, xray, xraySet);
+ updateAllFastFaceRows(data, fastfaces_new, xray, xraySet, nodeESPSet);
}
// End of slow part
!m_crack_materials.empty() ||
!m_daynight_diffs.empty() ||
!m_animation_tiles.empty();
+
+ esp_nodes = data->m_esp_nodes;
}
MapBlockMesh::~MapBlockMesh()
Client *m_client;
bool m_use_shaders;
bool m_use_tangent_vertices;
+ std::set<v3s16> m_esp_nodes;
MeshMakeData(Client *client, bool use_shaders,
bool use_tangent_vertices = false);
void updateCameraOffset(v3s16 camera_offset);
+ std::set<v3s16> esp_nodes;
+
private:
scene::IMesh *m_mesh[MAX_TILE_LAYERS];
MinimapMapblock *m_minimap_mapblock;
#include "client/hud.h"
#include "client/minimap.h"
#include "client/content_cao.h"
+#include "mapblock.h"
+#include "mapsector.h"
RenderingCore::RenderingCore(IrrlichtDevice *_device, Client *_client, Hud *_hud)
: device(_device), driver(device->getVideoDriver()), smgr(device->getSceneManager()),
}
void RenderingCore::draw(video::SColor _skycolor, bool _show_hud, bool _show_minimap,
- bool _draw_wield_tool, bool _draw_crosshair, bool _draw_tracers, bool _draw_esp)
+ bool _draw_wield_tool, bool _draw_crosshair, bool _draw_esp, bool _draw_tracers, bool _draw_node_esp, bool _draw_node_tracers)
{
v2u32 ss = driver->getScreenSize();
if (screensize != ss) {
show_minimap = _show_minimap;
draw_wield_tool = _draw_wield_tool;
draw_crosshair = _draw_crosshair;
- draw_tracers = _draw_tracers;
draw_esp = _draw_esp;
+ draw_tracers = _draw_tracers;
+ draw_node_esp = _draw_node_esp;
+ draw_node_tracers = _draw_node_tracers;
beforeDraw();
drawAll();
material.setFlag(video::EMF_ZWRITE_ENABLE, false);
driver->setMaterial(material);
- auto allObjects = env.getAllActiveObjects();
- for (auto &it : allObjects) {
- ClientActiveObject *cao = it.second;
- if (cao->isLocalPlayer() || cao->getParent())
- continue;
- GenericCAO *obj = dynamic_cast<GenericCAO *>(cao);
- if (! obj)
- continue;
- aabb3f box;
- if (! obj->getSelectionBox(&box))
- continue;
- v3f pos = obj->getPosition();
- pos -= camera_offset;
- box.MinEdge += pos;
- box.MaxEdge += pos;
- pos = box.getCenter();
- if (draw_esp)
- driver->draw3DBox(box, video::SColor(255, 255, 255, 255));
- if (draw_tracers)
- driver->draw3DLine(eye_pos, pos, video::SColor(255, 255, 255, 255));
+ if (draw_esp || draw_tracers) {
+ auto allObjects = env.getAllActiveObjects();
+
+ for (auto &it : allObjects) {
+ ClientActiveObject *cao = it.second;
+ if (cao->isLocalPlayer() || cao->getParent())
+ continue;
+ GenericCAO *obj = dynamic_cast<GenericCAO *>(cao);
+ if (! obj)
+ continue;
+ aabb3f box;
+ if (! obj->getSelectionBox(&box))
+ continue;
+ v3f pos = obj->getPosition() - camera_offset;
+ box.MinEdge += pos;
+ box.MaxEdge += pos;
+ if (draw_esp)
+ driver->draw3DBox(box, video::SColor(255, 255, 255, 255));
+ if (draw_tracers)
+ driver->draw3DLine(eye_pos, box.getCenter(), video::SColor(255, 255, 255, 255));
+ }
+ }
+ if (draw_node_esp || draw_node_tracers) {
+ Map &map = env.getMap();
+ std::map<v2s16, MapSector*> *sectors = map.getSectorsPtr();
+
+ for (auto §or_it : *sectors) {
+ MapSector *sector = sector_it.second;
+ MapBlockVect blocks;
+ sector->getBlocks(blocks);
+ for (MapBlock *block : blocks) {
+ if (! block->mesh)
+ continue;
+ for (v3s16 p : block->mesh->esp_nodes) {
+ v3f pos = intToFloat(p, BS) - camera_offset;
+ MapNode node = map.getNode(p);
+ std::vector<aabb3f> boxes;
+ node.getSelectionBoxes(client->getNodeDefManager(), &boxes, node.getNeighbors(p, &map));
+ video::SColor color = client->getNodeDefManager()->get(node).minimap_color;
+
+ for (aabb3f box : boxes) {
+ box.MinEdge += pos;
+ box.MaxEdge += pos;
+ if (draw_node_esp)
+ driver->draw3DBox(box, color);
+ if (draw_node_tracers)
+ driver->draw3DLine(eye_pos, box.getCenter(), color);
+ }
+ }
+ }
+ }
+
}
driver->setMaterial(oldmaterial);
if (!show_hud)
return;
hud->drawSelectionMesh();
- if (draw_tracers || draw_esp)
+ if (draw_esp || draw_tracers || draw_node_esp || draw_node_tracers)
drawTracersAndESP();
if (draw_wield_tool)
camera->drawWieldedTool();
bool show_minimap;
bool draw_wield_tool;
bool draw_crosshair;
- bool draw_tracers;
bool draw_esp;
+ bool draw_tracers;
+ bool draw_node_esp;
+ bool draw_node_tracers;
IrrlichtDevice *device;
video::IVideoDriver *driver;
void initialize();
void draw(video::SColor _skycolor, bool _show_hud, bool _show_minimap,
- bool _draw_wield_tool, bool _draw_crosshair, bool _draw_tracers,
- bool _draw_esp);
+ bool _draw_wield_tool, bool _draw_crosshair, bool _draw_esp,
+ bool _draw_tracers, bool _draw_node_esp, bool _draw_node_tracers);
inline v2u32 getVirtualSize() const { return virtual_size; }
};
}
void RenderingEngine::_draw_scene(video::SColor skycolor, bool show_hud,
- bool show_minimap, bool draw_wield_tool, bool draw_crosshair, bool draw_tracers, bool draw_esp)
+ bool show_minimap, bool draw_wield_tool, bool draw_crosshair, bool draw_esp, bool draw_tracers, bool draw_node_esp, bool draw_node_tracers)
{
- core->draw(skycolor, show_hud, show_minimap, draw_wield_tool, draw_crosshair, draw_tracers, draw_esp);
+ core->draw(skycolor, show_hud, show_minimap, draw_wield_tool, draw_crosshair, draw_esp, draw_tracers, draw_node_esp, draw_node_tracers);
}
const char *RenderingEngine::getVideoDriverName(irr::video::E_DRIVER_TYPE type)
class LocalPlayer;
class Hud;
class Minimap;
-class Tracers;
class RenderingCore;
}
inline static void draw_scene(video::SColor skycolor, bool show_hud,
- bool show_minimap, bool draw_wield_tool, bool draw_crosshair, bool draw_tracers, bool draw_esp)
+ bool show_minimap, bool draw_wield_tool, bool draw_crosshair, bool draw_esp, bool draw_tracers, bool draw_node_esp, bool draw_node_tracers)
{
s_singleton->_draw_scene(skycolor, show_hud, show_minimap,
- draw_wield_tool, draw_crosshair, draw_tracers, draw_esp);
+ draw_wield_tool, draw_crosshair, draw_esp, draw_tracers, draw_node_esp, draw_node_tracers);
}
inline static void initialize(Client *client, Hud *hud)
bool clouds = true);
void _draw_scene(video::SColor skycolor, bool show_hud, bool show_minimap,
- bool draw_wield_tool, bool draw_crosshair, bool draw_tracers, bool draw_esp);
+ bool draw_wield_tool, bool draw_crosshair, bool draw_esp, bool draw_tracers, bool draw_node_esp, bool draw_node_tracers);
void _initialize(Client *client, Hud *hud);
settings->setDefault("forcefield", "false");
settings->setDefault("friendlist", "");
settings->setDefault("cheat_hud", "true");
+ settings->setDefault("enable_node_esp", "false");
+ settings->setDefault("enable_node_tracers", "false");
+ settings->setDefault("node_esp_nodes", "");
// Keymap
settings->setDefault("remote_port", "30000");