162{
164
166 {
167 m_ShowAnimationsWhenPitched.Insert("Body");
168 m_ShowAnimationsWhenPacked.Insert("Body");
169
171 }
172
174 {
175 super.SetActions();
176
181
183 }
184
186 {
187 super.EEInit();
188
189 TryPitch(true, true);
190 }
191
193 {
195 }
196
198 {
201 Delete();
202 }
203
205 {
207 }
208
210 {
211 return "";
212 }
213
215 {
217 }
218
220 {
222 constructionKit.SetHealth01("", "", GetHealth01());
223
224 if (shouldKitFall)
225 constructionKit.ThrowPhysically(null,
vector.
Zero);
226 }
227
229 {
230 vector player_pos = player.GetPosition();
232 vector ref_dir = GetDirection();
233 ref_dir[1] = 0;
235
241
242 vector dir_to_shelter = shelter_pos - player_pos;
243 dir_to_shelter[1] = 0;
244 float len = dir_to_shelter.
Length();
245
247
250 vector test_angles = dir_to_shelter_angle - ref_dir_angle;
251
253
254 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2 )
255 {
256 return false;
257 }
258 else
259 {
260 return true;
261 }
262 }
263
265 {
267 return;
268
269 DropCargoItems();
272
274 }
275}
276
278{
280 {
281 return "fabric";
282 }
283}
284
286{
288 {
289 return "leather";
290 }
291}
292
294{
296 {
297 return "stick";
298 }
299}
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.