Half-Life 2 Deathmatch Super gravity gun fix

From Valve Developer Community
Revision as of 15:06, 4 April 2023 by Rjacobvogel Fe3 (talk | contribs) (Accidentally had wrong title.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In Half-Life 2 Deathmatch the Gravity gun won't go into supercharged mode. There is a fix to this.

First open weapon_physcannon.cpp At line 70 or near add:

extern ConVar physcannon_mega_enabled

Now find:

	// Do we have the super-phys gun?
	inline bool	IsMegaPhysCannon()
	{
	return PlayerHasMegaPhysCannon();
	}

and replace it with:

	inline bool	IsMegaPhysCannon()
	{
		//		return PlayerHasMegaPhysCannon();
		if ( physcannon_mega_enabled.GetBool() )
		{
			return true;
		}
		else
		{
			return false;
		}
	}

Now compile the project and it should work.