Formspecs: Remove accidental empty 'quit' field
This commit is contained in:
parent
0cf36454d6
commit
f7a8e75765
@ -1511,7 +1511,8 @@ void Server::handleCommand_InventoryFields(NetworkPacket* pkt)
|
|||||||
if (peer_state_iterator != m_formspec_state_data.end()) {
|
if (peer_state_iterator != m_formspec_state_data.end()) {
|
||||||
const std::string &server_formspec_name = peer_state_iterator->second;
|
const std::string &server_formspec_name = peer_state_iterator->second;
|
||||||
if (client_formspec_name == server_formspec_name) {
|
if (client_formspec_name == server_formspec_name) {
|
||||||
if (fields["quit"] == "true")
|
auto it = fields.find("quit");
|
||||||
|
if (it != fields.end() && it->second == "true")
|
||||||
m_formspec_state_data.erase(peer_state_iterator);
|
m_formspec_state_data.erase(peer_state_iterator);
|
||||||
|
|
||||||
m_script->on_playerReceiveFields(playersao, client_formspec_name, fields);
|
m_script->on_playerReceiveFields(playersao, client_formspec_name, fields);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user