14 {
15 string root_path =
"cfgCharacterScenes " +
g_Game.GetWorldName();
16
17 int count =
g_Game.ConfigGetChildrenCount(root_path);
18 int index = Math.RandomInt(0, count - 1);
19 string childName;
20 g_Game.ConfigGetChildName(root_path, index, childName);
21
22 string scene_path = root_path + " " + childName;
24 vector position =
SwapYZ(
g_Game.ConfigGetVector(scene_path +
" position"));
27 g_Game.ConfigGetIntArray(scene_path +
" date", date);
28 float fov =
g_Game.ConfigGetFloat(scene_path +
" fov");
29 float overcast =
g_Game.ConfigGetFloat(scene_path +
" overcast");
30 float rain =
g_Game.ConfigGetFloat(scene_path +
" rain");
31 float fog =
g_Game.ConfigGetFloat(scene_path +
" fog");
32 float windspeed = -1;
33 if (
g_Game.ConfigIsExisting(scene_path +
" windspeed") ) windspeed =
g_Game.ConfigGetFloat(scene_path +
" windspeed");
34 g_Game.ConfigGetFloatArray(scene_path +
" storm", storm);
35
36 World world =
g_Game.GetWorld();
37
38 if (world && date.Count() >= 5)
39 {
40 world.
SetDate(date.Get(0), date.Get(1), date.Get(2), date.Get(3), date.Get(4));
41 }
42
45
47
49 {
50
54
56
60
64 vector ground_demo_pos =
Vector(pos_x, pos_y, pos_z);
66
68 m_CharacterRot[0] = Math.Atan2(to_cam_dir[0], to_cam_dir[2]) * Math.RAD2DEG;
69 }
70
72 m_Weather.GetOvercast().SetLimits( overcast, overcast );
73 m_Weather.GetRain().SetLimits( rain, rain );
75
76 m_Weather.GetOvercast().Set( overcast, 0, 0);
79
80 if ( storm.Count() == 3 )
81 {
82 m_Weather.SetStorm(storm.Get(0),storm.Get(1),storm.Get(2));
83 }
84
85 if ( windspeed != -1 )
86 {
90 }
91
94
95 PPEffects.Init();
96
98 }
proto native float SurfaceY(float x, float z)
override ScriptCallQueue GetCallQueue(int call_category)
proto native void ObjectDelete(Object obj)
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 void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto native void SetDate(int year, int month, int day, int hour, int minute)
Sets actual ingame world time.
proto vector Multiply4(vector mat[4])
Transforms position.
proto native CGame GetGame()
array< float > TFloatArray
proto native vector Vector(float x, float y, float z)
Vector constructor from components.