3 protected ref IntroSceneCharacter m_Character;
5 protected vector m_CameraTrans[4];
6 protected vector m_CharacterPos;
7 protected vector m_CharacterRot;
11 protected ref OptionsMenu m_OptionsMenu;
15 string root_path =
"cfgCharacterScenes " +
g_Game.GetWorldName();
17 int count =
g_Game.ConfigGetChildrenCount(root_path);
18 int index =
Math.RandomInt(0, count - 1);
20 g_Game.ConfigGetChildName(root_path, index, childName);
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");
33 if (
g_Game.ConfigIsExisting(scene_path +
" windspeed") ) windspeed =
g_Game.ConfigGetFloat(scene_path +
" windspeed");
34 g_Game.ConfigGetFloatArray(scene_path +
" storm", storm);
38 if (world && date.Count() >= 5)
40 world.SetDate(date.Get(0), date.Get(1), date.Get(2), date.Get(3), date.Get(4));
43 GetGame().ObjectDelete( m_Camera );
44 Class.CastTo(m_Camera,
g_Game.CreateObject(
"staticcamera", SnapToGround(position),
true));
46 Math3D.MatrixIdentity4(m_CameraTrans);
53 m_Camera.SetFocus(5.0, 0.0);
55 m_Camera.SetActive(
true);
57 Math3D.DirectionAndUpMatrix(
m_Target - SnapToGround(position),
"0 1 0", m_CameraTrans);
58 m_CameraTrans[3] = m_Camera.GetPosition();
59 m_CharacterPos =
Vector(0.685547, -0.988281, 3.68823).Multiply4(m_CameraTrans);
61 float pos_x = m_CharacterPos[0];
62 float pos_z = m_CharacterPos[2];
63 float pos_y =
GetGame().SurfaceY(pos_x, pos_z);
65 m_CharacterPos = ground_demo_pos;
67 vector to_cam_dir = m_Camera.GetPosition() - m_CharacterPos;
68 m_CharacterRot[0] =
Math.Atan2(to_cam_dir[0], to_cam_dir[2]) *
Math.RAD2DEG;
71 m_Weather =
g_Game.GetWeather();
72 m_Weather.GetOvercast().SetLimits( overcast, overcast );
73 m_Weather.GetRain().SetLimits( rain, rain );
74 m_Weather.GetFog().SetLimits( fog, fog );
76 m_Weather.GetOvercast().Set( overcast, 0, 0);
77 m_Weather.GetRain().Set( rain, 0, 0);
78 m_Weather.GetFog().Set( fog, 0, 0);
80 if ( storm.Count() == 3 )
82 m_Weather.SetStorm(storm.Get(0),storm.Get(1),storm.Get(2));
85 if ( windspeed != -1 )
87 m_Weather.SetWindSpeed(windspeed);
88 m_Weather.SetWindMaximumSpeed(windspeed);
89 m_Weather.SetWindFunctionParams(1,1,1);
92 m_Character =
new IntroSceneCharacter();
93 m_Character.LoadCharacterData(m_CharacterPos, m_CharacterRot);
109 IntroSceneCharacter GetIntroCharacter()
125 void ResetIntroCamera()
127 if ( GetIntroCharacter().GetCharacterObj() )
129 GetIntroCamera().LookAt( GetIntroCharacter().
GetPosition() +
Vector( 0, 1, 0 ) );
135 protected void SetInitPostprocesses()
137 PPERequesterBank.GetRequester(PPERequester_BurlapSackEffects).Stop();
140 protected void GetSelectedUserName()
146 BiosUser user = user_manager.GetSelectedUser();
149 g_Game.SetPlayerGameName( user.GetName() );
170 float pos_x = pos[0];
171 float pos_z = pos[2];
172 float pos_y =
GetGame().SurfaceY(pos_x, pos_z);
174 tmp_pos[1] = tmp_pos[1] + pos[1];