177{
179
181 {
182 m_ShowAnimationsWhenPitched.Insert("Body");
183 m_ShowAnimationsWhenPacked.Insert("Body");
184
186 }
187
189 {
190 super.SetActions();
191
196
198 }
199
201 {
202 super.EEInit();
203
204 TryPitch(true, true);
205 }
206
208 {
210 }
211
213 {
216 Delete();
217 }
218
220 {
222 }
223
225 {
226 return "";
227 }
228
230 {
232 }
233
235 {
237 constructionKit.SetHealth01("", "", GetHealth01());
238
239 if (shouldKitFall)
240 constructionKit.ThrowPhysically(null,
vector.
Zero);
241 }
242
244 {
245 vector player_pos = player.GetPosition();
247 vector ref_dir = GetDirection();
248 ref_dir[1] = 0;
250
256
257 vector dir_to_shelter = shelter_pos - player_pos;
258 dir_to_shelter[1] = 0;
259 float len = dir_to_shelter.
Length();
260
262
265 vector test_angles = dir_to_shelter_angle - ref_dir_angle;
266
268
269 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2 )
270 {
271 return false;
272 }
273 else
274 {
275 return true;
276 }
277 }
278
280 {
282 return;
283
284 DropCargoItems();
287
289 }
290}
291
293{
295 {
296 return "fabric";
297 }
298}
299
301{
303 {
304 return "leather";
305 }
306}
307
309{
311 {
312 return "stick";
313 }
314}
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.