132{
134
136 {
137 m_ShowAnimationsWhenPitched.Insert("Body");
138 m_ShowAnimationsWhenPacked.Insert("Body");
139
141 }
142
144 {
145 super.SetActions();
146
151
153 }
154
156 {
157 super.EEInit();
158
159 TryPitch(true, true);
160 }
161
163 {
166 Delete();
167 }
168
170 {
172 }
173
175 {
176 return "";
177 }
178
180 {
182 constructionKit.SetHealth01("", "", GetHealth01());
183 }
184
186 {
187 vector player_pos = player.GetPosition();
189 vector ref_dir = GetDirection();
190 ref_dir[1] = 0;
192
198
199 vector dir_to_shelter = shelter_pos - player_pos;
200 dir_to_shelter[1] = 0;
201 float len = dir_to_shelter.
Length();
202
204
207 vector test_angles = dir_to_shelter_angle - ref_dir_angle;
208
210
211 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2 )
212 {
213 return false;
214 }
215 else
216 {
217 return true;
218 }
219 }
220}
221
223{
225 {
226 return "fabric";
227 }
228}
229
231{
233 {
234 return "leather";
235 }
236}
237
239{
241 {
242 return "stick";
243 }
244}
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.