mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Change the preprocessor macro that differs server/client builds
This commit is contained in:
@@ -43,7 +43,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "server/player_sao.h"
|
||||
#include "util/string.h"
|
||||
#include "translation.h"
|
||||
#ifndef SERVER
|
||||
#if CHECK_CLIENT_BUILD()
|
||||
#include "client/client.h"
|
||||
#endif
|
||||
|
||||
@@ -71,7 +71,7 @@ int LuaRaycast::l_next(lua_State *L)
|
||||
ServerEnvironment *senv = dynamic_cast<ServerEnvironment*>(env);
|
||||
|
||||
bool csm = false;
|
||||
#ifndef SERVER
|
||||
#if CHECK_CLIENT_BUILD()
|
||||
csm = getClient(L) != nullptr;
|
||||
#endif
|
||||
|
||||
@@ -847,7 +847,7 @@ int ModApiEnv::l_find_node_near(lua_State *L)
|
||||
|
||||
int start_radius = (lua_isboolean(L, 4) && readParam<bool>(L, 4)) ? 0 : 1;
|
||||
|
||||
#ifndef SERVER
|
||||
#if CHECK_CLIENT_BUILD()
|
||||
// Client API limitations
|
||||
if (Client *client = getClient(L))
|
||||
radius = client->CSMClampRadius(pos, radius);
|
||||
@@ -959,7 +959,7 @@ int ModApiEnv::l_find_nodes_in_area(lua_State *L)
|
||||
const NodeDefManager *ndef = env->getGameDef()->ndef();
|
||||
Map &map = env->getMap();
|
||||
|
||||
#ifndef SERVER
|
||||
#if CHECK_CLIENT_BUILD()
|
||||
if (Client *client = getClient(L)) {
|
||||
minp = client->CSMClampPos(minp);
|
||||
maxp = client->CSMClampPos(maxp);
|
||||
@@ -1021,7 +1021,7 @@ int ModApiEnv::l_find_nodes_in_area_under_air(lua_State *L)
|
||||
const NodeDefManager *ndef = env->getGameDef()->ndef();
|
||||
Map &map = env->getMap();
|
||||
|
||||
#ifndef SERVER
|
||||
#if CHECK_CLIENT_BUILD()
|
||||
if (Client *client = getClient(L)) {
|
||||
minp = client->CSMClampPos(minp);
|
||||
maxp = client->CSMClampPos(maxp);
|
||||
|
Reference in New Issue
Block a user