148{
150
152 {
153 m_ShowAnimationsWhenPitched.Insert("Body");
154 m_ShowAnimationsWhenPacked.Insert("Body");
155
157 }
158
160 {
161 super.SetActions();
162
167
169 }
170
172 {
173 super.EEInit();
174
175 TryPitch(true, true);
176 }
177
179 {
182 Delete();
183 }
184
186 {
188 }
189
191 {
192 return "";
193 }
194
196 {
198 constructionKit.SetHealth01("", "", GetHealth01());
199 }
200
202 {
203 vector player_pos = player.GetPosition();
205 vector ref_dir = GetDirection();
206 ref_dir[1] = 0;
208
214
215 vector dir_to_shelter = shelter_pos - player_pos;
216 dir_to_shelter[1] = 0;
217 float len = dir_to_shelter.
Length();
218
220
223 vector test_angles = dir_to_shelter_angle - ref_dir_angle;
224
226
227 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2 )
228 {
229 return false;
230 }
231 else
232 {
233 return true;
234 }
235 }
236}
237
239{
241 {
242 return "fabric";
243 }
244}
245
247{
249 {
250 return "leather";
251 }
252}
253
255{
257 {
258 return "stick";
259 }
260}
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.