Port to FreeBSD
parent
bb6822f0e1
commit
78513bc95a
|
@ -12,7 +12,7 @@
|
|||
url = https://github.com/dragonblocks/dragontype
|
||||
[submodule "deps/endian.h"]
|
||||
path = deps/endian.h
|
||||
url = https://github.com/mikepb/endian.h
|
||||
url = https://github.com/dragonblocks/endian.h
|
||||
[submodule "deps/dragonport"]
|
||||
path = deps/dragonport
|
||||
url = https://github.com/dragonblocks/dragonport
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0f885cbba627efe9b8f763e1c2872e904fe0c0b1
|
||||
Subproject commit 6c7eccf05405eacbb76281550cd69895089f9773
|
|
@ -29,6 +29,11 @@ include_directories(BEFORE
|
|||
${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
|
||||
link_directories("/usr/local/lib")
|
||||
include_directories("/usr/local/include")
|
||||
endif()
|
||||
|
||||
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
|
||||
|
||||
set(SOURCES_COMMON
|
||||
|
|
|
@ -369,7 +369,7 @@ void server_map_prepare_spawn()
|
|||
} else {
|
||||
s32 spawn_height = -1;
|
||||
|
||||
while (map_get_node(server_map.map, (v3s32) {0, ++spawn_height, 0}).type != NODE_AIR);
|
||||
while (map_get_node(server_map.map, (v3s32) {0, ++spawn_height, 0}).type != NODE_AIR)
|
||||
;
|
||||
|
||||
server_map.spawn_height = spawn_height + 5;
|
||||
|
|
|
@ -105,7 +105,7 @@ bool my_decompress(const char *compressed, size_t compressed_size, void *decompr
|
|||
bool within_simulation_distance(v3f64 player_pos, v3s32 block_pos, u32 simulation_distance)
|
||||
{
|
||||
v3s32 player_block_pos = map_node_to_block_pos((v3s32) {player_pos.x, player_pos.y, player_pos.z}, NULL);
|
||||
return abs(player_block_pos.x - block_pos.x) <= simulation_distance && abs(player_block_pos.y - block_pos.y) <= simulation_distance && abs(player_block_pos.z - block_pos.z) <= simulation_distance;
|
||||
return abs(player_block_pos.x - block_pos.x) <= (s32) simulation_distance && abs(player_block_pos.y - block_pos.y) <= (s32) simulation_distance && abs(player_block_pos.z - block_pos.z) <= (s32) simulation_distance;
|
||||
}
|
||||
|
||||
f64 clamp(f64 v, f64 min, f64 max)
|
||||
|
|
|
@ -6,7 +6,10 @@
|
|||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include <dragontype/number.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue