forked from EXTERNAL/bareiron
make flight a configuration option
This commit is contained in:
@@ -41,6 +41,8 @@
|
||||
#define SCALE_MOVEMENT_UPDATES_TO_PLAYER_COUNT
|
||||
// If defined, calculates fluid flow when blocks are updated near fluids
|
||||
#define DO_FLUID_FLOW
|
||||
// If defined, enables flight for all players
|
||||
#define ENABLE_PLAYER_FLIGHT
|
||||
|
||||
// If defined, logs unrecognized packet IDs
|
||||
// #define DEV_LOG_UNKNOWN_PACKETS
|
||||
|
@@ -254,8 +254,12 @@ void spawnPlayer (PlayerData *player) {
|
||||
// Sync client clock time
|
||||
sc_updateTime(player->client_fd, world_time);
|
||||
|
||||
// Give the player flight (for testing)
|
||||
// sc_playerAbilities(player->client_fd, 0x04);
|
||||
#ifdef ENABLE_PLAYER_FLIGHT
|
||||
if (GAMEMODE != 1 && GAMEMODE != 3) {
|
||||
// Give the player flight (for testing)
|
||||
sc_playerAbilities(player->client_fd, 0x04);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Calculate player's chunk coordinates
|
||||
short _x = div_floor(player->x, 16), _z = div_floor(player->z, 16);
|
||||
|
Reference in New Issue
Block a user