3 static const string SITE_OBJECT_TYPE =
"ShelterSite";
7 m_ShowAnimationsWhenPitched.Insert(
"Body");
8 m_ShowAnimationsWhenPacked.Insert(
"Body");
41 return string.Format(
"%1 %2 Construction site %3 Materials",
CFG_VEHICLESPATH, SITE_OBJECT_TYPE, GetShelterVariant());
44 string GetShelterVariant()
52 constructionKit.SetHealth01(
"",
"", GetHealth01());
57 vector player_pos = player.GetPosition();
59 vector ref_dir = GetDirection();
69 vector dir_to_shelter = shelter_pos - player_pos;
70 dir_to_shelter[1] = 0;
71 float len = dir_to_shelter.Length();
73 dir_to_shelter.Normalize();
75 vector ref_dir_angle = ref_dir.VectorToAngles();
76 vector dir_to_shelter_angle = dir_to_shelter.VectorToAngles();
77 vector test_angles = dir_to_shelter_angle - ref_dir_angle;
79 vector test_position = test_angles.AnglesToVector() * len;
81 if (test_position[0] < b1[0] || test_position[0] > b2[0] || test_position[2] < 0.2 || test_position[2] > 2.2 )