PDA

Просмотр полной версии : Silent Aim [WARFACE]


atizoff
20.08.2020, 03:02
Всем привет, многие просят на разных бордах показать как работает сайлент в варфейсе, ну так давайте

C++:






Vec3
GetBonePositionByID
(
IEntity
*
pIEntity
,
INT iBoneID
)
{
ICharacterInstance
*
pICharacterInstance
=
pIEntity
->
GetCharacter
(
0
)
;
if
(
!
pICharacterInstance
)
return
{
ZERO
}
;
ISkeletonPose
*
pISkeletonPose
=
pICharacterInstance
->
GetISkeletonPose
(
)
;
if
(
!
pISkeletonPose
)
return
{
ZERO
}
;
Matrix34 mOut
=
pIEntity
->
GetWorldTM
(
)
*
Matrix34
(
pISkeletonPose
->
GetAbsJointByID
(
iBoneID
)
)
;
return
mOut
.
GetTranslation
(
)
;
}




Получаем кость по айди кости. Возвращает уже готовые координаты

C++:






IActor
*
m_pActor
=
NULL
;
if
(
IItem
*
m_pItem
=
m_pActor
->
GetCurrentItem
(
)
)
{
if
(
IWeapon
*
m_pWeapon
=
m_pItem
->
GetIWeapon
(
)
)
{
Vec3 vHeadPosPVP
=
GetBonePositionByID
(
m_pEntity
,
13
)
;
// идеальная кость головы для пвп
Vec3 vHeadPosPVE
=
GetBonePositionByID
(
m_pEntity
,
11
)
;
// идеальная кость головы для пве
m_pWeapon
->
SetFiringPos
(
vHeadPosPVP
)
;
}
}

Heroica
21.08.2020, 02:18
Можешь чит дать плз?