mirror of https://github.com/basinserver/basin/
More squashed bugs.
This commit is contained in:
parent
ba127a59c8
commit
d0f0b89b35
|
@ -21,6 +21,7 @@ struct player {
|
|||
struct connection* conn;
|
||||
struct world* world;
|
||||
struct entity* entity;
|
||||
uint32_t protocol_version;
|
||||
|
||||
char* name;
|
||||
struct uuid uuid;
|
||||
|
@ -77,8 +78,6 @@ void player_hungerUpdate(struct player* player);
|
|||
|
||||
void player_send_entity_move(struct player* player, struct entity* entity);
|
||||
|
||||
void player_receive_packet(struct player* player, struct packet* inp);
|
||||
|
||||
void player_tick(struct player* player);
|
||||
|
||||
void player_kick(struct player* player, char* message);
|
||||
|
|
|
@ -1206,7 +1206,7 @@ void randomTick_sapling(struct world* world, struct chunk* chunk, block blk, int
|
|||
leaf = BLK_LEAVES_BIG_OAK_2;
|
||||
}
|
||||
uint8_t biome = world_get_biome(world, x, z);
|
||||
uint8_t vines = type == 0 && (biome == BIOME_SWAMPLAND || biome == BIOME_SWAMPLANDM);
|
||||
uint8_t vines = type == 0 && (biome == BIOME_SWAMPLAND || biome == BIOME_SWAMPLAND_M);
|
||||
uint8_t cocoa = type == 3;
|
||||
int big = type == 0 && rand() % 10 == 0;
|
||||
if (!big) {
|
||||
|
|
|
@ -113,7 +113,7 @@ void command_list(struct server* server, struct player* player, char** args, siz
|
|||
}
|
||||
struct player* player = (struct player*) value;
|
||||
cptr = xstrncat(cptr, 16, player->name);
|
||||
END_HASHMAP_ITERATION (players)
|
||||
END_HASHMAP_ITERATION (players);
|
||||
snprintf(cptr, 32, " (%lu players_by_entity_id total)", players->entry_count);
|
||||
sendMessageToPlayer(player, plist, "gray");
|
||||
xfree(plist);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "basin/packet.h"
|
||||
#include <basin/network.h>
|
||||
#include <basin/globals.h>
|
||||
#include <basin/player.h>
|
||||
#include <basin/item.h>
|
||||
#include <basin/game.h>
|
||||
#include <basin/player.h>
|
||||
|
@ -176,7 +177,8 @@ int inventory_add(struct player* player, struct inventory* inv, struct slot* slo
|
|||
struct slot* sub_slot = inventory_get(player, inv, i);
|
||||
if (sub_slot == NULL) {
|
||||
sub_slot = pmalloc(inv->pool, sizeof(struct slot));
|
||||
slot_duplicate(slot, sub_slot);
|
||||
struct mempool* pool = mempool_new();
|
||||
slot_duplicate(pool, slot, sub_slot);
|
||||
inventory_set_slot(player, inv, i, sub_slot, broadcast);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue