30 {
31 string root_path =
"cfgCharacterScenes " +
g_Game.GetWorldName();
32
33 int count =
g_Game.ConfigGetChildrenCount(root_path);
34 int index = Math.RandomInt(0, count - 1);
35 string childName;
36 g_Game.ConfigGetChildName(root_path, index, childName);
37
38 string scene_path = root_path + " " + childName;
43 g_Game.ConfigGetIntArray(scene_path +
" date", date);
44 float fov =
g_Game.ConfigGetFloat(scene_path +
" fov");
45 float overcast =
g_Game.ConfigGetFloat(scene_path +
" overcast");
46 float rain =
g_Game.ConfigGetFloat(scene_path +
" rain");
47 float snowfall =
g_Game.ConfigGetFloat(scene_path +
" snowfall");
48 float fog =
g_Game.ConfigGetFloat(scene_path +
" fog");
49 float windspeed = -1;
50 if (
g_Game.ConfigIsExisting(scene_path +
" windspeed") )
51 windspeed =
g_Game.ConfigGetFloat(scene_path +
" windspeed");
52 g_Game.ConfigGetFloatArray(scene_path +
" storm", storm);
53
54 World world =
g_Game.GetWorld();
55
56 if (world && date.Count() >= 5)
57 {
58 world.
SetDate(date.Get(0), date.Get(1), date.Get(2), date.Get(3), date.Get(4));
59 }
60
63
65
67 {
68
72
74
78
81 float pos_y =
g_Game.SurfaceY(pos_x, pos_z);
82 vector ground_demo_pos =
Vector(pos_x, pos_y, pos_z);
84
86 m_CharacterRot[0] = Math.Atan2(to_cam_dir[0], to_cam_dir[2]) * Math.RAD2DEG;
87 }
88
90 m_Weather.GetOvercast().SetLimits( overcast, overcast );
91 m_Weather.GetRain().SetLimits( rain, rain );
92 m_Weather.GetSnowfall().SetLimits( snowfall, snowfall );
94
95 m_Weather.GetOvercast().Set( overcast, 0, 0);
97 m_Weather.GetSnowfall().Set( snowfall, 0, 0);
99
100 if ( storm.Count() == 3 )
101 {
102 m_Weather.SetStorm(storm.Get(0),storm.Get(1),storm.Get(2));
103 }
104
105 if ( windspeed != -1 )
106 {
108 m_Weather.SetWindMaximumSpeed(windspeed);
110 }
111
114
117
118 PPEffects.Init();
119
121 }
vector SwapYZ(vector vec)
void SetInitPostprocesses()
Since this can get created at the same time as DayZGame, non-static postprocesses need to be deffered...
ref IntroSceneCharacter m_Character
vector SnapToGround(vector pos)
void IntroSceneCharacter()
proto vector Multiply4(vector mat[4])
Transforms position.
array< float > TFloatArray
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
proto native void SetDate(int year, int month, int day, int hour, int minute)
Sets actual ingame world time.