118{
120
122 {
123 m_ShowAnimationsWhenPitched.Insert("Body");
124 m_ShowAnimationsWhenPacked.Insert("Body");
125
127 }
128
130 {
131 super.SetActions();
132
137
139 }
140
142 {
143 super.EEInit();
144
145 TryPitch(true, true);
146 }
147
149 {
152 Delete();
153 }
154
156 {
158 }
159
161 {
162 return "";
163 }
164
166 {
168 constructionKit.SetHealth01("", "", GetHealth01());
169 }
170
172 {
173 vector player_pos = player.GetPosition();
175 vector ref_dir = GetDirection();
176 ref_dir[1] = 0;
178
184
185 vector dir_to_shelter = shelter_pos - player_pos;
186 dir_to_shelter[1] = 0;
187 float len = dir_to_shelter.
Length();
188
190
193 vector test_angles = dir_to_shelter_angle - ref_dir_angle;
194
196
197 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2 )
198 {
199 return false;
200 }
201 else
202 {
203 return true;
204 }
205 }
206}
207
209{
211 {
212 return "fabric";
213 }
214}
215
217{
219 {
220 return "leather";
221 }
222}
223
225{
227 {
228 return "stick";
229 }
230}
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
ActionPackTentCB ActionContinuousBaseCB ActionPackTent()
void AddAction(typename actionName)
void RemoveAction(typename actionName)
const int ECE_PLACE_ON_SURFACE
Container_Base m_HalfExtents
class ShelterBase extends TentBase GetShelterVariant()
override bool IsPlayerInside(PlayerBase player, string selection)
static const string SITE_OBJECT_TYPE
override void SetActions()
override string GetShelterVariant()
static void SpawnConstructionMaterialPiles(notnull EntityAI entity, Man player, string cfg_path, string main_part_name, string damagezone_name="", bool is_base=false)
spawns material from any construction; 'player' parameter optional
proto native float Length()
Returns length of vector (magnitude)
proto float Normalize()
Normalizes vector. Returns length.
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
proto vector AnglesToVector()
Converts spherical coordinates (yaw, pitch, roll in degrees) to unit length vector.
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
class JsonUndergroundAreaTriggerData GetPosition
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.