Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
Game Class Reference
+ Collaboration diagram for Game:

Classes

struct  Flags
 

Public Member Functions

 Game ()
 
 ~Game ()
 
bool startup (bool *kill, InputHandler *input, RenderingEngine *rendering_engine, const GameStartData &game_params, std::string &error_message, bool *reconnect, ChatBackend *chat_backend)
 
void run ()
 
void shutdown ()
 

Protected Member Functions

bool init (const std::string &map_dir, const std::string &address, u16 port, const SubgameSpec &gamespec)
 
bool initSound ()
 
bool createSingleplayerServer (const std::string &map_dir, const SubgameSpec &gamespec, u16 port)
 
void copyServerClientCache ()
 
bool createClient (const GameStartData &start_data)
 
bool initGui ()
 
bool connectToServer (const GameStartData &start_data, bool *connect_ok, bool *aborted)
 
bool getServerContent (bool *aborted)
 
void updateInteractTimers (f32 dtime)
 
bool checkConnection ()
 
bool handleCallbacks ()
 
void processQueues ()
 
void updateProfilers (const RunStats &stats, const FpsControl &draw_times, f32 dtime)
 
void updateDebugState ()
 
void updateStats (RunStats *stats, const FpsControl &draw_times, f32 dtime)
 
void updateProfilerGraphs (ProfilerGraph *graph)
 
void processUserInput (f32 dtime)
 
void processKeyInput ()
 
void processItemSelection (u16 *new_playeritem)
 
bool shouldShowTouchControls ()
 
void dropSelectedItem (bool single_item=false)
 
void openInventory ()
 
void openConsole (float scale, const wchar_t *line=NULL)
 
void toggleFreeMove ()
 
void toggleFreeMoveAlt ()
 
void togglePitchMove ()
 
void toggleFast ()
 
void toggleNoClip ()
 
void toggleCinematic ()
 
void toggleBlockBounds ()
 
void toggleAutoforward ()
 
void toggleMinimap (bool shift_pressed)
 
void toggleFog ()
 
void toggleDebug ()
 
void toggleUpdateCamera ()
 
void increaseViewRange ()
 
void decreaseViewRange ()
 
void toggleFullViewRange ()
 
void checkZoomEnabled ()
 
void updateCameraDirection (CameraOrientation *cam, float dtime)
 
void updateCameraOrientation (CameraOrientation *cam, float dtime)
 
void updatePlayerControl (const CameraOrientation &cam)
 
void updatePauseState ()
 
void step (f32 dtime)
 
void processClientEvents (CameraOrientation *cam)
 
void updateCamera (f32 dtime)
 
void updateSound (f32 dtime)
 
void processPlayerInteraction (f32 dtime, bool show_hud)
 
PointedThing updatePointedThing (const core::line3d< f32 > &shootline, bool liquids_pointable, const std::optional< Pointabilities > &pointabilities, bool look_for_object, const v3s16 &camera_offset)
 
void handlePointingAtNothing (const ItemStack &playerItem)
 
void handlePointingAtNode (const PointedThing &pointed, const ItemStack &selected_item, const ItemStack &hand_item, f32 dtime)
 
void handlePointingAtObject (const PointedThing &pointed, const ItemStack &playeritem, const v3f &player_position, bool show_debug)
 
void handleDigging (const PointedThing &pointed, const v3s16 &nodepos, const ItemStack &selected_item, const ItemStack &hand_item, f32 dtime)
 
void updateFrame (ProfilerGraph *graph, RunStats *stats, f32 dtime, const CameraOrientation &cam)
 
void updateClouds (float dtime)
 
void updateShadows ()
 
void drawScene (ProfilerGraph *graph, RunStats *stats)
 
void showOverlayMessage (const char *msg, float dtime, int percent, float *indef_pos=nullptr)
 
bool fogEnabled ()
 
void readSettings ()
 
bool isKeyDown (GameKeyType k)
 
bool wasKeyDown (GameKeyType k)
 
bool wasKeyPressed (GameKeyType k)
 
bool wasKeyReleased (GameKeyType k)
 

Static Protected Member Functions

static void settingChangedCallback (const std::string &setting_name, void *data)
 

Private Member Functions

void showDeathFormspecLegacy ()
 
void showPauseMenu ()
 
void pauseAnimation ()
 
void resumeAnimation ()
 
