aboutsummaryrefslogtreecommitdiff
path: root/src/game.cpp
AgeCommit message (Collapse)Author
2018-06-13Server: move shutdown parts to a specific shutdown state object (#7437)Loïc Blot
* Server: move shutdown parts to a specific shutdown state object
2018-06-06Stop autoforward on BACKWARD key-press (#7417)tukkek
2018-05-28Fix more GCC 8.1 warnings ↵Loïc Blot
  1   master  Fix 3 warnings reported by GCC 8.1 of the following type ```src/client/gameui.cpp:191:43: warning: « void* memset(void*, int, size_t) » effacement d'un objet du type non trivial « struct GameUI::Flags »; use assignment or value-initialization instead [-Wclass-memaccess] memset(&m_flags, 0, sizeof(GameUI::Flags)); ```
2018-05-12Camera: Improve subpixel movement (#7319)SmallJoker
2018-05-01Fix invisible chat error messages (#7289)Vincent Glize
2018-04-04[clang-tidy] Promote some performance-* as a coding error (#7194)Loïc Blot
* Promote performance-type-promotion-in-math-fn as a coding error * Promote performance-faster-string-find too (which is not problematic currently) * Same for performance-implicit-cast-in-loop * Fix remaining tidy points
2018-04-04Fix last performance-type-promotion-in-math-fn problemsLoic Blot
2018-03-30Client eventmanager refactor (#7179)Loïc Blot
* Drop EventManager from GameDef & do some client cleanups * EventManager is only used by Client. Don't expose it on Server & GameDef for nothing * Drop Client::event() in favor of direct calls to getEventManager * Cleanup some event put from new + put to put(new) * MtEvent: add Type(u8) enum * This will enhance event performance & ensure stricter type * Drop MtEvent::checkIs (unused) * clang-tidy reported fixes * Code style * Move event_manager.h to the client directory as it's only used by client Add EventManager unittests + switch to unordered_map as order is not important here Drop a unused function
2018-03-28Add formspec theming using prepended stringsAndrew Ward
2018-03-24Cleanup sound manager class (#7158)Loïc Blot
* Cleanup sound manager client * Use some const refs * Use auto on iterators * Drop unused parameters * Move sound_openal.* to client folder * Move sound.cpp + OnDemandSoundFetcher to client/ folder + reorganize includes properly
2018-03-23Global initialization of sound using SoundManagerGlobal (#7063)nOOb3167
* Global initialization of sound using SoundManagerGlobal
2018-03-11Android build fixes for c++11stujones11
2018-02-10Node definition manager refactor (#7016)Dániel Juhász
* Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
2018-02-08Switch F3 to use 'enable_fog' settingThomasMonroe314
2018-01-26[CSM] HUD Fix not updating server HUDs caused by 4f688d5SmallJoker
2018-01-26Fix issues with earlier CSM HUD commit (#6940)red-001
The CSM HUD PR caused some strange behavior including aborts due to parts of it using some slightly hacky code, the event refactor changing how events are processed and a minor oversight.
2018-01-20Game refactor [4/X]: keycache is now owned by InputHandlerLoic Blot
* Make InputHandler own the key cache * Add a helper function InputHandler::cancelPressed to avoid multiple similar calls in game.cpp * Move RandomInputHandler::step definition into cpp file
2018-01-20Game refactor [3/X]: Move keycache to inputhandlerLoic Blot
2018-01-20Game refactor [2/X]: Various moves (profilergraph, nodePlacementPrediction, ↵Loic Blot
create_formspec_menu) * Move profilergraph to dedicated files * Move nodePlacementPrediction to Game class * Rename create_formspec_menu to GUIFormSpecMenu::create
2018-01-20Game/Input refactor [1/X]: make RealInputHandler handle joystick inputs with ↵Loic Blot
standard input Joystick input is a RealInputHandler only usage, make it intelligent and handle the joystick with keyboard direct. This permits to remove many getters in game which should be owned by RealInputHandler
2018-01-13Add confirmation on new player registration (#6849)Muhammad Rifqi Priyo Susanto
* Attempt to add registration confirmation Using SRP auth mechanism, if server sent AUTH_MECHANISM_FIRST_SRP that means the player isn't exist. Also tell player about the server and chosen username. Local game has localhost as IP address of the server. Add RenderingEngine::draw_menu_scene() to draw GUI and clouds background. aborted -> connection_aborted * Rewrite information message text Client::promptConfirmRegister() -> Client::promptConfirmRegistration()
2018-01-05Don't recalculate statustext initial color everytime & review fixesLoic Blot
2018-01-05GameUI refactor (part 7/7): Finish to include profiler things to GameUILoic Blot
Other changes: * Add GameUI clarification comment * Move force_fog_off & disable_camera_update flags from GameUI to Game, it's not UI related * Properly init GameUI::Flags * Move toggleChat toggleHud & toggleProfiler to GameUI * Add gameui.cpp to LINT whitelist
2018-01-05GameUI refactor (part 6/X): Move Game::guitext_profiler & ↵Loic Blot
showStatusTextSimple to GameUI class Other enhancements: * Move showStatusTextSimple to GameUI class & rename to showTranslatedStatusText
2018-01-05GameUI refactor (part 5/X): Move Game::guitext_chat to GameUI classLoic Blot
Other enhancements: * Move update_profiler_gui to Game class * Move updateChat to Game class
2018-01-05GameUI refactor (part 4/X): Move Game::guitext_status, Game::m_statustext, ↵Loic Blot
GameRunData::statustext_time to GameUI class Other enhancements: * Simplify setStatusText to showStatusText, as it shows the label too (preventing almost every setStatusText to call setStatusTextTime(0) * Add unittests
2018-01-05GameUI refactor (part 3/X): Move Game::guitext2, Game::guitext_info, ↵Loic Blot
Game::infotext to GameUI class Other enhancements: * Drop unused GameRunData::time_of_day * Little GameUI::update code path optimizations
2018-01-05GameUI refactor (part 2/X): Move Game::guitext to GameUI + enhancements on ↵Loic Blot
StaticText Other enhancements: * C++ friendlyness for addStaticText() -> move to static StaticText::add()
2018-01-05GameUI refactor (part 1/X): GameUI object creation + GameUIFlags move to GameUILoic Blot
Game class is too huge and has too specialization on various subjects, like UI, formspecs, client, renderer. Start to move UI related things to GameUI object and cleanup them Other improvements: * updateChat: more performance on error messages by remove string copies * Initialize all game class members in definition instead of constructor (with nullptr instead of NULL) * Drop unused Client::show{GameChat,GameHud,Profiler,GameFog} * Add GameUI unittests
2017-12-26Add check to pause game on lost window focusrubenwardy
2017-12-14Zoom: Add 'disabled by game or mod' messageparamat
2017-12-14Minimap messages: Improve 'disabled by server' messageparamat
2017-12-11CSM fixes: load mods after flavours & add flavour to block mod loading (#6738)Loïc Blot
* CSM fixes: load mods after flavours & add flavour to block mod loading * Don't permit to load mods twice * Prepare builtin integrity global algorithm * Add missing doc & use a nicer byteflag for LOAD_CLIENT_MODS flavour * flag typo fix * Invert CSM_FL_LOOKUP_NODES & CSM_FL_LOAD_CLIENT_MODS ids
2017-12-10F5 debug info: Add colons, use lowercase except for FPS and RTTThomasMonroe314
2017-11-27F5 Debug info: More compact, return to 2 linesparamat
All data fits on width 960, most useful data still visible on width 800.
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around
2017-10-31Rewrite rendering engine (#6253)Vitaliy
* Clean draw_*() arguments * Split rendering core * Add anaglyph 3D * Interlaced 3D * Drop obsolete methods
2017-10-29Allow overriding tool capabilities through itemstack metadataraymoo
This makes it possible to modify the tool capabilities of individual itemstacks by calling a method on itemstack metadata references.
2017-10-17don't pass g_settings around, and use it directlyEsteban I. RM
2017-10-17Implement #6096Esteban I. RM
2017-10-02[CSM] Add callback on open inventory (#5793)Vincent Glize
2017-09-30game.cpp: remove dead code for proto v25 compat (#6481)Loïc Blot
Protocol v25 is not supported anymore
2017-09-28Server: affect bind_addr on constructor instead of start() (#6474)Loïc Blot
bind_addr is already ready when using constructor as we read is.IPv6 from it, instead pass the whole address
2017-09-26Add mute setting (toggled by the mute key and in the volume menu) (#6415)DTA7
* Add mute setting (toggled by the mute key and in the volume menu)
2017-09-11Implement client node dig predictionAuke Kok
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.
2017-09-10Fix incorrect buffer size calculation on creation of HUD status messagesrubenwardy
Fixes #6400
2017-09-08Particles: Do not add digging particles for airlike nodes (#6392)SmallJoker
2017-09-05Make HUD status messages translatable (#5795)Wuzzy
* Make HUD status messages translatable * Make strings in showStatusTextSimple translatable
2017-08-30Remove DSTACK support (#6346)Loïc Blot
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-29Formspec: Add options to set background color and opacity (fullscreen mode + ↵Loïc Blot
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