1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix buttons not working for Lua-triggered formspecs

This commit is contained in:
sapier 2013-01-03 17:59:28 +00:00 committed by Perttu Ahola
parent 8b75736c6f
commit 0b1d09ff4f
8 changed files with 29 additions and 11 deletions

View file

@ -1906,12 +1906,14 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
std::istringstream is(datastring, std::ios_base::binary);
std::string formspec = deSerializeLongString(is);
std::string formname = deSerializeString(is);
ClientEvent event;
event.type = CE_SHOW_FORMSPEC;
// pointer is required as event is a struct only!
// adding a std:string to a struct isn't possible
event.show_formspec.formspec = new std::string(formspec);
event.show_formspec.formname = new std::string(formname);
m_client_event_queue.push_back(event);
}
else