Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void __fastcall HookedSceneEnd(void* ecx, void* edx)
- {
- original_scene_end(ecx);
- static SDK::IMaterial* ignorez = chams->CreateMaterial(true, true, false);
- static SDK::IMaterial* notignorez = chams->CreateMaterial(false, true, false);
- static SDK::IMaterial* local = chams->CreateMaterial(false, true, false);
- static SDK::IMaterial* angles = chams->CreateMaterial(false, true, false);
- static SDK::IMaterial* ignorezf = chams->CreateMaterial(true, false, false);
- static SDK::IMaterial* notignorezf = chams->CreateMaterial(false, false, false);
- if (INTERFACES::Engine->IsConnected() && INTERFACES::Engine->IsInGame()) {
- auto local_player = INTERFACES::ClientEntityList->GetClientEntity(INTERFACES::Engine->GetLocalPlayer());
- for (int i = 1; i < 65; i++) {
- auto entity = INTERFACES::ClientEntityList->GetClientEntity(i);
- if (!entity)
- continue;
- if (!local_player)
- continue;
- bool is_local_player = entity == local_player;
- bool is_teammate = local_player->GetTeam() == entity->GetTeam() && !is_local_player;
- if (is_teammate)
- continue;
- if (local_player && SETTINGS::settings.localchams) {
- local->ColorModulate(CColor(255, 255, 255, 255));
- INTERFACES::RenderView->SetColorModulation(CColor(77, 137, 197)); //255, 255, 255, 255
- INTERFACES::ModelRender->ForcedMaterialOverride(local);
- local_player->DrawModel(0x1, 255);
- INTERFACES::ModelRender->ForcedMaterialOverride(nullptr);
- }
- if (local_player && SETTINGS::settings.aa_bool) {
- /* vec3_t OrigAng;
- OrigAng = local_player->get_eye_ang( );
- local_player->set_angles( vec3_t( 0, fakeangles.y, 0 ) );
- angles->AlphaModulate( 0 );
- ctx::model_render->ForcedMaterialOverride( angles );
- local_player->DrawModel( 0x1, 255 );
- ctx::model_render->ForcedMaterialOverride( nullptr );*/
- }
- if (is_local_player)
- continue;
- //--- Colored Models ---//
- if (entity && SETTINGS::settings.chams_type == 2) {
- INTERFACES::ModelRender->ForcedMaterialOverride(ignorez);
- ignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
- INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.vmodel_col)); //255, 40, 200
- entity->DrawModel(0x1, 255);
- INTERFACES::ModelRender->ForcedMaterialOverride(notignorez);
- notignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
- INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.imodel_col)); //0, 125, 255
- entity->DrawModel(0x1, 255);
- INTERFACES::ModelRender->ForcedMaterialOverride(nullptr);
- }
- else if (entity && SETTINGS::settings.chams_type == 1) {
- INTERFACES::ModelRender->ForcedMaterialOverride(notignorez);
- notignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
- INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.vmodel_col)); //255, 40, 200
- entity->DrawModel(0x1, 255);
- INTERFACES::ModelRender->ForcedMaterialOverride(nullptr);
- }
- else if (entity && SETTINGS::settings.chams_type == 3) {
- INTERFACES::ModelRender->ForcedMaterialOverride(ignorez);
- ignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
- INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.imodel_col)); //255, 40, 200
- entity->DrawModel(0x1, 255);
- INTERFACES::ModelRender->ForcedMaterialOverride(nullptr);
- }
- else if (entity && SETTINGS::settings.chams_type == 4) {
- INTERFACES::ModelRender->ForcedMaterialOverride(ignorez);
- ignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
- INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.vmodel_col)); //255, 40, 200
- entity->DrawModel(0x1, 255);
- INTERFACES::ModelRender->ForcedMaterialOverride(ignorez);
- ignorez->ColorModulate(CColor(255, 255, 255, 255)); //0, 125, 255
- INTERFACES::RenderView->SetColorModulation(CColor(SETTINGS::settings.imodel_col)); //0, 125, 255
- entity->DrawModel(0x1, 255);
- INTERFACES::ModelRender->ForcedMaterialOverride(nullptr);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement