Formspec verification: Fix show_formspec inside callbacks (#7374)
parent
5c1edc58ab
commit
bb4f0fd228
|
@ -1514,9 +1514,10 @@ 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) {
|
||||||
m_script->on_playerReceiveFields(playersao, client_formspec_name, fields);
|
|
||||||
if (fields["quit"] == "true")
|
if (fields["quit"] == "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);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
actionstream << "'" << player->getName()
|
actionstream << "'" << player->getName()
|
||||||
|
|
Loading…
Reference in New Issue