void handleClientEvent_None (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_PlayerDamage (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_PlayerForceMove (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_DeathscreenLegacy (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_ShowFormSpec (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_ShowLocalFormSpec (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_HandleParticleEvent (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_HudAdd (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_HudRemove (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_HudChange (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_SetSky (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_SetSun (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_SetMoon (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_SetStars (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_OverrideDayNigthRatio (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_CloudParams (ClientEvent *event, CameraOrientation *cam)
 
void updateChat (f32 dtime)
 
bool nodePlacement (const ItemDefinition &selected_def, const ItemStack &selected_item, const v3s16 &nodepos, const v3s16 &neighborpos, const PointedThing &pointed, const NodeMetadata *meta)
 
f32 getSensitivityScaleFactor () const
 
bool isTouchCrosshairDisabled ()
 

Private Attributes

InputHandlerinput = nullptr
 
Clientclient = nullptr
 
Serverserver = nullptr
 
ClientDynamicInfo client_display_info {}
 
float dynamic_info_send_timer = 0
 
IWritableTextureSourcetexture_src = nullptr
 
IWritableShaderSourceshader_src = nullptr
 
IWritableItemDefManageritemdef_manager = nullptr
 
NodeDefManagernodedef_manager = nullptr
 
std::unique_ptr< ISoundManagersound_manager
 
SoundMakersoundmaker = nullptr
 
ChatBackendchat_backend = nullptr
 
CaptureLogOutput m_chat_log_buf
 
EventManagereventmgr = nullptr
 
QuicktuneShortcutterquicktune = nullptr
 
std::unique_ptr< GameUIm_game_ui
 
irr_ptr< GUIChatConsolegui_chat_console
 
MapDrawControldraw_control = nullptr
 
Cameracamera = nullptr
 
irr_ptr< Cloudsclouds
 
irr_ptr< Skysky
 
Hudhud = nullptr
 
Minimapmapper = nullptr
 
std::unordered_map< u32, u32 > m_hud_server_to_client
 
GameRunData runData
 
Flags m_flags
 
IrrlichtDevice * device
 
RenderingEnginem_rendering_engine
 
video::IVideoDriver * driver
 
scene::ISceneManager * smgr
 
bool * kill
 
std::string * error_message
 
bool * reconnect_requested
 
PausedNodesList paused_animated_nodes
 
bool simple_singleplayer_mode
 
int crack_animation_length
 
IntervalLimiter profiler_interval
 
bool m_cache_disable_escape_sequences
 
bool m_cache_doubletap_jump
 
bool m_cache_enable_clouds
 
bool m_cache_enable_joysticks
 
bool m_cache_enable_particles
 
bool m_cache_enable_fog
 
bool m_cache_enable_noclip
 
bool m_cache_enable_free_move
 
f32 m_cache_mouse_sensitivity
 
f32 m_cache_joystick_frustum_sensitivity
 
f32 m_repeat_place_time
 
f32 m_repeat_dig_time
 
f32 m_cache_cam_smoothing
 
bool m_invert_mouse
 
bool m_enable_hotbar_mouse_wheel
 
bool m_invert_hotbar_mouse_wheel
 
bool m_first_loop_after_window_activation = false
 
bool m_camera_offset_changed = false
 
bool m_game_focused = false
 
bool m_does_lost_focus_pause_game = false
 
bool m_is_paused = false
 
bool m_touch_simulate_aux1 = false
 
bool m_touch_use_crosshair
 
float m_shutdown_progress = 0.0f
 

Static Private Attributes

static const ClientEventHandler clientEventHandler [CLIENTEVENT_MAX]
 

Constructor & Destructor Documentation

◆ Game()

Game::Game ( )

References g_settings, readSettings(), Settings::registerChangedCallback(), and settingChangedCallback().

+ Here is the call graph for this function:

◆ ~Game()

Game::~Game ( )

References camera, clearTextureNameCache(), client, Settings::deregisterAllChangedCallbacks(), draw_control, eventmgr, RenderingEngine::finalize(), g_settings, hud, itemdef_manager, m_rendering_engine, nodedef_manager, quicktune, server, shader_src, sound_manager, soundmaker, and texture_src.

+ Here is the call graph for this function:

Member Function Documentation

◆ checkConnection()

bool Game::checkConnection ( )
inlineprotected

References error_message, errorstream, fmtgettext(), and reconnect_requested.

Referenced by getServerContent(), and run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkZoomEnabled()

void Game::checkZoomEnabled ( )
protected

References PlayerFovSpec::fov, Player::getFov(), LocalPlayer::getZoomFOV(), m_game_ui, and GameUI::showTranslatedStatusText().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ connectToServer()

◆ copyServerClientCache()

void Game::copyServerClientCache ( )
protected

References clientMediaUpdateCacheCopy(), and infostream.

Referenced by createSingleplayerServer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createClient()

bool Game::createClient ( const GameStartData & start_data)
protected

References IWritableShaderSource::addShaderConstantSetterFactory(), camera, clouds, connectToServer(), crack_animation_length, device, draw_control, driver, error_message, errorstream, g_version_hash, getServerContent(), IWritableTextureSource::getTexture(), hud, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, initGui(), Player::inventory, m_cache_enable_clouds, m_rendering_engine, mapper, N_, ShadowRenderer::preInit(), shader_src, showOverlayMessage(), simple_singleplayer_mode, sky, smgr, texture_src, and utf8_to_wide().

Referenced by startup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createSingleplayerServer()

bool Game::createSingleplayerServer ( const std::string & map_dir,
const SubgameSpec & gamespec,
u16 port )
protected

References InputHandler::cancelPressed(), InputHandler::clear(), copyServerClientCache(), device, error_message, errorstream, fmtgettext(), g_settings, Settings::get(), Settings::getBool(), input, Address::isIPv6(), FpsControl::limit(), m_rendering_engine, m_shutdown_progress, N_, FpsControl::reset(), Address::Resolve(), RenderingEngine::run(), runInThread(), Address::serializeString(), Server, Address::setAddress(), showOverlayMessage(), simple_singleplayer_mode, warningstream, and BaseException::what().

Referenced by init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ decreaseViewRange()

void Game::decreaseViewRange ( )
protected

References fwgettext(), g_settings, Settings::getS16(), itos(), m_game_ui, Settings::set(), GameUI::showStatusText(), and sky.

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawScene()

void Game::drawScene ( ProfilerGraph * graph,
RunStats * stats )
protected

References BS, camera, CAMERA_MODE_FIRST, CAMERA_MODE_THIRD_FRONT, GameRunData::damage_flash, ProfilerGraph::draw(), RenderingEngine::draw_scene(), RunStats::drawtime, driver, GameRunData::fog_range, FOG_RANGE_ALL, fogEnabled(), g_fontengine, g_profiler, g_touchcontrols, Camera::getCameraMode(), FontEngine::getFont(), Profiler::graphAdd(), HUD_FLAG_CROSSHAIR_VISIBLE, HUD_FLAG_WIELDITEM_VISIBLE, Player::hud_flags, isTouchCrosshairDisabled(), GameUI::m_flags, m_game_ui, m_rendering_engine, PRECISION_MICRO, runData, sky, TimeTaker::stop(), and ZoneScoped.

Referenced by updateFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dropSelectedItem()

void Game::dropSelectedItem ( bool single_item = false)
protected

References IDropAction::count, MoveAction::from_i, MoveAction::from_inv, MoveAction::from_list, and InventoryLocation::setCurrentPlayer().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fogEnabled()

bool Game::fogEnabled ( )
inlineprotected

References m_cache_enable_fog, and sky.

Referenced by drawScene().

+ Here is the caller graph for this function:

◆ getSensitivityScaleFactor()

f32 Game::getSensitivityScaleFactor ( ) const
private

Referenced by updateCameraOrientation().

+ Here is the caller graph for this function:

◆ getServerContent()

bool Game::getServerContent ( bool * aborted)
protected

References InputHandler::cancelPressed(), checkConnection(), InputHandler::clear(), device, RenderingEngine::draw_load_screen(), FrameMarker::end(), error_message, errorstream, g_settings, Settings::getBool(), guienv, infostream, input, LC_Init, FpsControl::limit(), m_rendering_engine, FpsControl::reset(), RenderingEngine::run(), FrameMarker::started(), step(), texture_src, utf8_to_wide(), and wstrgettext().

Referenced by createClient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleCallbacks()

bool Game::handleCallbacks ( )
inlineprotected

References MainGameCallback::changepassword_requested, MainGameCallback::changevolume_requested, MainGameCallback::disconnect_requested, g_gamecallback, g_menumgr, guienv, guiroot, input, InputHandler::keycache, MainGameCallback::keyconfig_changed, MainGameCallback::keyconfig_requested, KeyCache::populate(), MainGameCallback::show_open_url_dialog, texture_src, and MainGameCallback::touchscreenlayout_requested.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleClientEvent_CloudParams()

◆ handleClientEvent_DeathscreenLegacy()

void Game::handleClientEvent_DeathscreenLegacy ( ClientEvent * event,
CameraOrientation * cam )
private

References showDeathFormspecLegacy().

+ Here is the call graph for this function:

◆ handleClientEvent_HandleParticleEvent()

void Game::handleClientEvent_HandleParticleEvent ( ClientEvent * event,
CameraOrientation * cam )
private

◆ handleClientEvent_HudAdd()

void Game::handleClientEvent_HudAdd ( ClientEvent * event,
CameraOrientation * cam )
private

◆ handleClientEvent_HudChange()

void Game::handleClientEvent_HudChange ( ClientEvent * event,
CameraOrientation * cam )
private

◆ handleClientEvent_HudRemove()

void Game::handleClientEvent_HudRemove ( ClientEvent * event,
CameraOrientation * cam )
private

References ClientEvent::hudrm, ClientEvent::id, m_hud_server_to_client, and Player::removeHud().

+ Here is the call graph for this function:

◆ handleClientEvent_None()

void Game::handleClientEvent_None ( ClientEvent * event,
CameraOrientation * cam )
private

References FATAL_ERROR.

◆ handleClientEvent_OverrideDayNigthRatio()

void Game::handleClientEvent_OverrideDayNigthRatio ( ClientEvent * event,
CameraOrientation * cam )
private

◆ handleClientEvent_PlayerDamage()

void Game::handleClientEvent_PlayerDamage ( ClientEvent * event,
CameraOrientation * cam )
private

◆ handleClientEvent_PlayerForceMove()

void Game::handleClientEvent_PlayerForceMove ( ClientEvent * event,
CameraOrientation * cam )
private

◆ handleClientEvent_SetMoon()

void Game::handleClientEvent_SetMoon ( ClientEvent * event,
CameraOrientation * cam )
private

◆ handleClientEvent_SetSky()

◆ handleClientEvent_SetStars()

◆ handleClientEvent_SetSun()

◆ handleClientEvent_ShowFormSpec()

void Game::handleClientEvent_ShowFormSpec ( ClientEvent * event,
CameraOrientation * cam )
private

◆ handleClientEvent_ShowLocalFormSpec()

void Game::handleClientEvent_ShowLocalFormSpec ( ClientEvent * event,
CameraOrientation * cam )
private

References GUIFormSpecMenu::create(), ClientEvent::formname, ClientEvent::formspec, RenderingEngine::get_gui_env(), GameUI::getFormspecGUI(), input, InputHandler::joystick, m_game_ui, m_rendering_engine, ClientEvent::show_formspec, and sound_manager.

+ Here is the call graph for this function:

◆ handleDigging()

void Game::handleDigging ( const PointedThing & pointed,
const v3s16 & nodepos,
const ItemStack & selected_item,
const ItemStack & hand_item,
f32 dtime )
protected

◆ handlePointingAtNode()

void Game::handlePointingAtNode ( const PointedThing & pointed,
const ItemStack & selected_item,
const ItemStack & hand_item,
f32 dtime )
protected

◆ handlePointingAtNothing()

void Game::handlePointingAtNothing ( const ItemStack & playerItem)
protected

References infostream, INTERACT_ACTIVATE, POINTEDTHING_NOTHING, and PointedThing::type.

Referenced by processPlayerInteraction().

+ Here is the caller graph for this function:

◆ handlePointingAtObject()

void Game::handlePointingAtObject ( const PointedThing & pointed,
const ItemStack & playeritem,
const v3f & player_position,
bool show_debug )
protected

References ClientActiveObject::debugInfoText(), KeyType::DIG, dir(), ClientActiveObject::directReportPunch(), ClientActiveObject::getPosition(), infostream, ClientActiveObject::infoText(), INTERACT_PLACE, INTERACT_START_DIGGING, isKeyDown(), m_game_ui, object_hit_delay, GameRunData::object_hit_delay_timer, KeyType::PLACE, GameRunData::punching, runData, GameRunData::selected_object, GameUI::setInfoText(), GameRunData::time_from_last_punch, unescape_translate(), utf8_to_wide(), wasKeyDown(), and wasKeyPressed().

Referenced by processPlayerInteraction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ increaseViewRange()

void Game::increaseViewRange ( )
protected

References fwgettext(), g_settings, Settings::getS16(), itos(), m_game_ui, Settings::set(), GameUI::showStatusText(), and sky.

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

bool Game::init ( const std::string & map_dir,
const std::string & address,
u16 port,
const SubgameSpec & gamespec )
protected

References createItemDefManager(), createNodeDefManager(), createShaderSource(), createSingleplayerServer(), createTextureSource(), eventmgr, initSound(), itemdef_manager, N_, nodedef_manager, quicktune, shader_src, showOverlayMessage(), and texture_src.

Referenced by startup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initGui()

bool Game::initGui ( )
protected

References ChatBackend::applySettings(), chat_backend, ChatBackend::clearRecentChat(), device, g_menumgr, g_touchcontrols, gui_chat_console, guienv, GameUI::init(), isTouchCrosshairDisabled(), m_game_ui, TouchControls::setUseCrosshair(), shouldShowTouchControls(), and texture_src.

Referenced by createClient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSound()

bool Game::initSound ( )
protected

References createOpenALSoundManager(), eventmgr, g_settings, g_sound_manager_singleton, Settings::getBool(), infostream, nodedef_manager, SoundMaker::registerReceiver(), sound_manager, and soundmaker.

Referenced by init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isKeyDown()

bool Game::isKeyDown ( GameKeyType k)
inlineprotected

References input, and InputHandler::isKeyDown().

Referenced by handlePointingAtNode(), handlePointingAtObject(), nodePlacement(), processKeyInput(), processPlayerInteraction(), and updatePlayerControl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isTouchCrosshairDisabled()

bool Game::isTouchCrosshairDisabled ( )
inlineprivate

References camera, CAMERA_MODE_FIRST, Camera::getCameraMode(), and m_touch_use_crosshair.

Referenced by drawScene(), initGui(), processPlayerInteraction(), and updateCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nodePlacement()

bool Game::nodePlacement ( const ItemDefinition & selected_def,
const ItemStack & selected_item,
const v3s16 & nodepos,
const v3s16 & neighborpos,
const PointedThing & pointed,
const NodeMetadata * meta )
private

References BS, ContentFeatures::buildable_to, CPT2_4DIR, CPT2_COLOR, CPT2_COLORED_4DIR, CPT2_COLORED_FACEDIR, CPT2_COLORED_WALLMOUNTED, CPT2_FACEDIR, CPT2_WALLMOUNTED, GUIFormSpecMenu::create(), dir(), ContentFeatures::drawtype, errorstream, facedir_dirs, floatToInt(), g_settings, NodeDefManager::get(), RenderingEngine::get_gui_env(), Settings::getBool(), MapNode::getFaceDir(), NodeDefManager::getId(), Map::getNode(), MapNode::getParam2(), LocalPlayer::getStandingNodePos(), SimpleMetadata::getString(), MapNode::getWallMountedDir(), ContentFeatures::groups, infostream, input, INTERACT_PLACE, isKeyDown(), InputHandler::isRandom(), itemgroup_get(), InputHandler::joystick, m_game_ui, SoundMaker::m_player_rightpunch_sound, m_rendering_engine, ItemStack::metadata, MYMAX, mystoi(), ItemDefinition::name, NDT_SIGNLIKE, NDT_TORCHLIKE, ItemDefinition::node_placement_prediction, nodedef_manager, p(), ContentFeatures::param_type_2, ItemDefinition::place_param2, ContentFeatures::rightclickable, InventoryLocation::setNodeMeta(), MapNode::setParam2(), KeyType::SNEAK, sound_manager, ItemDefinition::sound_place, ItemDefinition::sound_place_failed, soundmaker, GameUI::updateFormspec(), verbosestream, ContentFeatures::walkable, and ItemDefinition::wallmounted_rotate_vertical.

Referenced by handlePointingAtNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openConsole()

void Game::openConsole ( float scale,
const wchar_t * line = NULL )
protected

References gui_chat_console, porting::hasPhysicalKeyboardAndroid(), and porting::showTextInputDialog().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openInventory()

void Game::openInventory ( )
protected

References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), LocalPlayer::getCAO(), PlayerInventoryFormSource::getForm(), Client::getInventory(), infostream, input, InputHandler::joystick, PlayerInventoryFormSource::m_client, m_game_ui, m_rendering_engine, InventoryLocation::setCurrentPlayer(), sound_manager, and GameUI::updateFormspec().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pauseAnimation()

void Game::pauseAnimation ( )
private

References paused_animated_nodes, pauseNodeAnimation(), and smgr.

Referenced by updatePauseState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processClientEvents()

void Game::processClientEvents ( CameraOrientation * cam)
protected

References CLIENTEVENT_MAX, clientEventHandler, FATAL_ERROR_IF, and ClientEventHandler::handler.

Referenced by run().

+ Here is the caller graph for this function:

◆ processItemSelection()

void Game::processItemSelection ( u16 * new_playeritem)
protected

References dir(), g_touchcontrols, TouchControls::getHotbarSelection(), Player::getMaxHotbarItemcount(), InputHandler::getMouseWheel(), Player::getWieldIndex(), KeyType::HOTBAR_NEXT, KeyType::HOTBAR_PREV, input, m_enable_hotbar_mouse_wheel, m_invert_hotbar_mouse_wheel, MYMIN, KeyType::SLOT_1, and wasKeyDown().

Referenced by processUserInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processKeyInput()

void Game::processKeyInput ( )
protected

References KeyType::AUTOFORWARD, KeyType::BACKWARD, InputHandler::cancelPressed(), KeyType::CHAT, checkZoomEnabled(), KeyType::CINEMATIC, KeyType::CMD, KeyType::CMD_LOCAL, KeyType::CONSOLE, QuicktuneShortcutter::dec(), KeyType::DEC_VOLUME, KeyType::DECREASE_VIEWING_RANGE, decreaseViewRange(), KeyType::DROP, dropSelectedItem(), KeyType::FASTMOVE, KeyType::FREEMOVE, fwgettext(), g_settings, Settings::getBool(), Settings::getFloat(), QuicktuneShortcutter::getMessage(), gui_chat_console, QuicktuneShortcutter::hasMessage(), QuicktuneShortcutter::inc(), KeyType::INC_VOLUME, KeyType::INCREASE_VIEWING_RANGE, increaseViewRange(), input, KeyType::INVENTORY, isKeyDown(), KeyType::JUMP, GameRunData::jump_timer_up, m_game_ui, KeyType::MINIMAP, KeyType::MUTE, myround(), QuicktuneShortcutter::next(), KeyType::NOCLIP, openConsole(), openInventory(), KeyType::PITCHMOVE, QuicktuneShortcutter::prev(), quicktune, KeyType::QUICKTUNE_DEC, KeyType::QUICKTUNE_INC, KeyType::QUICKTUNE_NEXT, KeyType::QUICKTUNE_PREV, KeyType::RANGESELECT, GameRunData::reset_jump_timer, runData, KeyType::SCREENSHOT, Settings::setBool(), Settings::setFloat(), showPauseMenu(), GameUI::showStatusText(), GameUI::showTranslatedStatusText(), KeyType::SNEAK, KeyType::TOGGLE_BLOCK_BOUNDS, KeyType::TOGGLE_CHAT, KeyType::TOGGLE_DEBUG, KeyType::TOGGLE_FOG, KeyType::TOGGLE_HUD, KeyType::TOGGLE_PROFILER, KeyType::TOGGLE_UPDATE_CAMERA, toggleAutoforward(), toggleBlockBounds(), GameUI::toggleChat(), toggleCinematic(), toggleDebug(), toggleFast(), toggleFog(), toggleFreeMove(), toggleFreeMoveAlt(), toggleFullViewRange(), GameUI::toggleHud(), toggleMinimap(), toggleNoClip(), togglePitchMove(), GameUI::toggleProfiler(), toggleUpdateCamera(), utf8_to_wide(), wasKeyDown(), wasKeyPressed(), and KeyType::ZOOM.

Referenced by processUserInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processPlayerInteraction()

void Game::processPlayerInteraction ( f32 dtime,
bool show_hud )
protected

References TouchControls::applyContextControls(), BS, GameRunData::btn_down_for_dig, camera, CAMERA_MODE_FIRST, CAMERA_MODE_THIRD, CAMERA_MODE_THIRD_FRONT, InputHandler::clearWasKeyPressed(), JoystickController::clearWasKeyPressed(), InputHandler::clearWasKeyReleased(), JoystickController::clearWasKeyReleased(), Player::control, KeyType::DIG, PlayerControl::dig, GameRunData::dig_instantly, GameRunData::dig_time, GameRunData::digging, GameRunData::digging_blocked, PointedThing::dump(), g_settings, g_touchcontrols, Settings::getBool(), Camera::getCameraMode(), ItemStack::getDefinition(), Camera::getDirection(), Camera::getHeadPosition(), TouchInteraction::getMode(), Camera::getOffset(), Camera::getPosition(), LocalPlayer::getPosition(), TouchControls::getShootline(), getToolRange(), Player::getWieldedItem(), handlePointingAtNode(), handlePointingAtNothing(), handlePointingAtObject(), hud, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, infostream, input, INTERACT_STOP_DIGGING, INTERACT_USE, intToFloat(), isKeyDown(), isTouchCrosshairDisabled(), itemdef_manager, InputHandler::joystick, ItemDefinition::liquids_pointable, GameUI::m_flags, m_game_ui, SoundMaker::m_player_leftpunch_sound, SoundMaker::m_player_leftpunch_sound2, PointedThing::node_undersurface, GameRunData::nodig_delay_timer, KeyType::PLACE, PlayerControl::place, ItemDefinition::pointabilities, GameRunData::pointed_old, POINTEDTHING_NODE, POINTEDTHING_NOTHING, POINTEDTHING_OBJECT, GameRunData::punching, GameRunData::repeat_place_timer, runData, Camera::setDigging(), ItemDefinition::sound_use, ItemDefinition::sound_use_air, soundmaker, ItemDefinition::touch_interaction, PointedThing::type, updatePointedThing(), Hud::updateSelectionMesh(), ItemDefinition::usable, wasKeyDown(), wasKeyPressed(), and wasKeyReleased().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processQueues()

void Game::processQueues ( )
protected

References IWritableShaderSource::processQueue(), IWritableTextureSource::processQueue(), shader_src, and texture_src.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processUserInput()

void Game::processUserInput ( f32 dtime)
protected

References InputHandler::clear(), device, g_touchcontrols, GameUI::getFormspecGUI(), gui_chat_console, guienv, TouchControls::hide(), infostream, input, isMenuActive(), GameRunData::jump_timer_down, GameRunData::jump_timer_up, m_cache_doubletap_jump, m_game_focused, m_game_ui, GameRunData::new_playeritem, processItemSelection(), processKeyInput(), InputHandler::releaseAllKeys(), runData, shouldShowTouchControls(), TouchControls::show(), InputHandler::step(), TouchControls::step(), and texture_src.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readSettings()

void Game::readSettings ( )
protected

◆ resumeAnimation()

void Game::resumeAnimation ( )
private

References paused_animated_nodes.

Referenced by updatePauseState().

+ Here is the caller graph for this function:

◆ run()

◆ settingChangedCallback()

void Game::settingChangedCallback ( const std::string & setting_name,
void * data )
staticprotected

Referenced by Game().

+ Here is the caller graph for this function:

◆ shouldShowTouchControls()

bool Game::shouldShowTouchControls ( )
protected

References device, g_settings, Settings::get(), RenderingEngine::getLastPointerType(), is_yes(), and Touch.

Referenced by initGui(), and processUserInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showDeathFormspecLegacy()

void Game::showDeathFormspecLegacy ( )
private

References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), GameUI::getFormspecGUI(), input, InputHandler::joystick, m_game_ui, m_rendering_engine, SIZE_TAG, and sound_manager.

Referenced by handleClientEvent_DeathscreenLegacy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showOverlayMessage()

void Game::showOverlayMessage ( const char * msg,
float dtime,
int percent,
float * indef_pos = nullptr )
protected

References RenderingEngine::draw_load_screen(), guienv, m_rendering_engine, texture_src, and wstrgettext().

Referenced by connectToServer(), createClient(), createSingleplayerServer(), init(), and shutdown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPauseMenu()

void Game::showPauseMenu ( )
private

References GUIFormSpecMenu::create(), g_settings, g_touchcontrols, Settings::get(), RenderingEngine::get_gui_env(), Settings::getBool(), GameUI::getFormspecGUI(), input, InputHandler::joystick, m_game_ui, m_rendering_engine, simple_singleplayer_mode, SIZE_TAG, sound_manager, str_formspec_escape(), and strgettext().

Referenced by processKeyInput(), and run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shutdown()

void Game::shutdown ( )

References ChatBackend::addMessage(), chat_backend, GameUI::clearText(), client, clouds, GameUI::deleteFormspec(), MainMenuManager::deleteFront(), device, g_menumgr, g_touchcontrols, GameUI::getFormspecGUI(), gui_chat_console, TouchControls::hide(), m_game_ui, m_rendering_engine, m_shutdown_progress, MainMenuManager::menuCount(), N_, IWritableShaderSource::processQueue(), IWritableTextureSource::processQueue(), GUIModalMenu::quitMenu(), FpsControl::reset(), RenderingEngine::run(), runInThread(), server, shader_src, showOverlayMessage(), sky, sleep_ms, sound_manager, soundmaker, and texture_src.

Referenced by the_game().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startup()

bool Game::startup ( bool * kill,
InputHandler * input,
RenderingEngine * rendering_engine,
const GameStartData & game_params,
std::string & error_message,
bool * reconnect,
ChatBackend * chat_backend )

◆ step()

void Game::step ( f32 dtime)
inlineprotected

References device, g_menumgr, g_settings, Settings::getFloat(), m_is_paused, MainMenuManager::pausesGame(), and ZoneScoped.

Referenced by connectToServer(), getServerContent(), and run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleAutoforward()

void Game::toggleAutoforward ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, Settings::set(), and GameUI::showTranslatedStatusText().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleBlockBounds()

void Game::toggleBlockBounds ( )
protected

References Hud::BLOCK_BOUNDS_CURRENT, Hud::BLOCK_BOUNDS_NEAR, Hud::BLOCK_BOUNDS_OFF, hud, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, m_game_ui, GameUI::showTranslatedStatusText(), and Hud::toggleBlockBounds().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleCinematic()

void Game::toggleCinematic ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, Settings::set(), and GameUI::showTranslatedStatusText().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleDebug()

void Game::toggleDebug ( )
protected

References draw_control, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, GameUI::m_flags, m_game_ui, MapDrawControl::show_wireframe, and GameUI::showTranslatedStatusText().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleFast()

void Game::toggleFast ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, m_touch_simulate_aux1, Settings::set(), and GameUI::showTranslatedStatusText().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleFog()

void Game::toggleFog ( )
protected

References g_settings, Settings::getBool(), m_game_ui, Settings::setBool(), GameUI::showTranslatedStatusText(), and sky.

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleFreeMove()

void Game::toggleFreeMove ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, Settings::set(), and GameUI::showTranslatedStatusText().

Referenced by processKeyInput(), and toggleFreeMoveAlt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleFreeMoveAlt()

void Game::toggleFreeMoveAlt ( )
protected

References GameRunData::jump_timer_down, GameRunData::jump_timer_down_before, GameRunData::jump_timer_up, m_cache_doubletap_jump, GameRunData::reset_jump_timer, runData, and toggleFreeMove().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleFullViewRange()

void Game::toggleFullViewRange ( )
protected

References draw_control, m_game_ui, MapDrawControl::range_all, GameUI::showTranslatedStatusText(), and sky.

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleMinimap()

void Game::toggleMinimap ( bool shift_pressed)
protected

References g_settings, Settings::getBool(), Minimap::getModeDef(), Minimap::getModeIndex(), Hud::hasElementOfType(), hud, HUD_ELEM_MINIMAP, HUD_FLAG_MINIMAP_RADAR_VISIBLE, HUD_FLAG_MINIMAP_VISIBLE, MinimapModeDef::label, GameUI::m_flags, m_game_ui, mapper, MINIMAP_TYPE_RADAR, Minimap::nextMode(), GameUI::showStatusText(), GameUI::showTranslatedStatusText(), Minimap::toggleMinimapShape(), MinimapModeDef::type, and utf8_to_wide().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleNoClip()

void Game::toggleNoClip ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, Settings::set(), and GameUI::showTranslatedStatusText().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ togglePitchMove()

void Game::togglePitchMove ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, Settings::set(), and GameUI::showTranslatedStatusText().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleUpdateCamera()

void Game::toggleUpdateCamera ( )
protected

References Game::Flags::disable_camera_update, m_flags, m_game_ui, and GameUI::showTranslatedStatusText().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateCamera()

void Game::updateCamera ( f32 dtime)
protected

◆ updateCameraDirection()

void Game::updateCameraDirection ( CameraOrientation * cam,
float dtime )
protected

References device, driver, g_touchcontrols, input, isMenuActive(), InputHandler::isRandom(), m_first_loop_after_window_activation, InputHandler::setMousePos(), and updateCameraOrientation().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateCameraOrientation()

void Game::updateCameraOrientation ( CameraOrientation * cam,
float dtime )
protected

References camera, CAMERA_MODE_THIRD_FRONT, CameraOrientation::camera_pitch, CameraOrientation::camera_yaw, driver, g_touchcontrols, JoystickController::getAxisWithoutDead(), Camera::getCameraMode(), InputHandler::getMousePos(), TouchControls::getPitchChange(), getSensitivityScaleFactor(), TouchControls::getYawChange(), input, JA_FRUSTUM_HORIZONTAL, JA_FRUSTUM_VERTICAL, InputHandler::joystick, m_cache_enable_joysticks, m_cache_joystick_frustum_sensitivity, m_cache_mouse_sensitivity, m_invert_mouse, rangelim, and InputHandler::setMousePos().

Referenced by updateCameraDirection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateChat()

void Game::updateChat ( f32 dtime)
private

References ChatBackend::addMessage(), ChatBackend::addUnparsedMessage(), chat_backend, ChatBackend::getRecentBuffer(), ChatBackend::getRecentChat(), LL_ERROR, LL_INFO, LL_TRACE, LL_VERBOSE, LL_WARNING, m_cache_disable_escape_sequences, m_chat_log_buf, m_game_ui, ChatBuffer::resetLinesModified(), GameUI::setChatText(), ChatBackend::step(), CaptureLogOutput::take(), GameUI::updateChatSize(), and utf8_to_wide().

Referenced by updateFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateClouds()

void Game::updateClouds ( float dtime)
protected

References BS, camera, clouds, GameRunData::fog_range, Camera::getCameraNode(), Camera::getOffset(), runData, and sky.

Referenced by updateFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateDebugState()

void Game::updateDebugState ( )
protected

References MapDrawControl::allow_noclip, Game::Flags::disable_camera_update, Hud::disableBlockBounds(), draw_control, GameUI::getFormspecGUI(), hud, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, m_cache_enable_noclip, m_flags, GameUI::m_flags, m_game_ui, GUIFormSpecMenu::setDebugView(), and MapDrawControl::show_wireframe.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateFrame()

void Game::updateFrame ( ProfilerGraph * graph,
RunStats * stats,
f32 dtime,
const CameraOrientation & cam )
protected

◆ updateInteractTimers()

void Game::updateInteractTimers ( f32 dtime)
inlineprotected

References GameRunData::nodig_delay_timer, GameRunData::object_hit_delay_timer, runData, and GameRunData::time_from_last_punch.

Referenced by run().

+ Here is the caller graph for this function:

◆ updatePauseState()

void Game::updatePauseState ( )
protected

References g_menumgr, m_is_paused, ISoundManager::pauseAll(), pauseAnimation(), MainMenuManager::pausesGame(), ISoundManager::resumeAll(), resumeAnimation(), simple_singleplayer_mode, and sound_manager.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updatePlayerControl()

void Game::updatePlayerControl ( const CameraOrientation & cam)
protected

◆ updatePointedThing()

PointedThing Game::updatePointedThing ( const core::line3d< f32 > & shootline,
bool liquids_pointable,
const std::optional< Pointabilities > & pointabilities,
bool look_for_object,
const v3s16 & camera_offset )
protected

Returns the object or node the player is pointing at. Also updates the selected thing in the Hud.

Parameters
[in]shootlinethe shootline, starting from the camera position. This also gives the maximal distance of the search.
[in]liquids_pointableif false, liquids are ignored
[in]pointabilitiesitem specific pointable overriding
[in]look_for_objectif false, objects are ignored
[in]camera_offsetoffset of the camera
[out]selected_objectthe selected object or NULL if not found

References BS, Environment::continueRaycast(), dir(), ClientActiveObject::doShowSelectionBox(), final_color_blend(), floatToInt(), g_6dirs, g_settings, Settings::getBool(), ClientEnvironment::getClientMap(), getInteriorLight(), MapNode::getNeighbors(), Map::getNode(), Map::getNodeDefManager(), ClientActiveObject::getPosition(), GenericCAO::getProperties(), GenericCAO::getSceneNode(), ClientActiveObject::getSelectionBox(), Hud::getSelectionBoxes(), MapNode::getSelectionBoxes(), Hud::getSelectionPos(), hud, PointedThing::intersection_normal, intToFloat(), PointedThing::node_undersurface, PointedThing::object_id, p(), POINTEDTHING_NODE, POINTEDTHING_OBJECT, Hud::pointing_at_object, PointedThing::raw_intersection_normal, ObjectProperties::rotate_selectionbox, runData, GameRunData::selected_object, Hud::setSelectedFaceNormal(), Hud::setSelectionMeshColor(), Hud::setSelectionPos(), Hud::setSelectionRotation(), and PointedThing::type.

Referenced by processPlayerInteraction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateProfilerGraphs()

void Game::updateProfilerGraphs ( ProfilerGraph * graph)
inlineprotected

References g_profiler, Profiler::graphPop(), and ProfilerGraph::put().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateProfilers()

void Game::updateProfilers ( const RunStats & stats,
const FpsControl & draw_times,
f32 dtime )
protected

References Profiler::avg(), FpsControl::busy_time, Profiler::clear(), RunStats::drawtime, driver, g_profiler, g_settings, Settings::getFloat(), Profiler::graphAdd(), Profiler::graphSet(), infostream, m_game_ui, Profiler::print(), profiler_interval, FpsControl::sleep_time, IntervalLimiter::step(), and GameUI::updateProfiler().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateShadows()

void Game::updateShadows ( )
protected

References camera, RenderingEngine::get_shadow_renderer(), ShadowRenderer::getDirectionalLight(), getWickedTimeOfDay(), m_camera_offset_changed, runData, DirectionalLight::setDirection(), ShadowRenderer::setShadowIntensity(), ShadowRenderer::setShadowTint(), ShadowRenderer::setTimeOfDay(), sky, GameRunData::time_of_day_smooth, and DirectionalLight::update_frustum().

Referenced by updateFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSound()

void Game::updateSound ( f32 dtime)
protected

References BS, camera, device, NodeDefManager::get(), Camera::getCameraNode(), Camera::getDirection(), LocalPlayer::getFootstepNodePos(), Map::getNode(), Camera::getOffset(), LocalPlayer::getParent(), Player::getSpeed(), ClientActiveObject::getVelocity(), intToFloat(), SoundMaker::m_player_step_sound, LocalPlayer::makes_footstep_sound, SoundMaker::makes_footstep_sound, nodedef_manager, ContentFeatures::sound_footstep, sound_manager, sound_volume_control(), soundmaker, SoundMaker::step(), and ISoundManager::updateListener().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateStats()

void Game::updateStats ( RunStats * stats,
const FpsControl & draw_times,
f32 dtime )
protected

References Jitter::avg, RunStats::busy_time_jitter, Jitter::counter, RunStats::dtime_jitter, FpsControl::getBusyMs(), Jitter::max, Jitter::max_fraction, Jitter::max_sample, Jitter::min, and Jitter::min_sample.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wasKeyDown()

bool Game::wasKeyDown ( GameKeyType k)
inlineprotected

References input, and InputHandler::wasKeyDown().

Referenced by handlePointingAtObject(), processItemSelection(), processKeyInput(), and processPlayerInteraction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wasKeyPressed()

bool Game::wasKeyPressed ( GameKeyType k)
inlineprotected

References input, and InputHandler::wasKeyPressed().

Referenced by handlePointingAtNode(), handlePointingAtObject(), processKeyInput(), processPlayerInteraction(), and updateCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wasKeyReleased()

bool Game::wasKeyReleased ( GameKeyType k)
inlineprotected

References input, and InputHandler::wasKeyReleased().

Referenced by processPlayerInteraction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ camera

◆ chat_backend

ChatBackend* Game::chat_backend = nullptr
private

Referenced by initGui(), shutdown(), startup(), and updateChat().

◆ client

Client* Game::client = nullptr
private

Referenced by ~Game(), and shutdown().

◆ client_display_info

ClientDynamicInfo Game::client_display_info {}
private

Referenced by run().

◆ clientEventHandler

const ClientEventHandler Game::clientEventHandler
staticprivate
Initial value:
= {
}
void handleClientEvent_CloudParams(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:3148
void handleClientEvent_OverrideDayNigthRatio(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:3140
void handleClientEvent_HudAdd(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:2935
void handleClientEvent_PlayerDamage(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:2853
void handleClientEvent_SetSky(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:3040
void handleClientEvent_SetStars(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:3130
void handleClientEvent_DeathscreenLegacy(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:2887
void handleClientEvent_ShowFormSpec(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:2892
void handleClientEvent_SetSun(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:3110
void handleClientEvent_PlayerForceMove(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:2881
void handleClientEvent_HudRemove(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:2968
void handleClientEvent_HudChange(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:2981
void handleClientEvent_None(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:2848
void handleClientEvent_SetMoon(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:3121
void handleClientEvent_HandleParticleEvent(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:2928
void handleClientEvent_ShowLocalFormSpec(ClientEvent *event, CameraOrientation *cam)
Definition game.cpp:2916

Referenced by processClientEvents().

◆ clouds

◆ crack_animation_length

int Game::crack_animation_length
private

Referenced by createClient(), and handleDigging().

◆ device

◆ draw_control

◆ driver

video::IVideoDriver* Game::driver
private

◆ dynamic_info_send_timer

float Game::dynamic_info_send_timer = 0
private

Referenced by run().

◆ error_message

std::string* Game::error_message
private

◆ eventmgr

EventManager* Game::eventmgr = nullptr
private

◆ gui_chat_console

irr_ptr<GUIChatConsole> Game::gui_chat_console
private

◆ hud

◆ input

◆ itemdef_manager

◆ kill

bool* Game::kill
private

Referenced by run(), and startup().

◆ m_cache_cam_smoothing

f32 Game::m_cache_cam_smoothing
private

Referenced by readSettings(), and run().

◆ m_cache_disable_escape_sequences

bool Game::m_cache_disable_escape_sequences
private

Referenced by readSettings(), and updateChat().

◆ m_cache_doubletap_jump

bool Game::m_cache_doubletap_jump
private

◆ m_cache_enable_clouds

bool Game::m_cache_enable_clouds
private

Referenced by createClient(), and readSettings().

◆ m_cache_enable_fog

bool Game::m_cache_enable_fog
private

Referenced by fogEnabled(), and readSettings().

◆ m_cache_enable_free_move

bool Game::m_cache_enable_free_move
private

Referenced by readSettings(), and updateFrame().

◆ m_cache_enable_joysticks

bool Game::m_cache_enable_joysticks
private

◆ m_cache_enable_noclip

bool Game::m_cache_enable_noclip
private

Referenced by readSettings(), and updateDebugState().

◆ m_cache_enable_particles

bool Game::m_cache_enable_particles
private

Referenced by handleDigging(), and readSettings().

◆ m_cache_joystick_frustum_sensitivity

f32 Game::m_cache_joystick_frustum_sensitivity
private

◆ m_cache_mouse_sensitivity

f32 Game::m_cache_mouse_sensitivity
private

◆ m_camera_offset_changed

bool Game::m_camera_offset_changed = false
private

◆ m_chat_log_buf

CaptureLogOutput Game::m_chat_log_buf
private

Referenced by readSettings(), and updateChat().

◆ m_does_lost_focus_pause_game

bool Game::m_does_lost_focus_pause_game = false
private

Referenced by readSettings(), and run().

◆ m_enable_hotbar_mouse_wheel

bool Game::m_enable_hotbar_mouse_wheel
private

◆ m_first_loop_after_window_activation

bool Game::m_first_loop_after_window_activation = false
private

Referenced by startup(), and updateCameraDirection().

◆ m_flags

Flags Game::m_flags
private

◆ m_game_focused

bool Game::m_game_focused = false
private

Referenced by processUserInput().

◆ m_game_ui

◆ m_hud_server_to_client

std::unordered_map<u32, u32> Game::m_hud_server_to_client
private

◆ m_invert_hotbar_mouse_wheel

bool Game::m_invert_hotbar_mouse_wheel
private

◆ m_invert_mouse

bool Game::m_invert_mouse
private

◆ m_is_paused

bool Game::m_is_paused = false
private

◆ m_rendering_engine

◆ m_repeat_dig_time

f32 Game::m_repeat_dig_time
private

Referenced by handleDigging(), and readSettings().

◆ m_repeat_place_time

f32 Game::m_repeat_place_time
private

◆ m_shutdown_progress

float Game::m_shutdown_progress = 0.0f
private

◆ m_touch_simulate_aux1

bool Game::m_touch_simulate_aux1 = false
private

◆ m_touch_use_crosshair

bool Game::m_touch_use_crosshair
private

◆ mapper

Minimap* Game::mapper = nullptr
private

◆ nodedef_manager

◆ paused_animated_nodes

PausedNodesList Game::paused_animated_nodes
private

Referenced by pauseAnimation(), and resumeAnimation().

◆ profiler_interval

IntervalLimiter Game::profiler_interval
private

Referenced by updateProfilers().

◆ quicktune

QuicktuneShortcutter* Game::quicktune = nullptr
private

Referenced by ~Game(), init(), and processKeyInput().

◆ reconnect_requested

bool* Game::reconnect_requested
private

◆ runData

◆ server

Server* Game::server = nullptr
private

Referenced by ~Game(), and shutdown().

◆ shader_src

IWritableShaderSource* Game::shader_src = nullptr
private

◆ simple_singleplayer_mode

bool Game::simple_singleplayer_mode
private

◆ sky

◆ smgr

scene::ISceneManager* Game::smgr
private

◆ sound_manager

◆ soundmaker

◆ texture_src


The documentation for this class was generated from the following file: