Skip to content

Commit aa5841f

Browse files
committed
Sync with latest source-sdk-2013.
1 parent 6abc7fd commit aa5841f

File tree

407 files changed

+6746
-10460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

407 files changed

+6746
-10460
lines changed

Diff for: common/qlimits.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525

2626
// Resource counts;
27-
#define MAX_MODEL_INDEX_BITS 11 // sent as a short
27+
#define MAX_MODEL_INDEX_BITS 12 // sent as a short
2828
#define MAX_MODELS (1<<MAX_MODEL_INDEX_BITS)
2929

3030
#define MAX_GENERIC_INDEX_BITS 9

Diff for: common/userid.h

+5-8
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
#pragma once
1212
#endif
1313

14+
#include "strtools.h"
15+
#include "steam/steamclientpublic.h"
1416
#if !defined( INCLUDED_STEAM_STEAMUSERIDTYPES_H )
15-
#include "SteamCommon.h"
17+
#define INCLUDED_STEAM2_USERID_STRUCTS
18+
#include "SteamCommon.h"
1619
#endif
1720

1821
#define IDTYPE_WON 0
@@ -23,13 +26,7 @@
2326
typedef struct USERID_s
2427
{
2528
int idtype;
26-
27-
union
28-
{
29-
TSteamGlobalUserID steamid;
30-
} uid;
31-
32-
// unsigned int clientip;
29+
CSteamID steamid;
3330
} USERID_t;
3431

3532
#endif // USERID_H

Diff for: createallprojects.bat

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
pushd %~dp0
21
devtools\bin\vpc.exe /hl2mp +everything /mksln everything.sln
3-
popd

Diff for: creategameprojects.bat

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
pushd %~dp0
21
devtools\bin\vpc.exe /hl2mp +game /mksln games.sln
3-
popd

Diff for: devtools/base.xcconfig

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GCC_REUSE_STRINGS = YES
2525
// following line to the xcconfig:
2626
// CLANG_CXX_LIBRARY = libc++
2727
GCC_PREPROCESSOR_DEFINITIONS = _DLL_EXT=.dylib NO_MALLOC_OVERRIDE=1 VPROF_LEVEL=1 NO_HOOK_MALLOC=1 PNG_NO_PEDANTIC_WARNINGS CPP11_NO_LIBCXX
28-
BASE_CFLAGS= -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE
28+
BASE_CFLAGS= -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE -ftemplate-depth=512
2929

3030
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO
3131
WARNING_CFLAGS = -Wno-deprecated-writable-strings -Wno-switch-enum -Wno-switch -Wno-unused-value -Wno-parentheses -Wno-logical-op-parentheses -Wno-c++11-narrowing
@@ -41,6 +41,6 @@ CLANG_CXX_LANGUAGE_STANDARD = gnu++11
4141
// gets into the header map, so sacrifice speed for corectness.
4242
USE_HEADERMAP = NO
4343

44-
SDKROOT = macosx10.7
44+
SDKROOT = macosx10.9
4545
MACOSX_DEPLOYMENT_TARGET = 10.5
4646
GCC_FAST_MATH = YES

Diff for: devtools/bin/linux/ccache

225 KB
Binary file not shown.

Diff for: devtools/bin/vpc.exe

-31 KB
Binary file not shown.

Diff for: devtools/bin/vpc_linux

1.06 KB
Binary file not shown.

Diff for: devtools/bin/vpc_osx

-89.6 KB
Binary file not shown.

Diff for: devtools/makefile_base_posix.mak

+44-95
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,22 @@ HOSTNAME := $(shell hostname)
2222
# To build with clang, set the following in your environment:
2323
# CC = clang
2424
# CXX = clang++
25+
ifneq (,$(findstring clang,$(CXX)))
26+
CLANG_BUILD = 1
27+
endif
2528

