Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
plugintargettemperature.c
Go to the documentation of this file.
1
2class PluginTargetTemperature extends PluginBase
3{
5
6 void Init(PlayerBase player)
7 {
8 m_pPlayer = player;
9 }
10
11 void ShowDebug(bool show)
12 {
14
15 if (show && m_pPlayer)
16 {
18
19 DbgUI.Begin("Target Temperature", 10, 10);
20 DbgUI.Panel("", 150, 1);
21 if (ent)
22 {
23 DbgUI.Text("Entity: : " + ent.GetType());
24 DbgUI.Text("Temperature: " + ent.GetTemperature());
25 DbgUI.Text("Frozen State: " + ent.GetIsFrozen());
26 DbgUI.Text("Freeze/Thaw Progress: " + ent.GetFreezeThawProgress());
27 }
28 DbgUI.End();
29 }
30
32 }
33
36 {
37 float hitFraction;
38 vector start = g_Game.GetCurrentCameraPosition();
39 vector end = start + (g_Game.GetCurrentCameraDirection() * 5.0);
40
41 vector hitPos, hitNormal;
42 Object hitObj;
43
44 PhxInteractionLayers hitMask = 0xFFFFFFFFFF;
45
46 DayZPhysics.RayCastBullet(start, end, hitMask, m_pPlayer, hitObj, hitPos, hitNormal, hitFraction);
47
48 return EntityAI.Cast(hitObj);
49 }
50}
static proto bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
Definition dbgui.c:60
Class PluginMessageManager provides some basic Message Distribution mechanics, if you get instance of...
Definition pluginbase.c:2
void Init(PlayerBase player)
EntityAI GetTargetEntity()
utilizes camera position from the CGame
void ShowDebug(bool show)
DayZGame g_Game
Definition dayzgame.c:3942
PhxInteractionLayers
Definition dayzphysics.c:2
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto void BeginCleanupScope()
static proto native void Text(string label)
static proto native void EndCleanupScope()
static proto native void End()
static proto native void Panel(string label, int width, int height, int color=0xaa555555)