Dayz Explorer
1.28.160049
Loading...
Searching...
No Matches
plugintargettemperature.c
Go to the documentation of this file.
1
2
class
PluginTargetTemperature
extends
PluginBase
3
{
4
protected
PlayerBase
m_pPlayer
;
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
{
17
EntityAI
ent =
GetTargetEntity
();
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
35
EntityAI
GetTargetEntity
()
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
}
DayZPhysics
Definition
dayzphysics.c:124
DbgUI
Definition
dbgui.c:60
EntityAI
Definition
building.c:6
Object
Definition
objecttyped.c:2
PlayerBase
Definition
playerbaseclient.c:2
PluginBase
Plugin interface for controlling of agent pool system.
Definition
pluginbase.c:2
PluginBase::Init
void Init(PlayerBase player)
Definition
plugintargettemperature.c:6
PluginBase::m_pPlayer
PlayerBase m_pPlayer
Definition
plugintargettemperature.c:4
PluginBase::GetTargetEntity
EntityAI GetTargetEntity()
utilizes camera position from the CGame
Definition
plugintargettemperature.c:35
PluginBase::ShowDebug
void ShowDebug(bool show)
Definition
plugintargettemperature.c:11
vector
Definition
enconvert.c:106
PhxInteractionLayers
PhxInteractionLayers
Definition
dayzphysics.c:2
m_pPlayer
DayZPlayer m_pPlayer
data
Definition
dayzplayer.c:135
GetGame
proto native CGame GetGame()
Daten
4_world
plugins
pluginbase
plugindeveloper
plugintargettemperature.c
Generated by
1.12.0