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

◆ GetImpactSurfaceTypeEx()

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

См. определение в файле 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 GetGame().SurfaceUnderObjectExCorrectedLiquid(this, surface, surfaceImpact, liquid);
179
180 return surfaceImpact;
181 }
void SurfaceUnderObjectExCorrectedLiquid(notnull Object object, out string type, out string impact, out int liquidType)
Определения Game.c:1188
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
proto native float Length()
Returns length of vector (magnitude)
class LOD Object
proto native CGame GetGame()
vector RelativeVelocityBefore
Определения EnPhysics.c:324
vector Position
Определения EnPhysics.c:323

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

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