mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-11 20:11:18 +03:00
* A couple of fixes for SDL/Emscripten build.
This commit is contained in:
@@ -56,7 +56,7 @@ public:
|
||||
virtual std::string getPatchData();
|
||||
#endif
|
||||
|
||||
protected:
|
||||
public:
|
||||
virtual std::string getAssetPath(const std::string& path) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -557,13 +557,19 @@ void Minecraft::sendMessage(const std::string& message)
|
||||
if (isOnlineClient())
|
||||
{
|
||||
// send the server a message packet
|
||||
m_pRakNetInstance->send(new MessagePacket(message));
|
||||
if (m_pRakNetInstance)
|
||||
m_pRakNetInstance->send(new MessagePacket(message));
|
||||
else
|
||||
m_gui.addMessage("You aren't actually playing multiplayer!");
|
||||
}
|
||||
else
|
||||
{
|
||||
// fake the server having received a packet
|
||||
MessagePacket mp(message);
|
||||
m_pNetEventCallback->handle(m_pRakNetInstance->m_pRakPeerInterface->GetMyGUID(), &mp);
|
||||
if (m_pNetEventCallback && m_pRakNetInstance)
|
||||
m_pNetEventCallback->handle(m_pRakNetInstance->m_pRakPeerInterface->GetMyGUID(), &mp);
|
||||
else
|
||||
m_gui.addMessage("You aren't hosting a multiplayer server!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ void NinecraftApp::initGLStates()
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
glAlphaFunc(GL_GREATER, 0.1f);
|
||||
glCullFace(GL_NONE);
|
||||
glCullFace(GL_BACK);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user