LevShisterov/BugfixedHL

Gauss beam is invisible

tmp64 opened this issue · 7 comments

tmp64 commented

Alternate gauss fire beam is invisible.
Broken in 3205565.

Patch:

From e872ccc8250ec20f7bdd3a8cda0237aa69c403e6 Mon Sep 17 00:00:00 2001
From: tmp64 <tmp64@users.noreply.github.com>
Date: Sun, 10 Feb 2019 16:54:29 +0700
Subject: [PATCH] [client] Fix alternate gauss fire beam being invisible

Broken in 3205565ea216921687fbbf1d667f606e612ed24d
---
 dlls/gauss.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/gauss.cpp b/dlls/gauss.cpp
index 6022448..fb145e4 100644
--- a/dlls/gauss.cpp
+++ b/dlls/gauss.cpp
@@ -314,11 +314,20 @@ void CGauss::StartFire( void )
 	
 	if ( gpGlobals->time - m_pPlayer->m_flStartCharge > GetFullChargeTime() )
 	{
+#ifdef CLIENT_DLL
+		flDamage = 200;
+#else
 		flDamage = gSkillData.plrDmgGaussSecondary;
+#endif
 	}
 	else
 	{
+#ifdef CLIENT_DLL
+		flDamage = 200 * (( gpGlobals->time - m_pPlayer->m_flStartCharge) / GetFullChargeTime() );
+#else
 		flDamage = gSkillData.plrDmgGaussSecondary * (( gpGlobals->time - m_pPlayer->m_flStartCharge) / GetFullChargeTime() );
+#endif
+		
 	}
 
 	if ( m_fPrimaryFire )
tmp64 commented

It also breaks prediction which is noticeable on servers with high ping.

rtxa commented

@LevShisterov This needs to be added, it's a side-effect from the merged pull request I did for damage cvars.

@rtxa can you make a PR?

rtxa commented

@rtxa can you make a PR?

All right, here it is: #22

Closed via e0ecdff

rtxa commented

Hi @tmp64,

I know this issue has some years, but I'm wondering what other weapons are affected by client prediction if we modify their damage behaviour. Seems like mp_damage cvars are not effective as I thought.

tmp64 commented

@rtxa
From a quick look through the code I think gauss is the only weapon that uses damage values for perdiction