DayZ 1.24
Loading...
Searching...
No Matches
LargeTent.c File Reference

Go to the source code of this file.

Enumerations

enum  SoundTypeTent { REPACK = 1 , NONE = 0 }
 

Functions

void LargeTent ()
 
void ~LargeTent ()
 
override void OnRPC (PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
 
void PlayRepackingLoopSound ()
 
void StopRepackingLoopSound ()
 
override void EEInit ()
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override string GetSoundOpen ()
 
override string GetSoundClose ()
 
override string GetSoundOpenWindow ()
 
override string GetSoundCloseWindow ()
 
override bool HasClutterCutter ()
 
override string GetClutterCutter ()
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 
override void SetActions ()
 

Variables

enum SoundTypeTent m_RepackingLoopSound
 

Enumeration Type Documentation

◆ SoundTypeTent

Enumerator
REPACK 
NONE 

Definition at line 1 of file LargeTent.c.

2{
3 REPACK = 1,
4 NONE = 0,
5}
@ REPACK
Definition LargeTent.c:3
@ NONE
Definition LargeTent.c:4

Function Documentation

◆ EEInit()

override void EEInit ( )

Definition at line 78 of file LargeTent.c.

79 {
80 super.EEInit();
81 }

◆ GetClutterCutter()

override string GetClutterCutter ( )

Definition at line 113 of file LargeTent.c.

114 {
115 return "LargeTentClutterCutter";
116 }

◆ GetDeploySoundset()

override string GetDeploySoundset ( )

Definition at line 138 of file LargeTent.c.

139 {
140 return "placeLargeTent_SoundSet";
141 }

◆ GetLoopDeploySoundset()

override string GetLoopDeploySoundset ( )

Definition at line 143 of file LargeTent.c.

144 {
145 return "largetent_deploy_SoundSet";
146 }

◆ GetSoundClose()

override string GetSoundClose ( )

Definition at line 93 of file LargeTent.c.

94 {
95 return "LargeTent_Door_Close_SoundSet";
96 }

◆ GetSoundCloseWindow()

override string GetSoundCloseWindow ( )

Definition at line 103 of file LargeTent.c.

104 {
105 return "LargeTent_Window_Close_SoundSet";
106 }

◆ GetSoundOpen()

override string GetSoundOpen ( )

Definition at line 88 of file LargeTent.c.

89 {
90 return "LargeTent_Door_Open_SoundSet";
91 }

◆ GetSoundOpenWindow()

override string GetSoundOpenWindow ( )

Definition at line 98 of file LargeTent.c.

99 {
100 return "LargeTent_Window_Open_SoundSet";
101 }

◆ HasClutterCutter()

override bool HasClutterCutter ( )

Definition at line 108 of file LargeTent.c.

109 {
110 return true;
111 }

◆ LargeTent()

void LargeTent ( )

Definition at line 11 of file LargeTent.c.

12 {
13 m_ToggleAnimations.Insert(new ToggleAnimations("EntranceO", "EntranceC", OPENING_0), 0);
14 m_ToggleAnimations.Insert(new ToggleAnimations("Window1O", "Window1C", OPENING_1), 0);
15 m_ToggleAnimations.Insert(new ToggleAnimations("Window2O", "Window2C", OPENING_2), 0);
16 m_ToggleAnimations.Insert(new ToggleAnimations("Window3O", "Window3C", OPENING_3), 0);
17 m_ToggleAnimations.Insert(new ToggleAnimations("Window4O", "Window4C", OPENING_4), 0);
18 m_ToggleAnimations.Insert(new ToggleAnimations("Window5O", "Window5C", OPENING_5), 0);
19 m_ToggleAnimations.Insert(new ToggleAnimations("Window6O", "Window6C", OPENING_6), 0);
20 m_ToggleAnimations.Insert(new ToggleAnimations("Window7O", "Window7C", OPENING_7), 0);
21
22 m_ShowAnimationsWhenPitched.Insert("Body");
23 /*m_ShowAnimationsWhenPitched.Insert( "EntranceO" );
24 m_ShowAnimationsWhenPitched.Insert( "Window1O" );
25 m_ShowAnimationsWhenPitched.Insert( "Window2O" );
26 m_ShowAnimationsWhenPitched.Insert( "Window3O" );
27 m_ShowAnimationsWhenPitched.Insert( "Window4O" );
28 m_ShowAnimationsWhenPitched.Insert( "Window5O" );
29 m_ShowAnimationsWhenPitched.Insert( "Window6O" );
30 m_ShowAnimationsWhenPitched.Insert( "Window7O" );*/
31 m_ShowAnimationsWhenPitched.Insert("Pack");
32
33 m_ShowAnimationsWhenPacked.Insert("Inventory");
34
35 m_HalfExtents = Vector(2.2, 0.3, 1.9);
36 }
Container_Base m_HalfExtents
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

References m_HalfExtents, and Vector().

◆ OnItemLocationChanged()

override void OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )

Definition at line 83 of file LargeTent.c.

84 {
85 super.OnItemLocationChanged(old_owner, new_owner);
86 }

◆ OnPlacementComplete()

override void OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )

Definition at line 122 of file LargeTent.c.

123 {
124 super.OnPlacementComplete(player, position, orientation);
125
127
128 if (GetGame().IsServer())
129 {
130 if (!m_ClutterCutter)
131 {
132 m_ClutterCutter = GetGame().CreateObjectEx("LargeTentClutterCutter", pb.GetLocalProjectionPosition(), ECE_PLACE_ON_SURFACE);
133 m_ClutterCutter.SetOrientation(pb.GetLocalProjectionOrientation());
134 }
135 }
136 }
const int ECE_PLACE_ON_SURFACE
Object m_ClutterCutter
proto native CGame GetGame()

References ECE_PLACE_ON_SURFACE, GetGame(), and m_ClutterCutter.

◆ OnRPC()

override void OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )

Definition at line 43 of file LargeTent.c.

44 {
45 super.OnRPC(sender, rpc_type, ctx);
46
47 Param1<bool> p = new Param1<bool>(false);
48
49 if (ctx.Read(p))
50 bool play = p.param1;
51
52 switch (rpc_type)
53 {
54 case SoundTypeTent.REPACK:
55
56 if (play)
58
59 if (!play)
61
62 break;
63 }
64 }
void StopRepackingLoopSound()
Definition LargeTent.c:72
SoundTypeTent
Definition LargeTent.c:2
void PlayRepackingLoopSound()
Definition LargeTent.c:66

References PlayRepackingLoopSound(), and StopRepackingLoopSound().

◆ PlayRepackingLoopSound()

void PlayRepackingLoopSound ( )

Definition at line 66 of file LargeTent.c.

67 {
68 if (!m_RepackingLoopSound || !m_RepackingLoopSound.IsSoundPlaying())
69 m_RepackingLoopSound = SEffectManager.PlaySound("largetent_deploy_SoundSet", GetPosition(), 0.5, 0.5);
70 }
enum SoundTypeTent m_RepackingLoopSound
class JsonUndergroundAreaTriggerData GetPosition
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.

References GetPosition, m_RepackingLoopSound, and SEffectManager::PlaySound().

Referenced by OnRPC().

◆ SetActions()

override void SetActions ( )

Definition at line 148 of file LargeTent.c.

149 {
150 super.SetActions();
151
152 //AddAction(ActionRepackTent);
153 }

◆ StopRepackingLoopSound()

void StopRepackingLoopSound ( )

Definition at line 72 of file LargeTent.c.

73 {
74 m_RepackingLoopSound.SetSoundFadeOut(0.5);
75 m_RepackingLoopSound.SoundStop();
76 }

References m_RepackingLoopSound.

Referenced by OnRPC().

◆ ~LargeTent()

Definition at line 38 of file LargeTent.c.

39 {
41 }
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.

References SEffectManager::DestroyEffect(), and m_RepackingLoopSound.

Variable Documentation

◆ m_RepackingLoopSound