
06.07.2019, 23:34
|
|
Новичок
Регистрация: 13.10.2017
Сообщений: 28
С нами:
4516996
Репутация:
13
|
|
в общем проблема, пытаюсь отрендерить линию от головы до пуза, в итоге линия строится нормально только на первого попавшегося в радиусе стрима актера, на остальных выходит кривота, как исправлять?
Сообщение от Спойлер
C++:
Код:
for
(
int
i
=
0
;
i
GetPlayerPool
(
)
;
CRemotePlayer
*
pRemote
;
if
(
pPlayerPool
->
GetPlayer
(
i
)
)
{
pRemote
=
pPlayerPool
->
GetPlayer
(
i
)
;
if
(
pRemote
->
m_pPed
)
{
SAMP
::
CPed
*
pRemotePed
=
pRemote
->
m_pPed
;
// Handle REMOTE Player
SAMP
::
CPed
*
pLocalPed
=
SAMP
::
pGame
->
m_pPlayerPed
;
// Handle LOCAL Player
if
(
!
pRemotePed
->
IsDead
(
)
||
!
pLocalPed
->
IsDead
(
)
)
{
SAMP
::
CVector pRemoteFirstBoneVector
;
pRemotePed
->
GetBonePosition
(
BONE_HEAD
,
&
pRemoteFirstBoneVector
)
;
SAMP
::
CVector pRemoteSecondBoneVector
;
pRemotePed
->
GetBonePosition
(
BONE_SPINE1
,
&
pRemoteSecondBoneVector
)
;
D3DXVECTOR3 pRemoteFirstBoneDX
;
pRemoteFirstBoneDX
.
x
=
pRemoteFirstBoneVector
.
x
;
pRemoteFirstBoneDX
.
y
=
pRemoteFirstBoneVector
.
y
;
pRemoteFirstBoneDX
.
z
=
pRemoteFirstBoneVector
.
z
;
D3DXVECTOR3 pRemoteSecondBoneDX
;
pRemoteSecondBoneDX
.
x
=
pRemoteSecondBoneVector
.
x
;
pRemoteSecondBoneDX
.
y
=
pRemoteSecondBoneVector
.
y
;
pRemoteSecondBoneDX
.
z
=
pRemoteSecondBoneVector
.
z
;
D3DXVECTOR3 firstCalculated
;
D3DXVECTOR3 secondCalculated
;
CalcScreenCoors
(
&
pRemoteFirstBoneDX
,
&
firstCalculated
)
;
CalcScreenCoors
(
&
pRemoteSecondBoneDX
,
&
secondCalculated
)
;
draw
.
Line
(
firstCalculated
.
x
,
firstCalculated
.
y
,
secondCalculated
.
x
,
secondCalculated
.
y
,
D3DCOLOR_ARGB
(
255
,
255
,
255
,
255
)
)
;
//draw.Text(screenPosEx.x, screenPosEx.y, nickname, fontColor, false, TextAlignment::kCenter);
}
}
}
}
Сообщение от Спойлер
Eu-xFuZUfxU.jpgenziweee · 6 Июл 2019 в 22:34' data-fancybox="lb-post-364267" data-lb-caption-extra-html="" data-lb-sidebar-href="" data-single-image="1" data-src="/proxy.php?image=https%3A%2F%2Fpp.userapi.com%2Fc85 1432%2Fv851432882%2F163f36%2FEu-xFuZUfxU.jpg&hash=708997e6c7b872a49ea3b1d80d772300 " style="cursor: pointer;" title="Eu-xFuZUfxU.jpg">

|
|
|