-
Автор темы
- #1
Не рисуется чамс на игрока, когда отрисовывается backtrack chams. (Рисуется только xqz)
C++:
if (bfg.matrix && Entity->Origin.DistTo(bfg.origin) > 1.f) //проверка на движение
{
GP_Esp->OverrideMaterial(false, 0/*Texture*/, ShowBacktrackColor);
fnDME(thisptr, ctx, state, pInfo, bfg.matrix);
I::ModelRender()->ForcedMaterialOverride(nullptr);
}
C++:
if (!ChamsVisibleOnly)
{
ChamsInvisColor[4];
OverrideMaterial(true, ChamsStyle, ChamsInvisColor);
fnDME(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
}
if (ChamsStyle >= 0)
{
ChamsVisbleColor[4];
OverrideMaterial(false, ChamsStyle, ChamsVisbleColor);
fnDME(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
}
C++:
static auto ofunc = HookTables::pDrawModelExecute->GetTrampoline();
if (I::ModelRender()->IsForcedMaterialOverride())
return ofunc(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
if (GP_Esp && CGlobal::IsGameReady && ctx && &state && &pInfo && pCustomBoneToWorld && !CGlobal::FullUpdateCheck)
GP_Esp->DrawModelExecute(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
if (GP_LegitAim && CGlobal::IsGameReady && ctx && &state && &pInfo && pCustomBoneToWorld && !CGlobal::FullUpdateCheck)
GP_LegitAim->DrawModelExecute(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
if (GP_Misc && CGlobal::IsGameReady && ctx && &state && &pInfo && pCustomBoneToWorld && !CGlobal::FullUpdateCheck)
GP_Misc->DrawModelExecute(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
ofunc(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
I::ModelRender()->ForcedMaterialOverride(nullptr);
C++:
void CEsp::OverrideMaterial(bool ignoreZ, int type, Color rgba)
{
IMaterial* Material = nullptr;
switch (type)
{
case 0: Material = Texture; break;
case 1: Material = Flat; break;
case 2: Material = Wireframe; break;
case 3: Material = Metallic; break;
case 4: Material = Pearlescent; break;
case 5: Material = Animated; break;
default: Material = nullptr;
}
if (!Material || Material->IsErrorMaterial())
return;
Material->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, ignoreZ);
Material->ColorModulate(rgba.G1R(), rgba.G1G(), rgba.G1B());
Material->AlphaModulate(rgba.G1A());
Material->IncrementReferenceCount();
I::ModelRender()->ForcedMaterialOverride(Material);
}
Пожалуйста, зарегистрируйтесь или авторизуйтесь, чтобы увидеть содержимое.
Вложения
-
301.6 KB Просмотры: 40
Последнее редактирование: