Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
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 =
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
}
DayZPhysics
Definition
dayzphysics.c:124
DayZPhysics::RayCastBullet
static proto bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
DbgUI
Definition
dbgui.c:60
EntityAI
Definition
inventoryitem.c:2
Object
Definition
objecttyped.c:2
PlayerBase
Definition
playerbaseclient.c:2
PluginBase
Class PluginMessageManager provides some basic Message Distribution mechanics, if you get instance of...
Definition
pluginbase.c:2
PluginBase::Init
void Init(PlayerBase player)
Definition
plugintargettemperature.c:6
PluginBase::GetTargetEntity
EntityAI GetTargetEntity()
utilizes camera position from the CGame
Definition
plugintargettemperature.c:35
PluginBase::m_pPlayer
PlayerBase m_pPlayer
Definition
plugintargettemperature.c:4
PluginBase::ShowDebug
void ShowDebug(bool show)
Definition
plugintargettemperature.c:11
vector
Definition
enconvert.c:119
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
PhxInteractionLayers
PhxInteractionLayers
Definition
dayzphysics.c:2
DbgUI::Begin
static proto native void Begin(string windowTitle, float x=0, float y=0)
DbgUI::BeginCleanupScope
static proto void BeginCleanupScope()
DbgUI::Text
static proto native void Text(string label)
DbgUI::EndCleanupScope
static proto native void EndCleanupScope()
DbgUI::End
static proto native void End()
DbgUI::Panel
static proto native void Panel(string label, int width, int height, int color=0xaa555555)
Games
Dayz
scripts
4_world
plugins
pluginbase
plugindeveloper
plugintargettemperature.c
Generated by
1.17.0