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

◆ GetImpactSurfaceTypeEx()

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

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

161 {
162 vector mins, maxs;
163 GetWorldBounds(mins, maxs);
164 vector size = maxs - mins;
165
166 vector add = impact.RelativeVelocityBefore.Normalized() * size.Length();
167 string surfaceImpact;
168 if (DayZPhysics.GetHitSurfaceAndLiquid(
169 Object.Cast(other),
170 impact.Position + add,
171 impact.Position - add,
172 surfaceImpact,
173 liquid))
174 {
175 return surfaceImpact;
176 }
177 string surface;
178 g_Game.SurfaceUnderObjectExCorrectedLiquid(this, surface, surfaceImpact, liquid);
179
180 return surfaceImpact;
181 }
DayZGame g_Game
Определения DayZGame.c:3942
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().