aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--advtrains/wagons.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 71557fa..f2ff897 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -1171,7 +1171,7 @@ function wagon:seating_from_key_helper(pname, fields, no)
end
if fields.inv and self.has_inventory and self.get_inventory_formspec then
minetest.close_formspec(pname, "advtrains_seating_"..self.id)
- minetest.show_formspec(player:get_player_name(), "advtrains_inv_"..self.id, self:get_inventory_formspec(player:get_player_name(), make_inv_name(self.id)))
+ minetest.show_formspec(pname, "advtrains_inv_"..self.id, self:get_inventory_formspec(pname, make_inv_name(self.id)))
end
if fields.prop and data.owner==pname then
minetest.close_formspec(pname, "advtrains_seating_"..self.id)
com"> You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once #include "irrlichttypes.h" #include "irr_v2d.h" #include "mapblock.h" #include <ostream> #include <map> #include <vector> class Map; class IGameDef; /* This is an Y-wise stack of MapBlocks. */ #define MAPSECTOR_SERVER 0 #define MAPSECTOR_CLIENT 1 class MapSector { public: MapSector(Map *parent, v2s16 pos, IGameDef *gamedef); virtual ~MapSector(); void deleteBlocks(); v2s16 getPos() { return m_pos; } MapBlock * getBlockNoCreateNoEx(s16 y); MapBlock * createBlankBlockNoInsert(s16 y); MapBlock * createBlankBlock(s16 y); void insertBlock(MapBlock *block); void deleteBlock(MapBlock *block); void getBlocks(MapBlockVect &dest); bool empty() const { return m_blocks.empty(); } int size() const { return m_blocks.size(); } protected: // The pile of MapBlocks std::unordered_map<s16, MapBlock*> m_blocks; Map *m_parent; // Position on parent (in MapBlock widths) v2s16 m_pos; IGameDef *m_gamedef; // Last-used block is cached here for quicker access. // Be sure to set this to nullptr when the cached block is deleted MapBlock *m_block_cache = nullptr; s16 m_block_cache_y; /* Private methods */ MapBlock *getBlockBuffered(s16 y); };