Rename NODE_INVALID to NODE_UNKNOWN
parent
f83ca33dcb
commit
5c180bd211
|
@ -1,7 +1,6 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
|
|
|
@ -40,9 +40,9 @@ static void render_wood(unused v3s32 pos, unused MapNode *node, Vertex3D *vertex
|
|||
}
|
||||
|
||||
ClientNodeDefintion client_node_definitions[NODE_UNLOADED] = {
|
||||
// invalid
|
||||
// unknown
|
||||
{
|
||||
.tiles = TILES_SIMPLE(RESSOURCEPATH "textures/invalid.png"),
|
||||
.tiles = TILES_SIMPLE(RESSOURCEPATH "textures/unknown.png"),
|
||||
.visibility = NV_SOLID,
|
||||
.render = NULL,
|
||||
},
|
||||
|
@ -114,7 +114,7 @@ ClientNodeDefintion client_node_definitions[NODE_UNLOADED] = {
|
|||
|
||||
void client_node_init()
|
||||
{
|
||||
for (Node node = NODE_INVALID; node < NODE_UNLOADED; node++) {
|
||||
for (Node node = NODE_UNKNOWN; node < NODE_UNLOADED; node++) {
|
||||
ClientNodeDefintion *def = &client_node_definitions[node];
|
||||
|
||||
if (client_node_definitions[node].visibility != NV_NONE) {
|
||||
|
|
|
@ -147,7 +147,7 @@ bool map_deserialize_node(int fd, MapNode *node)
|
|||
return false;
|
||||
|
||||
if (type >= NODE_UNLOADED)
|
||||
type = NODE_INVALID;
|
||||
type = NODE_UNKNOWN;
|
||||
|
||||
*node = map_node_create(type);
|
||||
|
||||
|
@ -182,7 +182,7 @@ bool map_deserialize_block(MapBlock *block, const char *data, size_t size)
|
|||
node.type = be32toh(node.type);
|
||||
|
||||
if (node.type >= NODE_UNLOADED)
|
||||
node.type = NODE_INVALID;
|
||||
node.type = NODE_UNKNOWN;
|
||||
|
||||
if (node_definitions[node.type].deserialize)
|
||||
node_definitions[node.type].deserialize(&node);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "util.h"
|
||||
|
||||
NodeDefintion node_definitions[NODE_UNLOADED] = {
|
||||
// invalid
|
||||
// unknown
|
||||
{
|
||||
.solid = true,
|
||||
.create = NULL,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
typedef enum
|
||||
{
|
||||
NODE_INVALID, // Used for unknown nodes received from server (caused by outdated clients)
|
||||
NODE_UNKNOWN, // Used for unknown nodes received from server (caused by outdated clients)
|
||||
NODE_AIR,
|
||||
NODE_GRASS,
|
||||
NODE_DIRT,
|
||||
|
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Loading…
Reference in New Issue