Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
cylindertrigger.c
Go to the documentation of this file.
1
3{
4 override void EOnInit(IEntity other, int extra)
5 {
6 SetCollisionCylinderTwoWay(1, -0.25, 0.25);
7 }
8
9#ifdef DIAG_DEVELOPER
10 override void DebugSendDmgTrigger()
11 {
12 vector minmax[2];
13 GetCollisionBox(minmax);
14
15 DebugTriggerInfo data = new DebugTriggerInfo(vector.Zero, vector.Zero, vector.Zero, vector.Zero, 0, "", null);
16 data.param1 = GetPosition();
17 data.param2 = GetOrientation();
18 data.param3 = minmax[0];
19 data.param4 = minmax[1];
20 data.param5 = GetCollisionRadius();
21 data.param6 = m_DebugAreaType;
22 data.param7 = m_insiders;
23
24 if (GetGame().IsMultiplayer() && GetGame().IsServer())
25 PluginDiagMenuServer.SendDataToSubscribersServer(this, ESubscriberSystems.TRIGGERS, ERPCs.DIAG_TRIGGER_DEBUG, data, false);
26 else if (!GetGame().IsMultiplayer() || m_Local)
27 DebugDmgTrigger(data.param1, data.param2, data.param3, data.param4, data.param5, data.param6, data.param7);
28 }
29
30 override protected Shape DrawDebugShape(vector pos, vector min, vector max, float radius, int color)
31 {
33 float triggerHeight = (max[1] - min[1]);
34
35 Shape dbgShape = Debug.DrawCylinder(pos, radius, triggerHeight, color, ShapeFlags.TRANSP|ShapeFlags.NOZWRITE|ShapeFlags.DOUBLESIDE);
36 dbgShape.SetPosition(pos);
37
38 dbgTargets.Insert(dbgShape);
39
40 return dbgShape;
41 }
42#endif
43}
void DrawDebugShape()
vector GetOrientation()
Trigger with cylinder shape.
Definition debug.c:2
Scripted Trigger.
ERPCs
Definition erpcs.c:2
proto native CGame GetGame()
ShapeFlags
Definition endebug.c:126
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead
class JsonUndergroundAreaTriggerData GetPosition