DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnUpdate() [1/2]

override void CGame::OnUpdate ( bool doSim,
float timeslice )
inlineprotected

См. определение в файле DayZGame.c строка 2891

2892 {
2893 m_DeltaTime = timeslice;
2894
2895 Mission mission = GetMission();
2896 bool gameIsRunning = false;
2897
2898 if (doSim && mission && !mission.IsPaused())
2899 {
2900 gameIsRunning = true;
2901 }
2902
2903 if (doSim && mission)
2904 {
2905 mission.OnUpdate(timeslice);
2906
2907 // update local weather effects
2908 if ( IsClient() || !IsMultiplayer() )
2909 {
2910 WorldData worldData = mission.GetWorldData();
2911 if ( worldData )
2912 worldData.UpdateWeatherEffects( GetWeather(), timeslice );
2913 }
2914 }
2915
2916 SEffectManager.OnUpdate(timeslice);
2917
2918 // queues and timers update
2921 GetTimerQueue(CALL_CATEGORY_SYSTEM).Tick(timeslice);
2922
2923 #ifndef NO_GUI
2924 if (m_IsConnecting)
2925 UpdateLoginQueue(timeslice);
2926
2927 if (m_loading && m_loading.IsLoading())
2928 {
2929 m_loading.OnUpdate(timeslice);
2930 }
2931 else if (m_LoginTimeScreen && m_LoginTimeScreen.IsStatic())
2932 {
2933 m_LoginTimeScreen.Update(timeslice);
2934 }
2935 else
2936 {
2939 GetTimerQueue(CALL_CATEGORY_GUI).Tick(timeslice);
2940 GetDragQueue().Tick();
2941 }
2942
2943 NotificationSystem.Update(timeslice);
2944 if (m_Notifications)
2945 {
2946 m_Notifications.Update(timeslice);
2947 }
2948
2949 #ifndef SERVER
2950 #ifdef DIAG_DEVELOPER
2951 if (GetGame().IsMultiplayer() && GetPlayer() && DiagMenu.GetBool(DiagMenuIDs.MISC_CONNECTION_STATS))
2952 {
2953 PlayerIdentity playerIdentity = GetPlayer().GetIdentity();
2954
2955 if (playerIdentity)
2956 {
2957 int pingAct = playerIdentity.GetPingAct();
2958 int pingAvg = playerIdentity.GetPingAvg();
2959
2960 float throttleInput = playerIdentity.GetInputThrottle();
2961 float throttleOutput = playerIdentity.GetOutputThrottle();
2962
2963 DrawPerformanceStats(pingAct, pingAvg, throttleInput, throttleOutput);
2964 }
2965 }
2966 #endif
2967 #endif
2968
2969 #endif
2970
2971 if (gameIsRunning)
2972 {
2975 GetTimerQueue(CALL_CATEGORY_GAMEPLAY).Tick(timeslice);
2976 }
2977 }
Mission mission
Определения DisplayStatus.c:28
DiagMenuIDs
Определения EDiagMenuIDs.c:2
void UpdateLoginQueue(float timeslice)
Определения DayZGame.c:1826
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
proto native bool IsMultiplayer()
override DragQueue GetDragQueue()
Определения DayZGame.c:1215
override ScriptInvoker GetUpdateQueue(int call_category)
Определения DayZGame.c:1192
bool m_IsConnecting
Определения DayZGame.c:944
float m_DeltaTime
Определения DayZGame.c:951
proto native DayZPlayer GetPlayer()
proto native Weather GetWeather()
Returns weather controller object.
ref NotificationUI m_Notifications
Определения DayZGame.c:907
proto native bool IsClient()
ref LoginTimeBase m_LoginTimeScreen
Определения DayZGame.c:912
override TimerQueue GetTimerQueue(int call_category)
Определения DayZGame.c:1210
proto native Mission GetMission()
ref LoadingScreen m_loading
Определения DayZGame.c:911
void OnUpdate(float timeslice)
Определения gameplay.c:704
WorldData GetWorldData()
Определения gameplay.c:743
bool IsPaused()
Определения gameplay.c:758
proto float GetOutputThrottle()
Throttling performed on output bandwidth since last update (percentage [0,1])
proto int GetPingAvg()
ping range estimation
proto float GetInputThrottle()
Throttling performed on input bandwidth since last update(percentage [0,1]) (unknown value on Server)
proto int GetPingAct()
ping range estimation
proto native void Tick(float timeslice)
executes calls on queue if their time is already elapsed, if 'repeat = false' call is removed from qu...
proto void Invoke(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)
invoke call on all inserted methods with given arguments
void UpdateWeatherEffects(Weather weather, float timeslice)
Updates local weather effects.
Определения WorldData.c:184
proto native CGame GetGame()
const int CALL_CATEGORY_GAMEPLAY
Определения tools.c:10
const int CALL_CATEGORY_GUI
Определения tools.c:9
const int CALL_CATEGORY_SYSTEM
Определения tools.c:8

Перекрестные ссылки CALL_CATEGORY_GAMEPLAY, CALL_CATEGORY_GUI, CALL_CATEGORY_SYSTEM, DiagMenu::GetBool(), GetCallQueue(), GetDragQueue(), GetGame(), PlayerIdentityBase::GetInputThrottle(), GetMission(), PlayerIdentityBase::GetOutputThrottle(), PlayerIdentityBase::GetPingAct(), PlayerIdentityBase::GetPingAvg(), GetPlayer(), GetTimerQueue(), GetUpdateQueue(), GetWeather(), ScriptInvoker::Invoke(), IsClient(), IsMultiplayer(), m_DeltaTime, m_IsConnecting, m_loading, m_LoginTimeScreen, m_Notifications, mission, SEffectManager::OnUpdate(), ScriptCallQueue::Tick(), NotificationSystem::Update(), UpdateLoginQueue() и WorldData::UpdateWeatherEffects().