aboutsummaryrefslogtreecommitdiff
path: root/src/game.cpp
Commit message (Collapse)AuthorAge
* [CSM] Add callback on open inventory (#5793)Vincent Glize2017-10-02
|
* game.cpp: remove dead code for proto v25 compat (#6481)Loïc Blot2017-09-30
| | | Protocol v25 is not supported anymore
* Server: affect bind_addr on constructor instead of start() (#6474)Loïc Blot2017-09-28
| | | bind_addr is already ready when using constructor as we read is.IPv6 from it, instead pass the whole address
* Add mute setting (toggled by the mute key and in the volume menu) (#6415)DTA72017-09-26
| | | | * Add mute setting (toggled by the mute key and in the volume menu)
* Implement client node dig predictionAuke Kok2017-09-11
| | | | | | | | Dig prediction allows clients to remove dug nodes without waiting for server acknowledgement. This patch allows mods to override dig prediction, it can either be turned off or a different "prediction node" can be selected.
* Fix incorrect buffer size calculation on creation of HUD status messagesrubenwardy2017-09-10
| | | | Fixes #6400
* Particles: Do not add digging particles for airlike nodes (#6392)SmallJoker2017-09-08
|
* Make HUD status messages translatable (#5795)Wuzzy2017-09-05
| | | | | | * Make HUD status messages translatable * Make strings in showStatusTextSimple translatable
* Remove DSTACK support (#6346)Loïc Blot2017-08-30
| | | 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.
* Formspec: Add options to set background color and opacity (fullscreen mode + ↵Loïc Blot2017-08-29
| | | | | | | | | | | | default mode) (#5493) * Formspec: Add options to set background color and opacity (fullscreen mode) * Enhance previous comment: Set formspec background when regenerate UI. * This permit to do the calcul only at regen and override it with bgcolor tag * Add a setting for default background color into formspec, separated from fullscreen * Add a little performance gain on formspecs using a const ref instead of copying formspec string
* Clientevent refactor (#6320)Loïc Blot2017-08-28
| | | | | | | | | | * Refactor clientevent structure * Move structure outside of client header * Create client events on heap not stack, this remove the ClientEvent object copy * Use clientEventHandler to route events
* Check item_drop amount clientside (#6242)rubenwardy2017-08-26
|
* Add clientside translations.Ekdohibs2017-08-24
|
* Fix Android node selection distance (#6187)Dániel Juhász2017-08-24
|
* Safe digging and placing (#6127)Ben Deutsch2017-08-24
| | | | | | | | | | | | | | * Setting: Safe digging and placing * New setting 'safe_dig_and_place' under Controls * If set, digging and placing will not auto-repeat * Releasing buttons unblocks the respective action again * Useful for inexperienced users in creative mode where default repeat times may be too short * Safe placing (right click repetition) does not need a guarding flag * Added new setting to minetest.conf.example
* Minimap: Add new HUD flag for minimap radar modeparamat2017-08-20
| | | | | Flag default is true to not change default behaviour. The existing minimap HUD flag remains the master control for minimap.
* Modernize source code: last part (#6285)Loïc Blot2017-08-20
| | | | | | | | | | | * Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
* Fix shader.h inclusion place in game.cppLoïc Blot2017-08-19
|
* Optimize headers (part 2) (#6272)Loïc Blot2017-08-18
| | | | | | | | | | | | | | * 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
* clientmap, clientmedia: code modernizationLoic Blot2017-08-17
| | | | | | | | | * use range-based for loops * simplify some tests * various code style fixes * remove debugprint in ClientMap::getBackgroundBrightness, debug code was not intended to be there * remove unused fields in MapDrawControl * use emplace_back instead of push_back when necessary
* Cleanup various headers to reduce compilation times (#6255)Loïc Blot2017-08-16
| | | | * Cleanup various headers to reduce compilation times
* Trigger on_rightclick regardless on the formspec meta fieldSmallJoker2017-08-13
| | | | Document behaviour for older clients.
* Full viewing range key message clarifiedFixer2017-08-12
| | | | To make it sound less confusing to players
* Make direct item selection keys freely bindableWuzzy2017-07-30
|
* In-cloud fog: Strengthen effect when small view range is usedLars Hofhansl2017-07-18
| | | | | | | Ensure in-cloud fog is always stronger than outside-of-cloud-fog even when using a small view range. Also limit in-cloud fog range to a maximum of 32 nodes to keep it fairly strong when using a large view range.
* Chat: Move chat text down to not overlap 3rd line of debug text (#6145)Paramat2017-07-17
|
* F5 debug display: Reformat and remove some information (#6125)Paramat2017-07-16
| | | | | | | | | | | | | | | | | | | | For consistency return to 'FPS =', add comma before FPS. Remove 'R' from 'range_all' as may be re-keymapped. Remove inconsistent brackets from 'range_all'. Change 'v_range' to 'view_range'. Add 'pos = ' before co-ordinates. Add spaces around '=' in yaw display. Remove brackets from around 'yaw' and 'seed'. Move 'pointing_at' to 3rd line. Remove 'param1' (0 for all solid nodes and unreadable for light sources due to light bank encoding). Remove file name of pointed node top tile (this also removes the need to get ContentFeatures for the node, slightly improving performance). Replace quotes around node data with brackets, looks better and more consistent. Add 'guitext3' for third line. Use 'setVisible' for all 3 lines to control the setting of each text rectangle. Improve logic of 3rd line to only run code it needs to depending on whether pointing data is avaialble and whether node is not 'ignore' and not 'unknown'.
* Chat protocol rewrite (#5117)Loïc Blot2017-07-16
| | | | | | | | | | | | | * New TOCLIENT_CHAT_MESSAGE packet * Rename old packet to TOCLIENT_CHAT_MESSAGE_OLD for compat * Handle TOCLIENT_CHAT_MESSAGE new structure client side * Client chat queue should use a specific object * SendChatMessage: use the right packet depending on protocol version (not complete yet) * Add chatmessage(type) objects and handle them client side (partially) * Use ChatMessage instead of std::wstring server side * Update with timestamp support
* Expose getPointedThing to LuaDániel Juhász2017-07-07
| | | | | | This commit introduces Raycast, a Lua user object, which can be used to perform a raycast on the map. The ray is continuable, so one can also get hidden nodes (for example to see trough glass).
* Fog effect when camera is inside cloudBen Deutsch2017-07-05
| | | | | | | | | | | | | | | | | | Fixes issue #3576 * Clouds now take camera position as 3D, not 2D * Cloud grid filling extracted to gridFilled method * Clouds detect whether camera is inside cloud * Camera in cloud changes fog by overriding sky colors with cloud color * Sun, moon and stars can be temporarily disabled with setBodiesVisible * Disabling fog also disables all "inside cloud" behaviors
* Fix crash due to missing pointer validationLoic Blot2017-07-02
| | | | Fix #6092
* Irrlicht cleanup: cleanup various object to use RenderingEngine (#6088)Loïc Blot2017-07-02
| | | | | | | | | | | * Irrlicht cleanup: cleanup various object to use RenderingEngine * CAO doesn't need scenemanager in addToScene * Camera doesn't need VideoDriver pointer or SceneManager in constructor * Hud doesn't need driver & scene manager in constructor * Hud doesn't need scenemanager pointer * Tile.h doesn't need IrrlichtDevice header (just SMaterial) * WieldMeshSceneNode: only take scene, we always use scene root node as parent
* Create a filesystem abstraction layer for CSM and only allow accessing files ↵red-0012017-06-30
| | | | | | | | | | | | | | | | | | that are scanned into it. (#5965) * Load client-side mods into memory before executing them. This removes the remaining filesystem access that client-sided mods had and it will hopefully make then more secure. * Lua Virtual filesystem: don't load the files into memory just scan the filenames into memory. * Fix the issues with backtrace * fix most of the issues * fix code style. * add a comment
* Isolate irrlicht references and use a singleton (#6041)Loïc Blot2017-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Device3D class which will contain IrrlichtDevice interface move getSupportedVideoDrivers to Device3D Add Device3D singleton & use it in various places Rename Device3D to Rendering engine & add helper functions to various device pointers More singleton work RenderingEngine owns draw_load_screen move draw functions to RenderingEngine Reduce IrrlichtDevice exposure and guienvironment RenderingEngine: Expose get_timer_time() to remove device from guiEngine Make irrlichtdevice & scene manager less exposed * Code style fixes * Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly * enum paralax => enum parallax
* Game::showOverlayMessage: securise functionLoic Blot2017-06-24
| | | | Do wgettext call directly in the function instead of caller, as we destroy wstd inside it
* Show param1 and param2 in debug screen (#6031)Wuzzy2017-06-23
| | | | | | | | * Show param1 and param2 in debug screen * Add units and some formatting to debug screen * Minor refactor of param1/param2 debug display
* Automatic item and node colorization (#5640)Dániel Juhász2017-06-20
| | | | | | | | | | | | | | | | | * Automatic item and node colorization Now nodes with a palette yield colored item stacks, and colored items place colored nodes by default. The client predicts the colorization. * Backwards compatibility * Use nil * Style fixes * Fix code style * Document changes
* Client::makeScreenshot: remove device paramLoic Blot2017-06-19
| | | | We already have the device param as class member
* Cpp11 initializers 2 (#5999)Loïc Blot2017-06-17
| | | | | | | | | | * C++11 patchset 10: continue cleanup on constructors * Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop) * More classes cleanup * More classes cleanup + change NULL tests to boolean tests
* Use thread_local instead from some static settings (#5955)Loïc Blot2017-06-11
| | | | | thread_local permits to limit variable lifetime to thread duration. Use it on each setting place which uses static to cache variable result only for thread lifetime. This permits to keep the same performance level & reconfigure server from MT gui in those various variables places. Add thread_local to undersampling calculation too.
* Remove superfluous pointer null checksQrchackOfficial2017-06-10
|
* Autorun: Change to 'autoforward' (#5926)Paramat2017-06-08
| | | | | Minetest does not have 'run'. Automatic forwards is very often used while flying or swimming, so a general word is more suitable.
* Fix segmentation fault with tool capabilities (#5899)ShadowNinja2017-06-03
|
* Snake case for screen options in minetest.conf (#5792)Vincent Glize2017-06-03
|
* Close formspec on client shutdown. (#5811)red-0012017-05-25
| | | This ensures the shutting down progress bar is correctly rendered. This fixes #3050.
* Client crashfix: load meta after digging (#5801)Paramat2017-05-23
| | | | | | | Fixes a crash caused in MTGame by breaking and right-clicking a chest. If loading meta, digging, node can disappear and we looked at meta, which is wrong because meta became NULL. Pointer is invalidated and we read wrong memory area
* Fix instant digging (#5785)you2017-05-20
| | | | Use runData.dig_time_complete instead of params.time to find out whether it's instant digging. runData.dig_time_complete is set to something very big if the node can't be dug, whereas param.time is 0 when digging is impossible or it's instant digging. So not using param.time fixes #5728.
* When minimap is disabled in configuration, really disable it (#5771)Loïc Blot2017-05-19
| | | | * When minimap is disabled in configuration, really disable it
* No cursor lock when window inactive (#5754)SmallJoker2017-05-13
|
* Limit properly the sound setting at updateSound runtime step (#5753)Loïc Blot2017-05-13
| | | | | | | | * Limit properly the sound setting at updateSound runtime step Fix #5026 * Add a comment