Browse Source

Merge branch 'sohl1.2' into echoes

echoes
Andrey Akhmichin 4 years ago
parent
commit
0733d914a9
  1. 52
      .github/workflows/.github.yml
  2. 2
      README.md
  3. 636
      cl_dll/cl_dll.dsp
  4. 8
      cl_dll/in_camera.cpp
  5. 2
      cl_dll/in_defs.h
  6. 60
      cl_dll/input_goldsource.cpp
  7. 2
      cl_dll/tf_defs.h
  8. 2
      dlls/apache.cpp
  9. 4
      dlls/barnacle.cpp
  10. 2
      dlls/bigmomma.cpp
  11. 4
      dlls/cbase.cpp
  12. 4
      dlls/cbase.h
  13. 8
      dlls/client.cpp
  14. 2
      dlls/compile.bat
  15. 2
      dlls/controller.cpp
  16. 14
      dlls/crossbow.cpp
  17. 18
      dlls/crowbar.cpp
  18. 2
      dlls/doors.cpp
  19. 16
      dlls/egon.cpp
  20. 2
      dlls/exportdef.h
  21. 6
      dlls/extdll.h
  22. 2
      dlls/gargantua.cpp
  23. 24
      dlls/gauss.cpp
  24. 2
      dlls/glock.cpp
  25. 2
      dlls/h_cycler.cpp
  26. 6
      dlls/h_export.cpp
  27. 2
      dlls/handgrenade.cpp
  28. 2
      dlls/hassassin.cpp
  29. 5
      dlls/hl.def
  30. 766
      dlls/hl.dsp
  31. 12
      dlls/hornetgun.cpp
  32. 2
      dlls/ichthyosaur.cpp
  33. 2
      dlls/monsters.cpp
  34. 6
      dlls/mp5.cpp
  35. 12
      dlls/multiplay_gamerules.cpp
  36. 2
      dlls/nihilanth.cpp
  37. 4
      dlls/nodes.cpp
  38. 6
      dlls/nodes.h
  39. 12
      dlls/player.cpp
  40. 12
      dlls/python.cpp
  41. 20
      dlls/rpg.cpp
  42. 8
      dlls/satchel.cpp
  43. 2
      dlls/saverestore.h
  44. 2
      dlls/schedule.cpp
  45. 8
      dlls/shotgun.cpp
  46. 2
      dlls/soundent.cpp
  47. 8
      dlls/squeakgrenade.cpp
  48. 6
      dlls/teamplay_gamerules.cpp
  49. 2
      dlls/tentacle.cpp
  50. 6
      dlls/tripmine.cpp
  51. 20
      dlls/util.cpp
  52. 8
      dlls/util.h
  53. 12
      dlls/weapons.cpp
  54. 46
      dlls/weapons.h
  55. 2
      dlls/world.cpp
  56. 11
      dlls/wscript
  57. 6
      pm_shared/pm_debug.c
  58. 6
      pm_shared/pm_defs.h
  59. 4
      pm_shared/pm_math.c
  60. 10
      pm_shared/pm_shared.c
  61. 12
      wscript

52
.github/workflows/.github.yml

@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
cc: gcc
cxx: g++
- os: ubuntu-latest
cc: clang
cxx: clang++
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get SDL2 headers
uses: actions/checkout@v2
with:
repository: libsdl-org/SDL
ref: release-2.0.9
path: SDL2
- name: Link SDL2 headers into system path
run: |
sudo ln -s "$GITHUB_WORKSPACE/SDL2/include" /usr/local/include/SDL2
- name: Install dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -y install gcc-multilib g++-multilib
- name: Build with xash3d-fwgs input
run: |
cmake -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" && cmake --build build --target all
- name: Build with goldsource input
run: |
cmake -B build-gs -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DGOLDSOURCE_SUPPORT=ON && cmake --build build-gs --target all
- name: Build with mingw
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.cc, 'gcc')
run: |
sudo apt-get install -y mingw-w64-i686-dev binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686
cmake -B build-mingw -S . -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++
cmake --build build-mingw --target all

2
README.md

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
# Half-Life SDK for Xash3D [![Build Status](https://travis-ci.org/FWGS/hlsdk-xash3d.svg)](https://travis-ci.org/FWGS/hlsdk-xash3d) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/FWGS/hlsdk-xash3d?svg=true)](https://ci.appveyor.com/project/a1batross/hlsdk-xash3d)
# Half-Life SDK for Xash3D [![Build Status](https://github.com/FWGS/hlsdk-xash3d/actions/workflows/.github.yml/badge.svg?branch=master)](https://github.com/FWGS/hlsdk-xash3d/actions/workflows/.github.yml) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/FWGS/hlsdk-xash3d?svg=true)](https://ci.appveyor.com/project/a1batross/hlsdk-xash3d)
Half-Life SDK for Xash3D & GoldSource with some fixes.

636
cl_dll/cl_dll.dsp

@ -1,636 +0,0 @@ @@ -1,636 +0,0 @@
# Microsoft Developer Studio Project File - Name="cl_dll" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=cl_dll - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "cl_dll.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "cl_dll.mak" CFG="cl_dll - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "cl_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "cl_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "cl_dll - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\temp\cl_dll\!release"
# PROP Intermediate_Dir "..\temp\cl_dll\!release"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\utils\false_vgui\include" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\dlls" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "CLIENT_DLL" /D "CLIENT_WEAPONS" /YX /FD /c
# SUBTRACT CPP /Z<none>
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib winmm.lib ../utils/vgui/lib/win32_vc6/vgui.lib wsock32.lib /nologo /subsystem:windows /dll /machine:I386 /out:"..\temp\cl_dll\!release/client.dll"
# SUBTRACT LINK32 /map
# Begin Custom Build
TargetDir=\Xash3D\src_main\temp\cl_dll\!release
InputPath=\Xash3D\src_main\temp\cl_dll\!release\client.dll
SOURCE="$(InputPath)"
"D:\Xash3D\valve\cl_dlls\client.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(TargetDir)\client.dll "D:\Xash3D\valve\cl_dlls\client.dll"
# End Custom Build
!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\temp\cl_dll\!debug"
# PROP Intermediate_Dir "..\temp\cl_dll\!debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /G5 /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\dlls" /I "..\common" /I "..\pm_shared" /I "..\engine" /I "..\utils\false_vgui\include" /I "..\game_shared" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "CLIENT_DLL" /D "CLIENT_WEAPONS" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
# ADD LINK32 oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib winmm.lib ../utils/vgui/lib/win32_vc6/vgui.lib wsock32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"..\temp\cl_dll\!debug/client.dll"
# Begin Custom Build
TargetDir=\Xash3D\src_main\temp\cl_dll\!debug
InputPath=\Xash3D\src_main\temp\cl_dll\!debug\client.dll
SOURCE="$(InputPath)"
"D:\Xash3D\valve\cl_dlls\client.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(TargetDir)\client.dll "D:\Xash3D\valve\cl_dlls\client.dll"
# End Custom Build
!ENDIF
# Begin Target
# Name "cl_dll - Win32 Release"
# Name "cl_dll - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
# Begin Group "hl"
# PROP Default_Filter "*.CPP"
# Begin Source File
SOURCE=..\dlls\crossbow.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\crowbar.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\egon.cpp
# End Source File
# Begin Source File
SOURCE=.\ev_hldm.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\gauss.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\handgrenade.cpp
# End Source File
# Begin Source File
SOURCE=.\hl\hl_baseentity.cpp
# End Source File
# Begin Source File
SOURCE=.\hl\hl_events.cpp
# End Source File
# Begin Source File
SOURCE=.\hl\hl_objects.cpp
# End Source File
# Begin Source File
SOURCE=.\hl\hl_weapons.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\glock.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\hornetgun.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\mp5.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\python.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\rpg.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\satchel.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\shotgun.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\squeakgrenade.cpp
# End Source File
# Begin Source File
SOURCE=..\dlls\tripmine.cpp
# End Source File
# Begin Source File
SOURCE=..\game_shared\vgui_scrollbar2.cpp
# End Source File
# Begin Source File
SOURCE=..\game_shared\vgui_slider2.cpp
# End Source File
# Begin Source File
SOURCE=..\game_shared\voice_banmgr.cpp
# End Source File
# Begin Source File
SOURCE=..\game_shared\voice_status.cpp
# End Source File
# End Group
# Begin Source File
SOURCE=.\ammo.cpp
# End Source File
# Begin Source File
SOURCE=.\ammo_secondary.cpp
# End Source File
# Begin Source File
SOURCE=.\ammohistory.cpp
# End Source File
# Begin Source File
SOURCE=.\battery.cpp
# End Source File
# Begin Source File
SOURCE=.\cdll_int.cpp
# End Source File
# Begin Source File
SOURCE=.\com_weapons.cpp
# End Source File
# Begin Source File
SOURCE=.\death.cpp
# End Source File
# Begin Source File
SOURCE=.\demo.cpp
# End Source File
# Begin Source File
SOURCE=.\entity.cpp
# End Source File
# Begin Source File
SOURCE=.\ev_common.cpp
# End Source File
# Begin Source File
SOURCE=.\events.cpp
# End Source File
# Begin Source File
SOURCE=.\flashlight.cpp
# End Source File
# Begin Source File
SOURCE=.\GameStudioModelRenderer.cpp
# End Source File
# Begin Source File
SOURCE=.\geiger.cpp
# End Source File
# Begin Source File
SOURCE=.\health.cpp
# End Source File
# Begin Source File
SOURCE=.\hud.cpp
# End Source File
# Begin Source File
SOURCE=.\hud_msg.cpp
# End Source File
# Begin Source File
SOURCE=.\hud_redraw.cpp
# End Source File
# Begin Source File
SOURCE=.\hud_servers.cpp
# End Source File
# Begin Source File
SOURCE=.\hud_spectator.cpp
# End Source File
# Begin Source File
SOURCE=.\hud_update.cpp
# End Source File
# Begin Source File
SOURCE=.\in_camera.cpp
# End Source File
# Begin Source File
SOURCE=.\input.cpp
# End Source File
# Begin Source File
SOURCE=.\input_goldsource.cpp
# End Source File
# Begin Source File
SOURCE=.\input_mouse.cpp
# End Source File
# Begin Source File
SOURCE=.\input_xash3d.cpp
# End Source File
# Begin Source File
SOURCE=.\menu.cpp
# End Source File
# Begin Source File
SOURCE=.\message.cpp
# End Source File
# Begin Source File
SOURCE=.\overview.cpp
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=.\parsemsg.cpp
# End Source File
# Begin Source File
SOURCE=.\parsemsg.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_debug.c
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_math.c
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_shared.c
# End Source File
# Begin Source File
SOURCE=.\saytext.cpp
# End Source File
# Begin Source File
SOURCE=.\status_icons.cpp
# End Source File
# Begin Source File
SOURCE=.\statusbar.cpp
# End Source File
# Begin Source File
SOURCE=.\studio_util.cpp
# End Source File
# Begin Source File
SOURCE=.\StudioModelRenderer.cpp
# End Source File
# Begin Source File
SOURCE=.\text_message.cpp
# End Source File
# Begin Source File
SOURCE=.\train.cpp
# End Source File
# Begin Source File
SOURCE=.\tri.cpp
# End Source File
# Begin Source File
SOURCE=.\util.cpp
# End Source File
# Begin Source File
SOURCE=..\game_shared\vgui_checkbutton2.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_ClassMenu.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_ConsolePanel.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_ControlConfigPanel.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_CustomObjects.cpp
# End Source File
# Begin Source File
SOURCE=..\game_shared\vgui_grid.cpp
# End Source File
# Begin Source File
SOURCE=..\game_shared\vgui_helpers.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_int.cpp
# End Source File
# Begin Source File
SOURCE=..\game_shared\vgui_listbox.cpp
# End Source File
# Begin Source File
SOURCE=..\game_shared\vgui_loadtga.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_MOTDWindow.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_SchemeManager.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_ScorePanel.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_ServerBrowser.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_SpectatorPanel.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_TeamFortressViewport.cpp
# End Source File
# Begin Source File
SOURCE=.\vgui_teammenu.cpp
# End Source File
# Begin Source File
SOURCE=.\view.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=.\ammo.h
# End Source File
# Begin Source File
SOURCE=.\ammohistory.h
# End Source File
# Begin Source File
SOURCE=.\camera.h
# End Source File
# Begin Source File
SOURCE=.\cl_dll.h
# End Source File
# Begin Source File
SOURCE=.\com_weapons.h
# End Source File
# Begin Source File
SOURCE=.\demo.h
# End Source File
# Begin Source File
SOURCE=.\ev_hldm.h
# End Source File
# Begin Source File
SOURCE=.\eventscripts.h
# End Source File
# Begin Source File
SOURCE=.\GameStudioModelRenderer.h
# End Source File
# Begin Source File
SOURCE=.\health.h
# End Source File
# Begin Source File
SOURCE=.\hud.h
# End Source File
# Begin Source File
SOURCE=.\hud_iface.h
# End Source File
# Begin Source File
SOURCE=.\hud_servers.h
# End Source File
# Begin Source File
SOURCE=.\hud_servers_priv.h
# End Source File
# Begin Source File
SOURCE=.\hud_spectator.h
# End Source File
# Begin Source File
SOURCE=.\in_defs.h
# End Source File
# Begin Source File
SOURCE=.\input_mouse.h
# End Source File
# Begin Source File
SOURCE=..\common\itrackeruser.h
# End Source File
# Begin Source File
SOURCE=.\kbutton.h
# End Source File
# Begin Source File
SOURCE=.\overview.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_debug.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_defs.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_info.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_materials.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_movevars.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_shared.h
# End Source File
# Begin Source File
SOURCE=.\studio_util.h
# End Source File
# Begin Source File
SOURCE=.\StudioModelRenderer.h
# End Source File
# Begin Source File
SOURCE=.\util.h
# End Source File
# Begin Source File
SOURCE=.\util_vector.h
# End Source File
# Begin Source File
SOURCE=.\vgui_ConsolePanel.h
# End Source File
# Begin Source File
SOURCE=.\vgui_ControlConfigPanel.h
# End Source File
# Begin Source File
SOURCE=.\vgui_int.h
# End Source File
# Begin Source File
SOURCE=.\vgui_SchemeManager.h
# End Source File
# Begin Source File
SOURCE=.\vgui_ScorePanel.h
# End Source File
# Begin Source File
SOURCE=.\vgui_ServerBrowser.h
# End Source File
# Begin Source File
SOURCE=.\vgui_SpectatorPanel.h
# End Source File
# Begin Source File
SOURCE=.\vgui_TeamFortressViewport.h
# End Source File
# Begin Source File
SOURCE=.\view.h
# End Source File
# Begin Source File
SOURCE=..\game_shared\voice_banmgr.h
# End Source File
# Begin Source File
SOURCE=..\game_shared\voice_status.h
# End Source File
# Begin Source File
SOURCE=..\game_shared\voice_vgui_tweakdlg.h
# End Source File
# Begin Source File
SOURCE=.\wrect.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

