Merge pull request #49 from ErodeesFleurs/exp

fixed IME support and added lua invoke when player enters/leaves the world.
This commit is contained in:
Kae 2024-03-27 15:49:36 +11:00 committed by GitHub
commit c9de1ff7a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -235,6 +235,8 @@ public:
SDL_free(basePath);
}
SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
m_signalHandler.setHandleInterrupt(true);
m_signalHandler.setHandleFatal(true);

View File

@ -268,6 +268,9 @@ bool WorldServer::addClient(ConnectionId clientId, SpawnTarget const& spawnTarge
clientInfo->outgoingPackets.append(make_shared<CentralStructureUpdatePacket>(m_centralStructure.store()));
for (auto& p : m_scriptContexts)
p.second->invoke("addClient", clientId, isLocal);
return true;
}
@ -297,6 +300,9 @@ List<PacketPtr> WorldServer::removeClient(ConnectionId clientId) {
packets.append(make_shared<WorldStopPacket>("Removed"));
for (auto& p : m_scriptContexts)
p.second->invoke("removeClient", clientId);
return packets;
}