Commit Graph

53 Commits (568694122cb662d6c6cb071338c9d30721372b50)

Author SHA1 Message Date
Paramat 8543df7752
Fix various code issues found by cppcheck (#7741)
Mapgen Singlenode: Remove 'flags' that duplicates a 'class Mapgen' member.
Dungeongen: Initialise 'MMVManip *vm' to 'nullptr'.
Inventorymanager: Remove assignment error 'found = '.
2018-09-23 20:12:39 +01:00
SmallJoker e98fd934ce 'fix' LINT, use InventoryLocation== 2018-04-02 17:18:48 +02:00
SmallJoker 9fa547bb80 Run callback in IDropAction, refactor function arguments 2018-04-02 17:18:48 +02:00
SmallJoker f6eff57f7c Add player inventory callbacks 2018-04-02 17:18:48 +02:00
Loïc Blot bd6b90359c Remove DSTACK support (#6346)
Debugstacks is not useful, we don't really use it, the DebugStack is not pertinent, gdb and lldb are better if we really want to debug.
2017-08-30 08:09:41 +02:00
Loïc Blot fd3afbced5 Optimize headers (part 2) (#6272)
* Optimize headers (part 2)

* less debug.h in headers
* less remoteplayer.h for everybody

* Cleanup (part 2)

* camera.h: mesh.h
* mapgen.h: mapnode.h
* serverenvironment.h: mapblock.h
* nodedef.h: shader.h
2017-08-18 19:25:07 +02:00
Loic Blot 1d086aee7c
Modernize various files (part 2)
* range-based for loops
* emplace_back instead of push_back
* code style
* C++ headers instead of C headers
* Default operators
* empty stl function
2017-08-18 08:07:59 +02:00
TeTpaAka 49920cfe8d Player collisionbox: Make settable
Breaks compatibility with old clients.
2017-07-21 02:03:22 +01:00
Vincent Glize c772e0e18c C++11 cleanup inventorymanager (#6077)
* C++11 cleanup inventorymanager
2017-07-01 14:07:40 +02:00
ShadowNinja 2818d3f224 Rename Scripting API files for consistency 2017-04-25 13:41:36 -04:00
Loic Blot 2efae3ffd7 [CSM] Client side modding
* rename GameScripting to ServerScripting
* Make getBuiltinLuaPath static serverside
* Add on_shutdown callback
* Add on_receiving_chat_message & on_sending_chat_message callbacks
* ScriptApiBase: use IGameDef instead of Server
  This permits to share common attribute between client & server
* Enable mod security in client side modding without conditions
2017-03-13 23:56:05 +01:00
Loic Blot 98e36d7d68 Move ServerEnvironment to dedicated cpp/header files
* also cleanup some unneeded inclusions
2017-01-08 12:16:06 +01:00
Rogier 4d4b8bb8a4 Move PP() and PP2() macros to basic_macros.h
Instead of redefining them everywhere.
2016-12-24 00:32:50 +00:00
ShadowNinja 93887043d9 Clean up Strfnd
Changes:
  * Fix indentation.
  * Pass strings by const reference.
  * Merge Strfnd and WStrfnd into one class instead of copying them.
  * Remove trailing spaces.
  * Fix variable names.
  * Move to util.
  * Other miscellaneous style fixes.
2016-03-19 21:27:57 -04:00
ShadowNinja 6f2d785d0f Rename macros with two leading underscores
These names are reserved for the compiler/library implementations.
2015-10-14 02:39:37 -04:00
David Jones 34b7a147dc Change i++ to ++i 2015-08-25 18:33:52 -04:00
est31 1fadf7f21e Fix inventory replace bug 2015-08-19 03:42:00 +02:00
est31 7bbb9b066a MoveItemSomewhere double bugfix
-> Fix bug where MoveSomewhere from an infinite source would fill the destination inventory with copies of itself.
-> Fix bug where MoveSomewhere would needlessly call callbacks.
-> Remove trailing whitespaces
2015-07-19 06:23:41 +02:00
est31 2e44873ac9 Inventory manager style cleanup and further checks 2015-07-01 17:03:02 +02:00
est31 2c1fd29884 Add MoveSomewhere inventory action
Improve shift+click experience
2015-06-23 20:18:41 +02:00
TeTpaAka 17ba584fe2 Fix bug when craft input isn't replaced 2015-06-22 19:30:35 +02:00
Craig Robbins 9527984dbc Move globals from main.cpp to more sane locations
Move debug streams to log.cpp|h

Move GUI-related globals to clientlauncher

Move g_settings and g_settings_path to settings.cpp|h

Move g_menuclouds to clouds.cpp|h

Move g_profiler to profiler.cpp|h
2015-04-01 23:04:25 +10:00
Loic Blot 7851c4f7a2 Don't send an InventoryAction at each setInventoryModified, we only need one SendInventory per inventory modification
Client doesn't like to receive multiples SendInventory for one action, this can trigger glitches on clients (sometimes due to incorrect UDP packet ordering due to UDP protocol)

This fix issue #2544
2015-03-24 14:13:17 +01:00
Craig Robbins ced6d20295 For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
onkrot 0fd1ee0380 Performance fixes. 2015-01-13 23:48:56 +10:00
ShadowNinja b1965ac209 Clean up rollback 2014-11-19 16:21:59 -05:00
ShadowNinja 6bc4cad0ed Split settings into seperate source and header files
This also cleans up settings a bit
2014-09-21 14:39:35 -04:00
Novatux bd6d4666ab Add a callback: minetest.register_on_craft(itemstack, player,
old_craft_grid, craft_inv) and
minetest.register_craft_predict(itemstack, player, old_craft_grid,
craft_inv)
2013-11-01 15:55:34 +01:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
sapier ab43377577 Move scriptapi to separate folder (by sapier)
On the lua side, notably minetest.env:<function>(<args>) should now
be replaced by minetest.<function>(<args>).
The old way is and will stay supported for a long time.

Also:
Update and clean up lua_api.txt (by celeron55)
Move EnvRef to lua and remove add_rat and add_firefly (by kahrl)
Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
2013-05-25 00:51:02 +02:00
Sfan5 6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam 497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Perttu Ahola cc47ff7c4c Fix moving stuff into a mismatched stack in a "infinite" inventory 2012-09-02 23:01:42 +03:00
Perttu Ahola e1a495ee30 Make inventory GUI do sane things when server-side inventory acts unusually 2012-09-02 22:51:38 +03:00
Ilya Zhuravlev 6a16075912 Add InventoryList width property & allow custom crafting grids. 2012-09-01 10:01:41 +03:00
Perttu Ahola e3b831e975 Fix wrong amount of nodes being dropped from inventory 2012-08-12 15:49:23 +03:00
Perttu Ahola a9a475ad50 Remove unwanted ! from ifs in inventory record-for-rollback code 2012-08-12 11:20:36 +03:00
Perttu Ahola fd7ec2da91 Fix inventory segfault when rollback recording is disabled 2012-07-28 14:44:18 +03:00
Perttu Ahola 0190f9b077 Experimental-ish rollback functionality 2012-07-27 02:27:18 +03:00
Perttu Ahola 0346e68deb Add special return value -1 to inventry callbacks 2012-07-25 16:52:00 +03:00
Perttu Ahola 983e45ae92 Improve inventory callbacks a bit 2012-07-25 15:39:39 +03:00
Perttu Ahola 0a18dda158 Remove special handling of creative mode 2012-07-25 14:07:45 +03:00
Perttu Ahola 9eaf93d41d Detached inventory callbacks and reworked node metadata callbacks 2012-07-25 02:36:54 +03:00
Perttu Ahola 2ac20982e0 Detached inventories 2012-07-24 20:57:17 +03:00
Perttu Ahola d0ea6f9920 Properly and efficiently use split utility headers 2012-06-17 02:40:36 +03:00
Perttu Ahola 037b259197 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00
Perttu Ahola 5f3c70061d Properly handle dropping of items from nodes, and disallow moving items directly between nodes 2012-06-03 22:31:01 +03:00
Perttu Ahola aba7134301 on_metadata_inventory_{move,offer,take} 2012-06-03 22:31:01 +03:00
Kahrl b4dd5d3bd7 Client-side prediction of inventory changes, and some inventory menu fixes 2012-01-22 17:31:20 +02:00
Kahrl 1efdc36b22 Inventory menu (with dragging) improved. Crafting is now handled via a IACTION_CRAFT inventory action. 2012-01-22 17:31:12 +02:00