8
cl_dll/in_camera.cpp

@ -148,7 +148,7 @@ void DLLEXPORT CAM_Think( void ) @@ -148,7 +148,7 @@ void DLLEXPORT CAM_Think( void )
float dist;
vec3_t camAngles;
float flSensitivity;
#ifdef LATER
#if LATER
int i;
#endif
vec3_t viewangles;
@ -168,7 +168,7 @@ void DLLEXPORT CAM_Think( void ) @@ -168,7 +168,7 @@ void DLLEXPORT CAM_Think( void )
if( !cam_thirdperson )
return;
#ifdef LATER
#if LATER
if( cam_contain->value )
{
gEngfuncs.GetClientOrigin( origin );
@ -315,7 +315,7 @@ void DLLEXPORT CAM_Think( void ) @@ -315,7 +315,7 @@ void DLLEXPORT CAM_Think( void )
cam_old_mouse_y = cam_mouse.y * gHUD.GetSensitivity();
SetCursorPos( gEngfuncs.GetWindowCenterX(), gEngfuncs.GetWindowCenterY() );
}
#ifdef LATER
#if LATER
if( cam_contain->value )
{
// check new ideal
@ -368,7 +368,7 @@ void DLLEXPORT CAM_Think( void ) @@ -368,7 +368,7 @@ void DLLEXPORT CAM_Think( void )
else
camAngles[2] += ( cam_idealdist->value - camAngles[2] ) * 0.25f;
}
#ifdef LATER
#if LATER
if( cam_contain->value )
{
// Test new position

2
cl_dll/in_defs.h

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
// fall over
#define ROLL 2
#ifdef _WIN32
#if _WIN32
#define HSPRITE HSPRITE_win32
#include <windows.h>
#undef HSPRITE

60
cl_dll/input_goldsource.cpp

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
#include "keydefs.h"
#include "view.h"
#ifndef _WIN32
#if !_WIN32
#define USE_SDL2
#endif
@ -114,7 +114,7 @@ static SDLFunction sdlFunctions[] = { @@ -114,7 +114,7 @@ static SDLFunction sdlFunctions[] = {
};
#endif
#ifdef _WIN32
#if _WIN32
#include <process.h>
#else
typedef unsigned int DWORD;
@ -149,14 +149,14 @@ extern cvar_t *cl_forwardspeed; @@ -149,14 +149,14 @@ extern cvar_t *cl_forwardspeed;
extern cvar_t *cl_pitchspeed;
extern cvar_t *cl_movespeedkey;
#ifdef _WIN32
#if _WIN32
static double s_flRawInputUpdateTime = 0.0f;
static bool m_bRawInput = false;
static bool m_bMouseThread = false;
bool isMouseRelative = false;
#endif
#ifdef _WIN32
#if _WIN32
#include "progdefs.h"
extern globalvars_t *gpGlobals;
#endif
@ -184,7 +184,7 @@ static cvar_t *m_customaccel_max; @@ -184,7 +184,7 @@ static cvar_t *m_customaccel_max;
//Mouse move is raised to this power before being scaled by scale factor
static cvar_t *m_customaccel_exponent;
#ifdef _WIN32
#if _WIN32
// if threaded mouse is enabled then the time to sleep between polls
static cvar_t *m_mousethread_sleep;
#endif
@ -276,7 +276,7 @@ cvar_t *joy_wwhack2; @@ -276,7 +276,7 @@ cvar_t *joy_wwhack2;
int joy_avail, joy_advancedinit, joy_haspov;
#ifdef _WIN32
#if _WIN32
unsigned int s_hMouseThreadId = 0;
HANDLE s_hMouseThread = 0;
HANDLE s_hMouseQuitEvent = 0;
@ -300,7 +300,7 @@ void Force_CenterView_f (void) @@ -300,7 +300,7 @@ void Force_CenterView_f (void)
}
}
#ifdef _WIN32
#if _WIN32
LONG mouseThreadActive = 0;
LONG mouseThreadCenterX = 0;
@ -382,14 +382,14 @@ void IN_SetMouseMode(bool enable) @@ -382,14 +382,14 @@ void IN_SetMouseMode(bool enable)
if(enable)
{
#ifdef _WIN32
#if _WIN32
if (mouseparmsvalid)
restore_spi = SystemParametersInfo (SPI_SETMOUSE, 0, newmouseparms, 0);
m_bRawInput = CVAR_GET_FLOAT( "m_rawinput" ) != 0;
if(m_bRawInput)
{
#ifdef USE_SDL2
#if USE_SDL2
safe_pfnSDL_SetRelativeMouseMode(SDL_TRUE);
#endif
isMouseRelative = true;
@ -402,10 +402,10 @@ void IN_SetMouseMode(bool enable) @@ -402,10 +402,10 @@ void IN_SetMouseMode(bool enable)
}
else
{
#ifdef _WIN32
#if _WIN32
if(isMouseRelative)
{
#ifdef USE_SDL2
#if USE_SDL2
safe_pfnSDL_SetRelativeMouseMode(SDL_FALSE);
#endif
isMouseRelative = false;
@ -423,7 +423,7 @@ void IN_SetMouseMode(bool enable) @@ -423,7 +423,7 @@ void IN_SetMouseMode(bool enable)
void IN_SetVisibleMouse(bool visible)
{
#ifdef _WIN32
#if _WIN32
bool lockEntered = MouseThread_ActiveLock_Enter();
#endif
@ -431,7 +431,7 @@ void IN_SetVisibleMouse(bool visible) @@ -431,7 +431,7 @@ void IN_SetVisibleMouse(bool visible)
IN_SetMouseMode(!visible);
#ifdef _WIN32
#if _WIN32
UpdateMouseThreadActive();
if(lockEntered) MouseThread_ActiveLock_Exit();
#endif
@ -448,7 +448,7 @@ void GoldSourceInput::IN_ActivateMouse (void) @@ -448,7 +448,7 @@ void GoldSourceInput::IN_ActivateMouse (void)
{
if (mouseinitialized)
{
#ifdef _WIN32
#if _WIN32
bool lockEntered = MouseThread_ActiveLock_Enter();
#endif
@ -456,7 +456,7 @@ void GoldSourceInput::IN_ActivateMouse (void) @@ -456,7 +456,7 @@ void GoldSourceInput::IN_ActivateMouse (void)
mouseactive = 1;
#ifdef _WIN32
#if _WIN32
UpdateMouseThreadActive();
if(lockEntered) MouseThread_ActiveLock_Exit();
#endif
@ -476,7 +476,7 @@ void GoldSourceInput::IN_DeactivateMouse (void) @@ -476,7 +476,7 @@ void GoldSourceInput::IN_DeactivateMouse (void)
{
if (mouseinitialized)
{
#ifdef _WIN32
#if _WIN32
bool lockEntered = MouseThread_ActiveLock_Enter();
#endif
@ -484,7 +484,7 @@ void GoldSourceInput::IN_DeactivateMouse (void) @@ -484,7 +484,7 @@ void GoldSourceInput::IN_DeactivateMouse (void)
mouseactive = 0;
#ifdef _WIN32
#if _WIN32
UpdateMouseThreadActive();
if(lockEntered) MouseThread_ActiveLock_Exit();
#endif
@ -502,7 +502,7 @@ void GoldSourceInput::IN_StartupMouse (void) @@ -502,7 +502,7 @@ void GoldSourceInput::IN_StartupMouse (void)
return;
mouseinitialized = 1;
#ifdef _WIN32
#if _WIN32
mouseparmsvalid = SystemParametersInfo (SPI_GETMOUSE, 0, originalmouseparms, 0);
if (mouseparmsvalid)
@ -537,7 +537,7 @@ void GoldSourceInput::IN_Shutdown (void) @@ -537,7 +537,7 @@ void GoldSourceInput::IN_Shutdown (void)
{
IN_DeactivateMouse ();
#ifdef _WIN32
#if _WIN32
if ( s_hMouseQuitEvent )
{
SetEvent( s_hMouseQuitEvent );
@ -597,7 +597,7 @@ FIXME: Call through to engine? @@ -597,7 +597,7 @@ FIXME: Call through to engine?
void IN_ResetMouse( void )
{
// no work to do in SDL
#ifdef _WIN32
#if _WIN32
// reset only if mouse is active and not in visible mode:
if(mouseactive && !iVisibleMouse && gEngfuncs.GetWindowCenterX && gEngfuncs.GetWindowCenterY)
{
@ -712,7 +712,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY) @@ -712,7 +712,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY)
if(active)
{
int deltaX, deltaY;
#ifdef _WIN32
#if _WIN32
if ( !m_bRawInput )
{
if ( m_bMouseThread )
@ -746,7 +746,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY) @@ -746,7 +746,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY)
#endif
}
#ifdef _WIN32
#if _WIN32
if ( !m_bRawInput )
{
if ( m_bMouseThread )
@ -771,7 +771,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY) @@ -771,7 +771,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY)
my_accum = 0;
// reset mouse position if required, so there is room to move:
#ifdef _WIN32
#if _WIN32
// do not reset if mousethread would do it:
if ( m_bRawInput || !m_bMouseThread )
#else
@ -779,7 +779,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY) @@ -779,7 +779,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY)
#endif
IN_ResetMouse();
#ifdef _WIN32
#if _WIN32
// update m_bRawInput occasionally:
if ( gpGlobals && gpGlobals->time - s_flRawInputUpdateTime > 1.0f )
{
@ -791,14 +791,14 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY) @@ -791,14 +791,14 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY)
if(m_bRawInput && !isMouseRelative)
{
#ifdef USE_SDL2
#if USE_SDL2
safe_pfnSDL_SetRelativeMouseMode(SDL_TRUE);
#endif
isMouseRelative = true;
}
else if(!m_bRawInput && isMouseRelative)
{
#ifdef USE_SDL2
#if USE_SDL2
safe_pfnSDL_SetRelativeMouseMode(SDL_FALSE);
#endif
isMouseRelative = false;
@ -928,7 +928,7 @@ void GoldSourceInput::IN_Accumulate (void) @@ -928,7 +928,7 @@ void GoldSourceInput::IN_Accumulate (void)
{
if (mouseactive)
{
#ifdef _WIN32
#if _WIN32
if ( !m_bRawInput )
{
if ( !m_bMouseThread )
@ -956,7 +956,7 @@ void GoldSourceInput::IN_Accumulate (void) @@ -956,7 +956,7 @@ void GoldSourceInput::IN_Accumulate (void)
}
// force the mouse to the center, so there's room to move
#ifdef _WIN32
#if _WIN32
// do not reset if mousethread would do it:
if ( m_bRawInput || !m_bMouseThread )
#else
@ -1570,7 +1570,7 @@ void GoldSourceInput::IN_Init (void) @@ -1570,7 +1570,7 @@ void GoldSourceInput::IN_Init (void)
m_customaccel_max = gEngfuncs.pfnRegisterVariable ( "m_customaccel_max", "0", FCVAR_ARCHIVE );
m_customaccel_exponent = gEngfuncs.pfnRegisterVariable ( "m_customaccel_exponent", "1", FCVAR_ARCHIVE );
#ifdef _WIN32
#if _WIN32
m_bRawInput = CVAR_GET_FLOAT( "m_rawinput" ) != 0;
m_bMouseThread = gEngfuncs.CheckParm ("-mousethread", NULL ) != NULL;
m_mousethread_sleep = gEngfuncs.pfnRegisterVariable ( "m_mousethread_sleep", "1", FCVAR_ARCHIVE ); // default to less than 1000 Hz
@ -1601,7 +1601,7 @@ void GoldSourceInput::IN_Init (void) @@ -1601,7 +1601,7 @@ void GoldSourceInput::IN_Init (void)
#endif
#ifdef USE_SDL2
#ifdef __APPLE__
#if __APPLE__
#define SDL2_FULL_LIBNAME "libsdl2-2.0.0.dylib"
#else
#define SDL2_FULL_LIBNAME "libSDL2-2.0.so.0"

2
cl_dll/tf_defs.h

@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
// Debug Options
//#define MAP_DEBUG // Debug for Map code. I suggest running in a hi-res
// mode and/or piping the output from the server to a file.
#ifdef MAP_DEBUG
#if MAP_DEBUG
#define MDEBUG(x) x
#else
#define MDEBUG(x)

2
dlls/apache.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#ifndef OEM_BUILD
#if !OEM_BUILD
#include "extdll.h"
#include "util.h"

4
dlls/barnacle.cpp

@ -57,7 +57,7 @@ public: @@ -57,7 +57,7 @@ public:
// FIXME: need a custom barnacle model with non-generic hitgroup
// otherwise we can apply to damage to tongue instead of body
#ifdef BARNACLE_FIX_VISIBILITY
#if BARNACLE_FIX_VISIBILITY
void SetObjectCollisionBox( void )
{
pev->absmin = pev->origin + Vector( -16.0f, -16.0f, -m_flCachedLength );
@ -163,7 +163,7 @@ void CBarnacle::BarnacleThink( void ) @@ -163,7 +163,7 @@ void CBarnacle::BarnacleThink( void )
CBaseEntity *pTouchEnt;
CBaseMonster *pVictim;
float flLength;
#ifdef BARNACLE_FIX_VISIBILITY
#if BARNACLE_FIX_VISIBILITY
if( m_flCachedLength != ( m_flAltitude + m_flTongueAdj ) || ( pev->absmin.z != pev->origin.z + -m_flCachedLength ) )
{
// recalc collision box here to avoid barnacle disappears bug

2
dlls/bigmomma.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
//=========================================================
// monster template

4
dlls/cbase.cpp

@ -100,7 +100,7 @@ static DLL_FUNCTIONS gFunctionTable = @@ -100,7 +100,7 @@ static DLL_FUNCTIONS gFunctionTable =
static void SetObjectCollisionBox( entvars_t *pev );
#ifndef _WIN32
#if !_WIN32
extern "C" {
#endif
int GetEntityAPI( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion )
@ -127,7 +127,7 @@ int GetEntityAPI2( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion ) @@ -127,7 +127,7 @@ int GetEntityAPI2( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion )
return TRUE;
}
#ifndef _WIN32
#if !_WIN32
}
#endif

4
dlls/cbase.h

@ -392,7 +392,7 @@ public: @@ -392,7 +392,7 @@ public:
}
// Ugly code to lookup all functions to make sure they are exported when set.
#ifdef _DEBUG
#if _DEBUG
void FunctionCheck( void *pFunction, char *name )
{
if( pFunction && !NAME_FOR_FUNCTION( pFunction ) )
@ -472,7 +472,7 @@ inline BOOL FNullEnt( CBaseEntity *ent ) { return ent == NULL || FNullEnt( ent-> @@ -472,7 +472,7 @@ inline BOOL FNullEnt( CBaseEntity *ent ) { return ent == NULL || FNullEnt( ent->
// Normally it's illegal to cast a pointer to a member function of a derived class to a pointer to a
// member function of a base class. static_cast is a sleezy way around that problem.
#ifdef _DEBUG
#if _DEBUG
#define SetThink( a ) ThinkSet( static_cast <void (CBaseEntity::*)(void)> (a), #a )
#define SetTouch( a ) TouchSet( static_cast <void (CBaseEntity::*)(CBaseEntity *)> (a), #a )

8
dlls/client.cpp

@ -211,7 +211,7 @@ void ClientPutInServer( edict_t *pEntity ) @@ -211,7 +211,7 @@ void ClientPutInServer( edict_t *pEntity )
pPlayer->pev->iuser2 = 0;
}
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
#include "voice_gamemgr.h"
extern CVoiceGameMgr g_VoiceGameMgr;
#endif
@ -407,7 +407,7 @@ void Host_Say( edict_t *pEntity, int teamonly ) @@ -407,7 +407,7 @@ void Host_Say( edict_t *pEntity, int teamonly )
if( !( client->IsNetClient() ) ) // Not a client ? (should never be true)
continue;
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
// can the receiver hear the sender? or has he muted him?
if( g_VoiceGameMgr.PlayerHasBlockedPlayer( client, player ) )
continue;
@ -1664,7 +1664,7 @@ void RegisterEncoders( void ) @@ -1664,7 +1664,7 @@ void RegisterEncoders( void )
int GetWeaponData( struct edict_s *player, struct weapon_data_s *info )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
int i;
weapon_data_t *item;
entvars_t *pev = &player->v;
@ -1793,7 +1793,7 @@ void UpdateClientData( const struct edict_s *ent, int sendweapons, struct client @@ -1793,7 +1793,7 @@ void UpdateClientData( const struct edict_s *ent, int sendweapons, struct client
cd->iuser1 = pev->iuser1;
cd->iuser2 = pev->iuser2;
}
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
if( sendweapons )
{
if( pl )

2
dlls/compile.bat

@ -113,7 +113,7 @@ set LIBS=user32.lib @@ -113,7 +113,7 @@ set LIBS=user32.lib
set OUTNAME=hl.dll
set DEBUG=/debug
cl %DEFINES% %LIBS% %SOURCES% %INCLUDES% -o %OUTNAME% /link /dll /out:%OUTNAME% %DEBUG% /def:".\hl.def"
cl %DEFINES% %LIBS% %SOURCES% %INCLUDES% -o %OUTNAME% /link /dll /out:%OUTNAME% %DEBUG%
echo -- Compile done. Cleaning...

2
dlls/controller.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
//=========================================================
// CONTROLLER

14
dlls/crossbow.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* without written permission from Valve LLC.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h"
#include "util.h"
@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
#include "player.h"
#include "gamerules.h"
#ifndef CLIENT_DLL
#if !CLIENT_DLL
#define BOLT_AIR_VELOCITY 2000
#define BOLT_WATER_VELOCITY 1000
@ -338,7 +338,7 @@ void CCrossbow::Holster( int skiplocal /* = 0 */ ) @@ -338,7 +338,7 @@ void CCrossbow::Holster( int skiplocal /* = 0 */ )
void CCrossbow::PrimaryAttack( void )
{
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( m_fInZoom && bIsMultiplayer() )
#else
if( m_fInZoom && g_pGameRules->IsMultiplayer() )
@ -368,7 +368,7 @@ void CCrossbow::FireSniperBolt() @@ -368,7 +368,7 @@ void CCrossbow::FireSniperBolt()
m_iClip--;
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -386,7 +386,7 @@ void CCrossbow::FireSniperBolt() @@ -386,7 +386,7 @@ void CCrossbow::FireSniperBolt()
UTIL_TraceLine( vecSrc, vecSrc + vecDir * 8192, dont_ignore_monsters, m_pPlayer->edict(), &tr );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( tr.pHit->v.takedamage )
{
ClearMultiDamage();
@ -411,7 +411,7 @@ void CCrossbow::FireBolt() @@ -411,7 +411,7 @@ void CCrossbow::FireBolt()
m_iClip--;
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -427,7 +427,7 @@ void CCrossbow::FireBolt() @@ -427,7 +427,7 @@ void CCrossbow::FireBolt()
anglesAim.x = -anglesAim.x;
#ifndef CLIENT_DLL
#if !CLIENT_DLL
Vector vecSrc = m_pPlayer->GetGunPosition() - gpGlobals->v_up * 2.0f;
Vector vecDir = gpGlobals->v_forward;

18
dlls/crowbar.cpp

@ -37,7 +37,7 @@ enum crowbar_e @@ -37,7 +37,7 @@ enum crowbar_e
CROWBAR_ATTACK2MISS,
CROWBAR_ATTACK2HIT,
CROWBAR_ATTACK3MISS,
#ifndef CROWBAR_IDLE_ANIM
#if !CROWBAR_IDLE_ANIM
CROWBAR_ATTACK3HIT
#else
CROWBAR_ATTACK3HIT,
@ -155,7 +155,7 @@ void CCrowbar::PrimaryAttack() @@ -155,7 +155,7 @@ void CCrowbar::PrimaryAttack()
{
if( !Swing( 1 ) )
{
#ifndef CLIENT_DLL
#if !CLIENT_DLL
SetThink( &CCrowbar::SwingAgain );
SetNextThink( 0.1f );
#endif
@ -184,7 +184,7 @@ int CCrowbar::Swing( int fFirst ) @@ -184,7 +184,7 @@ int CCrowbar::Swing( int fFirst )
UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( tr.flFraction >= 1.0f )
{
UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr );
@ -206,7 +206,7 @@ int CCrowbar::Swing( int fFirst ) @@ -206,7 +206,7 @@ int CCrowbar::Swing( int fFirst )
{
// miss
m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 );
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
#endif
switch( ( m_iSwing++ ) % 3 )
@ -246,7 +246,7 @@ int CCrowbar::Swing( int fFirst ) @@ -246,7 +246,7 @@ int CCrowbar::Swing( int fFirst )
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
// hit
fDidHit = TRUE;
CBaseEntity *pEntity = CBaseEntity::Instance( tr.pHit );
@ -261,7 +261,7 @@ int CCrowbar::Swing( int fFirst ) @@ -261,7 +261,7 @@ int CCrowbar::Swing( int fFirst )
// If building with the clientside weapon prediction system,
// UTIL_WeaponTimeBase() is always 0 and m_flNextPrimaryAttack is >= -1.0f, thus making
// m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() always evaluate to false.
#ifdef CLIENT_WEAPONS
#if CLIENT_WEAPONS
if( ( m_flNextPrimaryAttack + 1.0f == UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() )
#else
if( ( m_flNextPrimaryAttack + 1.0f < UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() )
@ -297,7 +297,7 @@ int CCrowbar::Swing( int fFirst ) @@ -297,7 +297,7 @@ int CCrowbar::Swing( int fFirst )
if( !pEntity->IsAlive() )
{
#ifdef CROWBAR_FIX_RAPID_CROWBAR
#if CROWBAR_FIX_RAPID_CROWBAR
m_flNextPrimaryAttack = GetNextAttackDelay(0.25);
#endif
return TRUE;
@ -350,13 +350,13 @@ int CCrowbar::Swing( int fFirst ) @@ -350,13 +350,13 @@ int CCrowbar::Swing( int fFirst )
m_flNextPrimaryAttack = GetNextAttackDelay( 0.25f );
#endif
}
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
#endif
return fDidHit;
}
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
void CCrowbar::WeaponIdle( void )
{
if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() )

2
dlls/doors.cpp

@ -870,7 +870,7 @@ void CBaseDoor::DoorGoDown( void ) @@ -870,7 +870,7 @@ void CBaseDoor::DoorGoDown( void )
if( !FBitSet( pev->spawnflags, SF_DOOR_SILENT ) )
if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN )
EMIT_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noiseMoving ), 1.0f, ATTN_NORM );
#ifdef DOOR_ASSERT
#if DOOR_ASSERT
ASSERT( m_toggle_state == TS_AT_TOP );
#endif // DOOR_ASSERT
m_toggle_state = TS_GOING_DOWN;

16
dlls/egon.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* without written permission from Valve LLC.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h"
#include "util.h"
@ -178,7 +178,7 @@ void CEgon::Attack( void ) @@ -178,7 +178,7 @@ void CEgon::Attack( void )
Vector vecSrc = m_pPlayer->GetGunPosition();
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -252,7 +252,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir ) @@ -252,7 +252,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir )
if( tr.fAllSolid )
return;
#ifndef CLIENT_DLL
#if !CLIENT_DLL
CBaseEntity *pEntity = CBaseEntity::Instance( tr.pHit );
if( pEntity == NULL )
@ -275,7 +275,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir ) @@ -275,7 +275,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir )
switch( m_fireMode )
{
case FIRE_NARROW:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( pev->dmgtime < gpGlobals->time )
{
// Narrow mode only does damage to the entity it hits
@ -311,7 +311,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir ) @@ -311,7 +311,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir )
timedist = ( pev->dmgtime - gpGlobals->time ) / GetPulseInterval();
break;
case FIRE_WIDE:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( pev->dmgtime < gpGlobals->time )
{
// wide mode does damage to the ent, and radius damage
@ -373,7 +373,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir ) @@ -373,7 +373,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir )
void CEgon::UpdateEffect( const Vector &startPoint, const Vector &endPoint, float timeBlend )
{
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( !m_pBeam )
{
CreateEffect();
@ -401,7 +401,7 @@ void CEgon::UpdateEffect( const Vector &startPoint, const Vector &endPoint, floa @@ -401,7 +401,7 @@ void CEgon::UpdateEffect( const Vector &startPoint, const Vector &endPoint, floa
void CEgon::CreateEffect( void )
{
#ifndef CLIENT_DLL
#if !CLIENT_DLL
DestroyEffect();
m_pBeam = CBeam::BeamCreate( EGON_BEAM_SPRITE, 40 );
@ -447,7 +447,7 @@ void CEgon::CreateEffect( void ) @@ -447,7 +447,7 @@ void CEgon::CreateEffect( void )
void CEgon::DestroyEffect( void )
{
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( m_pBeam )
{
UTIL_Remove( m_pBeam );

2
dlls/exportdef.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#ifndef EXPORTDEF_H
#define EXPORTDEF_H
#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#if __GNUC__
#define EXPORT __attribute__ ((dllexport))
#else
#define EXPORT __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.

6
dlls/extdll.h

@ -21,12 +21,12 @@ @@ -21,12 +21,12 @@
//
// Allow "DEBUG" in addition to default "_DEBUG"
#ifdef _DEBUG
#if _DEBUG
#define DEBUG 1
#endif
// Silence certain warnings
#ifdef _MSC_VER
#if _MSC_VER
#pragma warning(disable : 4244) // int or float down-conversion
#pragma warning(disable : 4305) // int or float data truncation
#pragma warning(disable : 4201) // nameless struct/union
@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
#endif
// Prevent tons of unused windows definitions
#ifdef _WIN32
#if _WIN32
#define WIN32_LEAN_AND_MEAN
#define NOWINRES
#define NOSERVICE

2
dlls/gargantua.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#ifndef OEM_BUILD
#if !OEM_BUILD
//=========================================================
// Gargantua

24
dlls/gauss.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* without written permission from Valve LLC.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h"
#include "util.h"
@ -46,7 +46,7 @@ LINK_ENTITY_TO_CLASS( weapon_gauss, CGauss ) @@ -46,7 +46,7 @@ LINK_ENTITY_TO_CLASS( weapon_gauss, CGauss )
float CGauss::GetFullChargeTime( void )
{
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -58,7 +58,7 @@ float CGauss::GetFullChargeTime( void ) @@ -58,7 +58,7 @@ float CGauss::GetFullChargeTime( void )
return 4.0f;
}
#ifdef CLIENT_DLL
#if CLIENT_DLL
extern int g_irunninggausspred;
#endif
@ -228,7 +228,7 @@ void CGauss::SecondaryAttack() @@ -228,7 +228,7 @@ void CGauss::SecondaryAttack()
// during the charging process, eat one bit of ammo every once in a while
if( UTIL_WeaponTimeBase() >= m_pPlayer->m_flNextAmmoBurn && m_pPlayer->m_flNextAmmoBurn != 1000 )
{
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -271,7 +271,7 @@ void CGauss::SecondaryAttack() @@ -271,7 +271,7 @@ void CGauss::SecondaryAttack()
if( m_iSoundState == 0 )
ALERT( at_console, "sound state %d\n", m_iSoundState );
#ifdef GAUSS_OVERCHARGE_FIX
#if GAUSS_OVERCHARGE_FIX
if (!overcharge)
#endif
PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usGaussSpin, 0.0f, g_vecZero, g_vecZero, 0.0f, 0.0f, pitch, 0, ( m_iSoundState == SND_CHANGE_PITCH ) ? 1 : 0, 0 );
@ -284,7 +284,7 @@ void CGauss::SecondaryAttack() @@ -284,7 +284,7 @@ void CGauss::SecondaryAttack()
if( overcharge )
{
// Player charged up too long. Zap him.
#ifdef GAUSS_OVERCHARGE_FIX
#if GAUSS_OVERCHARGE_FIX
PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usGaussSpin, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, pitch, 0, 0, 1 );
#endif
EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/electro4.wav", 1.0f, ATTN_NORM, 0, 80 + RANDOM_LONG( 0, 0x3f ) );
@ -293,7 +293,7 @@ void CGauss::SecondaryAttack() @@ -293,7 +293,7 @@ void CGauss::SecondaryAttack()
m_fInAttack = 0;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.0f;
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 1.0f;
#ifndef CLIENT_DLL
#if !CLIENT_DLL
m_pPlayer->TakeDamage( VARS( eoNullEntity ), VARS( eoNullEntity ), 50, DMG_SHOCK );
UTIL_ScreenFade( m_pPlayer, Vector( 255, 128, 0 ), 2, 0.5f, 128, FFADE_IN );
#endif
@ -331,7 +331,7 @@ void CGauss::StartFire( void ) @@ -331,7 +331,7 @@ void CGauss::StartFire( void )
if( m_fPrimaryFire )
{
// fixed damage on primary attack
#ifdef CLIENT_DLL
#if CLIENT_DLL
flDamage = 20.0f;
#else
flDamage = gSkillData.plrDmgGauss;
@ -341,7 +341,7 @@ void CGauss::StartFire( void ) @@ -341,7 +341,7 @@ void CGauss::StartFire( void )
if( m_fInAttack != 3 )
{
//ALERT( at_console, "Time:%f Damage:%f\n", gpGlobals->time - m_pPlayer->m_flStartCharge, flDamage );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
float flZVel = m_pPlayer->pev->velocity.z;
if( !m_fPrimaryFire )
@ -369,7 +369,7 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage ) @@ -369,7 +369,7 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage )
{
m_pPlayer->m_iWeaponVolume = GAUSS_PRIMARY_FIRE_VOLUME;
TraceResult tr, beam_tr;
#ifndef CLIENT_DLL
#if !CLIENT_DLL
Vector vecSrc = vecOrigSrc;
Vector vecDest = vecSrc + vecDir * 8192.0f;
edict_t *pentIgnore;
@ -399,7 +399,7 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage ) @@ -399,7 +399,7 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage )
//ALERT( at_console, "%f %f\n", tr.flFraction, flMaxFrac );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
while( flDamage > 10 && nMaxHits > 0 )
{
nMaxHits--;
@ -591,7 +591,7 @@ void CGauss::WeaponIdle( void ) @@ -591,7 +591,7 @@ void CGauss::WeaponIdle( void )
iAnim = GAUSS_FIDGET;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0f;
}
#ifndef CLIENT_DLL
#if !CLIENT_DLL
SendWeaponAnim( iAnim );
#endif
}

2
dlls/glock.cpp

@ -138,7 +138,7 @@ void CGlock::GlockFire( float flSpread, float flCycleTime, BOOL fUseAutoAim ) @@ -138,7 +138,7 @@ void CGlock::GlockFire( float flSpread, float flCycleTime, BOOL fUseAutoAim )
m_pPlayer->pev->effects = (int)( m_pPlayer->pev->effects ) | EF_MUZZLEFLASH;
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;

2
dlls/h_cycler.cpp

@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
#include "player.h"
#define TEMP_FOR_SCREEN_SHOTS
#ifdef TEMP_FOR_SCREEN_SHOTS //===================================================
#if defined(TEMP_FOR_SCREEN_SHOTS) //===================================================
class CCycler : public CBaseMonster
{

6
dlls/h_export.cpp

@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
enginefuncs_t g_engfuncs;
globalvars_t *gpGlobals;
#ifdef _WIN32
#if _WIN32
// Required DLL entry point
BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
@ -43,8 +43,8 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) @@ -43,8 +43,8 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
return TRUE;
}
// stdcall for win32
#define EXPORT2 WINAPI
// cdecl for win32
#define EXPORT2 WINAPIV
#else
#define EXPORT2
#endif

2
dlls/handgrenade.cpp

@ -43,7 +43,7 @@ void CHandGrenade::Spawn() @@ -43,7 +43,7 @@ void CHandGrenade::Spawn()
m_iId = WEAPON_HANDGRENADE;
SET_MODEL( ENT( pev ), "models/w_grenade.mdl" );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
pev->dmg = gSkillData.plrDmgHandGrenade;
#endif
m_iDefaultAmmo = HANDGRENADE_DEFAULT_GIVE;

2
dlls/hassassin.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
//=========================================================
// hassassin - Human assassin, fast and stealthy

5
dlls/hl.def

@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
LIBRARY spirit
EXPORTS
GiveFnptrsToDll @1
SECTIONS
.data READ WRITE

766
dlls/hl.dsp

@ -1,766 +0,0 @@ @@ -1,766 +0,0 @@
# Microsoft Developer Studio Project File - Name="hl" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=hl - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "hl.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "hl.mak" CFG="hl - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "hl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "hl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "hl - Win32 Profile" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""$/GoldSrc/dlls", ELEBAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "hl - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ".\Releasehl"
# PROP Intermediate_Dir ".\Releasehl"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /G5 /MT /W3 /Zi /O2 /I "..\dlls" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\game_shared" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "QUIVER" /D "VOXEL" /D "QUAKE2" /D "VALVE_DLL" /D "CLIENT_WEAPONS" /Fr /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /map /debug /machine:I386 /def:".\hl.def" /out:".\Releasehl/spirit.dll"
# SUBTRACT LINK32 /profile
# Begin Custom Build
TargetDir=.\Releasehl
InputPath=.\Releasehl\spirit.dll
SOURCE="$(InputPath)"
"C:\games\half-life\spiritdev\dlls\spirit.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(TargetDir)\spirit.dll "C:\games\half-life\spiritdev\dlls\spirit.dll"
# End Custom Build
!ELSEIF "$(CFG)" == "hl - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\hl___Win"
# PROP BASE Intermediate_Dir ".\hl___Win"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ".\debughl"
# PROP Intermediate_Dir ".\debughl"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /G5 /MTd /W3 /Gm /ZI /Od /I "..\dlls" /I "..\engine" /I "..\common" /I "..\game_shared" /I "..\pm_shared" /I "..\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "QUIVER" /D "VOXEL" /D "QUAKE2" /D "VALVE_DLL" /D "CLIENT_WEAPONS" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /i "..\engine" /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
# ADD LINK32 user32.lib advapi32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:".\hl.def" /out:".\debughl/spirit.dll" /implib:".\Debug\hl.lib"
# SUBTRACT LINK32 /profile
# Begin Custom Build
TargetDir=.\debughl
InputPath=.\debughl\spirit.dll
SOURCE="$(InputPath)"
"C:\sierra\half-life\spiritdev\dlls\spirit.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(TargetDir)\spirit.dll "C:\sierra\half-life\spiritdev\dlls\spirit.dll"
# End Custom Build
!ELSEIF "$(CFG)" == "hl - Win32 Profile"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\hl___Win"
# PROP BASE Intermediate_Dir ".\hl___Win"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ".\Profilehl"
# PROP Intermediate_Dir ".\Profilehl"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /I "..\engine" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "QUIVER" /D "VOXEL" /D "QUAKE2" /D "VALVE_DLL" /YX /c
# SUBTRACT BASE CPP /Fr
# ADD CPP /nologo /G5 /MT /W3 /Zi /O2 /I "..\dlls" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\game_shared" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "QUIVER" /D "VOXEL" /D "QUAKE2" /D "VALVE_DLL" /D "CLIENT_WEAPONS" /Fr /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:".\hl.def"
# SUBTRACT BASE LINK32 /profile
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /profile /debug /machine:I386 /def:".\hl.def" /out:".\Profilehl/spirit.dll"
# Begin Custom Build
TargetDir=.\Profilehl
InputPath=.\Profilehl\spirit.dll
SOURCE="$(InputPath)"
"C:\sierra\half-life\spiritdev\dlls\spirit.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(TargetDir)\spirit.dll "C:\sierra\half-life\spiritdev\dlls\spirit.dll"
# End Custom Build
!ENDIF
# Begin Target
# Name "hl - Win32 Release"
# Name "hl - Win32 Debug"
# Name "hl - Win32 Profile"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
# Begin Source File
SOURCE=.\aflock.cpp
# End Source File
# Begin Source File
SOURCE=.\agrunt.cpp
# End Source File
# Begin Source File
SOURCE=.\AI_BaseNPC_Schedule.cpp
# End Source File
# Begin Source File
SOURCE=.\airtank.cpp
# End Source File
# Begin Source File
SOURCE=.\alias.cpp
# End Source File
# Begin Source File
SOURCE=.\animating.cpp
# End Source File
# Begin Source File
SOURCE=.\animation.cpp
# End Source File
# Begin Source File
SOURCE=.\apache.cpp
# End Source File
# Begin Source File
SOURCE=.\barnacle.cpp
# End Source File
# Begin Source File
SOURCE=.\barney.cpp
# End Source File
# Begin Source File
SOURCE=.\bigmomma.cpp
# End Source File
# Begin Source File
SOURCE=.\bloater.cpp
# End Source File
# Begin Source File
SOURCE=.\bmodels.cpp
# End Source File
# Begin Source File
SOURCE=.\bullsquid.cpp
# End Source File
# Begin Source File
SOURCE=.\buttons.cpp
# End Source File
# Begin Source File
SOURCE=.\cbase.cpp
# End Source File
# Begin Source File
SOURCE=.\client.cpp
# End Source File
# Begin Source File
SOURCE=.\combat.cpp
# End Source File
# Begin Source File
SOURCE=.\controller.cpp
# End Source File
# Begin Source File
SOURCE=.\crossbow.cpp
# End Source File
# Begin Source File
SOURCE=.\crowbar.cpp
# End Source File
# Begin Source File
SOURCE=.\defaultai.cpp
# End Source File
# Begin Source File
SOURCE=.\doors.cpp
# End Source File
# Begin Source File
SOURCE=.\effects.cpp
# End Source File
# Begin Source File
SOURCE=.\egon.cpp
# End Source File
# Begin Source File
SOURCE=.\explode.cpp
# End Source File
# Begin Source File
SOURCE=.\flyingmonster.cpp
# End Source File
# Begin Source File
SOURCE=.\func_break.cpp
# End Source File
# Begin Source File
SOURCE=.\func_tank.cpp
# End Source File
# Begin Source File
SOURCE=.\game.cpp
# End Source File
# Begin Source File
SOURCE=.\gamerules.cpp
# End Source File
# Begin Source File
SOURCE=.\gargantua.cpp
# End Source File
# Begin Source File
SOURCE=.\gauss.cpp
# End Source File
# Begin Source File
SOURCE=.\genericmonster.cpp
# End Source File
# Begin Source File
SOURCE=.\ggrenade.cpp
# End Source File
# Begin Source File
SOURCE=.\globals.cpp
# End Source File
# Begin Source File
SOURCE=.\gman.cpp
# End Source File
# Begin Source File
SOURCE=.\h_ai.cpp
# End Source File
# Begin Source File
SOURCE=.\h_battery.cpp
# End Source File
# Begin Source File
SOURCE=.\h_cine.cpp
# End Source File
# Begin Source File
SOURCE=.\h_cycler.cpp
# End Source File
# Begin Source File
SOURCE=.\h_export.cpp
# End Source File
# Begin Source File
SOURCE=.\handgrenade.cpp
# End Source File
# Begin Source File
SOURCE=.\hassassin.cpp
# End Source File
# Begin Source File
SOURCE=.\headcrab.cpp
# End Source File
# Begin Source File
SOURCE=.\healthkit.cpp
# End Source File
# Begin Source File
SOURCE=.\hgrunt.cpp
# End Source File
# Begin Source File
SOURCE=.\wpn_shared\hl_wpn_glock.cpp
# End Source File
# Begin Source File
SOURCE=.\hornet.cpp
# End Source File
# Begin Source File
SOURCE=.\hornetgun.cpp
# End Source File
# Begin Source File
SOURCE=.\houndeye.cpp
# End Source File
# Begin Source File
SOURCE=.\ichthyosaur.cpp
# End Source File
# Begin Source File
SOURCE=.\islave.cpp
# End Source File
# Begin Source File
SOURCE=.\items.cpp
# End Source File
# Begin Source File
SOURCE=.\leech.cpp
# End Source File
# Begin Source File
SOURCE=.\lights.cpp
# End Source File
# Begin Source File
SOURCE=.\locus.cpp
# End Source File
# Begin Source File
SOURCE=.\maprules.cpp
# End Source File
# Begin Source File
SOURCE=.\monstermaker.cpp
# End Source File
# Begin Source File
SOURCE=.\monsters.cpp
# End Source File
# Begin Source File
SOURCE=.\monsterstate.cpp
# End Source File
# Begin Source File
SOURCE=.\mortar.cpp
# End Source File
# Begin Source File
SOURCE=.\movewith.cpp
# End Source File
# Begin Source File
SOURCE=.\mp5.cpp
# End Source File
# Begin Source File
SOURCE=.\multiplay_gamerules.cpp
# End Source File
# Begin Source File
SOURCE=.\nihilanth.cpp
# End Source File
# Begin Source File
SOURCE=.\nodes.cpp
# End Source File
# Begin Source File
SOURCE=.\osprey.cpp
# End Source File
# Begin Source File
SOURCE=.\pathcorner.cpp
# End Source File
# Begin Source File
SOURCE=.\plane.cpp
# End Source File
# Begin Source File
SOURCE=.\plats.cpp
# End Source File
# Begin Source File
SOURCE=.\player.cpp
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_debug.c
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_math.c
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_shared.c
# End Source File
# Begin Source File
SOURCE=.\python.cpp
# End Source File
# Begin Source File
SOURCE=.\rat.cpp
# End Source File
# Begin Source File
SOURCE=.\roach.cpp
# End Source File
# Begin Source File
SOURCE=.\rpg.cpp
# End Source File
# Begin Source File
SOURCE=.\satchel.cpp
# End Source File
# Begin Source File
SOURCE=.\scientist.cpp
# End Source File
# Begin Source File
SOURCE=.\scripted.cpp
# End Source File
# Begin Source File
SOURCE=.\shotgun.cpp
# End Source File
# Begin Source File
SOURCE=.\singleplay_gamerules.cpp
# End Source File
# Begin Source File
SOURCE=.\skill.cpp
# End Source File
# Begin Source File
SOURCE=.\sound.cpp
# End Source File
# Begin Source File
SOURCE=.\soundent.cpp
# End Source File
# Begin Source File
SOURCE=.\spectator.cpp
# End Source File
# Begin Source File
SOURCE=.\squadmonster.cpp
# End Source File
# Begin Source File
SOURCE=.\squeakgrenade.cpp
# End Source File
# Begin Source File
SOURCE=.\subs.cpp
# End Source File
# Begin Source File
SOURCE=.\talkmonster.cpp
# End Source File
# Begin Source File
SOURCE=.\teamplay_gamerules.cpp
# End Source File
# Begin Source File
SOURCE=.\tempmonster.cpp
# End Source File
# Begin Source File
SOURCE=.\tentacle.cpp
# End Source File
# Begin Source File
SOURCE=.\triggers.cpp
# End Source File
# Begin Source File
SOURCE=.\tripmine.cpp
# End Source File
# Begin Source File
SOURCE=.\turret.cpp
# End Source File
# Begin Source File
SOURCE=.\util.cpp
# End Source File
# Begin Source File
SOURCE=..\game_shared\voice_gamemgr.cpp
# End Source File
# Begin Source File
SOURCE=.\weapons.cpp
# End Source File
# Begin Source File
SOURCE=.\world.cpp
# End Source File
# Begin Source File
SOURCE=.\xen.cpp
# End Source File
# Begin Source File
SOURCE=.\zombie.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=.\activity.h
# End Source File
# Begin Source File
SOURCE=.\activitymap.h
# End Source File
# Begin Source File
SOURCE=.\animation.h
# End Source File
# Begin Source File
SOURCE=.\basemonster.h
# End Source File
# Begin Source File
SOURCE=.\cbase.h
# End Source File
# Begin Source File
SOURCE=.\cdll_dll.h
# End Source File
# Begin Source File
SOURCE=.\client.h
# End Source File
# Begin Source File
SOURCE=.\decals.h
# End Source File
# Begin Source File
SOURCE=.\defaultai.h
# End Source File
# Begin Source File
SOURCE=.\doors.h
# End Source File
# Begin Source File
SOURCE=.\effects.h
# End Source File
# Begin Source File
SOURCE=..\engine\eiface.h
# End Source File
# Begin Source File
SOURCE=.\enginecallback.h
# End Source File
# Begin Source File
SOURCE=.\explode.h
# End Source File
# Begin Source File
SOURCE=.\extdll.h
# End Source File
# Begin Source File
SOURCE=.\flyingmonster.h
# End Source File
# Begin Source File
SOURCE=.\func_break.h
# End Source File
# Begin Source File
SOURCE=.\gamerules.h
# End Source File
# Begin Source File
SOURCE=.\hornet.h
# End Source File
# Begin Source File
SOURCE=.\items.h
# End Source File
# Begin Source File
SOURCE=.\locus.h
# End Source File
# Begin Source File
SOURCE=.\monsterevent.h
# End Source File
# Begin Source File
SOURCE=.\monsters.h
# End Source File
# Begin Source File
SOURCE=.\movewith.h
# End Source File
# Begin Source File
SOURCE=.\nodes.h
# End Source File
# Begin Source File
SOURCE=.\plane.h
# End Source File
# Begin Source File
SOURCE=.\player.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_debug.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_defs.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_info.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_materials.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_movevars.h
# End Source File
# Begin Source File
SOURCE=..\pm_shared\pm_shared.h
# End Source File
# Begin Source File
SOURCE=.\saverestore.h
# End Source File
# Begin Source File
SOURCE=.\schedule.h
# End Source File
# Begin Source File
SOURCE=.\scripted.h
# End Source File
# Begin Source File
SOURCE=.\scriptevent.h
# End Source File
# Begin Source File
SOURCE=.\skill.h
# End Source File
# Begin Source File
SOURCE=.\soundent.h
# End Source File
# Begin Source File
SOURCE=.\spectator.h
# End Source File
# Begin Source File
SOURCE=.\squadmonster.h
# End Source File
# Begin Source File
SOURCE=.\talkmonster.h
# End Source File
# Begin Source File
SOURCE=.\teamplay_gamerules.h
# End Source File
# Begin Source File
SOURCE=.\trains.h
# End Source File
# Begin Source File
SOURCE=.\util.h
# End Source File
# Begin Source File
SOURCE=.\vector.h
# End Source File
# Begin Source File
SOURCE=.\weapons.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

12
dlls/hornetgun.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* without written permission from Valve LLC.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h"
#include "util.h"
@ -74,7 +74,7 @@ int CHgun::AddToPlayer( CBasePlayer *pPlayer ) @@ -74,7 +74,7 @@ int CHgun::AddToPlayer( CBasePlayer *pPlayer )
{
if( CBasePlayerWeapon::AddToPlayer( pPlayer ) )
{
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( g_pGameRules->IsMultiplayer() )
{
// in multiplayer, all hivehands come full.
@ -131,7 +131,7 @@ void CHgun::PrimaryAttack() @@ -131,7 +131,7 @@ void CHgun::PrimaryAttack()
{
return;
}
#ifndef CLIENT_DLL
#if !CLIENT_DLL
UTIL_MakeVectors( m_pPlayer->pev->v_angle );
CBaseEntity *pHornet = CBaseEntity::Create( "hornet", m_pPlayer->GetGunPosition() + gpGlobals->v_forward * 16.0f + gpGlobals->v_right * 8.0f + gpGlobals->v_up * -12.0f, m_pPlayer->pev->v_angle, m_pPlayer->edict() );
@ -145,7 +145,7 @@ void CHgun::PrimaryAttack() @@ -145,7 +145,7 @@ void CHgun::PrimaryAttack()
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -175,7 +175,7 @@ void CHgun::SecondaryAttack( void ) @@ -175,7 +175,7 @@ void CHgun::SecondaryAttack( void )
}
//Wouldn't be a bad idea to completely predict these, since they fly so fast...
#ifndef CLIENT_DLL
#if !CLIENT_DLL
CBaseEntity *pHornet;
Vector vecSrc;
@ -226,7 +226,7 @@ void CHgun::SecondaryAttack( void ) @@ -226,7 +226,7 @@ void CHgun::SecondaryAttack( void )
m_flRechargeTime = gpGlobals->time + 0.5f;
#endif
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;

2
dlls/ichthyosaur.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
//=========================================================
// icthyosaur - evin, satan fish monster

2
dlls/monsters.cpp

@ -736,7 +736,7 @@ BOOL CBaseMonster::MoveToNode( Activity movementAct, float waitTime, const Vecto @@ -736,7 +736,7 @@ BOOL CBaseMonster::MoveToNode( Activity movementAct, float waitTime, const Vecto
return FRefreshRoute();
}
#ifdef _DEBUG
#if _DEBUG
void DrawRoute( entvars_t *pev, WayPoint_t *m_Route, int m_iRouteIndex, int r, int g, int b )
{
int i;

6
dlls/mp5.cpp

@ -157,7 +157,7 @@ void CMP5::PrimaryAttack() @@ -157,7 +157,7 @@ void CMP5::PrimaryAttack()
Vector vecSrc = m_pPlayer->GetGunPosition();
Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES );
Vector vecDir;
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -173,7 +173,7 @@ void CMP5::PrimaryAttack() @@ -173,7 +173,7 @@ void CMP5::PrimaryAttack()
}
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -227,7 +227,7 @@ void CMP5::SecondaryAttack( void ) @@ -227,7 +227,7 @@ void CMP5::SecondaryAttack( void )
gpGlobals->v_forward * 800.0f );
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;

12
dlls/multiplay_gamerules.cpp

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
#include "skill.h"
#include "game.h"
#include "items.h"
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
#include "voice_gamemgr.h"
#endif
#include "hltv.h"
@ -47,7 +47,7 @@ extern int g_teamplay; @@ -47,7 +47,7 @@ extern int g_teamplay;
float g_flIntermissionStartTime = 0;
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
CVoiceGameMgr g_VoiceGameMgr;
class CMultiplayGameMgrHelper : public IVoiceGameMgrHelper
@ -74,7 +74,7 @@ static CMultiplayGameMgrHelper g_GameMgrHelper; @@ -74,7 +74,7 @@ static CMultiplayGameMgrHelper g_GameMgrHelper;
//*********************************************************
CHalfLifeMultiplay::CHalfLifeMultiplay()
{
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
g_VoiceGameMgr.Init( &g_GameMgrHelper, gpGlobals->maxClients );
#endif
RefreshSkillData();
@ -124,7 +124,7 @@ CHalfLifeMultiplay::CHalfLifeMultiplay() @@ -124,7 +124,7 @@ CHalfLifeMultiplay::CHalfLifeMultiplay()
BOOL CHalfLifeMultiplay::ClientCommand( CBasePlayer *pPlayer, const char *pcmd )
{
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
if( g_VoiceGameMgr.ClientCommand( pPlayer, pcmd ) )
return TRUE;
#endif
@ -195,7 +195,7 @@ extern cvar_t mp_chattime; @@ -195,7 +195,7 @@ extern cvar_t mp_chattime;
//=========================================================
void CHalfLifeMultiplay::Think( void )
{
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
g_VoiceGameMgr.Update( gpGlobals->frametime );
#endif
@ -415,7 +415,7 @@ BOOL CHalfLifeMultiplay::GetNextBestWeapon( CBasePlayer *pPlayer, CBasePlayerIte @@ -415,7 +415,7 @@ BOOL CHalfLifeMultiplay::GetNextBestWeapon( CBasePlayer *pPlayer, CBasePlayerIte
//=========================================================
BOOL CHalfLifeMultiplay::ClientConnected( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128] )
{
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
g_VoiceGameMgr.ClientConnected( pEntity );
#endif
return TRUE;

2
dlls/nihilanth.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h"
#include "util.h"

4
dlls/nodes.cpp

@ -45,7 +45,7 @@ CGraph WorldGraph; @@ -45,7 +45,7 @@ CGraph WorldGraph;
LINK_ENTITY_TO_CLASS( info_node, CNodeEnt )
LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt )
#ifdef __DOS__
#if __DOS__
#include <direct.h>
#define CreateDirectoryA(p, n) mkdir(p)
#elif !defined _WIN32
@ -2062,7 +2062,7 @@ void CTestHull::BuildNodeGraph( void ) @@ -2062,7 +2062,7 @@ void CTestHull::BuildNodeGraph( void )
fprintf( file, "\nAll Connections are Paired!\n" );
}
#ifdef _MSC_VER
#if _MSC_VER
#define SIZET_FMT "%Iu"
#else
#define SIZET_FMT "%zu"

6
dlls/nodes.h

@ -106,7 +106,7 @@ typedef struct @@ -106,7 +106,7 @@ typedef struct
// CGraph
//=========================================================
#define _GRAPH_VERSION_RETAIL 16 // Retail Half-Life graph version. Don't increment this
#ifdef XASH_64BIT
#if defined(XASH_64BIT)
#define _GRAPH_VERSION (16 * 10)
#else
#define _GRAPH_VERSION (16) // !!!increment this whenever graph/node/link classes change, to obsolesce older disk files.
@ -215,7 +215,7 @@ public: @@ -215,7 +215,7 @@ public:
inline CNode &Node( int i )
{
#ifdef _DEBUG
#if _DEBUG
if ( !m_pNodes || i < 0 || i > m_cNodes )
ALERT( at_error, "Bad Node!\n" );
#endif
@ -224,7 +224,7 @@ public: @@ -224,7 +224,7 @@ public:
inline CLink &Link( int i )
{
#ifdef _DEBUG
#if _DEBUG
if ( !m_pLinkPool || i < 0 || i > m_cLinks )
ALERT( at_error, "Bad link!\n" );
#endif

12
dlls/player.cpp

@ -2796,7 +2796,7 @@ pt_end: @@ -2796,7 +2796,7 @@ pt_end:
// Track button info so we can detect 'pressed' and 'released' buttons next frame
m_afButtonLast = pev->button;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
// Decay timers on weapons
// go through all of the weapons and make a list of the ones to pack
for( int i = 0; i < MAX_ITEM_TYPES; i++ )
@ -3199,7 +3199,7 @@ int CBasePlayer::Restore( CRestore &restore ) @@ -3199,7 +3199,7 @@ int CBasePlayer::Restore( CRestore &restore )
RenewItems();
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
// HACK: This variable is saved/restored in CBaseMonster as a time variable, but we're using it
// as just a counter. Ideally, this needs its own variable that's saved as a plain float.
// Barring that, we clear it out here instead of using the incorrect restored time value.
@ -3665,7 +3665,7 @@ void CBasePlayer::ImpulseCommands() @@ -3665,7 +3665,7 @@ void CBasePlayer::ImpulseCommands()
//=========================================================
void CBasePlayer::CheatImpulseCommands( int iImpulse )
{
#if !defined( HLDEMO_BUILD )
#if !HLDEMO_BUILD
if( g_flWeaponCheat == 0.0f )
{
return;
@ -3727,7 +3727,7 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) @@ -3727,7 +3727,7 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse )
GiveNamedItem( "ammo_ARgrenades" );
GiveNamedItem( "weapon_handgrenade" );
GiveNamedItem( "weapon_tripmine" );
#ifndef OEM_BUILD
#if !OEM_BUILD
GiveNamedItem( "weapon_357" );
GiveNamedItem( "ammo_357" );
GiveNamedItem( "weapon_crossbow" );
@ -4016,7 +4016,7 @@ Called every frame by the player PreThink @@ -4016,7 +4016,7 @@ Called every frame by the player PreThink
*/
void CBasePlayer::ItemPreFrame()
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
if( m_flNextAttack > 0 )
#else
if( gpGlobals->time < m_flNextAttack )
@ -4046,7 +4046,7 @@ void CBasePlayer::ItemPostFrame() @@ -4046,7 +4046,7 @@ void CBasePlayer::ItemPostFrame()
if( m_pTank != 0 )
return;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
if( m_flNextAttack > 0 )
#else
if( gpGlobals->time < m_flNextAttack )

12
dlls/python.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* without written permission from Valve LLC.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h"
#include "util.h"
@ -97,7 +97,7 @@ void CPython::Precache( void ) @@ -97,7 +97,7 @@ void CPython::Precache( void )
BOOL CPython::Deploy()
{
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -130,7 +130,7 @@ void CPython::Holster( int skiplocal /* = 0 */ ) @@ -130,7 +130,7 @@ void CPython::Holster( int skiplocal /* = 0 */ )
void CPython::SecondaryAttack( void )
{
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( !bIsMultiplayer() )
#else
if( !g_pGameRules->IsMultiplayer() )
@ -195,7 +195,7 @@ void CPython::PrimaryAttack() @@ -195,7 +195,7 @@ void CPython::PrimaryAttack()
vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_1DEGREES, 8192, BULLET_PLAYER_357, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed );
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -222,7 +222,7 @@ void CPython::Reload( void ) @@ -222,7 +222,7 @@ void CPython::Reload( void )
}
int bUseScope = FALSE;
#ifdef CLIENT_DLL
#if CLIENT_DLL
bUseScope = bIsMultiplayer();
#else
bUseScope = g_pGameRules->IsMultiplayer();
@ -273,7 +273,7 @@ void CPython::WeaponIdle( void ) @@ -273,7 +273,7 @@ void CPython::WeaponIdle( void )
}
int bUseScope = FALSE;
#ifdef CLIENT_DLL
#if CLIENT_DLL
bUseScope = bIsMultiplayer();
#else
bUseScope = g_pGameRules->IsMultiplayer();

20
dlls/rpg.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* without written permission from Valve LLC.
*
****/
#if !defined( OEM_BUILD )
#if !OEM_BUILD
#include "extdll.h"
#include "util.h"
@ -39,7 +39,7 @@ enum rpg_e @@ -39,7 +39,7 @@ enum rpg_e
LINK_ENTITY_TO_CLASS( weapon_rpg, CRpg )
#ifndef CLIENT_DLL
#if !CLIENT_DLL
LINK_ENTITY_TO_CLASS( laser_spot, CLaserSpot )
@ -323,7 +323,7 @@ void CRpg::Reload( void ) @@ -323,7 +323,7 @@ void CRpg::Reload( void )
return;
}
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( m_pSpot && m_fSpotActive )
{
m_pSpot->Suspend( 2.1f );
@ -346,7 +346,7 @@ void CRpg::Spawn() @@ -346,7 +346,7 @@ void CRpg::Spawn()
SET_MODEL( ENT( pev ), "models/w_rpg.mdl" );
m_fSpotActive = 1;
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -440,7 +440,7 @@ void CRpg::Holster( int skiplocal /* = 0 */ ) @@ -440,7 +440,7 @@ void CRpg::Holster( int skiplocal /* = 0 */ )
SendWeaponAnim( RPG_HOLSTER1 );
else
SendWeaponAnim( RPG_HOLSTER2 );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( m_pSpot )
{
m_pSpot->Killed( NULL, GIB_NEVER );
@ -456,7 +456,7 @@ void CRpg::PrimaryAttack() @@ -456,7 +456,7 @@ void CRpg::PrimaryAttack()
m_pPlayer->m_iWeaponVolume = LOUD_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
#ifndef CLIENT_DLL
#if !CLIENT_DLL
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
@ -473,7 +473,7 @@ void CRpg::PrimaryAttack() @@ -473,7 +473,7 @@ void CRpg::PrimaryAttack()
// Ken signed up for this as a global change (sjb)
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -499,7 +499,7 @@ void CRpg::SecondaryAttack() @@ -499,7 +499,7 @@ void CRpg::SecondaryAttack()
{
m_fSpotActive = !m_fSpotActive;
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( !m_fSpotActive && m_pSpot )
{
m_pSpot->Killed( NULL, GIB_NORMAL );
@ -551,7 +551,7 @@ void CRpg::WeaponIdle( void ) @@ -551,7 +551,7 @@ void CRpg::WeaponIdle( void )
void CRpg::UpdateSpot( void )
{
#ifndef CLIENT_DLL
#if !CLIENT_DLL
if( m_fSpotActive )
{
if (m_pPlayer->pev->viewmodel == 0)
@ -590,7 +590,7 @@ class CRpgAmmo : public CBasePlayerAmmo @@ -590,7 +590,7 @@ class CRpgAmmo : public CBasePlayerAmmo
BOOL AddAmmo( CBaseEntity *pOther )
{
int iGive;
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )

8
dlls/satchel.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* without written permission from Valve LLC.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h"
#include "util.h"
@ -192,7 +192,7 @@ int CSatchel::AddDuplicate( CBasePlayerItem *pOriginal ) @@ -192,7 +192,7 @@ int CSatchel::AddDuplicate( CBasePlayerItem *pOriginal )
{
CSatchel *pSatchel;
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -376,7 +376,7 @@ void CSatchel::Throw( void ) @@ -376,7 +376,7 @@ void CSatchel::Throw( void )
{
if( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] )
{
#ifndef CLIENT_DLL
#if !CLIENT_DLL
Vector vecSrc = m_pPlayer->pev->origin;
Vector vecThrow = gpGlobals->v_forward * 274 + m_pPlayer->pev->velocity;
@ -430,7 +430,7 @@ void CSatchel::WeaponIdle( void ) @@ -430,7 +430,7 @@ void CSatchel::WeaponIdle( void )
return;
}
#ifndef CLIENT_DLL
#if !CLIENT_DLL
m_pPlayer->pev->viewmodel = MAKE_STRING( "models/v_satchel.mdl" );
m_pPlayer->pev->weaponmodel = MAKE_STRING( "models/p_satchel.mdl" );
#else

2
dlls/saverestore.h

@ -164,7 +164,7 @@ public: @@ -164,7 +164,7 @@ public:
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
//#ifdef _DEBUG
//#if _DEBUG
void DumpGlobals( void );
//#endif

2
dlls/schedule.cpp

@ -181,7 +181,7 @@ BOOL CBaseMonster::FScheduleValid( void ) @@ -181,7 +181,7 @@ BOOL CBaseMonster::FScheduleValid( void )
if( HasConditions( m_pSchedule->iInterruptMask | bits_COND_SCHEDULE_DONE | bits_COND_TASK_FAILED ) )
{
#ifdef DEBUG
#if DEBUG
if( HasConditions( bits_COND_TASK_FAILED ) && m_failSchedule == SCHED_NONE )
{
// fail! Send a visual indicator.

8
dlls/shotgun.cpp

@ -143,7 +143,7 @@ void CShotgun::PrimaryAttack() @@ -143,7 +143,7 @@ void CShotgun::PrimaryAttack()
m_iClip--;
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -158,7 +158,7 @@ void CShotgun::PrimaryAttack() @@ -158,7 +158,7 @@ void CShotgun::PrimaryAttack()
Vector vecDir;
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )
@ -213,7 +213,7 @@ void CShotgun::SecondaryAttack( void ) @@ -213,7 +213,7 @@ void CShotgun::SecondaryAttack( void )
m_iClip -= 2;
int flags;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -228,7 +228,7 @@ void CShotgun::SecondaryAttack( void ) @@ -228,7 +228,7 @@ void CShotgun::SecondaryAttack( void )
Vector vecDir;
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( bIsMultiplayer() )
#else
if( g_pGameRules->IsMultiplayer() )

2
dlls/soundent.cpp

@ -367,7 +367,7 @@ int CSoundEnt::ClientSoundIndex( edict_t *pClient ) @@ -367,7 +367,7 @@ int CSoundEnt::ClientSoundIndex( edict_t *pClient )
{
int iReturn = ENTINDEX( pClient ) - 1;
#ifdef _DEBUG
#if _DEBUG
if( iReturn < 0 || iReturn > gpGlobals->maxClients )
{
ALERT( at_console, "** ClientSoundIndex returning a bogus value! **\n" );

8
dlls/squeakgrenade.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* without written permission from Valve LLC.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
#include "extdll.h"
#include "util.h"
@ -42,7 +42,7 @@ enum squeak_e @@ -42,7 +42,7 @@ enum squeak_e
SQUEAK_THROW
};
#ifndef CLIENT_DLL
#if !CLIENT_DLL
class CSqueakGrenade : public CGrenade
{
void Spawn( void );
@ -507,7 +507,7 @@ void CSqueak::PrimaryAttack() @@ -507,7 +507,7 @@ void CSqueak::PrimaryAttack()
UTIL_TraceLine( trace_origin + gpGlobals->v_forward * 20.0f, trace_origin + gpGlobals->v_forward * 64.0f, dont_ignore_monsters, NULL, &tr );
int flags;
#ifdef CLIENT_WEAPONS
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
@ -518,7 +518,7 @@ void CSqueak::PrimaryAttack() @@ -518,7 +518,7 @@ void CSqueak::PrimaryAttack()
{
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#ifndef CLIENT_DLL
#if !CLIENT_DLL
CBaseEntity *pSqueak = CBaseEntity::Create( "monster_snark", tr.vecEndPos, m_pPlayer->pev->v_angle, m_pPlayer->edict() );
pSqueak->pev->velocity = gpGlobals->v_forward * 200.0f + m_pPlayer->pev->velocity;
#endif

6
dlls/teamplay_gamerules.cpp

@ -69,7 +69,7 @@ CHalfLifeTeamplay::CHalfLifeTeamplay() @@ -69,7 +69,7 @@ CHalfLifeTeamplay::CHalfLifeTeamplay()
extern cvar_t timeleft, fragsleft;
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
#include "voice_gamemgr.h"
extern CVoiceGameMgr g_VoiceGameMgr;
#endif
@ -82,7 +82,7 @@ void CHalfLifeTeamplay::Think( void ) @@ -82,7 +82,7 @@ void CHalfLifeTeamplay::Think( void )
int frags_remaining = 0;
int time_remaining = 0;
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
g_VoiceGameMgr.Update(gpGlobals->frametime);
#endif
if( g_fGameOver ) // someone else quit the game already
@ -148,7 +148,7 @@ void CHalfLifeTeamplay::Think( void ) @@ -148,7 +148,7 @@ void CHalfLifeTeamplay::Think( void )
//=========================================================
BOOL CHalfLifeTeamplay::ClientCommand( CBasePlayer *pPlayer, const char *pcmd )
{
#ifndef NO_VOICEGAMEMGR
#if !NO_VOICEGAMEMGR
if( g_VoiceGameMgr.ClientCommand( pPlayer, pcmd ) )
return TRUE;
#endif

2
dlls/tentacle.cpp

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
/*

6
dlls/tripmine.cpp

@ -38,7 +38,7 @@ enum tripmine_e @@ -38,7 +38,7 @@ enum tripmine_e
TRIPMINE_GROUND
};
#ifndef CLIENT_DLL
#if !CLIENT_DLL
class CTripmineGrenade : public CGrenade
{
void Spawn( void );
@ -368,7 +368,7 @@ void CTripmine::Spawn() @@ -368,7 +368,7 @@ void CTripmine::Spawn()
m_iDefaultAmmo = TRIPMINE_DEFAULT_GIVE;
#ifdef CLIENT_DLL
#if CLIENT_DLL
if( !bIsMultiplayer() )
#else
if( !g_pGameRules->IsDeathmatch() )
@ -440,7 +440,7 @@ void CTripmine::PrimaryAttack( void ) @@ -440,7 +440,7 @@ void CTripmine::PrimaryAttack( void )
UTIL_TraceLine( vecSrc, vecSrc + vecAiming * 128.0f, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr );
int flags;
#ifdef CLIENT_WEAPONS
#if CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;

20
dlls/util.cpp

@ -51,7 +51,7 @@ void UTIL_MuzzleLight( Vector vecSrc, float flRadius, byte r, byte g, byte b, fl @@ -51,7 +51,7 @@ void UTIL_MuzzleLight( Vector vecSrc, float flRadius, byte r, byte g, byte b, fl
float UTIL_WeaponTimeBase( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return 0.0f;
#else
return gpGlobals->time;
@ -327,7 +327,7 @@ TYPEDESCRIPTION gEntvarsDescription[] = @@ -327,7 +327,7 @@ TYPEDESCRIPTION gEntvarsDescription[] =
#define ENTVARS_COUNT ( sizeof(gEntvarsDescription) / sizeof(gEntvarsDescription[0]) )
#ifdef DEBUG
#if DEBUG
edict_t *DBG_EntOfVars( const entvars_t *pev )
{
if( pev->pContainingEntity != NULL )
@ -2047,7 +2047,7 @@ static int gSizes[FIELD_TYPECOUNT] = @@ -2047,7 +2047,7 @@ static int gSizes[FIELD_TYPECOUNT] =
sizeof(float) * 3, // FIELD_POSITION_VECTOR
sizeof(void *), // FIELD_POINTER
sizeof(int), // FIELD_INTEGER
#ifdef GNUC
#if GNUC
sizeof(void *) * 2, // FIELD_FUNCTION
#else
sizeof(void *), // FIELD_FUNCTION
@ -2074,7 +2074,7 @@ static int gInputSizes[FIELD_TYPECOUNT] = @@ -2074,7 +2074,7 @@ static int gInputSizes[FIELD_TYPECOUNT] =
sizeof(float) * 3, // FIELD_POSITION_VECTOR
sizeof(void *), // FIELD_POINTER
sizeof(int), // FIELD_INTEGER
#ifdef GNUC
#if GNUC
sizeof(void *) * 2, // FIELD_FUNCTION
#else
sizeof(void *), // FIELD_FUNCTION
@ -2291,7 +2291,7 @@ void CSave::WriteTime( const char *pname, const float *data, int count ) @@ -2291,7 +2291,7 @@ void CSave::WriteTime( const char *pname, const float *data, int count )
void CSave::WriteString( const char *pname, const char *pdata )
{
#ifdef TOKENIZE
#if TOKENIZE
short token = (short)TokenHash( pdata );
WriteShort( pname, &token, 1 );
#else
@ -2302,7 +2302,7 @@ void CSave::WriteString( const char *pname, const char *pdata ) @@ -2302,7 +2302,7 @@ void CSave::WriteString( const char *pname, const char *pdata )
void CSave::WriteString( const char *pname, const int *stringId, int count )
{
int i, size;
#ifdef TOKENIZE
#if TOKENIZE
short token = (short)TokenHash( STRING( *stringId ) );
WriteShort( pname, &token, 1 );
#else
@ -2626,7 +2626,7 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou @@ -2626,7 +2626,7 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
switch( pTest->fieldType )
{
case FIELD_TIME:
#ifdef __VFP_FP__
#if __VFP_FP__
memcpy( &timeData, pInputData, 4 );
// Re-base time variables
timeData += time;
@ -2715,7 +2715,7 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou @@ -2715,7 +2715,7 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
*( (EOFFSET *)pOutputData ) = 0;
break;
case FIELD_VECTOR:
#ifdef __VFP_FP__
#if __VFP_FP__
memcpy( pOutputData, pInputData, sizeof( Vector ) );
#else
( (float *)pOutputData )[0] = ( (float *)pInputData )[0];
@ -2724,7 +2724,7 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou @@ -2724,7 +2724,7 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
#endif
break;
case FIELD_POSITION_VECTOR:
#ifdef __VFP_FP__
#if __VFP_FP__
{
Vector tmp;
memcpy( &tmp, pInputData, sizeof( Vector ) );
@ -2861,7 +2861,7 @@ char *CRestore::ReadNamedString( const char *pName ) @@ -2861,7 +2861,7 @@ char *CRestore::ReadNamedString( const char *pName )
HEADER header;
BufferReadHeader( &header );
#ifdef TOKENIZE
#if TOKENIZE
return (char *)( m_pdata->pTokens[*(short *)header.pData] );
#else
return (char *)header.pData;

8
dlls/util.h

@ -37,7 +37,7 @@ extern globalvars_t *gpGlobals; @@ -37,7 +37,7 @@ extern globalvars_t *gpGlobals;
// Use this instead of ALLOC_STRING on constant strings
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
#if !defined XASH_64BIT || defined(CLIENT_DLL)
#if !defined(XASH_64BIT) || CLIENT_DLL
#define MAKE_STRING(str) ((int)(long int)str - (int)(long int)STRING(0))
#else
static inline int MAKE_STRING(const char *szValue)
@ -106,7 +106,7 @@ typedef int BOOL; @@ -106,7 +106,7 @@ typedef int BOOL;
// The _declspec forces them to be exported by name so we can do a lookup with GetProcAddress()
// The function is used to intialize / allocate the object for the entity
#if defined(CLIENT_DLL)
#if CLIENT_DLL
#define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName)
#else // CLIENT_DLL
#define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) extern "C" EXPORT void mapClassName( entvars_t *pev ); void mapClassName( entvars_t *pev ) { GetClassPtr( (DLLClassName *)pev ); }
@ -115,7 +115,7 @@ typedef int BOOL; @@ -115,7 +115,7 @@ typedef int BOOL;
//
// Conversion among the three types of "entity", including identity-conversions.
//
#ifdef DEBUG
#if DEBUG
extern edict_t *DBG_EntOfVars(const entvars_t *pev);
inline edict_t *ENT(const entvars_t *pev) { return DBG_EntOfVars(pev); }
#else
@ -418,7 +418,7 @@ extern int BuildChangeList( LEVELLIST *pLevelList, int maxList ); @@ -418,7 +418,7 @@ extern int BuildChangeList( LEVELLIST *pLevelList, int maxList );
//
// How did I ever live without ASSERT?
//
#ifdef DEBUG
#if DEBUG
void DBG_AssertFunction(BOOL fExpr, const char* szExpr, const char* szFile, int szLine, const char* szMessage);
#define ASSERT(f) DBG_AssertFunction(f, #f, __FILE__, __LINE__, NULL)
#define ASSERTSZ(f, sz) DBG_AssertFunction(f, #f, __FILE__, __LINE__, sz)

12
dlls/weapons.cpp

@ -319,7 +319,7 @@ void W_Precache( void ) @@ -319,7 +319,7 @@ void W_Precache( void )
UTIL_PrecacheOther( "ammo_9mmAR" );
UTIL_PrecacheOther( "ammo_ARgrenades" );
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
// python
UTIL_PrecacheOtherWeapon( "weapon_357" );
UTIL_PrecacheOther( "ammo_357" );
@ -341,13 +341,13 @@ void W_Precache( void ) @@ -341,13 +341,13 @@ void W_Precache( void )
#endif
// tripmine
UTIL_PrecacheOtherWeapon( "weapon_tripmine" );
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
// satchel charge
UTIL_PrecacheOtherWeapon( "weapon_satchel" );
#endif
// hand grenade
UTIL_PrecacheOtherWeapon("weapon_handgrenade");
#if !defined( OEM_BUILD ) && !defined( HLDEMO_BUILD )
#if !OEM_BUILD && !HLDEMO_BUILD
// squeak grenade
UTIL_PrecacheOtherWeapon( "weapon_snark" );
@ -412,7 +412,7 @@ IMPLEMENT_SAVERESTORE( CBasePlayerItem, CBaseAnimating ) @@ -412,7 +412,7 @@ IMPLEMENT_SAVERESTORE( CBasePlayerItem, CBaseAnimating )
TYPEDESCRIPTION CBasePlayerWeapon::m_SaveData[] =
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
DEFINE_FIELD( CBasePlayerWeapon, m_flNextPrimaryAttack, FIELD_FLOAT ),
DEFINE_FIELD( CBasePlayerWeapon, m_flNextSecondaryAttack, FIELD_FLOAT ),
DEFINE_FIELD( CBasePlayerWeapon, m_flTimeWeaponIdle, FIELD_FLOAT ),
@ -621,7 +621,7 @@ void CBasePlayerItem::Spawn() @@ -621,7 +621,7 @@ void CBasePlayerItem::Spawn()
BOOL CanAttack( float attack_time, float curtime, BOOL isPredicted )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
if( !isPredicted )
#else
if( 1 )
@ -875,7 +875,7 @@ void CBasePlayerWeapon::SendWeaponAnim( int iAnim, int skiplocal, int body ) @@ -875,7 +875,7 @@ void CBasePlayerWeapon::SendWeaponAnim( int iAnim, int skiplocal, int body )
m_pPlayer->pev->weaponanim = iAnim;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
if( skiplocal && ENGINE_CANSKIP( m_pPlayer->edict() ) )
return;
#endif

46
dlls/weapons.h

@ -475,7 +475,7 @@ public: @@ -475,7 +475,7 @@ public:
int m_cAmmoTypes;// how many ammo types packed into this box (if packed by a level designer)
};
#ifdef CLIENT_DLL
#if CLIENT_DLL
bool bIsMultiplayer ( void );
void LoadVModel ( const char *szViewModel, CBasePlayer *m_pPlayer );
#endif
@ -498,7 +498,7 @@ public: @@ -498,7 +498,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -526,7 +526,7 @@ public: @@ -526,7 +526,7 @@ public:
int Swing( int fFirst );
BOOL Deploy( void );
void Holster( int skiplocal = 0 );
#ifdef CROWBAR_IDLE_ANIM
#if CROWBAR_IDLE_ANIM
void WeaponIdle();
#endif
int m_iSwing;
@ -534,7 +534,7 @@ public: @@ -534,7 +534,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -563,7 +563,7 @@ public: @@ -563,7 +563,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -594,7 +594,7 @@ public: @@ -594,7 +594,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -627,7 +627,7 @@ public: @@ -627,7 +627,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -642,7 +642,7 @@ private: @@ -642,7 +642,7 @@ private:
class CShotgun : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -665,7 +665,7 @@ public: @@ -665,7 +665,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -695,7 +695,7 @@ public: @@ -695,7 +695,7 @@ public:
class CRpg : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -723,7 +723,7 @@ public: @@ -723,7 +723,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -755,7 +755,7 @@ public: @@ -755,7 +755,7 @@ public:
class CGauss : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -786,7 +786,7 @@ public: @@ -786,7 +786,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -801,7 +801,7 @@ private: @@ -801,7 +801,7 @@ private:
class CEgon : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -843,7 +843,7 @@ public: @@ -843,7 +843,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -853,7 +853,7 @@ public: @@ -853,7 +853,7 @@ public:
unsigned short m_usEgonStop;
private:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
float m_shootTime;
#endif
EGON_FIREMODE m_fireMode;
@ -866,7 +866,7 @@ private: @@ -866,7 +866,7 @@ private:
class CHgun : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -891,7 +891,7 @@ public: @@ -891,7 +891,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -916,7 +916,7 @@ public: @@ -916,7 +916,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -927,7 +927,7 @@ public: @@ -927,7 +927,7 @@ public:
class CSatchel : public CBasePlayerWeapon
{
public:
#ifndef CLIENT_DLL
#if !CLIENT_DLL
int Save( CSave &save );
int Restore( CRestore &restore );
static TYPEDESCRIPTION m_SaveData[];
@ -949,7 +949,7 @@ public: @@ -949,7 +949,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -977,7 +977,7 @@ public: @@ -977,7 +977,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;
@ -1004,7 +1004,7 @@ public: @@ -1004,7 +1004,7 @@ public:
virtual BOOL UseDecrement( void )
{
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
return TRUE;
#else
return FALSE;

2
dlls/world.cpp

@ -289,7 +289,7 @@ globalentity_t *CGlobalState::Find( string_t globalname ) @@ -289,7 +289,7 @@ globalentity_t *CGlobalState::Find( string_t globalname )
}
// This is available all the time now on impulse 104, remove later
//#ifdef _DEBUG
//#if _DEBUG
void CGlobalState::DumpGlobals( void )
{
static const char *estates[] = { "Off", "On", "Dead" };

11
dlls/wscript

@ -10,15 +10,8 @@ def options(opt): @@ -10,15 +10,8 @@ def options(opt):
return
def configure(conf):
if conf.env.COMPILER_CC == 'msvc':
# hl.def removes MSVC function name decoration from GiveFnptrsToDll on Windows.
# Without this, the lookup for this function fails.
hlDefNode = conf.path.find_resource("./hl.def")
if hlDefNode is not None:
conf.env.append_unique('LINKFLAGS', '/def:%s' % hlDefNode.abspath())
else:
conf.fatal("Could not find hl.def")
# stub
return
def build(bld):
source = bld.path.parent.ant_glob([

6
pm_shared/pm_debug.c

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
****/
#include <math.h>
#include "mathlib.h"
#ifdef HAVE_TGMATH_H
#if HAVE_TGMATH_H
#include <tgmath.h>
#endif
@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
#include <string.h>
#ifdef _MSC_VER
#if _MSC_VER
#pragma warning(disable : 4244)
#pragma warning(disable : 4305)
#endif
@ -268,7 +268,7 @@ void PM_DrawBBox(vec3_t mins, vec3_t maxs, vec3_t origin, int pcolor, float life @@ -268,7 +268,7 @@ void PM_DrawBBox(vec3_t mins, vec3_t maxs, vec3_t origin, int pcolor, float life
}
#ifndef DEDICATED
#if !DEDICATED
/*
================

6
pm_shared/pm_defs.h

@ -194,7 +194,7 @@ typedef struct playermove_s @@ -194,7 +194,7 @@ typedef struct playermove_s
int (*PM_PointContents)( float *p, int *truecontents /*filled in if this is non-null*/ );
int (*PM_TruePointContents)( float *p );
int (*PM_HullPointContents)( struct hull_s *hull, int num, float *p );
#ifdef __MINGW32__
#if __MINGW32__
pmtrace_t *(*PM_PlayerTrace_real)( pmtrace_t * retvalue, float *start, float *end, int traceFlags, int ignore_pe );
#else
@ -218,7 +218,7 @@ typedef struct playermove_s @@ -218,7 +218,7 @@ typedef struct playermove_s
void (*PM_PlaySound)( int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch );
const char *(*PM_TraceTexture)( int ground, float *vstart, float *vend );
void (*PM_PlaybackEventFull)( int flags, int clientindex, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
#ifdef __MINGW32__
#if __MINGW32__
pmtrace_t *(*PM_PlayerTraceEx_real) (pmtrace_t *retvalue, float *start, float *end, int traceFlags, int (*pfnIgnore)( physent_t *pe ));
#else
pmtrace_t (*PM_PlayerTraceEx) (float *start, float *end, int traceFlags, int (*pfnIgnore)( physent_t *pe ));
@ -228,7 +228,7 @@ typedef struct playermove_s @@ -228,7 +228,7 @@ typedef struct playermove_s
struct msurface_s *(*PM_TraceSurface)( int ground, float *vstart, float *vend );
} playermove_t;
#ifdef __MINGW32__
#if __MINGW32__
static pmtrace_t _pm_globalresult, _pm_globaltmp;
static inline pmtrace_t PM_PlayerTrace_wrap( float *start, float *end, int traceFlags, int ignore_pe, playermove_t *pmove )
{

4
pm_shared/pm_math.c

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
// pm_math.c -- math primitives
#include <math.h>
#include "mathlib.h"
#ifdef HAVE_TGMATH_H
#if HAVE_TGMATH_H
#include <tgmath.h>
#endif
#include "const.h"
@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
// fall over
#define ROLL 2
#ifdef _MSC_VER
#if _MSC_VER
#pragma warning(disable : 4244)
#endif

10
pm_shared/pm_shared.c

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
#include <stdlib.h> // atoi
#include <ctype.h> // isspace
#include "mathlib.h"
#ifdef HAVE_TGMATH_H
#if HAVE_TGMATH_H
#include <tgmath.h>
#endif
@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
int g_bhopcap = 1;
#ifdef CLIENT_DLL
#if CLIENT_DLL
// Spectator Mode
int iJumpSpectator;
extern float vJumpOrigin[3];
@ -42,7 +42,7 @@ extern float vJumpAngles[3]; @@ -42,7 +42,7 @@ extern float vJumpAngles[3];
static int pm_shared_initialized = 0;
#ifdef _MSC_VER
#if _MSC_VER
#pragma warning( disable : 4305 )
#endif
@ -86,7 +86,7 @@ playermove_t *pmove = NULL; @@ -86,7 +86,7 @@ playermove_t *pmove = NULL;
#define PLAYER_DUCKING_MULTIPLIER 0.333f
// double to float warning
#ifdef _MSC_VER
#if _MSC_VER
#pragma warning(disable : 4244)
#endif
@ -1877,7 +1877,7 @@ void PM_SpectatorMove( void ) @@ -1877,7 +1877,7 @@ void PM_SpectatorMove( void )
if( pmove->iuser1 == OBS_ROAMING )
{
#ifdef CLIENT_DLL
#if CLIENT_DLL
// jump only in roaming mode
if( iJumpSpectator )
{

12
wscript

@ -256,8 +256,8 @@ def configure(conf): @@ -256,8 +256,8 @@ def configure(conf):
conf.define_cond('HAVE_CMATH', cmath_usable)
if conf.env.COMPILER_CC == 'msvc':
conf.define('_CRT_SECURE_NO_WARNINGS', 1)
conf.define('_CRT_NONSTDC_NO_DEPRECATE', 1)
conf.define('_CRT_SECURE_NO_WARNINGS', True)
conf.define('_CRT_NONSTDC_NO_DEPRECATE', True)
elif conf.env.COMPILER_CC == 'owcc':
pass
else:
@ -271,14 +271,14 @@ def configure(conf): @@ -271,14 +271,14 @@ def configure(conf):
if conf.env.cxxshlib_PATTERN.startswith('lib'):
conf.env.cxxshlib_PATTERN = conf.env.cxxshlib_PATTERN[3:]
conf.define('CLIENT_WEAPONS', '1')
conf.define('BARNACLE_FIX_VISIBILITY', False)
conf.define('CLIENT_WEAPONS', True)
conf.define('CROWBAR_IDLE_ANIM', False)
conf.define('CROWBAR_DELAY_FIX', False)
conf.define('CROWBAR_FIX_RAPID_CROWBAR', False)
conf.define('GAUSS_OVERCHARGE_FIX', False)
if conf.env.DEST_OS == 'android' or conf.options.ENABLE_MOD_HACKS:
conf.define('MOBILE_HACKS', '1')
conf.define('OEM_BUILD', False)
conf.define('HLDEMO_BUILD', False)
conf.add_subproject(["cl_dll", "dlls"])

Loading…
Cancel
Save