125{
127
129 {
130 m_ShowAnimationsWhenPitched.Insert("Body");
131 m_ShowAnimationsWhenPacked.Insert("Body");
132
134 }
135
137 {
138 super.SetActions();
139
144
146 }
147
149 {
150 super.EEInit();
151
152 TryPitch(true, true);
153 }
154
156 {
159 Delete();
160 }
161
163 {
165 }
166
168 {
169 return "";
170 }
171
173 {
175 constructionKit.SetHealth01("", "", GetHealth01());
176 }
177
179 {
180 vector player_pos = player.GetPosition();
182 vector ref_dir = GetDirection();
183 ref_dir[1] = 0;
185
191
192 vector dir_to_shelter = shelter_pos - player_pos;
193 dir_to_shelter[1] = 0;
194 float len = dir_to_shelter.
Length();
195
197
200 vector test_angles = dir_to_shelter_angle - ref_dir_angle;
201
203
204 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2 )
205 {
206 return false;
207 }
208 else
209 {
210 return true;
211 }
212 }
213}
214
216{
218 {
219 return "fabric";
220 }
221}
222
224{
226 {
227 return "leather";
228 }
229}
230
232{
234 {
235 return "stick";
236 }
237}
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.