- fix pedestrians performance issues

- fix PsyX PGXP performance
This commit is contained in:
Ilya Shurumov 2022-02-16 13:32:33 +03:00
parent 65ce3446ed
commit c4cfd55fb3
3 changed files with 5 additions and 4 deletions

View File

@ -610,9 +610,10 @@ void DrawBodySprite(LPPEDESTRIAN pDrawingPed, int boneId, VERTTYPE v1[2], VERTTY
#ifdef USE_PGXP
if (!bDoingShadow) // [A] Psy-X is currently incorrectly offsets the offscreen PGXP geometry. We don't need it anyway.
{
ushort pgxpIdx = PGXP_GetIndex(0) - 64;
PGXPVData vdata1, vdata2;
PGXP_GetCacheData(&vdata1, PGXP_LOOKUP_VALUE(v1[0], v1[1]), 0);
PGXP_GetCacheData(&vdata2, PGXP_LOOKUP_VALUE(v2[0], v2[1]), 0);
PGXP_GetCacheData(&vdata1, PGXP_LOOKUP_VALUE(v1[0], v1[1]), pgxpIdx);
PGXP_GetCacheData(&vdata2, PGXP_LOOKUP_VALUE(v2[0], v2[1]), pgxpIdx);
{
float len;

View File

@ -911,7 +911,7 @@ void PlotHorizonMDL(MODEL* model, int horizontaboffset)
#ifdef USE_PGXP
// store PGXP index
// HACK: -1 is needed here for some reason
dv[0].pgxp_index = dv[1].pgxp_index = dv[2].pgxp_index = PGXP_GetIndex() - 1;
dv[0].pgxp_index = dv[1].pgxp_index = dv[2].pgxp_index = PGXP_GetIndex(0) - 1;
#endif
dv += 3;
verts += 3;

@ -1 +1 @@
Subproject commit 502f700c5ba88b1ee0f7bca5cdd8ea66b833417a
Subproject commit 55ef91bd2882193ff7a139789c14cd622663c239