From 5ca7bb5f12f3478b7cfe654c4d15d3c3f98d565d Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 3 May 2018 17:42:21 +0300 Subject: [PATCH] Fix noise index for not sine beams --- engine/client/gl_beams.c | 7 +++---- engine/common/launcher.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/engine/client/gl_beams.c b/engine/client/gl_beams.c index 056f9684..a41e5553 100644 --- a/engine/client/gl_beams.c +++ b/engine/client/gl_beams.c @@ -443,12 +443,11 @@ static void R_DrawSegs( vec3_t source, vec3_t delta, float width, float scale, f // Iterator to resample noise waveform (it needs to be generated in powers of 2) noiseStep = (int)((float)( NOISE_DIVISIONS - 1 ) * div * 65536.0f ); - noiseIndex = 0; if( FBitSet( flags, FBEAM_SINENOISE )) - { noiseIndex = 0; - } + else + noiseIndex = noiseStep; brightness = 1.0f; @@ -2029,4 +2028,4 @@ void CL_ReadLineFile_f( void ) if( count ) Con_Printf( "%i lines read\n", count ); else Con_Printf( "map %s has no leaks!\n", clgame.mapname ); -} \ No newline at end of file +} diff --git a/engine/common/launcher.c b/engine/common/launcher.c index fe74e73e..9e598061 100644 --- a/engine/common/launcher.c +++ b/engine/common/launcher.c @@ -66,7 +66,7 @@ int __stdcall WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdLine, int n int main( int argc, char** argv ) { char gamedir_buf[32] = ""; - const char *gamedir = getenv("XASH3D_GAMEDIR"); + const char *gamedir = getenv( "XASH3D_GAMEDIR" ); if( !gamedir ) {