DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Global/game.c
См. документацию.
1
4
5static int GAME_STORAGE_VERSION = 144;
6
7class CGame
8{
9 // enableDebugMonitor in server config
11
13
14 //Obsolete, port [Obsolete()] as well, maybe?
16
17 //analytics
21
22 #ifdef DIAG_DEVELOPER
23 ref array<ComponentEnergyManager> m_EnergyManagerArray;
24 void EnableEMPlugs(bool enable)
25 {
26 for (int i = 0; i < g_Game.m_EnergyManagerArray.Count(); ++i)
27 {
28 if (g_Game.m_EnergyManagerArray[i])
29 g_Game.m_EnergyManagerArray[i].SetDebugPlugs(enable);
30 }
31 }
32 #endif
33
34 void CGame()
35 {
36 Math.Randomize(-1);
37
39
41 m_ParamCache.Insert(null);
42
43 //analytics
46
47 //m_CharacterData = new MenuCharacrerData;
48
49 // actual script version - increase by one when you make changes
51
52 #ifdef DIAG_DEVELOPER
53 m_EnergyManagerArray = new array<ComponentEnergyManager>;
54 #endif
55
56 if (!IsDedicatedServer())
57 {
61 if (!IsMultiplayer())
62 {
64 }
65 }
66 else
67 {
69 }
70 }
71
72 private void ~CGame()
73 {
74 // Clean these up even if it is dedicated server, just to be safe
78
79 // Is initialized in StartupEvent
80 ParticleManager.CleanupInstance();
82 g_Game = null;
83 }
84
87
89
94 void OnEvent(EventType eventTypeId, Param params)
95 {
96 }
97
98 //PLM Type: 0 == RESUMED, 1 == SUSPENDED
99 void OnProcessLifetimeChanged(int plmtype)
100 {
101
102 }
103
105 {
106
107 }
108
113 {
114 }
115
120 {
121 }
122
127 {
128 }
129
134 {
135 return false;
136 }
137
142 {
143 }
144
150 void OnUpdate(bool doSim, float timeslice)
151 {
152 }
153
159 void OnPostUpdate(bool doSim, float timeslice)
160 {
161 }
162
167 void OnKeyPress(int key)
168 {
169 }
170
175 void OnKeyRelease(int key)
176 {
177 }
178
183 void OnMouseButtonPress(int button)
184 {
185 }
186
191 void OnMouseButtonRelease(int button)
192 {
193 }
194
199
204
211 void OnRPC(PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
212 {
213 }
214
218 proto native void RequestExit( int code );
219
223 proto native void RequestRestart(int code);
224
228 proto native bool IsAppActive();
229
233 proto bool GetHostAddress( out string address, out int port );
234
238 proto owned string GetHostName();
239
244
252 proto native int Connect( UIScriptedMenu parent , string IpAddress, int port, string password );
257 proto native int ConnectLastSession( UIScriptedMenu parent , int selectedCharacter = -1 );
261 proto native void DisconnectSession();
262
266 proto native void DisconnectSessionForce();
267
268 // profile functions
279 proto native void GetProfileStringList(string name, out TStringArray values);
280
287 proto bool GetProfileString(string name, out string value);
288
294 proto native void SetProfileStringList(string name, TStringArray values);
295
301 proto native void SetProfileString(string name, string value);
302
306 proto native void SaveProfile();
307
312 proto void GetPlayerName(out string name);
313
319 proto void GetPlayerNameShort(int maxLength, out string name);
320
325 proto native void SetPlayerName(string name);
326
332 proto native Entity CreatePlayer(PlayerIdentity identity, string name, vector pos, float radius, string spec);
333
340 proto native void SelectPlayer(PlayerIdentity identity, Object player);
341
349 proto void GetPlayerNetworkIDByIdentityID( int playerIdentityID, out int networkIdLowBits, out int networkIdHightBits );
350
356 proto native Object GetObjectByNetworkId( int networkIdLowBits, int networkIdHighBits );
357
363 proto native bool RegisterNetworkStaticObject(Object object);
364
371 proto native bool IsNetworkInputBufferFull();
372
379 proto native void SelectSpectator(PlayerIdentity identity, string spectatorObjType, vector position);
380
386
393 proto native void SendLogoutTime(Object player, int time);
394
399 proto native void DisconnectPlayer(PlayerIdentity identity, string uid = "");
400
406 proto native void AddToReconnectCache(PlayerIdentity identity);
407
413 proto native void RemoveFromReconnectCache(string uid);
414
419 proto native void ClearReconnectCache();
420
421
425 proto native void StorageVersion( int iVersion );
426
430 proto native int LoadVersion();
431
435 proto native int SaveVersion();
436
440 proto native float GetDayTime();
441
442 // config functions
449 proto bool ConfigGetText(string path, out string value);
450
458 proto bool ConfigGetTextRaw(string path, out string value);
459
465 string ConfigGetTextOut(string path)
466 {
467 string ret_s;
468 ConfigGetText(path, ret_s);
469 return ret_s;
470 }
471
477 bool FormatRawConfigStringKeys(inout string value)
478 {
479 int ret;
480 ret = value.Replace("$STR_","#STR_");
481 return ret > 0;
482 }
483
490 {
491 if ( class_name != "" )
492 {
493 string cfg = "CfgVehicles " + class_name + " model";
494 string model_path;
495 if ( g_Game.ConfigGetText(cfg, model_path) )
496 {
497 int to_substring_end = model_path.Length() - 4; // -4 to leave out the '.p3d' suffix
498 int to_substring_start = 0;
499
500 // Currently we have model path. To get the name out of it we need to parse this string from the end and stop at the first found '\' sign
501 for (int i = to_substring_end; i > 0; i--)
502 {
503 string sign = model_path.Get(i);
504 if ( sign == "\\" )
505 {
506 to_substring_start = i + 1;
507 break
508 }
509 }
510
511 string model_name = model_path.Substring(to_substring_start, to_substring_end - to_substring_start);
512 return model_name;
513 }
514 }
515
516 return "UNKNOWN_P3D_FILE";
517 }
518
524 proto native float ConfigGetFloat(string path);
525
526
532 proto native vector ConfigGetVector(string path);
533
539 proto native int ConfigGetInt(string path);
540
546 proto native int ConfigGetType(string path);
547
558 proto native void ConfigGetTextArray(string path, out TStringArray values);
559
571 proto native void ConfigGetTextArrayRaw(string path, out TStringArray values);
572
578 proto native void ConfigGetFloatArray(string path, out TFloatArray values);
579
585 proto native void ConfigGetIntArray(string path, out TIntArray values);
586
594 proto bool ConfigGetChildName(string path, int index, out string name);
595
602 proto bool ConfigGetBaseName(string path, out string base_name);
603
611 proto native int ConfigGetChildrenCount(string path);
612 proto native bool ConfigIsExisting(string path);
613
614 proto native void ConfigGetFullPath(string path, out TStringArray full_path);
615 proto native void ConfigGetObjectFullPath(Object obj, out TStringArray full_path);
616
617 proto native void GetModInfos(notnull out array<ref ModInfo> modArray);
618 proto native bool GetModToBeReported();
619
629 {
630 string return_path = "";
631 int count = array_path.Count();
632
633 for (int i = 0; i < count; i++)
634 {
635 return_path += array_path.Get(i);
636
637 if ( i < count - 1 )
638 {
639 return_path += " ";
640 }
641 }
642
643 return return_path;
644 }
645
661 proto bool CommandlineGetParam(string name, out string value);
662
663 proto native void CopyToClipboard(string text);
664 proto void CopyFromClipboard(out string text);
665
666 proto native void BeginOptionsVideo();
667 proto native void EndOptionsVideo();
668
669 proto native void AdminLog(string text);
670
671 // entity functions
678 proto native bool PreloadObject( string type, float distance );
679
680 proto native Object CreateStaticObjectUsingP3D(string p3dFilename, vector position, vector orientation, float scale = 1.0, bool createLocal = false, bool objSpawner = false);
681
691 proto native Object CreateObject( string type, vector pos, bool create_local = false, bool init_ai = false, bool create_physics = true, bool objSpawner = false);
692 proto native SoundOnVehicle CreateSoundOnObject(Object source, string sound_name, float distance, bool looped, bool create_local = false);
693 proto native SoundWaveOnVehicle CreateSoundWaveOnObject(Object source, SoundObject soundObject, AbstractWave soundWave);
694
703 proto native Object CreateObjectEx( string type, vector pos, int iFlags, int iRotation = RF_DEFAULT );
704
705 proto native void ObjectDelete( Object obj );
706 proto native void ObjectDeleteOnClient( Object obj );
707 proto native void RemoteObjectDelete( Object obj );
708 proto native void RemoteObjectTreeDelete( Object obj );
709 proto native void RemoteObjectCreate( Object obj );
710 proto native void RemoteObjectTreeCreate( Object obj );
711 proto native int ObjectRelease( Object obj );
712 proto void ObjectGetType( Object obj, out string type );
713 proto void ObjectGetDisplayName( Object obj, out string name );
714 proto native vector ObjectGetSelectionPosition(Object obj, string name);
718 proto native vector ObjectModelToWorld(Object obj, vector modelPos);
719 proto native vector ObjectWorldToModel(Object obj, vector worldPos);
721 proto native bool IsObjectAccesible(EntityAI item, Man player);
722
723#ifdef DIAG_DEVELOPER
724 proto native void ReloadShape(Object obj);
725#endif
726
727 // input
728 proto native Input GetInput();
729
730 // camera
733
734 // sound
736
737 // noise
739
740 // inventory
741 proto native bool AddInventoryJuncture(Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms, Managed userData = null);
742
743 bool AddInventoryJunctureEx(Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms, Managed userData = null)
744 {
745 bool result = AddInventoryJuncture(player, item, dst, test_dst_occupancy, timeout_ms/*10000000*/, userData);
746 #ifdef ENABLE_LOGGING
748 {
749 Debug.InventoryReservationLog("STS = " + player.GetSimulationTimeStamp() + " result: " + result + " item:" + item + " dst: " + InventoryLocation.DumpToStringNullSafe(dst), "n/a" , "n/a", "AddInventoryJuncture",player.ToString() );
750 }
751 #endif
752 //Print("Juncture - STS = " + player.GetSimulationTimeStamp() + " item:" + item + " dst: " + InventoryLocation.DumpToStringNullSafe(dst));
753 return result;
754 }
755
756 //Has inventory juncture for any player
757 proto native bool HasInventoryJunctureItem(notnull EntityAI item);
758 proto native bool HasInventoryJuncture(Man player, notnull EntityAI item);
759 proto native bool HasInventoryJunctureDestination(Man player, notnull InventoryLocation dst);
760 proto native bool AddActionJuncture(Man player, notnull EntityAI item, int timeout_ms, Managed userData = null);
761 proto native bool ExtendActionJuncture(Man player, notnull EntityAI item, int timeout_ms);
762 proto native bool ClearJuncture(Man player, notnull EntityAI item);
763
764 bool ClearJunctureEx(Man player, notnull EntityAI item)
765 {
766 #ifdef ENABLE_LOGGING
768 {
769 Debug.InventoryReservationLog("STS = " + player.GetSimulationTimeStamp()+ " item:" + item, "n/a" , "n/a", "ClearJuncture",player.ToString() );
770 }
771 #endif
772 return ClearJuncture( player, item);
773 }
774
775 // support
777 proto native bool ExecuteEnforceScript(string expression, string mainFnName);
779 proto native void DumpInstances(bool csvFormatting);
780
781 proto native bool ScriptTest();
783 proto native void GetDiagModeNames(out TStringArray diag_names);
785 proto native void SetDiagModeEnable(int diag_mode, bool enabled);
787 proto native bool GetDiagModeEnable(int diag_mode);
788
790 proto native void GetDiagDrawModeNames(out TStringArray diag_names);
792 proto native void SetDiagDrawMode(int diag_draw_mode);
794 proto native int GetDiagDrawMode();
795
797 proto native bool IsPhysicsExtrapolationEnabled();
798
802 [Obsolete("Use GizmoApi.GetCount")]
803 proto native int GizmoGetCount();
804
808 [Obsolete("Use GizmoApi.GetInstance")]
809 proto native Class GizmoGetInstance(int index);
810
814 [Obsolete("Use GizmoApi.GetTracker")]
815 proto native Managed GizmoGetTracker(int index);
816
820 [Obsolete("Use GizmoApi.FindByTracker")]
821 proto native int GizmoFindByTracker(Managed tracker);
822
826 [Obsolete("Use GizmoApi.Deselect")]
827 proto native void GizmoClear(int index);
828
832 [Obsolete("Use GizmoApi.DeselectAll")]
833 proto native void GizmoClearAll();
834
840 [Obsolete("Use GizmoApi.SelectObject")]
841 proto native void GizmoSelectObject(Object object);
842
850 [Obsolete("Use GizmoApi.SelectPhysics")]
851 proto native void GizmoSelectPhysics(Physics physics);
852
860 [Obsolete("Use GizmoApi.SelectUser")]
861 proto native void GizmoSelectUser(Managed instance);
862
867 proto native float GetFps();
868
873 proto native float GetLastFPS();
874
880 proto native float GetAvgFPS(int nFrames = 64);
881
887 proto native float GetMinFPS(int nFrames = 64);
888
894 proto native float GetMaxFPS(int nFrames = 64);
895
903 void GetFPSStats(out float min, out float max, out float avg, int nFrames = 64)
904 {
905 min = GetMinFPS(nFrames);
906 max = GetMaxFPS(nFrames);
907 avg = GetAvgFPS(nFrames);
908 }
909
914 proto native float GetTickTime();
915
916 proto void GetInventoryItemSize(InventoryItem item, out int width, out int height);
923 proto native void GetObjectsAtPosition(vector pos, float radius, out array<Object> objects, out array<CargoBase> proxyCargos);
930 proto native void GetObjectsAtPosition3D(vector pos, float radius, out array<Object> objects, out array<CargoBase> proxyCargos);
931 proto native World GetWorld();
932 proto void GetWorldName( out string world_name );
933
935 {
936 string world_name;
937 g_Game.GetWorldName(world_name);
938 return world_name;
939 }
940
941 proto void FormatString( string format, string params[], out string output);
942 proto void GetVersion( out string version );
943 proto native UIManager GetUIManager();
944 proto native DayZPlayer GetPlayer();
945 proto native void GetPlayers( out array<Man> players );
947 {
948 array<Man> players();
949 GetPlayers(players);
950 if (index >= players.Count())
951 return null;
952 return DayZPlayer.Cast(players[index]);
953 }
954
956 proto native void StoreLoginData(ParamsWriteContext ctx);
957
963 proto native vector GetScreenPos(vector world_pos);
965 proto native vector GetScreenPosRelative(vector world_pos);
966
968 proto native MenuData GetMenuData();
1011 proto native void RPC(Object target, int rpcType, notnull array<ref Param> params, bool guaranteed,PlayerIdentity recipient = null);
1013 proto native void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient = null);
1015 proto native void RPCSelf(Object target, int rpcType, notnull array<ref Param> params);
1016 proto native void RPCSelfSingleParam(Object target, int rpcType, Param param);
1017
1019 proto native void ProfilerStart(string name);
1021 proto native void ProfilerStop(string name);
1022
1023
1033 proto native void Chat(string text, string colorClass);
1034 proto native void ChatMP(Man recipient, string text, string colorClass);
1035 proto native void ChatPlayer(string text);
1041 proto native void MutePlayer(string muteUID, string playerUID, bool mute);
1042
1048 proto native void MuteAllPlayers(string listenerId, bool mute);
1049
1055 proto native void EnableVoN(Object player, bool enable);
1056
1063 proto native void SetVoiceEffect(Object player, int effect, bool enable);
1064
1069 proto native void SetVoiceLevel(int level);
1070
1074 proto native int GetVoiceLevel(Object player = null);
1075
1080 proto native void EnableMicCapture(bool enable);
1081
1085 proto native bool IsMicCapturing();
1086
1090 proto native bool IsInPartyChat();
1091
1092 // mission
1093 proto native Mission GetMission();
1094 proto native void SetMission(Mission mission);
1095
1096
1098 proto native void StartRandomCutscene(string world);
1100 proto native void PlayMission(string path);
1101
1103 proto protected native void CreateMission(string path);
1104 proto native void RestartMission();
1106 proto native void AbortMission();
1107 proto native void RespawnPlayer();
1108 proto native bool CanRespawnPlayer();
1109 proto native void SetLoginTimerFinished();
1110
1111 proto native void SetMainMenuWorld(string world);
1112 proto native owned string GetMainMenuWorld();
1113
1115 proto native void LogoutRequestTime();
1116 proto native void LogoutRequestCancel();
1117
1118 proto native bool IsMultiplayer();
1119 proto native bool IsClient();
1120 proto native bool IsServer();
1125 proto native bool IsDedicatedServer();
1126
1130 proto native bool IsHeadless();
1131
1136 proto native bool IsHeadlessOrDedicatedServer();
1137
1139 proto native int ServerConfigGetInt(string name);
1140
1141 // Internal build
1142 proto native bool IsDebug();
1143
1144//#ifdef PLATFORM_XBOX
1145 static bool IsDigitalCopy()
1146 {
1147 return OnlineServices.IsGameActive(false);
1148 }
1149//#endif
1150
1151 /*bool IsNewMenu()
1152 {
1153 return m_ParamNewMenu;
1154 }*/
1155
1157 {
1158 m_DebugMonitorEnabled = value;
1159 }
1160
1162 {
1163 return IsServer() && m_DebugMonitorEnabled;
1164 }
1165
1166 proto native void GetPlayerIndentities( out array<PlayerIdentity> identities );
1167
1171 proto SurfaceInfo GetSurfaceInfoOn(float x, float z, out float height);
1173 proto SurfaceInfo GetSurfaceInfoUnderObjectByBone(notnull Object object, int boneType);
1174
1175
1176 proto native float SurfaceY(float x, float z);
1177 proto native float SurfaceRoadY(float x, float z, RoadSurfaceDetection rsd = RoadSurfaceDetection.LEGACY);
1178 proto native float SurfaceRoadY3D(float x, float y, float z, RoadSurfaceDetection rsd);
1180 proto float SurfaceGetType(float x, float z, out string type);
1181
1183 proto float SurfaceGetType3D(float x, float y, float z, out string type);
1184 proto void SurfaceUnderObject(notnull Object object, out string type, out int liquidType);
1185 proto void SurfaceUnderObjectEx(notnull Object object, out string type, out string impact, out int liquidType);
1186 proto void SurfaceUnderObjectByBone(notnull Object object, int boneType, out string type, out int liquidType);
1187 proto native float SurfaceGetNoiseMultiplier(Object directHit, vector pos, int componentIndex);
1188 proto native vector SurfaceGetNormal(float x, float z);
1189 proto native float SurfaceGetSeaLevelMin();
1190 proto native float SurfaceGetSeaLevelMax();
1191 proto native float SurfaceGetSeaLevel();
1193 proto native float SurfaceGetSeaWaveMax();
1195 proto native float SurfaceGetSeaWaveCurrent();
1196 proto native bool SurfaceIsSea(float x, float z);
1197 proto native bool SurfaceIsPond(float x, float z);
1198 proto native float GetWaterDepth(vector posWS);
1200 proto native float GetWaterSurfaceHeightNoFakeWave(vector posWS);
1204 proto native bool SurfaceIsHole(float x, float z);
1205
1206 proto native void UpdatePathgraphRegion(vector regionMin, vector regionMax);
1207
1210 {
1211 float high = -9999999;
1212 float low = 99999999;
1213
1214 for (int i = 0; i < positions.Count(); i++)
1215 {
1216 vector pos = positions.Get(i);
1217 pos[1] = SurfaceRoadY( pos[0], pos[2]);
1218 float y = pos[1];
1219
1220 if ( y > high )
1221 high = y;
1222
1223 if ( y < low )
1224 low = y;
1225
1226 ;
1227 }
1228
1229 return high - low;
1230 }
1231
1234 {
1235 vector normal = g_Game.SurfaceGetNormal(x, z);
1236 vector angles = normal.VectorToAngles();
1237 angles[1] = angles[1]+270; // This fixes rotation of item so it stands vertically. Feel free to change, but fix existing use cases.
1238
1239 //Hack because setorientation and similar functions break and flip stuff upside down when using exactly this vector ¯\_(ツ)_/¯ (note: happens when surface is flat)
1240 if (angles == "0 540 0")
1241 angles = "0 0 0";
1242 return angles;
1243 }
1244
1246 bool IsSurfaceDigable(string surface)
1247 {
1248 return ConfigGetInt("CfgSurfaces " + surface + " isDigable");
1249 }
1250
1251 bool GetSurfaceDigPile(string surface, out string result)
1252 {
1253 return ConfigGetText("CfgSurfaces " + surface + " digPile", result);
1254 }
1255
1257 bool IsSurfaceFertile(string surface)
1258 {
1259 return ConfigGetInt("CfgSurfaces " + surface + " isFertile");
1260 }
1261
1262 int CorrectLiquidType(int liquidType)
1263 {
1264 if (liquidType == -1)
1265 return LIQUID_NONE;
1266
1267 if (liquidType == 0)
1268 return LIQUID_SALTWATER;
1269
1270 return liquidType;
1271 }
1272
1273 void SurfaceUnderObjectCorrectedLiquid(notnull Object object, out string type, out int liquidType)
1274 {
1275 SurfaceInfo surfaceInfo = GetSurfaceInfoUnderObject(object);
1276 type = surfaceInfo.GetSurfaceType();
1277 liquidType = CorrectLiquidType(surfaceInfo.GetLiquidType());
1278 }
1279 void SurfaceUnderObjectExCorrectedLiquid(notnull Object object, out string type, out string impact, out int liquidType)
1280 {
1281 SurfaceInfo surfaceInfo = GetSurfaceInfoUnderObject(object);
1282 type = surfaceInfo.GetSurfaceType();
1283 impact = surfaceInfo.GetImpact();
1284 liquidType = CorrectLiquidType(surfaceInfo.GetLiquidType());
1285 }
1286 void SurfaceUnderObjectByBoneCorrectedLiquid(notnull Object object, int boneType, out string type, out int liquidType)
1287 {
1288 SurfaceInfo surfaceInfo = GetSurfaceInfoUnderObjectByBone(object, boneType);
1289 type = surfaceInfo.GetSurfaceType();
1290 liquidType = CorrectLiquidType(surfaceInfo.GetLiquidType());
1291 }
1292
1294 {
1295 if ( object )
1296 {
1297 vector pos = object.GetPosition();
1298 vector min_max[2];
1299 float radius = object.ClippingInfo ( min_max );
1300 vector min = Vector ( pos[0] - radius, pos[1], pos[2] - radius );
1301 vector max = Vector ( pos[0] + radius, pos[1], pos[2] + radius );
1302 UpdatePathgraphRegion( min, max );
1303 }
1304 }
1305
1333 proto native bool IsBoxColliding(vector center, vector orientation, vector edgeLength, array<Object> excludeObjects, array<Object> collidedObjects = NULL);
1334
1365 proto native bool IsBoxCollidingGeometry(vector center, vector orientation, vector edgeLength, int iPrimaryType, int iSecondaryType, array<Object> excludeObjects, array<Object> collidedObjects = NULL);
1366
1367 proto native bool IsBoxCollidingGeometryProxy(notnull BoxCollidingParams params, array<Object> excludeObjects, array<ref BoxCollidingResult> collidedObjects = NULL);
1368
1370 proto native Weather GetWeather();
1371
1374
1376 proto native void SetEVUser(float value);
1377
1378 proto native void OverrideDOF(bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset);
1379
1380 proto native void AddPPMask(float ndcX, float ndcY, float ndcRadius, float ndcBlur);
1381
1382 proto native void ResetPPMask();
1383
1391 proto native void OverrideInventoryLights(vector diffuse, vector ambient, vector ground, vector dir);
1392
1398 proto native void NightVissionLightParams(float lightIntensityMul, float noiseIntensity);
1399
1400
1401 proto native void OpenURL(string url);
1402
1404 proto native void InitDamageEffects(Object effect);
1405
1406//-----------------------------------------------------------------------------
1407// persitence
1408//-----------------------------------------------------------------------------
1409
1412
1420 proto native EntityAI GetEntityByPersitentID( int b1, int b2, int b3, int b4 );
1421
1422//-----------------------------------------------------------------------------
1423
1436 bool IsKindOf(string cfg_class_name, string cfg_parent_name)
1437 {
1438 TStringArray full_path = new TStringArray;
1439
1440 ConfigGetFullPath("CfgVehicles " + cfg_class_name, full_path);
1441
1442 if (full_path.Count() == 0)
1443 {
1444 ConfigGetFullPath("CfgAmmo " + cfg_class_name, full_path);
1445 }
1446
1447 if (full_path.Count() == 0)
1448 {
1449 ConfigGetFullPath("CfgMagazines " + cfg_class_name, full_path);
1450 }
1451
1452 if (full_path.Count() == 0)
1453 {
1454 ConfigGetFullPath("cfgWeapons " + cfg_class_name, full_path);
1455 }
1456
1457 if (full_path.Count() == 0)
1458 {
1459 ConfigGetFullPath("CfgNonAIVehicles " + cfg_class_name, full_path);
1460 }
1461
1462 cfg_parent_name.ToLower();
1463 int nFullPath = full_path.Count();
1464 for (int i = 0; i < nFullPath; i++)
1465 {
1466 string tmp = full_path.Get(i);
1467 tmp.ToLower();
1468 if (tmp == cfg_parent_name)
1469 {
1470 return true;
1471 }
1472 }
1473
1474 return false;
1475 }
1476
1489 bool ObjectIsKindOf(Object object, string cfg_parent_name)
1490 {
1491 TStringArray full_path = new TStringArray;
1492 ConfigGetObjectFullPath(object, full_path);
1493
1494 cfg_parent_name.ToLower();
1495
1496 int nFullPath = full_path.Count();
1497 for (int i = 0; i < nFullPath; i++)
1498 {
1499 string tmp = full_path.Get(i);
1500 tmp.ToLower();
1501 if (tmp == cfg_parent_name)
1502 {
1503 return true;
1504 }
1505 }
1506
1507 return false;
1508 }
1509
1518 int ConfigFindClassIndex(string config_path, string searched_member)
1519 {
1520 int class_count = ConfigGetChildrenCount(config_path);
1521 for (int index = 0; index < class_count; index++)
1522 {
1523 string found_class = "";
1524 ConfigGetChildName(config_path, index, found_class);
1525 if (found_class == searched_member)
1526 {
1527 return index;
1528 }
1529 }
1530 return -1;
1531 }
1532
1534 proto int GetTime();
1535
1549 ScriptCallQueue GetCallQueue(int call_category) {}
1550
1551 ScriptInvoker GetUpdateQueue(int call_category) {}
1552
1553 ScriptInvoker GetPostUpdateQueue(int call_category) {}
1561 TimerQueue GetTimerQueue(int call_category) {}
1562
1566 DragQueue GetDragQueue() {}
1567
1570
1573
1576
1578 {
1579 }
1580
1582
1585
1588 {
1589 return (g_Game.GetMissionState() == DayZGame.MISSION_STATE_MAINMENU);
1590 }
1591
1593 {
1594 //Print("GetMenuDefaultCharacterData");
1595 //DumpStack();
1596 //if used on server, creates an empty container to be filled by received data
1597 if (!m_CharacterData)
1598 {
1600 if (fill_data && !g_Game.IsDedicatedServer())
1601 GetMenuData().RequestGetDefaultCharacterData(); //fills the structure
1602 }
1603 return m_CharacterData;
1604 }
1605
1606 //Analytics Manager
1611
1616
1617 /*
1618 Returns the value set in server config for the length of the exit button timeout after cancelling the previous logout attempt (consoles only)
1619 */
1621};
const int RF_DEFAULT
Определения CentralEconomy.c:66
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DayZGame g_Game
Определения DayZGame.c:4074
Mission mission
Определения DisplayStatus.c:28
vector position
Определения DustKickupEffects.c:20
vector orientation
Определения DustKickupEffects.c:21
static int GAME_STORAGE_VERSION
Определения Global/game.c:5
Icon x
Icon y
string path
Определения OptionSelectorMultistate.c:142
class OptionSelectorMultistate extends OptionSelector class_name
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Определения ParticleManager.c:88
Определения Sound.c:54
static void Cleanup()
Clean up the data.
Определения AmmoEffects.c:135
static void Init()
Initialize the containers: this is done this way, to have these not exist on server.
Определения AmmoEffects.c:128
Static data holder for certain ammo config values.
Определения AmmoEffects.c:7
Class that holds parameters to feed into CGame.IsBoxCollidingGeometryProxy.
proto native float SurfaceGetSeaWaveCurrent()
Get current sea wave height.
proto void ObjectGetDisplayName(Object obj, out string name)
proto native UIManager GetUIManager()
proto native vector GetScreenPosRelative(vector world_pos)
Transforms position in world to position in screen in percentage (0.0 - 1.0) as x,...
proto native bool IsHeadless()
Check whether the application is headless or not (applies to both server and headless roboclients or ...
proto native void ConfigGetTextArrayRaw(string path, out TStringArray values)
Get array of raw strings from config on path.
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native void GetObjectsAtPosition(vector pos, float radius, out array< Object > objects, out array< CargoBase > proxyCargos)
Returns list of all objects in circle "radius" around position "pos".
proto SurfaceInfo GetSurfaceInfoUnderObjectByBone(notnull Object object, int boneType)
proto GetServersResultRow GetHostData()
Gets the server data. (from client)
float GetHighestSurfaceYDifference(array< vector > positions)
Returns the largest height difference between the given positions.
Определения Global/game.c:1209
proto native void MuteAllPlayers(string listenerId, bool mute)
Mute all players for listenerId.
proto void SurfaceUnderObjectByBone(notnull Object object, int boneType, out string type, out int liquidType)
proto native void CopyToClipboard(string text)
void OnRPC(PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
Called after remote procedure call is recieved for this object.
Определения Global/game.c:211
proto native void ConfigGetFullPath(string path, out TStringArray full_path)
proto native int GetDiagDrawMode()
Gets current debug draw mode.
proto native void RestartMission()
proto native void RPCSelfSingleParam(Object target, int rpcType, Param param)
proto native float GetWaterSurfaceHeightNoFakeWave(vector posWS)
Get the nearest water or object surface under a point, ignoring land (without the fake wave that's on...
proto native void ResetPPMask()
proto native bool IsBoxCollidingGeometry(vector center, vector orientation, vector edgeLength, int iPrimaryType, int iSecondaryType, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
Finds all objects with geometry iType that are in choosen oriented bounding box (OBB)
proto native bool IsMicCapturing()
Returns whether mic is currently capturing audio from user.
proto native NoiseSystem GetNoiseSystem()
proto native bool HasInventoryJunctureDestination(Man player, notnull InventoryLocation dst)
proto native int LoadVersion()
Returns actual storage version - loading.
void SurfaceUnderObjectByBoneCorrectedLiquid(notnull Object object, int boneType, out string type, out int liquidType)
Определения Global/game.c:1286
proto native vector ConfigGetVector(string path)
Get vector value from config on path.
proto native bool IsInPartyChat()
Returns whether user is currently in a voice party (currently only supported on xbox)
proto void GetWorldName(out string world_name)
proto native float SurfaceY(float x, float z)
proto native float GetTickTime()
Returns current time from start of the game.
proto native float SurfaceGetSeaLevelMax()
proto native void GetObjectsAtPosition3D(vector pos, float radius, out array< Object > objects, out array< CargoBase > proxyCargos)
Returns list of all objects in sphere "radius" around position "pos".
proto void GetInventoryItemSize(InventoryItem item, out int width, out int height)
proto native void AddPPMask(float ndcX, float ndcY, float ndcRadius, float ndcBlur)
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native float SurfaceGetSeaLevel()
proto native void GetPlayers(out array< Man > players)
proto native void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
proto native void EnableVoN(Object player, bool enable)
Enable/disable VoN for target player.
proto native float GetWaterDepth(vector posWS)
proto native void GetPlayerIndentities(out array< PlayerIdentity > identities)
proto native WorkspaceWidget GetLoadingWorkspace()
proto owned string GetHostName()
Gets the server name. (from client)
void OnMouseButtonPress(int button)
Called when mouse button is pressed.
Определения Global/game.c:183
proto native int GizmoFindByTracker(Managed tracker)
proto native void PlayMission(string path)
Starts mission (equivalent for SQF playMission). You MUST use double slash \.
void OnPostUpdate(bool doSim, float timeslice)
Called on World update after simulation of entities.
Определения Global/game.c:159
proto native void GizmoClear(int index)
proto native void SetVoiceEffect(Object player, int effect, bool enable)
Enable/disable VoN effect (only on server)
proto native void SelectPlayer(PlayerIdentity identity, Object player)
Selects player's controlled object.
proto native void ProfilerStop(string name)
Use for profiling code from start to stop, they must match have same name, look wiki pages for more i...
void OnAfterCreate()
Called after creating of CGame instance.
Определения Global/game.c:112
string CreateDefaultPlayer()
returns class name of first valid survivor (TODO address confusing naming?)
Определения Global/game.c:1569
proto native void SetPlayerName(string name)
Sets current player name.
proto native void SetProfileString(string name, string value)
Sets string to profile variable.
proto native void AddToReconnectCache(PlayerIdentity identity)
Add player to reconnect cache to be able to rejoin character still existing in the world.
proto native World GetWorld()
void CGame()
Определения Global/game.c:34
string ConfigPathToString(TStringArray array_path)
Converts array of strings into single string.
Определения Global/game.c:628
proto native float GetAvgFPS(int nFrames=64)
Returns average framerate over last n frames.
proto native Object CreateStaticObjectUsingP3D(string p3dFilename, vector position, vector orientation, float scale=1.0, bool createLocal=false, bool objSpawner=false)
proto native void ConfigGetIntArray(string path, out TIntArray values)
Get array of integers from config on path.
proto native vector GetScreenPos(vector world_pos)
Transforms position in world to position in screen in pixels as x, y component of vector,...
proto native vector ObjectGetSelectionPositionMS(Object obj, string name)
proto native void BeginOptionsVideo()
proto native bool AddInventoryJuncture(Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms, Managed userData=null)
proto native vector GetWorldDirectionFromScreen(vector world_pos)
Transforms position in world to position in screen in pixels as x, y component of vector,...
proto native bool IsBoxCollidingGeometryProxy(notnull BoxCollidingParams params, array< Object > excludeObjects, array< ref BoxCollidingResult > collidedObjects=NULL)
proto native bool IsMultiplayer()
proto native void GizmoSelectObject(Object object)
string GetModelName(string class_name)
Get name of the p3d file of the given class name.
Определения Global/game.c:489
proto native float SurfaceRoadY(float x, float z, RoadSurfaceDetection rsd=RoadSurfaceDetection.LEGACY)
proto native float GetWaterSurfaceHeightWithFakeWave(vector posWS)
Get the nearest water or object surface under a point, ignoring land (with the fake wave that's on to...
proto native void MutePlayer(string muteUID, string playerUID, bool mute)
Mutes voice of source player to target player.
proto native void RequestRestart(int code)
Sets exit code and restart in the right moment.
DayZPlayer GetPlayerByIndex(int index=0)
Определения Global/game.c:946
proto native bool SurfaceIsSea(float x, float z)
proto native vector ObjectGetSelectionPositionWS(Object obj, string name)
DragQueue GetDragQueue()
Определения Global/game.c:1566
bool IsKindOf(string cfg_class_name, string cfg_parent_name)
Returns is class name inherited from parent class name.
Определения Global/game.c:1436
proto native int SaveVersion()
Returns actual storage version - saving.
proto bool GetHostAddress(out string address, out int port)
Gets the server address. (from client)
proto native SoundWaveOnVehicle CreateSoundWaveOnObject(Object source, SoundObject soundObject, AbstractWave soundWave)
proto native Entity CreatePlayer(PlayerIdentity identity, string name, vector pos, float radius, string spec)
Assign player entity to client (in multiplayer)
proto native void UpdateSpectatorPosition(vector position)
Updates spectator position on server = position of network bubble.
proto SurfaceInfo GetSurfaceInfoUnderObject(notnull Object object)
void OnKeyPress(int key)
Called when key is pressed.
Определения Global/game.c:167
void SetDebugMonitorEnabled(int value)
Определения Global/game.c:1156
proto native void GetProfileStringList(string name, out TStringArray values)
Gets array of strings from profile variable.
ref array< ref Param > m_ParamCache
Определения Global/game.c:15
proto native void SelectSpectator(PlayerIdentity identity, string spectatorObjType, vector position)
Creates spectator object (mostly cameras)
proto native BiosUserManager GetUserManager()
proto native void DumpInstances(bool csvFormatting)
Delevoper only: Dump all script allocations.
proto native bool IsDebug()
proto native void ConfigGetObjectFullPath(Object obj, out TStringArray full_path)
string ConfigGetTextOut(string path)
Get string value from config on path.
Определения Global/game.c:465
proto native float SurfaceGetSeaWaveMax()
Get max sea wave height.
proto native float GetMinFPS(int nFrames=64)
Returns minimum framerate over last n frames.
bool IsSurfaceFertile(string surface)
Checks if the surface is fertile.
Определения Global/game.c:1257
proto native void GetDiagModeNames(out TStringArray diag_names)
Get list of all debug modes.
ScriptCallQueue GetCallQueue(int call_category)
Определения Global/game.c:1549
proto native void GetModInfos(notnull out array< ref ModInfo > modArray)
proto bool ConfigGetTextRaw(string path, out string value)
Get raw string value from config on path.
int CorrectLiquidType(int liquidType)
Определения Global/game.c:1262
proto native bool GetModToBeReported()
proto native vector SurfaceGetNormal(float x, float z)
proto native void SetMainMenuWorld(string world)
proto native bool IsBoxColliding(vector center, vector orientation, vector edgeLength, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
Finds all objects that are in choosen oriented bounding box (OBB)
proto native void RequestExit(int code)
Sets exit code and quits in the right moment.
void OnLicenseChanged()
Определения Global/game.c:104
proto native Class GizmoGetInstance(int index)
proto native bool IsNetworkInputBufferFull()
Returns the state of the buffer for network inputs (UAInterface)
proto float SurfaceGetType3D(float x, float y, float z, out string type)
Y input: Maximum Y to trace down from; Returns: Y position the surface was found.
bool ClearJunctureEx(Man player, notnull EntityAI item)
Определения Global/game.c:764
proto native vector GetPointerDirection()
Returns the direction where the mouse points, from the camera view.
bool ObjectIsKindOf(Object object, string cfg_parent_name)
Returns is object inherited from parent class name.
Определения Global/game.c:1489
proto native void ClearReconnectCache()
Remove all player from reconnect cache.
bool FormatRawConfigStringKeys(inout string value)
Changes localization key format to script-friendly format.
Определения Global/game.c:477
proto native MenuData GetMenuData()
Return singleton of MenuData class - at main menu contains characters played with current profile.
proto native bool ConfigIsExisting(string path)
proto native bool AddActionJuncture(Man player, notnull EntityAI item, int timeout_ms, Managed userData=null)
proto native AbstractSoundScene GetSoundScene()
proto SurfaceInfo GetSurfaceInfoOn(float x, float z, out float height)
Direct SurfaceInfo access.
proto native void ChatMP(Man recipient, string text, string colorClass)
proto native vector ObjectGetSelectionPositionLS(Object obj, string name)
proto native void RemoteObjectTreeDelete(Object obj)
RemoteObjectDelete - deletes only remote object (unregisters from network). do not use if not sure wh...
proto native void UpdatePathgraphRegion(vector regionMin, vector regionMax)
void OnProcessLifetimeChanged(int plmtype)
Определения Global/game.c:99
proto native void InitDamageEffects(Object effect)
Initialization of damage effects.
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native bool IsServer()
proto native void DisconnectPlayer(PlayerIdentity identity, string uid="")
Destroy player info and disconnect.
proto native void SetMission(Mission mission)
void OnActivateMessage()
Called when recieving focus (windows)
Определения Global/game.c:119
bool IsSurfaceDigable(string surface)
Checks if the surface is digable.
Определения Global/game.c:1246
UIScriptedMenu CreateScriptedMenu(int id)
create custom main menu part (submenu)
Определения Global/game.c:198
proto native void ObjectDeleteOnClient(Object obj)
proto bool ConfigGetBaseName(string path, out string base_name)
Get name of base class of config class on path.
proto native bool RegisterNetworkStaticObject(Object object)
Static objects cannot be replicated by default (there are too many objects on the map)....
void UpdatePathgraphRegionByObject(Object object)
Определения Global/game.c:1293
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
proto native bool IsPhysicsExtrapolationEnabled()
If physics extrapolation is enabled, always true on retail release builds.
proto native bool ClearJuncture(Man player, notnull EntityAI item)
proto void FormatString(string format, string params[], out string output)
proto native void AdminLog(string text)
proto native int GetVoiceLevel(Object player=null)
Get voice level of VoN (on both client and server) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1,...
bool IsDebugMonitor()
Определения Global/game.c:1161
bool IsMissionMainMenu()
Returns true when current mission is Main Menu.
Определения Global/game.c:1587
proto float SurfaceGetType(float x, float z, out string type)
Returns: Y position the surface was found.
proto native void OverrideInventoryLights(vector diffuse, vector ambient, vector ground, vector dir)
proto native void LogoutRequestTime()
Logout methods.
proto native bool SurfaceIsPond(float x, float z)
proto native void LogoutRequestCancel()
proto native float GetLastFPS()
Returns current framerate.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
void DayZGame()
Определения DayZGame.c:1016
proto bool GetProfileString(string name, out string value)
Gets string from profile variable.
proto native float SurfaceGetSeaLevelMin()
proto native bool HasInventoryJuncture(Man player, notnull EntityAI item)
proto native void Chat(string text, string colorClass)
Prints text into game chat.
void ~CGame()
Определения Global/game.c:72
int m_DebugMonitorEnabled
Определения Global/game.c:10
proto native float GetMaxFPS(int nFrames=64)
Returns maximum framerate over last n frames.
ScriptInvoker GetUpdateQueue(int call_category)
Определения Global/game.c:1551
proto native float GetFps()
Returns average FPS of last 16 frames.
void OnEvent(EventType eventTypeId, Param params)
Called when some system event occur.
Определения Global/game.c:94
proto native owned string GetMainMenuWorld()
proto native bool ScriptTest()
proto native void RPC(Object target, int rpcType, notnull array< ref Param > params, bool guaranteed, PlayerIdentity recipient=null)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...
proto native DayZPlayer GetPlayer()
proto native void StorageVersion(int iVersion)
Set actual storage version - for next save.
proto native void ProfilerStart(string name)
Use for profiling code from start to stop, they must match have same name, look wiki pages for more i...
proto native WorkspaceWidget GetWorkspace()
UIScriptedWindow CreateScriptedWindow(int id)
create custom window part
Определения Global/game.c:203
proto native void RemoteObjectDelete(Object obj)
bool IsInventoryOpen()
Определения Global/game.c:1577
proto native void EndOptionsVideo()
proto native void GizmoSelectPhysics(Physics physics)
void GetFPSStats(out float min, out float max, out float avg, int nFrames=64)
Outputs framerate statistics.
Определения Global/game.c:903
proto native void GizmoSelectUser(Managed instance)
proto native void OverrideDOF(bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset)
proto native void SendLogoutTime(Object player, int time)
Inform client about logout time (creates logout screen on specified client)
AnalyticsManagerServer GetAnalyticsServer()
Определения Global/game.c:1607
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
proto native void SaveProfile()
Saves profile on disk.
proto native Weather GetWeather()
Returns weather controller object.
proto native bool GetSurface(SurfaceDetectionParameters params, SurfaceDetectionResult result)
API for surface detection.
proto native void EnableMicCapture(bool enable)
Enable microphone to locally capture audio from user. Audio heard does NOT automatically get transmit...
TimerQueue GetTimerQueue(int call_category)
Определения Global/game.c:1561
proto native bool IsDedicatedServer()
Robust check which is preferred than the above, as it is valid much sooner.
bool GetSurfaceDigPile(string surface, out string result)
Определения Global/game.c:1251
proto native bool IsAppActive()
Returns if the application is focused on PC, returns true always on console.
proto native vector GetCurrentCameraPosition()
void OnKeyRelease(int key)
Called when key is released.
Определения Global/game.c:175
proto native bool IsObjectAccesible(EntityAI item, Man player)
returns true if player can access item's cargo/attachments (check only distance)
proto void GetPlayerNameShort(int maxLength, out string name)
Gets current player name. If length of player name is grater than maxLength, then it is omitted and a...
proto native float SurfaceRoadY3D(float x, float y, float z, RoadSurfaceDetection rsd)
proto int GetTime()
returns mission time in milliseconds
proto native bool IsHeadlessOrDedicatedServer()
Check whether the application is headless or a dedicated server (it combines IsDedicatedServer and Is...
bool OnInitialize()
Called once before game update loop starts, ret value indicates if init was done in scripts,...
Определения Global/game.c:133
proto native void SetVoiceLevel(int level)
Set voice level of VoN (only on client) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1,...
proto native void NightVissionLightParams(float lightIntensityMul, float noiseIntensity)
proto native bool IsClient()
proto native int ObjectRelease(Object obj)
RemoteObjectTreeCreate - postponed registration of network object tree (and creation of remote object...
proto native int ConfigGetType(string path)
Returns type of config value.
proto native vector ObjectWorldToModel(Object obj, vector worldPos)
proto void SurfaceUnderObject(notnull Object object, out string type, out int liquidType)
ScriptModule GameScript
Определения Global/game.c:12
proto native void SetDiagModeEnable(int diag_mode, bool enabled)
Set specific debug mode.
proto native void RespawnPlayer()
vector GetSurfaceOrientation(float x, float z)
Returns tilt of the ground on the given position in degrees, so you can use this value to rotate any ...
Определения Global/game.c:1233
proto native int Connect(UIScriptedMenu parent, string IpAddress, int port, string password)
Connects to IsServer.
proto native void SetProfileStringList(string name, TStringArray values)
Sets array of strings to profile variable.
proto native void RemoveFromReconnectCache(string uid)
Remove player from reconnect cache.
native void CreateMission(string path)
Create only enforce script mission, used for mission script reloading.
proto native void DisconnectSessionForce()
Forces disconnect from current multiplayer session even if not yet in the game.
proto native bool SurfaceIsHole(float x, float z)
Returns whether tile at provided world coordinates is a hole.
proto native Object CreateObject(string type, vector pos, bool create_local=false, bool init_ai=false, bool create_physics=true, bool objSpawner=false)
Creates object of certain type.
AnalyticsManagerClient GetAnalyticsClient()
Определения Global/game.c:1612
void SurfaceUnderObjectCorrectedLiquid(notnull Object object, out string type, out int liquidType)
Определения Global/game.c:1273
proto native int ConnectLastSession(UIScriptedMenu parent, int selectedCharacter=-1)
Connects to last success network session.
proto native void RemoteObjectTreeCreate(Object obj)
RemoteObjectCreate - postponed registration of network object (and creation of remote object)....
proto native void SetDiagDrawMode(int diag_draw_mode)
Set debug draw mode.
void OnDeactivateMessage()
Called when loosing focus (windows)
Определения Global/game.c:126
proto native float SurfaceGetNoiseMultiplier(Object directHit, vector pos, int componentIndex)
proto void GetPlayerName(out string name)
Gets current player name.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
ref AnalyticsManagerServer m_AnalyticsManagerServer
Определения Global/game.c:18
proto native vector GetCurrentCameraDirection()
proto void GetVersion(out string version)
proto native void GizmoClearAll()
string GetWorldName()
Определения Global/game.c:934
proto native bool ExecuteEnforceScript(string expression, string mainFnName)
Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script ...
void OnUpdate(bool doSim, float timeslice)
Called on World update.
Определения Global/game.c:150
proto native bool HasInventoryJunctureItem(notnull EntityAI item)
proto native EntityAI GetEntityByPersitentID(int b1, int b2, int b3, int b4)
proto native void OpenURL(string url)
proto native BunkerBroadcastManager GetBunkerBroadcastManager()
Returns bunker broadcast manager object.
proto bool CommandlineGetParam(string name, out string value)
Get command line parameter value.
proto native int GetLogoutAfterCancelTimeout()
string CreateRandomPlayer()
returns class name of random survivor (TODO address confusing naming?)
Определения Global/game.c:1572
static bool IsDigitalCopy()
Определения Global/game.c:1145
proto native void ConfigGetFloatArray(string path, out TFloatArray values)
Get array of floats from config on path.
void OnDeviceReset()
Called when inputs is not possible (Steam overlay active or something), all internal script variables...
Определения Global/game.c:141
void OnMouseButtonRelease(int button)
Called when mouse button is released.
Определения Global/game.c:191
bool AddInventoryJunctureEx(Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms, Managed userData=null)
Определения Global/game.c:743
proto native float GetDayTime()
Returns current daytime on server.
proto void CopyFromClipboard(out string text)
proto native void SetLoginTimerFinished()
int ConfigFindClassIndex(string config_path, string searched_member)
Определения Global/game.c:1518
proto native void SetEVUser(float value)
Sets custom camera camera EV. range: -50.0..50.0? //TODO.
proto native bool PreloadObject(string type, float distance)
Preload objects with certain type in certain distance from camera.
ref AnalyticsManagerClient m_AnalyticsManagerClient
Определения Global/game.c:19
void SurfaceUnderObjectExCorrectedLiquid(notnull Object object, out string type, out string impact, out int liquidType)
Определения Global/game.c:1279
proto native void AbortMission()
Returns to main menu, leave world empty for using last mission world.
proto native int ServerConfigGetInt(string name)
Server config parsing. Returns 0 if not found.
proto native SoundOnVehicle CreateSoundOnObject(Object source, string sound_name, float distance, bool looped, bool create_local=false)
proto void SurfaceUnderObjectEx(notnull Object object, out string type, out string impact, out int liquidType)
proto native void ChatPlayer(string text)
proto native int GizmoGetCount()
proto native vector ObjectGetSelectionPosition(Object obj, string name)
proto native bool GetDiagModeEnable(int diag_mode)
Gets state of specific debug mode.
proto void GetPlayerNetworkIDByIdentityID(int playerIdentityID, out int networkIdLowBits, out int networkIdHightBits)
returns player's network id from identity id in out parameters
proto native Input GetInput()
proto native ContentDLC GetContentDLCService()
Return DLC service (service for entitlement keys for unlock content)
proto native void StartRandomCutscene(string world)
Starts intro.
proto native bool ExtendActionJuncture(Man player, notnull EntityAI item, int timeout_ms)
ScriptInvoker GetPostUpdateQueue(int call_category)
Определения Global/game.c:1553
proto native Mission GetMission()
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
Определения Global/game.c:1592
TStringArray ListAvailableCharacters()
outputs array of all valid survivor class names
Определения Global/game.c:1575
proto native Object GetObjectByNetworkId(int networkIdLowBits, int networkIdHighBits)
Returns entity identified by network id.
proto native bool CanRespawnPlayer()
proto native void DisconnectSession()
Disconnects from current multiplayer session.
proto native void ObjectDelete(Object obj)
proto native void RemoteObjectCreate(Object obj)
RemoteObjectDelete - deletes only remote object tree (unregisters from network). do not use if not su...
proto void ObjectGetType(Object obj, out string type)
proto native vector ObjectModelToWorld(Object obj, vector modelPos)
proto native void RPCSelf(Object target, int rpcType, notnull array< ref Param > params)
Not actually an RPC, as it will send it only to yourself.
proto native void GetDiagDrawModeNames(out TStringArray diag_names)
Get list of all debug draw modes.
ref MenuDefaultCharacterData m_CharacterData
Определения Global/game.c:20
proto native Managed GizmoGetTracker(int index)
proto native void StoreLoginData(ParamsWriteContext ctx)
Stores login userdata as parameters which are sent to server.
Определения DayZGame.c:909
Super root of all classes in Enforce script.
Определения EnScript.c:11
ContentDLC is for query installed DLC (only as entitlement keys, not content)
Определения ContentDLC.c:19
Определения DayZPlayerImplement.c:87
static void InventoryReservationLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Определения 3_Game/DayZ/tools/Debug.c:203
Определения 3_Game/DayZ/tools/Debug.c:2
static void CleanupInstance()
Определения DustKickupEffects.c:82
Определения Camera.c:2
GetServersResultRow the output structure of the GetServers operation that represents one game server.
Определения BiosLobbyService.c:171
Определения input.c:11
Определения Feet.c:1
static string DumpToStringNullSafe(InventoryLocation loc)
Определения InventoryLocation.c:233
InventoryLocation.
Определения InventoryLocation.c:30
static void Init()
Определения 3_Game/DayZ/tools/Debug.c:718
static bool IsInventoryReservationLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:769
TODO doc.
Определения EnScript.c:118
Определения EnMath.c:7
proto bool RequestGetDefaultCharacterData()
Определения gameplay.c:917
Mission class.
Определения gameplay.c:686
Определения Noise.c:2
Определения ObjectTyped.c:2
static bool IsGameActive(bool sim)
Определения OnlineServices.c:719
Определения OnlineServices.c:2
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
Определения Physics.c:17
The class that will be instanced (moddable)
Определения gameplay.c:389
static void Cleanup()
Cleanup method to properly clean up the static data.
Определения EffectManager.c:527
static void InitServer()
Определения EffectManager.c:517
static void Init()
Initialize the containers.
Определения EffectManager.c:507
Manager class for managing Effect (EffectParticle, EffectSound)
Определения EffectManager.c:6
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
Определения 2_GameLib/DayZ/tools.c:53
ScriptInvoker Class provide list of callbacks usage:
Определения 2_GameLib/DayZ/tools.c:116
Module containing compiled scripts.
Определения EnScript.c:131
Определения Sound.c:112
proto int GetLiquidType()
See 'LiquidTypes' in 'constants.c'.
proto string GetImpact()
proto string GetSurfaceType()
Определения SurfaceInfo.c:9
Определения UIManager.c:2
Определения DayZGame.c:64
static void CleanupInstance()
Uninitializes VONManager, runs when user disconnects from server.
Определения VONManager.c:326
static void Init()
Initializes VONManager, runs when user first connects to a server.
Определения VONManager.c:317
Manager class which handles Voice-over-network functionality while player is connected to a server.
Определения VONManager.c:302
Определения Weather.c:168
Определения EnWidgets.c:177
Определения World.c:2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
Определения EnConvert.c:119
Serializer ParamsReadContext
Определения gameplay.c:15
Serializer ParamsWriteContext
Определения gameplay.c:16
array< float > TFloatArray
Определения EnScript.c:732
array< int > TIntArray
Определения EnScript.c:733
class array< Class T > TStringArray
void Obsolete(string msg="")
Определения EnScript.c:371
const int LIQUID_NONE
Определения 3_Game/DayZ/constants.c:566
const int LIQUID_SALTWATER
Определения 3_Game/DayZ/constants.c:587
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto int Randomize(int seed)
Sets the seed for the random number generator.
void AbstractWave()
Определения Sound.c:167
proto native int Length()
Returns length of string.
proto string Get(int index)
Gets n-th character from string.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto int ToLower()
Changes string to lowercase. Returns length.
TypeID EventType
Определения EnWidgets.c:55