Properly rollback chat command triggered things
authorPerttu Ahola <celeron55@gmail.com>
Thu, 26 Jul 2012 23:37:04 +0000 (02:37 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Thu, 26 Jul 2012 23:37:04 +0000 (02:37 +0300)
src/server.cpp

index a868a0425600bbda00234efce4a0efd76390cd12..6a126b60d1e0902025dfd8ce4920c2b113cefa47 100644 (file)
@@ -2627,6 +2627,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
                        message += (wchar_t)readU16(buf);
                }
 
+               // If something goes wrong, this player is to blame
+               RollbackScopeActor rollback_scope(m_rollback,
+                               std::string("player:")+player->getName());
+
                // Get player name of this client
                std::wstring name = narrow_to_wide(player->getName());