mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
minor changes
This commit is contained in:
@@ -117,7 +117,6 @@ void NinecraftApp::init()
|
||||
setScreen(new UsernameScreen());
|
||||
}
|
||||
#else
|
||||
user->name = "Server";
|
||||
hostMultiplayer();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1330,7 +1330,7 @@ void Minecraft::hostMultiplayer(int port) {
|
||||
#if !defined(NO_NETWORK)
|
||||
netCallback = new ServerSideNetworkHandler(this, raknetInstance);
|
||||
#ifdef STANDALONE_SERVER
|
||||
raknetInstance->host(options.getStringValue(OPTIONS_USERNAME), port, 16);
|
||||
raknetInstance->host("Server", port, 16);
|
||||
#else
|
||||
raknetInstance->host(options.getStringValue(OPTIONS_USERNAME), port);
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
ServerPlayer::ServerPlayer( Minecraft* minecraft, Level* level )
|
||||
: super(level, minecraft->isCreativeMode()),
|
||||
_mc(minecraft),
|
||||
_sentHealth(-999),
|
||||
_prevHealth(-999),
|
||||
_containerCounter(0)
|
||||
{
|
||||
hasFakeInventory = true;
|
||||
@@ -58,8 +58,8 @@ void ServerPlayer::tick() {
|
||||
if (containerMenu)
|
||||
containerMenu->broadcastChanges();
|
||||
|
||||
if (health != _sentHealth) {
|
||||
_sentHealth = health;
|
||||
if (health != _prevHealth) {
|
||||
_prevHealth = health;
|
||||
SetHealthPacket packet(health);
|
||||
_mc->raknetInstance->send(owner, packet);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ private:
|
||||
void setContainerMenu( BaseContainerMenu* menu );
|
||||
|
||||
Minecraft* _mc;
|
||||
int _sentHealth;
|
||||
int _prevHealth;
|
||||
int _containerCounter;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user