2629
ifeq ($(CFG), release)
2730
# With gcc 4.6.3, engine.so went from 7,383,765 to 8,429,109 when building with -O3.
2831
# There also was no speed difference running at 1280x1024. May 2012, mikesart.
2932
# tonyp: The size increase was likely caused by -finline-functions and -fipa-cp-clone getting switched on with -O3.
3033
# -fno-omit-frame-pointer: need this for stack traces with perf.
31-
OptimizerLevel_CompilerSpecific = -O2 -fno-strict-aliasing -ffast-math -fno-omit-frame-pointer -ftree-vectorize -fpredictive-commoning -funswitch-loops
34+
OptimizerLevel_CompilerSpecific = -O2 -fno-strict-aliasing -ffast-math -fno-omit-frame-pointer -ftree-vectorize
35+
ifeq ($(CLANG_BUILD),1)
36+
# These aren't supported wit Clang 3.5. Need to remove when we update that.
37+
OptimizerLevel_CompilerSpecific += -fpredictive-commoning -funswitch-loops
38+
else
39+
OptimizerLevel_CompilerSpecific += -fpredictive-commoning -funswitch-loops
40+
endif
3241
else
3342
OptimizerLevel_CompilerSpecific = -O0
3443
#-O1 -finline-functions
@@ -41,14 +50,14 @@ CPPFLAGS = $(DEFINES) $(addprefix -I, $(abspath $(INCLUDEDIRS) ))
4150
CFLAGS = $(ARCH_FLAGS) $(CPPFLAGS) $(WARN_FLAGS) -fvisibility=$(SymbolVisibility) $(OptimizerLevel) -pipe $(GCC_ExtraCompilerFlags) -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE
4251
# In -std=gnu++0x mode we get lots of errors about "error: narrowing conversion". -fpermissive
4352
# turns these into warnings in gcc, and -Wno-c++11-narrowing suppresses them entirely in clang 3.1+.
44-
ifeq ($(CXX),clang++)
45-
CXXFLAGS = $(CFLAGS) -Wno-c++11-narrowing
53+
ifeq ($(CLANG_BUILD),1)
54+
CXXFLAGS = $(CFLAGS) -std=gnu++0x -Wno-c++11-narrowing -Wno-dangling-else
4655
else
47-
CXXFLAGS = $(CFLAGS) -fpermissive
56+
CXXFLAGS = $(CFLAGS) -std=gnu++0x -fpermissive
4857
endif
4958
DEFINES += -DVPROF_LEVEL=1 -DGNUC -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE
5059
LDFLAGS = $(CFLAGS) $(GCC_ExtraLinkerFlags) $(OptimizerLevel)
51-
GENDEP_CXXFLAGS = -MD -MP -MF $(@:.o=.P)
60+
GENDEP_CXXFLAGS = -MMD -MP -MF $(@:.o=.P)
5261
MAP_FLAGS =
5362
Srv_GAMEOUTPUTFILE =
5463
COPY_DLL_TO_SRV = 0
@@ -57,11 +66,30 @@ COPY_DLL_TO_SRV = 0
5766
ifeq ($(STEAM_BRANCH),1)
5867
WARN_FLAGS = -Wall -Wextra -Wshadow -Wno-invalid-offsetof
5968
else
60-
WARN_FLAGS = -Wno-write-strings -Wno-multichar
69+
WARN_FLAGS = -Wall -Wno-invalid-offsetof -Wno-multichar -Wno-overloaded-virtual
70+
WARN_FLAGS += -Wno-write-strings
71+
WARN_FLAGS += -Wno-unused-variable
72+
WARN_FLAGS += -Wno-unused-but-set-variable
73+
WARN_FLAGS += -Wno-unused-function
74+
75+
ifeq ($(CLANG_BUILD),1)
76+
# Clang specific flags
77+
else
78+
# Gcc specific flags. Need this for gcc 4.8.
79+
# WARN_FLAGS += -Wno-unused-local-typedefs
80+
# WARN_FLAGS += -Wno-unused-function
81+
# WARN_FLAGS += -Wno-unused-result
82+
# WARN_FLAGS += -Wno-narrowing
83+
endif
6184
endif
6285

63-
WARN_FLAGS += -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-sign-compare -Wno-reorder -Wno-invalid-offsetof -Wno-float-equal -Werror=return-type -fdiagnostics-show-option -Wformat -Wformat-security
86+
WARN_FLAGS += -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers
87+
WARN_FLAGS += -Wno-sign-compare -Wno-reorder -Wno-invalid-offsetof -Wno-float-equal -Werror=return-type
88+
WARN_FLAGS += -fdiagnostics-show-option -Wformat -Wformat-security
6489

90+
ifeq ($(OS),Darwin)
91+
$(error This file should never be used for Mac - use base.xconfig)
92+
endif
6593

