Dayz Explorer 1.28.160049
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 {
13 DbgUI.BeginCleanupScope();
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
31 DbgUI.EndCleanupScope();
32 }
33
36 {
37 float hitFraction;
38 vector start = GetGame().GetCurrentCameraPosition();
39 vector end = start + (GetGame().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}
Definition dbgui.c:60
Plugin interface for controlling of agent pool system.
Definition pluginbase.c:2
void Init(PlayerBase player)
EntityAI GetTargetEntity()
utilizes camera position from the CGame
void ShowDebug(bool show)
PhxInteractionLayers
Definition dayzphysics.c:2
DayZPlayer m_pPlayer
data
Definition dayzplayer.c:135
proto native CGame GetGame()