DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetImpactSurfaceTypeEx()

string EntityAI::GetImpactSurfaceTypeEx ( IEntity other,
Contact impact,
out int liquid )
inlineprotected

См. определение в файле 3_Game/DayZ/Entities/InventoryItem.c строка 162

163 {
164 vector mins, maxs;
165 GetWorldBounds(mins, maxs);
166 vector size = maxs - mins;
167
168 vector add = impact.RelativeVelocityBefore.Normalized() * size.Length();
169 string surfaceImpact;
170 if (DayZPhysics.GetHitSurfaceAndLiquid(
171 Object.Cast(other),
172 impact.Position + add,
173 impact.Position - add,
174 surfaceImpact,
175 liquid))
176 {
177 return surfaceImpact;
178 }
179 string surface;
180 g_Game.SurfaceUnderObjectExCorrectedLiquid(this, surface, surfaceImpact, liquid);
181
182 return surfaceImpact;
183 }
DayZGame g_Game
Определения DayZGame.c:4074
vector RelativeVelocityBefore
Определения Contact.c:35
vector Position
Position of the contact point (world space)
Определения Contact.c:29
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
proto native float Length()
Returns length of vector (magnitude)
class LOD Object

Перекрестные ссылки g_Game, DayZPhysics::GetHitSurfaceAndLiquid(), vector::Length(), vector::Normalized(), Contact::Position и Contact::RelativeVelocityBefore.

Используется в GetImpactSurfaceType() и ProcessImpactSoundEx().