6694
ifeq ($(OS),Linux)
6795
# We should always specify -Wl,--build-id, as documented at:
@@ -85,20 +113,20 @@ ifeq ($(OS),Linux)
85113
# If the steam-runtime is available, use it. We should just default to using it when
86114
# buildbot and everyone has a bit of time to get it installed.
87115
ifneq "$(wildcard /valve/steam-runtime/bin/)" ""
88-
# The steam-runtime is incompatible with clang at this point, so disable it
89-
# if clang is enabled.
90-
ifneq ($(CXX),clang++)
91-
VALVE_BINDIR = /valve/steam-runtime/bin/
92-
endif
116+
VALVE_BINDIR = /valve/steam-runtime/bin/
93117
endif
118+
94119
GCC_VER =
95120
MARCH_TARGET = pentium4
96121
# On dedicated servers, some plugins depend on global variable symbols in addition to functions.
97122
# So symbols like _Z16ClearMultiDamagev should show up when you do "nm server_srv.so" in TF2.
98123
STRIP_FLAGS = -x
99124
endif
100125

101-
ifeq ($(CXX),clang++)
126+
ifeq ($(CLANG_BUILD),1)
127+
# The steam-runtime is incompatible with clang at this point, so disable it
128+
VALVE_BINDIR =
129+
102130
# Clang does not support -mfpmath=sse because it uses whatever
103131
# instruction set extensions are available by default.
104132
SSE_GEN_FLAGS = -msse2
@@ -114,19 +142,18 @@ ifeq ($(OS),Linux)
114142
ifeq ($(origin AR), default)
115143
AR = $(VALVE_BINDIR)ar crs
116144
endif
117-
ifeq ($(origin CC),default)
145+
ifeq ($(origin CC), default)
118146
CC = $(CCACHE) $(VALVE_BINDIR)gcc$(GCC_VER)
119147
endif
120148
ifeq ($(origin CXX), default)
121149
CXX = $(CCACHE) $(VALVE_BINDIR)g++$(GCC_VER)
122150
endif
151+
123152
# Support ccache with clang. Add -Qunused-arguments to avoid excessive warnings due to
124153
# a ccache quirk. Could also upgrade ccache.
125154
# http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html
126-
ifeq ($(CC),clang)
155+
ifeq ($(CLANG_BUILD),1)
127156
CC = $(CCACHE) $(VALVE_BINDIR)clang -Qunused-arguments
128-
endif
129-
ifeq ($(CXX),clang++)
130157
CXX = $(CCACHE) $(VALVE_BINDIR)clang++ -Qunused-arguments
131158
endif
132159
LINK ?= $(CC)
@@ -180,84 +207,6 @@ ifeq ($(OS),Linux)
180207

181208
endif
182209

