DayZ 1.24
Loading...
Searching...
No Matches
someMission.c File Reference

Go to the source code of this file.

Functions

Mission CreateMission (string path)
 

Function Documentation

◆ CreateMission()

Mission CreateMission ( string path)

Definition at line 1 of file someMission.c.

2{
3 Print("Creating Mission: " + path);
4
5 // g_Game.SetMissionPath(path); Done from C++ now
6
7 if (g_Game.IsMultiplayer() && g_Game.IsServer())
8 return new MissionServer;
9
10#ifdef NO_GUI
11 return new MissionDummy;
12#endif
14 if (path.Contains("NoCutscene"))
15 {
16 m = new MissionMainMenu();
17 m.m_NoCutscene = true;
18 return m;
19 }
20
21 if (path.Contains("intro"))
22 {
23 m = new MissionMainMenu();
24 m.m_NoCutscene = false;
25 return m;
26 }
27 else
28 {
29 if (path == "")
30 return new MissionDummy;
31#ifndef NO_GUI_INGAME
32 return new MissionGameplay;
33#else
34 return new MissionDummy;
35#endif
36 }
37}
DayZGame g_Game
Definition DayZGame.c:3528
proto void Print(void var)
Prints content of variable to console/log.
bool Contains(string sample)
Returns true if sample is substring of string.
Definition EnString.c:286

References string::Contains(), g_Game, path, and Print().