Skip to content

Commit

Permalink
Fix dedicated server build
Browse files Browse the repository at this point in the history
  • Loading branch information
mittorn committed Apr 1, 2017
1 parent b7627d1 commit 45edf1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions engine/common/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,7 @@ void EXPORT Host_Shutdown( void )
host.state = HOST_SHUTDOWN;
break;
default:
#ifndef XASH_DEDICATED
if( !Host_IsDedicated() && !host.skip_configs )
{
// restore all latched cheat cvars
Expand All @@ -1286,6 +1287,7 @@ void EXPORT Host_Shutdown( void )
IN_TouchWriteConfig();
host.skip_configs = false;
}
#endif
host.state = HOST_SHUTDOWN; // prepare host to normal shutdown
}

Expand Down
2 changes: 2 additions & 0 deletions engine/server/sv_phys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1842,6 +1842,7 @@ Called from renderer for debug purposes
*/
void SV_DrawDebugTriangles( void )
{
#ifndef XASH_DEDICATED
if( Host_IsDedicated() )
return;

Expand All @@ -1865,6 +1866,7 @@ void SV_DrawDebugTriangles( void )
pglDepthMask( GL_TRUE );
pglEnable( GL_BLEND );
}
#endif
}

/*
Expand Down
2 changes: 1 addition & 1 deletion msvc6/build_dedicated.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rem msvc writes all objects to CWD, so we need do some renames to resolve conflicts
move common\common.c common\host_common.c
move common\soundlib\libmpg\common.c common\soundlib\libmpg\mpg_common.c
cl -Dvsnprintf=_vsnprintf -o xash_dedicated.exe /DEBUG /Zi /W3 /Gm /GD /G6 /O2 /MD /O2 /DSINGLE_BINARY /DXASH_NOCONHOST /DXASH_FORCEINLINE /DXASH_FASTSTR /D_WINDLL common\*.c server\*.c client\vgui\*.c common\soundlib\*.c common\soundlib\libmpg\*.c common\imagelib\*.c common\sdl\events.c -I ../msvc6/ -I ../SDL2-2.0.4/include/ -Icommon -I../common -I. -I../pm_shared -Iclient -Iserver -Iclient/vgui -Icommon/sdl -DXASH_DEDICATED -Dsnprintf=_snprintf -DDBGHELP /link /LIBPATH:..\msvc6 user32.lib shell32.lib gdi32.lib msvcrt.lib winmm.lib /nodefaultlib:"libc.lib" /subsystem:windows ../SDL2-2.0.4/lib/x86/SDL2.lib kernel32.lib winspool.lib comdlg32.lib advapi32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /DEBUG
cl -Dvsnprintf=_vsnprintf -o xash_dedicated.exe /DEBUG /Zi /W3 /Gm /GD /G6 /O2 /MD /O2 /DSINGLE_BINARY /DXASH_NOCONHOST /DXASH_FORCEINLINE /DXASH_FASTSTR /D_WINDLL common\*.c server\*.c common\soundlib\*.c common\soundlib\libmpg\*.c common\imagelib\*.c -I ../msvc6/ -I ../SDL2-2.0.4/include/ -Icommon -I../common -I. -I../pm_shared -Iclient -Iserver -Iclient/vgui -Icommon/sdl -DXASH_DEDICATED -Dsnprintf=_snprintf -DDBGHELP /link /LIBPATH:..\msvc6 user32.lib shell32.lib gdi32.lib msvcrt.lib winmm.lib /nodefaultlib:"libc.lib" /subsystem:windows ../SDL2-2.0.4/lib/x86/SDL2.lib kernel32.lib winspool.lib comdlg32.lib advapi32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /DEBUG
move common\host_common.c common\common.c
move common\soundlib\libmpg\mpg_common.c common\soundlib\libmpg\common.c

0 comments on commit 45edf1f

Please sign in to comment.