summaryrefslogtreecommitdiff
path: root/src/game.cpp
Commit message (Collapse)AuthorAge
* Re-add halo highlight (#5130)Dániel Juhász2017-01-30
| | | | Due to a rebase mistake halo highlighting was disabled. This commit re-adds that feature.
* Add console height setting (#5136)Ezhh2017-01-30
|
* Rename height to scale for openConsole() (#5139)Zeno-2017-01-29
| | | | | For Game::openConsole() and GUIChatConsole::openConsole() the parameter name 'height' is misleading because it's actually a percentage of the screen/window height.
* Add hardware node coloring. Includes:Dániel Juhász2017-01-23
| | | | | | - Increase ContentFeatures serialization version - Color property and palettes for nodes - paramtype2 = "color", "colored facedir" or "colored wallmounted"
* Environment & IGameDef code refactoring (#4985)Ner'zhul2017-01-09
| | | | | | | | | | | | | | | | | | | | | * Environment code refactoring * Cleanup includes & class declarations in client & server environment to improve build speed * ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts. * Cleanup IGameDef * Move ITextureSource* IGameDef::getTextureSource() to Client only. * Also move ITextureSource *IGameDef::tsrc() helper * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call * drop unused emerge() call * cleanup server unused functions (mentionned before) * Drop one unused parameter from ContentFeatures::updateTextures * move checkLocalPrivilege to Client * Remove some unnecessary casts * create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it * Fix some comments * Change required IGameDef to Server/Client pointers * Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects * Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu * drop ClientMap::sectorWasDrawn which is unused
* Improve getPointedThing() (#4346)Dániel Juhász2017-01-04
| | | | | | | | | | | | | | | | | | | * Improved getPointedThing() The new algorithm checks every node exactly once. Now the point and normal vector of the collision is also returned in the PointedThing (currently they are not used outside of the function). Now the CNodeDefManager keeps the union of all possible nodeboxes, so the raycast won't miss any nodes. Also if there are only small nodeboxes, getPointedThing() is exceptionally fast. Also adds unit test for VoxelLineIterator. * Cleanup, code move This commit moves getPointedThing() and Client::getSelectedActiveObject() to ClientEnvironment. The map nodes now can decide which neighbors they are connecting to (MapNode::getNeighbors()).
* Irrlicht 1.9 supportsfan52016-12-26
|
* Fix camera jumping on Android when panning past 0/360 markrubenwardy2016-12-12
|
* View range: Set maximum to 4000 nodesRogier2016-12-12
| | | | The network protocol does not support larger than 255 mapblocks.
* Fix computation of viewing range (in blocks) sent to server (#4882)Rogier-52016-12-11
| | | | | | | | Fixes #4878 Also remove an artificial viewing range reduction that (presumably) was added to compensate for miscomputed viewing ranges, and that doesn't seem to be needed any more (thanks to lhofhansl).
* Fog: Make fraction of visible distance at which fog starts configurableLars Hofhansl2016-12-07
| | | | | | Optimise the fetching of global settings 'camera_smoothing', 'cinematic' and 'cinematic_camera_smoothing'. Cache 'cam_smoothing'.
* Wieldhand: Allow overriding the handTeTpaAka2016-11-26
|
* Make supplying empty formspec strings close the formspec (#4737)orwell962016-11-23
| | | This will only happen if the formname matches or if formname is "".
* Fix superflous shader setting updates (#4800)ShadowNinja2016-11-23
| | | This improves rendering performance by ~40%
* Halo: Highlight selected faceRealBadAngel2016-11-12
| | | | | This is a slightly modified and cleaned up version of #3774 by RealBadAngel. By sofar: Remove color change (just make it lighter) and some minor cleanups.
* Cycle directly to nothing shown instead of showing the profiler graph againlhofhansl2016-11-04
| | | | Fix for previous commit.
* Add debug priv, and allow player to display the scene as wire-frame. (#4709)lhofhansl2016-11-04
|
* Rename testsounds/ directory to sounds/ (#1984)Hugo Locurcio2016-10-30
|
* Damage flash: Reduce maximum alpha. Avoid fade overloadparamat2016-10-21
| | | | | | | | | | | Flash alpha maximum is reduced from 180 to 127 to avoid player blindness in combat. Flash alpha minimum is unchanged. The 'damage_flash' value is now limited to max alpha, to avoid multiple hits creating a huge value that causes flash to stay at maximum alpha for a long period. Now alpha always starts to fade immediately after taking damage. Both problems can be seen in Minetest let's play videos. Simplify and optimise some code.
* Revert changes to toggleNoClip and toggleFreeMoveLars Hofhansl2016-10-17
|
* Don't use day light sky unless noclip and free_move are enabledLars Hofhansl2016-10-17
|
* Use range-based fog instead of z-plane based.Lars Hofhansl2016-10-13
|
* Don't use unordered maps for ProfilerGraph (fixes flickering)sfan52016-10-12
|
* Remove unused parameter of GUIVolumeChangeRui2016-10-09
|
* Player/LocalPlayer/RemotePlayer inheritance cleanup (part 1 on X)Loic Blot2016-10-08
| | | | | | | | | | | * LocalPlayer take ownership of maxHudId as it's the only caller * RemotePlayer take ownership of day night ratio as it's the only user * Pass getPlayerControl as const reference to prevent object copy on each call (perf improvement in ObjectRef::l_get_player_control call) * getPlayerSAO is now only RemotePlayer call * get/setHotbarItemCount is now RemotePlayer owned * Server: Use RemotePlayer instead of Player object on concerned call to properly fix the object type * PlayerSAO now uses RemotePlayer instead of Player because it's only server side * ObjectRef::getplayer also returns RemotePlayer as it's linked with PlayerSAO
* Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot2016-10-05
| | | | | | | | | | | | This is part 2 for 5f084cd98d7b3326b51320455364337539710efd Other improvements: * Use the defined ItemGroupList when used * make Client::checkPrivilege const * inline some trivial functions * Add ActiveObjectMap typedef * Add SettingsEntries typedef
* Client: disable pre v25 init sending by defaultest312016-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable the ability to connect to old servers by default to improve password security. If people still want to connect to old (0.4.12 and earlier) servers, they can flip the send_pre_v25_init setting. Add the ability to detect if we've tried to connect to a server which only supports the pre v25 init protocol, and show an apropriate error message. Most times the error will already be catched at the serverlist level, the detection mechanism only acts as last resort, because the "Connection timed out" error message that would be shown otherwise would be very confusing. Automatic "fixing" of this condition is not desired, as it would allow for downgrade attacks. As already 161 of the 167 servers on the serverlist support the new srp based auth protocol (> 96%), the breakage should be minimal. Follow up of commit af30183124d40a969040d7de4b3a487feec466e4 "Add option to not send pre v25 init packet" Also change the pessimistic assumption of masterlist server versions to optimistic, in order to avoid buggy behaviour (favourites not in the serverlist would be denied to connect to, etc).
* Add zoom, tweakable with zoom_fov, default key: Z (like optifine)Esteban I. Ruiz Moreno2016-08-10
|
* Use mathematical function to determine yaw directionsfan52016-07-05
|
* Remove top left minetest watermarkest312016-07-03
| | | | | | | | Move version information into the window caption. On popular player request. Fixes #4209.
* Initial Gamepad supportest312016-06-03
| | | | | | | Adds initial ingame gamepad support to minetest. Full Formspec support is not implemented yet and can be added by a later change.
* Input related generalisationsest312016-06-03
| | | | | * Move key types into own file * Use Generalized input methods in game.cpp
* Add colored text (not only colored chat).Ekdohibs2016-05-31
| | | | | Add documentation, move files to a proper place and avoid memory leaks. Make it work with most kind of texts, and allow backgrounds too.
* Colored chat working as expected for both freetype and non-freetype builds. ↵TriBlade92016-05-31
| | | | @nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/
* Tell irrlicht if we handle a key or not.est312016-05-26
| | | | | | | | | We can remove the function in MtNativeActivity now as it serves precisely that purpose: to tell irrlicht that we handled the esc key. TODO for later: * Perhaps try to find a more performant container than KeyList
* Escape more strings: formspecs, item descriptions, infotexts...Ekdohibs2016-04-24
| | | | | | Also, change the escape character to the more standard \x1b Thus, it can be used in the future for translation or colored text, for example.
* Add option to disable entity selectionboxes. (#3992)TriBlade92016-04-14
| | | | Setting only loaded once, default value is to enable them.
* Fix connected nodes' selection boxes.Auke Kok2016-03-21
| | | | | | | This allows the player to more easily target and punch connected nodeboxes, especially if they have a fixed nodebox that is very small, like technic cabling, or xpanes. Tried it on fences and my xpane conversion, and happy with the result.
* Nodebox: Allow nodeboxes to "connect"Auke Kok2016-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduce a new nodebox type "connected", and allow these nodes to have optional nodeboxes that connect it to other connecting nodeboxes. This is all done at scenedraw time in the client. The client will inspect the surrounding nodes and if they are to be connected to, it will draw the appropriate connecting nodeboxes to make those connections. In the node_box definition, we have to specify separate nodeboxes for each valid connection. This allows us to make nodes that connect only horizontally (the common case) by providing optional nodeboxes for +x, -x, +z, -z directions. Or this allows us to make wires that can connect up and down, by providing nodeboxes that connect it up and down (+y, -y) as well. The optional nodeboxes can be arrays. They are named "connect_top, "connect_bottom", "connect_front", "connect_left", "connect_back" and "connect_right". Here, "front" means the south facing side of the node that has facedir = 0. Additionally, a "fixed" nodebox list present will always be drawn, so one can make a central post, for instance. This "fixed" nodebox can be omitted, or it can be an array of nodeboxes. Collision boxes are also updated in exactly the same fashion, which allows you to walk over the upper extremities of the individual node boxes, or stand really close to them. You can also walk up node noxes that are small in height, all as expected, and unlike the NDT_FENCELIKE nodes. I've posted a screenshot demonstrating the flexibility at http://i.imgur.com/zaJq8jo.png In the screenshot, all connecting nodes are of this new subtype. Transparent textures render incorrectly, Which I don't think is related to this text, as other nodeboxes also have issues with this. A protocol bump is performed in order to be able to send older clients a nodeblock that is usable for them. In order to avoid abuse of users we send older clients a "full-size" node, so that it's impossible for them to try and walk through a fence or wall that's created in this fashion. This was tested with a pre-bump client connected against a server running the new protocol. These nodes connect to other nodes, and you can select which ones those are by specifying node names (or group names) in the connects_to string array: connects_to = { "group:fence", "default:wood" } By default, nodes do not connect to anything, allowing you to create nodes that always have to be paired in order to connect. lua_api.txt is updated to reflect the extension to the node_box API. Example lua code needed to generate these nodes can be found here: https://gist.github.com/sofar/b381c8c192c8e53e6062
* Add Android chat formShadowNinja2016-03-02
|
* Unlock cursor when opening consoleShadowNinja2016-03-02
|
* Use the console instead of a dedicated window when pressing keymap_chat/cmdEsteban I. Ruiz Moreno2016-03-02
| | | | keymap_console opens a full window for chat history browsing.
* Fix getting pointed nodeRealBadAngel2016-02-22
| | | | | Fixes #3719 Closes #3753
* Camera: remove auto tune FPS, single view range settingRealBadAngel2016-02-21
|
* Move object nametags to cameraRealBadAngel2016-02-18
|
* Use proper variable types for uniform sampler layersRealBadAngel2016-02-14
|
* Cleanup selection mesh code, add shaders for halo and selection boxesRealBadAngel2016-02-08
|
* Show infotext with description for item entitiesRealBadAngel2016-01-18
|
* New 3D Mode: PageflipDalai Felinto2016-01-09
| | | | | | | | | | | | | | | | The pageflip mode requires a stereo quadbuffer, and a modern graphic card. Patch tested with NVidia 3D Vision. The mini-map is not drawn, but that's what is done for topbottom and sidebyside modes as well. Also most of the time the user would prefer the HUD to be off. That's for the user to decide though, and toggle it manually. Finally, the interocular distance (aka eye separation) is twice as much as the "3d_paralax_strength" settings. I find this a strange design decision. I didn't want to chance this though, since it's how the other 3d modes interpret this settings.
* Fix client crashing when connecting to serverest312015-12-30
| | | | | | | | | | | | | My commit e2d54c9f9275e4f77ec33be8054621d42945f7a4 "shutdown when requested from lua in singleplayer too" broke minetest's feature to connect to servers. The client crashed after the connection init was complete. Thanks to @sofar for reporting the bug. Fixes #3498.