RigsofRods  2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
main.cpp
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5  Copyright 2013-2020 Petr Ohlidal
6 
7  For more information, see http://www.rigsofrods.org/
8 
9  Rigs of Rods is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License version 3, as
11  published by the Free Software Foundation.
12 
13  Rigs of Rods is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #include "Actor.h"
23 #include "Application.h"
24 #include "AppContext.h"
25 #include "CacheSystem.h"
26 #include "CameraManager.h"
27 #include "ChatSystem.h"
28 #include "Collisions.h"
29 #include "Console.h"
30 #include "ContentManager.h"
31 #include "DiscordRpc.h"
32 #include "ErrorUtils.h"
33 #include "GameContext.h"
34 #include "GfxScene.h"
35 #include "GUI_DirectionArrow.h"
36 #include "GUI_FrictionSettings.h"
37 #include "GUI_GameControls.h"
38 #include "GUI_LoadingWindow.h"
39 #include "GUI_MainSelector.h"
40 #include "GUI_MessageBox.h"
43 #include "GUI_RepositorySelector.h"
44 #include "GUI_VehicleInfoTPanel.h"
45 #include "GUIManager.h"
46 #include "GUIUtils.h"
47 #include "InputEngine.h"
48 #include "Language.h"
49 #include "MumbleIntegration.h"
50 #include "OutGauge.h"
51 #include "OverlayWrapper.h"
52 #include "PlatformUtils.h"
53 #include "RoRVersion.h"
54 #include "ScriptEngine.h"
55 #include "Skidmark.h"
56 #include "SoundScriptManager.h"
57 #include "Terrain.h"
58 #include "Utils.h"
59 #include <Overlay/OgreOverlaySystem.h>
60 #include <ctime>
61 #include <iomanip>
62 #include <string>
63 #include <fstream>
64 
65 #ifdef USE_CURL
66 # include <curl/curl.h>
67 #endif //USE_CURL
68 
69 #ifdef __cplusplus
70 extern "C" {
71 #endif
72 
73 int main(int argc, char *argv[])
74 {
75  using namespace RoR;
76 
77 #ifdef USE_CURL
78  curl_global_init(CURL_GLOBAL_ALL); // MUST init before any threads are started
79 #endif
80 
81 #ifndef _DEBUG
82  try
83  {
84 #endif
85 
86  // Create cvars, set default values
88 
89  // Record main thread ID for checks
91 
92  // Update cvars 'sys_process_dir', 'sys_user_dir'
93  if (!App::GetAppContext()->SetUpProgramPaths())
94  {
95  return -1; // Error already displayed
96  }
97 
98  // Create OGRE default logger early
100 
101  // User directories
104  App::sys_thumbnails_dir->setStr(PathCombine(App::sys_user_dir->getStr(), "thumbnails"));
105  App::sys_savegames_dir ->setStr(PathCombine(App::sys_user_dir->getStr(), "savegames"));
106  App::sys_screenshot_dir->setStr(PathCombine(App::sys_user_dir->getStr(), "screenshots"));
107  App::sys_scripts_dir ->setStr(PathCombine(App::sys_user_dir->getStr(), "scripts"));
108  App::sys_projects_dir ->setStr(PathCombine(App::sys_user_dir->getStr(), "projects"));
109 
110  // Load RoR.cfg - updates cvars
112 
113  // Process command line params - updates 'cli_*' cvars
114  App::GetConsole()->processCommandLine(argc, argv);
115 
116  if (App::app_state->getEnum<AppState>() == AppState::PRINT_HELP_EXIT)
117  {
119  return 0;
120  }
121  if (App::app_state->getEnum<AppState>() == AppState::PRINT_VERSION_EXIT)
122  {
124  return 0;
125  }
126 
127  // Find resources dir, update cvar 'sys_resources_dir'
128  if (!App::GetAppContext()->SetUpResourcesDir())
129  {
130  return -1; // Error already displayed
131  }
132 
133  // Make sure config directory exists - to save 'ogre.cfg'
135 
136  // Load and start OGRE renderer, uses config directory
137  if (!App::GetAppContext()->SetUpRendering())
138  {
139  return -1; // Error already displayed
140  }
141 
142  Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
143 
144  // Deploy base config files from 'skeleton.zip'
145  if (!App::GetAppContext()->SetUpConfigSkeleton())
146  {
147  return -1; // Error already displayed
148  }
149 
150  Ogre::OverlaySystem* overlay_system = new Ogre::OverlaySystem(); //Overlay init
151 
152  Ogre::ConfigOptionMap ropts = App::GetAppContext()->GetOgreRoot()->getRenderSystem()->getConfigOptions();
153  int resolution = Ogre::StringConverter::parseInt(Ogre::StringUtil::split(ropts["Video Mode"].currentValue, " x ")[0], 1024);
154  int fsaa = 2 * (Ogre::StringConverter::parseInt(ropts["FSAA"].currentValue, 0) / 4);
155  int res = std::pow(2, std::floor(std::log2(resolution)));
156 
157  Ogre::TextureManager::getSingleton().createManual ("EnvironmentTexture",
158  Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_CUBE_MAP, res / 4, res / 4, 0,
159  Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET, 0, false, fsaa);
160  Ogre::TextureManager::getSingleton ().createManual ("Refraction",
161  Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D, res / 2, res / 2, 0,
162  Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET, 0, false, fsaa);
163  Ogre::TextureManager::getSingleton ().createManual ("Reflection",
164  Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D, res / 2, res / 2, 0,
165  Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET, 0, false, fsaa);
166 
167  if (!App::diag_warning_texture->getBool())
168  {
169  // We overwrite the default warning texture (yellow stripes) with something unobtrusive
170  Ogre::uchar data[3] = {0};
171  Ogre::PixelBox pixels(1, 1, 1, Ogre::PF_BYTE_RGB, &data);
172  Ogre::TextureManager::getSingleton()._getWarningTexture()->getBuffer()->blitFromMemory(pixels);
173  }
174 
181 
182 #ifndef NOLANG
184 #endif // NOLANG
185  App::GetConsole()->regBuiltinCommands(); // Call after localization had been set up
186 
188 
189  // Set up rendering
190  App::CreateGfxScene(); // Creates OGRE SceneManager, needs content manager
191  App::GetGfxScene()->GetSceneManager()->addRenderQueueListener(overlay_system);
192  App::CreateCameraManager(); // Creates OGRE Camera
193  App::GetGfxScene()->GetEnvMap().SetupEnvMap(); // Needs camera
194 
195  App::CreateGuiManager(); // Needs scene manager
196 
198 
200 
201 #ifdef USE_ANGELSCRIPT
205 #endif
206 
208 
209  // Add "this is obsolete" marker file to old config location
211 
213 
214  // Load inertia config file
216 
217  // Load mod cache
218  if (App::app_force_cache_purge->getBool())
219  {
221  }
222  else if (App::cli_force_cache_update->getBool() || App::app_force_cache_update->getBool())
223  {
225  }
226  else
227  {
229  }
230 
231  // Load startup scripts (console, then RoR.cfg)
232  if (App::cli_custom_scripts->getStr() != "")
233  {
234  Ogre::StringVector script_names = Ogre::StringUtil::split(App::cli_custom_scripts->getStr(), ",");
235  for (Ogre::String const& scriptname: script_names)
236  {
237  LOG(fmt::format("Loading startup script '{}' (from command line)", scriptname));
238  // We cannot call `loadScript()` directly because modcache isn't up yet - gadgets cannot be resolved
241  req->lsr_filename = scriptname;
243  // errors are logged by OGRE & AngelScript
244  }
245  }
246  if (App::app_custom_scripts->getStr() != "")
247  {
248  Ogre::StringVector script_names = Ogre::StringUtil::split(App::app_custom_scripts->getStr(), ",");
249  for (Ogre::String const& scriptname: script_names)
250  {
251  LOG(fmt::format("Loading startup script '{}' (from config file)", scriptname));
252  // We cannot call `loadScript()` directly because modcache isn't up yet - gadgets cannot be resolved
255  req->lsr_filename = scriptname;
257  // errors are logged by OGRE & AngelScript
258  }
259  }
260 
261  // Handle game state presets
262  if (App::cli_server_host->getStr() != "" && App::cli_server_port->getInt() != 0) // Multiplayer, commandline
263  {
267  }
268  else if (App::mp_join_on_startup->getBool()) // Multiplayer, conf file
269  {
271  }
272  else // Single player
273  {
274  if (App::cli_preset_terrain->getStr() != "") // Terrain, commandline
275  {
277  }
278  else if (App::diag_preset_terrain->getStr() != "") // Terrain, conf file
279  {
281  }
282  else // Main menu
283  {
284  if (App::cli_resume_autosave->getBool())
285  {
286  if (FileExists(PathCombine(App::sys_savegames_dir->getStr(), "autosave.sav")))
287  {
289  }
290  }
291  else if (App::app_skip_main_menu->getBool())
292  {
293  // MainMenu disabled (singleplayer mode) -> go directly to map selector (traditional behavior)
295  m.payload = reinterpret_cast<void*>(new LoaderType(LT_Terrain));
297  }
298  else
299  {
301  }
302  }
303  }
304 
307 
308 #ifdef USE_OPENAL
309  if (App::audio_menu_music->getBool())
310  {
311  App::GetSoundScriptManager()->createInstance("tracks/main_menu_tune", -1);
313  }
314 #endif // USE_OPENAL
315 
316  // Hack to properly init DearIMGUI integration - force rendering image
317  // Will be properly fixed under OGRE 2x
318  App::GetGuiManager()->LoadingWindow.SetProgress(100, "Hack", /*renderFrame=*/true);
320 
321  // --------------------------------------------------------------
322  // Main rendering and event handling loop
323  // --------------------------------------------------------------
324 
325  auto start_time = std::chrono::high_resolution_clock::now();
326 
327  while (App::app_state->getEnum<AppState>() != AppState::SHUTDOWN)
328  {
329  OgreBites::WindowEventUtilities::messagePump();
330 
331  // Halt physics (wait for async tasks to finish)
332  if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
333  {
335  }
336 
337  // Game events
338  while (App::GetGameContext()->HasMessages())
339  {
341  bool failed_m = false;
342  switch (m.type)
343  {
344 
345  // -- Application events --
346 
348  {
349  try
350  {
351  if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
352  {
353  App::GetGameContext()->SaveScene("autosave.sav");
354  }
355  App::GetConsole()->saveConfig(); // RoR.cfg
357  #ifdef USE_SOCKETW
358  if (App::mp_state->getEnum<MpState>() == MpState::CONNECTED)
359  {
361  }
362  #endif // USE_SOCKETW
364  App::GetScriptEngine()->setEventsEnabled(false); // Hack to enable fast shutdown without cleanup.
365  }
366  catch (...)
367  {
369  }
370  break;
371  }
372 
374  {
375  try
376  {
380  }
381  catch (...)
382  {
384  }
385  break;
386  }
387 
389  {
390  try
391  {
394  _L("Display mode changed to fullscreen"));
395  }
396  catch (...)
397  {
399  }
400  break;
401  }
402 
404  {
405  try
406  {
409  _L("Display mode changed to windowed"));
410  }
411  catch (...)
412  {
414  }
415  break;
416  }
417 
419  {
420  try
421  {
422  if (!App::GetCacheSystem()->IsModCacheLoaded()) // If not already loaded...
423  {
426  }
427  }
428  catch (...)
429  {
431  }
432  break;
433  }
434 
436  {
437  try
438  {
439  if (App::app_state->getEnum<AppState>() == AppState::MAIN_MENU) // No actors must be spawned; they keep pointers to CacheEntries
440  {
441  RoR::Log("[RoR|ModCache] Cache update requested");
444  }
445  }
446  catch (...)
447  {
449  }
450  break;
451  }
452 
454  {
455  try
456  {
457  if (App::app_state->getEnum<AppState>() == AppState::MAIN_MENU) // No actors must be spawned; they keep pointers to CacheEntries
458  {
459  RoR::Log("[RoR|ModCache] Cache rebuild requested");
462  }
463  }
464  catch (...)
465  {
467  }
468  break;
469  }
470 
472  {
473  LoadScriptRequest* request = static_cast<LoadScriptRequest*>(m.payload);
474  try
475  {
477  ScriptUnitID_t nid = App::GetScriptEngine()->loadScript(request->lsr_filename, request->lsr_category, actor, request->lsr_buffer);
478  // we want to notify any running scripts that we might change something (prevent cheating)
480  ASMANIP_SCRIPT_LOADED, nid, (int)request->lsr_category, 0, request->lsr_filename);
481  }
482  catch (...)
483  {
485  }
486  delete request;
487  break;
488  }
489 
491  {
492  ScriptUnitID_t* id = static_cast<ScriptUnitID_t*>(m.payload);
493  try
494  {
496  // we want to notify any running scripts that we might change something (prevent cheating)
498  ASMANIP_SCRIPT_UNLOADING, *id, (int)unit.scriptCategory, 0, unit.scriptName);
500  }
501  catch (...)
502  {
504  }
505  delete id;
506  break;
507  }
508 
510  {
511  ScriptEventArgs* args = static_cast<ScriptEventArgs*>(m.payload);
512  try
513  {
515  args->arg1, args->arg2ex, args->arg3ex, args->arg4ex, args->arg5ex, args->arg6ex, args->arg7ex);
516  delete args;
517  }
518  catch (...)
519  {
521  }
522  break;
523  }
524 
526  {
527  try
528  {
529  LOG(fmt::format("[RoR] !! Reinitializing input engine !!"));
532  LOG(fmt::format("[RoR] DONE Reinitializing input engine."));
533  App::GetGuiManager()->LoadingWindow.SetVisible(false); // Shown by `GUI::GameSettings` when changing 'grab mode'
534  }
535  catch (...)
536  {
538  }
539  break;
540  }
541 
542  // -- Network events --
543 
545  {
546 #if USE_SOCKETW
547  try
548  {
550  }
551  catch (...)
552  {
554  }
555 #endif
556  break;
557  }
558 
560  {
561 #if USE_SOCKETW
562  try
563  {
564  if (App::mp_state->getEnum<MpState>() == MpState::CONNECTED)
565  {
567  if (App::app_state->getEnum<AppState>() == AppState::MAIN_MENU)
568  {
569  App::GetGuiManager()->MainSelector.Close(); // We may get disconnected while still in map selection
571  }
572  }
573  }
574  catch (...)
575  {
577  }
578 #endif // USE_SOCKETW
579  break;
580  }
581 
582  case MSG_NET_SERVER_KICK:
583  {
584  try
585  {
589  App::GetGuiManager()->ShowMessageBox(_LC("Network", "Network disconnected"), m.description.c_str());
590  }
591  catch (...)
592  {
594  }
595  break;
596  }
597 
598  case MSG_NET_RECV_ERROR:
599  {
600  try
601  {
605  App::GetGuiManager()->ShowMessageBox(_L("Network fatal error: "), m.description.c_str());
606  }
607  catch (...)
608  {
610  }
611  break;
612  }
613 
615  {
616  try
617  {
621  }
622  catch (...)
623  {
625  }
626  break;
627  }
628 
630  {
631  try
632  {
634  }
635  catch (...)
636  {
638  }
639  break;
640  }
641 
643  {
644 #if USE_SOCKETW
645  try
646  {
651  if (!App::GetMumble())
652  {
654  }
655  if (App::GetNetwork()->GetTerrainName() != "any")
656  {
658  }
659  else
660  {
661  // Connected -> go directly to map selector
662  if (App::diag_preset_terrain->getStr().empty())
663  {
665  m.payload = reinterpret_cast<void*>(new LoaderType(LT_Terrain));
667  }
668  else
669  {
671  }
672  }
673  }
674  catch (...)
675  {
677  }
678 #endif // USE_SOCKETW
679  break;
680  }
681 
683  {
684 #if USE_SOCKETW
685  try
686  {
692  _LC("Network", "Multiplayer: connection failed"), m.description.c_str());
693  }
694  catch (...)
695  {
697  }
698 #endif // USE_SOCKETW
699  break;
700  }
701 
703  {
704  GUI::MpServerInfoVec* data = static_cast<GUI::MpServerInfoVec*>(m.payload);
705  try
706  {
708  }
709  catch (...)
710  {
712  }
713  delete data;
714  break;
715  }
716 
718  {
719  CurlFailInfo* failinfo = static_cast<CurlFailInfo*>(m.payload);
720  try
721  {
723  }
724  catch (...)
725  {
727  }
728  delete failinfo;
729  break;
730  }
731 
733  {
735  try
736  {
738  }
739  catch (...)
740  {
742  }
743  delete data;
744  break;
745  }
746 
748  {
750  try
751  {
753  }
754  catch (...)
755  {
757  }
758  delete data;
759  break;
760  }
761 
763  {
764  CurlFailInfo* failinfo = static_cast<CurlFailInfo*>(m.payload);
765  try
766  {
768  }
769  catch (...)
770  {
772  }
773  delete failinfo;
774  break;
775  }
776 
778  {
779  try
780  {
784  }
785  catch (...)
786  {
788  }
789  break;
790  }
791 
793  {
794  try
795  {
799  }
800  catch (...)
801  {
803  }
804  break;
805  }
806 
808  {
809  PeerOptionsRequest* request = static_cast<PeerOptionsRequest*>(m.payload);
810  try
811  {
812  // Record the options for future incoming traffic.
813  App::GetNetwork()->AddPeerOptions(request);
814 
815  // On MUTE_CHAT also purge old messages
817  {
819  }
820 
821  // MUTE existing actors if needed
823  {
824  for (ActorPtr& actor : App::GetGameContext()->GetActorManager()->GetActors())
825  {
826  if (actor->ar_net_source_id == request->por_uid)
827  {
829  }
830  }
831  }
832 
833  // HIDE existing actors if needed
835  {
836  for (ActorPtr& actor : App::GetGameContext()->GetActorManager()->GetActors())
837  {
838  if (actor->ar_net_source_id == request->por_uid)
839  {
841  }
842  }
843  }
844  }
845  catch (...)
846  {
848  }
849  delete request;
850  break;
851  }
852 
854  {
855  PeerOptionsRequest* request = static_cast<PeerOptionsRequest*>(m.payload);
856  try
857  {
858  // Record the options for future incoming traffic.
860 
861  // un-MUTE existing actors if needed
863  {
864  for (ActorPtr& actor : App::GetGameContext()->GetActorManager()->GetActors())
865  {
866  if (actor->ar_net_source_id == request->por_uid)
867  {
869  }
870  }
871  }
872 
873  // un-HIDE existing actors if needed
875  {
876  for (ActorPtr& actor : App::GetGameContext()->GetActorManager()->GetActors())
877  {
878  if (actor->ar_net_source_id == request->por_uid)
879  {
881  }
882  }
883  }
884  }
885  catch (...)
886  {
888  }
889  delete request;
890  break;
891  }
892 
893  // -- Gameplay events --
894 
896  {
897  try
898  {
899  for (ActorPtr& actor: App::GetGameContext()->GetActorManager()->GetActors())
900  {
901  actor->muteAllSounds();
902  }
904  }
905  catch (...)
906  {
908  }
909  break;
910  }
911 
913  {
914  try
915  {
916  for (ActorPtr& actor: App::GetGameContext()->GetActorManager()->GetActors())
917  {
918  if (!actor->ar_muted_by_peeropt)
919  {
920  actor->unmuteAllSounds();
921  }
922  }
924  }
925  catch (...)
926  {
928  }
929  break;
930  }
931 
933  {
934  try
935  {
937  App::GetGuiManager()->LoadingWindow.SetProgress(5, _L("Loading resources"));
939 
940  if (App::GetGameContext()->LoadTerrain(m.description))
941  {
943  // Spawn preselected vehicle; commandline has precedence
944  if (App::cli_preset_vehicle->getStr() != "")
945  App::GetGameContext()->SpawnPreselectedActor(App::cli_preset_vehicle->getStr(), App::cli_preset_veh_config->getStr()); // Needs character for position
946  else if (App::diag_preset_vehicle->getStr() != "")
947  App::GetGameContext()->SpawnPreselectedActor(App::diag_preset_vehicle->getStr(), App::diag_preset_veh_config->getStr()); // Needs character for position
951  if (App::audio_menu_music->getBool())
952  {
954  }
955  if (App::gfx_sky_mode->getEnum<GfxSkyMode>() == GfxSkyMode::SANDSTORM)
956  {
957  App::GetGfxScene()->GetSceneManager()->setAmbientLight(Ogre::ColourValue(0.7f, 0.7f, 0.7f));
958  }
959  else
960  {
961  App::GetGfxScene()->GetSceneManager()->setAmbientLight(Ogre::ColourValue(0.3f, 0.3f, 0.3f));
962  }
972  #ifdef USE_SOCKETW
973  if (App::mp_state->getEnum<MpState>() == MpState::CONNECTED)
974  {
976  fmt::format(_LC("ChatBox", "Press {} to start chatting"),
977  App::GetInputEngine()->getEventCommandTrimmed(EV_COMMON_ENTER_CHATMODE)), "lightbulb.png");
978  }
979  #endif // USE_SOCKETW
980  if (App::io_outgauge_mode->getInt() > 0)
981  {
983  }
984  }
985  else
986  {
987  if (App::mp_state->getEnum<MpState>() == MpState::CONNECTED)
988  {
990  }
991  else
992  {
994  }
996  failed_m = true;
997  }
998  }
999  catch (...)
1000  {
1002  }
1003  break;
1004  }
1005 
1007  {
1008  try
1009  {
1010  if (App::sim_state->getEnum<SimState>() == SimState::EDITOR_MODE)
1011  {
1013  }
1014  App::GetGameContext()->SaveScene("autosave.sav");
1024  App::GetGuiManager()->MenuWallpaper->show();
1032  App::GetOutGauge()->Close();
1033  App::GetSoundScriptManager()->SetListener(/*position:*/Ogre::Vector3::ZERO, /*direction:*/Ogre::Vector3::ZERO, /*up:*/Ogre::Vector3::UNIT_Y, /*velocity:*/Ogre::Vector3::ZERO);
1036  }
1037  catch (...)
1038  {
1040  }
1041  break;
1042  }
1043 
1045  {
1046  try
1047  {
1048  std::string terrn_filename = App::GetGameContext()->ExtractSceneTerrain(m.description);
1049  if (terrn_filename == "")
1050  {
1051  Str<400> msg; msg << _L("Could not read savegame file") << "'" << m.description << "'";
1053  if (App::app_state->getEnum<AppState>() == AppState::MAIN_MENU)
1054  {
1056  }
1057  }
1058  else if (terrn_filename == App::sim_terrain_name->getStr())
1059  {
1061  }
1062  else if (terrn_filename != App::sim_terrain_name->getStr() && App::mp_state->getEnum<MpState>() == MpState::CONNECTED)
1063  {
1064  Str<400> msg; msg << _L("Error while loading scene: Terrain mismatch");
1066  }
1067  else
1068  {
1069  if (App::sim_terrain_name->getStr() != "")
1070  {
1072  }
1073 
1074  RoR::LogFormat("[RoR|Savegame] Loading terrain '%s' ...", terrn_filename.c_str());
1076  // Loading terrain may produce actor-spawn requests; the savegame-request must be posted after them.
1078  }
1079  }
1080  catch (...)
1081  {
1083  }
1084  break;
1085  }
1086 
1088  {
1089  ActorSpawnRequest* rq = static_cast<ActorSpawnRequest*>(m.payload);
1090  try
1091  {
1092  if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
1093  {
1095  }
1096  }
1097  catch (...)
1098  {
1100  }
1101  delete rq;
1102  break;
1103  }
1104 
1106  {
1107  ActorModifyRequest* rq = static_cast<ActorModifyRequest*>(m.payload);
1108  try
1109  {
1110  if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
1111  {
1113  }
1114  }
1115  catch (...)
1116  {
1118  }
1119  delete rq;
1120  break;
1121  }
1122 
1124  {
1125  ActorPtr* actor_ptr = static_cast<ActorPtr*>(m.payload);
1126  try
1127  {
1128  ROR_ASSERT(actor_ptr);
1129  if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
1130  {
1131  App::GetGameContext()->DeleteActor(*actor_ptr);
1132  }
1133  }
1134  catch (...)
1135  {
1137  }
1138  delete actor_ptr;
1139  break;
1140  }
1141 
1143  {
1144  ActorPtr* actor_ptr = static_cast<ActorPtr*>(m.payload);
1145  try
1146  {
1147  ROR_ASSERT(actor_ptr); // Even if leaving vehicle, the pointer must be valid.
1148  if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
1149  {
1150  App::GetGameContext()->ChangePlayerActor(*actor_ptr);
1151  }
1152  }
1153  catch (...)
1154  {
1156  }
1157  delete actor_ptr;
1158  break;
1159  }
1160 
1162  {
1163  Ogre::Vector3* pos = static_cast<Ogre::Vector3*>(m.payload);
1164  try
1165  {
1166  if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
1167  {
1168  App::GetGameContext()->TeleportPlayer(pos->x, pos->z);
1169  }
1170  }
1171  catch (...)
1172  {
1174  }
1175  delete pos;
1176  break;
1177  }
1178 
1180  {
1181  ActorPtr* actor_ptr = static_cast<ActorPtr*>(m.payload);
1182  try
1183  {
1184  ROR_ASSERT(actor_ptr);
1185  if ((App::mp_state->getEnum<MpState>() == MpState::CONNECTED) &&
1186  ((*actor_ptr)->ar_state == ActorState::NETWORKED_OK))
1187  {
1188  ActorPtr actor = *actor_ptr;
1189  actor->ar_state = ActorState::NETWORKED_HIDDEN; // Stop net. updates
1190  App::GetGfxScene()->RemoveGfxActor(actor->GetGfxActor()); // Remove visuals (also stops updating SimBuffer)
1191  actor->GetGfxActor()->GetSimDataBuffer().simbuf_actor_state = ActorState::NETWORKED_HIDDEN; // Hack - manually propagate the new state to SimBuffer so Character can reflect it.
1192  actor->GetGfxActor()->SetAllMeshesVisible(false);
1193  actor->GetGfxActor()->SetCastShadows(false);
1194  actor->muteAllSounds(); // Stop sounds
1195  actor->forceAllFlaresOff();
1196  actor->setSmokeEnabled(false);
1197  }
1198  }
1199  catch (...)
1200  {
1202  }
1203  delete actor_ptr;
1204  break;
1205  }
1206 
1208  {
1209  ActorPtr* actor_ptr = static_cast<ActorPtr*>(m.payload);
1210  try
1211  {
1212  ROR_ASSERT(actor_ptr);
1213  if (App::mp_state->getEnum<MpState>() == MpState::CONNECTED &&
1214  ((*actor_ptr)->ar_state == ActorState::NETWORKED_HIDDEN))
1215  {
1216  ActorPtr actor = *actor_ptr;
1217  actor->ar_state = ActorState::NETWORKED_OK; // Resume net. updates
1218  App::GetGfxScene()->RegisterGfxActor(actor->GetGfxActor()); // Restore visuals (also resumes updating SimBuffer)
1219  actor->GetGfxActor()->SetAllMeshesVisible(true);
1220  actor->GetGfxActor()->SetCastShadows(true);
1221  actor->unmuteAllSounds(); // Unmute sounds
1222  actor->setSmokeEnabled(true);
1223  }
1224  }
1225  catch (...)
1226  {
1228  }
1229  delete actor_ptr;
1230  break;
1231  }
1232 
1234  {
1235  ActorPtr* actor_ptr = static_cast<ActorPtr*>(m.payload);
1236  try
1237  {
1238  ROR_ASSERT(actor_ptr);
1239  if ((App::mp_state->getEnum<MpState>() == MpState::CONNECTED) &&
1240  ((*actor_ptr)->ar_state == ActorState::NETWORKED_OK))
1241  {
1242  ActorPtr actor = *actor_ptr;
1243  actor->ar_muted_by_peeropt = true;
1244  actor->muteAllSounds();
1245  }
1246  }
1247  catch (...)
1248  {
1250  }
1251  delete actor_ptr;
1252  break;
1253  }
1254 
1256  {
1257  ActorPtr* actor_ptr = static_cast<ActorPtr*>(m.payload);
1258  try
1259  {
1260  ROR_ASSERT(actor_ptr);
1261  if ((App::mp_state->getEnum<MpState>() == MpState::CONNECTED) &&
1262  ((*actor_ptr)->ar_state == ActorState::NETWORKED_OK))
1263  {
1264  ActorPtr actor = *actor_ptr;
1265  actor->ar_muted_by_peeropt = false;
1266  actor->unmuteAllSounds();
1267  }
1268  }
1269  catch (...)
1270  {
1272  }
1273  delete actor_ptr;
1274  break;
1275  }
1276 
1278  {
1279  ScriptEventArgs* args = static_cast<ScriptEventArgs*>(m.payload);
1280  try
1281  {
1283  {
1285  }
1286  App::GetScriptEngine()->triggerEvent(args->type, args->arg1, args->arg2ex, args->arg3ex, args->arg4ex, args->arg5ex, args->arg6ex, args->arg7ex, args->arg8ex);
1287 
1288  }
1289  catch (...)
1290  {
1292  }
1293  delete args;
1294  break;
1295  }
1296 
1298  {
1299  ScriptCallbackArgs* args = static_cast<ScriptCallbackArgs*>(m.payload);
1300  try
1301  {
1303  }
1304  catch (...)
1305  {
1307  }
1308  delete args;
1309  break;
1310  }
1311 
1313  {
1314  // Estabilishing a physics linkage between 2 actors modifies a global linkage table
1315  // and triggers immediate update of every actor's linkage tables,
1316  // so it has to be done sequentially on main thread.
1317  // ---------------------------------------------------------------------------------
1318  ActorLinkingRequest* request = static_cast<ActorLinkingRequest*>(m.payload);
1319  try
1320  {
1322  if (actor)
1323  {
1324  switch (request->alr_type)
1325  {
1329  actor->hookToggle(request->alr_hook_group, request->alr_type);
1330  break;
1331 
1333  actor->hookToggle(request->alr_hook_group, request->alr_type, request->alr_hook_mousenode);
1335  break;
1336 
1338  actor->tieToggle(request->alr_tie_group);
1339  break;
1340 
1342  actor->ropeToggle(request->alr_rope_group);
1343  break;
1344 
1346  actor->toggleSlideNodeLock();
1347  break;
1348  }
1349  }
1350  }
1351  catch (...)
1352  {
1354  }
1355  delete request;
1356  break;
1357  }
1358 
1360  {
1361  FreeForceRequest* rq = static_cast<FreeForceRequest*>(m.payload);
1362  try
1363  {
1365  }
1366  catch (...)
1367  {
1369  }
1370  delete rq;
1371  break;
1372  }
1373 
1375  {
1376  FreeForceRequest* rq = static_cast<FreeForceRequest*>(m.payload);
1377  try
1378  {
1380  }
1381  catch (...)
1382  {
1384  }
1385  delete rq;
1386  break;
1387  }
1388 
1390  {
1391  FreeForceID_t* rq = static_cast<FreeForceID_t*>(m.payload);
1392  try
1393  {
1396  }
1397  catch (...)
1398  {
1400  }
1401  delete rq;
1402  break;
1403  }
1404 
1405  // -- GUI events ---
1406 
1408  {
1409  try
1410  {
1412  }
1413  catch (...)
1414  {
1416  }
1417  break;
1418  }
1419 
1421  {
1422  try
1423  {
1425  }
1426  catch (...)
1427  {
1429  }
1430  break;
1431  }
1432 
1434  {
1435  LoaderType* type = static_cast<LoaderType*>(m.payload);
1436  try
1437  {
1439  }
1440  catch (...)
1441  {
1443  }
1444  delete type;
1445  break;
1446  }
1447 
1449  {
1450  try
1451  {
1453  }
1454  catch (...)
1455  {
1457  }
1458  break;
1459  }
1460 
1462  {
1463  try
1464  {
1466  }
1467  catch (...)
1468  {
1470  }
1471  break;
1472  }
1473 
1475  {
1476  GUI::MessageBoxConfig* conf = static_cast<GUI::MessageBoxConfig*>(m.payload);
1477  try
1478  {
1480  }
1481  catch (...)
1482  {
1484  }
1485  delete conf;
1486  break;
1487  }
1488 
1490  {
1491  int* percentage = static_cast<int*>(m.payload);
1492  try
1493  {
1495  App::GetGuiManager()->LoadingWindow.SetProgress(*percentage, m.description, false);
1496  }
1497  catch (...)
1498  {
1500  }
1501  delete percentage;
1502  break;
1503  }
1504 
1506  {
1507  try
1508  {
1512  }
1513  catch (...)
1514  {
1516  }
1517  break;
1518  }
1519 
1521  {
1522  try
1523  {
1525  }
1526  catch (...)
1527  {
1529  }
1530  break;
1531  }
1532 
1534  {
1535  try
1536  {
1538  if (m.description != "")
1539  {
1541  }
1542  }
1543  catch (...)
1544  {
1546  }
1547  break;
1548  }
1549 
1550  // -- Editing events --
1551 
1553  {
1554  try
1555  {
1556  ground_model_t* modified_gm = static_cast<ground_model_t*>(m.payload);
1558  *live_gm = *modified_gm; // Copy over
1559  //DO NOT `delete` the payload - it's a weak pointer, the data are owned by `RoR::Collisions`; See `enum MsgType` in file 'Application.h'.
1560  }
1561  catch (...)
1562  {
1564  }
1565  break;
1566  }
1567 
1569  {
1570  try
1571  {
1572  if (App::sim_state->getEnum<SimState>() != SimState::EDITOR_MODE)
1573  {
1576  _L("Entered terrain editing mode"));
1577 
1579  fmt::format(_L("Press {} or middle mouse click to select an object"),
1580  App::GetInputEngine()->getEventCommandTrimmed(EV_COMMON_ENTER_OR_EXIT_TRUCK)), "lightbulb.png");
1581 
1582  }
1583  }
1584  catch (...)
1585  {
1587  }
1588  break;
1589  }
1590 
1592  {
1593  try
1594  {
1595  if (App::sim_state->getEnum<SimState>() == SimState::EDITOR_MODE)
1596  {
1601  _L("Left terrain editing mode"));
1602  }
1603  }
1604  catch (...)
1605  {
1607  }
1608  break;
1609  }
1610 
1612  {
1613  CacheEntryPtr* entry_ptr = static_cast<CacheEntryPtr*>(m.payload);
1614  try
1615  {
1616  App::GetCacheSystem()->LoadResource(*entry_ptr);
1618  /*ints*/ MODCACHEACTIVITY_BUNDLE_LOADED, (*entry_ptr)->number, 0, 0,
1619  /*strings*/ (*entry_ptr)->resource_group);
1620  }
1621  catch (...)
1622  {
1624  }
1625  delete entry_ptr;
1626  break;
1627  }
1628 
1630  {
1631  // To reload the bundle, it's resource group must be destroyed and re-created. All actors using it must be deleted.
1632  CacheEntryPtr* entry_ptr = static_cast<CacheEntryPtr*>(m.payload);
1633  try
1634  {
1635  bool all_clear = true;
1637  {
1638  if (actor->GetGfxActor()->GetResourceGroup() == (*entry_ptr)->resource_group)
1639  {
1640  App::GetGameContext()->PushMessage(Message(MSG_SIM_DELETE_ACTOR_REQUESTED, static_cast<void*>(new ActorPtr(actor))));
1641  all_clear = false;
1642  }
1643  }
1644 
1645  if (all_clear)
1646  {
1647  // Nobody uses the RG anymore -> destroy and re-create it.
1648  App::GetCacheSystem()->ReLoadResource(*entry_ptr);
1649 
1651  /*ints*/ MODCACHEACTIVITY_BUNDLE_RELOADED, (*entry_ptr)->number, 0, 0,
1652  /*strings*/ (*entry_ptr)->resource_group);
1653 
1654  delete entry_ptr;
1655  }
1656  else
1657  {
1658  // Re-post the same message again so that it's message chain is executed later.
1660  failed_m = true;
1661  }
1662  }
1663  catch (...)
1664  {
1666  }
1667  break;
1668  }
1669 
1671  {
1672  // Unloading bundle means the resource group will be destroyed. All actors using it must be deleted.
1673  CacheEntryPtr* entry_ptr = static_cast<CacheEntryPtr*>(m.payload);
1674  try
1675  {
1676  bool all_clear = true;
1678  {
1679  if (actor->GetGfxActor()->GetResourceGroup() == (*entry_ptr)->resource_group)
1680  {
1681  App::GetGameContext()->PushMessage(Message(MSG_SIM_DELETE_ACTOR_REQUESTED, static_cast<void*>(new ActorPtr(actor))));
1682  all_clear = false;
1683  }
1684  }
1685 
1686  if (all_clear)
1687  {
1688  // Nobody uses the RG anymore -> destroy it.
1689  App::GetCacheSystem()->UnLoadResource(*entry_ptr);
1690 
1692  /*ints*/ MODCACHEACTIVITY_BUNDLE_UNLOADED, (*entry_ptr)->number, 0, 0);
1693 
1694  delete entry_ptr;
1695  }
1696  else
1697  {
1698  // Re-post the same message again so that it's message chain is executed later.
1700  failed_m = true;
1701  }
1702  }
1703  catch (...)
1704  {
1706  }
1707 
1708  break;
1709  }
1710 
1712  {
1713  CreateProjectRequest* request = static_cast<CreateProjectRequest*>(m.payload);
1714  try
1715  {
1716  if (!App::GetCacheSystem()->CreateProject(request))
1717  {
1718  failed_m = true;
1719  }
1720  }
1721  catch (...)
1722  {
1724  }
1725  delete request;
1726  break;
1727  }
1728 
1730  {
1731  ModifyProjectRequest* request = static_cast<ModifyProjectRequest*>(m.payload);
1732  try
1733  {
1734  if (App::mp_state->getEnum<MpState>() != MpState::CONNECTED) // Do not allow tuning in multiplayer
1735  {
1736  App::GetCacheSystem()->ModifyProject(request);
1737  }
1738  }
1739  catch (...)
1740  {
1742  }
1743  delete request;
1744  break;
1745  }
1746 
1748  {
1749  CacheEntryPtr* entry_ptr = static_cast<CacheEntryPtr*>(m.payload);
1750  try
1751  {
1752  App::GetCacheSystem()->DeleteProject(*entry_ptr);
1753  }
1754  catch (...)
1755  {
1757  }
1758  delete entry_ptr;
1759  break;
1760  }
1761 
1763  {
1764  FreeBeamGfxRequest* request = static_cast<FreeBeamGfxRequest*>(m.payload);
1765  try
1766  {
1767  App::GetGfxScene()->AddFreeBeamGfx(request);
1768  }
1769  catch (...)
1770  {
1772  }
1773  delete request;
1774  break;
1775  }
1776 
1778  {
1779  FreeBeamGfxRequest* request = static_cast<FreeBeamGfxRequest*>(m.payload);
1780  try
1781  {
1782  App::GetGfxScene()->ModifyFreeBeamGfx(request);
1783  }
1784  catch (...)
1785  {
1787  }
1788  delete request;
1789  break;
1790  }
1791 
1793  {
1794  FreeBeamGfxID_t* request = static_cast<FreeBeamGfxID_t*>(m.payload);
1795  try
1796  {
1797  App::GetGfxScene()->RemoveFreeBeamGfx(*request);
1798  }
1799  catch (...)
1800  {
1802  }
1803  delete request;
1804  break;
1805  }
1806 
1807  default:;
1808  }
1809 
1810  // Process chained messages
1811  if (!failed_m)
1812  {
1813  for (Message& chained_msg: m.chain)
1814  {
1815  App::GetGameContext()->PushMessage(chained_msg);
1816  }
1817  }
1818 
1819  } // Game events block
1820 
1821  // Check FPS limit
1822  if (App::gfx_fps_limit->getInt() > 0)
1823  {
1824  const float min_frame_time = 1.0f / Ogre::Math::Clamp(App::gfx_fps_limit->getInt(), 5, 240);
1825  float dt = std::chrono::duration<float>(std::chrono::high_resolution_clock::now() - start_time).count();
1826  while (dt < min_frame_time)
1827  {
1828  dt = std::chrono::duration<float>(std::chrono::high_resolution_clock::now() - start_time).count();
1829  }
1830  } // Check FPS limit block
1831 
1832  // Calculate delta time
1833  const auto now = std::chrono::high_resolution_clock::now();
1834  const float dt = std::chrono::duration<float>(now - start_time).count();
1835  start_time = now;
1836 
1837 #ifdef USE_SOCKETW
1838  // Process incoming network traffic
1839  if (App::mp_state->getEnum<MpState>() == MpState::CONNECTED)
1840  {
1841  std::vector<RoR::NetRecvPacket> packets = App::GetNetwork()->GetIncomingStreamData();
1842  if (!packets.empty())
1843  {
1845  if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
1846  {
1848  App::GetGameContext()->GetCharacterFactory()->handleStreamData(packets); // Update characters last (or else beam coupling might fail)
1849  }
1850  }
1851  }
1852 #endif // USE_SOCKETW
1853 
1854  // Process input events
1855  if (dt != 0.f)
1856  {
1859 
1860  if (!App::GetGuiManager()->GameControls.IsInteractiveKeyBindingActive())
1861  {
1862  if (!App::GetGuiManager()->MainSelector.IsVisible() && !App::GetGuiManager()->MultiplayerSelector.IsVisible() &&
1865  {
1867  }
1870 
1871  if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
1872  {
1873  if (App::sim_state->getEnum<SimState>() == SimState::EDITOR_MODE)
1874  {
1877  }
1878  else
1879  {
1880  App::GetGameContext()->GetCharacterFactory()->Update(dt); // Character MUST be updated before CameraManager, otherwise camera position is always 1 frame behind the character position, causing stuttering.
1881  }
1886  if (App::sim_state->getEnum<SimState>() == SimState::RUNNING)
1887  {
1888  if (App::GetCameraManager()->GetCurrentBehavior() != CameraManager::CAMERA_BEHAVIOR_FREE)
1889  {
1892  if (App::GetGameContext()->GetPlayerActor() &&
1893  App::GetGameContext()->GetPlayerActor()->ar_state != ActorState::NETWORKED_OK) // we are in a vehicle
1894  {
1896  if (App::GetGameContext()->GetPlayerActor()->ar_state != ActorState::LOCAL_REPLAY)
1897  {
1898  if (App::GetGameContext()->GetPlayerActor()->ar_driveable == TRUCK)
1899  {
1901  }
1902  if (App::GetGameContext()->GetPlayerActor()->ar_driveable == AIRPLANE)
1903  {
1905  }
1906  if (App::GetGameContext()->GetPlayerActor()->ar_driveable == BOAT)
1907  {
1909  }
1910  }
1911  }
1912  }
1913  else // free cam mode
1914  {
1916  }
1917  }
1918  } // app state SIMULATION
1919  } // interactive key binding mode
1920  } // dt != 0
1921 
1922  // Update OutGauge device
1923  if (App::io_outgauge_mode->getInt() > 0)
1924  {
1925  App::GetOutGauge()->Update(dt, App::GetGameContext()->GetPlayerActor());
1926  }
1927 
1928  // Early GUI updates which require halted physics
1930  if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
1931  {
1933  for (ActorPtr& actor : App::GetGameContext()->GetActorManager()->GetActors())
1934  {
1935  actor->GetGfxActor()->UpdateDebugView();
1936  }
1937  if (App::GetGameContext()->GetPlayerActor())
1938  {
1940  if (App::GetGuiManager()->FrictionSettings.IsVisible())
1941  {
1942  App::GetGuiManager()->FrictionSettings.setActiveCol(App::GetGameContext()->GetPlayerActor()->ar_last_fuzzy_ground_model);
1943  }
1944  }
1945  }
1946 
1947 #ifdef USE_MUMBLE
1948  if (App::GetMumble())
1949  {
1950  App::GetMumble()->Update(); // 3d voice over network
1951  }
1952 #endif // USE_MUMBLE
1953 
1954 #ifdef USE_OPENAL
1955  App::GetSoundScriptManager()->update(dt); // update 3d audio listener position
1956 #endif // USE_OPENAL
1957 
1958 #ifdef USE_ANGELSCRIPT
1960 #endif // USE_ANGELSCRIPT
1961 
1962  if (App::io_ffb_enabled->getBool() &&
1963  App::sim_state->getEnum<SimState>() == SimState::RUNNING)
1964  {
1966  }
1967 
1968  if (App::sim_state->getEnum<SimState>() == SimState::RUNNING)
1969  {
1971  }
1972 
1973  // Create snapshot of simulation state for Gfx/GUI updates
1974  if (App::sim_state->getEnum<SimState>() == SimState::RUNNING || // Obviously
1975  App::sim_state->getEnum<SimState>() == SimState::EDITOR_MODE) // Needed for character movement
1976  {
1978  }
1979 
1980  // Calculate elapsed simulation time (taking simulation speed and pause into account)
1981  float dt_sim = 0.f;
1982  if (App::sim_state->getEnum<SimState>() == SimState::RUNNING && !App::GetGameContext()->GetActorManager()->IsSimulationPaused())
1983  {
1985  }
1986 
1987  // Advance simulation
1988  if (App::sim_state->getEnum<SimState>() == SimState::RUNNING)
1989  {
1990  App::GetGameContext()->UpdateActors(); // *** Start new physics tasks. No reading from Actor N/B beyond this point.
1991  }
1992 
1993  // Scene and GUI updates
1994  if (App::app_state->getEnum<AppState>() == AppState::MAIN_MENU)
1995  {
1997  }
1998  else if (App::app_state->getEnum<AppState>() == AppState::SIMULATION)
1999  {
2000  App::GetGfxScene()->UpdateScene(dt_sim); // Draws GUI as well
2001  }
2002 
2003  // Render!
2004  Ogre::RenderWindow* render_window = RoR::App::GetAppContext()->GetRenderWindow();
2005  if (render_window->isClosed())
2006  {
2008  }
2009  else
2010  {
2011  App::GetAppContext()->GetOgreRoot()->renderOneFrame();
2012  if (!render_window->isActive() && render_window->isVisible())
2013  {
2014  render_window->update(); // update even when in background !
2015  }
2016  } // Render block
2017 
2019 
2021 
2022  } // End of main rendering/input loop
2023 
2024 #ifndef _DEBUG
2025  }
2026  catch (Ogre::Exception& e)
2027  {
2028  LOG(e.getFullDescription());
2029  ErrorUtils::ShowError(_L("An exception has occured!"), e.getFullDescription());
2030  }
2031  catch (std::runtime_error& e)
2032  {
2033  LOG(e.what());
2034  ErrorUtils::ShowError(_L("An exception (std::runtime_error) has occured!"), e.what());
2035  }
2036 #endif
2037 
2038  return 0;
2039 }
2040 
2041 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
2042 INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
2043 {
2044  return main(__argc, __argv);
2045 }
2046 #endif
2047 
2048 #ifdef __cplusplus
2049 }
2050 #endif
RoR::App::sys_user_dir
CVar * sys_user_dir
Definition: Application.cpp:163
RoR::MSG_EDI_MODIFY_PROJECT_REQUESTED
@ MSG_EDI_MODIFY_PROJECT_REQUESTED
Payload = RoR::UpdateProjectRequest* (owner)
Definition: Application.h:156
RoR::ScriptUnit
Represents a loaded script and all associated resources/handles.
Definition: ScriptEngine.h:70
ROR_ASSERT
#define ROR_ASSERT(_EXPR)
Definition: Application.h:40
GameContext.h
Game state manager and message-queue provider.
RoR::GUIManager::VehicleInfoTPanel
GUI::VehicleInfoTPanel VehicleInfoTPanel
Definition: GUIManager.h:120
RoR::CameraManager::UpdateInputEvents
void UpdateInputEvents(float dt)
Definition: CameraManager.cpp:242
RoR::ScriptEngine::unloadScript
void unloadScript(ScriptUnitID_t unique_id)
Unloads a script.
Definition: ScriptEngine.cpp:1066
RoR::App::CreateMumble
void CreateMumble()
Definition: Application.cpp:325
RoR::ActorLinkingRequest::alr_hook_group
int alr_hook_group
Definition: SimData.h:913
RoR::MSG_SIM_LOAD_TERRN_REQUESTED
@ MSG_SIM_LOAD_TERRN_REQUESTED
Definition: Application.h:118
RoR::ScriptEngine::setEventsEnabled
void setEventsEnabled(bool val)
Definition: ScriptEngine.h:215
RoR::GfxSkyMode::SANDSTORM
@ SANDSTORM
Sandstorm (fastest)
RoR::GfxScene::OnFreeForceRemoved
void OnFreeForceRemoved(FreeForceID_t id)
Definition: GfxScene.cpp:548
RoR::ASMANIP_SCRIPT_UNLOADING
@ ASMANIP_SCRIPT_UNLOADING
Triggered before unloading the script to let it clean up (important for missions)....
Definition: ScriptEvents.h:76
GUI_MultiplayerClientList.h
RoR::App::CreateScriptEngine
void CreateScriptEngine()
Definition: Application.cpp:359
RoR::App::GetNetwork
Network * GetNetwork()
Definition: Application.cpp:301
RoR::MSG_SIM_REMOVE_FREEFORCE_REQUESTED
@ MSG_SIM_REMOVE_FREEFORCE_REQUESTED
Payload = RoR::FreeForceID_t* (owner)
Definition: Application.h:135
RoR::App::cli_force_cache_update
CVar * cli_force_cache_update
Definition: Application.cpp:184
RoR::LoadScriptRequest::lsr_filename
std::string lsr_filename
Load from resource ('.as' file or '.gadget' file); If buffer is supplied, use this as display name on...
Definition: ScriptEngine.h:94
RoR::App::GetContentManager
ContentManager * GetContentManager()
Definition: Application.cpp:284
RoR::App::GetSoundScriptManager
SoundScriptManager * GetSoundScriptManager()
Definition: Application.cpp:294
RoR::ContentManager::InitContentManager
void InitContentManager()
Definition: ContentManager.cpp:148
RoR::CacheSystem::UnLoadResource
void UnLoadResource(CacheEntryPtr &t)
Unloads associated bundle, destroying all spawned actors.
Definition: CacheSystem.cpp:1647
RoR::ActorManager::GetSimulationSpeed
float GetSimulationSpeed() const
Definition: ActorManager.h:93
RoR::GUI::TopMenubar::ai_presets_extern
rapidjson::Document ai_presets_extern
Externally provided presets (GitHub repo or local 'savegames/waypoints.json' file).
Definition: GUI_TopMenubar.h:105
RoR::MSG_GUI_SHOW_MESSAGE_BOX_REQUESTED
@ MSG_GUI_SHOW_MESSAGE_BOX_REQUESTED
Payload = MessageBoxConfig* (owner)
Definition: Application.h:142
RoR::GameContext::ExtractSceneTerrain
std::string ExtractSceneTerrain(std::string const &filename)
Returns terrain filename.
Definition: Savegame.cpp:87
RoR::GUI::MultiplayerSelector::SetVisible
void SetVisible(bool v)
Definition: GUI_MultiplayerSelector.cpp:392
RoR::TerrainEditor::UpdateInputEvents
void UpdateInputEvents(float dt)
Definition: TerrainEditor.cpp:43
RoR::App::diag_warning_texture
CVar * diag_warning_texture
Definition: Application.cpp:151
RoR::App::GetLanguageEngine
LanguageEngine * GetLanguageEngine()
Definition: Application.cpp:295
RoR::ScriptEventArgs
Args for eventCallbackEx() queued via MSG_SIM_SCRIPT_EVENT_TRIGGERED See descriptions at enum RoR::sc...
Definition: ScriptEvents.h:117
RoR::Network::Disconnect
void Disconnect()
Definition: Network.cpp:565
RoR::App::gfx_fov_internal
CVar * gfx_fov_internal
Definition: Application.cpp:252
RoR::CharacterFactory::handleStreamData
void handleStreamData(std::vector< RoR::NetRecvPacket > packet)
Definition: CharacterFactory.cpp:108
RoR::SE_ANGELSCRIPT_MANIPULATIONS
@ SE_ANGELSCRIPT_MANIPULATIONS
triggered when the user tries to dynamically use the scripting capabilities (prevent cheating) args: ...
Definition: ScriptEvents.h:54
RoR::App::CreateCameraManager
void CreateCameraManager()
Definition: Application.cpp:339
RoR::MSG_SIM_MODIFY_ACTOR_REQUESTED
@ MSG_SIM_MODIFY_ACTOR_REQUESTED
Payload = RoR::ActorModifyRequest* (owner)
Definition: Application.h:122
RoR::App::diag_preset_vehicle
CVar * diag_preset_vehicle
Definition: Application.cpp:143
RoR::GfxScene::GetEnvMap
GfxEnvmap & GetEnvMap()
Definition: GfxScene.h:81
RoR::SceneMouse::DiscardVisuals
void DiscardVisuals()
Definition: SceneMouse.cpp:75
RoR::OverlayWrapper::update
void update(float dt)
Definition: OverlayWrapper.cpp:346
OverlayWrapper.h
RoR::GameContext::ModifyActor
void ModifyActor(ActorModifyRequest &rq)
Definition: GameContext.cpp:369
RoR::App::cli_resume_autosave
CVar * cli_resume_autosave
Definition: Application.cpp:185
RoR::MSG_EDI_RELOAD_BUNDLE_REQUESTED
@ MSG_EDI_RELOAD_BUNDLE_REQUESTED
Payload = RoR::CacheEntryPtr* (owner)
Definition: Application.h:153
RoR::Network::StartConnecting
bool StartConnecting()
Launches connecting on background.
Definition: Network.cpp:394
RoR::InputEngine::updateKeyBounces
void updateKeyBounces(float dt)
Definition: InputEngine.cpp:787
RoR::MSG_APP_REINIT_INPUT_REQUESTED
@ MSG_APP_REINIT_INPUT_REQUESTED
Definition: Application.h:95
RoR::TRUCK
@ TRUCK
its a truck (or other land vehicle)
Definition: SimData.h:85
RoR::MpState::CONNECTED
@ CONNECTED
RoR::CacheSystem::DeleteProject
void DeleteProject(CacheEntryPtr &entry)
Definition: CacheSystem.cpp:2256
RoR::GUIManager::FrictionSettings
GUI::FrictionSettings FrictionSettings
Definition: GUIManager.h:127
RoR::MSG_SIM_SCRIPT_CALLBACK_QUEUED
@ MSG_SIM_SCRIPT_CALLBACK_QUEUED
Payload = RoR::ScriptCallbackArgs* (owner)
Definition: Application.h:131
RoR::App::sys_scripts_dir
CVar * sys_scripts_dir
Definition: Application.cpp:172
RoR::EV_COMMON_ENTER_OR_EXIT_TRUCK
@ EV_COMMON_ENTER_OR_EXIT_TRUCK
enter or exit a truck
Definition: InputEngine.h:228
RoR::App::GetCameraManager
CameraManager * GetCameraManager()
Definition: Application.cpp:292
RoR::App::app_skip_main_menu
CVar * app_skip_main_menu
Definition: Application.cpp:82
ErrorUtils::ShowError
static int ShowError(const std::string &title, const std::string &message)
shows a simple error message box
Definition: ErrorUtils.cpp:46
GUI_VehicleInfoTPanel.h
RoR::GUI::MultiplayerSelector::DisplayRefreshFailed
void DisplayRefreshFailed(CurlFailInfo *failinfo)
Definition: GUI_MultiplayerSelector.cpp:406
GUI_MessageBox.h
Generic UI dialog (not modal). Invocable from scripting. Any number of buttons. Configurable to fire ...
RoR::App::GetGuiManager
GUIManager * GetGuiManager()
Definition: Application.cpp:286
RoR::MSG_EDI_CREATE_PROJECT_REQUESTED
@ MSG_EDI_CREATE_PROJECT_REQUESTED
Payload = RoR::CreateProjectRequest* (owner)
Definition: Application.h:155
RoR::FreeBeamGfxID_t
int FreeBeamGfxID_t
Index into GfxScene::m_gfx_freebeams, use RoR::FREEBEAMGFXID_INVALID as empty value.
Definition: ForwardDeclarations.h:93
RoR::GUI::MultiplayerSelector::UpdateServerlist
void UpdateServerlist(MpServerInfoVec *data)
Definition: GUI_MultiplayerSelector.cpp:418
RoR::DiscordRpc::UpdatePresence
void UpdatePresence()
Definition: DiscordRpc.cpp:60
RoR::GUIManager::ApplyGuiCaptureKeyboard
void ApplyGuiCaptureKeyboard()
Call after rendered frame to apply queued value.
Definition: GUIManager.cpp:122
RoR::GfxScene::BufferSimulationData
void BufferSimulationData()
Run this when simulation is halted.
Definition: GfxScene.cpp:294
RoR::ActorLinkingRequest
Estabilishing a physics linkage between 2 actors modifies a global linkage table and triggers immedia...
Definition: SimData.h:908
RoR::GUI::GameSettings::IsVisible
bool IsVisible() const
Definition: GUI_GameSettings.h:33
GUI_FrictionSettings.h
RoR::GUI::LoadingWindow::SetProgressNetConnect
void SetProgressNetConnect(const std::string &net_status)
Definition: GUI_LoadingWindow.cpp:73
RoR::MSG_EDI_UNLOAD_BUNDLE_REQUESTED
@ MSG_EDI_UNLOAD_BUNDLE_REQUESTED
Payload = RoR::CacheEntryPtr* (owner)
Definition: Application.h:154
RoR::HandleMsgQueueException
void HandleMsgQueueException(MsgType from)
Definition: Application.cpp:427
RoR::GfxScene::OnFreeForceBroken
void OnFreeForceBroken(FreeForceID_t id)
Definition: GfxScene.cpp:569
RoR::Actor::unmuteAllSounds
void unmuteAllSounds()
Definition: Actor.cpp:3853
RoR::AppState::MAIN_MENU
@ MAIN_MENU
RoR::ContentManager::ResourcePack::WALLPAPERS
static const ResourcePack WALLPAPERS
Definition: ContentManager.h:48
RoR::MSG_SIM_UNLOAD_TERRN_REQUESTED
@ MSG_SIM_UNLOAD_TERRN_REQUESTED
Definition: Application.h:120
ContentManager.h
RoR::GfxScene::RemoveGfxActor
void RemoveGfxActor(RoR::GfxActor *gfx_actor)
Definition: GfxScene.cpp:329
RoR::AppContext::GetRenderWindow
Ogre::RenderWindow * GetRenderWindow()
Definition: AppContext.h:67
RoR::App::cli_preset_vehicle
CVar * cli_preset_vehicle
Definition: Application.cpp:178
RoR::App::GetAppContext
AppContext * GetAppContext()
Definition: Application.cpp:283
RoR::Console::cVarSetupBuiltins
void cVarSetupBuiltins()
Create builtin vars and set defaults.
Definition: CVar.cpp:29
RoR::ActorState::LOCAL_REPLAY
@ LOCAL_REPLAY
RoR::MSG_GUI_CLOSE_SELECTOR_REQUESTED
@ MSG_GUI_CLOSE_SELECTOR_REQUESTED
Definition: Application.h:140
RoR::TokenType::INT
@ INT
format
Truck file format(technical spec)
RoR::ActorManager::AddFreeForce
void AddFreeForce(FreeForceRequest *rq)
Definition: ActorManager.cpp:1767
RoR::MSG_SIM_UNPAUSE_REQUESTED
@ MSG_SIM_UNPAUSE_REQUESTED
Definition: Application.h:117
RoR::DiscordRpc::Shutdown
void Shutdown()
Definition: DiscordRpc.cpp:90
RoR::ActorLinkingRequestType::HOOK_MOUSE_TOGGLE
@ HOOK_MOUSE_TOGGLE
GUIUtils.h
RoR::Network::GetIncomingStreamData
std::vector< NetRecvPacket > GetIncomingStreamData()
Definition: Network.cpp:675
RoR::AppState::PRINT_VERSION_EXIT
@ PRINT_VERSION_EXIT
RoR::MSG_NET_CONNECT_STARTED
@ MSG_NET_CONNECT_STARTED
Definition: Application.h:98
RoR::PeerOptionsRequest::por_uid
int por_uid
RoRnet unique user ID.
Definition: Network.h:106
RoR::MSG_GUI_DOWNLOAD_PROGRESS
@ MSG_GUI_DOWNLOAD_PROGRESS
Definition: Application.h:144
RoR::App::app_force_cache_update
CVar * app_force_cache_update
Definition: Application.cpp:89
RoR::CameraManager::CAMERA_BEHAVIOR_FREE
@ CAMERA_BEHAVIOR_FREE
Definition: CameraManager.h:52
RoR::GameContext::UpdateCommonInputEvents
void UpdateCommonInputEvents(float dt)
Definition: GameContext.cpp:1320
RoR::GUI::VehicleInfoTPanel::UpdateStats
void UpdateStats(float dt, ActorPtr actor)
Caution: touches live data, must be synced with sim. thread.
Definition: GUI_VehicleInfoTPanel.cpp:633
RoR::Actor::forceAllFlaresOff
void forceAllFlaresOff()
Definition: Actor.cpp:3058
RoR::ActorLinkingRequest::alr_type
ActorLinkingRequestType alr_type
Definition: SimData.h:911
RoR::App::mp_join_on_startup
CVar * mp_join_on_startup
Definition: Application.cpp:116
RoR::TRIGGER_EVENT_ASYNC
void TRIGGER_EVENT_ASYNC(scriptEvents type, int arg1, int arg2ex=0, int arg3ex=0, int arg4ex=0, std::string arg5ex="", std::string arg6ex="", std::string arg7ex="", std::string arg8ex="")
Asynchronously (via MSG_SIM_SCRIPT_EVENT_TRIGGERED) invoke script function eventCallbackEx(),...
Definition: ScriptEngine.h:51
RoR::ScriptEventArgs::arg4ex
int arg4ex
Definition: ScriptEvents.h:125
RoR::GUI::GameControls::IsVisible
bool IsVisible() const
Definition: GUI_GameControls.h:34
RoR::SimState::EDITOR_MODE
@ EDITOR_MODE
Hacky, but whatever... added by Ulteq, 2016.
RoR::SoundScriptManager::getSoundManager
SoundManager * getSoundManager()
Definition: SoundScriptManager.h:336
RoR::Terrain::GetTerrainEditor
TerrainEditor * GetTerrainEditor()
Definition: Terrain.h:84
RoR::App::GetOverlayWrapper
OverlayWrapper * GetOverlayWrapper()
Definition: Application.cpp:285
RoR::SceneMouse::UpdateSimulation
void UpdateSimulation()
Definition: SceneMouse.cpp:199
CameraManager.h
RoR::ActorLinkingRequestType::HOOK_TOGGLE
@ HOOK_TOGGLE
RoR::LogFormat
void LogFormat(const char *format,...)
Improved logging utility. Uses fixed 2Kb buffer.
Definition: Application.cpp:441
RoR::App::cli_server_host
CVar * cli_server_host
Definition: Application.cpp:176
RoR::SE_TRUCK_MOUSE_GRAB
@ SE_TRUCK_MOUSE_GRAB
triggered when the user uses the mouse to interact with the actor, the argument refers to the actor I...
Definition: ScriptEvents.h:52
RoR::GfxScene::ClearScene
void ClearScene()
Definition: GfxScene.cpp:61
AppContext.h
System integration layer; inspired by OgreBites::ApplicationContext.
RoR::MSG_NET_REFRESH_SERVERLIST_FAILURE
@ MSG_NET_REFRESH_SERVERLIST_FAILURE
Payload = RoR::CurlFailInfo* (owner)
Definition: Application.h:107
Console.h
RoR::App::gfx_fov_external_default
CVar * gfx_fov_external_default
Definition: Application.cpp:251
RoR::Console::putMessage
void putMessage(MessageArea area, MessageType type, std::string const &msg, std::string icon="")
Definition: Console.cpp:103
RoR::GUIManager::GameControls
GUI::GameControls GameControls
Definition: GUIManager.h:129
RoR::ActorLinkingRequestType::HOOK_UNLOCK
@ HOOK_UNLOCK
RoR::SE_GENERIC_MODCACHE_ACTIVITY
@ SE_GENERIC_MODCACHE_ACTIVITY
Triggered when status of modcache changes, args: #1 type, #2 entry number, for other args see RoR::mo...
Definition: ScriptEvents.h:62
RoR::GameContext::TeleportPlayer
void TeleportPlayer(float x, float z)
Definition: GameContext.cpp:905
RoR::GameContext::UpdateActors
void UpdateActors()
Definition: GameContext.cpp:600
RoR::GUIManager::MpClientList
GUI::MpClientList MpClientList
Definition: GUIManager.h:126
RoR::MSG_NET_RECV_ERROR
@ MSG_NET_RECV_ERROR
Definition: Application.h:105
RoR::LoadScriptRequest::lsr_buffer
std::string lsr_buffer
Load from memory buffer.
Definition: ScriptEngine.h:95
GUI_DirectionArrow.h
Race direction arrow and text info (using OGRE Overlay)
RoR::ActorManager::GetActors
ActorPtrVec & GetActors()
Definition: ActorManager.h:121
RoR::CacheSystem::ModifyProject
void ModifyProject(ModifyProjectRequest *request)
Definition: CacheSystem.cpp:2015
RoR::App::io_ffb_enabled
CVar * io_ffb_enabled
Definition: Application.cpp:192
RoR::GUIManager::ChatBox
GUI::GameChatBox ChatBox
Definition: GUIManager.h:125
RoR::FreeBeamGfxRequest
Used by MSG_EDI_[ADD/MODIFY]_FREEBEAMGFX_REQUESTED; tailored for use with AngelScript thru GameScript...
Definition: GfxData.h:284
RoR::SoundScriptManager::SetListener
void SetListener(Ogre::Vector3 position, Ogre::Vector3 direction, Ogre::Vector3 up, Ogre::Vector3 velocity)
Definition: SoundScriptManager.cpp:328
RoR::MSG_APP_LOAD_SCRIPT_REQUESTED
@ MSG_APP_LOAD_SCRIPT_REQUESTED
Payload = RoR::LoadScriptRequest* (owner)
Definition: Application.h:92
RoR::Actor::GetGfxActor
GfxActor * GetGfxActor()
Definition: Actor.h:281
RoR::GUI::TopMenubar::ai_waypoints
std::vector< ai_events > ai_waypoints
Definition: GUI_TopMenubar.h:68
RoR::GUIManager::GameSettings
GUI::GameSettings GameSettings
Definition: GUIManager.h:119
RoR::ActorManager::SyncWithSimThread
void SyncWithSimThread()
Definition: ActorManager.cpp:1231
RoR::GUIManager::DrawMainMenuGui
void DrawMainMenuGui()
Definition: GUIManager.cpp:414
RoR::SS_TRIG_MAIN_MENU
@ SS_TRIG_MAIN_MENU
Definition: SoundScriptManager.h:119
RoR::ActorLinkingRequestType::ROPE_TOGGLE
@ ROPE_TOGGLE
RoR::GUI::RepositorySelector::UpdateFiles
void UpdateFiles(ResourcesCollection *data)
Definition: GUI_RepositorySelector.cpp:1187
RoR::App::sim_state
CVar * sim_state
Definition: Application.cpp:96
Utils.h
RoR::CurlFailInfo
Definition: Network.h:46
RoR::GUI::MainSelector::Show
void Show(LoaderType type, std::string const &filter_guid="", CacheEntryPtr advertised_entry=nullptr)
Definition: GUI_MainSelector.cpp:66
RoR::ScriptEngine::framestep
void framestep(Ogre::Real dt)
Calls the script's framestep function to be able to use timed things inside the script.
Definition: ScriptEngine.cpp:403
Language.h
RoR::App::sys_savegames_dir
CVar * sys_savegames_dir
Definition: Application.cpp:170
RoR::MSG_NET_CONNECT_REQUESTED
@ MSG_NET_CONNECT_REQUESTED
Definition: Application.h:97
RefCountingObjectPtr< Actor >
RoR::GUIManager::DirectionArrow
GUI::DirectionArrow DirectionArrow
Definition: GUIManager.h:136
RoR::MSG_APP_DISPLAY_WINDOWED_REQUESTED
@ MSG_APP_DISPLAY_WINDOWED_REQUESTED
Definition: Application.h:88
RoR::SoundScriptManager::update
void update(float dt)
Definition: SoundScriptManager.cpp:308
RoR::MSG_NET_SERVER_KICK
@ MSG_NET_SERVER_KICK
Definition: Application.h:102
RoR::Console::CONSOLE_SYSTEM_ERROR
@ CONSOLE_SYSTEM_ERROR
Definition: Console.h:52
GUI_MultiplayerSelector.h
GUIManager.h
Actor.h
RoR::SimState::OFF
@ OFF
RoR::GUI::GameChatBox::AssignBuffer
void AssignBuffer(const std::string &buffer)
Definition: GUI_GameChatBox.h:50
RoR::App::GetScriptEngine
ScriptEngine * GetScriptEngine()
Definition: Application.cpp:296
RoR::GUIManager::LoadingWindow
GUI::LoadingWindow LoadingWindow
Definition: GUIManager.h:132
RoR::GfxScene::GetSceneManager
Ogre::SceneManager * GetSceneManager()
Definition: GfxScene.h:83
RoR::Console::CONSOLE_SYSTEM_NOTICE
@ CONSOLE_SYSTEM_NOTICE
Definition: Console.h:51
RoR::GUIManager::RepositorySelector
GUI::RepositorySelector RepositorySelector
Definition: GUIManager.h:130
RoR::ActorSpawnRequest
Definition: SimData.h:817
RoR::GameContext::GetRaceSystem
RaceSystem & GetRaceSystem()
Definition: GameContext.h:169
RoR::Console::purgeNetChatMessagesByUser
void purgeNetChatMessagesByUser(int user_id)
Definition: Console.cpp:58
RoR::MSG_APP_DISPLAY_FULLSCREEN_REQUESTED
@ MSG_APP_DISPLAY_FULLSCREEN_REQUESTED
Definition: Application.h:87
RoR::GfxEnvmap::SetupEnvMap
void SetupEnvMap()
Definition: EnvironmentMap.cpp:43
RoR::GUI::DirectionArrow::LoadOverlay
void LoadOverlay()
Must be called after meshes+overlays were loaded.
Definition: GUI_DirectionArrow.cpp:38
RoR::MSG_GUI_SHOW_CHATBOX_REQUESTED
@ MSG_GUI_SHOW_CHATBOX_REQUESTED
Description = message or server command to pre-fill in the chatbox (deleting whatever was there previ...
Definition: Application.h:147
RoR::AppContext::GetForceFeedback
RoR::ForceFeedback & GetForceFeedback()
Definition: AppContext.h:68
RoR::GameContext::SpawnActor
ActorPtr SpawnActor(ActorSpawnRequest &rq)
Definition: GameContext.cpp:193
RoR::GfxScene::ModifyFreeBeamGfx
void ModifyFreeBeamGfx(FreeBeamGfxRequest *rq)
Definition: GfxScene.cpp:472
RoR::MSG_NET_REFRESH_SERVERLIST_SUCCESS
@ MSG_NET_REFRESH_SERVERLIST_SUCCESS
Payload = GUI::MpServerInfoVec* (owner)
Definition: Application.h:106
RoR::App::mp_state
CVar * mp_state
Definition: Application.cpp:115
RoR::MSG_GUI_DOWNLOAD_FINISHED
@ MSG_GUI_DOWNLOAD_FINISHED
Definition: Application.h:145
RoR::GameContext::UpdateGlobalInputEvents
void UpdateGlobalInputEvents()
Definition: GameContext.cpp:943
RoR::ForceFeedback::Update
void Update()
Reads data from simulation.
Definition: ForceFeedback.cpp:105
RoR::GUIManager::NewImGuiFrame
void NewImGuiFrame(float dt)
Definition: GUIManager.cpp:318
RoR::LoadScriptRequest::lsr_category
ScriptCategory lsr_category
Definition: ScriptEngine.h:96
RoR::MSG_NET_FETCH_AI_PRESETS_FAILURE
@ MSG_NET_FETCH_AI_PRESETS_FAILURE
Description = message.
Definition: Application.h:112
RoR::App::CreateGuiManager
void CreateGuiManager()
Definition: Application.cpp:313
RoR::GUIManager::UpdateMouseCursorVisibility
void UpdateMouseCursorVisibility()
Definition: GUIManager.cpp:310
RoR::SceneMouse::InitializeVisuals
void InitializeVisuals()
Definition: SceneMouse.cpp:50
RoR::App::CreateGfxScene
void CreateGfxScene()
Definition: Application.cpp:345
RoR::GUI::MultiplayerSelector::IsVisible
bool IsVisible() const
Definition: GUI_MultiplayerSelector.h:63
RoR::CharacterFactory::Update
void Update(float dt)
Definition: CharacterFactory.cpp:80
RoR::SE_GENERIC_FREEFORCES_ACTIVITY
@ SE_GENERIC_FREEFORCES_ACTIVITY
Triggered on freeforce add/update/delete or breaking; args: #1 freeForcesActivityType,...
Definition: ScriptEvents.h:64
RoR::GameContext::ChainMessage
void ChainMessage(Message m)
Add to last pushed message's chain.
Definition: GameContext.cpp:73
RoR::MSG_SIM_UNMUTE_NET_ACTOR_REQUESTED
@ MSG_SIM_UNMUTE_NET_ACTOR_REQUESTED
Payload = ActorPtr* (owner)
Definition: Application.h:129
RoR::TerrainEditor::ClearSelectedObject
void ClearSelectedObject()
Definition: TerrainEditor.cpp:306
RoR::GameContext::GetSceneMouse
SceneMouse & GetSceneMouse()
Definition: GameContext.h:171
RoR::InputEngine::Capture
void Capture()
Definition: InputEngine.cpp:635
RoR::CmdKeyInertiaConfig::LoadDefaultInertiaModels
void LoadDefaultInertiaModels()
Definition: CmdKeyInertia.cpp:140
RoR::GUIManager::MultiplayerSelector
GUI::MultiplayerSelector MultiplayerSelector
Definition: GUIManager.h:123
RoR::Str< 400 >
RoR::Collisions::getGroundModelByString
ground_model_t * getGroundModelByString(const Ogre::String name)
Definition: Collisions.cpp:365
RoR::ActorManager::RemoveFreeForce
void RemoveFreeForce(FreeForceID_t id)
Definition: ActorManager.cpp:1804
RoR::GUI::RepositorySelector::SetVisible
void SetVisible(bool visible)
Definition: GUI_RepositorySelector.cpp:1238
RoR::GUIManager::MenuWallpaper
Ogre::Overlay * MenuWallpaper
Definition: GUIManager.h:138
RoR::GUIManager::SetMouseCursorVisibility
void SetMouseCursorVisibility(MouseCursorVisibility visi)
Definition: GUIManager.cpp:290
RoR::ActorModifyRequest
Definition: SimData.h:857
RoR::GameContext::PopMessage
Message PopMessage()
Definition: GameContext.cpp:96
RoR::GfxScene::UpdateScene
void UpdateScene(float dt)
Definition: GfxScene.cpp:94
RoR::App::io_outgauge_mode
CVar * io_outgauge_mode
Definition: Application.cpp:200
RoR::ScriptUnit::scriptName
Ogre::String scriptName
Name of the '.as' file exclusively.
Definition: ScriptEngine.h:85
RoR::GUIManager::UpdateInputEvents
void UpdateInputEvents(float dt)
Definition: GUIManager.cpp:483
RoR::PathCombine
std::string PathCombine(std::string a, std::string b)
Definition: PlatformUtils.h:48
RoR::MSG_SIM_SEAT_PLAYER_REQUESTED
@ MSG_SIM_SEAT_PLAYER_REQUESTED
Payload = RoR::ActorPtr (owner) | nullptr.
Definition: Application.h:124
RoR::GfxScene::RegisterGfxActor
void RegisterGfxActor(RoR::GfxActor *gfx_actor)
Definition: GfxScene.cpp:289
GUI_LoadingWindow.h
CacheSystem.h
A database of user-installed content alias 'mods' (vehicles, terrains...)
RoR::MSG_NET_ADD_PEEROPTIONS_REQUESTED
@ MSG_NET_ADD_PEEROPTIONS_REQUESTED
Payload = RoR::PeerOptionsRequest* (owner)
Definition: Application.h:113
RoR::MODCACHEACTIVITY_BUNDLE_UNLOADED
@ MODCACHEACTIVITY_BUNDLE_UNLOADED
Args: #1 type, #2 entry number.
Definition: ScriptEvents.h:99
RoR::GfxScene::AddFreeBeamGfx
void AddFreeBeamGfx(FreeBeamGfxRequest *rq)
Definition: GfxScene.cpp:445
RoR::App::gfx_fps_limit
CVar * gfx_fps_limit
Definition: Application.cpp:256
RoR::MSG_APP_MODCACHE_PURGE_REQUESTED
@ MSG_APP_MODCACHE_PURGE_REQUESTED
Definition: Application.h:91
RoR::ActorManager::HandleActorStreamData
void HandleActorStreamData(std::vector< RoR::NetRecvPacket > packet)
Definition: ActorManager.cpp:360
RoR::ContentManager::ResourcePack::FLAGS
static const ResourcePack FLAGS
Definition: ContentManager.h:55
ErrorUtils.h
RoR::GameContext::ChangePlayerActor
void ChangePlayerActor(ActorPtr actor)
Definition: GameContext.cpp:487
BITMASK_IS_1
#define BITMASK_IS_1(VAR, FLAGS)
Definition: BitFlags.h:14
GUI_MainSelector.h
RoR::GUI::RepositorySelector::IsVisible
bool IsVisible() const
Definition: GUI_RepositorySelector.h:97
RoR::GUIManager::CollisionsDebug
GUI::CollisionsDebug CollisionsDebug
Definition: GUIManager.h:116
RoR::MSG_EDI_DELETE_FREEBEAMGFX_REQUESTED
@ MSG_EDI_DELETE_FREEBEAMGFX_REQUESTED
Payload = RoR::FreeBeamGfxID_t* (owner)
Definition: Application.h:160
RoR::MSG_GUI_MP_CLIENTS_REFRESH
@ MSG_GUI_MP_CLIENTS_REFRESH
Definition: Application.h:141
RoR::ContentManager::ResourcePack::SCRIPTS
static const ResourcePack SCRIPTS
Definition: ContentManager.h:68
ScriptEngine.h
RoR::MSG_EDI_ADD_FREEBEAMGFX_REQUESTED
@ MSG_EDI_ADD_FREEBEAMGFX_REQUESTED
Payload = RoR::FreeBeamGfxRequest* (owner)
Definition: Application.h:158
RoR::GameContext::DeleteActor
void DeleteActor(ActorPtr actor)
Definition: GameContext.cpp:438
RoR::App::sys_thumbnails_dir
CVar * sys_thumbnails_dir
Definition: Application.cpp:166
RoR::ScriptUnit::scriptCategory
ScriptCategory scriptCategory
Definition: ScriptEngine.h:76
RoR::MODCACHEACTIVITY_BUNDLE_RELOADED
@ MODCACHEACTIVITY_BUNDLE_RELOADED
Args: #1 type, #2 entry number, –, –, #5 rg name.
Definition: ScriptEvents.h:98
RoR::GUI::GameChatBox::SetVisible
void SetVisible(bool v)
Definition: GUI_GameChatBox.h:45
RoR::GameContext::PushMessage
void PushMessage(Message m)
Doesn't guarantee order! Use ChainMessage() if order matters.
Definition: GameContext.cpp:66
RoR::App::app_state
CVar * app_state
Definition: Application.cpp:79
ChatSystem.h
RoR::Str::ToCStr
const char * ToCStr() const
Definition: Str.h:46
RoR::GUI::RepositorySelector::DownloadFinished
void DownloadFinished()
Definition: GUI_RepositorySelector.cpp:1221
RoR::GUI::ResourcesCollection
Definition: GUI_RepositorySelector.h:79
RoR::Console::saveConfig
void saveConfig()
Definition: AppConfig.cpp:435
RoR::App::sim_terrain_name
CVar * sim_terrain_name
Definition: Application.cpp:97
RoR::MSG_NET_REMOVE_PEEROPTIONS_REQUESTED
@ MSG_NET_REMOVE_PEEROPTIONS_REQUESTED
Payload = RoR::PeerOptionsRequest* (owner)
Definition: Application.h:114
RoR::CameraManager::ResetAllBehaviors
void ResetAllBehaviors()
Definition: CameraManager.cpp:538
RoR::App::DestroyOverlayWrapper
void DestroyOverlayWrapper()
Definition: Application.cpp:368
RoR::FreeForceID_t
int FreeForceID_t
Unique sequentially generated ID of FreeForce; use ActorManager::GetFreeForceNextId().
Definition: ForwardDeclarations.h:67
RoR::GUI::LoadingWindow::SetVisible
void SetVisible(bool v)
Definition: GUI_LoadingWindow.h:41
RoR::PeerOptionsRequest::por_peeropts
BitMask_t por_peeropts
See RoRnet::PeerOptions.
Definition: Network.h:107
RoR::Terrain::GetCollisions
Collisions * GetCollisions()
Definition: Terrain.h:85
RoR::GUI::LoadingWindow::SetProgress
void SetProgress(int _percent, const std::string &_text="", bool render_frame=true)
Definition: GUI_LoadingWindow.cpp:33
RoR::GameContext::GetCharacterFactory
CharacterFactory * GetCharacterFactory()
Definition: GameContext.h:151
RoR::ScriptEngine::envokeCallback
void envokeCallback(int functionId, eventsource_t *source, NodeNum_t nodenum=NODENUM_INVALID, int type=0)
Definition: ScriptEngine.cpp:462
RoR::App::sys_cache_dir
CVar * sys_cache_dir
Definition: Application.cpp:165
RoR::CreateFolder
void CreateFolder(const char *path)
Path must be UTF-8 encoded.
Definition: PlatformUtils.cpp:175
RoR::Actor::hookToggle
void hookToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::HOOK_TOGGLE, NodeNum_t mousenode=NODENUM_INVALID, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
Definition: Actor.cpp:3651
GfxScene.h
RoR::GUI::TopMenubar::ai_presets_extern_fetching
bool ai_presets_extern_fetching
True if the (down)load of 'extern' waypoints is in progress.
Definition: GUI_TopMenubar.h:106
PlatformUtils.h
Platform-specific utilities. We use narrow UTF-8 encoded strings as paths. Inspired by http://utf8eve...
RoR::MSG_NET_REFRESH_REPOLIST_FAILURE
@ MSG_NET_REFRESH_REPOLIST_FAILURE
Payload = RoR::CurlFailInfo* (owner)
Definition: Application.h:110
RoR::SoundManager::CleanUp
void CleanUp()
Cleans up various objects that should be reset when returning from a terrain to the main menu.
Definition: SoundManager.cpp:293
RoR::ChatSystem::SendStreamSetup
void SendStreamSetup()
Definition: ChatSystem.cpp:35
RoR::MSG_GUI_OPEN_SELECTOR_REQUESTED
@ MSG_GUI_OPEN_SELECTOR_REQUESTED
Payload = LoaderType* (owner), Description = GUID | empty.
Definition: Application.h:139
RoR::App::cli_custom_scripts
CVar * cli_custom_scripts
Definition: Application.cpp:186
SOUND_START
#define SOUND_START(_ACTOR_, _TRIG_)
Definition: SoundScriptManager.h:35
RoR::CacheValidity::UNKNOWN
@ UNKNOWN
RoR::MSG_SIM_HIDE_NET_ACTOR_REQUESTED
@ MSG_SIM_HIDE_NET_ACTOR_REQUESTED
Payload = ActorPtr* (owner)
Definition: Application.h:126
RoR::Network::AddPeerOptions
void AddPeerOptions(PeerOptionsRequest *rq)
Definition: Network.cpp:797
RoR::SoundScriptManager::createInstance
SoundScriptInstancePtr createInstance(Ogre::String templatename, int actor_id, int soundLinkType=SL_DEFAULT, int soundLinkItemId=-1)
Definition: SoundScriptManager.cpp:360
RoR::LoaderType
LoaderType
< Search mode for ModCache::Query() & Operation mode for GUI::MainSelector
Definition: Application.h:455
RoR::MSG_GUI_REFRESH_TUNING_MENU_REQUESTED
@ MSG_GUI_REFRESH_TUNING_MENU_REQUESTED
Definition: Application.h:146
RoR::ActorLinkingRequest::alr_rope_group
int alr_rope_group
Definition: SimData.h:918
RoR::MSG_SIM_ADD_FREEFORCE_REQUESTED
@ MSG_SIM_ADD_FREEFORCE_REQUESTED
Payload = RoR::FreeForceRequest* (owner)
Definition: Application.h:133
RoR::LoadScriptRequest::lsr_associated_actor
ActorInstanceID_t lsr_associated_actor
For ScriptCategory::ACTOR.
Definition: ScriptEngine.h:97
DiscordRpc.h
RoR::SimState::PAUSED
@ PAUSED
Application.h
Central state/object manager and communications hub.
RoR::App::GetConsole
Console * GetConsole()
Definition: Application.cpp:287
RoR::MSG_NET_OPEN_RESOURCE_SUCCESS
@ MSG_NET_OPEN_RESOURCE_SUCCESS
Payload = GUI::ResourcesCollection* (owner)
Definition: Application.h:109
SoundScriptManager.h
RoR::MSG_APP_MODCACHE_LOAD_REQUESTED
@ MSG_APP_MODCACHE_LOAD_REQUESTED
Definition: Application.h:89
RoR::Message::payload
void * payload
Definition: GameContext.h:59
RoR::App::GetGameContext
GameContext * GetGameContext()
Definition: Application.cpp:297
RoR::App::CreateThreadPool
void CreateThreadPool()
Definition: Application.cpp:333
RoR::ground_model_t::name
char name[256]
Definition: SimData.h:727
RoR::ScriptCallbackArgs
Definition: ScriptEngine.h:100
RoR::MSG_APP_SCREENSHOT_REQUESTED
@ MSG_APP_SCREENSHOT_REQUESTED
Definition: Application.h:86
RoR::App::gfx_fov_internal_default
CVar * gfx_fov_internal_default
Definition: Application.cpp:253
RoR::ContentManager::ResourcePack::ICONS
static const ResourcePack ICONS
Definition: ContentManager.h:58
RoR::AIRPLANE
@ AIRPLANE
its an airplane
Definition: SimData.h:86
RoR::GUI::RepositorySelector::UpdateResources
void UpdateResources(ResourcesCollection *data)
Definition: GUI_RepositorySelector.cpp:1166
RoR::MSG_NET_REFRESH_REPOLIST_SUCCESS
@ MSG_NET_REFRESH_REPOLIST_SUCCESS
Payload = GUI::ResourcesCollection* (owner)
Definition: Application.h:108
RoR::RaceSystem::ResetRaceUI
void ResetRaceUI()
Definition: RaceSystem.cpp:64
RoR::AppState::SIMULATION
@ SIMULATION
RoR::Message::chain
std::vector< Message > chain
Posted after the message is processed.
Definition: GameContext.h:60
RoR::ActorSB::simbuf_actor_state
ActorState simbuf_actor_state
Definition: SimBuffers.h:115
RoR::ScriptEngine::triggerEvent
void triggerEvent(scriptEvents eventnum, int arg1=0, int arg2ex=0, int arg3ex=0, int arg4ex=0, std::string arg5ex="", std::string arg6ex="", std::string arg7ex="", std::string arg8ex="")
triggers an event; Not to be used by the end-user.
Definition: ScriptEngine.cpp:781
RoRVersion.h
RoR::GUI::TopMenubar::RefreshTuningMenu
void RefreshTuningMenu()
Definition: GUI_TopMenubar.cpp:2592
RoR::eventsource_t::es_script_handler
int es_script_handler
AngelScript function ID.
Definition: Collisions.h:45
RoR::LoadScriptRequest
Definition: ScriptEngine.h:92
RoR::GUI::GameMainMenu::SetVisible
void SetVisible(bool v)
Definition: GUI_GameMainMenu.h:43
RoR::AppContext::CaptureScreenshot
void CaptureScreenshot()
Definition: AppContext.cpp:403
RoR::CharacterFactory::DeleteAllCharacters
void DeleteAllCharacters()
Definition: CharacterFactory.cpp:101
RoR::AppState::SHUTDOWN
@ SHUTDOWN
RoR::App::gfx_sky_mode
CVar * gfx_sky_mode
Definition: Application.cpp:231
RoR::TerrainEditor::WriteOutputFile
void WriteOutputFile()
Definition: TerrainEditor.cpp:234
RoR::ScriptEventArgs::arg7ex
std::string arg7ex
Definition: ScriptEvents.h:128
RoR::GUIManager::DrawSimulationGui
void DrawSimulationGui(float dt)
Touches live data; must be called in sync with sim. thread.
Definition: GUIManager.cpp:154
RoR::MSG_SIM_TELEPORT_PLAYER_REQUESTED
@ MSG_SIM_TELEPORT_PLAYER_REQUESTED
Payload = Ogre::Vector3* (owner)
Definition: Application.h:125
RoR::Message::description
std::string description
Definition: GameContext.h:58
RoR::Actor::toggleSlideNodeLock
void toggleSlideNodeLock()
Definition: ActorSlideNode.cpp:34
RoR::App::CreateOverlayWrapper
void CreateOverlayWrapper()
Definition: Application.cpp:307
_LC
#define _LC(ctx, str)
Definition: Language.h:38
RoR::GUIManager::TopMenubar
GUI::TopMenubar TopMenubar
Definition: GUIManager.h:133
RoR::GUI::TopMenubar::RefreshAiPresets
void RefreshAiPresets()
Refresh the list of presets, used for display. Needs to be called when terrain is loaded.
Definition: GUI_TopMenubar.cpp:2571
RoR::AppState::PRINT_HELP_EXIT
@ PRINT_HELP_EXIT
RoR::CacheSystem::CreateProject
CacheEntryPtr CreateProject(CreateProjectRequest *request)
Creates subdirectory in 'My Games\Rigs of Rods\projects', pre-populates it with files and adds modcac...
Definition: CacheSystem.cpp:1783
RoR::MSG_EDI_ENTER_TERRN_EDITOR_REQUESTED
@ MSG_EDI_ENTER_TERRN_EDITOR_REQUESTED
Definition: Application.h:150
RoR::MSG_EDI_LOAD_BUNDLE_REQUESTED
@ MSG_EDI_LOAD_BUNDLE_REQUESTED
Payload = RoR::CacheEntryPtr* (owner)
Definition: Application.h:152
RoR::GUIManager::ShowMessageBox
void ShowMessageBox(const char *title, const char *text, bool allow_close=true, const char *btn1_text="OK", const char *btn2_text=nullptr)
Definition: GUIManager.cpp:454
RoR::App::cli_server_port
CVar * cli_server_port
Definition: Application.cpp:177
RoR::App::sys_config_dir
CVar * sys_config_dir
Definition: Application.cpp:164
RoR::ChatSystem::HandleStreamData
void HandleStreamData(std::vector< RoR::NetRecvPacket > packet_buffer)
Definition: ChatSystem.cpp:71
RoR::AppContext::SetUpLogging
void SetUpLogging()
Definition: AppContext.cpp:516
RoR::ModifyProjectRequest
Definition: CacheSystem.h:260
RoR::MSG_NET_CONNECT_SUCCESS
@ MSG_NET_CONNECT_SUCCESS
Definition: Application.h:100
RoR::CreateProjectRequest
Creates subdirectory in 'My Games\Rigs of Rods\projects', pre-populates it with files and adds modcac...
Definition: CacheSystem.h:211
RoR::LT_Terrain
@ LT_Terrain
Definition: Application.h:458
RoR::ScriptEventArgs::arg5ex
std::string arg5ex
Definition: ScriptEvents.h:126
RoR::App::cli_preset_terrain
CVar * cli_preset_terrain
Definition: Application.cpp:180
RoR::AppContext::SetUpThreads
void SetUpThreads()
Definition: AppContext.cpp:626
RoR::App::GetDiscordRpc
DiscordRpc * GetDiscordRpc()
Definition: Application.cpp:299
GUI_RepositorySelector.h
RoR::GUI::FrictionSettings::setActiveCol
void setActiveCol(const ground_model_t *gm)
Definition: GUI_FrictionSettings.h:56
RoR::FREEFORCESACTIVITY_BROKEN
@ FREEFORCESACTIVITY_BROKEN
Only with HALFBEAM_* types; arg #5 (string containing float) the applied force, arg #6 (string contai...
Definition: ScriptEvents.h:112
RoR::MSG_NET_FETCH_AI_PRESETS_SUCCESS
@ MSG_NET_FETCH_AI_PRESETS_SUCCESS
Description = JSON string.
Definition: Application.h:111
RoR::AppContext::ActivateFullscreen
void ActivateFullscreen(bool val)
Definition: AppContext.cpp:450
Skidmark.h
RoR::Actor::ar_muted_by_peeropt
bool ar_muted_by_peeropt
Muted by user in multiplayer (see RoRnet::PEEROPT_MUTE_ACTORS).
Definition: Actor.h:492
RoR::AppContext::SetUpObsoleteConfMarker
void SetUpObsoleteConfMarker()
Definition: AppContext.cpp:594
RoR::App::GetCacheSystem
CacheSystem * GetCacheSystem()
Definition: Application.cpp:289
RoR::ContentManager::AddResourcePack
void AddResourcePack(ResourcePack const &resource_pack, std::string const &override_rgn="")
Loads resources if not already loaded.
Definition: ContentManager.cpp:99
RoR::CacheValidity::NEEDS_REBUILD
@ NEEDS_REBUILD
RoR::GameContext::UpdateAirplaneInputEvents
void UpdateAirplaneInputEvents(float dt)
Definition: GameContext.cpp:1602
RoR::GUI::MpServerInfoVec
std::vector< MpServerInfo > MpServerInfoVec
Definition: GUI_MultiplayerSelector.h:52
RoR::CacheValidity::NEEDS_UPDATE
@ NEEDS_UPDATE
RoR::App::audio_menu_music
CVar * audio_menu_music
Definition: Application.cpp:223
RoR::FreeForceRequest
Common for ADD and MODIFY requests; tailored for use with AngelScript thru GameScript::pushMessage().
Definition: SimData.h:783
RoR::Network::RemovePeerOptions
void RemovePeerOptions(PeerOptionsRequest *rq)
Definition: Network.cpp:814
RoR::App::diag_preset_veh_config
CVar * diag_preset_veh_config
Definition: Application.cpp:144
RoR::ActorLinkingRequest::alr_tie_group
int alr_tie_group
Definition: SimData.h:916
RoR::OutGauge::Close
void Close()
Definition: OutGauge.cpp:43
RoR::GfxActor::SetCastShadows
void SetCastShadows(bool value)
Definition: GfxActor.cpp:3289
RoR::Console::showCommandLineVersion
void showCommandLineVersion()
Definition: AppCommandLine.cpp:181
RoR::GUI::MessageBoxConfig
Definition: GUI_MessageBox.h:50
RoR::ContentManager::ResourcePack::OGRE_CORE
static const ResourcePack OGRE_CORE
Definition: ContentManager.h:47
RoR::App::mp_server_port
CVar * mp_server_port
Definition: Application.cpp:122
RoR::ScriptCallbackArgs::eventsource
eventsource_t * eventsource
Definition: ScriptEngine.h:104
RoR::MSG_EDI_DELETE_PROJECT_REQUESTED
@ MSG_EDI_DELETE_PROJECT_REQUESTED
Payload = RoR::CacheEntryPtr* (owner)
Definition: Application.h:157
RoR::CacheSystem::LoadResource
void LoadResource(CacheEntryPtr &t)
Loads the associated resource bundle if not already done.
Definition: CacheSystem.cpp:1538
RoR::PeerOptionsRequest
Payload of MSG_NET_{ADD/REMOVE}_PEEROPTIONS_REQUESTED.
Definition: Network.h:104
RoR::MSG_SIM_ACTOR_LINKING_REQUESTED
@ MSG_SIM_ACTOR_LINKING_REQUESTED
Payload = RoR::ActorLinkingRequest* (owner)
Definition: Application.h:132
RoR::Message
Unified game event system - all requests and state changes are reported using a message.
Definition: GameContext.h:51
RoR::Console::loadConfig
void loadConfig()
Definition: AppConfig.cpp:369
RoR::App::mp_server_host
CVar * mp_server_host
Definition: Application.cpp:121
RoR::ScriptEventArgs::arg8ex
std::string arg8ex
Definition: ScriptEvents.h:129
RoR::ContentManager::LoadGameplayResources
void LoadGameplayResources()
Checks GVar settings and loads required resources.
Definition: ContentManager.cpp:406
RoR::Actor::setSmokeEnabled
void setSmokeEnabled(bool enabled)
Writes info to console/notify area.
Definition: Actor.h:174
RoR::GameContext::UnloadTerrain
void UnloadTerrain()
Definition: GameContext.cpp:179
RoR::CVar::setVal
void setVal(T val)
Definition: CVar.h:72
RoR::ScriptEngine::getScriptUnit
ScriptUnit & getScriptUnit(ScriptUnitID_t unique_id)
Definition: ScriptEngine.cpp:1102
_L
#define _L
Definition: ErrorUtils.cpp:35
RoR::MSG_GUI_OPEN_MENU_REQUESTED
@ MSG_GUI_OPEN_MENU_REQUESTED
Definition: Application.h:137
RoR::GameContext::LoadScene
void LoadScene(std::string const &filename)
Matching terrain must be already loaded.
Definition: Savegame.cpp:64
RoR::ContentManager::InitModCache
void InitModCache(CacheValidity validity)
Definition: ContentManager.cpp:251
OutGauge.h
RoR::Actor::tieToggle
void tieToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::TIE_TOGGLE, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
Definition: Actor.cpp:3457
RoR::GUI::MpClientList::UpdateClients
void UpdateClients()
Definition: GUI_MultiplayerClientList.cpp:45
RoR::Actor::ropeToggle
void ropeToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::ROPE_TOGGLE, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
Definition: Actor.cpp:3574
RoR::ScriptEventArgs::type
scriptEvents type
Definition: ScriptEvents.h:120
RoR::ActorManager::UpdateInputEvents
void UpdateInputEvents(float dt)
Definition: ActorManager.cpp:1371
RoR::Console::regBuiltinCommands
void regBuiltinCommands()
Register builtin commands.
Definition: ConsoleCmd.cpp:678
RoR::GUIManager::GameAbout
GUI::GameAbout GameAbout
Definition: GUIManager.h:118
RoR::MSG_EDI_LEAVE_TERRN_EDITOR_REQUESTED
@ MSG_EDI_LEAVE_TERRN_EDITOR_REQUESTED
Definition: Application.h:151
RoR::GUI::CollisionsDebug::CleanUp
void CleanUp()
Definition: GUI_CollisionsDebug.cpp:396
RoR::App::sys_projects_dir
CVar * sys_projects_dir
Definition: Application.cpp:173
RoR::MSG_SIM_SPAWN_ACTOR_REQUESTED
@ MSG_SIM_SPAWN_ACTOR_REQUESTED
Payload = RoR::ActorSpawnRequest* (owner)
Definition: Application.h:121
RoR::MSG_APP_MODCACHE_UPDATE_REQUESTED
@ MSG_APP_MODCACHE_UPDATE_REQUESTED
Definition: Application.h:90
RoR::App::GetInputEngine
InputEngine * GetInputEngine()
Definition: Application.cpp:288
RoR::ActorManager::ModifyFreeForce
void ModifyFreeForce(FreeForceRequest *rq)
Definition: ActorManager.cpp:1786
RoR::CacheSystem::ReLoadResource
void ReLoadResource(CacheEntryPtr &t)
Forces reloading the associated bundle.
Definition: CacheSystem.cpp:1634
RoR::App::cli_preset_veh_config
CVar * cli_preset_veh_config
Definition: Application.cpp:179
RoR::ground_model_t
Surface friction properties.
Definition: SimData.h:703
RoR::ScriptEventArgs::arg2ex
int arg2ex
Definition: ScriptEvents.h:123
RoR::EV_COMMON_ENTER_CHATMODE
@ EV_COMMON_ENTER_CHATMODE
enter the chat mode
Definition: InputEngine.h:227
RoR::ActorPtr
RefCountingObjectPtr< Actor > ActorPtr
Definition: ForwardDeclarations.h:228
RoR::GUI::GameAbout::IsVisible
bool IsVisible() const
Definition: GUI_GameAbout.h:35
RoR::ActorLinkingRequest::alr_actor_instance_id
ActorInstanceID_t alr_actor_instance_id
Definition: SimData.h:910
RoR::MSG_NET_CONNECT_FAILURE
@ MSG_NET_CONNECT_FAILURE
Definition: Application.h:101
RoR::GUI::MainSelector::Close
void Close()
Definition: GUI_MainSelector.cpp:600
RoR::MSG_SIM_DELETE_ACTOR_REQUESTED
@ MSG_SIM_DELETE_ACTOR_REQUESTED
Payload = RoR::ActorPtr* (owner)
Definition: Application.h:123
RoR::GameContext::UpdateSimInputEvents
void UpdateSimInputEvents(float dt)
Definition: GameContext.cpp:1058
RoR::GameContext::UpdateBoatInputEvents
void UpdateBoatInputEvents(float dt)
Definition: GameContext.cpp:1790
RoR::DiscordRpc::Init
void Init()
Definition: DiscordRpc.cpp:44
RoR::GUI::TopMenubar::ai_presets_extern_error
std::string ai_presets_extern_error
Error message from the (down)load of 'extern' waypoints.
Definition: GUI_TopMenubar.h:107
RoR::MSG_APP_SCRIPT_THREAD_STATUS
@ MSG_APP_SCRIPT_THREAD_STATUS
Payload = RoR::ScriptEventArgs* (owner)
Definition: Application.h:94
RoRnet::PEEROPT_HIDE_ACTORS
@ PEEROPT_HIDE_ACTORS
Spawn actors hidden and immediatelly hide existing actors.
Definition: RoRnet.h:131
RoR::App::GetOutGauge
OutGauge * GetOutGauge()
Definition: Application.cpp:298
RoR::App::gfx_fov_external
CVar * gfx_fov_external
Definition: Application.cpp:250
RoR::MSG_EDI_MODIFY_GROUNDMODEL_REQUESTED
@ MSG_EDI_MODIFY_GROUNDMODEL_REQUESTED
Payload = RoR::ground_model_t* (weak)
Definition: Application.h:149
RoR::AppContext::GetOgreRoot
Ogre::Root * GetOgreRoot()
Definition: AppContext.h:65
Terrain.h
RoR::App::DestroyInputEngine
void DestroyInputEngine()
Definition: Application.cpp:374
RoR::ActorLinkingRequest::alr_hook_mousenode
NodeNum_t alr_hook_mousenode
Definition: SimData.h:914
RoR::SimState::RUNNING
@ RUNNING
RoR::ActorState::NETWORKED_HIDDEN
@ NETWORKED_HIDDEN
not simulated, not updated (remote)
InputEngine.h
Handles controller inputs from player. Defines input events and binding mechanism,...
RoR::GameContext::SaveScene
void SaveScene(std::string const &filename)
Definition: Savegame.cpp:70
RoR::GUIManager::MainSelector
GUI::MainSelector MainSelector
Definition: GUIManager.h:124
RoR::Console::showCommandLineUsage
void showCommandLineUsage()
Definition: AppCommandLine.cpp:162
RoR::MSG_SIM_UNHIDE_NET_ACTOR_REQUESTED
@ MSG_SIM_UNHIDE_NET_ACTOR_REQUESTED
Payload = ActorPtr* (owner)
Definition: Application.h:127
RoR::ActorLinkingRequestType::SLIDENODE_TOGGLE
@ SLIDENODE_TOGGLE
RoR::MSG_APP_UNLOAD_SCRIPT_REQUESTED
@ MSG_APP_UNLOAD_SCRIPT_REQUESTED
Payload = RoR::ScriptUnitId_t* (owner)
Definition: Application.h:93
RoRnet::PEEROPT_MUTE_CHAT
@ PEEROPT_MUTE_CHAT
CHAT and PRIVCHAT messages will not be allowed through.
Definition: RoRnet.h:129
RoR::GUIManager::SetUpMenuWallpaper
void SetUpMenuWallpaper()
Definition: GUIManager.cpp:237
RoR::ActorManager::GetInertiaConfig
RoR::CmdKeyInertiaConfig & GetInertiaConfig()
Definition: ActorManager.h:97
RoRnet::PEEROPT_MUTE_ACTORS
@ PEEROPT_MUTE_ACTORS
Spawn actors muted and immediatelly mute existing actors.
Definition: RoRnet.h:130
RoR::OutGauge::Update
bool Update(float dt, ActorPtr truck)
Definition: OutGauge.cpp:103
RoR::App::diag_preset_terrain
CVar * diag_preset_terrain
Definition: Application.cpp:140
RoR::ScriptEngine::loadScript
ScriptUnitID_t loadScript(Ogre::String filename, ScriptCategory category=ScriptCategory::TERRAIN, ActorPtr associatedActor=nullptr, std::string buffer="")
Loads a script.
Definition: ScriptEngine.cpp:828
RoR::ScriptUnitID_t
int ScriptUnitID_t
Unique sequentially generated ID of a loaded and running scriptin session. Use ScriptEngine::getScrip...
Definition: ForwardDeclarations.h:41
RoR::Console::CONSOLE_MSGTYPE_INFO
@ CONSOLE_MSGTYPE_INFO
Generic message.
Definition: Console.h:60
RoR::GameContext::SpawnPreselectedActor
void SpawnPreselectedActor(std::string const &preset_vehicle, std::string const &preset_veh_config)
needs Character to exist
Definition: GameContext.cpp:624
RoR::ASMANIP_SCRIPT_LOADED
@ ASMANIP_SCRIPT_LOADED
Triggered after the script's main() completed; may trigger additional processing (for example,...
Definition: ScriptEvents.h:75
RoR::App::sim_terrain_gui_name
CVar * sim_terrain_gui_name
Definition: Application.cpp:98
RoR::RepairMode::UpdateInputEvents
void UpdateInputEvents(float dt)
Definition: RepairMode.cpp:30
RoR::App::sys_screenshot_dir
CVar * sys_screenshot_dir
Definition: Application.cpp:171
RoR::App::app_custom_scripts
CVar * app_custom_scripts
Definition: Application.cpp:92
RoR::MSG_GUI_CLOSE_MENU_REQUESTED
@ MSG_GUI_CLOSE_MENU_REQUESTED
Definition: Application.h:138
RoR::MSG_NET_CONNECT_PROGRESS
@ MSG_NET_CONNECT_PROGRESS
Definition: Application.h:99
RoR::App::GetMumble
MumbleIntegration * GetMumble()
Definition: Application.cpp:290
Collisions.h
RoR::GameContext::GetRepairMode
RepairMode & GetRepairMode()
Definition: GameContext.h:170
RoR::AppContext::SetUpInput
bool SetUpInput()
Definition: AppContext.cpp:63
RoR::MSG_SIM_MUTE_NET_ACTOR_REQUESTED
@ MSG_SIM_MUTE_NET_ACTOR_REQUESTED
Payload = ActorPtr* (owner)
Definition: Application.h:128
GUI_GameControls.h
RoR::MSG_SIM_MODIFY_FREEFORCE_REQUESTED
@ MSG_SIM_MODIFY_FREEFORCE_REQUESTED
Payload = RoR::FreeForceRequest* (owner)
Definition: Application.h:134
RoR::GfxActor::SetAllMeshesVisible
void SetAllMeshesVisible(bool value)
Definition: GfxActor.cpp:3332
RoR::ScriptCallbackArgs::node
NodeNum_t node
Definition: ScriptEngine.h:105
RoR::MSG_SIM_PAUSE_REQUESTED
@ MSG_SIM_PAUSE_REQUESTED
Definition: Application.h:116
RoR::BOAT
@ BOAT
its a boat
Definition: SimData.h:87
RoR::ActorState::NETWORKED_OK
@ NETWORKED_OK
not simulated (remote) actor
RoR::ScriptEventArgs::arg6ex
std::string arg6ex
Definition: ScriptEvents.h:127
MumbleIntegration.h
WinMain
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
Definition: main.cpp:2042
RoR::ActorLinkingRequestType::TIE_TOGGLE
@ TIE_TOGGLE
RoR::Actor::ar_state
ActorState ar_state
Definition: Actor.h:488
RoR::GUI::RepositorySelector::ShowError
void ShowError(CurlFailInfo *failinfo)
Definition: GUI_RepositorySelector.cpp:1226
RoR::GUIManager::MouseCursorVisibility::HIDDEN
@ HIDDEN
Hidden as inactive, will re-appear the moment user moves mouse.
RoR::GameContext::UpdateTruckInputEvents
void UpdateTruckInputEvents(float dt)
Definition: GameContext.cpp:1850
SOUND_KILL
#define SOUND_KILL(_ACTOR_, _TRIG_)
Definition: SoundScriptManager.h:38
RoR::MSG_SIM_LOAD_SAVEGAME_REQUESTED
@ MSG_SIM_LOAD_SAVEGAME_REQUESTED
Definition: Application.h:119
RoR::MODCACHEACTIVITY_BUNDLE_LOADED
@ MODCACHEACTIVITY_BUNDLE_LOADED
Args: #1 type, #2 entry number, –, –, #5 rg name.
Definition: ScriptEvents.h:97
RoR::GfxActor::GetSimDataBuffer
ActorSB & GetSimDataBuffer()
Definition: GfxActor.h:128
RoR
Definition: AppContext.h:36
RoR::GfxScene::RemoveFreeBeamGfx
void RemoveFreeBeamGfx(FreeBeamGfxID_t id)
Definition: GfxScene.cpp:488
RoR::ActorManager::GetActorById
const ActorPtr & GetActorById(ActorInstanceID_t actor_id)
Definition: ActorManager.cpp:1139
RoR::ContentManager::ResourcePack::FONTS
static const ResourcePack FONTS
Definition: ContentManager.h:56
RoR::Log
void Log(const char *msg)
The ultimate, application-wide logging function. Adds a line (any length) in 'RoR....
Definition: Application.cpp:436
RoR::ActorLinkingRequestType::HOOK_LOCK
@ HOOK_LOCK
RoR::App::app_force_cache_purge
CVar * app_force_cache_purge
Definition: Application.cpp:88
RoR::ScriptCategory::CUSTOM
@ CUSTOM
Loaded by user via either: A) ingame console 'loadscript'; B) RoR.cfg 'app_custom_scripts'; C) comman...
RoR::ActorManager::CleanUpSimulation
void CleanUpSimulation()
Call this after simulation loop finishes.
Definition: ActorManager.cpp:865
RoR::App::GetGfxScene
GfxScene * GetGfxScene()
Definition: Application.cpp:293
RoR::GameContext::GetActorManager
ActorManager * GetActorManager()
Definition: GameContext.h:127
RoR::CVar::setStr
void setStr(std::string const &str)
Definition: CVar.h:83
RoR::SE_ANGELSCRIPT_THREAD_STATUS
@ SE_ANGELSCRIPT_THREAD_STATUS
Sent by background threads (i.e. CURL) when there's something important (like finishing a download)....
Definition: ScriptEvents.h:58
RoR::GUIManager::GameMainMenu
GUI::GameMainMenu GameMainMenu
Definition: GUIManager.h:117
RoR::MSG_APP_SHUTDOWN_REQUESTED
@ MSG_APP_SHUTDOWN_REQUESTED
Definition: Application.h:85
RoR::FileExists
bool FileExists(const char *path)
Path must be UTF-8 encoded.
Definition: PlatformUtils.cpp:163
main
int main(int argc, char *argv[])
Definition: main.cpp:73
RoR::ScriptEventArgs::arg1
int arg1
Definition: ScriptEvents.h:121
RoR::MSG_NET_DISCONNECT_REQUESTED
@ MSG_NET_DISCONNECT_REQUESTED
Definition: Application.h:103
RoR::Console::processCommandLine
void processCommandLine(int argc, char *argv[])
Definition: AppCommandLine.cpp:71
RoR::LanguageEngine::setup
void setup()
Definition: Language.cpp:48
RoR::GUIManager::MouseCursorVisibility::VISIBLE
@ VISIBLE
Visible, will be auto-hidden if not moving for a while.
RoR::GameContext::CreatePlayerCharacter
void CreatePlayerCharacter()
Terrain must be loaded.
Definition: GameContext.cpp:840
RoR::GameContext::UpdateSkyInputEvents
void UpdateSkyInputEvents(float dt)
Definition: GameContext.cpp:1256
RoR::ScriptEventArgs::arg3ex
int arg3ex
Definition: ScriptEvents.h:124
RoR::GameContext::GetTerrain
const TerrainPtr & GetTerrain()
Definition: GameContext.h:117
RoR::MSG_SIM_SCRIPT_EVENT_TRIGGERED
@ MSG_SIM_SCRIPT_EVENT_TRIGGERED
Payload = RoR::ScriptEventArgs* (owner)
Definition: Application.h:130
RoR::OutGauge::Connect
void Connect()
Definition: OutGauge.cpp:58
RoR::Message::type
MsgType type
Definition: GameContext.h:57
RoR::GameContext::HandleSavegameHotkeys
void HandleSavegameHotkeys()
Definition: Savegame.cpp:99
RoR::Network::StopConnecting
void StopConnecting()
Definition: Network.cpp:419
RoR::Actor::muteAllSounds
void muteAllSounds()
Definition: Actor.cpp:3839
RoR::MSG_EDI_MODIFY_FREEBEAMGFX_REQUESTED
@ MSG_EDI_MODIFY_FREEBEAMGFX_REQUESTED
Payload = RoR::FreeBeamGfxRequest* (owner)
Definition: Application.h:159