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

◆ CalculateStoppingForce()

override float Hit_MeatBones::CalculateStoppingForce ( float in_speedf,
float out_speedf,
string ammoType,
float weight )
inlineprivate

См. определение в файле Hit_MeatBones.c строка 19

20 {
21 if ( m_ImpactType == ImpactTypes.MELEE )
22 {
23 return 400;
24 }
25
26 float projectile_weight_coef = weight / DEFAULT_PROJECTILE_WEIGHT;
27
28 float stopping_force = in_speedf * projectile_weight_coef;
29
30 if (m_DirectHit)
31 {
32 /*
33 // TO DO: Doesn't work because IsAlive() is false, even when it shouldn't be.
34 if ( m_DirectHit.IsMan() && m_componentIndex == SURVIVOR_HEAD && m_DirectHit.IsAlive() ) // Is the victim a survivor?
35 {
36 stopping_force = stopping_force * 2;
37 }
38 */
39
40 /*
41 // TO DO: Doesn't work. Need to recognize a zombie somehow
42 else if ( m_DirectHit.IsInherited(DayZCreatureAIType) && m_componentIndex == INFECTED_HEAD ) // Is the victim a survivor that's hit in the head?
43 {
44 stopping_force = stopping_force * 2;
45 }*/
46 }
47
48 return stopping_force;
49 }
ImpactTypes
Определения ImpactEffects.c:2
int m_ImpactType
Определения BulletImpactBase.c:12
static float DEFAULT_PROJECTILE_WEIGHT
Определения BulletImpactBase.c:5
Object m_DirectHit
Определения BulletImpactBase.c:9

Перекрестные ссылки EffBulletImpactBase::DEFAULT_PROJECTILE_WEIGHT, EffBulletImpactBase::m_DirectHit и EffBulletImpactBase::m_ImpactType.