142{
144
146 {
147 m_ShowAnimationsWhenPitched.Insert("Body");
148 m_ShowAnimationsWhenPacked.Insert("Body");
149
151 }
152
154 {
155 super.SetActions();
156
161
163 }
164
166 {
167 super.EEInit();
168
169 TryPitch(true, true);
170 }
171
173 {
176 Delete();
177 }
178
180 {
182 }
183
185 {
186 return "";
187 }
188
190 {
192 constructionKit.SetHealth01("", "", GetHealth01());
193 }
194
196 {
197 vector player_pos = player.GetPosition();
199 vector ref_dir = GetDirection();
200 ref_dir[1] = 0;
202
208
209 vector dir_to_shelter = shelter_pos - player_pos;
210 dir_to_shelter[1] = 0;
211 float len = dir_to_shelter.
Length();
212
214
217 vector test_angles = dir_to_shelter_angle - ref_dir_angle;
218
220
221 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2 )
222 {
223 return false;
224 }
225 else
226 {
227 return true;
228 }
229 }
230}
231
233{
235 {
236 return "fabric";
237 }
238}
239
241{
243 {
244 return "leather";
245 }
246}
247
249{
251 {
252 return "stick";
253 }
254}
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.