186{
188
190 {
191 m_ShowAnimationsWhenPitched.Insert("Body");
192 m_ShowAnimationsWhenPacked.Insert("Body");
193
195 }
196
198 {
199 super.SetActions();
200
205
207 }
208
210 {
211 super.EEInit();
212
213 TryPitch(true, true);
214 }
215
217 {
219 }
220
222 {
225 Delete();
226 }
227
229 {
231 }
232
234 {
235 return "";
236 }
237
239 {
241 }
242
244 {
246 constructionKit.SetHealth01("", "", GetHealth01());
247
248 if (shouldKitFall)
249 constructionKit.ThrowPhysically(null,
vector.
Zero);
250 }
251
253 {
254 vector player_pos = player.GetPosition();
256 vector ref_dir = GetDirection();
257 ref_dir[1] = 0;
259
265
266 vector dir_to_shelter = shelter_pos - player_pos;
267 dir_to_shelter[1] = 0;
268 float len = dir_to_shelter.
Length();
269
271
274 vector test_angles = dir_to_shelter_angle - ref_dir_angle;
275
277
278 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2 )
279 {
280 return false;
281 }
282 else
283 {
284 return true;
285 }
286 }
287
289 {
291 return;
292
293 DropCargoItems();
296
298 }
299}
300
302{
304 {
305 return "fabric";
306 }
307}
308
310{
312 {
313 return "leather";
314 }
315}
316
318{
320 {
321 return "stick";
322 }
323}
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.