Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Egon/Gluon gun beam colors are too bright #3033

Open
SamVanheer opened this issue Feb 8, 2021 · 0 comments
Open

Egon/Gluon gun beam colors are too bright #3033

SamVanheer opened this issue Feb 8, 2021 · 0 comments

Comments

@SamVanheer
Copy link

Just like #2865 for the Gauss gun the Egon gun beam colors are too bright. The original code used values in the range [0, 255], whereas the client side effects code works with colors in the range [0, 1].

This is the code in question:

halflife/cl_dll/ev_hldm.cpp

Lines 1453 to 1469 in c7240b9

float r = 50.0f;
float g = 50.0f;
float b = 125.0f;
if ( IEngineStudio.IsHardware() )
{
r /= 100.0f;
g /= 100.0f;
}
pBeam = gEngfuncs.pEfxAPI->R_BeamEntPoint ( idx | 0x1000, tr.endpos, iBeamModelIndex, 99999, 3.5, 0.2, 0.7, 55, 0, 0, r, g, b );
if ( pBeam )
pBeam->flags |= ( FBEAM_SINENOISE );
pBeam2 = gEngfuncs.pEfxAPI->R_BeamEntPoint ( idx | 0x1000, tr.endpos, iBeamModelIndex, 99999, 5.0, 0.08, 0.7, 25, 0, 0, r, g, b );

This needs to be changed to use:

float r = 50.0f;
float g = 50.0f;
float b = 125.0f;

//if ( IEngineStudio.IsHardware() )
{
	r /= 255.0f;
	g /= 255.0f;
	b /= 255.0f;
}

This is still missing the time based modulation code, but the beam color should be much closer to its original appearance.

nekonomicon added a commit to FWGS/hlsdk-portable that referenced this issue Jun 5, 2021
tyabus pushed a commit to tyabus/hlsdk-xash3d that referenced this issue Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants