143{
145
147 {
148 m_ShowAnimationsWhenPitched.Insert("Body");
149 m_ShowAnimationsWhenPacked.Insert("Body");
150
152 }
153
155 {
156 super.SetActions();
157
162
164 }
165
167 {
168 super.EEInit();
169
170 TryPitch(true, true);
171 }
172
174 {
176 }
177
179 {
182 Delete();
183 }
184
186 {
188 }
189
191 {
192 return "";
193 }
194
196 {
198 }
199
201 {
203 constructionKit.SetHealth01("", "", GetHealth01());
204
205 if (shouldKitFall)
206 constructionKit.ThrowPhysically(null,
vector.
Zero);
207 }
208
210 {
211 vector player_pos = player.GetPosition();
213 vector ref_dir = GetDirection();
214 ref_dir[1] = 0;
216
222
223 vector dir_to_shelter = shelter_pos - player_pos;
224 dir_to_shelter[1] = 0;
225 float len = dir_to_shelter.
Length();
226
228
231 vector test_angles = dir_to_shelter_angle - ref_dir_angle;
232
234
235 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2 )
236 {
237 return false;
238 }
239 else
240 {
241 return true;
242 }
243 }
244
246 {
248 return;
249
250 DropCargoItems();
253
255 }
256}
257
259{
261 {
262 return "fabric";
263 }
264}
265
267{
269 {
270 return "leather";
271 }
272}
273
275{
277 {
278 return "stick";
279 }
280}
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)
override void OnItemFallRebuilding()
void DeconstructEx(bool createdItemsFall=false)
static const string SITE_OBJECT_TYPE
void SpawnKitEx(bool shouldKitFall=false)
override void SetActions()
override string GetShelterVariant()
static void SpawnConstructionMaterialPilesEx(notnull EntityAI entity, Man player, string cfgPath, string mainPartName, string damagezoneName="", bool isBase=false, bool throwPiles=false)
spawns material from any construction; 'player' parameter optional; 'main_part_name' is actually a PA...
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 vector Vector(float x, float y, float z)
Vector constructor from components.
vector GetPosition()
Get the world position of the Effect.
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.