@@ -180,13 +180,6 @@ void ZEPlayer::SpawnFlashLight()
180180
181181 CCSPlayerPawn* pPawn = (CCSPlayerPawn*)CCSPlayerController::FromSlot (GetPlayerSlot ())->GetPawn ();
182182
183- // Ensure custom viewmodel exists if needed
184- if (!g_cvarFlashLightUseAttachment.Get ())
185- {
186- if (!pPawn->m_pViewModelServices () || !GetOrCreateCustomViewModel (pPawn))
187- return ;
188- }
189-
190183 Vector origin = pPawn->GetAbsOrigin ();
191184 Vector forward;
192185 AngleVectors (pPawn->m_angEyeAngles (), &forward);
@@ -214,20 +207,9 @@ void ZEPlayer::SpawnFlashLight()
214207 pKeyValues->SetString (" lightcookie" , " materials/effects/lightcookies/flashlight.vtex" );
215208
216209 pLight->DispatchSpawn (pKeyValues);
217-
218- if (g_cvarFlashLightUseAttachment.Get ())
219- {
220- pLight->SetParent (pPawn);
221- pLight->AcceptInput (" SetParentAttachmentMaintainOffset" , g_cvarFlashLightAttachment.Get ().String ());
222- }
223- else
224- {
225- CBaseViewModel* pViewModel = GetOrCreateCustomViewModel (pPawn);
226- if (!pViewModel)
227- return ;
228-
229- pLight->SetParent (pViewModel);
230- }
210+
211+ pLight->SetParent (pPawn);
212+ pLight->AcceptInput (" SetParentAttachmentMaintainOffset" , g_cvarFlashLightAttachment.Get ().String ());
231213
232214 SetFlashLight (pLight);
233215}
@@ -602,42 +584,21 @@ void ZEPlayer::ReplicateConVar(const char* pszName, const char* pszValue)
602584 delete data;
603585}
604586
605- CBaseViewModel* ZEPlayer::GetOrCreateCustomViewModel (CCSPlayerPawn* pPawn)
606- {
607- CBaseViewModel* pViewmodel = pPawn->m_pViewModelServices ()->GetViewModel (2 );
608- if (pViewmodel)
609- return pViewmodel;
610-
611- pViewmodel = CreateEntityByName<CBaseViewModel>(" predicted_viewmodel" );
612- if (!pViewmodel)
613- return nullptr ;
614-
615- pViewmodel->DispatchSpawn ();
616- pViewmodel->SetOwner (pPawn);
617- pPawn->m_pViewModelServices ()->SetViewModel (2 , pViewmodel);
618-
619- return pViewmodel;
620- }
621-
587+ // CURRENTLY DOES NOTHING
622588void ZEPlayer::CreateEntwatchHud ()
623589{
590+ // //////////////////////
591+ return ;
592+ // //////////////////////
593+
624594 CCSPlayerController* pController = CCSPlayerController::FromSlot (GetPlayerSlot ());
625595 if (!pController)
626596 return ;
627597
628598 CCSPlayerPawn* pPawn = pController->GetPlayerPawn ();
629599 if (!pPawn)
630600 return ;
631-
632- if (!pPawn->m_pViewModelServices ())
633- return ;
634-
635- CBaseViewModel* pViewModel = GetOrCreateCustomViewModel (pPawn);
636- if (!pViewModel)
637- {
638- Panic (" Failed to get or create custom viewmodel for entwatch hud.\n " );
639- return ;
640- }
601+
641602
642603 CPointWorldText* pText = GetEntwatchHud ();
643604 if (pText)
@@ -670,10 +631,10 @@ void ZEPlayer::CreateEntwatchHud()
670631 pText->DispatchSpawn ();
671632 SetEntwatchHud (pText);
672633
673- pText->AcceptInput (" SetParent" , " !activator" , pViewModel);
634+ // pText->AcceptInput("SetParent", "!activator", pViewModel);
674635
675- Vector origin = pViewModel->GetAbsOrigin ();
676- QAngle vmangles = pViewModel->GetAbsRotation ();
636+ // Vector origin = pViewModel->GetAbsOrigin();
637+ // QAngle vmangles = pViewModel->GetAbsRotation();
677638
678639 Vector forward;
679640 Vector right;
0 commit comments