diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index be4944b8c..46ab072f2 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -404,9 +404,9 @@ CCMD (give) Net_WriteByte (DEM_GIVECHEAT); Net_WriteString (argv[1]); if (argv.argc() > 2) - Net_WriteWord (clamp (atoi (argv[2]), 1, 32767)); + Net_WriteLong(atoi(argv[2])); else - Net_WriteWord (0); + Net_WriteLong(0); } CCMD (take) @@ -417,9 +417,9 @@ CCMD (take) Net_WriteByte (DEM_TAKECHEAT); Net_WriteString (argv[1]); if (argv.argc() > 2) - Net_WriteWord (clamp (atoi (argv[2]), 1, 32767)); + Net_WriteLong(atoi (argv[2])); else - Net_WriteWord (0); + Net_WriteLong (0); } CCMD (gameversion) diff --git a/src/d_net.cpp b/src/d_net.cpp index 6e1d4436e..93f6a621b 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -2198,12 +2198,12 @@ void Net_DoCommand (int type, BYTE **stream, int player) case DEM_GIVECHEAT: s = ReadString (stream); - cht_Give (&players[player], s, ReadWord (stream)); + cht_Give (&players[player], s, ReadLong (stream)); break; case DEM_TAKECHEAT: s = ReadString (stream); - cht_Take (&players[player], s, ReadWord (stream)); + cht_Take (&players[player], s, ReadLong (stream)); break; case DEM_WARPCHEAT: @@ -2721,7 +2721,7 @@ void Net_SkipCommand (int type, BYTE **stream) case DEM_GIVECHEAT: case DEM_TAKECHEAT: - skip = strlen ((char *)(*stream)) + 3; + skip = strlen ((char *)(*stream)) + 5; break; case DEM_SUMMON2: diff --git a/src/gl/renderer/gl_lightdata.cpp b/src/gl/renderer/gl_lightdata.cpp index b0dccbcba..ae7f2a80d 100644 --- a/src/gl/renderer/gl_lightdata.cpp +++ b/src/gl/renderer/gl_lightdata.cpp @@ -306,12 +306,12 @@ float gl_GetFogDensity(int lightlevel, PalEntry fogcolor, int sectorfogdensity) } else if (sectorfogdensity != 0) { - // case 2: Sector has an explicit fog density set. + // case 1: Sector has an explicit fog density set. density = sectorfogdensity; } else if ((fogcolor.d & 0xffffff) == 0) { - // case 1: black fog + // case 2: black fog if (glset.lightmode != 8) { density = distfogtable[glset.lightmode != 0][gl_ClampLight(lightlevel)];