183-
ifeq ($(OS),Darwin)
184-
CCACHE := $(SRCROOT)/devtools/bin/osx32/ccache
185-
MAC_SDK_VER ?= 10.6
186-
MAC_SDK := macosx$(MAC_SDK_VER)
187-
SYSROOT := $(shell xcodebuild -sdk $(MAC_SDK) -version Path)
188-
189-
ifneq ($(origin MAC_SDK_VER), file)
190-
$(warning Attempting build with SDK version $(MAC_SDK_VER), only 10.6 is supported and recommended!)
191-
endif
192-
193-
ifeq ($(SYSROOT),)
194-
FIRSTSDK := $(firstword $(sort $(shell xcodebuild -showsdks | grep macosx | sed 's/.*macosx//')))
195-
$(error Could not find SDK version $(MAC_SDK_VER). Install and configure Xcode 4.3, or build with: make MAC_SDK_VER=$(FIRSTSDK))
196-
endif
197-
198-
ifeq ($(origin CC), default)
199-
# Test to see if you have a compiler in the right place, if you
200-
# don't abort with an error
201-
CLANG := $(shell xcrun -sdk $(MAC_SDK) -find clang)
202-
ifeq ($(wildcard $(CLANG)),)
203-
$(error Unable to find C compiler, install and configure Xcode 4.3)
204-
endif
205-
206-
CC := $(CCACHE) $(CLANG) -Qunused-arguments
207-
endif
208-
209-
ifeq ($(origin CXX), default)
210-
CXXLANG := $(shell xcrun -sdk $(MAC_SDK) -find clang++)
211-
ifeq ($(wildcard $(CXXLANG)),)
212-
$(error Unable to find C++ compiler, install and configure Xcode 4.3)
213-
endif
214-
215-
CXX := $(CCACHE) $(CXXLANG) -Qunused-arguments
216-
endif
217-
LINK ?= $(CXX)
218-
219-
ifeq ($(origin AR), default)
220-
AR := $(shell xcrun -sdk $(MAC_SDK) -find libtool) -static -o
221-
endif
222-
223-
ifeq ($(TARGET_PLATFORM),osx64)
224-
ARCH_FLAGS += -arch x86_64 -m64 -march=core2
225-
else ifeq (,$(findstring -arch x86_64,$(GCC_ExtraCompilerFlags)))
226-
ARCH_FLAGS += -arch i386 -m32 -march=prescott -momit-leaf-frame-pointer -mtune=core2
227-
else
228-
# dirty hack to build a universal binary - don't specify the architecture
229-
ARCH_FLAGS += -arch i386 -Xarch_i386 -march=prescott -Xarch_i386 -mtune=core2 -Xarch_i386 -momit-leaf-frame-pointer -Xarch_x86_64 -march=core2
230-
endif
231-
232-
GEN_SYM ?= $(shell xcrun -sdk $(MAC_SDK) -find dsymutil)
233-
ifeq ($(CFG),release)
234-
STRIP ?= strip -S
235-
else
236-
STRIP ?= true
237-
endif
238-
ifeq ($(SOURCE_SDK), 1)
239-
VSIGN ?= true
240-
else
241-
VSIGN ?= $(SRCROOT)/devtools/bin/vsign
242-
endif
243-
244-
CPPFLAGS += -I$(SYSROOT)/usr/include/malloc
245-
CFLAGS += -isysroot $(SYSROOT) -mmacosx-version-min=10.5 -fasm-blocks
246-
247-
LIB_START_EXE = -lm -ldl -lpthread
248-
LIB_END_EXE =
249-
250-
LIB_START_SHLIB =
251-
LIB_END_SHLIB =
252-
253-
SHLIBLDFLAGS = $(LDFLAGS) -bundle -flat_namespace -undefined suppress -Wl,-dead_strip -Wl,-no_dead_strip_inits_and_terms
254-
255-
ifeq (lib,$(findstring lib,$(GAMEOUTPUTFILE)))
256-
SHLIBLDFLAGS = $(LDFLAGS) -dynamiclib -current_version 1.0 -compatibility_version 1.0 -install_name @rpath/$(basename $(notdir $(GAMEOUTPUTFILE))).dylib $(SystemLibraries) -Wl,-dead_strip -Wl,-no_dead_strip_inits_and_terms
257-
endif
258-
259-
endif
260-
261210
#
262211
# Profile-directed optimizations.
263212
# Note: Last time these were tested 3/5/08, it actually slowed down the server benchmark by 5%!

Diff for: devtools/release.xcconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#include "base.xcconfig"
22

33
GCC_OPTIMIZATION_LEVEL = 2
4-
OTHER_CFLAGS = $(derived) $(BASE_CFLAGS) -ftree-vectorize -fpredictive-commoning -funswitch-loops
4+
OTHER_CFLAGS = $(derived) $(BASE_CFLAGS) -ftree-vectorize -funswitch-loops

Diff for: dx10sdk/Utilities/dx9_30/dx_proxy.dll

25.5 KB
Binary file not shown.

Diff for: dx9sdk/utilities/dx_proxy.dll

31 KB
Binary file not shown.

Diff for: game/client/beamdraw.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ void DrawTeslaSegs( int noise_divisions, float *prgNoise, const model_t* spritem
589589
curSeg.m_flWidth = ((fraction*(endWidth-startWidth))+startWidth) * 2;
590590

591591
// Reduce the width by the current number of branches we've had
592-
for ( int j = 0; i < iBranches; j++ )
592+
for ( int j = 0; j < iBranches; j++ )
593593
{
594594
curSeg.m_flWidth *= 0.5;
595595
}
@@ -619,7 +619,7 @@ void DrawTeslaSegs( int noise_divisions, float *prgNoise, const model_t* spritem
619619

620620
// Reduce the end width by the current number of branches we've had
621621
flEndWidth = endWidth;
622-
for ( int j = 0; i < iBranches; j++ )
622+
for ( int j = 0; j < iBranches; j++ )
623623
{
624624
flEndWidth *= 0.5;
625625
}

0 commit comments

Comments
 (0)