· 10 years ago · Sep 15, 2016, 06:56 AM
1diff --git a/.gitignore b/.gitignore
2index 7c5bfb8..65b9741 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -287,6 +287,3 @@ FakesAssemblies/
6 **/*.Server/GeneratedArtifacts
7 **/*.Server/ModelManifest.xml
8 _Pvt_Extensions
9\ No newline at end of file
10-
11-# PVS Studio for Linux output
12-*.cl.cfg
13diff --git a/CMakeLists.txt b/CMakeLists.txt
14index 48c6783..3f53a39 100644
15--- a/CMakeLists.txt
16+++ b/CMakeLists.txt
17@@ -27,59 +27,23 @@ project (XASH3D)
18 # USER DEFINES \
19 ################\
20
21-set (XASH3D_VERSION 0.18)
22-
23-set (HL_SDK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/hlsdk/)
24-
25-# Servers must choose this
26-option(XASH_DEDICATED "Enable dedicated build. Servers must choose this." OFF)
27-
28-# Windows only. Enable it by default for Windows.
29-if(NOT WIN32)
30- option(XASH_IPX "Enable IPX support for networking. Windows only." OFF)
31- option(XASH_NONSTANDARD_LOAD "Enable loading game libraries. Windows only." OFF)
32-else()
33- option(XASH_IPX "Enable IPX support for networking. Windows only." ON)
34- option(XASH_NONSTANDARD_LOAD "Enable loading game libraries. Windows only." ON)
35-endif()
36-
37-# GLES hacks
38-option(XASH_GLES "Enable fixes if Xash3D is running over GL to GLES translator." OFF)
39-option(XASH_NANOGL "Enable NanoGL. Implicitly enables XASH_GLES." OFF)
40-
41-# For libdl-haters ;)
42-option(XASH_SINGLE_BINARY "Don't build game launcher and build engine as executaable" OFF)
43-option(XASH_STATIC "Static build. Implicitly enables XASH_SINGLE_BINARY." OFF)
44-
45-# Shared library loader implementation. Must be checked one of these or both.
46-option(XASH_LIBDL "Enable libdl" ON)
47-option(XASH_DLL_LOADER "Enable DLL loading on x86 Linux/*nix." ON)
48-
49-# Desktop-version options
50-option(XASH_SDL "Enable SDL." ON)
51-option(XASH_VGUI "Enable VGUI support." ON)
52-option(XASH_X11 "Enable X11 support." ON)
53-
54-# Pre-build analyze step
55-option(XASH_PVS_ANALYZE "Use PVS-Studio static analyzer" NO)
56+set (XASH3D_VERSION 0.15)
57+set (HL_SDK_DIR /opt/halflife CACHE PATH "Half Life 1 SDK directory")
58+
59+option(XASH_DEDICATED "Enable dedicated build." ${XASH_DEDICATED})
60+option(XASH_DLL_LOADER "Enable DLL loading on x86 Linux." ${XASH_DLL_LOADER})
61+option(XASH_IPX "Enable IPX support for networking. Windows only." ${XASH_IPX})
62+option(XASH_GLES "Enable fixes if Xash3D is running over GL to GLES translator." ${XASH_GLES})
63+option(XASH_NONSTANDARD_LOAD "Enable loading game libraries. Windows only." ${XASH_NONSTANDARD_LOAD})
64+option(XASH_SDL "Enable SDL for client." ${XASH_SDL})
65+option(XASH_VGUI "Enable VGUI support." ${XASH_VGUI})
66+option(XASH_X11 "Enable X11 support." ${XASH_VGUI})
67+option(XASH_RELEASE "Build as release version. Affects only Q_buildcommit() return value." NO)
68
69 #-----------------
70 # MAIN BUILD CODE \
71 ###################\
72
73-# Dependencies
74-if(XASH_STATIC)
75- set(XASH_SINGLE_BINARY "ON")
76-endif()
77-
78-if(XASH_NANOGL)
79- set(XASH_GLES "ON")
80-endif()
81-
82-if(NOT XASH_LIBDL AND NOT XASH_DLL_LOADER)
83- message(FATAL_ERROR "You must choose XASH_LIBDL, XASH_DLL_LOADER or both. Otherwise engine is useless.")
84-endif()
85-
86 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
87
88 # Build 32-bit Xash on 64-bit, because Xash3D not support this
89@@ -104,20 +68,15 @@ endif()
90
91 if(NOT XASH_DEDICATED)
92 add_subdirectory (mainui)
93- if(XASH_VGUI)
94- add_subdirectory (vgui_support)
95- endif()
96 endif()
97-
98 if(XASH_DLL_LOADER)
99 add_subdirectory (loader)
100 endif()
101-
102-if(NOT XASH_SINGLE_BINARY)
103- add_subdirectory (game_launch)
104+if(XASH_VGUI)
105+ add_subdirectory (vgui_support)
106 endif()
107-
108 add_subdirectory (engine)
109+add_subdirectory (game_launch)
110
111 install(FILES "xash3d.sh"
112 DESTINATION ${BIN_INSTALL_DIR}
113diff --git a/PVS-Studio.cfg b/PVS-Studio.cfg
114deleted file mode 100644
115index d8debd9..0000000
116--- a/PVS-Studio.cfg
117+++ /dev/null
118@@ -1,6 +0,0 @@
119-exclude-path = /usr/include/
120-exclude-path = /usr/lib64/
121-exclude-path = /usr/lib/
122-lic-file = /home/a1ba/projects/pvs/PVS-Studio.lic
123-platform = linux32
124-preprocessor = gcc
125diff --git a/cmake/PVSAnalyze.cmake b/cmake/PVSAnalyze.cmake
126deleted file mode 100644
127index cb09c5e..0000000
128--- a/cmake/PVSAnalyze.cmake
129+++ /dev/null
130@@ -1,91 +0,0 @@
131-#
132-# Copyright (c) 2016 Alibek Omarov a.k.a. a1batross
133-#
134-# Permission is hereby granted, free of charge, to any person obtaining a copy
135-# of this software and associated documentation files (the "Software"), to deal
136-# in the Software without restriction, including without limitation the rights
137-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
138-# copies of the Software, and to permit persons to whom the Software is
139-# furnished to do so, subject to the following conditions:
140-#
141-# The above copyright notice and this permission notice shall be included in all
142-# copies or substantial portions of the Software.
143-#
144-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
145-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
146-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
147-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
148-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
149-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
150-# SOFTWARE.
151-#
152-
153-
154-# How to use
155-#
156-# PVS_STUDIO_TARGET and PVS_STUDIO_CONFIG must be set before including this script
157-# PVS_STUDIO_TARGET is equal your current target: library, executable, etc
158-# PVS_STUDIO_CONFIG is equal path to your config.
159-# PVS_STUDIO_ANALYSIS_MODE equals mask representing analysis mode. See PVS-Studio --help
160-
161-message("<PVSAnalyze.cmake>")
162-
163-find_program(PVS_STUDIO PVS-Studio)
164-
165-if(NOT PVS_STUDIO)
166- message(FATAL_ERROR "PVS-Studio was not found in your system!")
167-endif()
168-
169-if(NOT PVS_STUDIO_TARGET)
170- message(FATAL_ERROR "PVS_STUDIO_TRAGET variable not set. Set it to your target.")
171-endif()
172-
173-if(NOT PVS_STUDIO_CONFIG)
174- message(FATAL_ERROR "PVS_STUDIO_CONFIG not found. Please set up your config file: http://www.viva64.com/en/d/0519/")
175-endif()
176-
177-if(NOT PVS_STUDIO_ANALYSIS_MODE)
178- set(PVS_STUDIO_ANALYSIS_MODE 0)
179-endif()
180-
181-if(${CMAKE_BUILD_TYPE} EQUAL "Debug")
182- set(PVS_STUDIO_CONFIGURATION "Debug")
183-else()
184- set(PVS_STUDIO_CONFIGURATION "Release")
185-endif()
186-
187-# I'm unsure here.
188-# If binary only amd64, what --platform does?
189-#if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
190-# set(PVS_STUDIO_PLATFORM "linux64")
191-#else()
192-# set(PVS_STUDIO_PLATFORM "linux32")
193-#endif()
194-
195-get_target_property(PVS_STUDIO_SOURCES ${PVS_STUDIO_TARGET} SOURCES)
196-
197-if(NOT PVS_STUDIO_SOURCES)
198- message(FATAL_ERROR "Failed to query source file list for ${PVS_STUDIO_TARGET}")
199-endif()
200-
201-set(PVS_STUDIO_INCLUDE $<TARGET_PROPERTY:${PVS_STUDIO_TARGET},INCLUDE_DIRECTORIES>)
202-set(PVS_STUDIO_DEFINES $<TARGET_PROPERTY:${PVS_STUDIO_TARGET},COMPILE_DEFINITIONS>)
203-set(PVS_STUDIO_OPTIONS $<TARGET_PROPERTY:${PVS_STUDIO_TARGET},COMPILE_OPTIONS>)
204-
205-# GCC/Clang Only!
206-set(PVS_STUDIO_COMPILER_INCLUDE "$<$<BOOL:${PVS_STUDIO_INCLUDE}>:-I$<JOIN:${PVS_STUDIO_INCLUDE}, -I>>")
207-set(PVS_STUDIO_COMPILER_DEFINES "$<$<BOOL:${PVS_STUDIO_DEFINES}>:-D$<JOIN:${PVS_STUDIO_DEFINES}, -D>>")
208-
209-set(PVS_STUDIO_FLAGS "${CMAKE_C_FLAGS} ${PVS_STUDIO_OPTIONS} ${PVS_STUDIO_COMPILER_INCLUDE} ${PVS_STUDIO_COMPILER_DEFINES}")
210-
211-foreach(PVS_STUDIO_SOURCE_FILE IN LISTS PVS_STUDIO_SOURCES)
212- get_source_file_property(PVS_STUDIO_SOURCE_FILE_LOCATION ${PVS_STUDIO_SOURCE_FILE} LOCATION)
213-
214- add_custom_command(TARGET ${PVS_STUDIO_TARGET}
215- PRE_BUILD
216- COMMAND sh -c "${PVS_STUDIO} --cfg ${PVS_STUDIO_CONFIG} --configuration ${PVS_STUDIO_CONFIGURATION} --source-file ${PVS_STUDIO_SOURCE_FILE_LOCATION} --analysis-mode ${PVS_STUDIO_ANALYSIS_MODE} --cl-params ${PVS_STUDIO_FLAGS} ${PVS_STUDIO_SOURCE_FILE_LOCATION}"
217- COMMENT "[----] Analyzing ${PVS_STUDIO_SOURCE_FILE_LOCATION} with PVS-Studio..."
218- VERBATIM)
219-endforeach()
220-
221-message("</PVSAnalyze.cmake>")
222diff --git a/engine/Android.mk b/engine/Android.mk
223index 1b41726..e93c1b3 100644
224--- a/engine/Android.mk
225+++ b/engine/Android.mk
226@@ -31,7 +31,7 @@ LOCAL_C_INCLUDES := \
227 $(LOCAL_PATH)/client/vgui \
228 $(LOCAL_PATH)/server \
229 $(LOCAL_PATH)/common/imagelib \
230- $(LOCAL_PATH)/platform/android \
231+ $(LOCAL_PATH)/common/sdl \
232 $(LOCAL_PATH)/common/soundlib \
233 $(LOCAL_PATH)/common/soundlib/libmpg \
234 $(LOCAL_PATH)/../common \
235@@ -75,15 +75,9 @@ LOCAL_SRC_FILES := \
236 client/gl_rsurf.c \
237 client/gl_sprite.c \
238 client/gl_studio.c \
239- client/vid_common.c \
240+ client/gl_vidnt_common.c \
241 client/gl_warp.c \
242- platform/android/snd_opensles.c \
243- client/input.c \
244- client/keys.c \
245- client/input_evdevkey.c \
246- client/console.c \
247- client/touch.c \
248- client/gamma.c \
249+ client/s_backend_opensles.c \
250 client/s_dsp.c \
251 client/s_load.c \
252 client/s_main.c \
253@@ -94,19 +88,24 @@ LOCAL_SRC_FILES := \
254 client/s_vox.c \
255 common/avikit.c \
256 common/build.c \
257- common/base_cmd.c \
258 common/cfgscript.c \
259 common/cmd.c \
260 common/common.c \
261+ common/touch.c \
262 common/con_utils.c \
263+ common/console.c \
264 common/crclib.c \
265 common/crtlib.c \
266 common/cvar.c \
267 common/filesystem.c \
268+ common/gamma.c \
269 common/host.c \
270 common/hpak.c \
271 common/infostring.c \
272+ common/input.c \
273+ common/input_evdevkey.c \
274 common/joyinput.c \
275+ common/keys.c \
276 common/library.c \
277 common/mathlib.c \
278 common/matrixlib.c \
279@@ -121,11 +120,10 @@ LOCAL_SRC_FILES := \
280 common/pm_trace.c \
281 common/random.c \
282 common/sys_con.c \
283- common/system.c \
284+ common/sys_win.c \
285 common/titles.c \
286 common/world.c \
287 common/zone.c \
288- common/crashhandler.c \
289 server/sv_client.c \
290 server/sv_cmds.c \
291 server/sv_custom.c \
292@@ -151,6 +149,7 @@ LOCAL_SRC_FILES := \
293 common/soundlib/snd_mp3.c \
294 common/soundlib/snd_utils.c \
295 common/soundlib/snd_wav.c \
296+ common/sdl/events.c \
297 common/soundlib/libmpg/dct64_i386.c \
298 common/soundlib/libmpg/decode_i386.c \
299 common/soundlib/libmpg/interface.c \
300@@ -161,12 +160,12 @@ LOCAL_SRC_FILES := \
301
302
303 ifeq ($(XASH_SDL),1)
304-LOCAL_SRC_FILES += platform/sdl/vid_sdl_nanogl.c \
305+LOCAL_SRC_FILES += client/gl_vidnt_nanogl.c \
306 platform/android/android.c
307 LOCAL_SHARED_LIBRARIES += SDL2
308 LOCAL_CFLAGS += -DXASH_SDL
309 else
310-LOCAL_SRC_FILES += platform/android/vid_android.c \
311+LOCAL_SRC_FILES += client/gl_vidnt_android_nosdl.c \
312 platform/android/android_nosdl.c
313 endif
314 LOCAL_STATIC_LIBRARIES := NanoGL
315diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt
316index b952d1b..ed152a2 100644
317--- a/engine/CMakeLists.txt
318+++ b/engine/CMakeLists.txt
319@@ -31,7 +31,7 @@ project (XASH_ENGINE)
320 #set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -O3")
321
322 # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
323-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
324+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-incompatible-pointer-types")
325 set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
326 set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
327 set (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Os")
328@@ -40,17 +40,7 @@ set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O3")
329 set (XASH_ENGINE_LIBRARY xash)
330
331 file (GLOB_RECURSE XASH_ENGINE_SOURCES *.c)
332-
333-if(XASH_SINGLE_BINARY)
334- add_executable (${XASH_ENGINE_LIBRARY} ${XASH_ENGINE_HEADERS} ${XASH_ENGINE_SOURCES})
335-else()
336- if(XASH_STATIC)
337- add_library (${XASH_ENGINE_LIBRARY} STATIC ${XASH_ENGINE_HEADERS} ${XASH_ENGINE_SOURCES})
338- else()
339- add_library (${XASH_ENGINE_LIBRARY} SHARED ${XASH_ENGINE_HEADERS} ${XASH_ENGINE_SOURCES})
340- endif()
341-endif()
342-
343+file (GLOB_RECURSE XASH_ENGINE_HEADERS *.h)
344 include_directories (. common/
345 common/sdl/
346 common/imagelib/
347@@ -62,6 +52,13 @@ include_directories (. common/
348 ../pm_shared
349 )
350
351+add_library (${XASH_ENGINE_LIBRARY} SHARED ${XASH_ENGINE_HEADERS} ${XASH_ENGINE_SOURCES})
352+
353+if(XASH_X11)
354+ add_definitions(-DXASH_X11)
355+ target_link_libraries(${XASH_ENGINE_LIBRARY} X11)
356+endif()
357+
358 if(XASH_IPX)
359 add_definitions(-DXASH_IPX)
360 endif()
361@@ -79,6 +76,17 @@ if(XASH_SDL)
362 target_link_libraries(${XASH_ENGINE_LIBRARY} ${SDL2_LIBRARY})
363 endif()
364
365+if(XASH_VGUI)
366+ add_definitions(-DXASH_VGUI)
367+# if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
368+# target_link_libraries(${XASH_ENGINE_LIBRARY} -L${HL_SDK_DIR}/linux/release/ ${HL_SDK_DIR}/linux/release/vgui.dylib)
369+# endif()
370+# if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
371+# target_link_libraries(${XASH_ENGINE_LIBRARY} -L${HL_SDK_DIR}/linux/ -l:vgui.so)
372+# endif()
373+# INCLUDE_DIRECTORIES(${HL_SDK_DIR}/utils/vgui/include)
374+endif()
375+
376 if(XASH_GLES)
377 add_definitions(-DXASH_GLES)
378 endif()
379@@ -89,32 +97,16 @@ if(XASH_DLL_LOADER)
380 include_directories(../loader)
381
382 # Make GCC don't put full path to libloader.so
383- add_custom_command(TARGET xash PRE_LINK COMMAND ${CMAKE_COMMAND} -E
384- copy $<TARGET_FILE:loader> $<TARGET_FILE_DIR:xash>)
385-
386+ add_custom_command(TARGET xash PRE_LINK COMMAND
387+ ${CMAKE_COMMAND} -E copy $<TARGET_FILE:loader> $<TARGET_SONAME_FILE_DIR:xash>)
388 target_link_libraries(${XASH_ENGINE_LIBRARY} -L. -lloader)
389 endif()
390
391-if(NOT XASH_LIBDL)
392- add_definitions(-DNO_LIBDL)
393-else()
394- target_link_libraries(${XASH_ENGINE_LIBRARY} ${CMAKE_DL_LIBS})
395-endif()
396-
397 if(XASH_DEDICATED)
398 add_definitions(-DXASH_DEDICATED)
399 if(LINUX)
400 target_link_libraries(${XASH_ENGINE_LIBRARY} -lrt)
401 endif()
402-else()
403- if(XASH_X11)
404- add_definitions(-DXASH_X11)
405- target_link_libraries(${XASH_ENGINE_LIBRARY} X11)
406- endif()
407-
408- if(XASH_VGUI)
409- add_definitions(-DXASH_VGUI)
410- endif()
411 endif()
412
413 if(NOT XASH_RELEASE)
414@@ -143,12 +135,3 @@ set_target_properties (${XASH_ENGINE_SHARED} PROPERTIES
415 # Installing
416 install( TARGETS ${XASH_ENGINE_LIBRARY} DESTINATION ${LIB_INSTALL_DIR}/xash3d
417 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
418-
419-# Analyzer
420-if(XASH_PVS_ANALYZE)
421- set(PVS_STUDIO_TARGET ${XASH_ENGINE_LIBRARY})
422- set(PVS_STUDIO_CONFIG ${CMAKE_CURRENT_LIST_DIR}/../PVS-Studio.cfg)
423- #set(PVS_STUDIO_ANALYSIS_MODE 31) See PVS-Studio --help
424-
425- include(PVSAnalyze)
426-endif()
427diff --git a/engine/Makefile.dep b/engine/Makefile.dep
428index 59479c4..a50d433 100644
429--- a/engine/Makefile.dep
430+++ b/engine/Makefile.dep
431@@ -187,7 +187,26 @@ sv_game.o: server/sv_game.c common/common.h ../common/port.h \
432 ../common/event_args.h common/net_encode.h ../common/event_flags.h \
433 common/library.h studio.h ../common/render_api.h ../common/lightstyle.h \
434 ../common/dlight.h
435-vgui_draw.o: client/vgui/vgui_draw.c common/common.h ../common/port.h \
436+gl_vidnt_common.o: client/gl_vidnt_common.c common/common.h \
437+ ../common/port.h common/system.h ../common/const.h \
438+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
439+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
440+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
441+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
442+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
443+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h \
444+ client/client.h common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
445+ ../common/gameinfo.h mobility_int.h common/mod_local.h common/common.h \
446+ ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
447+ ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
448+ ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
449+ common/netchan.h common/net_buffer.h ../common/engine_features.h \
450+ ../common/net_api.h ../common/netadr.h common/world.h \
451+ ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
452+ ../common/event_args.h client/gl_local.h client/gl_export.h \
453+ ../common/dlight.h ../common/wadfile.h common/input.h keydefs.h \
454+ client/gl_vidnt.h
455+cl_events.o: client/cl_events.c common/common.h ../common/port.h \
456 common/system.h ../common/const.h ../common/ref_params.h \
457 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
458 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
459@@ -203,141 +222,141 @@ vgui_draw.o: client/vgui/vgui_draw.c common/common.h ../common/port.h \
460 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
461 ../common/netadr.h common/world.h ../common/lightstyle.h \
462 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
463- client/gl_local.h client/gl_export.h ../common/dlight.h \
464- ../common/wadfile.h client/vgui/vgui_draw.h client/vgui/vgui_api.h \
465- common/system.h common/library.h common/../keydefs.h
466-common.o: common/common.c common/common.h ../common/port.h \
467+ ../common/event_flags.h common/net_encode.h
468+s_load.o: client/s_load.c common/common.h ../common/port.h \
469 common/system.h ../common/const.h ../common/ref_params.h \
470 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
471 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
472 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
473 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
474 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
475- ../common/pmtrace.h ../common/usercmd.h studio.h common/mathlib.h \
476- client/client.h common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
477- ../common/gameinfo.h mobility_int.h common/mod_local.h \
478- ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
479- ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
480- ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
481- common/netchan.h common/net_buffer.h ../common/engine_features.h \
482- ../common/net_api.h ../common/netadr.h common/world.h \
483- ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
484- ../common/event_args.h common/library.h
485-joyinput.o: common/joyinput.c ../common/port.h common/common.h \
486+ ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
487+ client/vox.h
488+s_backend_opensles.o: client/s_backend_opensles.c common/common.h \
489+ ../common/port.h common/system.h ../common/const.h \
490+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
491+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
492+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
493+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
494+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
495+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
496+gl_beams.o: client/gl_beams.c common/common.h ../common/port.h \
497 common/system.h ../common/const.h ../common/ref_params.h \
498 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
499 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
500 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
501 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
502 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
503- ../common/pmtrace.h ../common/usercmd.h client/input.h keydefs.h \
504- common/joyinput.h client/client.h common/mathlib.h cdll_int.h \
505- ../common/wrect.h menu_int.h ../common/gameinfo.h mobility_int.h \
506- common/mod_local.h ../common/bspfile.h edict.h progdefs.h eiface.h \
507- custom.h ../pm_shared/pm_movevars.h ../common/render_api.h \
508- ../common/lightstyle.h ../common/dlight.h cdll_exp.h \
509- ../common/screenfade.h common/protocol.h common/netchan.h \
510+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
511+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
512+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
513+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
514+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
515+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
516 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
517 ../common/netadr.h common/world.h ../common/lightstyle.h \
518 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
519- client/gl_local.h client/gl_export.h ../common/dlight.h \
520- ../common/wadfile.h
521-host_common.o: common/host_common.c common/common.h ../common/port.h \
522+ ../common/r_efx.h ../common/particledef.h ../common/beamdef.h \
523+ ../common/cl_entity.h ../common/event_flags.h ../common/entity_types.h \
524+ ../common/triangleapi.h customentity.h client/cl_tent.h \
525+ common/pm_local.h client/gl_local.h client/gl_export.h \
526+ ../common/dlight.h ../common/wadfile.h studio.h
527+gl_studio.o: client/gl_studio.c common/common.h ../common/port.h \
528 common/system.h ../common/const.h ../common/ref_params.h \
529 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
530 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
531 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
532 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
533 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
534- ../common/pmtrace.h ../common/usercmd.h studio.h common/mathlib.h \
535- client/client.h common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
536- ../common/gameinfo.h mobility_int.h common/mod_local.h \
537- ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
538- ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
539- ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
540- common/netchan.h common/net_buffer.h ../common/engine_features.h \
541- ../common/net_api.h ../common/netadr.h common/world.h \
542- ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
543- ../common/event_args.h common/library.h
544-host.o: common/host.c ../common/port.h common/common.h common/system.h \
545- ../common/const.h ../common/ref_params.h ../common/com_model.h \
546- ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
547- common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
548- ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
549- ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
550- ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
551- ../common/usercmd.h common/netchan.h common/net_buffer.h \
552- ../common/engine_features.h server/server.h common/mathlib.h edict.h \
553- progdefs.h eiface.h custom.h physint.h common/mod_local.h \
554- ../common/bspfile.h ../pm_shared/pm_movevars.h ../common/entity_state.h \
555- common/protocol.h common/netchan.h common/world.h ../common/lightstyle.h \
556+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
557+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
558+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
559+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
560+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
561+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
562+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
563+ ../common/netadr.h common/world.h ../common/lightstyle.h \
564 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
565- common/protocol.h common/mod_local.h common/mathlib.h client/input.h \
566- keydefs.h common/touch.h ../common/render_api.h ../common/lightstyle.h \
567- ../common/dlight.h common/library.h
568-system.o: common/system.c ../common/port.h common/common.h \
569- common/system.h ../common/const.h ../common/ref_params.h \
570- ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
571- ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
572- ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
573- ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
574- ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
575- ../common/pmtrace.h ../common/usercmd.h common/mathlib.h
576-network.o: common/network.c ../common/port.h common/common.h \
577+ ../common/r_studioint.h studio.h common/pm_local.h client/gl_local.h \
578+ client/gl_export.h ../common/dlight.h ../common/wadfile.h \
579+ client/cl_tent.h
580+gl_refrag.o: client/gl_refrag.c common/common.h ../common/port.h \
581 common/system.h ../common/const.h ../common/ref_params.h \
582 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
583 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
584 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
585 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
586 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
587- ../common/pmtrace.h ../common/usercmd.h common/netchan.h \
588- common/net_buffer.h ../common/engine_features.h
589-world.o: common/world.c common/common.h ../common/port.h common/system.h \
590- ../common/const.h ../common/ref_params.h ../common/com_model.h \
591- ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
592- common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
593- ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
594- ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
595- ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
596- ../common/usercmd.h common/world.h ../common/lightstyle.h \
597- ../common/bspfile.h ../pm_shared/pm_shared.h ../common/event_api.h \
598- ../common/event_args.h common/mod_local.h edict.h progdefs.h eiface.h \
599- custom.h common/mathlib.h studio.h
600-library.o: common/library.c common/common.h ../common/port.h \
601+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
602+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
603+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
604+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
605+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
606+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
607+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
608+ ../common/netadr.h common/world.h ../common/lightstyle.h \
609+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
610+ client/gl_local.h client/gl_export.h ../common/dlight.h \
611+ ../common/wadfile.h ../common/entity_types.h studio.h
612+gl_backend.o: client/gl_backend.c common/common.h ../common/port.h \
613 common/system.h ../common/const.h ../common/ref_params.h \
614 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
615 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
616 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
617 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
618 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
619- ../common/pmtrace.h ../common/usercmd.h common/library.h \
620- common/filesystem.h
621-net_buffer.o: common/net_buffer.c common/common.h ../common/port.h \
622+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
623+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
624+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
625+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
626+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
627+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
628+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
629+ ../common/netadr.h common/world.h ../common/lightstyle.h \
630+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
631+ client/gl_local.h client/gl_export.h ../common/dlight.h \
632+ ../common/wadfile.h
633+cl_game.o: client/cl_game.c common/common.h ../common/port.h \
634 common/system.h ../common/const.h ../common/ref_params.h \
635 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
636 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
637 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
638 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
639 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
640- ../common/pmtrace.h ../common/usercmd.h common/protocol.h \
641- common/net_buffer.h ../common/engine_features.h common/mathlib.h
642-crclib.o: common/crclib.c common/common.h ../common/port.h \
643+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
644+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
645+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
646+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
647+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
648+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
649+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
650+ ../common/netadr.h common/world.h ../common/lightstyle.h \
651+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
652+ ../common/triangleapi.h ../common/r_efx.h ../common/particledef.h \
653+ ../common/beamdef.h ../common/cl_entity.h ../common/demo_api.h \
654+ ../common/ivoicetweak.h common/pm_local.h client/cl_tent.h \
655+ common/input.h keydefs.h shake.h sprite.h client/gl_local.h \
656+ client/gl_export.h ../common/dlight.h ../common/wadfile.h \
657+ common/library.h client/vgui/vgui_draw.h client/sound.h client/vox.h
658+cl_cmds.o: client/cl_cmds.c common/common.h ../common/port.h \
659 common/system.h ../common/const.h ../common/ref_params.h \
660 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
661 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
662 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
663 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
664 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
665- ../common/pmtrace.h ../common/usercmd.h ../common/bspfile.h \
666- client/client.h common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
667- ../common/gameinfo.h mobility_int.h common/mod_local.h edict.h \
668- progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
669+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
670+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
671+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
672+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
673 ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
674 cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
675 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
676 ../common/netadr.h common/world.h ../common/lightstyle.h \
677- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h
678-con_utils.o: common/con_utils.c common/common.h ../common/port.h \
679+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
680+ client/gl_local.h client/gl_export.h ../common/dlight.h \
681+ ../common/wadfile.h
682+gl_draw.o: client/gl_draw.c common/common.h ../common/port.h \
683 common/system.h ../common/const.h ../common/ref_params.h \
684 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
685 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
686@@ -346,42 +365,37 @@ con_utils.o: common/con_utils.c common/common.h ../common/port.h \
687 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
688 ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
689 cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
690- mobility_int.h common/mod_local.h ../common/bspfile.h edict.h progdefs.h \
691- eiface.h custom.h ../pm_shared/pm_movevars.h ../common/render_api.h \
692- ../common/lightstyle.h ../common/dlight.h cdll_exp.h \
693- ../common/screenfade.h common/protocol.h common/netchan.h \
694+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
695+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
696+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
697+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
698 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
699 ../common/netadr.h common/world.h ../common/lightstyle.h \
700 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
701- ../common/kbutton.h common/touch.h
702-mathlib.o: common/mathlib.c common/common.h ../common/port.h \
703+ client/gl_local.h client/gl_export.h ../common/dlight.h \
704+ ../common/wadfile.h
705+cl_tent.o: client/cl_tent.c common/common.h ../common/port.h \
706 common/system.h ../common/const.h ../common/ref_params.h \
707 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
708 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
709 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
710 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
711 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
712- ../common/pmtrace.h ../common/usercmd.h common/mathlib.h
713-model.o: common/model.c common/mod_local.h common/common.h \
714- ../common/port.h common/system.h ../common/const.h \
715- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
716- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
717- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
718- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
719- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
720- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h \
721- ../common/bspfile.h edict.h progdefs.h eiface.h custom.h sprite.h \
722- common/mathlib.h studio.h ../common/wadfile.h common/world.h \
723- ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
724- ../common/event_args.h client/gl_local.h client/gl_export.h \
725+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
726+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
727+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
728+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
729 ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
730- common/protocol.h ../common/dlight.h ../common/engine_features.h \
731- client/client.h common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
732- ../common/gameinfo.h mobility_int.h common/mod_local.h \
733- ../pm_shared/pm_movevars.h cdll_exp.h ../common/screenfade.h \
734- common/netchan.h common/net_buffer.h ../common/net_api.h \
735- ../common/netadr.h common/world.h
736-avikit.o: common/avikit.c common/common.h ../common/port.h \
737+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
738+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
739+ ../common/netadr.h common/world.h ../common/lightstyle.h \
740+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
741+ ../common/r_efx.h ../common/particledef.h ../common/beamdef.h \
742+ ../common/cl_entity.h ../common/entity_types.h ../common/triangleapi.h \
743+ client/cl_tent.h common/pm_local.h client/gl_local.h client/gl_export.h \
744+ ../common/dlight.h ../common/wadfile.h studio.h client/sound.h \
745+ client/vox.h
746+cl_pmove.o: client/cl_pmove.c common/common.h ../common/port.h \
747 common/system.h ../common/const.h ../common/ref_params.h \
748 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
749 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
750@@ -390,34 +404,56 @@ avikit.o: common/avikit.c common/common.h ../common/port.h \
751 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
752 ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
753 cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
754- mobility_int.h common/mod_local.h ../common/bspfile.h edict.h progdefs.h \
755- eiface.h custom.h ../pm_shared/pm_movevars.h ../common/render_api.h \
756- ../common/lightstyle.h ../common/dlight.h cdll_exp.h \
757- ../common/screenfade.h common/protocol.h common/netchan.h \
758+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
759+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
760+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
761+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
762 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
763 ../common/netadr.h common/world.h ../common/lightstyle.h \
764 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
765- client/gl_local.h client/gl_export.h ../common/dlight.h \
766- ../common/wadfile.h
767-launcher.o: common/launcher.c
768-sys_con.o: common/sys_con.c common/common.h ../common/port.h \
769+ client/cl_tent.h common/pm_local.h ../common/particledef.h studio.h \
770+ common/library.h
771+cl_frame.o: client/cl_frame.c common/common.h ../common/port.h \
772 common/system.h ../common/const.h ../common/ref_params.h \
773 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
774 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
775 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
776 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
777 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
778- ../common/pmtrace.h ../common/usercmd.h
779-infostring.o: common/infostring.c common/common.h ../common/port.h \
780+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
781+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
782+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
783+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
784+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
785+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
786+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
787+ ../common/netadr.h common/world.h ../common/lightstyle.h \
788+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
789+ common/net_encode.h ../common/entity_types.h client/gl_local.h \
790+ client/gl_export.h ../common/dlight.h ../common/wadfile.h \
791+ common/pm_local.h client/cl_tent.h studio.h common/input.h keydefs.h
792+cl_main.o: client/cl_main.c common/common.h ../common/port.h \
793 common/system.h ../common/const.h ../common/ref_params.h \
794 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
795 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
796 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
797 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
798 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
799- ../common/pmtrace.h ../common/usercmd.h
800-titles.o: common/titles.c common/common.h ../common/port.h \
801- common/system.h ../common/const.h ../common/ref_params.h \
802+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
803+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
804+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
805+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
806+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
807+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
808+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
809+ ../common/netadr.h common/world.h ../common/lightstyle.h \
810+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
811+ common/net_encode.h client/cl_tent.h client/gl_local.h \
812+ client/gl_export.h ../common/dlight.h ../common/wadfile.h common/input.h \
813+ keydefs.h common/touch.h ../common/kbutton.h client/vgui/vgui_draw.h \
814+ common/library.h
815+gl_rmisc.o: client/gl_rmisc.c common/common.h ../common/port.h \
816+ common/system.h ../common/const.h ../common/ref_params.h \
817 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
818 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
819 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
820@@ -425,308 +461,254 @@ titles.o: common/titles.c common/common.h ../common/port.h \
821 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
822 ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
823 cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
824- mobility_int.h common/mod_local.h ../common/bspfile.h edict.h progdefs.h \
825- eiface.h custom.h ../pm_shared/pm_movevars.h ../common/render_api.h \
826- ../common/lightstyle.h ../common/dlight.h cdll_exp.h \
827- ../common/screenfade.h common/protocol.h common/netchan.h \
828+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
829+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
830+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
831+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
832 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
833 ../common/netadr.h common/world.h ../common/lightstyle.h \
834- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h
835-base_cmd.o: common/base_cmd.c common/base_cmd.h common/common.h \
836- ../common/port.h common/system.h ../common/const.h \
837- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
838- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
839- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
840- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
841- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
842- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
843-net_encode.o: common/net_encode.c common/common.h ../common/port.h \
844+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
845+ client/gl_local.h client/gl_export.h ../common/dlight.h \
846+ ../common/wadfile.h
847+cl_video.o: client/cl_video.c common/common.h ../common/port.h \
848 common/system.h ../common/const.h ../common/ref_params.h \
849 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
850 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
851 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
852 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
853 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
854- ../common/pmtrace.h ../common/usercmd.h common/netchan.h \
855- common/net_buffer.h ../common/engine_features.h common/mathlib.h \
856- common/net_encode.h ../common/event_api.h ../pm_shared/pm_movevars.h \
857- common/protocol.h client/client.h common/mathlib.h cdll_int.h \
858- ../common/wrect.h menu_int.h ../common/gameinfo.h mobility_int.h \
859- common/mod_local.h ../common/bspfile.h edict.h progdefs.h eiface.h \
860- custom.h ../common/render_api.h ../common/lightstyle.h \
861- ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
862- common/netchan.h ../common/net_api.h ../common/netadr.h common/world.h \
863- ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_args.h
864-mod_studio.o: common/mod_studio.c common/common.h ../common/port.h \
865+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
866+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
867+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
868+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
869+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
870+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
871+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
872+ ../common/netadr.h common/world.h ../common/lightstyle.h \
873+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
874+ client/gl_local.h client/gl_export.h ../common/dlight.h \
875+ ../common/wadfile.h
876+gl_mirror.o: client/gl_mirror.c common/common.h ../common/port.h \
877 common/system.h ../common/const.h ../common/ref_params.h \
878 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
879 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
880 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
881 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
882 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
883- ../common/pmtrace.h ../common/usercmd.h server/server.h common/mathlib.h \
884- edict.h progdefs.h eiface.h custom.h physint.h common/mod_local.h \
885- ../common/bspfile.h ../pm_shared/pm_movevars.h ../common/entity_state.h \
886- common/protocol.h common/netchan.h common/net_buffer.h \
887- ../common/engine_features.h common/world.h ../common/lightstyle.h \
888+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
889+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
890+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
891+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
892+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
893+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
894+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
895+ ../common/netadr.h common/world.h ../common/lightstyle.h \
896 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
897- studio.h ../common/r_studioint.h common/library.h
898-zone.o: common/zone.c common/common.h ../common/port.h common/system.h \
899+ client/gl_local.h client/gl_export.h ../common/dlight.h \
900+ ../common/wadfile.h
901+s_utils.o: client/s_utils.c common/common.h ../common/port.h \
902+ common/system.h ../common/const.h ../common/ref_params.h \
903+ ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
904+ ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
905+ ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
906+ ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
907+ ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
908+ ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
909+ client/vox.h
910+cl_demo.o: client/cl_demo.c common/common.h ../common/port.h \
911+ common/system.h ../common/const.h ../common/ref_params.h \
912+ ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
913+ ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
914+ ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
915+ ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
916+ ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
917+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
918+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
919+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
920+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
921+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
922+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
923+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
924+ ../common/netadr.h common/world.h ../common/lightstyle.h \
925+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
926+ common/net_encode.h
927+s_vox.o: client/s_vox.c common/common.h ../common/port.h common/system.h \
928 ../common/const.h ../common/ref_params.h ../common/com_model.h \
929 ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
930 common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
931 ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
932 ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
933 ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
934- ../common/usercmd.h
935-matrixlib.o: common/matrixlib.c common/common.h ../common/port.h \
936+ ../common/usercmd.h client/sound.h common/mathlib.h client/vox.h
937+gl_decals.o: client/gl_decals.c common/common.h ../common/port.h \
938 common/system.h ../common/const.h ../common/ref_params.h \
939 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
940 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
941 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
942 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
943 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
944- ../common/pmtrace.h ../common/usercmd.h common/mathlib.h
945-filesystem.o: common/filesystem.c ../common/port.h common/common.h \
946+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
947+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
948+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
949+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
950+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
951+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
952+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
953+ ../common/netadr.h common/world.h ../common/lightstyle.h \
954+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
955+ client/gl_local.h client/gl_export.h ../common/dlight.h \
956+ ../common/wadfile.h client/cl_tent.h
957+s_backend.o: client/s_backend.c ../common/port.h common/common.h \
958 common/system.h ../common/const.h ../common/ref_params.h \
959 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
960 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
961 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
962 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
963 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
964- ../common/pmtrace.h ../common/usercmd.h ../common/wadfile.h \
965- common/filesystem.h common/library.h common/mathlib.h
966-net_huff.o: common/net_huff.c common/common.h ../common/port.h \
967+ ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
968+ client/vox.h
969+s_stream.o: client/s_stream.c common/common.h ../common/port.h \
970 common/system.h ../common/const.h ../common/ref_params.h \
971 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
972 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
973 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
974 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
975 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
976- ../common/pmtrace.h ../common/usercmd.h common/netchan.h \
977- common/net_buffer.h ../common/engine_features.h
978-net_chan.o: common/net_chan.c common/common.h ../common/port.h \
979+ ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
980+ client/vox.h client/client.h cdll_int.h ../common/wrect.h menu_int.h \
981+ ../common/gameinfo.h mobility_int.h common/mod_local.h common/common.h \
982+ ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
983+ ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
984+ ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
985+ common/netchan.h common/net_buffer.h ../common/engine_features.h \
986+ ../common/net_api.h ../common/netadr.h common/world.h \
987+ ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
988+ ../common/event_args.h
989+cl_parse.o: client/cl_parse.c common/common.h ../common/port.h \
990 common/system.h ../common/const.h ../common/ref_params.h \
991 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
992 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
993 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
994 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
995 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
996- ../common/pmtrace.h ../common/usercmd.h common/netchan.h \
997- common/net_buffer.h ../common/engine_features.h common/mathlib.h \
998- common/net_encode.h
999-cmd.o: common/cmd.c common/common.h ../common/port.h common/system.h \
1000- ../common/const.h ../common/ref_params.h ../common/com_model.h \
1001- ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1002- common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1003- ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1004- ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1005- ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1006- ../common/usercmd.h client/client.h common/mathlib.h cdll_int.h \
1007- ../common/wrect.h menu_int.h ../common/gameinfo.h mobility_int.h \
1008- common/mod_local.h ../common/bspfile.h edict.h progdefs.h eiface.h \
1009- custom.h ../pm_shared/pm_movevars.h ../common/render_api.h \
1010- ../common/lightstyle.h ../common/dlight.h cdll_exp.h \
1011- ../common/screenfade.h common/protocol.h common/netchan.h \
1012+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1013+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1014+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1015+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1016+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1017+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1018 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1019 ../common/netadr.h common/world.h ../common/lightstyle.h \
1020 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1021- server/server.h physint.h ../common/entity_state.h
1022-pm_surface.o: common/pm_surface.c common/common.h ../common/port.h \
1023+ common/net_encode.h ../common/particledef.h client/gl_local.h \
1024+ client/gl_export.h ../common/dlight.h ../common/wadfile.h \
1025+ client/cl_tent.h shake.h
1026+gl_vidnt_gles2_.o: client/gl_vidnt_gles2_.c
1027+cl_remap.o: client/cl_remap.c common/common.h ../common/port.h \
1028 common/system.h ../common/const.h ../common/ref_params.h \
1029 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1030 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1031 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1032 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1033 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1034- ../common/pmtrace.h ../common/usercmd.h common/mathlib.h \
1035- common/pm_local.h
1036-crtlib.o: common/crtlib.c common/common.h ../common/port.h \
1037+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1038+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1039+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1040+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1041+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1042+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1043+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1044+ ../common/netadr.h common/world.h ../common/lightstyle.h \
1045+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1046+ client/gl_local.h client/gl_export.h ../common/dlight.h \
1047+ ../common/wadfile.h studio.h
1048+gl_vidnt_nanogl.o: client/gl_vidnt_nanogl.c
1049+gl_rlight.o: client/gl_rlight.c common/common.h ../common/port.h \
1050 common/system.h ../common/const.h ../common/ref_params.h \
1051 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1052 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1053 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1054 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1055 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1056- ../common/pmtrace.h ../common/usercmd.h
1057-build.o: common/build.c common/common.h ../common/port.h common/system.h \
1058- ../common/const.h ../common/ref_params.h ../common/com_model.h \
1059- ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1060- common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1061- ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1062- ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1063- ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1064- ../common/usercmd.h
1065-pm_trace.o: common/pm_trace.c common/common.h ../common/port.h \
1066+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1067+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1068+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1069+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1070+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1071+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1072+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1073+ ../common/netadr.h common/world.h ../common/lightstyle.h \
1074+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1075+ client/gl_local.h client/gl_export.h ../common/dlight.h \
1076+ ../common/wadfile.h common/pm_local.h studio.h
1077+cl_scrn.o: client/cl_scrn.c common/common.h ../common/port.h \
1078 common/system.h ../common/const.h ../common/ref_params.h \
1079 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1080 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1081 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1082 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1083 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1084- ../common/pmtrace.h ../common/usercmd.h common/mathlib.h \
1085- common/mod_local.h ../common/bspfile.h edict.h progdefs.h eiface.h \
1086- custom.h common/pm_local.h ../pm_shared/pm_movevars.h \
1087- ../common/engine_features.h studio.h common/world.h \
1088- ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
1089- ../common/event_args.h
1090-hpak.o: common/hpak.c common/common.h ../common/port.h common/system.h \
1091- ../common/const.h ../common/ref_params.h ../common/com_model.h \
1092- ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1093- common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1094- ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1095- ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1096- ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1097- ../common/usercmd.h common/filesystem.h
1098-cfgscript.o: common/cfgscript.c common/common.h ../common/port.h \
1099+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1100+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1101+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1102+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1103+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1104+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1105+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1106+ ../common/netadr.h common/world.h ../common/lightstyle.h \
1107+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1108+ client/gl_local.h client/gl_export.h ../common/dlight.h \
1109+ ../common/wadfile.h client/vgui/vgui_draw.h ../common/qfont.h \
1110+ common/library.h
1111+gl_rpart.o: client/gl_rpart.c common/common.h ../common/port.h \
1112 common/system.h ../common/const.h ../common/ref_params.h \
1113 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1114 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1115 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1116 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1117 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1118- ../common/pmtrace.h ../common/usercmd.h
1119-dedicated.o: common/dedicated.c
1120-crashhandler.o: common/crashhandler.c common/common.h ../common/port.h \
1121+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1122+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1123+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1124+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1125+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1126+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1127+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1128+ ../common/netadr.h common/world.h ../common/lightstyle.h \
1129+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1130+ client/gl_local.h client/gl_export.h ../common/dlight.h \
1131+ ../common/wadfile.h ../common/r_efx.h ../common/particledef.h \
1132+ ../common/beamdef.h ../common/cl_entity.h ../common/event_flags.h \
1133+ ../common/entity_types.h ../common/triangleapi.h client/cl_tent.h \
1134+ studio.h anorms.h
1135+cl_view.o: client/cl_view.c common/common.h ../common/port.h \
1136 common/system.h ../common/const.h ../common/ref_params.h \
1137 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1138 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1139 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1140 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1141 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1142- ../common/pmtrace.h ../common/usercmd.h
1143-cvar.o: common/cvar.c common/common.h ../common/port.h common/system.h \
1144- ../common/const.h ../common/ref_params.h ../common/com_model.h \
1145- ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1146- common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1147- ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1148- ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1149- ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1150- ../common/usercmd.h common/base_cmd.h
1151-random.o: common/random.c common/common.h ../common/port.h \
1152+ ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1153+ cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1154+ mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1155+ edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1156+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1157+ cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1158+ common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1159+ ../common/netadr.h common/world.h ../common/lightstyle.h \
1160+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1161+ ../common/entity_types.h client/gl_local.h client/gl_export.h \
1162+ ../common/dlight.h ../common/wadfile.h client/vgui/vgui_draw.h \
1163+ common/touch.h
1164+s_main.o: client/s_main.c common/common.h ../common/port.h \
1165 common/system.h ../common/const.h ../common/ref_params.h \
1166 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1167 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1168 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1169 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1170 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1171- ../common/pmtrace.h ../common/usercmd.h
1172-img_quant.o: common/imagelib/img_quant.c common/imagelib/imagelib.h \
1173- common/common.h ../common/port.h common/system.h ../common/const.h \
1174- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1175- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1176- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1177- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1178- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1179- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
1180-img_main.o: common/imagelib/img_main.c common/imagelib/imagelib.h \
1181- common/common.h ../common/port.h common/system.h ../common/const.h \
1182- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1183- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1184- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1185- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1186- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1187- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
1188-img_wad.o: common/imagelib/img_wad.c common/imagelib/imagelib.h \
1189- common/common.h ../common/port.h common/system.h ../common/const.h \
1190- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1191- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1192- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1193- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1194- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1195- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h \
1196- common/mathlib.h ../common/wadfile.h studio.h sprite.h ../common/qfont.h
1197-img_bmp.o: common/imagelib/img_bmp.c common/imagelib/imagelib.h \
1198- common/common.h ../common/port.h common/system.h ../common/const.h \
1199- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1200- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1201- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1202- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1203- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1204- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
1205-img_dds.o: common/imagelib/img_dds.c common/imagelib/imagelib.h \
1206- common/common.h ../common/port.h common/system.h ../common/const.h \
1207- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1208- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1209- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1210- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1211- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1212- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
1213-img_utils.o: common/imagelib/img_utils.c common/imagelib/imagelib.h \
1214- common/common.h ../common/port.h common/system.h ../common/const.h \
1215- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1216- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1217- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1218- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1219- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1220- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h \
1221- common/mathlib.h common/mod_local.h common/common.h ../common/bspfile.h \
1222- edict.h progdefs.h eiface.h custom.h client/gl_export.h
1223-img_tga.o: common/imagelib/img_tga.c common/imagelib/imagelib.h \
1224- common/common.h ../common/port.h common/system.h ../common/const.h \
1225- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1226- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1227- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1228- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1229- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1230- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
1231-snd_wav.o: common/soundlib/snd_wav.c common/soundlib/soundlib.h \
1232- common/common.h ../common/port.h common/system.h ../common/const.h \
1233- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1234- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1235- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1236- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1237- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1238- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
1239-snd_utils.o: common/soundlib/snd_utils.c common/soundlib/soundlib.h \
1240- common/common.h ../common/port.h common/system.h ../common/const.h \
1241- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1242- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1243- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1244- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1245- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1246- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
1247-snd_mp3.o: common/soundlib/snd_mp3.c common/soundlib/soundlib.h \
1248- common/common.h ../common/port.h common/system.h ../common/const.h \
1249- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1250- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1251- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1252- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1253- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1254- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
1255-snd_main.o: common/soundlib/snd_main.c common/soundlib/soundlib.h \
1256- common/common.h ../common/port.h common/system.h ../common/const.h \
1257- ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1258- custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1259- ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1260- ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1261- ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1262- ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
1263-tabinit.o: common/soundlib/libmpg/tabinit.c \
1264- common/soundlib/libmpg/mpg123.h
1265-interface.o: common/soundlib/libmpg/interface.c \
1266- common/soundlib/libmpg/mpg123.h common/soundlib/libmpg/mpglib.h \
1267- common/soundlib/libmpg/libmpg.h
1268-layer3.o: common/soundlib/libmpg/layer3.c common/soundlib/libmpg/mpg123.h \
1269- common/soundlib/libmpg/mpglib.h common/soundlib/libmpg/huffman.h
1270-common.o: common/soundlib/libmpg/common.c common/soundlib/libmpg/mpg123.h
1271-dct64_i386.o: common/soundlib/libmpg/dct64_i386.c \
1272- common/soundlib/libmpg/mpg123.h
1273-mpg_common.o: common/soundlib/libmpg/mpg_common.c \
1274- common/soundlib/libmpg/mpg123.h
1275-decode_i386.o: common/soundlib/libmpg/decode_i386.c \
1276- common/soundlib/libmpg/mpg123.h common/soundlib/libmpg/mpglib.h
1277-layer2.o: common/soundlib/libmpg/layer2.c common/soundlib/libmpg/mpg123.h \
1278- common/soundlib/libmpg/l2tables.h
1279-keys.o: client/keys.c common/common.h ../common/port.h common/system.h \
1280- ../common/const.h ../common/ref_params.h ../common/com_model.h \
1281- ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1282- common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1283- ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1284- ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1285- ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1286- ../common/usercmd.h client/input.h keydefs.h client/client.h \
1287- common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
1288+ ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
1289+ client/vox.h client/client.h cdll_int.h ../common/wrect.h menu_int.h \
1290 ../common/gameinfo.h mobility_int.h common/mod_local.h common/common.h \
1291 ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
1292 ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
1293@@ -734,16 +716,42 @@ keys.o: client/keys.c common/common.h ../common/port.h common/system.h \
1294 common/netchan.h common/net_buffer.h ../common/engine_features.h \
1295 ../common/net_api.h ../common/netadr.h common/world.h \
1296 ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
1297- ../common/event_args.h common/joyinput.h
1298-s_load.o: client/s_load.c common/common.h ../common/port.h \
1299+ ../common/event_args.h common/pm_local.h
1300+gl_rmath.o: client/gl_rmath.c common/common.h ../common/port.h \
1301 common/system.h ../common/const.h ../common/ref_params.h \
1302 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1303 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1304 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1305 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1306 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1307- ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
1308- client/vox.h
1309+ ../common/pmtrace.h ../common/usercmd.h client/gl_local.h \
1310+ client/gl_export.h ../common/render_api.h ../common/lightstyle.h \
1311+ ../common/dlight.h common/protocol.h ../common/dlight.h \
1312+ ../common/wadfile.h common/mathlib.h client/client.h cdll_int.h \
1313+ ../common/wrect.h menu_int.h ../common/gameinfo.h mobility_int.h \
1314+ common/mod_local.h common/common.h ../common/bspfile.h edict.h \
1315+ progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h cdll_exp.h \
1316+ ../common/screenfade.h common/netchan.h common/net_buffer.h \
1317+ ../common/engine_features.h ../common/net_api.h ../common/netadr.h \
1318+ common/world.h ../common/lightstyle.h ../pm_shared/pm_shared.h \
1319+ ../common/event_api.h ../common/event_args.h
1320+s_mix.o: client/s_mix.c common/common.h ../common/port.h common/system.h \
1321+ ../common/const.h ../common/ref_params.h ../common/com_model.h \
1322+ ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1323+ common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1324+ ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1325+ ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1326+ ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1327+ ../common/usercmd.h client/sound.h common/mathlib.h client/vox.h \
1328+ client/client.h cdll_int.h ../common/wrect.h menu_int.h \
1329+ ../common/gameinfo.h mobility_int.h common/mod_local.h common/common.h \
1330+ ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
1331+ ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
1332+ ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
1333+ common/netchan.h common/net_buffer.h ../common/engine_features.h \
1334+ ../common/net_api.h ../common/netadr.h common/world.h \
1335+ ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
1336+ ../common/event_args.h
1337 gl_warp.o: client/gl_warp.c common/common.h ../common/port.h \
1338 common/system.h ../common/const.h ../common/ref_params.h \
1339 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1340@@ -762,7 +770,7 @@ gl_warp.o: client/gl_warp.c common/common.h ../common/port.h \
1341 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1342 client/gl_local.h client/gl_export.h ../common/dlight.h \
1343 ../common/wadfile.h warpsin.h
1344-gl_beams.o: client/gl_beams.c common/common.h ../common/port.h \
1345+cl_menu.o: client/cl_menu.c common/common.h ../common/port.h \
1346 common/system.h ../common/const.h ../common/ref_params.h \
1347 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1348 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1349@@ -778,12 +786,10 @@ gl_beams.o: client/gl_beams.c common/common.h ../common/port.h \
1350 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1351 ../common/netadr.h common/world.h ../common/lightstyle.h \
1352 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1353- ../common/r_efx.h ../common/particledef.h ../common/beamdef.h \
1354- ../common/cl_entity.h ../common/event_flags.h ../common/entity_types.h \
1355- ../common/triangleapi.h customentity.h client/cl_tent.h \
1356- common/pm_local.h client/gl_local.h client/gl_export.h \
1357- ../common/dlight.h ../common/wadfile.h studio.h
1358-gl_refrag.o: client/gl_refrag.c common/common.h ../common/port.h \
1359+ client/gl_local.h client/gl_export.h ../common/dlight.h \
1360+ ../common/wadfile.h common/library.h common/input.h keydefs.h \
1361+ common/sdl/events.h
1362+gl_cull.o: client/gl_cull.c common/common.h ../common/port.h \
1363 common/system.h ../common/const.h ../common/ref_params.h \
1364 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1365 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1366@@ -800,8 +806,8 @@ gl_refrag.o: client/gl_refrag.c common/common.h ../common/port.h \
1367 ../common/netadr.h common/world.h ../common/lightstyle.h \
1368 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1369 client/gl_local.h client/gl_export.h ../common/dlight.h \
1370- ../common/wadfile.h ../common/entity_types.h studio.h
1371-gl_backend.o: client/gl_backend.c common/common.h ../common/port.h \
1372+ ../common/wadfile.h ../common/entity_types.h
1373+gl_rmain.o: client/gl_rmain.c common/common.h ../common/port.h \
1374 common/system.h ../common/const.h ../common/ref_params.h \
1375 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1376 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1377@@ -818,8 +824,9 @@ gl_backend.o: client/gl_backend.c common/common.h ../common/port.h \
1378 ../common/netadr.h common/world.h ../common/lightstyle.h \
1379 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1380 client/gl_local.h client/gl_export.h ../common/dlight.h \
1381- ../common/wadfile.h
1382-console.o: client/console.c common/common.h ../common/port.h \
1383+ ../common/wadfile.h common/library.h ../common/beamdef.h \
1384+ ../common/particledef.h ../common/entity_types.h
1385+gl_vidnt.o: client/gl_vidnt.c common/common.h ../common/port.h \
1386 common/system.h ../common/const.h ../common/ref_params.h \
1387 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1388 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1389@@ -835,10 +842,9 @@ console.o: client/console.c common/common.h ../common/port.h \
1390 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1391 ../common/netadr.h common/world.h ../common/lightstyle.h \
1392 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1393- keydefs.h client/gl_local.h client/gl_export.h ../common/dlight.h \
1394- ../common/wadfile.h ../common/qfont.h server/server.h physint.h \
1395- ../common/entity_state.h
1396-cl_game.o: client/cl_game.c common/common.h ../common/port.h \
1397+ client/gl_local.h client/gl_export.h ../common/dlight.h \
1398+ ../common/wadfile.h common/input.h keydefs.h client/gl_vidnt.h
1399+gl_rsurf.o: client/gl_rsurf.c common/common.h ../common/port.h \
1400 common/system.h ../common/const.h ../common/ref_params.h \
1401 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1402 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1403@@ -854,13 +860,10 @@ cl_game.o: client/cl_game.c common/common.h ../common/port.h \
1404 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1405 ../common/netadr.h common/world.h ../common/lightstyle.h \
1406 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1407- ../common/triangleapi.h ../common/r_efx.h ../common/particledef.h \
1408- ../common/beamdef.h ../common/cl_entity.h ../common/demo_api.h \
1409- ../common/ivoicetweak.h common/pm_local.h client/cl_tent.h \
1410- client/input.h keydefs.h shake.h sprite.h client/gl_local.h \
1411- client/gl_export.h ../common/dlight.h ../common/wadfile.h \
1412- common/library.h client/vgui/vgui_draw.h client/sound.h client/vox.h
1413-cl_cmds.o: client/cl_cmds.c common/common.h ../common/port.h \
1414+ client/gl_local.h client/gl_export.h ../common/dlight.h \
1415+ ../common/wadfile.h
1416+gl_vidnt_android_nosdl.o: client/gl_vidnt_android_nosdl.c
1417+cl_mobile.o: client/cl_mobile.c common/common.h ../common/port.h \
1418 common/system.h ../common/const.h ../common/ref_params.h \
1419 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1420 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1421@@ -876,9 +879,9 @@ cl_cmds.o: client/cl_cmds.c common/common.h ../common/port.h \
1422 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1423 ../common/netadr.h common/world.h ../common/lightstyle.h \
1424 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1425- client/gl_local.h client/gl_export.h ../common/dlight.h \
1426- ../common/wadfile.h
1427-gl_draw.o: client/gl_draw.c common/common.h ../common/port.h \
1428+ common/sdl/events.h common/library.h client/gl_local.h \
1429+ client/gl_export.h ../common/dlight.h ../common/wadfile.h common/touch.h
1430+gl_sprite.o: client/gl_sprite.c common/common.h ../common/port.h \
1431 common/system.h ../common/const.h ../common/ref_params.h \
1432 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1433 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1434@@ -895,8 +898,9 @@ gl_draw.o: client/gl_draw.c common/common.h ../common/port.h \
1435 ../common/netadr.h common/world.h ../common/lightstyle.h \
1436 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1437 client/gl_local.h client/gl_export.h ../common/dlight.h \
1438- ../common/wadfile.h
1439-cl_pmove.o: client/cl_pmove.c common/common.h ../common/port.h \
1440+ ../common/wadfile.h common/pm_local.h sprite.h studio.h \
1441+ ../common/entity_types.h client/cl_tent.h
1442+gl_image.o: client/gl_image.c common/common.h ../common/port.h \
1443 common/system.h ../common/const.h ../common/ref_params.h \
1444 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1445 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1446@@ -912,84 +916,43 @@ cl_pmove.o: client/cl_pmove.c common/common.h ../common/port.h \
1447 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1448 ../common/netadr.h common/world.h ../common/lightstyle.h \
1449 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1450- client/cl_tent.h common/pm_local.h ../common/particledef.h studio.h \
1451- common/library.h
1452-cl_frame.o: client/cl_frame.c common/common.h ../common/port.h \
1453- common/system.h ../common/const.h ../common/ref_params.h \
1454- ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1455- ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1456- ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1457- ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1458- ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1459- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1460- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1461- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1462- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1463+ client/gl_local.h client/gl_export.h ../common/dlight.h \
1464+ ../common/wadfile.h studio.h
1465+s_dsp.o: client/s_dsp.c common/common.h ../common/port.h common/system.h \
1466+ ../common/const.h ../common/ref_params.h ../common/com_model.h \
1467+ ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1468+ common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1469+ ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1470+ ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1471+ ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1472+ ../common/usercmd.h client/client.h common/mathlib.h cdll_int.h \
1473+ ../common/wrect.h menu_int.h ../common/gameinfo.h mobility_int.h \
1474+ common/mod_local.h common/common.h ../common/bspfile.h edict.h \
1475+ progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1476 ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1477 cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1478 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1479 ../common/netadr.h common/world.h ../common/lightstyle.h \
1480 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1481- common/net_encode.h ../common/entity_types.h client/gl_local.h \
1482- client/gl_export.h ../common/dlight.h ../common/wadfile.h \
1483- common/pm_local.h client/cl_tent.h studio.h client/input.h keydefs.h
1484-cl_main.o: client/cl_main.c common/common.h ../common/port.h \
1485+ client/sound.h client/vox.h
1486+s_mouth.o: client/s_mouth.c common/common.h ../common/port.h \
1487 common/system.h ../common/const.h ../common/ref_params.h \
1488 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1489 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1490 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1491 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1492 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1493- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1494- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1495- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1496- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1497- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1498- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1499- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1500- ../common/netadr.h common/world.h ../common/lightstyle.h \
1501- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1502- common/net_encode.h client/cl_tent.h client/gl_local.h \
1503- client/gl_export.h ../common/dlight.h ../common/wadfile.h client/input.h \
1504- keydefs.h common/touch.h ../common/kbutton.h client/vgui/vgui_draw.h \
1505- common/library.h
1506-gl_rmisc.o: client/gl_rmisc.c common/common.h ../common/port.h \
1507- common/system.h ../common/const.h ../common/ref_params.h \
1508- ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1509- ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1510- ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1511- ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1512- ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1513- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1514- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1515- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1516- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1517- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1518- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1519- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1520- ../common/netadr.h common/world.h ../common/lightstyle.h \
1521- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1522- client/gl_local.h client/gl_export.h ../common/dlight.h \
1523- ../common/wadfile.h
1524-cl_video.o: client/cl_video.c common/common.h ../common/port.h \
1525- common/system.h ../common/const.h ../common/ref_params.h \
1526- ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1527- ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1528- ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1529- ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1530- ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1531- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1532- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1533- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1534- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1535- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1536- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1537- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1538- ../common/netadr.h common/world.h ../common/lightstyle.h \
1539- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1540- client/gl_local.h client/gl_export.h ../common/dlight.h \
1541- ../common/wadfile.h
1542-gl_mirror.o: client/gl_mirror.c common/common.h ../common/port.h \
1543+ ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
1544+ client/vox.h client/client.h cdll_int.h ../common/wrect.h menu_int.h \
1545+ ../common/gameinfo.h mobility_int.h common/mod_local.h common/common.h \
1546+ ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
1547+ ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
1548+ ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
1549+ common/netchan.h common/net_buffer.h ../common/engine_features.h \
1550+ ../common/net_api.h ../common/netadr.h common/world.h \
1551+ ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
1552+ ../common/event_args.h
1553+vgui_draw.o: client/vgui/vgui_draw.c common/common.h ../common/port.h \
1554 common/system.h ../common/const.h ../common/ref_params.h \
1555 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1556 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1557@@ -1006,17 +969,37 @@ gl_mirror.o: client/gl_mirror.c common/common.h ../common/port.h \
1558 ../common/netadr.h common/world.h ../common/lightstyle.h \
1559 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1560 client/gl_local.h client/gl_export.h ../common/dlight.h \
1561+ ../common/wadfile.h client/vgui/vgui_draw.h client/vgui/vgui_api.h \
1562+ common/system.h common/library.h
1563+gamma.o: common/gamma.c common/common.h ../common/port.h common/system.h \
1564+ ../common/const.h ../common/ref_params.h ../common/com_model.h \
1565+ ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1566+ common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1567+ ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1568+ ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1569+ ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1570+ ../common/usercmd.h common/mathlib.h client/gl_local.h \
1571+ client/gl_export.h ../common/render_api.h ../common/lightstyle.h \
1572+ ../common/dlight.h common/protocol.h ../common/dlight.h \
1573 ../common/wadfile.h
1574-s_utils.o: client/s_utils.c common/common.h ../common/port.h \
1575+common.o: common/common.c common/common.h ../common/port.h \
1576 common/system.h ../common/const.h ../common/ref_params.h \
1577 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1578 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1579 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1580 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1581 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1582- ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
1583- client/vox.h
1584-cl_events.o: client/cl_events.c common/common.h ../common/port.h \
1585+ ../common/pmtrace.h ../common/usercmd.h studio.h common/mathlib.h \
1586+ client/client.h common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
1587+ ../common/gameinfo.h mobility_int.h common/mod_local.h \
1588+ ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
1589+ ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
1590+ ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
1591+ common/netchan.h common/net_buffer.h ../common/engine_features.h \
1592+ ../common/net_api.h ../common/netadr.h common/world.h \
1593+ ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
1594+ ../common/event_args.h common/library.h
1595+console.o: common/console.c common/common.h ../common/port.h \
1596 common/system.h ../common/const.h ../common/ref_params.h \
1597 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1598 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1599@@ -1025,105 +1008,79 @@ cl_events.o: client/cl_events.c common/common.h ../common/port.h \
1600 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1601 ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1602 cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1603- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1604- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1605- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1606- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1607+ mobility_int.h common/mod_local.h ../common/bspfile.h edict.h progdefs.h \
1608+ eiface.h custom.h ../pm_shared/pm_movevars.h ../common/render_api.h \
1609+ ../common/lightstyle.h ../common/dlight.h cdll_exp.h \
1610+ ../common/screenfade.h common/protocol.h common/netchan.h \
1611 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1612 ../common/netadr.h common/world.h ../common/lightstyle.h \
1613 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1614- ../common/event_flags.h common/net_encode.h
1615-s_vox.o: client/s_vox.c common/common.h ../common/port.h common/system.h \
1616+ keydefs.h common/protocol.h client/gl_local.h client/gl_export.h \
1617+ ../common/dlight.h ../common/wadfile.h ../common/qfont.h server/server.h \
1618+ physint.h ../common/entity_state.h
1619+host.o: common/host.c ../common/port.h common/common.h common/system.h \
1620 ../common/const.h ../common/ref_params.h ../common/com_model.h \
1621 ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1622 common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1623 ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1624 ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1625 ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1626- ../common/usercmd.h client/sound.h common/mathlib.h client/vox.h
1627-gl_decals.o: client/gl_decals.c common/common.h ../common/port.h \
1628+ ../common/usercmd.h common/netchan.h common/net_buffer.h \
1629+ ../common/engine_features.h server/server.h common/mathlib.h edict.h \
1630+ progdefs.h eiface.h custom.h physint.h common/mod_local.h \
1631+ ../common/bspfile.h ../pm_shared/pm_movevars.h ../common/entity_state.h \
1632+ common/protocol.h common/netchan.h common/world.h ../common/lightstyle.h \
1633+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1634+ common/protocol.h common/mod_local.h common/mathlib.h common/input.h \
1635+ keydefs.h common/touch.h ../common/render_api.h ../common/lightstyle.h \
1636+ ../common/dlight.h common/sdl/events.h
1637+build.o: common/build.c common/common.h ../common/port.h common/system.h \
1638+ ../common/const.h ../common/ref_params.h ../common/com_model.h \
1639+ ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1640+ common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1641+ ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1642+ ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1643+ ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1644+ ../common/usercmd.h
1645+network.o: common/network.c ../common/port.h common/common.h \
1646 common/system.h ../common/const.h ../common/ref_params.h \
1647 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1648 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1649 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1650 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1651 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1652- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1653- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1654- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1655- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1656- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1657- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1658- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1659- ../common/netadr.h common/world.h ../common/lightstyle.h \
1660- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1661- client/gl_local.h client/gl_export.h ../common/dlight.h \
1662- ../common/wadfile.h client/cl_tent.h
1663-s_stream.o: client/s_stream.c common/common.h ../common/port.h \
1664+ ../common/pmtrace.h ../common/usercmd.h common/netchan.h \
1665+ common/net_buffer.h ../common/engine_features.h
1666+world.o: common/world.c common/common.h ../common/port.h common/system.h \
1667+ ../common/const.h ../common/ref_params.h ../common/com_model.h \
1668+ ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1669+ common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1670+ ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1671+ ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1672+ ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1673+ ../common/usercmd.h common/world.h ../common/lightstyle.h \
1674+ ../common/bspfile.h ../pm_shared/pm_shared.h ../common/event_api.h \
1675+ ../common/event_args.h common/mod_local.h edict.h progdefs.h eiface.h \
1676+ custom.h common/mathlib.h studio.h
1677+library.o: common/library.c common/common.h ../common/port.h \
1678 common/system.h ../common/const.h ../common/ref_params.h \
1679 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1680 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1681 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1682 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1683 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1684- ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
1685- client/vox.h client/client.h cdll_int.h ../common/wrect.h menu_int.h \
1686- ../common/gameinfo.h mobility_int.h common/mod_local.h common/common.h \
1687- ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
1688- ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
1689- ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
1690- common/netchan.h common/net_buffer.h ../common/engine_features.h \
1691- ../common/net_api.h ../common/netadr.h common/world.h \
1692- ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
1693- ../common/event_args.h
1694-cl_parse.o: client/cl_parse.c common/common.h ../common/port.h \
1695+ ../common/pmtrace.h ../common/usercmd.h common/library.h \
1696+ common/filesystem.h
1697+net_buffer.o: common/net_buffer.c common/common.h ../common/port.h \
1698 common/system.h ../common/const.h ../common/ref_params.h \
1699 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1700 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1701 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1702 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1703 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1704- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1705- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1706- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1707- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1708- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1709- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1710- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1711- ../common/netadr.h common/world.h ../common/lightstyle.h \
1712- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1713- common/net_encode.h ../common/particledef.h client/gl_local.h \
1714- client/gl_export.h ../common/dlight.h ../common/wadfile.h \
1715- client/cl_tent.h shake.h
1716-gamma.o: client/gamma.c common/common.h ../common/port.h common/system.h \
1717- ../common/const.h ../common/ref_params.h ../common/com_model.h \
1718- ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1719- common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1720- ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1721- ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1722- ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1723- ../common/usercmd.h common/mathlib.h client/gl_local.h \
1724- client/gl_export.h ../common/render_api.h ../common/lightstyle.h \
1725- ../common/dlight.h common/protocol.h ../common/dlight.h \
1726- ../common/wadfile.h
1727-input.o: client/input.c ../common/port.h common/common.h common/system.h \
1728- ../common/const.h ../common/ref_params.h ../common/com_model.h \
1729- ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1730- common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1731- ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1732- ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1733- ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1734- ../common/usercmd.h client/input.h keydefs.h common/touch.h \
1735- client/client.h common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
1736- ../common/gameinfo.h mobility_int.h common/mod_local.h common/common.h \
1737- ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
1738- ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
1739- ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
1740- common/netchan.h common/net_buffer.h ../common/engine_features.h \
1741- ../common/net_api.h ../common/netadr.h common/world.h \
1742- ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
1743- ../common/event_args.h client/vgui/vgui_draw.h common/joyinput.h
1744-cl_remap.o: client/cl_remap.c common/common.h ../common/port.h \
1745+ ../common/pmtrace.h ../common/usercmd.h common/protocol.h \
1746+ common/net_buffer.h ../common/engine_features.h common/mathlib.h
1747+con_utils.o: common/con_utils.c common/common.h ../common/port.h \
1748 common/system.h ../common/const.h ../common/ref_params.h \
1749 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1750 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1751@@ -1132,34 +1089,23 @@ cl_remap.o: client/cl_remap.c common/common.h ../common/port.h \
1752 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1753 ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1754 cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1755- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1756- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1757- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1758- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1759+ mobility_int.h common/mod_local.h ../common/bspfile.h edict.h progdefs.h \
1760+ eiface.h custom.h ../pm_shared/pm_movevars.h ../common/render_api.h \
1761+ ../common/lightstyle.h ../common/dlight.h cdll_exp.h \
1762+ ../common/screenfade.h common/protocol.h common/netchan.h \
1763 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1764 ../common/netadr.h common/world.h ../common/lightstyle.h \
1765 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1766- client/gl_local.h client/gl_export.h ../common/dlight.h \
1767- ../common/wadfile.h studio.h
1768-vid_common.o: client/vid_common.c common/common.h ../common/port.h \
1769+ ../common/kbutton.h
1770+mathlib.o: common/mathlib.c common/common.h ../common/port.h \
1771 common/system.h ../common/const.h ../common/ref_params.h \
1772 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1773 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1774 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1775 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1776 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1777- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1778- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1779- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1780- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1781- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1782- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1783- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1784- ../common/netadr.h common/world.h ../common/lightstyle.h \
1785- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1786- client/gl_local.h client/gl_export.h ../common/dlight.h \
1787- ../common/wadfile.h client/input.h keydefs.h client/gl_vidnt.h
1788-touch.o: client/touch.c common/common.h ../common/port.h common/system.h \
1789+ ../common/pmtrace.h ../common/usercmd.h common/mathlib.h
1790+touch.o: common/touch.c common/common.h ../common/port.h common/system.h \
1791 ../common/const.h ../common/ref_params.h ../common/com_model.h \
1792 ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1793 common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1794@@ -1168,16 +1114,35 @@ touch.o: client/touch.c common/common.h ../common/port.h common/system.h \
1795 ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1796 ../common/usercmd.h client/gl_local.h client/gl_export.h \
1797 ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1798- common/protocol.h ../common/dlight.h ../common/wadfile.h client/input.h \
1799+ common/protocol.h ../common/dlight.h ../common/wadfile.h common/input.h \
1800 keydefs.h client/client.h common/mathlib.h cdll_int.h ../common/wrect.h \
1801 menu_int.h ../common/gameinfo.h mobility_int.h common/mod_local.h \
1802- common/common.h ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
1803+ ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
1804 ../pm_shared/pm_movevars.h cdll_exp.h ../common/screenfade.h \
1805 common/netchan.h common/net_buffer.h ../common/engine_features.h \
1806 ../common/net_api.h ../common/netadr.h common/world.h \
1807 ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
1808 ../common/event_args.h common/touch.h
1809-gl_studio.o: client/gl_studio.c common/common.h ../common/port.h \
1810+model.o: common/model.c common/mod_local.h common/common.h \
1811+ ../common/port.h common/system.h ../common/const.h \
1812+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
1813+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
1814+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
1815+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
1816+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
1817+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h \
1818+ ../common/bspfile.h edict.h progdefs.h eiface.h custom.h sprite.h \
1819+ common/mathlib.h studio.h ../common/wadfile.h common/world.h \
1820+ ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
1821+ ../common/event_args.h client/gl_local.h client/gl_export.h \
1822+ ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1823+ common/protocol.h ../common/dlight.h ../common/engine_features.h \
1824+ client/client.h common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
1825+ ../common/gameinfo.h mobility_int.h common/mod_local.h \
1826+ ../pm_shared/pm_movevars.h cdll_exp.h ../common/screenfade.h \
1827+ common/netchan.h common/net_buffer.h ../common/net_api.h \
1828+ ../common/netadr.h common/world.h
1829+avikit.o: common/avikit.c common/common.h ../common/port.h \
1830 common/system.h ../common/const.h ../common/ref_params.h \
1831 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1832 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1833@@ -1186,295 +1151,205 @@ gl_studio.o: client/gl_studio.c common/common.h ../common/port.h \
1834 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1835 ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1836 cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1837- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1838- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1839- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1840- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1841+ mobility_int.h common/mod_local.h ../common/bspfile.h edict.h progdefs.h \
1842+ eiface.h custom.h ../pm_shared/pm_movevars.h ../common/render_api.h \
1843+ ../common/lightstyle.h ../common/dlight.h cdll_exp.h \
1844+ ../common/screenfade.h common/protocol.h common/netchan.h \
1845 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1846 ../common/netadr.h common/world.h ../common/lightstyle.h \
1847 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1848- ../common/r_studioint.h studio.h common/pm_local.h client/gl_local.h \
1849- client/gl_export.h ../common/dlight.h ../common/wadfile.h \
1850- client/cl_tent.h
1851-gl_rlight.o: client/gl_rlight.c common/common.h ../common/port.h \
1852+ client/gl_local.h client/gl_export.h ../common/dlight.h \
1853+ ../common/wadfile.h
1854+launcher.o: common/launcher.c
1855+sys_con.o: common/sys_con.c common/common.h ../common/port.h \
1856 common/system.h ../common/const.h ../common/ref_params.h \
1857 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1858 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1859 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1860 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1861 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1862- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1863- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1864- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1865- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1866- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1867- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1868- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1869- ../common/netadr.h common/world.h ../common/lightstyle.h \
1870- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1871- client/gl_local.h client/gl_export.h ../common/dlight.h \
1872- ../common/wadfile.h common/pm_local.h studio.h
1873-cl_scrn.o: client/cl_scrn.c common/common.h ../common/port.h \
1874+ ../common/pmtrace.h ../common/usercmd.h
1875+infostring.o: common/infostring.c common/common.h ../common/port.h \
1876 common/system.h ../common/const.h ../common/ref_params.h \
1877 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1878 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1879 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1880 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1881 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1882- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1883- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1884- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1885- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1886- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1887- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1888- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1889- ../common/netadr.h common/world.h ../common/lightstyle.h \
1890- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1891- client/gl_local.h client/gl_export.h ../common/dlight.h \
1892- ../common/wadfile.h client/vgui/vgui_draw.h ../common/qfont.h \
1893- common/library.h
1894-gl_rpart.o: client/gl_rpart.c common/common.h ../common/port.h \
1895- common/system.h ../common/const.h ../common/ref_params.h \
1896+ ../common/pmtrace.h ../common/usercmd.h
1897+net_encode.o: common/net_encode.c common/common.h ../common/port.h \
1898+ common/system.h ../common/const.h ../common/ref_params.h \
1899 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1900 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1901 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1902 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1903 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1904- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1905- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1906- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1907- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1908- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1909- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1910- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1911- ../common/netadr.h common/world.h ../common/lightstyle.h \
1912- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1913- client/gl_local.h client/gl_export.h ../common/dlight.h \
1914- ../common/wadfile.h ../common/r_efx.h ../common/particledef.h \
1915- ../common/beamdef.h ../common/cl_entity.h ../common/event_flags.h \
1916- ../common/entity_types.h ../common/triangleapi.h client/cl_tent.h \
1917- studio.h anorms.h
1918-cl_demo.o: client/cl_demo.c common/common.h ../common/port.h \
1919+ ../common/pmtrace.h ../common/usercmd.h common/netchan.h \
1920+ common/net_buffer.h ../common/engine_features.h common/mathlib.h \
1921+ common/net_encode.h ../common/event_api.h ../pm_shared/pm_movevars.h \
1922+ common/protocol.h client/client.h common/mathlib.h cdll_int.h \
1923+ ../common/wrect.h menu_int.h ../common/gameinfo.h mobility_int.h \
1924+ common/mod_local.h ../common/bspfile.h edict.h progdefs.h eiface.h \
1925+ custom.h ../common/render_api.h ../common/lightstyle.h \
1926+ ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
1927+ common/netchan.h ../common/net_api.h ../common/netadr.h common/world.h \
1928+ ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_args.h
1929+hpak.o: common/hpak.c common/common.h ../common/port.h common/system.h \
1930+ ../common/const.h ../common/ref_params.h ../common/com_model.h \
1931+ ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1932+ common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1933+ ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1934+ ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1935+ ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1936+ ../common/usercmd.h common/filesystem.h
1937+mod_studio.o: common/mod_studio.c common/common.h ../common/port.h \
1938 common/system.h ../common/const.h ../common/ref_params.h \
1939 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1940 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1941 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1942 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1943 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1944- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1945- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1946- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1947- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1948- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1949- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1950- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1951- ../common/netadr.h common/world.h ../common/lightstyle.h \
1952+ ../common/pmtrace.h ../common/usercmd.h server/server.h common/mathlib.h \
1953+ edict.h progdefs.h eiface.h custom.h physint.h common/mod_local.h \
1954+ ../common/bspfile.h ../pm_shared/pm_movevars.h ../common/entity_state.h \
1955+ common/protocol.h common/netchan.h common/net_buffer.h \
1956+ ../common/engine_features.h common/world.h ../common/lightstyle.h \
1957 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1958- common/net_encode.h
1959-cl_view.o: client/cl_view.c common/common.h ../common/port.h \
1960+ studio.h ../common/r_studioint.h common/library.h
1961+zone.o: common/zone.c common/common.h ../common/port.h common/system.h \
1962+ ../common/const.h ../common/ref_params.h ../common/com_model.h \
1963+ ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
1964+ common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
1965+ ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
1966+ ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
1967+ ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
1968+ ../common/usercmd.h
1969+input_evdevkey.o: common/input_evdevkey.c
1970+filesystem.o: common/filesystem.c ../common/port.h common/common.h \
1971 common/system.h ../common/const.h ../common/ref_params.h \
1972 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1973 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1974 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1975 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1976 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1977- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
1978- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
1979- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
1980- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
1981- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
1982- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
1983- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
1984- ../common/netadr.h common/world.h ../common/lightstyle.h \
1985- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
1986- ../common/entity_types.h client/gl_local.h client/gl_export.h \
1987- ../common/dlight.h ../common/wadfile.h client/vgui/vgui_draw.h \
1988- common/touch.h common/joyinput.h
1989-s_main.o: client/s_main.c common/common.h ../common/port.h \
1990+ ../common/pmtrace.h ../common/usercmd.h ../common/wadfile.h \
1991+ common/filesystem.h common/library.h common/mathlib.h
1992+net_huff.o: common/net_huff.c common/common.h ../common/port.h \
1993 common/system.h ../common/const.h ../common/ref_params.h \
1994 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
1995 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
1996 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
1997 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
1998 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
1999- ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
2000- client/vox.h client/client.h cdll_int.h ../common/wrect.h menu_int.h \
2001- ../common/gameinfo.h mobility_int.h common/mod_local.h common/common.h \
2002- ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
2003- ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
2004- ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
2005- common/netchan.h common/net_buffer.h ../common/engine_features.h \
2006- ../common/net_api.h ../common/netadr.h common/world.h \
2007- ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
2008- ../common/event_args.h common/pm_local.h
2009-gl_rmath.o: client/gl_rmath.c common/common.h ../common/port.h \
2010+ ../common/pmtrace.h ../common/usercmd.h common/netchan.h \
2011+ common/net_buffer.h ../common/engine_features.h
2012+net_chan.o: common/net_chan.c common/common.h ../common/port.h \
2013 common/system.h ../common/const.h ../common/ref_params.h \
2014 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2015 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2016 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2017 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2018 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2019- ../common/pmtrace.h ../common/usercmd.h client/gl_local.h \
2020- client/gl_export.h ../common/render_api.h ../common/lightstyle.h \
2021- ../common/dlight.h common/protocol.h ../common/dlight.h \
2022- ../common/wadfile.h common/mathlib.h client/client.h cdll_int.h \
2023- ../common/wrect.h menu_int.h ../common/gameinfo.h mobility_int.h \
2024- common/mod_local.h common/common.h ../common/bspfile.h edict.h \
2025- progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h cdll_exp.h \
2026- ../common/screenfade.h common/netchan.h common/net_buffer.h \
2027- ../common/engine_features.h ../common/net_api.h ../common/netadr.h \
2028- common/world.h ../common/lightstyle.h ../pm_shared/pm_shared.h \
2029- ../common/event_api.h ../common/event_args.h
2030-s_mix.o: client/s_mix.c common/common.h ../common/port.h common/system.h \
2031+ ../common/pmtrace.h ../common/usercmd.h common/netchan.h \
2032+ common/net_buffer.h ../common/engine_features.h common/mathlib.h \
2033+ common/net_encode.h
2034+cmd.o: common/cmd.c common/common.h ../common/port.h common/system.h \
2035 ../common/const.h ../common/ref_params.h ../common/com_model.h \
2036 ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
2037 common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
2038 ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
2039 ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
2040 ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
2041- ../common/usercmd.h client/sound.h common/mathlib.h client/vox.h \
2042- client/client.h cdll_int.h ../common/wrect.h menu_int.h \
2043- ../common/gameinfo.h mobility_int.h common/mod_local.h common/common.h \
2044- ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
2045- ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
2046- ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
2047- common/netchan.h common/net_buffer.h ../common/engine_features.h \
2048- ../common/net_api.h ../common/netadr.h common/world.h \
2049- ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
2050- ../common/event_args.h
2051-cl_menu.o: client/cl_menu.c common/common.h ../common/port.h \
2052- common/system.h ../common/const.h ../common/ref_params.h \
2053- ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2054- ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2055- ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2056- ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2057- ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2058- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
2059- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
2060- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
2061- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2062- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
2063- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
2064+ ../common/usercmd.h client/client.h common/mathlib.h cdll_int.h \
2065+ ../common/wrect.h menu_int.h ../common/gameinfo.h mobility_int.h \
2066+ common/mod_local.h ../common/bspfile.h edict.h progdefs.h eiface.h \
2067+ custom.h ../pm_shared/pm_movevars.h ../common/render_api.h \
2068+ ../common/lightstyle.h ../common/dlight.h cdll_exp.h \
2069+ ../common/screenfade.h common/protocol.h common/netchan.h \
2070 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
2071 ../common/netadr.h common/world.h ../common/lightstyle.h \
2072 ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
2073- client/gl_local.h client/gl_export.h ../common/dlight.h \
2074- ../common/wadfile.h common/library.h client/input.h keydefs.h
2075-input_evdevkey.o: client/input_evdevkey.c
2076-gl_cull.o: client/gl_cull.c common/common.h ../common/port.h \
2077+ server/server.h physint.h ../common/entity_state.h
2078+pm_surface.o: common/pm_surface.c common/common.h ../common/port.h \
2079 common/system.h ../common/const.h ../common/ref_params.h \
2080 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2081 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2082 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2083 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2084 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2085- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
2086- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
2087- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
2088- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2089- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
2090- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
2091- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
2092- ../common/netadr.h common/world.h ../common/lightstyle.h \
2093- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
2094- client/gl_local.h client/gl_export.h ../common/dlight.h \
2095- ../common/wadfile.h ../common/entity_types.h
2096-gl_rmain.o: client/gl_rmain.c common/common.h ../common/port.h \
2097+ ../common/pmtrace.h ../common/usercmd.h common/mathlib.h \
2098+ common/pm_local.h
2099+crtlib.o: common/crtlib.c common/common.h ../common/port.h \
2100 common/system.h ../common/const.h ../common/ref_params.h \
2101 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2102 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2103 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2104 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2105 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2106- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
2107- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
2108- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
2109- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2110- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
2111- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
2112- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
2113- ../common/netadr.h common/world.h ../common/lightstyle.h \
2114- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
2115- client/gl_local.h client/gl_export.h ../common/dlight.h \
2116- ../common/wadfile.h common/library.h ../common/beamdef.h \
2117- ../common/particledef.h ../common/entity_types.h
2118-cl_tent.o: client/cl_tent.c common/common.h ../common/port.h \
2119+ ../common/pmtrace.h ../common/usercmd.h
2120+pm_trace.o: common/pm_trace.c common/common.h ../common/port.h \
2121 common/system.h ../common/const.h ../common/ref_params.h \
2122 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2123 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2124 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2125 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2126 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2127- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
2128- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
2129- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
2130- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2131- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
2132- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
2133- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
2134- ../common/netadr.h common/world.h ../common/lightstyle.h \
2135- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
2136- ../common/r_efx.h ../common/particledef.h ../common/beamdef.h \
2137- ../common/cl_entity.h ../common/entity_types.h ../common/triangleapi.h \
2138- client/cl_tent.h common/pm_local.h client/gl_local.h client/gl_export.h \
2139- ../common/dlight.h ../common/wadfile.h studio.h client/sound.h \
2140- client/vox.h
2141-gl_rsurf.o: client/gl_rsurf.c common/common.h ../common/port.h \
2142+ ../common/pmtrace.h ../common/usercmd.h common/mathlib.h \
2143+ common/mod_local.h ../common/bspfile.h edict.h progdefs.h eiface.h \
2144+ custom.h common/pm_local.h ../pm_shared/pm_movevars.h \
2145+ ../common/engine_features.h studio.h common/world.h \
2146+ ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
2147+ ../common/event_args.h
2148+sys_win.o: common/sys_win.c ../common/port.h common/common.h \
2149 common/system.h ../common/const.h ../common/ref_params.h \
2150 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2151 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2152 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2153 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2154 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2155- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
2156- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
2157- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
2158- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2159- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
2160- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
2161- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
2162- ../common/netadr.h common/world.h ../common/lightstyle.h \
2163- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
2164- client/gl_local.h client/gl_export.h ../common/dlight.h \
2165- ../common/wadfile.h
2166-cl_mobile.o: client/cl_mobile.c common/common.h ../common/port.h \
2167+ ../common/pmtrace.h ../common/usercmd.h common/mathlib.h
2168+crclib.o: common/crclib.c common/common.h ../common/port.h \
2169 common/system.h ../common/const.h ../common/ref_params.h \
2170 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2171 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2172 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2173 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2174 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2175- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
2176- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
2177- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
2178- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2179+ ../common/pmtrace.h ../common/usercmd.h ../common/bspfile.h \
2180+ client/client.h common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
2181+ ../common/gameinfo.h mobility_int.h common/mod_local.h edict.h \
2182+ progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2183 ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
2184 cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
2185 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
2186 ../common/netadr.h common/world.h ../common/lightstyle.h \
2187- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
2188- common/library.h client/gl_local.h client/gl_export.h ../common/dlight.h \
2189- ../common/wadfile.h common/touch.h
2190-gl_sprite.o: client/gl_sprite.c common/common.h ../common/port.h \
2191+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h
2192+input.o: common/input.c ../common/port.h common/common.h common/system.h \
2193+ ../common/const.h ../common/ref_params.h ../common/com_model.h \
2194+ ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
2195+ common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
2196+ ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
2197+ ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
2198+ ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
2199+ ../common/usercmd.h common/input.h keydefs.h common/touch.h \
2200+ client/client.h common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
2201+ ../common/gameinfo.h mobility_int.h common/mod_local.h \
2202+ ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
2203+ ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
2204+ ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
2205+ common/netchan.h common/net_buffer.h ../common/engine_features.h \
2206+ ../common/net_api.h ../common/netadr.h common/world.h \
2207+ ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
2208+ ../common/event_args.h client/vgui/vgui_draw.h
2209+matrixlib.o: common/matrixlib.c common/common.h ../common/port.h \
2210 common/system.h ../common/const.h ../common/ref_params.h \
2211 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2212 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2213 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2214 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2215 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2216- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
2217- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
2218- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
2219- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2220- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
2221- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
2222- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
2223- ../common/netadr.h common/world.h ../common/lightstyle.h \
2224- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
2225- client/gl_local.h client/gl_export.h ../common/dlight.h \
2226- ../common/wadfile.h common/pm_local.h sprite.h studio.h \
2227- ../common/entity_types.h client/cl_tent.h
2228-gl_image.o: client/gl_image.c common/common.h ../common/port.h \
2229+ ../common/pmtrace.h ../common/usercmd.h common/mathlib.h
2230+titles.o: common/titles.c common/common.h ../common/port.h \
2231 common/system.h ../common/const.h ../common/ref_params.h \
2232 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2233 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2234@@ -1483,42 +1358,39 @@ gl_image.o: client/gl_image.c common/common.h ../common/port.h \
2235 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2236 ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
2237 cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
2238- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
2239- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2240- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
2241- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
2242+ mobility_int.h common/mod_local.h ../common/bspfile.h edict.h progdefs.h \
2243+ eiface.h custom.h ../pm_shared/pm_movevars.h ../common/render_api.h \
2244+ ../common/lightstyle.h ../common/dlight.h cdll_exp.h \
2245+ ../common/screenfade.h common/protocol.h common/netchan.h \
2246 common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
2247 ../common/netadr.h common/world.h ../common/lightstyle.h \
2248- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
2249- client/gl_local.h client/gl_export.h ../common/dlight.h \
2250- ../common/wadfile.h studio.h
2251-s_dsp.o: client/s_dsp.c common/common.h ../common/port.h common/system.h \
2252+ ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h
2253+cvar.o: common/cvar.c common/common.h ../common/port.h common/system.h \
2254 ../common/const.h ../common/ref_params.h ../common/com_model.h \
2255 ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
2256 common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
2257 ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
2258 ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
2259 ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
2260- ../common/usercmd.h client/client.h common/mathlib.h cdll_int.h \
2261- ../common/wrect.h menu_int.h ../common/gameinfo.h mobility_int.h \
2262- common/mod_local.h common/common.h ../common/bspfile.h edict.h \
2263- progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2264- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
2265- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
2266- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
2267- ../common/netadr.h common/world.h ../common/lightstyle.h \
2268- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
2269- client/sound.h client/vox.h
2270-s_mouth.o: client/s_mouth.c common/common.h ../common/port.h \
2271+ ../common/usercmd.h
2272+random.o: common/random.c common/common.h ../common/port.h \
2273 common/system.h ../common/const.h ../common/ref_params.h \
2274 ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2275 ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2276 ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2277 ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2278 ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2279- ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
2280- client/vox.h client/client.h cdll_int.h ../common/wrect.h menu_int.h \
2281- ../common/gameinfo.h mobility_int.h common/mod_local.h common/common.h \
2282+ ../common/pmtrace.h ../common/usercmd.h
2283+keys.o: common/keys.c common/common.h ../common/port.h common/system.h \
2284+ ../common/const.h ../common/ref_params.h ../common/com_model.h \
2285+ ../common/bspfile.h custom.h common/crtlib.h ../common/cvardef.h \
2286+ common/crtlib_inline.h ../common/netadr.h ../common/con_nprint.h \
2287+ ../common/cl_entity.h ../common/entity_state.h ../pm_shared/pm_info.h \
2288+ ../common/weaponinfo.h ../common/event_args.h ../common/studio_event.h \
2289+ ../pm_shared/pm_defs.h ../pm_shared/pm_info.h ../common/pmtrace.h \
2290+ ../common/usercmd.h common/input.h keydefs.h client/client.h \
2291+ common/mathlib.h cdll_int.h ../common/wrect.h menu_int.h \
2292+ ../common/gameinfo.h mobility_int.h common/mod_local.h \
2293 ../common/bspfile.h edict.h progdefs.h eiface.h custom.h \
2294 ../pm_shared/pm_movevars.h ../common/render_api.h ../common/lightstyle.h \
2295 ../common/dlight.h cdll_exp.h ../common/screenfade.h common/protocol.h \
2296@@ -1526,32 +1398,109 @@ s_mouth.o: client/s_mouth.c common/common.h ../common/port.h \
2297 ../common/net_api.h ../common/netadr.h common/world.h \
2298 ../common/lightstyle.h ../pm_shared/pm_shared.h ../common/event_api.h \
2299 ../common/event_args.h
2300-vid_sdl_nanogl.o: platform/sdl/vid_sdl_nanogl.c
2301-snd_sdl.o: platform/sdl/snd_sdl.c ../common/port.h common/common.h \
2302- common/system.h ../common/const.h ../common/ref_params.h \
2303- ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2304- ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2305- ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2306- ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2307- ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2308- ../common/pmtrace.h ../common/usercmd.h client/sound.h common/mathlib.h \
2309- client/vox.h client/sound.h
2310-events.o: platform/sdl/events.c
2311-vid_sdl.o: platform/sdl/vid_sdl.c common/common.h ../common/port.h \
2312- common/system.h ../common/const.h ../common/ref_params.h \
2313- ../common/com_model.h ../common/bspfile.h custom.h common/crtlib.h \
2314- ../common/cvardef.h common/crtlib_inline.h ../common/netadr.h \
2315- ../common/con_nprint.h ../common/cl_entity.h ../common/entity_state.h \
2316- ../pm_shared/pm_info.h ../common/weaponinfo.h ../common/event_args.h \
2317- ../common/studio_event.h ../pm_shared/pm_defs.h ../pm_shared/pm_info.h \
2318- ../common/pmtrace.h ../common/usercmd.h client/client.h common/mathlib.h \
2319- cdll_int.h ../common/wrect.h menu_int.h ../common/gameinfo.h \
2320- mobility_int.h common/mod_local.h common/common.h ../common/bspfile.h \
2321- edict.h progdefs.h eiface.h custom.h ../pm_shared/pm_movevars.h \
2322- ../common/render_api.h ../common/lightstyle.h ../common/dlight.h \
2323- cdll_exp.h ../common/screenfade.h common/protocol.h common/netchan.h \
2324- common/net_buffer.h ../common/engine_features.h ../common/net_api.h \
2325- ../common/netadr.h common/world.h ../common/lightstyle.h \
2326- ../pm_shared/pm_shared.h ../common/event_api.h ../common/event_args.h \
2327- client/gl_local.h client/gl_export.h ../common/dlight.h \
2328- ../common/wadfile.h client/input.h keydefs.h client/gl_vidnt.h
2329+img_quant.o: common/imagelib/img_quant.c common/imagelib/imagelib.h \
2330+ common/common.h ../common/port.h common/system.h ../common/const.h \
2331+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2332+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2333+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2334+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2335+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2336+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
2337+img_main.o: common/imagelib/img_main.c common/imagelib/imagelib.h \
2338+ common/common.h ../common/port.h common/system.h ../common/const.h \
2339+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2340+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2341+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2342+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2343+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2344+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
2345+img_wad.o: common/imagelib/img_wad.c common/imagelib/imagelib.h \
2346+ common/common.h ../common/port.h common/system.h ../common/const.h \
2347+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2348+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2349+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2350+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2351+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2352+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h \
2353+ common/mathlib.h ../common/wadfile.h studio.h sprite.h ../common/qfont.h
2354+img_bmp.o: common/imagelib/img_bmp.c common/imagelib/imagelib.h \
2355+ common/common.h ../common/port.h common/system.h ../common/const.h \
2356+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2357+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2358+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2359+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2360+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2361+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
2362+img_dds.o: common/imagelib/img_dds.c common/imagelib/imagelib.h \
2363+ common/common.h ../common/port.h common/system.h ../common/const.h \
2364+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2365+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2366+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2367+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2368+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2369+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
2370+img_utils.o: common/imagelib/img_utils.c common/imagelib/imagelib.h \
2371+ common/common.h ../common/port.h common/system.h ../common/const.h \
2372+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2373+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2374+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2375+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2376+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2377+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h \
2378+ common/mathlib.h common/mod_local.h common/common.h ../common/bspfile.h \
2379+ edict.h progdefs.h eiface.h custom.h client/gl_export.h
2380+img_tga.o: common/imagelib/img_tga.c common/imagelib/imagelib.h \
2381+ common/common.h ../common/port.h common/system.h ../common/const.h \
2382+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2383+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2384+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2385+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2386+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2387+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
2388+snd_wav.o: common/soundlib/snd_wav.c common/soundlib/soundlib.h \
2389+ common/common.h ../common/port.h common/system.h ../common/const.h \
2390+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2391+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2392+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2393+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2394+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2395+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
2396+snd_utils.o: common/soundlib/snd_utils.c common/soundlib/soundlib.h \
2397+ common/common.h ../common/port.h common/system.h ../common/const.h \
2398+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2399+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2400+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2401+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2402+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2403+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
2404+snd_mp3.o: common/soundlib/snd_mp3.c common/soundlib/soundlib.h \
2405+ common/common.h ../common/port.h common/system.h ../common/const.h \
2406+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2407+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2408+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2409+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2410+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2411+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
2412+snd_main.o: common/soundlib/snd_main.c common/soundlib/soundlib.h \
2413+ common/common.h ../common/port.h common/system.h ../common/const.h \
2414+ ../common/ref_params.h ../common/com_model.h ../common/bspfile.h \
2415+ custom.h common/crtlib.h ../common/cvardef.h common/crtlib_inline.h \
2416+ ../common/netadr.h ../common/con_nprint.h ../common/cl_entity.h \
2417+ ../common/entity_state.h ../pm_shared/pm_info.h ../common/weaponinfo.h \
2418+ ../common/event_args.h ../common/studio_event.h ../pm_shared/pm_defs.h \
2419+ ../pm_shared/pm_info.h ../common/pmtrace.h ../common/usercmd.h
2420+tabinit.o: common/soundlib/libmpg/tabinit.c \
2421+ common/soundlib/libmpg/mpg123.h
2422+interface.o: common/soundlib/libmpg/interface.c \
2423+ common/soundlib/libmpg/mpg123.h common/soundlib/libmpg/mpglib.h \
2424+ common/soundlib/libmpg/libmpg.h
2425+layer3.o: common/soundlib/libmpg/layer3.c common/soundlib/libmpg/mpg123.h \
2426+ common/soundlib/libmpg/mpglib.h common/soundlib/libmpg/huffman.h
2427+common.o: common/soundlib/libmpg/common.c common/soundlib/libmpg/mpg123.h
2428+dct64_i386.o: common/soundlib/libmpg/dct64_i386.c \
2429+ common/soundlib/libmpg/mpg123.h
2430+decode_i386.o: common/soundlib/libmpg/decode_i386.c \
2431+ common/soundlib/libmpg/mpg123.h common/soundlib/libmpg/mpglib.h
2432+layer2.o: common/soundlib/libmpg/layer2.c common/soundlib/libmpg/mpg123.h \
2433+ common/soundlib/libmpg/l2tables.h
2434+events.o: common/sdl/events.c
2435diff --git a/engine/Makefile.linux b/engine/Makefile.linux
2436index 9fc9fc5..b99c4cc 100644
2437--- a/engine/Makefile.linux
2438+++ b/engine/Makefile.linux
2439@@ -1,4 +1,4 @@
2440-CC = gcc -g
2441+CC ?= gcc
2442 CXX ?= g++
2443 CFLAGS ?= -O2 -march=native -fno-omit-frame-pointer -ggdb -funsigned-char -Wall -Wextra -Wsign-compare -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-but-set-variable
2444 LDFLAGS =
2445@@ -78,11 +77,9 @@ ifeq ($(NANOGL),1)
2446 SRCS_CPP += $(wildcard nanogl/*.cpp)
2447 endif
2448 OBJS_CPP = $(patsubst %.cpp,obj/%.o,$(SRCS_CPP))
2449-SRCS = $(wildcard server/*.c) $(wildcard client/vgui/*.c) $(wildcard common/*.c) $(wildcard common/imagelib/*.c) $(wildcard common/soundlib/*.c) $(wildcard common/soundlib/libmpg/*.c)
2450-
2451+SRCS = $(wildcard server/*.c) $(wildcard client/vgui/*.c) $(wildcard common/*.c) $(wildcard common/imagelib/*.c) $(wildcard common/soundlib/*.c) $(wildcard common/soundlib/libmpg/*.c) $(wildcard ./common/sdl/*.c)
2452 ifneq ($(XASH_DEDICATED),1)
2453 SRCS += $(wildcard client/*.c)
2454-SRCS += $(wildcard platform/sdl/*.c)
2455 endif
2456 OBJS = $(patsubst %.c,obj/%.o,$(SRCS))
2457 ifeq ($(XASH_SINGLE_BINARY),0)
2458@@ -105,14 +102,17 @@ xash: $(OBJS) $(OBJS_CPP)
2459
2460 endif
2461
2462+$(OBJS): | obj
2463
2464-DIRS := obj obj/server obj/client/vgui obj/common/sdl obj/common/imagelib obj/common/soundlib/libmpg obj/platform/sdl obj/nanogl
2465-
2466-
2467-$(OBJS): | $(DIRS)
2468+obj:
2469+ mkdir -p obj
2470+ mkdir -p obj/server
2471+ mkdir -p obj/client/vgui
2472+ mkdir -p obj/common/sdl
2473+ mkdir -p obj/common/imagelib
2474+ mkdir -p obj/common/soundlib/libmpg
2475+ mkdir -p obj/nanogl
2476
2477-$(DIRS) :
2478- mkdir -p $(DIRS)
2479 obj/%.o : %.c
2480 $(CC) $(CFLAGS) $(INCLUDES) $(DEFINES) -c "$<" -o "$@" -Wno-unused-result -fvisibility=hidden
2481
2482diff --git a/engine/Makefile.mingw b/engine/Makefile.mingw
2483index ab4b0f7..023e044 100644
2484--- a/engine/Makefile.mingw
2485+++ b/engine/Makefile.mingw
2486@@ -5,7 +5,7 @@ CFLAGS = -O2 -fno-omit-frame-pointer -ggdb -funsafe-loop-optimizations -funsafe-
2487 LDFLAGS =
2488 LIBS = -lm
2489 TOPDIR = $(PWD)/..
2490-INCLUDES = -I../SDL2/include -Icommon -I../common -Iserver -Iclient -Iclient/vgui -I. -I../pm_shared
2491+INCLUDES = -I../SDL2/include -Icommon -I../common -Iserver -Iclient -Iclient/vgui -I. -I../pm_shared -Icommon/sdl
2492 DEFINES = -DDBGHELP
2493 XASH_VGUI ?= 1
2494 ifeq ($(XASH_DEDICATED),1)
2495@@ -21,7 +21,7 @@ DEFINES += -DXASH_GLES -DXASH_NANOGL -DUSE_CORE_PROFILE
2496 LIBS += -lstdc++
2497 endif
2498
2499-DEFINES += -DDEBUGNAN -DSINGLE_BINARY -DXASH_FASTSTR -DXASH_FORCEINLINE -DVECTORIZE_SINCOS -DXASH_W32CON
2500+DEFINES += -DDEBUGNAN -DSINGLE_BINARY -DXASH_FASTSTR -DXASH_FORCEINLINE -DVECTORIZE_SINCOS
2501
2502 ifeq ($(XASH_VGUI),1)
2503 DEFINES += -DXASH_VGUI
2504@@ -39,11 +39,10 @@ ifeq ($(NANOGL),1)
2505 SRCS_CPP += $(wildcard ../nanogl/*.cpp)
2506 endif
2507 OBJS_CPP = $(SRCS_CPP:.cpp=.o)
2508-SRCS = $(wildcard server/*.c) $(wildcard client/vgui/*.c) $(wildcard common/*.c) $(wildcard common/imagelib/*.c) $(wildcard common/soundlib/*.c) $(wildcard common/soundlib/libmpg/*.c) $(wildcard platform/win32/*.c)
2509+SRCS = $(wildcard server/*.c) $(wildcard client/vgui/*.c) $(wildcard common/*.c) $(wildcard common/imagelib/*.c) $(wildcard common/soundlib/*.c) $(wildcard common/soundlib/libmpg/*.c) $(wildcard ./common/sdl/*.c)
2510 OBJS = $(SRCS:.c=.o)
2511 ifneq ($(XASH_DEDICATED),1)
2512 SRCS += $(wildcard client/*.c)
2513-SRCS += $(wildcard platform/sdl/*.c)
2514 endif
2515 xash_bin.exe: $(OBJS) $(OBJS_CPP)
2516 $(CC) -o xash_bin.exe $(LDFLAGS) $(OBJS) $(OBJS_CPP) $(LIBS)
2517diff --git a/engine/client/cl_events.c b/engine/client/cl_events.c
2518index 8243e73..b9ae618 100644
2519--- a/engine/client/cl_events.c
2520+++ b/engine/client/cl_events.c
2521@@ -494,12 +494,12 @@ void CL_PlaybackEvent( int flags, const edict_t *pInvoker, word eventindex, floa
2522 VectorCopy( angles, args.angles );
2523
2524 if( !origin || VectorIsNull( origin ))
2525- VectorCopy( cl.predicted.origin, args.origin );
2526+ VectorCopy( cl.frame.client.origin, args.origin );
2527 else
2528 VectorCopy( origin, args.origin );
2529
2530- VectorCopy( cl.predicted.velocity, args.velocity );
2531- args.ducking = cl.predicted.usehull == 1;
2532+ VectorCopy( cl.frame.client.velocity, args.velocity );
2533+ args.ducking = cl.frame.client.bInDuck == 1;
2534
2535 args.fparam1 = fparam1;
2536 args.fparam2 = fparam2;
2537diff --git a/engine/client/cl_frame.c b/engine/client/cl_frame.c
2538index 6666d96..4a4f693 100644
2539--- a/engine/client/cl_frame.c
2540+++ b/engine/client/cl_frame.c
2541@@ -125,7 +125,7 @@ qboolean CL_FindInterpolationUpdates( cl_entity_t *ent, float targettime, positi
2542
2543 int CL_InterpolateModel( cl_entity_t *e )
2544 {
2545- position_history_t *ph0 = NULL, *ph1 = NULL;
2546+ position_history_t *ph0, *ph1;
2547 vec3_t origin, angles, delta;
2548 float t, t1, t2, frac;
2549 int i;
2550@@ -133,15 +133,17 @@ int CL_InterpolateModel( cl_entity_t *e )
2551 VectorCopy( e->curstate.origin, e->origin );
2552 VectorCopy( e->curstate.angles, e->angles );
2553
2554- if ( cls.timedemo || !e->model || e->model->name[0] == '*' && !r_bmodelinterp->value || RP_LOCALCLIENT(e) || cl.maxclients == 1 )
2555- return 1;
2556-
2557- if( cl.predicted.moving && cl.predicted.onground == e->index )
2558+<<<<<<< HEAD
2559+ if( cls.timedemo || e->model == NULL || RP_LOCALCLIENT( e ) || cl.maxclients <= 1 )
2560+=======
2561+ if( e->model == NULL )
2562+>>>>>>> master
2563 return 1;
2564
2565 t = cl.time - cl_interp->value;
2566
2567- CL_FindInterpolationUpdates( e, t, &ph0, &ph1, NULL );
2568+ if( !CL_FindInterpolationUpdates( e, t, &ph0, &ph1, NULL ))
2569+ return 0;
2570
2571 if( ph0 == NULL || ph1 == NULL )
2572 return 0;
2573@@ -197,36 +199,6 @@ int CL_InterpolateModel( cl_entity_t *e )
2574 return 1;
2575 }
2576
2577-void CL_InterpolateMovingEntity( cl_entity_t *ent )
2578-{
2579- float d, f = 0.0f;
2580- int i;
2581-
2582- // don't do it if the goalstarttime hasn't updated in a while.
2583- // NOTE: Because we need to interpolate multiplayer characters, the interpolation time limit
2584- // was increased to 1.0 s., which is 2x the max lag we are accounting for.
2585- if(( cl.time < ent->curstate.animtime + 1.0f ) && ( ent->curstate.animtime != ent->latched.prevanimtime ))
2586- f = ( cl.time - ent->curstate.animtime ) / ( ent->curstate.animtime - ent->latched.prevanimtime );
2587-
2588- f = f - 1.0f;
2589-
2590- ent->origin[0] += ( ent->origin[0] - ent->latched.prevorigin[0] ) * f;
2591- ent->origin[1] += ( ent->origin[1] - ent->latched.prevorigin[1] ) * f;
2592- ent->origin[2] += ( ent->origin[2] - ent->latched.prevorigin[2] ) * f;
2593-
2594- for( i = 0; i < 3; i++ )
2595- {
2596- float ang1, ang2;
2597-
2598- ang1 = ent->angles[i];
2599- ang2 = ent->latched.prevangles[i];
2600- d = ang1 - ang2;
2601- if( d > 180.0f ) d -= 360.0f;
2602- else if( d < -180.0f ) d += 360.0f;
2603- ent->angles[i] += d * f;
2604- }
2605-}
2606-
2607 void CL_UpdateEntityFields( cl_entity_t *ent )
2608 {
2609 // parametric rockets code
2610@@ -253,9 +224,7 @@ void CL_UpdateEntityFields( cl_entity_t *ent )
2611 ent->angles[PITCH] = -ent->angles[PITCH] / 3.0f;
2612
2613 // make me lerp
2614- if( ent->index == cl.predicted.onground && cl.predicted.moving )
2615- CL_InterpolateMovingEntity( ent );
2616- else if( ent->model && ent->model->type == mod_brush && ent->curstate.animtime != 0.0f)
2617+ if( ent->model && ent->model->type == mod_brush && ent->curstate.animtime != 0.0f )
2618 {
2619 float d, f = 0.0f;
2620 int i;
2621@@ -551,6 +520,15 @@ void CL_WeaponAnim( int iAnim, int body )
2622 cl_entity_t *view = &clgame.viewent;
2623 cl.weaponstarttime = 0;
2624 cl.weaponseq = iAnim;
2625+<<<<<<< HEAD
2626+ if( cl_predict->value || !cl_lw->value )
2627+ view->curstate.modelindex = cl.frame.client.viewmodel;
2628+=======
2629+ if( Host_IsLocalClient() || cl_predict->value || !cl_lw->value )
2630+ view->curstate.modelindex = cl.frame.local.client.viewmodel;
2631+>>>>>>> master
2632+ else
2633+ view->curstate.modelindex = cl.predicted_viewmodel;
2634
2635 // anim is changed. update latchedvars
2636 if( iAnim != view->curstate.sequence )
2637@@ -1037,7 +1015,7 @@ void CL_SetIdealPitch( void )
2638 vec3_t top, bottom;
2639 float z[MAX_FORWARD];
2640 int i, j;
2641- float step, dir, steps;
2642+ int step, dir, steps;
2643 pmtrace_t tr;
2644
2645 if( !( cl.frame.client.flags & FL_ONGROUND ))
2646@@ -1048,9 +1026,9 @@ void CL_SetIdealPitch( void )
2647
2648 for( i = 0; i < MAX_FORWARD; i++ )
2649 {
2650- top[0] = cl.predicted.origin[0] + cosval * (i + 3.0f) * 12.0f;
2651- top[1] = cl.predicted.origin[1] + sinval * (i + 3.0f) * 12.0f;
2652- top[2] = cl.predicted.origin[2] + cl.predicted.viewofs[2];
2653+ top[0] = cl.frame.client.origin[0] + cosval * (i + 3.0f) * 12.0f;
2654+ top[1] = cl.frame.client.origin[1] + sinval * (i + 3.0f) * 12.0f;
2655+ top[2] = cl.frame.client.origin[2] + cl.frame.client.view_ofs[2];
2656
2657 bottom[0] = top[0];
2658 bottom[1] = top[1];
2659diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c
2660index 3fb2e9c..f8d9bd9 100644
2661--- a/engine/client/cl_game.c
2662+++ b/engine/client/cl_game.c
2663@@ -2220,7 +2220,7 @@ pfnLocalPlayerDucking
2664 */
2665 int pfnLocalPlayerDucking( void )
2666 {
2667- return cl.predicted.usehull == 1;
2668+ return cl.frame.client.bInDuck;
2669 }
2670
2671 /*
2672@@ -2235,7 +2235,7 @@ void pfnLocalPlayerViewheight( float *view_ofs )
2673 if( !view_ofs ) return;
2674
2675 if( CL_IsPredicted( ))
2676- VectorCopy( cl.predicted.viewofs, view_ofs );
2677+ VectorCopy( cl.predicted_viewofs, view_ofs );
2678 else VectorCopy( cl.frame.client.view_ofs, view_ofs );
2679 }
2680
2681@@ -2286,7 +2286,91 @@ physent_t *pfnGetPhysent( int idx )
2682 return NULL;
2683 }
2684
2685+/*
2686+=============
2687+pfnSetUpPlayerPrediction
2688+
2689+=============
2690+*/
2691+void pfnSetUpPlayerPrediction( int dopred, int includeLocal )
2692+{
2693+#if 0
2694+ int i;
2695+ entity_state_t *state;
2696+ predicted_player_t *player;
2697+ cl_entity_t *ent;
2698+
2699+ for( i = 0; i < MAX_CLIENTS; i++ )
2700+ {
2701+ state = cl.frames[cl.parsecountmod].playerstate[i];
2702+
2703+ player = cl.predicted_players[j];
2704+ player->active = false;
2705+
2706+ if( state->messagenum != cl.parsecount )
2707+ continue; // not present this frame
2708
2709+ if( !state->modelindex )
2710+ continue;
2711+
2712+ ent = CL_GetEntityByIndex( j + 1 );
2713+
2714+ if( !ent ) // in case
2715+ continue;
2716+
2717+ // special for EF_NODRAW and local client?
2718+ if( state->effects & EF_NODRAW && !includeLocal )
2719+ {
2720+ if( cl.playernum == j )
2721+ continue;
2722+
2723+ player->active = true;
2724+ player->movetype = state->movetype;
2725+ player->solid = state->solid;
2726+ player->usehull = state->usehull;
2727+
2728+ VectorCopy( ent->origin, player->origin );
2729+ VectorCopy( ent->angles, player->angles );
2730+ }
2731+ else
2732+ {
2733+ player->active = true;
2734+ player->movetype = state->movetype;
2735+ player->solid = state->solid;
2736+ player->usehull = state->usehull;
2737+
2738+ // don't rewrite origin and angles of local client
2739+ if( cl.playernum == j )
2740+ continue;
2741+
2742+ VectorCopy(state->origin, player->origin);
2743+ VectorCopy(state->angles, player->angles);
2744+ }
2745+ }
2746+#endif
2747+}
2748+
2749+/*
2750+=============
2751+pfnPushPMStates
2752+
2753+=============
2754+*/
2755+void pfnPushPMStates( void )
2756+{
2757+ clgame.oldcount = clgame.pmove->numphysent;
2758+}
2759+
2760+/*
2761+=============
2762+pfnPopPMStates
2763+
2764+=============
2765+*/
2766+void pfnPopPMStates( void )
2767+{
2768+ clgame.pmove->numphysent = clgame.oldcount;
2769+}
2770
2771 /*
2772 =============
2773@@ -2533,7 +2618,7 @@ const char *PlayerInfo_ValueForKey( int playerNum, const char *key )
2774 if(( playerNum > cl.maxclients ) || ( playerNum < 1 ))
2775 return NULL;
2776
2777- if( !cl.players[playerNum-1].name[0] )
2778+ if(( cl.players[playerNum-1].name == NULL ) || (*(cl.players[playerNum-1].name) == 0 ))
2779 return NULL;
2780
2781 return Info_ValueForKey( cl.players[playerNum-1].userinfo, key );
2782@@ -3151,7 +3236,7 @@ int TriWorldToScreen( float *world, float *screen )
2783
2784 retval = R_WorldToScreen( world, screen );
2785
2786- screen[0] = 0.5f * (float)cl.refdef.viewport[2];
2787+ screen[0] = 0.5f * screen[0] * (float)cl.refdef.viewport[2];
2788 screen[1] = -0.5f * screen[1] * (float)cl.refdef.viewport[3];
2789 screen[0] += 0.5f * (float)cl.refdef.viewport[2];
2790 screen[1] += 0.5f * (float)cl.refdef.viewport[3];
2791@@ -3717,9 +3802,9 @@ static event_api_t gEventApi =
2792 pfnLocalPlayerBounds,
2793 pfnIndexFromTrace,
2794 pfnGetPhysent,
2795- CL_SetUpPlayerPrediction,
2796- CL_PushPMStates,
2797- CL_PopPMStates,
2798+ pfnSetUpPlayerPrediction,
2799+ pfnPushPMStates,
2800+ pfnPopPMStates,
2801 CL_SetSolidPlayers,
2802 CL_SetTraceHull,
2803 CL_PlayerTrace,
2804diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c
2805index 4055594..810c273 100644
2806--- a/engine/client/cl_main.c
2807+++ b/engine/client/cl_main.c
2808@@ -35,6 +35,7 @@ convar_t *r_oldparticles;
2809 convar_t *rcon_client_password;
2810 convar_t *rcon_address;
2811
2812+convar_t *cl_smooth;
2813 convar_t *cl_timeout;
2814 convar_t *cl_predict;
2815 convar_t *cl_showfps;
2816@@ -43,8 +44,6 @@ convar_t *cl_nodelta;
2817 convar_t *cl_crosshair;
2818 convar_t *cl_cmdbackup;
2819 convar_t *cl_showerror;
2820-convar_t *cl_nosmooth;
2821-convar_t *cl_smoothtime;
2822 convar_t *cl_draw_particles;
2823 convar_t *cl_lightstyle_lerping;
2824 convar_t *cl_idealpitchscale;
2825@@ -58,11 +57,8 @@ convar_t *cl_trace_events;
2826 convar_t *cl_trace_stufftext;
2827 convar_t *cl_charset;
2828 convar_t *cl_sprite_nearest;
2829-convar_t *cl_updaterate;
2830 convar_t *hud_scale;
2831 convar_t *cl_maxpacket;
2832-convar_t *r_bmodelinterp;
2833-
2834 convar_t *hud_utf8;
2835 //
2836 // userinfo
2837@@ -262,7 +258,11 @@ void CL_ComputePacketLoss( void )
2838 cls.packet_loss_recalc_time = host.realtime + 1.0;
2839
2840 // compuate packet loss
2841+<<<<<<< HEAD
2842+ for( i = cls.netchan.incoming_sequence - CL_UPDATE_BACKUP + 1; i <= cls.netchan.incoming_sequence; i++ )
2843+=======
2844 for( i = cls.netchan.incoming_sequence - CL_UPDATE_BACKUP+1; i <= cls.netchan.incoming_sequence; i++ )
2845+>>>>>>> master
2846 {
2847 frm = i;
2848 frame = &cl.frames[frm & CL_UPDATE_MASK];
2849@@ -309,8 +309,12 @@ CL_CreateCmd
2850 */
2851 void CL_CreateCmd( void )
2852 {
2853- usercmd_t cmd = { 0 };
2854+<<<<<<< HEAD
2855+ usercmd_t cmd;
2856 runcmd_t *pcmd;
2857+=======
2858+ usercmd_t cmd = { 0 };
2859+>>>>>>> master
2860 color24 color;
2861 vec3_t angles;
2862 qboolean active;
2863@@ -322,23 +326,26 @@ void CL_CreateCmd( void )
2864
2865 // build list of all solid entities per next frame (exclude clients)
2866 CL_SetSolidEntities ();
2867- CL_PushPMStates();
2868 CL_SetSolidPlayers ( cl.playernum );
2869 VectorCopy( cl.refdef.cl_viewangles, angles );
2870-
2871- // write cdata
2872 VectorCopy( cl.frame.client.origin, cl.data.origin );
2873 VectorCopy( cl.refdef.cl_viewangles, cl.data.viewangles );
2874+
2875 cl.data.iWeaponBits = cl.frame.client.weapons;
2876+
2877+ if( cl.scr_fov < 1.0f || cl.scr_fov> 170.0f )
2878+ cl.scr_fov = 90.0f;
2879+
2880 cl.data.fov = cl.scr_fov;
2881
2882- if( clgame.dllFuncs.pfnUpdateClientData( &cl.data, cl.time ) )
2883- {
2884- // grab changes if successful
2885+ clgame.dllFuncs.pfnUpdateClientData( &cl.data, cl.time );
2886+
2887+ // grab changes
2888 VectorCopy( cl.data.viewangles, cl.refdef.cl_viewangles );
2889+ cl.frame.client.weapons = cl.data.iWeaponBits;
2890 cl.scr_fov = cl.data.fov;
2891- }
2892-
2893+ if( cl.scr_fov < 1.0f || cl.scr_fov> 170.0f )
2894+ cl.scr_fov = 90.0f;
2895 // allways dump the first ten messages,
2896 // because it may contain leftover inputs
2897 // from the last level
2898@@ -365,9 +372,13 @@ void CL_CreateCmd( void )
2899 pcmd->sendsize = 0;
2900
2901 active = ( cls.state == ca_active && !cl.refdef.paused && !cls.demoplayback );
2902+<<<<<<< HEAD
2903
2904 clgame.dllFuncs.CL_CreateMove( cl.time - cl.oldtime, &pcmd->cmd, active );
2905 CL_PopPMStates();
2906+=======
2907+ clgame.dllFuncs.CL_CreateMove( cl.time - cl.oldtime, &cmd, active );
2908+>>>>>>> master
2909
2910 // after command generated in client,
2911 // add motion events from engine controls
2912@@ -380,7 +391,7 @@ void CL_CreateCmd( void )
2913 // because is potential backdoor for cheating
2914 pcmd->cmd.msec = ms;
2915 pcmd->cmd.lerp_msec = cl_interp->value * 1000;
2916- pcmd->cmd.lerp_msec = bound( 0, pcmd->cmd.lerp_msec, 250 );
2917+ pcmd->cmd.lerp_msec = bound( 0, cmd.lerp_msec, 250 );
2918
2919 V_ProcessOverviewCmds( &pcmd->cmd );
2920 V_ProcessShowTexturesCmds( &pcmd->cmd );
2921@@ -1175,7 +1186,7 @@ void CL_PrepSound( void )
2922
2923 S_BeginRegistration();
2924
2925- for( i = 0; i < MAX_SOUNDS - 1 && cl.sound_precache[i+1][0]; i++ )
2926+ for( i = 0; i < MAX_SOUNDS && cl.sound_precache[i+1][0]; i++ )
2927 {
2928 cl.sound_index[i+1] = S_RegisterSound( cl.sound_precache[i+1] );
2929 Cvar_SetFloat( "scr_loading", scr_loading->value + 5.0f / sndcount );
2930@@ -1242,7 +1253,7 @@ void CL_PrepVideo( void )
2931 mdlcount++; // total num models
2932 step = mdlcount/10;
2933
2934- for( i = 0; i < MAX_MODELS - 1 && cl.model_precache[i+1][0]; i++ )
2935+ for( i = 0; i < MAX_MODELS && cl.model_precache[i+1][0]; i++ )
2936 {
2937 Q_strncpy( mdlname, cl.model_precache[i+1], MAX_STRING );
2938 Mod_RegisterModel( mdlname, i+1 );
2939@@ -1401,11 +1412,7 @@ void CL_ConnectionlessPacket( netadr_t from, sizebuf_t *msg )
2940 else if( !Q_strcmp( c, "print" ))
2941 {
2942 // print command from somewhere
2943- char *str = BF_ReadString( msg );
2944- Msg("^5r:^7%s", str );
2945-
2946- if( str[0] == 0 || str[ Q_strlen( str ) - 1 ] != '\n' )
2947- Msg( "\n" );
2948+ Msg("remote: %s\n", BF_ReadString( msg ) );
2949 }
2950 else if( !Q_strcmp( c, "ping" ))
2951 {
2952@@ -1721,22 +1728,24 @@ void CL_InitLocal( void )
2953 hltv = Cvar_Get( "hltv", "0", CVAR_USERINFO|CVAR_LATCH, "HLTV mode" );
2954 cl_showfps = Cvar_Get( "cl_showfps", "1", CVAR_ARCHIVE, "show client fps" );
2955 cl_showpos = Cvar_Get( "cl_showpos", "0", CVAR_ARCHIVE, "show local player position and velocity" );
2956+ cl_smooth = Cvar_Get ("cl_smooth", "0", CVAR_ARCHIVE, "smooth up stair climbing and interpolate position in multiplayer" );
2957 cl_cmdbackup = Cvar_Get( "cl_cmdbackup", "10", CVAR_ARCHIVE, "how many additional history commands are sent" );
2958 cl_cmdrate = Cvar_Get( "cl_cmdrate", "30", CVAR_ARCHIVE, "max number of command packets sent to server per second" );
2959 cl_draw_particles = Cvar_Get( "cl_draw_particles", "1", CVAR_ARCHIVE, "disable particle effects" );
2960 cl_draw_beams = Cvar_Get( "cl_draw_beams", "1", CVAR_ARCHIVE, "disable view beams" );
2961 cl_lightstyle_lerping = Cvar_Get( "cl_lightstyle_lerping", "0", CVAR_ARCHIVE, "enable animated light lerping (perfomance option)" );
2962 cl_sprite_nearest = Cvar_Get( "cl_sprite_nearest", "0", CVAR_ARCHIVE, "disable texture filtering on sprites" );
2963+<<<<<<< HEAD
2964 cl_showerror = Cvar_Get( "cl_showerror", "0", CVAR_ARCHIVE, "show prediction error" );
2965 cl_updaterate = Cvar_Get( "cl_updaterate", "60", CVAR_USERINFO|CVAR_ARCHIVE, "refresh rate of server messages" );
2966- cl_nosmooth = Cvar_Get( "cl_nosmooth", "0", CVAR_ARCHIVE, "smooth up stair climbing and interpolate position in multiplayer" );
2967- cl_smoothtime = Cvar_Get( "cl_smoothtime", "0.1", CVAR_ARCHIVE, "time to smooth up" );
2968- r_bmodelinterp = Cvar_Get( "r_bmodelinterp", "1", 0, "enable bmodel interpolation" );
2969+=======
2970+>>>>>>> master
2971
2972 hud_scale = Cvar_Get( "hud_scale", "0", CVAR_ARCHIVE|CVAR_LATCH, "scale hud at current resolution" );
2973 hud_utf8 = Cvar_Get( "hud_utf8", "0", CVAR_ARCHIVE, "Use utf-8 encoding for hud text" );
2974
2975 Cvar_Get( "skin", "", CVAR_USERINFO, "player skin" ); // XDM 3.3 want this cvar
2976+ Cvar_Get( "cl_updaterate", "60", CVAR_USERINFO|CVAR_ARCHIVE, "refresh rate of server messages" );
2977 Cvar_Get( "cl_background", "0", CVAR_READ_ONLY, "indicates that background map is running" );
2978
2979 // these two added to shut up CS 1.5 about 'unknown' commands
2980diff --git a/engine/client/cl_menu.c b/engine/client/cl_menu.c
2981index 1957f17..90a40dd 100644
2982--- a/engine/client/cl_menu.c
2983+++ b/engine/client/cl_menu.c
2984@@ -21,6 +21,7 @@ GNU General Public License for more details.
2985 #include "gl_local.h"
2986 #include "library.h"
2987 #include "input.h"
2988+#include "events.h"
2989
2990 static MENUAPI GetMenuAPI;
2991 static ADDTOUCHBUTTONTOLIST pfnAddTouchButtonToList;
2992diff --git a/engine/client/cl_mobile.c b/engine/client/cl_mobile.c
2993index aa903cf..da74f18 100644
2994--- a/engine/client/cl_mobile.c
2995+++ b/engine/client/cl_mobile.c
2996@@ -18,6 +18,7 @@ GNU General Public License for more details.
2997 #include "common.h"
2998 #include "client.h"
2999 #include "mobility_int.h"
3000+#include "events.h"
3001 #include "library.h"
3002 #include "gl_local.h"
3003 #include "touch.h"
3004@@ -129,7 +130,7 @@ void Mobile_Init( void )
3005 MsgDev( D_INFO, "Mobility interface not found\n");
3006 }
3007
3008- Cmd_AddCommand( "vibrate", (xcommand_t)Vibrate_f, "Vibrate for specified time");
3009+ Cmd_AddCommand( "vibrate", Vibrate_f, "Vibrate for specified time");
3010 vibration_length = Cvar_Get( "vibration_length", "1.0", CVAR_ARCHIVE, "Vibration length");
3011 vibration_enable = Cvar_Get( "vibration_enable", "1", CVAR_ARCHIVE, "Enable vibration");
3012 }
3013diff --git a/engine/client/cl_pmove.c b/engine/client/cl_pmove.c
3014index b57edaf..39c6306 100644
3015--- a/engine/client/cl_pmove.c
3016+++ b/engine/client/cl_pmove.c
3017@@ -24,6 +24,8 @@ GNU General Public License for more details.
3018 #include "studio.h"
3019 #include "library.h" // Loader_GetDllHandle( )
3020
3021+void pfnSetUpPlayerPrediction( int dopred, int bIncludeLocalClient );
3022+
3023 void CL_ClearPhysEnts( void )
3024 {
3025 clgame.pmove->numtouch = 0;
3026@@ -32,112 +34,6 @@ void CL_ClearPhysEnts( void )
3027 clgame.pmove->numphysent = 0;
3028 }
3029
3030-/*
3031-=============
3032-CL_PushPMStates
3033-
3034-=============
3035-*/
3036-void CL_PushPMStates( void )
3037-{
3038- if( clgame.pushed )
3039- {
3040- MsgDev( D_WARN, "CL_PushPMStates called with pushed stack\n");
3041- }
3042- else
3043- {
3044- clgame.oldphyscount = clgame.pmove->numphysent;
3045- clgame.oldviscount = clgame.pmove->numvisent;
3046- clgame.pushed = true;
3047- }
3048-
3049-}
3050-
3051-/*
3052-=============
3053-CL_PopPMStates
3054-
3055-=============
3056-*/
3057-void CL_PopPMStates( void )
3058-{
3059- if( clgame.pushed )
3060- {
3061- clgame.pmove->numphysent = clgame.oldphyscount;
3062- clgame.pmove->numvisent = clgame.oldviscount;
3063- clgame.pushed = false;
3064- }
3065- else
3066- {
3067- MsgDev( D_WARN, "CL_PopPMStates called without stack\n");
3068- }
3069-}
3070-
3071-/*
3072-=============
3073-CL_SetUpPlayerPrediction
3074-
3075-=============
3076-*/
3077-void CL_SetUpPlayerPrediction( int dopred, int includeLocal )
3078-{
3079-#if 0
3080- int i;
3081- entity_state_t *state;
3082- predicted_player_t *player;
3083- cl_entity_t *ent;
3084-
3085- for( i = 0; i < MAX_CLIENTS; i++ )
3086- {
3087- state = cl.frames[cl.parsecountmod].playerstate[i];
3088-
3089- player = cl.predicted_players[j];
3090- player->active = false;
3091-
3092- if( state->messagenum != cl.parsecount )
3093- continue; // not present this frame
3094-
3095- if( !state->modelindex )
3096- continue;
3097-
3098- ent = CL_GetEntityByIndex( j + 1 );
3099-
3100- if( !ent ) // in case
3101- continue;
3102-
3103- // special for EF_NODRAW and local client?
3104- if( state->effects & EF_NODRAW && !includeLocal )
3105- {
3106- if( cl.playernum == j )
3107- continue;
3108-
3109- player->active = true;
3110- player->movetype = state->movetype;
3111- player->solid = state->solid;
3112- player->usehull = state->usehull;
3113-
3114- VectorCopy( ent->origin, player->origin );
3115- VectorCopy( ent->angles, player->angles );
3116- }
3117- else
3118- {
3119- player->active = true;
3120- player->movetype = state->movetype;
3121- player->solid = state->solid;
3122- player->usehull = state->usehull;
3123-
3124- // don't rewrite origin and angles of local client
3125- if( cl.playernum == j )
3126- continue;
3127-
3128- VectorCopy(state->origin, player->origin);
3129- VectorCopy(state->angles, player->angles);
3130- }
3131- }
3132-#endif
3133-}
3134-
3135-
3136 void CL_ClipPMoveToEntity( physent_t *pe, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, pmtrace_t *tr )
3137 {
3138 ASSERT( tr != NULL );
3139@@ -184,7 +80,7 @@ qboolean CL_CopyEntityToPhysEnt( physent_t *pe, cl_entity_t *ent )
3140 VectorClear( pe->maxs );
3141 break;
3142 case SOLID_BBOX:
3143- if( !pe->player && mod && mod->type == mod_studio && mod->flags & STUDIO_TRACE_HITBOX )
3144+ if( mod && mod->type == mod_studio && mod->flags & STUDIO_TRACE_HITBOX )
3145 pe->studiomodel = mod;
3146 VectorCopy( ent->curstate.mins, pe->mins );
3147 VectorCopy( ent->curstate.maxs, pe->maxs );
3148@@ -1016,10 +913,6 @@ void CL_RunUsercmd( local_state_t *from, local_state_t *to, usercmd_t *u, qboole
3149 // copy results back to client
3150 CL_FinishPMove( clgame.pmove, to );
3151
3152- cl.predicted.lastground = clgame.pmove->onground;
3153- if( cl.predicted.lastground > 0 && cl.predicted.lastground < clgame.pmove->numphysent )
3154- cl.predicted.lastground = clgame.pmove->physents[cl.predicted.lastground].info;
3155-
3156 clgame.dllFuncs.pfnPostRunCmd( from, to, &cmd, runfuncs, *time, random_seed );
3157 *time += (double)cmd.msec / 1000.0;
3158 }
3159@@ -1041,30 +934,26 @@ void CL_CheckPredictionError( void )
3160 frame = ( cls.netchan.incoming_acknowledged ) & CL_UPDATE_MASK;
3161
3162 // compare what the server returned with what we had predicted it to be
3163- VectorSubtract( cl.frame.playerstate[cl.playernum].origin, cl.predicted.origins[frame], delta );
3164+ VectorSubtract( cl.frame.playerstate[cl.playernum].origin, cl.predicted_origins[frame], delta );
3165
3166 maxspd = ( clgame.movevars.maxvelocity * host.frametime );
3167 len = VectorLength( delta );
3168
3169 // save the prediction error for interpolation
3170- /*if(( cl.frame.client.flags & EF_NOINTERP ) || len > maxspd )*/
3171- if( len > 64.0f )
3172+ if(( cl.frame.client.flags & EF_NOINTERP ) || len > maxspd )
3173 {
3174 // a teleport or something or gamepaused
3175- VectorClear( cl.predicted.error );
3176+ VectorClear( cl.prediction_error );
3177 }
3178 else
3179 {
3180 if( cl_showerror->value && len > 0.5f )
3181 MsgDev( D_ERROR, "prediction error on %i: %g\n", cl.parsecount, len );
3182
3183- VectorCopy( cl.frame.playerstate[cl.playernum].origin, cl.predicted.origins[frame] );
3184+ VectorCopy( cl.frame.playerstate[cl.playernum].origin, cl.predicted_origins[frame] );
3185
3186- // save for error interpolation
3187- VectorCopy( delta, cl.predicted.error );
3188-
3189- if ( len > 0.25 && cl.maxclients > 1 )
3190- cl.predicted.correction_time = cl_smoothtime->value;
3191+ // save for error itnerpolation
3192+ VectorCopy( delta, cl.prediction_error );
3193 }
3194 }
3195
3196@@ -1088,6 +977,10 @@ void CL_PostRunCmd( usercmd_t *ucmd, int random_seed )
3197 to = from;
3198
3199 clgame.dllFuncs.pfnPostRunCmd( &from, &to, ucmd, true, cl.time, random_seed );
3200+
3201+ cl.scr_fov = to.client.fov;
3202+ if( cl.scr_fov < 1.0f || cl.scr_fov> 170.0f )
3203+ cl.scr_fov = 90.0f;
3204 }
3205
3206
3207@@ -1149,33 +1042,54 @@ void CL_PredictMovement( void )
3208 VectorCopy( cl.refdef.cmd->viewangles, cl.refdef.cl_viewangles );
3209 }
3210
3211+<<<<<<< HEAD
3212 if( !CL_IsInGame( )) return;
3213
3214 CL_SetUpPlayerPrediction( false, false );
3215+=======
3216+ if( cl.refdef.paused || cls.key_dest == key_menu ) return;
3217+
3218+ pfnSetUpPlayerPrediction( false, false );
3219+>>>>>>> master
3220
3221 // unpredicted pure angled values converted into axis
3222 AngleVectors( cl.refdef.cl_viewangles, cl.refdef.forward, cl.refdef.right, cl.refdef.up );
3223
3224 ASSERT( cl.refdef.cmd != NULL );
3225-
3226 if( !cl_predict->integer || Host_IsLocalClient() )
3227 {
3228+<<<<<<< HEAD
3229+ //simulate predict
3230+ local_state_t t1, t2;
3231+ Q_memset( &t1, 0, sizeof( local_state_t ));
3232+ Q_memset( &t2, 0, sizeof( local_state_t ));
3233+ t1.client = cl.frame.client;
3234+ Q_memcpy( t1.weapondata, cl.frame.weapondata, sizeof( t1.weapondata ));
3235+ t1.playerstate = cl.frame.playerstate[cl.playernum];
3236+ clgame.dllFuncs.pfnPostRunCmd( &t1, &t2, cl.refdef.cmd, true, cl.time, cls.lastoutgoingcommand );
3237+ cl.predicted_viewmodel = t2.client.viewmodel;
3238+
3239+ // run commands even if client predicting is disabled - client expected it
3240+ //CL_PostRunCmd( cl.refdef.cmd, cls.lastoutgoingcommand );
3241+
3242+ cl.scr_fov = t2.client.fov;
3243+ if( cl.scr_fov < 1.0f || cl.scr_fov> 170.0f )
3244+ cl.scr_fov = 90.0f;
3245+
3246+=======
3247 // fake prediction code
3248 // we need to perform cl_lw prediction while cl_predict is disabled
3249 // because cl_lw is enabled by default in Half-Life
3250 if( !cl_lw->integer )
3251- {
3252- cl.predicted.viewmodel = cl.frame.client.viewmodel;
3253 return;
3254- }
3255
3256 ack = cls.netchan.incoming_acknowledged;
3257 outgoing_command = cls.netchan.outgoing_sequence;
3258
3259 from = &cl.predict[cl.parsecountmod];
3260 from->playerstate = cl.frame.playerstate[cl.playernum];
3261- from->client = cl.frame.client;
3262- Q_memcpy( from->weapondata, cl.frame.weapondata, sizeof( from->weapondata ));
3263+ from->client = cl.frame.local.client;
3264+ Q_memcpy( from->weapondata, cl.frame.local.weapondata, sizeof( from->weapondata ));
3265
3266 time = cl.frame.time;
3267
3268@@ -1195,45 +1109,45 @@ void CL_PredictMovement( void )
3269
3270 to = &cl.predict[( cl.parsecountmod + frame ) & CL_UPDATE_MASK];
3271
3272- CL_FakeUsercmd( from, to, &cl.commands[current_command_mod].cmd,
3273- !cl.commands[current_command_mod].processedfuncs,
3274+ CL_FakeUsercmd( from, to, &cl.cmds[current_command_mod],
3275+ cl.runfuncs[current_command_mod],
3276 &time, cls.netchan.incoming_acknowledged + frame );
3277
3278- cl.commands[current_command_mod].processedfuncs = true;
3279+ cl.runfuncs[current_command_mod] = false;
3280
3281 from = to;
3282 frame++;
3283 }
3284
3285 if( to )
3286- cl.predicted.viewmodel = to->client.viewmodel;
3287+ {
3288+ cl.predicted_viewmodel = to->client.viewmodel;
3289+ cl.scr_fov = to->client.fov;
3290+ if( cl.scr_fov < 1.0f || cl.scr_fov> 170.0f )
3291+ cl.scr_fov = 90.0f;
3292+ }
3293+>>>>>>> master
3294 return;
3295 }
3296
3297 if( !CL_IsPredicted( ))
3298 {
3299- local_state_t from = { 0 }, to = { 0 };
3300+ local_state_t from, to;
3301+
3302+ Q_memset( &from, 0, sizeof( local_state_t ) );
3303+ Q_memset( &to, 0, sizeof( local_state_t ) );
3304
3305 Q_memcpy( from.weapondata, cl.frame.weapondata, sizeof( from.weapondata ));
3306+
3307 from.playerstate = cl.frame.playerstate[cl.playernum];
3308 from.client = cl.frame.client;
3309-
3310 to = from;
3311
3312- clgame.dllFuncs.pfnPostRunCmd( &from, &to, cl.refdef.cmd, !cl_predict->integer ? true : false, cl.time, cls.lastoutgoingcommand );
3313-
3314- // fake unpredicted values
3315- VectorCopy( to.client.origin, cl.predicted.origin );
3316- VectorCopy( to.client.velocity, cl.predicted.velocity );
3317- VectorCopy( to.client.punchangle, cl.predicted.punchangle );
3318- VectorCopy( to.client.view_ofs, cl.predicted.viewofs );
3319- cl.predicted.usehull = to.playerstate.usehull;
3320- cl.predicted.waterlevel = to.client.waterlevel;
3321- cl.predicted.viewmodel = to.client.viewmodel;
3322- cl.predicted.correction_time = 0;
3323- cl.predicted.moving = 0;
3324- cl.predicted.onground = -1;
3325+ clgame.dllFuncs.pfnPostRunCmd( &from, &to, cl.refdef.cmd, false, cl.time, cls.lastoutgoingcommand );
3326
3327+ cl.scr_fov = to.client.fov;
3328+ if( cl.scr_fov < 1.0f || cl.scr_fov> 170.0f )
3329+ cl.scr_fov = 90.0f;
3330 return;
3331 }
3332
3333@@ -1272,7 +1186,7 @@ void CL_PredictMovement( void )
3334 cl.commands[current_command_mod].processedfuncs = true;
3335
3336 // save for debug checking
3337- VectorCopy( to->playerstate.origin, cl.predicted.origins[current_command_mod] );
3338+ VectorCopy( to->playerstate.origin, cl.predicted_origins[current_command_mod] );
3339
3340 from = to;
3341 frame++;
3342@@ -1280,103 +1194,14 @@ void CL_PredictMovement( void )
3343
3344 if( to )
3345 {
3346- float t0 = cl.commands[( cl.parsecountmod + frame - 1) & CL_UPDATE_MASK].senttime,
3347- t1 = cl.commands[( cl.parsecountmod + frame ) & CL_UPDATE_MASK].senttime;
3348- float t;
3349- if( t0 == t1 )
3350- t = 0.0f;
3351- else
3352- {
3353- t = (host.realtime - t0) / (t1 - t0);
3354- t = bound( 0.0f, t, 1.0f );
3355- }
3356-
3357- if( fabs(to->playerstate.origin[0] - from->playerstate.origin[0]) > 128.0f ||
3358- fabs(to->playerstate.origin[1] - from->playerstate.origin[1]) > 128.0f ||
3359- fabs(to->playerstate.origin[2] - from->playerstate.origin[2]) > 128.0f )
3360- {
3361- VectorCopy( to->playerstate.origin, cl.predicted.origin );
3362- VectorCopy( to->client.velocity, cl.predicted.velocity );
3363- VectorCopy( to->client.punchangle, cl.predicted.punchangle );
3364- VectorCopy( to->client.view_ofs, cl.predicted.viewofs );
3365- }
3366- else
3367- {
3368- vec3_t delta_origin, delta_punch, delta_vel;
3369- VectorSubtract( to->playerstate.origin, from->playerstate.origin, delta_origin );
3370- VectorSubtract( to->client.velocity, from->client.velocity, delta_vel );
3371- VectorSubtract( to->client.punchangle, from->client.punchangle, delta_punch );
3372-
3373- VectorMA( from->playerstate.origin, t, delta_origin, cl.predicted.origin );
3374- VectorMA( from->client.velocity, t, delta_vel, cl.predicted.velocity );
3375- VectorMA( from->client.punchangle, t, delta_punch, cl.predicted.punchangle );
3376-
3377- if( from->playerstate.usehull == to->playerstate.usehull )
3378- {
3379- vec3_t delta_viewofs;
3380- VectorSubtract( to->client.view_ofs, from->client.view_ofs, delta_viewofs );
3381- VectorMA( from->client.view_ofs, t, delta_viewofs, cl.predicted.viewofs );
3382- }
3383- }
3384-
3385- cl.predicted.waterlevel = to->client.waterlevel;
3386- cl.predicted.viewmodel = to->client.viewmodel;
3387- cl.predicted.usehull = to->playerstate.usehull;
3388-
3389- if( to->client.flags & FL_ONGROUND )
3390- {
3391- cl_entity_t *ent = CL_GetEntityByIndex( cl.predicted.lastground );
3392-
3393- cl.predicted.onground = cl.predicted.lastground;
3394- cl.predicted.moving = 0;
3395-
3396- if( ent )
3397- {
3398- vec3_t delta;
3399- delta[0] = ent->curstate.origin[0] - ent->prevstate.origin[0];
3400- delta[1] = ent->curstate.origin[1] - ent->prevstate.origin[1];
3401- delta[2] = 0.0f;
3402-
3403- if( VectorLength( delta ) > 0.0f )
3404- {
3405- cl.predicted.moving = 1;
3406- cl.predicted.correction_time = 0;
3407- }
3408- }
3409- }
3410- else
3411- {
3412- cl.predicted.onground = -1;
3413- cl.predicted.moving = 0;
3414- }
3415-
3416- if ( cl.predicted.correction_time > 0.0 && !cl_nosmooth->value && cl_smoothtime->value )
3417- {
3418- float d;
3419- vec3_t delta;
3420- int i;
3421-
3422- cl.predicted.correction_time = cl.predicted.correction_time - host.frametime;
3423-
3424- if( cl_smoothtime->value <= 0 )
3425- Cvar_SetFloat( "cl_smoothtime", 0.1 );
3426-
3427- if( cl.predicted.correction_time < 0 )
3428- cl.predicted.correction_time = 0;
3429-
3430- if( cl_smoothtime->value <= cl.predicted.correction_time )
3431- cl.predicted.correction_time = cl_smoothtime->value;
3432-
3433- d = cl.predicted.correction_time / cl_smoothtime->value;
3434-
3435- for( i = 0; i < 3; i++ )
3436- {
3437- cl.predicted.origin[i] = cl.predicted.lastorigin[i] + ( cl.predicted.origin[i] - cl.predicted.lastorigin[i] ) * (1.0 - d);
3438- }
3439- }
3440- VectorCopy( cl.predicted.origin, cl.predicted.lastorigin );
3441- CL_SetIdealPitch();
3442+ cl.predicted_viewmodel = to->client.viewmodel;
3443+ cl.scr_fov = to->client.fov;
3444+ if( cl.scr_fov < 1.0f || cl.scr_fov> 170.0f )
3445+ cl.scr_fov = 90.0f;
3446+ VectorCopy( to->playerstate.origin, cl.predicted_origin );
3447+ VectorCopy( to->client.velocity, cl.predicted_velocity );
3448+ VectorCopy( to->client.view_ofs, cl.predicted_viewofs );
3449+ VectorCopy( to->client.punchangle, cl.predicted_punchangle );
3450 }
3451- CL_CheckPredictionError();
3452 }
3453 #endif // XASH_DEDICATED
3454diff --git a/engine/client/cl_scrn.c b/engine/client/cl_scrn.c
3455index 05317e3..c71634f 100644
3456--- a/engine/client/cl_scrn.c
3457+++ b/engine/client/cl_scrn.c
3458@@ -52,7 +52,7 @@ void SCR_DrawFPS( void )
3459 float calc;
3460 rgba_t color;
3461 static double nexttime = 0, lasttime = 0;
3462- static double framerate = 0, avgrate = 0;
3463+ static double framerate = 0;
3464 static int framecount = 0;
3465 static int minfps = 9999;
3466 static int maxfps = 0;
3467@@ -98,22 +98,9 @@ void SCR_DrawFPS( void )
3468 if( curfps < minfps ) minfps = curfps;
3469 if( curfps > maxfps ) maxfps = curfps;
3470
3471- /*if( !avgrate ) avgrate = ( maxfps - minfps ) / 2.0f;
3472- else */avgrate += ( calc - avgrate ) / host.framecount;
3473-
3474- switch( cl_showfps->integer )
3475- {
3476- case 3:
3477- Q_snprintf( fpsstring, sizeof( fpsstring ), "fps: ^1%4i min, ^3%4i cur, ^2%4i max | ^3%.2f avg", minfps, curfps, maxfps, avgrate );
3478- break;
3479- case 2:
3480+ if( cl_showfps->integer == 2 )
3481 Q_snprintf( fpsstring, sizeof( fpsstring ), "fps: ^1%4i min, ^3%4i cur, ^2%4i max", minfps, curfps, maxfps );
3482- break;
3483- case 1:
3484- default:
3485- Q_snprintf( fpsstring, sizeof( fpsstring ), "%4i fps", curfps );
3486- }
3487-
3488+ else Q_snprintf( fpsstring, sizeof( fpsstring ), "%4i fps", curfps );
3489 MakeRGBA( color, 255, 255, 255, 255 );
3490 }
3491
3492diff --git a/engine/client/cl_tent.c b/engine/client/cl_tent.c
3493index 0c87697..a445734 100644
3494--- a/engine/client/cl_tent.c
3495+++ b/engine/client/cl_tent.c
3496@@ -529,7 +529,7 @@ void CL_Bubbles( const vec3_t mins, const vec3_t maxs, float height, int modelIn
3497
3498 pTemp->x = origin[0];
3499 pTemp->y = origin[1];
3500- angle = Com_RandomFloat( -M_PI, M_PI );
3501+ angle = Com_RandomLong( -M_PI, M_PI );
3502 SinCos( angle, &sine, &cosine );
3503
3504 zspeed = Com_RandomLong( 80, 140 );
3505@@ -574,7 +574,7 @@ void CL_BubbleTrail( const vec3_t start, const vec3_t end, float flWaterZ, int m
3506
3507 pTemp->x = origin[0];
3508 pTemp->y = origin[1];
3509- angle = Com_RandomFloat( -M_PI, M_PI );
3510+ angle = Com_RandomLong( -M_PI, M_PI );
3511
3512 zspeed = Com_RandomLong( 80, 140 );
3513 VectorSet( pTemp->entity.baseline.origin, speed * cos( angle ), speed * sin( angle ), zspeed );
3514@@ -2655,7 +2655,7 @@ int CL_DecalIndexFromName( const char *name )
3515 return 0;
3516
3517 // look through the loaded sprite name list for SpriteName
3518- for( i = 0; i < MAX_DECALS - 1 && host.draw_decals[i+1][0]; i++ )
3519+ for( i = 0; i < MAX_DECALS && host.draw_decals[i+1][0]; i++ )
3520 {
3521 if( !Q_stricmp( name, (char *)host.draw_decals[i+1] ))
3522 return i+1;
3523diff --git a/engine/client/cl_view.c b/engine/client/cl_view.c
3524index 4a3e523..8d802cd 100644
3525--- a/engine/client/cl_view.c
3526+++ b/engine/client/cl_view.c
3527@@ -40,23 +40,24 @@ void V_SetupRefDef( void )
3528 clent = CL_GetLocalPlayer ();
3529
3530 clgame.entities->curstate.scale = clgame.movevars.waveHeight;
3531- clgame.viewent.curstate.modelindex = cl.predicted.viewmodel;
3532+ clgame.viewent.curstate.modelindex = cl.frame.client.viewmodel;
3533 clgame.viewent.model = Mod_Handle( clgame.viewent.curstate.modelindex );
3534 clgame.viewent.curstate.number = cl.playernum + 1;
3535 clgame.viewent.curstate.entityType = ET_NORMAL;
3536 clgame.viewent.index = cl.playernum + 1;
3537
3538 cl.refdef.movevars = &clgame.movevars;
3539+ cl.refdef.onground = ( cl.frame.client.flags & FL_ONGROUND ) ? 1 : 0;
3540 cl.refdef.health = cl.frame.client.health;
3541 cl.refdef.playernum = cl.playernum;
3542 cl.refdef.max_entities = clgame.maxEntities;
3543 cl.refdef.maxclients = cl.maxclients;
3544 cl.refdef.time = cl.time;
3545- cl.refdef.frametime = host.frametime;
3546- //cl.refdef.frametime = cl.time - cl.oldtime;
3547+ cl.refdef.frametime = cl.time - cl.oldtime;
3548 cl.refdef.demoplayback = cls.demoplayback;
3549- cl.refdef.smoothing = 0;
3550+ cl.refdef.smoothing = cl_smooth->integer;
3551 cl.refdef.viewsize = scr_viewsize->integer;
3552+ cl.refdef.waterlevel = cl.frame.client.waterlevel;
3553 cl.refdef.onlyClientDraw = 0; // reset clientdraw
3554 cl.refdef.hardware = true; // always true
3555 cl.refdef.spectator = (clent->curstate.spectator != 0);
3556@@ -84,8 +85,8 @@ void V_SetupRefDef( void )
3557 cl.refdef.viewport[0] = (scr_width->integer - cl.refdef.viewport[2]) / 2;
3558 cl.refdef.viewport[1] = (scr_height->integer - sb_lines - cl.refdef.viewport[3]) / 2;
3559
3560- cl.scr_fov = bound( 10.0f, cl.scr_fov, 150.0f );
3561-
3562+ if( cl.scr_fov < 1.0f || cl.scr_fov> 170.0f )
3563+ cl.scr_fov = 90.0f;
3564 // calc FOV
3565 cl.refdef.fov_x = cl.scr_fov; // this is a final fov value
3566 cl.refdef.fov_y = V_CalcFov( &cl.refdef.fov_x, cl.refdef.viewport[2], cl.refdef.viewport[3] );
3567@@ -96,13 +97,11 @@ void V_SetupRefDef( void )
3568
3569 if( CL_IsPredicted( ) && !cl.refdef.demoplayback )
3570 {
3571- //VectorMA( cl.predicted.origin, cl.lerpBack, cl.predicted.error, cl.predicted.origin );
3572- VectorCopy( cl.predicted.origin, cl.refdef.simorg );
3573- VectorCopy( cl.predicted.velocity, cl.refdef.simvel );
3574- VectorCopy( cl.predicted.viewofs, cl.refdef.viewheight );
3575- VectorCopy( cl.predicted.punchangle, cl.refdef.punchangle );
3576- cl.refdef.onground = cl.predicted.onground != -1;
3577- cl.refdef.waterlevel = cl.predicted.waterlevel;
3578+ VectorMA( cl.predicted_origin, -cl.lerpBack, cl.prediction_error, cl.refdef.simorg );
3579+ VectorCopy( cl.predicted_origin, cl.refdef.simorg );
3580+ VectorCopy( cl.predicted_velocity, cl.refdef.simvel );
3581+ VectorCopy( cl.predicted_viewofs, cl.refdef.viewheight );
3582+ VectorCopy( cl.predicted_punchangle, cl.refdef.punchangle );
3583 }
3584 else
3585 {
3586@@ -110,8 +109,6 @@ void V_SetupRefDef( void )
3587 VectorCopy( cl.frame.client.view_ofs, cl.refdef.viewheight );
3588 VectorCopy( cl.frame.client.velocity, cl.refdef.simvel );
3589 VectorCopy( cl.frame.client.punchangle, cl.refdef.punchangle );
3590- cl.refdef.onground = cl.frame.client.flags & FL_ONGROUND ? 1 : 0;
3591- cl.refdef.waterlevel = cl.frame.client.waterlevel;
3592 }
3593 }
3594
3595diff --git a/engine/client/client.h b/engine/client/client.h
3596index 7d38072..6427677 100644
3597--- a/engine/client/client.h
3598+++ b/engine/client/client.h
3599@@ -99,24 +99,6 @@ typedef struct
3600 } predicted_player_t;
3601 #endif
3602
3603-typedef struct
3604-{
3605- vec3_t origin; // generated by CL_PredictMovement
3606- vec3_t viewofs;
3607- vec3_t velocity;
3608- vec3_t punchangle;
3609- vec3_t origins[CMD_BACKUP];
3610- vec3_t error;
3611- vec3_t lastorigin;
3612- double correction_time;
3613- int viewmodel;
3614- int onground;
3615- int waterlevel;
3616- int usehull;
3617- int moving;
3618- int lastground;
3619-} cl_predicted_data_t; // data we got from prediction system
3620-
3621 // the client_t structure is wiped completely at every
3622 // server map change
3623 typedef struct
3624@@ -169,7 +151,12 @@ typedef struct
3625 event_state_t events;
3626
3627 // predicting stuff
3628- cl_predicted_data_t predicted; // generated from CL_PredictMovement
3629+ vec3_t predicted_origin; // generated by CL_PredictMovement
3630+ vec3_t predicted_viewofs;
3631+ vec3_t predicted_velocity;
3632+ vec3_t predicted_punchangle;
3633+ vec3_t predicted_origins[CMD_BACKUP];
3634+ vec3_t prediction_error;
3635
3636 // server state information
3637 int playernum;
3638@@ -187,9 +174,10 @@ typedef struct
3639
3640 cl_entity_t *world;
3641 model_t *worldmodel; // pointer to world
3642+ float scr_fov;
3643+ int predicted_viewmodel;
3644 float weaponstarttime;
3645 int weaponseq;
3646- int scr_fov;
3647 model_t *playermodels[32];
3648 #if 0 // used by SetUpPlayerPrediction
3649 predicted_player_t predicted_players[MAX_CLIENTS];
3650@@ -339,9 +327,9 @@ typedef struct
3651 typedef struct
3652 {
3653 net_response_t resp;
3654+ net_api_response_func_t pfnFunc;
3655 double timeout;
3656 double timesend; // time when request was sent
3657- net_api_response_func_t pfnFunc;
3658 int flags; // FNETAPI_MULTIPLE_RESPONSE etc
3659 } net_request_t;
3660
3661@@ -372,9 +360,7 @@ typedef struct
3662 playermove_t *pmove; // pmove state
3663
3664 int old_trace_hull; // used by PM_Push\Pop state
3665- qboolean pushed; // used by PM_Push\Pop state
3666- int oldviscount; // used by PM_Push\Pop state
3667- int oldphyscount; // used by PM_Push\Pop state
3668+ int oldcount; // used by PM_Push\Pop state
3669
3670 vec3_t player_mins[MAX_MAP_HULLS]; // 4 hulls allowed
3671 vec3_t player_maxs[MAX_MAP_HULLS]; // 4 hulls allowed
3672@@ -536,6 +522,7 @@ extern menu_static_t menu;
3673 //
3674 extern convar_t *r_oldparticles;
3675 extern convar_t *cl_predict;
3676+extern convar_t *cl_smooth;
3677 extern convar_t *cl_showfps;
3678 extern convar_t *cl_showpos;
3679 extern convar_t *cl_envshot_size;
3680@@ -544,8 +531,6 @@ extern convar_t *cl_charset;
3681 extern convar_t *cl_nodelta;
3682 extern convar_t *cl_interp;
3683 extern convar_t *cl_showerror;
3684-extern convar_t *cl_nosmooth;
3685-extern convar_t *cl_smoothtime;
3686 extern convar_t *cl_crosshair;
3687 extern convar_t *cl_testlights;
3688 extern convar_t *cl_solid_players;
3689@@ -560,8 +545,6 @@ extern convar_t *cl_lw;
3690 extern convar_t *cl_trace_events;
3691 extern convar_t *cl_trace_stufftext;
3692 extern convar_t *cl_sprite_nearest;
3693-extern convar_t *cl_updaterate;
3694-extern convar_t *r_bmodelinterp;
3695 extern convar_t *hud_scale;
3696 extern convar_t *scr_centertime;
3697 extern convar_t *scr_viewsize;
3698@@ -754,9 +736,6 @@ cl_entity_t *CL_GetWaterEntity( const float *rgflPos );
3699 void CL_SetupPMove( playermove_t *pmove, local_state_t *from, usercmd_t *ucmd, qboolean runfuncs, double time );
3700 pmtrace_t CL_TraceLine( vec3_t start, vec3_t end, int flags );
3701 void CL_ClearPhysEnts( void );
3702-void CL_PushPMStates( void );
3703-void CL_PopPMStates( void );
3704-void CL_SetUpPlayerPrediction( int dopred, int bIncludeLocalClient );
3705
3706 //
3707 // cl_studio.c
3708@@ -772,7 +751,6 @@ void CL_UpdateStudioVars( cl_entity_t *ent, entity_state_t *newstate, qboolean n
3709 qboolean CL_GetEntitySpatialization( int entnum, vec3_t origin, float *pradius );
3710 void CL_UpdateEntityFields( cl_entity_t *ent );
3711 qboolean CL_IsPlayerIndex( int idx );
3712-void CL_SetIdealPitch( void );
3713
3714 //
3715 // cl_remap.c
3716diff --git a/engine/client/gl_backend.c b/engine/client/gl_backend.c
3717index e8f3117..970edff 100644
3718--- a/engine/client/gl_backend.c
3719+++ b/engine/client/gl_backend.c
3720@@ -677,8 +677,8 @@ rebuild_page:
3721 end = total * gl_showtextures->integer;
3722 if( end > MAX_TEXTURES ) end = MAX_TEXTURES;
3723
3724- w = glState.width / (float)base_w;
3725- h = glState.height / (float)base_h;
3726+ w = glState.width / base_w;
3727+ h = glState.height / base_h;
3728
3729 Con_DrawStringLen( NULL, NULL, &charHeight );
3730
3731@@ -705,7 +705,7 @@ rebuild_page:
3732 continue;
3733
3734 x = k % base_w * w;
3735- y = k / (float)base_w * h;
3736+ y = k / base_w * h;
3737
3738 pglColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
3739 GL_Bind( XASH_TEXTURE0, i ); // NOTE: don't use image->texnum here, because skybox has a 'wrong' indexes
3740diff --git a/engine/client/gl_beams.c b/engine/client/gl_beams.c
3741index a543628..785aae5 100644
3742--- a/engine/client/gl_beams.c
3743+++ b/engine/client/gl_beams.c
3744@@ -133,10 +133,7 @@ static qboolean ComputeBeamEntPosition( int beamEnt, vec3_t pt )
3745 // get attachment
3746 if( nAttachment > 0 )
3747 VectorCopy( pEnt->attachment[nAttachment - 1], pt );
3748- else
3749- {
3750- VectorCopy( pEnt->origin, pt );
3751- }
3752+ else VectorCopy( pEnt->origin, pt );
3753
3754 return true;
3755 }
3756diff --git a/engine/client/gl_image.c b/engine/client/gl_image.c
3757index eff5b7f..ff7c4e2 100644
3758--- a/engine/client/gl_image.c
3759+++ b/engine/client/gl_image.c
3760@@ -121,7 +121,7 @@ R_GetTexture
3761 */
3762 gltexture_t *R_GetTexture( GLenum texnum )
3763 {
3764- ASSERT( texnum < MAX_TEXTURES );
3765+ ASSERT( texnum >= 0 && texnum < MAX_TEXTURES );
3766 return &r_textures[texnum];
3767 }
3768
3769@@ -134,7 +134,8 @@ Just for debug (r_showtextures uses it)
3770 */
3771 void GL_SetTextureType( GLenum texnum, GLenum type )
3772 {
3773- ASSERT( texnum < MAX_TEXTURES );
3774+ if( texnum <= 0 ) return;
3775+ ASSERT( texnum >= 0 && texnum < MAX_TEXTURES );
3776 r_textures[texnum].texType = type;
3777 }
3778
3779@@ -1485,7 +1486,7 @@ int GL_LoadTexture( const char *name, const byte *buf, size_t size, int flags, i
3780 if( !name || !name[0] || !glw_state.initialized )
3781 return 0;
3782
3783- if( Q_strlen( name ) >= sizeof( r_textures[0].name ))
3784+ if( Q_strlen( name ) >= sizeof( r_textures->name ))
3785 {
3786 MsgDev( D_ERROR, "GL_LoadTexture: too long name %s\n", name );
3787 return 0;
3788@@ -1574,7 +1575,7 @@ int GL_LoadTextureInternal( const char *name, rgbdata_t *pic, texFlags_t flags,
3789 if( !name || !name[0] || !glw_state.initialized )
3790 return 0;
3791
3792- if( Q_strlen( name ) >= sizeof( r_textures[0].name ) )
3793+ if( Q_strlen( name ) >= sizeof( r_textures->name ))
3794 {
3795 MsgDev( D_ERROR, "GL_LoadTexture: too long name %s\n", name );
3796 return 0;
3797@@ -1759,7 +1760,7 @@ int GL_FindTexture( const char *name )
3798 if( !name || !name[0] || !glw_state.initialized )
3799 return 0;
3800
3801- if( Q_strlen( name ) >= sizeof( r_textures[0].name ) )
3802+ if( Q_strlen( name ) >= sizeof( r_textures->name ))
3803 {
3804 MsgDev( D_ERROR, "GL_FindTexture: too long name %s\n", name );
3805 return 0;
3806@@ -1796,7 +1797,7 @@ void GL_FreeImage( const char *name )
3807 if( !name || !name[0] || !glw_state.initialized )
3808 return;
3809
3810- if( Q_strlen( name ) >= sizeof( r_textures[0].name ) )
3811+ if( Q_strlen( name ) >= sizeof( r_textures->name ))
3812 {
3813 MsgDev( D_ERROR, "GL_FreeImage: too long name %s\n", name );
3814 return;
3815@@ -4556,9 +4557,9 @@ void R_InitImages( void )
3816 Q_memset( r_texturesHashTable, 0, sizeof( r_texturesHashTable ));
3817
3818 // create unused 0-entry
3819- Q_strncpy( r_textures[0].name, "*unused*", sizeof( r_textures[0].name ));
3820- hash = Com_HashKey( r_textures[0].name, TEXTURES_HASH_SIZE );
3821- r_textures[0].nextHash = r_texturesHashTable[hash];
3822+ Q_strncpy( r_textures->name, "*unused*", sizeof( r_textures->name ));
3823+ hash = Com_HashKey( r_textures->name, TEXTURES_HASH_SIZE );
3824+ r_textures->nextHash = r_texturesHashTable[hash];
3825 r_texturesHashTable[hash] = r_textures;
3826 r_numTextures = 1;
3827
3828diff --git a/engine/client/gl_rmain.c b/engine/client/gl_rmain.c
3829index a1da07c..4fcd97c 100644
3830--- a/engine/client/gl_rmain.c
3831+++ b/engine/client/gl_rmain.c
3832@@ -372,16 +372,16 @@ int R_ComputeFxBlend( cl_entity_t *e )
3833 break;
3834 }
3835
3836- if( e->model && e->model->type != mod_brush )
3837+ if( e->model->type != mod_brush )
3838 {
3839 // NOTE: never pass sprites with rendercolor '0 0 0' it's a stupid Valve Hammer Editor bug
3840 if( !e->curstate.rendercolor.r && !e->curstate.rendercolor.g && !e->curstate.rendercolor.b )
3841 e->curstate.rendercolor.r = e->curstate.rendercolor.g = e->curstate.rendercolor.b = 255;
3842+ }
3843
3844 // apply scale to studiomodels and sprites only
3845- if( !e->curstate.scale )
3846+ if( e->model && e->model->type != mod_brush && !e->curstate.scale )
3847 e->curstate.scale = 1.0f;
3848- }
3849
3850 blend = bound( 0, blend, 255 );
3851
3852diff --git a/engine/client/gl_rmisc.c b/engine/client/gl_rmisc.c
3853index cbc4ca1..8853eaf 100644
3854--- a/engine/client/gl_rmisc.c
3855+++ b/engine/client/gl_rmisc.c
3856@@ -199,8 +199,8 @@ void R_CreateDetailTexturesList( const char *filename )
3857
3858 if( pic )
3859 {
3860- xScale = (pic->width / (float)tex->width) * gl_detailscale->value;
3861- yScale = (pic->height / (float)tex->height) * gl_detailscale->value;
3862+ xScale = (pic->width / tex->width) * gl_detailscale->value;
3863+ yScale = (pic->height / tex->height) * gl_detailscale->value;
3864 FS_FreeImage( pic );
3865 }
3866 else xScale = yScale = 10.0f;
3867diff --git a/engine/client/gl_rpart.c b/engine/client/gl_rpart.c
3868index f3b5535..7470350 100644
3869--- a/engine/client/gl_rpart.c
3870+++ b/engine/client/gl_rpart.c
3871@@ -854,63 +854,20 @@ void CL_BloodStream( const vec3_t org, const vec3_t dir, int pcolor, int speed )
3872 {
3873 particle_t *p;
3874 int i, j;
3875- float arc;
3876
3877- for( arc = 0.05, i = 0; i < 100; i++, arc -= 0.005 )
3878+ for( i = 0; i < speed * 20; i++ )
3879 {
3880 p = CL_AllocParticle( NULL );
3881-
3882 if( !p ) return;
3883
3884- p->die += 2.0f;
3885+ p->die += Com_RandomFloat( 0.2f, 0.8f );
3886 p->type = pt_vox_grav;
3887- p->color = pcolor + Com_RandomLong( 0, 9 );
3888-
3889- VectorCopy( org, p->org );
3890- VectorCopy( dir, p->vel );
3891-
3892- p->vel[2] -= arc;
3893- arc -= 0.005;
3894-
3895- VectorScale( p->vel, speed, p->vel );
3896- }
3897-
3898- for( arc = 0.075, i = 0; i < speed / 2; i++, arc -= 0.005 )
3899- {
3900- float num;
3901-
3902- p = CL_AllocParticle( NULL );
3903- if( !p ) return;
3904-
3905- p->die += 3.0f;
3906- p->color = pcolor + Com_RandomLong( 0, 9 );
3907- p->type = pt_vox_slowgrav;
3908-
3909- VectorCopy( org, p->org );
3910-
3911- VectorCopy( dir, p->vel );
3912- p->vel[2] -= arc;
3913- num = Com_RandomFloat( 0, 1 );
3914- num = 1.7 * num * (int)(num * speed);
3915- VectorScale( p->vel, num, p->vel );
3916+ p->color = pcolor;
3917
3918- for( j = 0; j < 2; j++ )
3919+ for( j = 0; j < 3; j++ )
3920 {
3921- p = CL_AllocParticle( NULL );
3922- if( !p ) return;
3923-
3924- p->die += 3.0f;
3925- p->color = pcolor + Com_RandomLong( 0, 9 );
3926- p->type = pt_vox_slowgrav;
3927-
3928- p->org[0] = org[0] + Com_RandomFloat( -1, 1 );
3929- p->org[1] = org[1] + Com_RandomFloat( -1, 1 );
3930- p->org[2] = org[2] + Com_RandomFloat( -1, 1 );
3931-
3932- VectorCopy( dir, p->vel );
3933- p->vel[2] -= arc;
3934-
3935- VectorScale( p->vel, num, p->vel );
3936+ p->org[j] = org[j];
3937+ p->vel[j] = dir[j] * speed;
3938 }
3939 }
3940 }
3941diff --git a/engine/client/gl_sprite.c b/engine/client/gl_sprite.c
3942index 2cce667..5e0bd1f 100644
3943--- a/engine/client/gl_sprite.c
3944+++ b/engine/client/gl_sprite.c
3945@@ -212,10 +212,10 @@ void Mod_LoadSpriteModel( model_t *mod, byte *buffer, qboolean *loaded, uint tex
3946 psprite->radius = pin.boundingradius;
3947 psprite->synctype = pin.synctype;
3948
3949- mod->mins[0] = mod->mins[1] = -pin.bounds[0] / 2.0f;
3950- mod->maxs[0] = mod->maxs[1] = pin.bounds[0] / 2.0f;
3951- mod->mins[2] = -pin.bounds[1] / 2.0f;
3952- mod->maxs[2] = pin.bounds[1] / 2.0f;
3953+ mod->mins[0] = mod->mins[1] = -pin.bounds[0] / 2;
3954+ mod->maxs[0] = mod->maxs[1] = pin.bounds[0] / 2;
3955+ mod->mins[2] = -pin.bounds[1] / 2;
3956+ mod->maxs[2] = pin.bounds[1] / 2;
3957 buffer += sizeof(dsprite_t);
3958 Q_memcpy(&numi, buffer, sizeof(short));
3959
3960@@ -516,7 +516,7 @@ mspriteframe_t *R_GetSpriteFrame( const model_t *pModel, int frame, float yaw )
3961 }
3962 pspriteframe = pspritegroup->frames[i];
3963 }
3964- else if( psprite->frames[frame].type == FRAME_ANGLED ) //-V556
3965+ else if( psprite->frames[frame].type == FRAME_ANGLED )
3966 {
3967 int angleframe = (int)(Q_rint(( RI.refdef.viewangles[1] - yaw + 45.0f ) / 360 * 8) - 4) & 7;
3968
3969@@ -564,11 +564,11 @@ float R_GetSpriteFrameInterpolant( cl_entity_t *ent, mspriteframe_t **oldframe,
3970 frame = psprite->numframes - 1;
3971 }
3972
3973- if( psprite->frames[frame].type == FRAME_SINGLE ) //-V556
3974+ if( psprite->frames[frame].type == FRAME_SINGLE )
3975 {
3976 if( m_fDoInterp )
3977 {
3978- if( ent->latched.prevblending[0] >= psprite->numframes || psprite->frames[ent->latched.prevblending[0]].type != FRAME_SINGLE ) //-V556
3979+ if( ent->latched.prevblending[0] >= psprite->numframes || psprite->frames[ent->latched.prevblending[0]].type != FRAME_SINGLE )
3980 {
3981 // this can be happens when rendering switched between single and angled frames
3982 // or change model on replace delta-entity
3983@@ -613,7 +613,7 @@ float R_GetSpriteFrameInterpolant( cl_entity_t *ent, mspriteframe_t **oldframe,
3984 if( oldframe ) *oldframe = psprite->frames[ent->latched.prevblending[0]].frameptr;
3985 if( curframe ) *curframe = psprite->frames[frame].frameptr;
3986 }
3987- else if( psprite->frames[frame].type == FRAME_GROUP ) //-V556
3988+ else if( psprite->frames[frame].type == FRAME_GROUP )
3989 {
3990 pspritegroup = (mspritegroup_t *)psprite->frames[frame].frameptr;
3991 pintervals = pspritegroup->intervals;
3992@@ -646,7 +646,7 @@ float R_GetSpriteFrameInterpolant( cl_entity_t *ent, mspriteframe_t **oldframe,
3993 if( oldframe ) *oldframe = pspritegroup->frames[j];
3994 if( curframe ) *curframe = pspritegroup->frames[i];
3995 }
3996- else if( psprite->frames[frame].type == FRAME_ANGLED ) //-V556
3997+ else if( psprite->frames[frame].type == FRAME_ANGLED )
3998 {
3999 // e.g. doom-style sprite monsters
4000 float yaw = ent->angles[YAW];
4001@@ -654,7 +654,7 @@ float R_GetSpriteFrameInterpolant( cl_entity_t *ent, mspriteframe_t **oldframe,
4002
4003 if( m_fDoInterp )
4004 {
4005- if( ent->latched.prevblending[0] >= psprite->numframes || psprite->frames[ent->latched.prevblending[0]].type != FRAME_ANGLED ) //-V556
4006+ if( ent->latched.prevblending[0] >= psprite->numframes || psprite->frames[ent->latched.prevblending[0]].type != FRAME_ANGLED )
4007 {
4008 // this can be happens when rendering switched between single and angled frames
4009 // or change model on replace delta-entity
4010@@ -926,7 +926,7 @@ void R_DrawSpriteModel( cl_entity_t *e )
4011 float angle, dot, sr, cr, flAlpha;
4012 float lerp = 1.0f, ilerp, scale;
4013 vec3_t v_forward, v_right, v_up;
4014- vec3_t origin, color, color2 = {0.0f};
4015+ vec3_t origin, color, color2;
4016
4017 if( RI.params & RP_ENVVIEW )
4018 return;
4019diff --git a/engine/client/gl_studio.c b/engine/client/gl_studio.c
4020index b95c9fe..bc4380d 100644
4021--- a/engine/client/gl_studio.c
4022+++ b/engine/client/gl_studio.c
4023@@ -781,7 +781,7 @@ void R_StudioCalcBoneAdj( float dadt, float *adj, const byte *pcontroller1, cons
4024 }
4025 else
4026 {
4027- value = (pcontroller1[i] * dadt + (pcontroller2[i]) * (1.0f - dadt)) * (360.0f / 256.0f) + pbonecontroller[j].start;
4028+ value = ((pcontroller1[i] * dadt + (pcontroller2[i]) * (1.0f - dadt))) * (360.0f / 256.0f) + pbonecontroller[j].start;
4029 }
4030 }
4031 else
4032@@ -1493,7 +1493,7 @@ void R_StudioDynamicLight( cl_entity_t *ent, alight_t *lightinfo )
4033 VectorCopy( plight->lightvec, lightinfo->plightvec );
4034
4035 // setup ambient lighting
4036- invLight = (ent && ent->curstate.effects & EF_INVLIGHT) ? true : false;
4037+ invLight = (ent->curstate.effects & EF_INVLIGHT) ? true : false;
4038 R_LightForPoint( origin, &ambient, invLight, true, 0.0f ); // ignore dlights
4039
4040 R_GetLightSpot( plight->lightspot ); // shadow stuff
4041@@ -3277,7 +3277,7 @@ static int R_StudioDrawPlayer( int flags, entity_state_t *pplayer )
4042 {
4043 int m_nPlayerIndex;
4044 float gaitframe = 0.0f, gaityaw = 0.0f;
4045- vec3_t dir, prevgaitorigin = { 0.0f };
4046+ vec3_t dir, prevgaitorigin;
4047 alight_t lighting;
4048
4049 m_nPlayerIndex = pplayer->number - 1;
4050@@ -3629,11 +3629,9 @@ void R_RunViewmodelEvents( void )
4051 if( !Mod_Extradata( clgame.viewent.model ))
4052 return;
4053
4054-/*#ifndef _MSC_VER
4055 #warning "check this"
4056-#endif
4057- if( cl_lw->value && cl.frame.client.viewmodel != cl.predicted.viewmodel )
4058- return;*/
4059+ if( cl_lw->value && cl.frame.client.viewmodel != cl.predicted_viewmodel )
4060+ return;
4061
4062 RI.currententity = &clgame.viewent;
4063 RI.currentmodel = RI.currententity->model;
4064@@ -3668,11 +3666,10 @@ void R_DrawViewModel( void )
4065
4066 if( !Mod_Extradata( clgame.viewent.model ))
4067 return;
4068-/*#ifndef _MSC_VER
4069+
4070 #warning "check this"
4071-#endif
4072- if( cl_lw->value && cl.frame.client.viewmodel != cl.predicted.viewmodel )
4073- return;*/
4074+ if( cl_lw->value && cl.frame.client.viewmodel != cl.predicted_viewmodel )
4075+ return;
4076
4077 RI.currententity = &clgame.viewent;
4078 RI.currentmodel = RI.currententity->model;
4079diff --git a/engine/platform/sdl/vid_sdl.c b/engine/client/gl_vidnt.c
4080similarity index 99%
4081rename from engine/platform/sdl/vid_sdl.c
4082rename to engine/client/gl_vidnt.c
4083index 65c375f..6902c9b 100644
4084--- a/engine/platform/sdl/vid_sdl.c
4085+++ b/engine/client/gl_vidnt.c
4086@@ -761,7 +761,7 @@ Window* NetClientList(Display* display, unsigned long *len)
4087 Window* windowList;
4088 Atom type;
4089 int form, errno;
4090- unsigned long remain;
4091+ unsigned int remain;
4092
4093 errno = XGetWindowProperty(
4094 display,
4095@@ -790,7 +790,7 @@ char* WindowClassName(Display* display, Window window)
4096 {
4097 char* className;
4098 Atom type;
4099- unsigned long len, remain;
4100+ unsigned int len, remain;
4101 int form, errno;
4102 errno = XGetWindowProperty(
4103 display,
4104@@ -830,7 +830,7 @@ uint VID_EnumerateInstances( void )
4105 Display* display = XOpenDisplay(NULL);
4106 Window* winlist;
4107 char* name;
4108- unsigned long len;
4109+ unsigned int len;
4110 int i;
4111
4112 if(!display)
4113@@ -1046,7 +1046,7 @@ qboolean VID_CreateWindow( int width, int height, qboolean fullscreen )
4114 if( SDL_GetWindowWMInfo( host.hWnd, &info ) )
4115 {
4116 // info.info.info.info.info... Holy shit, SDL?
4117- SetClassLong( info.info.win.window, GCL_HICON, (LONG)ico );
4118+ SetClassLong( info.info.win.window, GCL_HICON, ico );
4119 }
4120 }
4121 #endif
4122diff --git a/engine/platform/android/vid_android.c b/engine/client/gl_vidnt_android_nosdl.c
4123similarity index 100%
4124rename from engine/platform/android/vid_android.c
4125rename to engine/client/gl_vidnt_android_nosdl.c
4126diff --git a/engine/client/vid_common.c b/engine/client/gl_vidnt_common.c
4127similarity index 100%
4128rename from engine/client/vid_common.c
4129rename to engine/client/gl_vidnt_common.c
4130diff --git a/engine/platform/sdl/vid_sdl_nanogl.c b/engine/client/gl_vidnt_nanogl.c
4131similarity index 100%
4132rename from engine/platform/sdl/vid_sdl_nanogl.c
4133rename to engine/client/gl_vidnt_nanogl.c
4134diff --git a/engine/platform/sdl/snd_sdl.c b/engine/client/s_backend.c
4135similarity index 99%
4136rename from engine/platform/sdl/snd_sdl.c
4137rename to engine/client/s_backend.c
4138index 61d2ea1..ebff04d 100644
4139--- a/engine/platform/sdl/snd_sdl.c
4140+++ b/engine/client/s_backend.c
4141@@ -234,9 +234,8 @@ void SNDDMA_Shutdown( void )
4142 if (SDL_WasInit(SDL_INIT_AUDIO != 0))
4143 SDL_QuitSubSystem(SDL_INIT_AUDIO);
4144 #endif
4145- if (dma.buffer)
4146- {
4147- Mem_Free(dma.buffer);
4148+ if (dma.buffer) {
4149+ Z_Free(dma.buffer);
4150 dma.buffer = NULL;
4151 }
4152 }
4153diff --git a/engine/platform/android/snd_opensles.c b/engine/client/s_backend_opensles.c
4154similarity index 100%
4155rename from engine/platform/android/snd_opensles.c
4156rename to engine/client/s_backend_opensles.c
4157diff --git a/engine/client/s_dsp.c b/engine/client/s_dsp.c
4158index b940b51..30a9789 100644
4159--- a/engine/client/s_dsp.c
4160+++ b/engine/client/s_dsp.c
4161@@ -855,7 +855,7 @@ void CheckNewDspPresets( void )
4162 if( dsp_off->value != 0.0f )
4163 return;
4164
4165- if( cl.predicted.waterlevel > 2 )
4166+ if( cl.frame.local.client.waterlevel > 2 )
4167 idsp_room = roomwater_type->integer;
4168 else
4169 idsp_room = room_type->integer;
4170diff --git a/engine/client/s_mix.c b/engine/client/s_mix.c
4171index ef2b912..3d3a19f 100644
4172--- a/engine/client/s_mix.c
4173+++ b/engine/client/s_mix.c
4174@@ -246,7 +246,7 @@ void S_PaintStereoFrom8( portable_samplepair_t *pbuf, int *volume, byte *pData,
4175
4176 for( i = 0; i < outCount; i++, data++ )
4177 {
4178- left = (byte)(*data & 0x00FF);
4179+ left = (byte)((*data & 0x00FF));
4180 right = (byte)((*data & 0xFF00) >> 8);
4181 pbuf[i].left += lscale[left];
4182 pbuf[i].right += rscale[right];
4183@@ -278,7 +278,7 @@ void S_PaintStereoFrom16( portable_samplepair_t *pbuf, int *volume, short *pData
4184
4185 for( i = 0; i < outCount; i++, data++ )
4186 {
4187- left = (signed short)(*data & 0x0000FFFF);
4188+ left = (signed short)((*data & 0x0000FFFF));
4189 right = (signed short)((*data & 0xFFFF0000) >> 16);
4190
4191 left = (left * volume[0]) >> 8;
4192diff --git a/engine/client/sound.h b/engine/client/sound.h
4193index 38ffc70..8e141ad 100644
4194--- a/engine/client/sound.h
4195+++ b/engine/client/sound.h
4196@@ -149,8 +149,9 @@ typedef struct
4197 typedef struct
4198 {
4199 double sample;
4200- double forcedEndSample;
4201+
4202 wavdata_t *pData;
4203+ double forcedEndSample;
4204 qboolean finished;
4205 } mixer_t;
4206
4207diff --git a/engine/client/vgui/vgui_draw.c b/engine/client/vgui/vgui_draw.c
4208index f9badd2..840cfc6 100644
4209--- a/engine/client/vgui/vgui_draw.c
4210+++ b/engine/client/vgui/vgui_draw.c
4211@@ -22,7 +22,7 @@ GNU General Public License for more details.
4212 #include "vgui_api.h"
4213 #include "library.h"
4214 #include <string.h>
4215-#include "../keydefs.h"
4216+
4217
4218 int g_textures[VGUI_MAX_TEXTURES];
4219 int g_textureId = 0;
4220@@ -333,75 +333,73 @@ void VGUI_InitKeyTranslationTable( void )
4221 s_pVirtualKeyTrans['Y'] = s_pVirtualKeyTrans['y'] = KEY_Y;
4222 s_pVirtualKeyTrans['Z'] = s_pVirtualKeyTrans['z'] = KEY_Z;
4223 #ifdef XASH_SDL
4224-
4225-
4226- s_pVirtualKeyTrans[K_KP_5 - 5] = KEY_PAD_0;
4227- s_pVirtualKeyTrans[K_KP_5 - 4] = KEY_PAD_1;
4228- s_pVirtualKeyTrans[K_KP_5 - 3] = KEY_PAD_2;
4229- s_pVirtualKeyTrans[K_KP_5 - 2] = KEY_PAD_3;
4230- s_pVirtualKeyTrans[K_KP_5 - 1] = KEY_PAD_4;
4231- s_pVirtualKeyTrans[K_KP_5 - 0] = KEY_PAD_5;
4232- s_pVirtualKeyTrans[K_KP_5 + 1] = KEY_PAD_6;
4233- s_pVirtualKeyTrans[K_KP_5 + 2] = KEY_PAD_7;
4234- s_pVirtualKeyTrans[K_KP_5 + 3] = KEY_PAD_8;
4235- s_pVirtualKeyTrans[K_KP_5 + 4] = KEY_PAD_9;
4236- s_pVirtualKeyTrans[K_KP_SLASH] = KEY_PAD_DIVIDE;
4237- s_pVirtualKeyTrans['*'] = KEY_PAD_MULTIPLY;
4238- s_pVirtualKeyTrans[K_KP_MINUS] = KEY_PAD_MINUS;
4239- s_pVirtualKeyTrans[K_KP_PLUS] = KEY_PAD_PLUS;
4240- s_pVirtualKeyTrans[K_KP_ENTER] = KEY_PAD_ENTER;
4241- //s_pVirtualKeyTrans[K_KP_DECIMAL] = KEY_PAD_DECIMAL;
4242- s_pVirtualKeyTrans['['] = KEY_LBRACKET;
4243- s_pVirtualKeyTrans[']'] = KEY_RBRACKET;
4244- s_pVirtualKeyTrans[';'] = KEY_SEMICOLON;
4245- s_pVirtualKeyTrans['\''] = KEY_APOSTROPHE;
4246- s_pVirtualKeyTrans['`'] = KEY_BACKQUOTE;
4247- s_pVirtualKeyTrans[','] = KEY_COMMA;
4248- s_pVirtualKeyTrans['.'] = KEY_PERIOD;
4249- s_pVirtualKeyTrans[K_KP_SLASH] = KEY_SLASH;
4250- s_pVirtualKeyTrans['\\'] = KEY_BACKSLASH;
4251- s_pVirtualKeyTrans['-'] = KEY_MINUS;
4252- s_pVirtualKeyTrans['='] = KEY_EQUAL;
4253- s_pVirtualKeyTrans[K_ENTER] = KEY_ENTER;
4254- s_pVirtualKeyTrans[K_SPACE] = KEY_SPACE;
4255- s_pVirtualKeyTrans[K_BACKSPACE] = KEY_BACKSPACE;
4256- s_pVirtualKeyTrans[K_TAB] = KEY_TAB;
4257- s_pVirtualKeyTrans[K_CAPSLOCK] = KEY_CAPSLOCK;
4258- s_pVirtualKeyTrans[K_KP_NUMLOCK] = KEY_NUMLOCK;
4259- s_pVirtualKeyTrans[K_ESCAPE] = KEY_ESCAPE;
4260- //s_pVirtualKeyTrans[K_KP_SCROLLLOCK] = KEY_SCROLLLOCK;
4261- s_pVirtualKeyTrans[K_INS] = KEY_INSERT;
4262- s_pVirtualKeyTrans[K_DEL] = KEY_DELETE;
4263- s_pVirtualKeyTrans[K_HOME] = KEY_HOME;
4264- s_pVirtualKeyTrans[K_END] = KEY_END;
4265- s_pVirtualKeyTrans[K_PGUP] = KEY_PAGEUP;
4266- s_pVirtualKeyTrans[K_PGDN] = KEY_PAGEDOWN;
4267- s_pVirtualKeyTrans[K_PAUSE] = KEY_BREAK;
4268- //s_pVirtualKeyTrans[K_SHIFT] = KEY_RSHIFT;
4269- s_pVirtualKeyTrans[K_SHIFT] = KEY_LSHIFT; // SHIFT -> left SHIFT
4270- //s_pVirtualKeyTrans[SDLK_RALT] = KEY_RALT;
4271- s_pVirtualKeyTrans[K_ALT] = KEY_LALT; // ALT -> left ALT
4272- //s_pVirtualKeyTrans[SDLK_RCTRL] = KEY_RCONTROL;
4273- s_pVirtualKeyTrans[K_CTRL] = KEY_LCONTROL; // CTRL -> left CTRL
4274- s_pVirtualKeyTrans[K_WIN] = KEY_LWIN;
4275- //s_pVirtualKeyTrans[SDLK_APPLICATION] = KEY_RWIN;
4276- //s_pVirtualKeyTrans[K_WIN] = KEY_APP;
4277- s_pVirtualKeyTrans[K_UPARROW] = KEY_UP;
4278- s_pVirtualKeyTrans[K_LEFTARROW] = KEY_LEFT;
4279- s_pVirtualKeyTrans[K_DOWNARROW] = KEY_DOWN;
4280- s_pVirtualKeyTrans[K_RIGHTARROW] = KEY_RIGHT;
4281- s_pVirtualKeyTrans[K_F1] = KEY_F1;
4282- s_pVirtualKeyTrans[K_F2] = KEY_F2;
4283- s_pVirtualKeyTrans[K_F3] = KEY_F3;
4284- s_pVirtualKeyTrans[K_F4] = KEY_F4;
4285- s_pVirtualKeyTrans[K_F5] = KEY_F5;
4286- s_pVirtualKeyTrans[K_F6] = KEY_F6;
4287- s_pVirtualKeyTrans[K_F7] = KEY_F7;
4288- s_pVirtualKeyTrans[K_F8] = KEY_F8;
4289- s_pVirtualKeyTrans[K_F9] = KEY_F9;
4290- s_pVirtualKeyTrans[K_F10] = KEY_F10;
4291- s_pVirtualKeyTrans[K_F11] = KEY_F11;
4292- s_pVirtualKeyTrans[K_F12] = KEY_F12;
4293+ s_pVirtualKeyTrans[SDLK_KP_0] = KEY_PAD_0;
4294+ s_pVirtualKeyTrans[SDLK_KP_1] = KEY_PAD_1;
4295+ s_pVirtualKeyTrans[SDLK_KP_2] = KEY_PAD_2;
4296+ s_pVirtualKeyTrans[SDLK_KP_3] = KEY_PAD_3;
4297+ s_pVirtualKeyTrans[SDLK_KP_4] = KEY_PAD_4;
4298+ s_pVirtualKeyTrans[SDLK_KP_5] = KEY_PAD_5;
4299+ s_pVirtualKeyTrans[SDLK_KP_6] = KEY_PAD_6;
4300+ s_pVirtualKeyTrans[SDLK_KP_7] = KEY_PAD_7;
4301+ s_pVirtualKeyTrans[SDLK_KP_8] = KEY_PAD_8;
4302+ s_pVirtualKeyTrans[SDLK_KP_9] = KEY_PAD_9;
4303+ s_pVirtualKeyTrans[SDLK_KP_DIVIDE] = KEY_PAD_DIVIDE;
4304+ s_pVirtualKeyTrans[SDLK_KP_MULTIPLY] = KEY_PAD_MULTIPLY;
4305+ s_pVirtualKeyTrans[SDLK_KP_MINUS] = KEY_PAD_MINUS;
4306+ s_pVirtualKeyTrans[SDLK_KP_PLUS] = KEY_PAD_PLUS;
4307+ s_pVirtualKeyTrans[SDLK_KP_ENTER] = KEY_PAD_ENTER;
4308+ s_pVirtualKeyTrans[SDLK_KP_DECIMAL] = KEY_PAD_DECIMAL;
4309+ s_pVirtualKeyTrans[SDLK_LEFTBRACKET] = KEY_LBRACKET;
4310+ s_pVirtualKeyTrans[SDLK_RIGHTBRACKET] = KEY_RBRACKET;
4311+ s_pVirtualKeyTrans[SDLK_SEMICOLON] = KEY_SEMICOLON;
4312+ s_pVirtualKeyTrans[SDLK_QUOTE] = KEY_APOSTROPHE;
4313+ s_pVirtualKeyTrans[SDLK_BACKQUOTE] = KEY_BACKQUOTE;
4314+ s_pVirtualKeyTrans[SDLK_COMMA] = KEY_COMMA;
4315+ s_pVirtualKeyTrans[SDLK_PERIOD] = KEY_PERIOD;
4316+ s_pVirtualKeyTrans[SDLK_SLASH] = KEY_SLASH;
4317+ s_pVirtualKeyTrans[SDLK_BACKSLASH] = KEY_BACKSLASH;
4318+ s_pVirtualKeyTrans[SDLK_MINUS] = KEY_MINUS;
4319+ s_pVirtualKeyTrans[SDLK_EQUALS] = KEY_EQUAL;
4320+ s_pVirtualKeyTrans[SDLK_RETURN] = KEY_ENTER;
4321+ s_pVirtualKeyTrans[SDLK_SPACE] = KEY_SPACE;
4322+ s_pVirtualKeyTrans[SDLK_BACKSPACE] = KEY_BACKSPACE;
4323+ s_pVirtualKeyTrans[SDLK_TAB] = KEY_TAB;
4324+ s_pVirtualKeyTrans[SDLK_CAPSLOCK] = KEY_CAPSLOCK;
4325+ s_pVirtualKeyTrans[SDLK_NUMLOCKCLEAR] = KEY_NUMLOCK;
4326+ s_pVirtualKeyTrans[SDLK_ESCAPE] = KEY_ESCAPE;
4327+ s_pVirtualKeyTrans[SDLK_SCROLLLOCK] = KEY_SCROLLLOCK;
4328+ s_pVirtualKeyTrans[SDLK_INSERT] = KEY_INSERT;
4329+ s_pVirtualKeyTrans[SDLK_DELETE] = KEY_DELETE;
4330+ s_pVirtualKeyTrans[SDLK_HOME] = KEY_HOME;
4331+ s_pVirtualKeyTrans[SDLK_END] = KEY_END;
4332+ s_pVirtualKeyTrans[SDLK_PRIOR] = KEY_PAGEUP;
4333+ s_pVirtualKeyTrans[SDLK_PAGEDOWN] = KEY_PAGEDOWN;
4334+ s_pVirtualKeyTrans[SDLK_PAUSE] = KEY_BREAK;
4335+ s_pVirtualKeyTrans[SDLK_RSHIFT] = KEY_RSHIFT;
4336+ s_pVirtualKeyTrans[SDLK_LSHIFT] = KEY_LSHIFT; // SHIFT -> left SHIFT
4337+ s_pVirtualKeyTrans[SDLK_RALT] = KEY_RALT;
4338+ s_pVirtualKeyTrans[SDLK_LALT] = KEY_LALT; // ALT -> left ALT
4339+ s_pVirtualKeyTrans[SDLK_RCTRL] = KEY_RCONTROL;
4340+ s_pVirtualKeyTrans[SDLK_LCTRL] = KEY_LCONTROL; // CTRL -> left CTRL
4341+ s_pVirtualKeyTrans[SDLK_APPLICATION] = KEY_LWIN;
4342+ s_pVirtualKeyTrans[SDLK_APPLICATION] = KEY_RWIN;
4343+ s_pVirtualKeyTrans[SDLK_APPLICATION] = KEY_APP;
4344+ s_pVirtualKeyTrans[SDLK_UP] = KEY_UP;
4345+ s_pVirtualKeyTrans[SDLK_LEFT] = KEY_LEFT;
4346+ s_pVirtualKeyTrans[SDLK_DOWN] = KEY_DOWN;
4347+ s_pVirtualKeyTrans[SDLK_RIGHT] = KEY_RIGHT;
4348+ s_pVirtualKeyTrans[SDLK_F1] = KEY_F1;
4349+ s_pVirtualKeyTrans[SDLK_F2] = KEY_F2;
4350+ s_pVirtualKeyTrans[SDLK_F3] = KEY_F3;
4351+ s_pVirtualKeyTrans[SDLK_F4] = KEY_F4;
4352+ s_pVirtualKeyTrans[SDLK_F5] = KEY_F5;
4353+ s_pVirtualKeyTrans[SDLK_F6] = KEY_F6;
4354+ s_pVirtualKeyTrans[SDLK_F7] = KEY_F7;
4355+ s_pVirtualKeyTrans[SDLK_F8] = KEY_F8;
4356+ s_pVirtualKeyTrans[SDLK_F9] = KEY_F9;
4357+ s_pVirtualKeyTrans[SDLK_F10] = KEY_F10;
4358+ s_pVirtualKeyTrans[SDLK_F11] = KEY_F11;
4359+ s_pVirtualKeyTrans[SDLK_F12] = KEY_F12;
4360 #endif
4361 }
4362
4363diff --git a/engine/common/base_cmd.c b/engine/common/base_cmd.c
4364deleted file mode 100644
4365index f4c8aac..0000000
4366--- a/engine/common/base_cmd.c
4367+++ /dev/null
4368@@ -1,128 +0,0 @@
4369-/*
4370-base_cmd.c - command & cvar hashmap. Insipred by Doom III
4371-Copyright (C) 2016 a1batross
4372-
4373-This program is free software: you can redistribute it and/or modify
4374-it under the terms of the GNU General Public License as published by
4375-the Free Software Foundation, either version 3 of the License, or
4376-(at your option) any later version.
4377-
4378-This program is distributed in the hope that it will be useful,
4379-but WITHOUT ANY WARRANTY; without even the implied warranty of
4380-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4381-GNU General Public License for more details.
4382-*/
4383-#define XASH_HASHED_VARS
4384-#include <base_cmd.h>
4385-#include <common.h>
4386-
4387-typedef struct base_command_hashmap_s
4388-{
4389- base_command_t *basecmd;
4390- const char *name;
4391- base_command_type_e type;
4392- struct base_command_hashmap_s *next;
4393-} base_command_hashmap_t;
4394-
4395-#define HASH_SIZE 300
4396-base_command_hashmap_t *hashed_cmds[HASH_SIZE];
4397-
4398-
4399-/*
4400-============
4401-BaseCmd_Find
4402-============
4403-*/
4404-base_command_t *BaseCmd_Find( base_command_type_e type, const char *name )
4405-{
4406- uint hash = Com_HashKey( name, HASH_SIZE );
4407- base_command_hashmap_t *i;
4408-
4409- for( i = hashed_cmds[hash]; i &&
4410- ( i->type != type || Q_stricmp( name, i->name ) ); // filter out
4411- i = i->next );
4412-
4413- if( i )
4414- return i->basecmd;
4415- return NULL;
4416-}
4417-
4418-/*
4419-============
4420-BaseCmd_Insert
4421-============
4422-*/
4423-void BaseCmd_Insert( base_command_type_e type, base_command_t *basecmd, const char *name )
4424-{
4425- uint hash = Com_HashKey( name, HASH_SIZE );
4426- base_command_hashmap_t *elem;
4427-
4428- elem = Z_Malloc( sizeof( base_command_hashmap_t ) );
4429- elem->basecmd = basecmd;
4430- elem->type = type;
4431- elem->name = name;
4432- elem->next = hashed_cmds[hash];
4433- hashed_cmds[hash] = elem;
4434-}
4435-
4436-/*
4437-============
4438-BaseCmd_Replace
4439-============
4440-*/
4441-void BaseCmd_Replace( base_command_type_e type, base_command_t *basecmd, const char *name )
4442-{
4443- uint hash = Com_HashKey( name, HASH_SIZE );
4444- base_command_hashmap_t *i;
4445-
4446- for( i = hashed_cmds[hash]; i &&
4447- ( i->type != type || Q_stricmp( name, i->name ) ) ; // filter out
4448- i = i->next );
4449-
4450- if( !i )
4451- {
4452- MsgDev( D_ERROR, "BaseCmd_Replace: couldn't find %s\n", name);
4453- return;
4454- }
4455-
4456- i->basecmd = basecmd;
4457- i->name = name; // may be freed after
4458-}
4459-
4460-/*
4461-============
4462-BaseCmd_Remove
4463-============
4464-*/
4465-void BaseCmd_Remove( base_command_type_e type, base_command_t *basecmd, const char *name )
4466-{
4467- uint hash = Com_HashKey( name, HASH_SIZE );
4468- base_command_hashmap_t *i, *prev;
4469-
4470- for( prev = NULL, i = hashed_cmds[hash]; i &&
4471- ( i->basecmd != basecmd || i->type != type); // filter out
4472- prev = i, i = i->next );
4473-
4474- if( !i )
4475- {
4476- MsgDev( D_ERROR, "Couldn't find %s in buckets", name );
4477- return;
4478- }
4479-
4480- if( prev )
4481- prev->next = i->next;
4482- else
4483- hashed_cmds[hash] = i->next;
4484-
4485- Z_Free( i );
4486-}
4487-
4488-/*
4489-============
4490-BaseCmd_Init
4491-============
4492-*/
4493-void BaseCmd_Init( void )
4494-{
4495- Q_memset( hashed_cmds, 0, sizeof( hashed_cmds ) );
4496-}
4497diff --git a/engine/common/base_cmd.h b/engine/common/base_cmd.h
4498deleted file mode 100644
4499index 0005d98..0000000
4500--- a/engine/common/base_cmd.h
4501+++ /dev/null
4502@@ -1,38 +0,0 @@
4503-/*
4504-base_cmd.h - command & cvar hashmap. Insipred by Doom III
4505-Copyright (C) 2016 a1batross
4506-
4507-This program is free software: you can redistribute it and/or modify
4508-it under the terms of the GNU General Public License as published by
4509-the Free Software Foundation, either version 3 of the License, or
4510-(at your option) any later version.
4511-
4512-This program is distributed in the hope that it will be useful,
4513-but WITHOUT ANY WARRANTY; without even the implied warranty of
4514-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4515-GNU General Public License for more details.
4516-*/
4517-
4518-#pragma once
4519-#ifndef BASE_CMD_H
4520-
4521-#define XASH_HASHED_VARS
4522-
4523-#ifdef XASH_HASHED_VARS
4524-
4525-typedef enum base_command_type
4526-{
4527- HM_DONTCARE = 0,
4528- HM_CVAR,
4529- HM_CMD,
4530- HM_CMDALIAS
4531-} base_command_type_e;
4532-
4533-typedef void base_command_t;
4534-
4535-base_command_t *BaseCmd_Find( base_command_type_e type, const char *name );
4536-void BaseCmd_Insert ( base_command_type_e type, base_command_t *basecmd, const char *name );
4537-void BaseCmd_Replace( base_command_type_e type, base_command_t *basecmd, const char *name ); // only if same name
4538-void BaseCmd_Remove ( base_command_type_e type, base_command_t *basecmd, const char *name );
4539-#endif
4540-#endif
4541diff --git a/engine/common/build.c b/engine/common/build.c
4542index f9b9883..7d02a5a 100644
4543--- a/engine/common/build.c
4544+++ b/engine/common/build.c
4545@@ -54,6 +54,9 @@ int Q_buildnum( void )
4546
4547 return b;
4548 #else
4549+<<<<<<< HEAD
4550+ return 3366;
4551+=======
4552 return 500; // Aug 13 2016
4553 #endif
4554 }
4555@@ -111,6 +114,7 @@ const char *Q_buildarch( void )
4556 archname = "arm";
4557 #else
4558 #error "Place your architecture name here! If this is a mistake, try to fix conditions above and report a bug"
4559+>>>>>>> master
4560 #endif
4561
4562 return archname;
4563@@ -149,5 +153,5 @@ IMPORTANT: this value must be acquired through "build" cvar.
4564 */
4565 int Q_buildnum_compat( void )
4566 {
4567- return 3366;
4568+ return 3224;
4569 }
4570diff --git a/engine/common/cmd.c b/engine/common/cmd.c
4571index 27ae974..a51d5b5 100644
4572--- a/engine/common/cmd.c
4573+++ b/engine/common/cmd.c
4574@@ -360,13 +360,6 @@ static void Cmd_Alias_f( void )
4575 }
4576
4577 // if the alias already exists, reuse it
4578-#if defined( XASH_HASHED_VARS )
4579- a = BaseCmd_Find( HM_CMDALIAS, s );
4580- if( a )
4581- {
4582- Mem_Free( a->value );
4583- }
4584-#else
4585 for( a = cmd_alias; a; a = a->next )
4586 {
4587 if( !Q_strcmp( s, a->name ))
4588@@ -375,7 +368,6 @@ static void Cmd_Alias_f( void )
4589 break;
4590 }
4591 }
4592-#endif
4593
4594 if( !a )
4595 {
4596@@ -392,10 +384,6 @@ static void Cmd_Alias_f( void )
4597 cmd_alias = a;
4598 }
4599 a->next = current;
4600-
4601-#if defined( XASH_HASHED_VARS )
4602- BaseCmd_Insert( HM_CMDALIAS, a, a->name );
4603-#endif
4604 }
4605
4606 // copy the rest of the command line
4607@@ -440,13 +428,11 @@ static void Cmd_UnAlias_f ( void )
4608 for( i = 1; i < Cmd_Argc(); ++i )
4609 {
4610 s = Cmd_Argv( i );
4611- for( p = NULL, a = cmd_alias; a; p = a, a = a->next )
4612+ p = NULL;
4613+ for( a = cmd_alias; a; p = a, a = a->next )
4614 {
4615 if( !Q_strcmp( s, a->name ))
4616 {
4617-#if defined( XASH_HASHED_VARS )
4618- BaseCmd_Remove( HM_CMDALIAS, p, a->name );
4619-#endif
4620 if( a == cmd_alias )
4621 cmd_alias = a->next;
4622 if( p )
4623@@ -470,8 +456,8 @@ static void Cmd_UnAlias_f ( void )
4624 */
4625 typedef struct cmd_s
4626 {
4627- char *name; // must be first, to match cvar_t
4628 struct cmd_s *next;
4629+ char *name;
4630 xcommand_t function;
4631 char *desc;
4632 int flags;
4633@@ -657,9 +643,6 @@ void Cmd_AddCommand( const char *cmd_name, xcommand_t function, const char *cmd_
4634 cmd_functions = cmd;
4635 }
4636 cmd->next = current;
4637-#if defined(XASH_HASHED_VARS)
4638- BaseCmd_Insert( HM_CMD, cmd, cmd->name );
4639-#endif
4640 }
4641
4642 /*
4643@@ -708,10 +691,6 @@ void Cmd_AddGameCommand( const char *cmd_name, xcommand_t function )
4644 cmd_functions = cmd;
4645 }
4646 cmd->next = current;
4647-
4648-#if defined(XASH_HASHED_VARS)
4649- BaseCmd_Insert( HM_CMD, cmd, cmd->name );
4650-#endif
4651 }
4652
4653 /*
4654@@ -760,10 +739,6 @@ void Cmd_AddClientCommand( const char *cmd_name, xcommand_t function )
4655 cmd_functions = cmd;
4656 }
4657 cmd->next = current;
4658-
4659-#if defined(XASH_HASHED_VARS)
4660- BaseCmd_Insert( HM_CMD, cmd, cmd->name );
4661-#endif
4662 }
4663
4664 /*
4665@@ -779,10 +754,6 @@ void Cmd_RemoveCommand( const char *cmd_name )
4666 {
4667 if( !Q_strcmp( cmd_name, cmd->name ))
4668 {
4669-#if defined(XASH_HASHED_VARS)
4670- BaseCmd_Remove( HM_CMD, cmd, cmd->name );
4671-#endif
4672-
4673 *prev = cmd->next;
4674
4675 Mem_Free( cmd->name );
4676@@ -827,18 +798,12 @@ qboolean Cmd_Exists( const char *cmd_name )
4677 {
4678 cmd_t *cmd;
4679
4680-#if defined(XASH_HASHED_VARS)
4681- if( BaseCmd_Find( HM_CMD, cmd_name ) )
4682- return true;
4683- return false;
4684-#else
4685 for( cmd = cmd_functions; cmd; cmd = cmd->next )
4686 {
4687 if( !Q_strcmp( cmd_name, cmd->name ))
4688 return true;
4689 }
4690 return false;
4691-#endif
4692 }
4693
4694 /*
4695@@ -848,11 +813,10 @@ Cmd_If_f
4696 Compare and et condition bit if true
4697 ============
4698 */
4699-#define BIT64(x) ( (uint64_t)1 << x )
4700 void Cmd_If_f( void )
4701 {
4702 // reset bit first
4703- cmd_cond &= ~BIT64( cmd_condlevel );
4704+ cmd_cond &= ~BIT( cmd_condlevel );
4705
4706 // usage
4707 if( cmd_argc == 1 )
4708@@ -870,7 +834,7 @@ void Cmd_If_f( void )
4709 else if( cmd_argc == 2 )
4710 {
4711 if( Q_atof( cmd_argv[1] ) )
4712- cmd_cond |= BIT64( cmd_condlevel );
4713+ cmd_cond |= BIT( cmd_condlevel );
4714 }
4715 else if( cmd_argc == 4 )
4716 {
4717@@ -886,20 +850,20 @@ void Cmd_If_f( void )
4718 {
4719 if( !Q_strcmp( cmd_argv[1], cmd_argv[3] ) ||
4720 ( ( f1 || f2 ) && ( f1 == f2 ) ) )
4721- cmd_cond |= BIT64( cmd_condlevel );
4722+ cmd_cond |= BIT( cmd_condlevel );
4723 }
4724
4725 if( cmd_argv[2][0] == '!' ) // !=
4726 {
4727- cmd_cond ^= BIT64( cmd_condlevel );
4728+ cmd_cond ^= BIT( cmd_condlevel );
4729 return;
4730 }
4731
4732 if( ( cmd_argv[2][0] == '>' ) && ( f1 > f2 ) ) // >, >=
4733- cmd_cond |= BIT64( cmd_condlevel );
4734+ cmd_cond |= BIT( cmd_condlevel );
4735
4736 if( ( cmd_argv[2][0] == '<' ) && ( f1 < f2 ) ) // <, <=
4737- cmd_cond |= BIT64( cmd_condlevel );
4738+ cmd_cond |= BIT( cmd_condlevel );
4739 }
4740 }
4741
4742@@ -913,7 +877,7 @@ Invert condition bit
4743 */
4744 void Cmd_Else_f( void )
4745 {
4746- cmd_cond ^= BIT64( cmd_condlevel );
4747+ cmd_cond ^= BIT( cmd_condlevel );
4748 }
4749
4750 /*
4751@@ -971,7 +935,7 @@ void Cmd_ExecuteString( const char *text, cmd_source_t src )
4752
4753 while( *text == ':' )
4754 {
4755- if( !( cmd_cond & BIT64( cmd_condlevel ) ) )
4756+ if( !( cmd_cond & BIT( cmd_condlevel ) ) )
4757 return;
4758 cmd_condlevel++;
4759 text++;
4760@@ -984,14 +948,6 @@ void Cmd_ExecuteString( const char *text, cmd_source_t src )
4761 if( !Cmd_Argc()) return; // no tokens
4762
4763 // check aliases
4764-#if defined(XASH_HASHED_VARS)
4765- a = BaseCmd_Find(HM_CMDALIAS, cmd_argv[0] );
4766- if( a )
4767- {
4768- Cbuf_InsertText( a->value );
4769- return;
4770- }
4771-#else
4772 for( a = cmd_alias; a; a = a->next )
4773 {
4774 if( !Q_stricmp( cmd_argv[0], a->name ))
4775@@ -1000,17 +956,8 @@ void Cmd_ExecuteString( const char *text, cmd_source_t src )
4776 return;
4777 }
4778 }
4779-#endif
4780
4781 // check functions
4782-#if defined(XASH_HASHED_VARS)
4783- cmd = BaseCmd_Find( HM_CMD, cmd_argv[0] );
4784- if( cmd && cmd->function )
4785- {
4786- cmd->function();
4787- return;
4788- }
4789-#else
4790 for( cmd = cmd_functions; cmd; cmd = cmd->next )
4791 {
4792 if( !Q_stricmp( cmd_argv[0], cmd->name ) && cmd->function )
4793@@ -1019,7 +966,6 @@ void Cmd_ExecuteString( const char *text, cmd_source_t src )
4794 return;
4795 }
4796 }
4797-#endif
4798
4799 // check cvars
4800 if( Cvar_Command( )) return;
4801@@ -1196,7 +1142,7 @@ static void Cmd_Apropos_f( void )
4802 {
4803 // proceed a bit differently here as an alias value always got a final \n
4804 if( !matchpattern_with_separator( alias->name, partial, true, "", false ))
4805- if( !matchpattern_with_separator( alias->value, partial, true, "\n", false )) // when \n is a separator, wildcards don't match it //-V666
4806+ if( !matchpattern_with_separator( alias->value, partial, true, "\n", false )) // when \n is a separator, wildcards don't match it
4807 continue;
4808
4809 Msg( "alias ^5%s^7: %s", alias->name, alias->value ); // do not print an extra \n
4810@@ -1238,10 +1184,6 @@ void Cmd_Unlink( int group )
4811 continue;
4812 }
4813
4814-#if defined(XASH_HASHED_VARS)
4815- BaseCmd_Remove( HM_CMD, cmd, cmd->name );
4816-#endif
4817-
4818 *prev = cmd->next;
4819
4820 Mem_Free( cmd->name );
4821diff --git a/engine/common/common.h b/engine/common/common.h
4822index 2477752..413a487 100644
4823--- a/engine/common/common.h
4824+++ b/engine/common/common.h
4825@@ -298,7 +298,6 @@ typedef struct host_redirect_s
4826 int buffersize;
4827 netadr_t address;
4828 void (*flush)( netadr_t adr, rdtype_t target, char *buffer );
4829- int lines;
4830 } host_redirect_t;
4831
4832 typedef struct
4833@@ -917,7 +916,6 @@ int SCR_GetAudioChunk( char *rawdata, int length );
4834 wavdata_t *SCR_GetMovieInfo( void );
4835 void SCR_Shutdown( void );
4836 void Con_Print( const char *txt );
4837-void Rcon_Print( const char *pMsg );
4838 void Con_NPrintf( int idx, char *fmt, ... ) _format(2);
4839 void Con_NXPrintf( struct con_nprint_s *info, char *fmt, ... ) _format(2);
4840 void UI_NPrintf( int idx, char *fmt, ... ) _format(2);
4841@@ -977,11 +975,6 @@ typedef struct
4842 void Con_CompleteCommand( field_t *field );
4843 void Con_ClearAutoComplete();
4844
4845-//
4846-// console.c
4847-//
4848-void Con_Clear( void );
4849-
4850 extern const char *svc_strings[256];
4851
4852 // soundlib shared exports
4853diff --git a/engine/client/console.c b/engine/common/console.c
4854similarity index 99%
4855rename from engine/client/console.c
4856rename to engine/common/console.c
4857index ec584f2..d21019b 100644
4858--- a/engine/client/console.c
4859+++ b/engine/common/console.c
4860@@ -113,13 +113,10 @@ void Field_CharEvent( field_t *edit, int ch );
4861 Con_Clear_f
4862 ================
4863 */
4864-void Con_Clear( void )
4865+void Con_Clear_f( void )
4866 {
4867 int i;
4868
4869- if( !con.initialized )
4870- return;
4871-
4872 for( i = 0; i < CON_TEXTSIZE; i++ )
4873 con.text[i] = ( ColorIndex( COLOR_DEFAULT ) << 8 ) | ' ';
4874 con.display = con.current; // go to end
4875@@ -713,7 +710,7 @@ void Con_DrawStringLen( const char *pText, int *length, int *height )
4876 {
4877 byte c = *pText;
4878
4879- if( *pText == '\n' ) //-V595
4880+ if( *pText == '\n' )
4881 {
4882 pText++;
4883 curLength = 0;
4884@@ -842,6 +839,7 @@ void Con_Init( void )
4885
4886 Cmd_AddCommand( "toggleconsole", Con_ToggleConsole_f, "opens or closes the console" );
4887 Cmd_AddCommand( "con_color", Con_SetColor_f, "set a custom console color" );
4888+ Cmd_AddCommand( "clear", Con_Clear_f, "clear console history" );
4889 Cmd_AddCommand( "messagemode", Con_MessageMode_f, "enable message mode \"say\"" );
4890 Cmd_AddCommand( "messagemode2", Con_MessageMode2_f, "enable message mode \"say_team\"" );
4891
4892diff --git a/engine/common/crashhandler.c b/engine/common/crashhandler.c
4893deleted file mode 100644
4894index 0bd7827..0000000
4895--- a/engine/common/crashhandler.c
4896+++ /dev/null
4897@@ -1,397 +0,0 @@
4898-/*
4899-crashhandler.c - advanced crashhandler
4900-Copyright (C) 2016 Mittorn
4901-
4902-This program is free software: you can redistribute it and/or modify
4903-it under the terms of the GNU General Public License as published by
4904-the Free Software Foundation, either version 3 of the License, or
4905-(at your option) any later version.
4906-
4907-This program is distributed in the hope that it will be useful,
4908-but WITHOUT ANY WARRANTY; without even the implied warranty of
4909-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4910-GNU General Public License for more details.
4911-*/
4912-
4913-#include "common.h"
4914-
4915-/*
4916-================
4917-Sys_Crash
4918-
4919-Crash handler, called from system
4920-================
4921-*/
4922-#define DEBUG_BREAK
4923-/// TODO: implement on windows too
4924-
4925-#ifdef _WIN32
4926-#ifdef DBGHELP
4927-#pragma comment( lib, "dbghelp" )
4928-#pragma comment( lib, "psapi" )
4929-#include <winnt.h>
4930-#include <dbghelp.h>
4931-#include <psapi.h>
4932-
4933-#ifndef XASH_SDL
4934-typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
4935-#endif
4936-
4937-int ModuleName( HANDLE process, char *name, void *address, int len )
4938-{
4939- DWORD_PTR baseAddress = 0;
4940- static HMODULE *moduleArray;
4941- static unsigned int moduleCount;
4942- LPBYTE moduleArrayBytes;
4943- DWORD bytesRequired;
4944- int i;
4945-
4946- if(len < 3)
4947- return 0;
4948-
4949- if ( !moduleArray && EnumProcessModules( process, NULL, 0, &bytesRequired ) )
4950- {
4951- if ( bytesRequired )
4952- {
4953- moduleArrayBytes = (LPBYTE)LocalAlloc( LPTR, bytesRequired );
4954-
4955- if ( moduleArrayBytes )
4956- {
4957- if( EnumProcessModules( process, (HMODULE *)moduleArrayBytes, bytesRequired, &bytesRequired ) )
4958- {
4959- moduleCount = bytesRequired / sizeof( HMODULE );
4960- moduleArray = (HMODULE *)moduleArrayBytes;
4961- }
4962- }
4963- }
4964- }
4965-
4966- for( i = 0; i<moduleCount; i++ )
4967- {
4968- MODULEINFO info;
4969- GetModuleInformation( process, moduleArray[i], &info, sizeof(MODULEINFO) );
4970-
4971- if( ( address > info.lpBaseOfDll ) &&
4972- ( (DWORD64)address < (DWORD64)info.lpBaseOfDll + (DWORD64)info.SizeOfImage ) )
4973- return GetModuleBaseName( process, moduleArray[i], name, len );
4974- }
4975- return snprintf(name, len, "???");
4976-}
4977-static void stack_trace( PEXCEPTION_POINTERS pInfo )
4978-{
4979- char message[1024];
4980- int len = 0;
4981- size_t i;
4982- HANDLE process = GetCurrentProcess();
4983- HANDLE thread = GetCurrentThread();
4984- IMAGEHLP_LINE64 line;
4985- DWORD dline = 0;
4986- DWORD options;
4987- CONTEXT context;
4988- STACKFRAME64 stackframe;
4989- DWORD image;
4990-
4991- memcpy( &context, pInfo->ContextRecord, sizeof(CONTEXT) );
4992- options = SymGetOptions();
4993- options |= SYMOPT_DEBUG;
4994- options |= SYMOPT_LOAD_LINES;
4995- SymSetOptions( options );
4996-
4997- SymInitialize( process, NULL, TRUE );
4998-
4999-
5000-
5001- ZeroMemory( &stackframe, sizeof(STACKFRAME64) );
5002-
5003-#ifdef _M_IX86
5004- image = IMAGE_FILE_MACHINE_I386;
5005- stackframe.AddrPC.Offset = context.Eip;
5006- stackframe.AddrPC.Mode = AddrModeFlat;
5007- stackframe.AddrFrame.Offset = context.Ebp;
5008- stackframe.AddrFrame.Mode = AddrModeFlat;
5009- stackframe.AddrStack.Offset = context.Esp;
5010- stackframe.AddrStack.Mode = AddrModeFlat;
5011-#elif _M_X64
5012- image = IMAGE_FILE_MACHINE_AMD64;
5013- stackframe.AddrPC.Offset = context.Rip;
5014- stackframe.AddrPC.Mode = AddrModeFlat;
5015- stackframe.AddrFrame.Offset = context.Rsp;
5016- stackframe.AddrFrame.Mode = AddrModeFlat;
5017- stackframe.AddrStack.Offset = context.Rsp;
5018- stackframe.AddrStack.Mode = AddrModeFlat;
5019-#elif _M_IA64
5020- image = IMAGE_FILE_MACHINE_IA64;
5021- stackframe.AddrPC.Offset = context.StIIP;
5022- stackframe.AddrPC.Mode = AddrModeFlat;
5023- stackframe.AddrFrame.Offset = context.IntSp;
5024- stackframe.AddrFrame.Mode = AddrModeFlat;
5025- stackframe.AddrBStore.Offset = context.RsBSP;
5026- stackframe.AddrBStore.Mode = AddrModeFlat;
5027- stackframe.AddrStack.Offset = context.IntSp;
5028- stackframe.AddrStack.Mode = AddrModeFlat;
5029-#endif
5030- len += snprintf( message + len, 1024 - len, "Sys_Crash: address %p, code %p\n", pInfo->ExceptionRecord->ExceptionAddress, pInfo->ExceptionRecord->ExceptionCode );
5031- if( SymGetLineFromAddr64( process, (DWORD64)pInfo->ExceptionRecord->ExceptionAddress, &dline, &line ) )
5032- {
5033- len += snprintf(message + len, 1024 - len,"Exception: %s:%d:%d\n", (char*)line.FileName, (int)line.LineNumber, (int)dline);
5034- }
5035- if( SymGetLineFromAddr64( process, stackframe.AddrPC.Offset, &dline, &line ) )
5036- {
5037- len += snprintf(message + len, 1024 - len,"PC: %s:%d:%d\n", (char*)line.FileName, (int)line.LineNumber, (int)dline);
5038- }
5039- if( SymGetLineFromAddr64( process, stackframe.AddrFrame.Offset, &dline, &line ) )
5040- {
5041- len += snprintf(message + len, 1024 - len,"Frame: %s:%d:%d\n", (char*)line.FileName, (int)line.LineNumber, (int)dline);
5042- }
5043- for( i = 0; i < 25; i++ )
5044- {
5045- char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)];
5046- PSYMBOL_INFO symbol = (PSYMBOL_INFO)buffer;
5047- BOOL result = StackWalk64(
5048- image, process, thread,
5049- &stackframe, &context, NULL,
5050- SymFunctionTableAccess64, SymGetModuleBase64, NULL);
5051-
5052- DWORD64 displacement = 0;
5053- if( !result )
5054- break;
5055-
5056-
5057- symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
5058- symbol->MaxNameLen = MAX_SYM_NAME;
5059-
5060- len += snprintf( message + len, 1024 - len, "% 2d %p", i, (void*)stackframe.AddrPC.Offset );
5061- if( SymFromAddr( process, stackframe.AddrPC.Offset, &displacement, symbol ) )
5062- {
5063- len += snprintf( message + len, 1024 - len, " %s ", symbol->Name );
5064- }
5065- if( SymGetLineFromAddr64( process, stackframe.AddrPC.Offset, &dline, &line ) )
5066- {
5067- len += snprintf(message + len, 1024 - len,"(%s:%d:%d) ", (char*)line.FileName, (int)line.LineNumber, (int)dline);
5068- }
5069- len += snprintf( message + len, 1024 - len, "(");
5070- len += ModuleName( process, message + len, (void*)stackframe.AddrPC.Offset, 1024 - len );
5071- len += snprintf( message + len, 1024 - len, ")\n");
5072- }
5073-#ifdef XASH_SDL
5074- if( host.type != HOST_DEDICATED ) // let system to restart server automaticly
5075- SDL_ShowSimpleMessageBox( SDL_MESSAGEBOX_ERROR,"Sys_Crash", message, host.hWnd );
5076-#endif
5077- Sys_PrintLog(message);
5078-
5079- SymCleanup(process);
5080-}
5081-#endif //DBGHELP
5082-LPTOP_LEVEL_EXCEPTION_FILTER oldFilter;
5083-long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
5084-{
5085- // save config
5086- if( host.state != HOST_CRASHED )
5087- {
5088- // check to avoid recursive call
5089- host.crashed = true;
5090-
5091-#ifdef DBGHELP
5092- stack_trace( pInfo );
5093-#else
5094- Sys_Warn( "Sys_Crash: call %p at address %p", pInfo->ExceptionRecord->ExceptionAddress, pInfo->ExceptionRecord->ExceptionCode );
5095-#endif
5096-
5097- if( host.type == HOST_NORMAL )
5098- CL_Crashed(); // tell client about crash
5099- else host.state = HOST_CRASHED;
5100-
5101- if( host.developer <= 0 )
5102- {
5103- // no reason to call debugger in release build - just exit
5104- Sys_Quit();
5105- return EXCEPTION_CONTINUE_EXECUTION;
5106- }
5107-
5108- // all other states keep unchanged to let debugger find bug
5109- Sys_DestroyConsole();
5110- }
5111-
5112- if( oldFilter )
5113- return oldFilter( pInfo );
5114- return EXCEPTION_CONTINUE_EXECUTION;
5115-}
5116-
5117-void Sys_SetupCrashHandler( void )
5118-{
5119- SetErrorMode( SEM_FAILCRITICALERRORS ); // no abort/retry/fail errors
5120- oldFilter = SetUnhandledExceptionFilter( Sys_Crash );
5121- host.hInst = GetModuleHandle( NULL );
5122-}
5123-
5124-void Sys_RestoreCrashHandler( void )
5125-{
5126- // restore filter
5127- if( oldFilter ) SetUnhandledExceptionFilter( oldFilter );
5128-}
5129-
5130-#elif defined (CRASHHANDLER)
5131-// Posix signal handler
5132-#include "library.h"
5133-#if defined(__FreeBSD__) || defined(__NetBSD__)
5134-#define HAVE_UCONTEXT_H 1
5135-#endif
5136-
5137-#ifdef HAVE_UCONTEXT_H
5138-#include <ucontext.h>
5139-#endif
5140-#include <sys/mman.h>
5141-
5142-int printframe( char *buf, int len, int i, void *addr )
5143-{
5144- Dl_info dlinfo;
5145- if( len <= 0 ) return 0; // overflow
5146- if( dladdr( addr, &dlinfo ))
5147- {
5148- if( dlinfo.dli_sname )
5149- return snprintf( buf, len, "% 2d: %p <%s+%lu> (%s)\n", i, addr, dlinfo.dli_sname,
5150- (unsigned long)addr - (unsigned long)dlinfo.dli_saddr, dlinfo.dli_fname ); // print symbol, module and address
5151- else
5152- return snprintf( buf, len, "% 2d: %p (%s)\n", i, addr, dlinfo.dli_fname ); // print module and address
5153- }
5154- else
5155- return snprintf( buf, len, "% 2d: %p\n", i, addr ); // print only address
5156-}
5157-
5158-struct sigaction oldFilter;
5159-
5160-static void Sys_Crash( int signal, siginfo_t *si, void *context)
5161-{
5162- void *trace[32];
5163- char message[4096], stackframe[256];
5164- int len, stacklen, logfd, i = 0;
5165-#if defined(__OpenBSD__)
5166- struct sigcontext *ucontext = (struct sigcontext*)context;
5167-#else
5168- ucontext_t *ucontext = (ucontext_t*)context;
5169-#endif
5170-#if defined(__amd64__)
5171- #if defined(__FreeBSD__)
5172- void *pc = (void*)ucontext->uc_mcontext.mc_rip, **bp = (void**)ucontext->uc_mcontext.mc_rbp, **sp = (void**)ucontext->uc_mcontext.mc_rsp;
5173- #elif defined(__NetBSD__)
5174- void *pc = (void*)ucontext->uc_mcontext.__gregs[REG_RIP], **bp = (void**)ucontext->uc_mcontext.__gregs[REG_RBP], **sp = (void**)ucontext->uc_mcontext.__gregs[REG_RSP];
5175- #elif defined(__OpenBSD__)
5176- void *pc = (void*)ucontext->sc_rip, **bp = (void**)ucontext->sc_rbp, **sp = (void**)ucontext->sc_rsp;
5177- #else
5178- void *pc = (void*)ucontext->uc_mcontext.gregs[REG_RIP], **bp = (void**)ucontext->uc_mcontext.gregs[REG_RBP], **sp = (void**)ucontext->uc_mcontext.gregs[REG_RSP];
5179- #endif
5180-#elif defined(__i386__)
5181- #if defined(__FreeBSD__)
5182- void *pc = (void*)ucontext->uc_mcontext.mc_eip, **bp = (void**)ucontext->uc_mcontext.mc_ebp, **sp = (void**)ucontext->uc_mcontext.mc_esp;
5183- #elif defined(__NetBSD__)
5184- void *pc = (void*)ucontext->uc_mcontext.__gregs[REG_EIP], **bp = (void**)ucontext->uc_mcontext.__gregs[REG_EBP], **sp = (void**)ucontext->uc_mcontext.__gregs[REG_ESP];
5185- #elif defined(__OpenBSD__)
5186- void *pc = (void*)ucontext->sc_eip, **bp = (void**)ucontext->sc_ebp, **sp = (void**)ucontext->sc_esp;
5187- #else
5188- void *pc = (void*)ucontext->uc_mcontext.gregs[REG_EIP], **bp = (void**)ucontext->uc_mcontext.gregs[REG_EBP], **sp = (void**)ucontext->uc_mcontext.gregs[REG_ESP];
5189- #endif
5190-#elif defined(__arm__) // arm not tested
5191- void *pc = (void*)ucontext->uc_mcontext.arm_pc, **bp = (void*)ucontext->uc_mcontext.arm_r10, **sp = (void*)ucontext->uc_mcontext.arm_sp;
5192-#endif
5193- // Safe actions first, stack and memory may be corrupted
5194- #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
5195- len = snprintf( message, 4096, "Sys_Crash: signal %d, err %d with code %d at %p\n", signal, si->si_errno, si->si_code, si->si_addr );
5196- #else
5197- len = snprintf( message, 4096, "Sys_Crash: signal %d, err %d with code %d at %p %p\n", signal, si->si_errno, si->si_code, si->si_addr, si->si_ptr );
5198- #endif
5199- write(2, message, len);
5200- // Flush buffers before writing directly to descriptors
5201- fflush( stdout );
5202- fflush( stderr );
5203- // Now get log fd and write trace directly to log
5204- logfd = Sys_LogFileNo();
5205- write( logfd, message, len );
5206- write( 2, "Stack backtrace:\n", 17 );
5207- write( logfd, "Stack backtrace:\n", 17 );
5208- strncpy(message + len, "Stack backtrace:\n", 4096 - len);
5209- len += 17;
5210- size_t pagesize = sysconf(_SC_PAGESIZE);
5211- do
5212- {
5213- int line = printframe( message + len, 4096 - len, ++i, pc);
5214- write( 2, message + len, line );
5215- write( logfd, message + len, line );
5216- len += line;
5217- //if( !dladdr(bp,0) ) break; // Only when bp is in module
5218- if( ( mprotect((char *)(((int) bp + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ | PROT_WRITE | PROT_EXEC ) == -1) &&
5219- ( mprotect((char *)(((int) bp + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ | PROT_EXEC ) == -1) &&
5220- ( mprotect((char *)(((int) bp + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ | PROT_WRITE ) == -1) &&
5221- ( mprotect((char *)(((int) bp + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ ) == -1) )
5222- break;
5223- if( ( mprotect((char *)(((int) bp[0] + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ | PROT_WRITE | PROT_EXEC ) == -1) &&
5224- ( mprotect((char *)(((int) bp[0] + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ | PROT_EXEC ) == -1) &&
5225- ( mprotect((char *)(((int) bp[0] + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ | PROT_WRITE ) == -1) &&
5226- ( mprotect((char *)(((int) bp[0] + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ ) == -1) )
5227- break;
5228- pc = bp[1];
5229- bp = (void**)bp[0];
5230- }
5231- while( bp && i < 128 );
5232- // Try to print stack
5233- write( 2, "Stack dump:\n", 12 );
5234- write( logfd, "Stack dump:\n", 12 );
5235- strncpy( message + len, "Stack dump:\n", 4096 - len );
5236-
5237- len += 12;
5238- if( ( mprotect((char *)(((int) sp + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ | PROT_WRITE | PROT_EXEC ) != -1) ||
5239- ( mprotect((char *)(((int) sp + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ | PROT_EXEC ) != -1) ||
5240- ( mprotect((char *)(((int) sp + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ | PROT_WRITE ) != -1) ||
5241- ( mprotect((char *)(((int) sp + (pagesize-1)) & ~(pagesize-1)), pagesize, PROT_READ ) != -1) )
5242- for( i = 0; i < 32; i++ )
5243- {
5244- int line = printframe( message + len, 4096 - len, i, sp[i] );
5245- write( 2, message + len, line );
5246- write( logfd, message + len, line );
5247- len += line;
5248- }
5249- // Put MessageBox as Sys_Error
5250- Msg( "%s\n", message );
5251-#ifdef XASH_SDL
5252- SDL_SetWindowGrab( host.hWnd, SDL_FALSE );
5253-#endif
5254- MSGBOX( message );
5255-
5256- // Log saved, now we can try to save configs and close log correctly, it may crash
5257- if( host.type == HOST_NORMAL )
5258- CL_Crashed();
5259- host.state = HOST_CRASHED;
5260- host.crashed = true;
5261-
5262- Sys_Quit();
5263-}
5264-
5265-void Sys_SetupCrashHandler( void )
5266-{
5267- struct sigaction act;
5268- act.sa_sigaction = Sys_Crash;
5269- act.sa_flags = SA_SIGINFO | SA_ONSTACK;
5270- sigaction(SIGSEGV, &act, &oldFilter);
5271- sigaction(SIGABRT, &act, &oldFilter);
5272- sigaction(SIGBUS, &act, &oldFilter);
5273- sigaction(SIGILL, &act, &oldFilter);
5274-}
5275-
5276-void Sys_RestoreCrashHandler( void )
5277-{
5278- sigaction( SIGSEGV, &oldFilter, NULL );
5279- sigaction( SIGABRT, &oldFilter, NULL );
5280- sigaction( SIGBUS, &oldFilter, NULL );
5281- sigaction( SIGILL, &oldFilter, NULL );
5282-}
5283-
5284-#else
5285-void Sys_SetupCrashHandler( void )
5286-{
5287- // stub
5288-}
5289-
5290-void Sys_RestoreCrashHandler( void )
5291-{
5292- // stub
5293-}
5294-#endif
5295diff --git a/engine/common/crclib.c b/engine/common/crclib.c
5296index e86853f..dfc211b 100644
5297--- a/engine/common/crclib.c
5298+++ b/engine/common/crclib.c
5299@@ -436,7 +436,7 @@ void MD5Final( byte digest[16], MD5Context_t *ctx )
5300
5301 MD5Transform( ctx->buf, (uint *)ctx->in );
5302 Q_memcpy( digest, ctx->buf, 16 );
5303- Q_memset( ctx, 0, sizeof( *ctx )); // in case it's sensitive
5304+ Q_memset( ctx, 0, sizeof( ctx )); // in case it's sensitive
5305 }
5306
5307 // The four core functions
5308diff --git a/engine/common/crtlib_inline.h b/engine/common/crtlib_inline.h
5309index b448e03..a64ed6c 100644
5310--- a/engine/common/crtlib_inline.h
5311+++ b/engine/common/crtlib_inline.h
5312@@ -8,11 +8,6 @@
5313
5314 #ifndef XASH_SKIPCRTLIB
5315 #ifdef XASH_FASTSTR
5316-
5317-// align checks
5318-#define ALIGNOF(x) ( ( unsigned long int )(x) & ( sizeof( int ) - 1) )
5319-#define IS_UNALIGNED(x) (ALIGNOF(x) != 0)
5320-#define HAS_NULL(x) ( ( ( x - lomagic ) & himagic ) != 0 )
5321 xash_force_inline int Q_strlen( const char *string )
5322 {
5323 register const char *pchr = string;
5324diff --git a/engine/common/cvar.c b/engine/common/cvar.c
5325index 0f4179f..73c6542 100644
5326--- a/engine/common/cvar.c
5327+++ b/engine/common/cvar.c
5328@@ -14,9 +14,6 @@ GNU General Public License for more details.
5329 */
5330
5331 #include "common.h"
5332-#include "base_cmd.h"
5333-
5334-#define HASH_SIZE 256
5335
5336 convar_t *cvar_vars; // head of list
5337 convar_t *userinfo, *physinfo, *serverinfo, *renderinfo;
5338@@ -63,9 +60,6 @@ Cvar_FindVar
5339 */
5340 convar_t *Cvar_FindVar( const char *var_name )
5341 {
5342-#if defined(XASH_HASHED_VARS)
5343- return (convar_t *)BaseCmd_Find( HM_CVAR, var_name );
5344-#else
5345 convar_t *var;
5346
5347 for( var = cvar_vars; var; var = var->next )
5348@@ -73,8 +67,6 @@ convar_t *Cvar_FindVar( const char *var_name )
5349 if( !Q_stricmp( var_name, var->name ))
5350 return var;
5351 }
5352-#endif
5353-
5354 return NULL;
5355 }
5356
5357@@ -171,8 +163,7 @@ The flags will be or'ed in if the variable exists.
5358 */
5359 convar_t *Cvar_Get( const char *var_name, const char *var_value, int flags, const char *var_desc )
5360 {
5361- convar_t *cvar;
5362- convar_t *current, *next;
5363+ convar_t *current, *next, *cvar;
5364
5365 ASSERT( var_name != NULL );
5366
5367@@ -250,7 +241,7 @@ convar_t *Cvar_Get( const char *var_name, const char *var_value, int flags, cons
5368 }
5369
5370 // allocate a new cvar
5371- cvar = Z_Malloc( sizeof( convar_t ));
5372+ cvar = Z_Malloc( sizeof( *cvar ));
5373 cvar->name = copystring( var_name );
5374 cvar->string = copystring( var_value );
5375 cvar->reset_string = copystring( var_value );
5376@@ -261,20 +252,15 @@ convar_t *Cvar_Get( const char *var_name, const char *var_value, int flags, cons
5377 cvar->flags = flags;
5378
5379 // link the variable in alphanumerical order
5380- for( current = NULL, next = cvar_vars ; next && Q_strcmp( next->name, cvar->name ) < 0 ; current = next, next = next->next );
5381-
5382- if( current )
5383+ for( current = NULL, next = cvar_vars ; next && Q_strcmp( next->name, cvar->name ) < 0 ; current = next, next = next->next )
5384+ ;
5385+ if( current ) {
5386 current->next = cvar;
5387- else
5388+ } else {
5389 cvar_vars = cvar;
5390-
5391+ }
5392 cvar->next = next;
5393
5394-#if defined(XASH_HASHED_VARS)
5395- // add to map
5396- BaseCmd_Insert( HM_CVAR, cvar, cvar->name );
5397-#endif
5398-
5399 return cvar;
5400 }
5401
5402@@ -315,14 +301,11 @@ void Cvar_RegisterVariable( cvar_t *var )
5403 else
5404 {
5405 // otherwise find it somewhere in the list
5406- for( current = cvar_vars; current->next != cvar; current = current->next );
5407-
5408+ for( current = cvar_vars; current->next != cvar; current = current->next )
5409+ ;
5410 current->next = (convar_t *)var;
5411 }
5412
5413-#if defined(XASH_HASHED_VARS)
5414- BaseCmd_Replace( HM_CVAR, var, var->name );
5415-#endif
5416 // release current cvar (but keep string)
5417 Z_Free( cvar->name );
5418 Z_Free( cvar->latched_string );
5419@@ -343,22 +326,14 @@ void Cvar_RegisterVariable( cvar_t *var )
5420 var->flags |= CVAR_EXTDLL; // all cvars passed this function are game cvars
5421
5422 // link the variable in alphanumerical order
5423- for( current = NULL, next = cvar_vars ; next && Q_strcmp( next->name, var->name ) < 0 ; current = next, next = next->next );
5424-
5425- if( current )
5426+ for( current = NULL, next = cvar_vars ; next && Q_strcmp( next->name, var->name ) < 0 ; current = next, next = next->next )
5427+ ;
5428+ if( current ) {
5429 current->next = (convar_t *)var;
5430- else
5431+ } else {
5432 cvar_vars = (convar_t *)var;
5433-
5434+ }
5435 var->next = (cvar_t *)next;
5436-
5437- // add to bucket
5438- // we got a cvar_t from gamedll, where we have no left to chain in bucket
5439- // so disable it
5440-
5441-#if defined(XASH_HASHED_VARS)
5442- BaseCmd_Insert( HM_CVAR, var, var->name );
5443-#endif
5444 }
5445 }
5446
5447@@ -1150,10 +1125,6 @@ void Cvar_Restart_f( void )
5448 // throw out any variables the user created
5449 if( var->flags & CVAR_USER_CREATED )
5450 {
5451-#if defined(XASH_HASHED_VARS)
5452- BaseCmd_Remove( HM_CVAR, var, var->name );
5453-#endif
5454-
5455 *prev = var->next;
5456 Z_Free( var->name );
5457 Z_Free( var->string );
5458@@ -1278,9 +1248,6 @@ void Cvar_Unlink_f( void )
5459 }
5460
5461 // throw out any variables the game created
5462-#if defined(XASH_HASHED_VARS)
5463- BaseCmd_Remove( HM_CVAR, var, var->name );
5464-#endif
5465 *prev = var->next;
5466 Z_Free( var->string );
5467 }
5468@@ -1314,10 +1281,6 @@ void Cvar_Unlink( void )
5469 }
5470
5471 // throw out any variables the game created
5472-#if defined(XASH_HASHED_VARS)
5473- BaseCmd_Remove( HM_CVAR, var, var->name );
5474-#endif
5475-
5476 *prev = var->next;
5477 Z_Free( var->name );
5478 Z_Free( var->string );
5479diff --git a/engine/common/filesystem.c b/engine/common/filesystem.c
5480index d9cdf03..432389a 100644
5481--- a/engine/common/filesystem.c
5482+++ b/engine/common/filesystem.c
5483@@ -2128,7 +2128,7 @@ searchpath_t *FS_FindFile( const char *name, int* index, qboolean gamedironly )
5484 // search through the path, one element at a time
5485 for( search = fs_searchpaths; search; search = search->next )
5486 {
5487- if( gamedironly && !( search->flags & ( FS_GAMEDIR_PATH | FS_CUSTOM_PATH )))
5488+ if( gamedironly & !( search->flags & ( FS_GAMEDIR_PATH | FS_CUSTOM_PATH )))
5489 continue;
5490
5491 // is the element a pak file?
5492@@ -3560,7 +3560,7 @@ static qboolean W_ReadLumpTable( wfile_t *wad )
5493 return true;
5494 }
5495
5496-byte *W_ReadLump( wfile_t *wad, dlumpinfo_t *lump, fs_offset_t *lumpsizeptr )
5497+byte *W_ReadLump( wfile_t *wad, dlumpinfo_t *lump, size_t *lumpsizeptr )
5498 {
5499 byte *buf;
5500 size_t size = 0;
5501@@ -3766,6 +3766,6 @@ static byte *W_LoadFile( const char *path, fs_offset_t *lumpsizeptr, qboolean ga
5502
5503 search = FS_FindFile( path, &index, gamedironly );
5504 if( search && search->wad )
5505- return W_ReadLump( search->wad, &search->wad->lumps[index], lumpsizeptr );
5506+ return W_ReadLump( search->wad, &search->wad->lumps[index], (size_t *)lumpsizeptr );
5507 return NULL;
5508 }
5509diff --git a/engine/client/gamma.c b/engine/common/gamma.c
5510similarity index 96%
5511rename from engine/client/gamma.c
5512rename to engine/common/gamma.c
5513index 5ca1ce2..1fce655 100644
5514--- a/engine/client/gamma.c
5515+++ b/engine/common/gamma.c
5516@@ -54,7 +54,7 @@ byte TextureToTexGamma( byte b )
5517 if( glConfig.deviceSupportsGamma )
5518 return b; // passthrough
5519
5520- //b = bound( 0, b, 255 );
5521+ b = bound( 0, b, 255 );
5522 return texgammatable[b];
5523 }
5524
5525@@ -63,7 +63,7 @@ byte TextureToGamma( byte b )
5526 if( glConfig.deviceSupportsGamma )
5527 return b; // passthrough
5528
5529- //b = bound( 0, b, 255 );
5530+ b = bound( 0, b, 255 );
5531 return gammatable[b];
5532 }
5533 #endif
5534diff --git a/engine/common/host.c b/engine/common/host.c
5535index 7637f81..e3dd50b 100644
5536--- a/engine/common/host.c
5537+++ b/engine/common/host.c
5538@@ -32,10 +32,8 @@ GNU General Public License for more details.
5539 #include "touch.h"
5540 #include "engine_features.h"
5541 #include "render_api.h" // decallist_t
5542+#include "sdl/events.h"
5543 #include "library.h"
5544-#ifdef XASH_SDL
5545-#include "platform/sdl/events.h"
5546-#endif
5547
5548 typedef void (*pfnChangeGame)( const char *progname );
5549
5550@@ -303,23 +301,6 @@ void Host_Exec_f( void )
5551
5552 /*
5553 ===============
5554-Host_Clear_f
5555-
5556-Clear all consoles
5557-===============
5558-*/
5559-void Host_Clear_f( void )
5560-{
5561-#ifndef XASH_DEDICATED
5562- Con_Clear();
5563-#endif
5564-#ifdef XASH_W32CON
5565- Wcon_Clear();
5566-#endif
5567-}
5568-
5569-/*
5570-===============
5571 Host_MemStats_f
5572 ===============
5573 */
5574@@ -535,7 +516,7 @@ void Host_GetConsoleCommands( void )
5575 {
5576 char *cmd;
5577
5578- while( ( cmd = Sys_Input() ) )
5579+ while( ( cmd = Con_Input() ) )
5580 {
5581 Cbuf_AddText( cmd );
5582 Cbuf_Execute();
5583@@ -673,7 +654,19 @@ If no console is visible, the text will appear at the top of the game window
5584 */
5585 void Host_Print( const char *txt )
5586 {
5587- Rcon_Print( txt );
5588+ if( host.rd.target )
5589+ {
5590+ if(( Q_strlen( txt ) + Q_strlen( host.rd.buffer )) > ( host.rd.buffersize - 1 ))
5591+ {
5592+ if( host.rd.flush )
5593+ {
5594+ host.rd.flush( host.rd.address, host.rd.target, host.rd.buffer );
5595+ *host.rd.buffer = 0;
5596+ }
5597+ }
5598+ Q_strcat( host.rd.buffer, txt );
5599+ return;
5600+ }
5601 Con_Print( txt ); // echo to client console
5602 }
5603
5604@@ -920,8 +913,6 @@ void Host_InitCommon( int argc, const char** argv, const char *progname, qboolea
5605 else
5606 Sys_Error( "Changing working directory to %s failed.\n", host.rootdir );
5607
5608- Sys_InitLog();
5609-
5610 // set default gamedir
5611 if( progname[0] == '#' ) progname++;
5612 Q_strncpy( SI.ModuleName, progname, sizeof( SI.ModuleName ));
5613@@ -939,16 +930,11 @@ void Host_InitCommon( int argc, const char** argv, const char *progname, qboolea
5614 }
5615
5616 host.old_developer = host.developer;
5617-
5618-#ifdef XASH_W32CON
5619- Wcon_Init();
5620- Wcon_CreateConsole();
5621-#endif
5622-
5623- Cmd_AddCommand( "clear", Host_Clear_f, "clear console history" );
5624+ if( !Sys_CheckParm( "-nowcon" ) )
5625+ Con_CreateConsole();
5626
5627 // first text message into console or log
5628- MsgDev( D_NOTE, "Console initialized\n" );
5629+ MsgDev( D_NOTE, "Sys_LoadLibrary: Loading Engine Library - ok\n" );
5630
5631 // startup cmds and cvars subsystem
5632 Cmd_Init();
5633@@ -1071,9 +1057,7 @@ int EXPORT Host_Main( int argc, const char **argv, const char *progname, int bCh
5634 switch( host.type )
5635 {
5636 case HOST_NORMAL:
5637-#ifdef XASH_W32CON
5638- Wcon_ShowConsole( false ); // hide console
5639-#endif
5640+ Con_ShowConsole( false ); // hide console
5641 // execute startup config and cmdline
5642 Cbuf_AddText( va( "exec %s.rc\n", SI.ModuleName ) );
5643 CSCR_LoadDefaultCVars( "settings.scr" );
5644@@ -1093,6 +1077,7 @@ int EXPORT Host_Main( int argc, const char **argv, const char *progname, int bCh
5645 if( Host_IsDedicated() )
5646 {
5647 char *defaultmap;
5648+ Con_InitConsoleCommands ();
5649
5650 Cmd_AddCommand( "quit", Sys_Quit, "quit the game" );
5651 Cmd_AddCommand( "exit", Sys_Quit, "quit the game" );
5652@@ -1215,7 +1200,6 @@ void EXPORT Host_Shutdown( void )
5653 HTTP_Shutdown();
5654 Cmd_Shutdown();
5655 Host_FreeCommon();
5656- Sys_DestroyConsole();
5657- Sys_CloseLog();
5658+ Con_DestroyConsole();
5659 Sys_RestoreCrashHandler();
5660 }
5661diff --git a/engine/common/imagelib/img_utils.c b/engine/common/imagelib/img_utils.c
5662index 5c3d623..5a4c4d6 100644
5663--- a/engine/common/imagelib/img_utils.c
5664+++ b/engine/common/imagelib/img_utils.c
5665@@ -569,7 +569,7 @@ qboolean Image_Copy8bitRGBA( const byte *in, byte *out, int pixels )
5666 // check for color
5667 for( i = 0; i < 256; i++ )
5668 {
5669- col = (rgba_t *)&image.d_currentpal[i];
5670+ col = (rgba_t *)image.d_currentpal[i];
5671 if( col[0] != col[1] || col[1] != col[2] )
5672 {
5673 image.flags |= IMAGE_HAS_COLOR;
5674@@ -1116,7 +1116,7 @@ byte *Image_FloodInternal( const byte *indata, int inwidth, int inheight, int ou
5675 {
5676 if( x < inwidth )
5677 *out++ = *in++;
5678- else out++;
5679+ else *out++;
5680 }
5681 }
5682 }
5683diff --git a/engine/client/input.c b/engine/common/input.c
5684similarity index 100%
5685rename from engine/client/input.c
5686rename to engine/common/input.c
5687diff --git a/engine/client/input.h b/engine/common/input.h
5688similarity index 100%
5689rename from engine/client/input.h
5690rename to engine/common/input.h
5691diff --git a/engine/client/input_evdevkey.c b/engine/common/input_evdevkey.c
5692similarity index 100%
5693rename from engine/client/input_evdevkey.c
5694rename to engine/common/input_evdevkey.c
5695diff --git a/engine/common/joyinput.c b/engine/common/joyinput.c
5696index 51bb8c6..ae98408 100644
5697--- a/engine/common/joyinput.c
5698+++ b/engine/common/joyinput.c
5699@@ -20,12 +20,10 @@ GNU General Public License for more details.
5700 #include "input.h"
5701 #include "keydefs.h"
5702 #include "joyinput.h"
5703+#include "events.h"
5704 #include "client.h"
5705 #include "gl_local.h"
5706-
5707-#if defined(XASH_SDL)
5708-#include "platform/sdl/events.h"
5709-#endif
5710+//#include "SDL.h"
5711
5712 #ifndef SHRT_MAX
5713 #define SHRT_MAX 0x7FFF
5714diff --git a/engine/client/keys.c b/engine/common/keys.c
5715similarity index 99%
5716rename from engine/client/keys.c
5717rename to engine/common/keys.c
5718index 78eecec..9a975af 100644
5719--- a/engine/client/keys.c
5720+++ b/engine/common/keys.c
5721@@ -21,7 +21,7 @@ GNU General Public License for more details.
5722
5723 #ifdef XASH_SDL
5724 #include <SDL_keyboard.h>
5725-#include <platform/sdl/events.h>
5726+#include <events.h>
5727 #endif
5728
5729 typedef struct key_s
5730@@ -834,14 +834,12 @@ void CL_CharEvent( int key )
5731 #ifdef _WIN32
5732 if( key == '`' || key == '~' ) return;
5733
5734-#if 0
5735 if( cls.key_dest == key_console && !Con_Visible( ))
5736 {
5737 if((char)key == '�' || (char)key == '�' )
5738 return; // don't pass '�' when we open the console
5739 }
5740 #endif
5741-#endif
5742 // distribute the key down event to the apropriate handler
5743 if( cls.key_dest == key_console || cls.key_dest == key_message )
5744 {
5745diff --git a/engine/common/library.c b/engine/common/library.c
5746index 3ffccf3..c8b070a 100644
5747--- a/engine/common/library.c
5748+++ b/engine/common/library.c
5749@@ -1141,7 +1141,7 @@ void *Com_FunctionFromName(void *hInstance, const char *pName)
5750 if( !Q_strcmp( pName, hInst->names[i] ))
5751 {
5752 index = hInst->ordinals[i];
5753- return (void*)(hInst->funcs[index] + hInst->funcBase);
5754+ return hInst->funcs[index] + hInst->funcBase;
5755 }
5756 }
5757 // couldn't find the function name to return address
5758diff --git a/engine/common/mathlib.h b/engine/common/mathlib.h
5759index 23afe25..add99d5 100644
5760--- a/engine/common/mathlib.h
5761+++ b/engine/common/mathlib.h
5762@@ -101,10 +101,7 @@ GNU General Public License for more details.
5763 #define MakeRGBA( out, x, y, z, w ) Vector4Set( out, x, y, z, w )
5764 #define PlaneDist(point,plane) ((plane)->type < 3 ? (point)[(plane)->type] : DotProduct((point), (plane)->normal))
5765 #define PlaneDiff(point,plane) (((plane)->type < 3 ? (point)[(plane)->type] : DotProduct((point), (plane)->normal)) - (plane)->dist)
5766-#define boundmax( num, high ) ( (num) < (high) ? (num) : (high) )
5767-#define boundmin( num, low ) ( (num) >= (low) ? (num) : (low) )
5768-#define bound( low, num, high ) ( boundmin( boundmax(num, high), low ))
5769-//#define bound( min, num, max ) ((num) >= (min) ? ((num) < (max) ? (num) : (max)) : (min))
5770+#define bound( min, num, max ) ((num) >= (min) ? ((num) < (max) ? (num) : (max)) : (min))
5771
5772 float rsqrt( float number );
5773 float anglemod( const float a );
5774diff --git a/engine/common/model.c b/engine/common/model.c
5775index ec2b33c..722b220 100644
5776--- a/engine/common/model.c
5777+++ b/engine/common/model.c
5778@@ -540,9 +540,14 @@ void Mod_Init( void )
5779 {
5780 com_studiocache = Mem_AllocPool( "Studio Cache" );
5781 mod_studiocache = Cvar_Get( "r_studiocache", "1", CVAR_ARCHIVE, "enables studio cache for speedup tracing hitboxes" );
5782+<<<<<<< HEAD
5783 r_wadtextures = Cvar_Get( "r_wadtextures", "1", CVAR_ARCHIVE, "completely ignore textures in the wad-files if disabled" );
5784
5785+ if( host.type == HOST_NORMAL )
5786+=======
5787+
5788 if( !Host_IsDedicated() )
5789+>>>>>>> master
5790 mod_allow_materials = Cvar_Get( "host_allow_materials", "0", CVAR_LATCH|CVAR_ARCHIVE, "allow HD textures" );
5791 else mod_allow_materials = NULL; // no reason to load HD-textures for dedicated server
5792
5793@@ -2325,9 +2330,9 @@ static void Mod_LoadEntities( const dlump_t *l )
5794 else if( !Q_stricmp( keyname, "message" ))
5795 Q_strncpy( world.message, token, sizeof( world.message ));
5796 }
5797- }
5798 return; // all done
5799 }
5800+}
5801
5802 /*
5803 =================
5804diff --git a/engine/common/net_buffer.c b/engine/common/net_buffer.c
5805index dea28f9..56d7ce9 100644
5806--- a/engine/common/net_buffer.c
5807+++ b/engine/common/net_buffer.c
5808@@ -75,7 +75,7 @@ void BF_InitExt( sizebuf_t *bf, const char *pDebugName, void *pData, int nBytes,
5809 void BF_StartWriting( sizebuf_t *bf, void *pData, int nBytes, int iStartBit, int nBits )
5810 {
5811 // make sure it's dword aligned and padded.
5812- Assert(((size_t)pData & 3 ) == 0 );
5813+ Assert(((dword)pData & 3 ) == 0 );
5814
5815 bf->pData = (byte *)pData;
5816
5817diff --git a/engine/common/net_encode.c b/engine/common/net_encode.c
5818index 8217019..11cd27e 100644
5819--- a/engine/common/net_encode.c
5820+++ b/engine/common/net_encode.c
5821@@ -861,7 +861,7 @@ void Delta_Shutdown( void )
5822
5823 if( dt_info[i].pFields )
5824 {
5825- Mem_Free( dt_info[i].pFields );
5826+ Z_Free( dt_info[i].pFields );
5827 dt_info[i].pFields = NULL;
5828 }
5829
5830@@ -887,63 +887,63 @@ int Delta_ClampIntegerField( int iValue, qboolean bSigned, int bits )
5831 break;
5832 case 2:
5833 if( bSigned ) iValue = bound( -2, (short)iValue, 1 );
5834- else iValue = boundmax( (word)iValue, 3 );
5835+ else iValue = bound( 0, (word)iValue, 3 );
5836 break;
5837 case 3:
5838 if( bSigned ) iValue = bound( -4, (short)iValue, 3 );
5839- else iValue = boundmax( (word)iValue, 7 );
5840+ else iValue = bound( 0, (word)iValue, 7 );
5841 break;
5842 case 4:
5843 if( bSigned ) iValue = bound( -8, (short)iValue, 7 );
5844- else iValue = boundmax( (word)iValue, 15 );
5845+ else iValue = bound( 0, (word)iValue, 15 );
5846 break;
5847 case 5:
5848 if( bSigned ) iValue = bound( -16, (short)iValue, 15 );
5849- else iValue = boundmax( (word)iValue, 31 );
5850+ else iValue = bound( 0, (word)iValue, 31 );
5851 break;
5852 case 6:
5853 if( bSigned ) iValue = bound( -32, (short)iValue, 31 );
5854- else iValue = boundmax( (word)iValue, 63 );
5855+ else iValue = bound( 0, (word)iValue, 63 );
5856 break;
5857 case 7:
5858 if( bSigned ) iValue = bound( -64, (short)iValue, 63 );
5859- else iValue = boundmax( (word)iValue, 127 );
5860+ else iValue = bound( 0, (word)iValue, 127 );
5861 break;
5862 case 8:
5863 if( bSigned ) iValue = bound( -128, (short)iValue, 127 );
5864- else iValue = boundmax( (word)iValue, 255 );
5865+ else iValue = bound( 0, (word)iValue, 255 );
5866 break;
5867 case 9:
5868 if( bSigned ) iValue = bound( -256, (short)iValue, 255 );
5869- else iValue = boundmax( (word)iValue, 511 );
5870+ else iValue = bound( 0, (word)iValue, 511 );
5871 break;
5872 case 10:
5873 if( bSigned ) iValue = bound( -512, (short)iValue, 511 );
5874- else iValue = boundmax( (word)iValue, 1023 );
5875+ else iValue = bound( 0, (word)iValue, 1023 );
5876 break;
5877 case 11:
5878 if( bSigned ) iValue = bound( -1024, (short)iValue, 1023 );
5879- else iValue = boundmax( (word)iValue, 2047 );
5880+ else iValue = bound( 0, (word)iValue, 2047 );
5881 break;
5882 case 12:
5883 if( bSigned ) iValue = bound( -2048, (short)iValue, 2047 );
5884- else iValue = boundmax( (word)iValue, 4095 );
5885+ else iValue = bound( 0, (word)iValue, 4095 );
5886 break;
5887 case 13:
5888 if( bSigned ) iValue = bound( -4096, (short)iValue, 4095 );
5889- else iValue = boundmax( (word)iValue, 8191 );
5890+ else iValue = bound( 0, (word)iValue, 8191 );
5891 break;
5892 case 14:
5893 if( bSigned ) iValue = bound( -8192, (short)iValue, 8191 );
5894- else iValue = boundmax( (word)iValue, 16383 );
5895+ else iValue = bound( 0, (word)iValue, 16383 );
5896 break;
5897 case 15:
5898 if( bSigned ) iValue = bound( -16384, (short)iValue, 16383 );
5899- else iValue = boundmax( (word)iValue, 32767 );
5900+ else iValue = bound( 0, (word)iValue, 32767 );
5901 break;
5902 case 16:
5903 if( bSigned ) iValue = bound( -32768, (short)iValue, 32767 );
5904- else iValue = boundmax( (word)iValue, 65535 );
5905+ else iValue = bound( 0, (word)iValue, 65535 );
5906 break;
5907 }
5908
5909@@ -989,11 +989,8 @@ qboolean Delta_CompareField( delta_t *pField, void *from, void *to, float timeba
5910
5911 fromF = Delta_ClampIntegerField( fromF, bSigned, pField->bits );
5912 toF = Delta_ClampIntegerField( toF, bSigned, pField->bits );
5913- if( pField->multiplier != 1.0f )
5914- {
5915- fromF *= pField->multiplier;
5916- toF *= pField->multiplier;
5917- }
5918+ if ( pField->multiplier != 1.0f ) fromF *= pField->multiplier;
5919+ if ( pField->multiplier != 1.0f ) toF *= pField->multiplier;
5920 }
5921 else if( pField->flags & DT_SHORT )
5922 {
5923@@ -1010,11 +1007,8 @@ qboolean Delta_CompareField( delta_t *pField, void *from, void *to, float timeba
5924
5925 fromF = Delta_ClampIntegerField( fromF, bSigned, pField->bits );
5926 toF = Delta_ClampIntegerField( toF, bSigned, pField->bits );
5927- if( pField->multiplier != 1.0f )
5928- {
5929- fromF *= pField->multiplier;
5930- toF *= pField->multiplier;
5931- }
5932+ if ( pField->multiplier != 1.0f ) fromF *= pField->multiplier;
5933+ if ( pField->multiplier != 1.0f ) toF *= pField->multiplier;
5934 }
5935 else if( pField->flags & DT_INTEGER )
5936 {
5937@@ -1031,11 +1025,8 @@ qboolean Delta_CompareField( delta_t *pField, void *from, void *to, float timeba
5938
5939 fromF = Delta_ClampIntegerField( fromF, bSigned, pField->bits );
5940 toF = Delta_ClampIntegerField( toF, bSigned, pField->bits );
5941- if( pField->multiplier != 1.0f )
5942- {
5943- fromF *= pField->multiplier;
5944- toF *= pField->multiplier;
5945- }
5946+ if ( pField->multiplier != 1.0f ) fromF *= pField->multiplier;
5947+ if ( pField->multiplier != 1.0f ) toF *= pField->multiplier;
5948 }
5949 else if( pField->flags & ( DT_FLOAT|DT_ANGLE ))
5950 {
5951diff --git a/engine/common/pm_trace.c b/engine/common/pm_trace.c
5952index e99f350..270a722 100644
5953--- a/engine/common/pm_trace.c
5954+++ b/engine/common/pm_trace.c
5955@@ -161,9 +161,6 @@ hull_t *PM_HullForStudio( physent_t *pe, playermove_t *pmove, int *numhitboxes )
5956 VectorSubtract( pmove->player_maxs[pmove->usehull], pmove->player_mins[pmove->usehull], size );
5957 VectorScale( size, 0.5f, size );
5958
5959- if( pe->player )
5960- return PM_HullForBox( pe->mins, pe->maxs );
5961-
5962 return Mod_HullForStudio( pe->studiomodel, pe->frame, pe->sequence, pe->angles, pe->origin, size, pe->controller, pe->blending, numhitboxes, NULL );
5963 }
5964 /* "Not a number" possible here.
5965@@ -420,7 +417,7 @@ pmtrace_t PM_PlayerTraceExt( playermove_t *pmove, vec3_t start, vec3_t end, int
5966 if( transform_bbox )
5967 {
5968 World_TransformAABB( matrix, pmove->player_mins[pmove->usehull], pmove->player_maxs[pmove->usehull], mins, maxs );
5969- VectorSubtract( hull[0].clip_mins, mins, offset ); // calc new local offset
5970+ VectorSubtract( hull->clip_mins, mins, offset ); // calc new local offset
5971
5972 for( j = 0; j < 3; j++ )
5973 {
5974@@ -460,7 +457,7 @@ pmtrace_t PM_PlayerTraceExt( playermove_t *pmove, vec3_t start, vec3_t end, int
5975 }
5976 else if( hullcount == 1 )
5977 {
5978- PM_RecursiveHullCheck( hull, hull[0].firstclipnode, 0, 1, start_l, end_l, &trace_bbox );
5979+ PM_RecursiveHullCheck( hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace_bbox );
5980 }
5981 else
5982 {
5983@@ -595,7 +592,7 @@ int PM_TestPlayerPosition( playermove_t *pmove, vec3_t pos, pmtrace_t *ptrace, p
5984 if( transform_bbox )
5985 {
5986 World_TransformAABB( matrix, pmove->player_mins[pmove->usehull], pmove->player_maxs[pmove->usehull], mins, maxs );
5987- VectorSubtract( hull[0].clip_mins, mins, offset ); // calc new local offset
5988+ VectorSubtract( hull->clip_mins, mins, offset ); // calc new local offset
5989
5990 for( j = 0; j < 3; j++ )
5991 {
5992@@ -630,7 +627,7 @@ int PM_TestPlayerPosition( playermove_t *pmove, vec3_t pos, pmtrace_t *ptrace, p
5993 }
5994 else if( hullcount == 1 )
5995 {
5996- if( PM_HullPointContents( hull, hull[0].firstclipnode, pos_l ) == CONTENTS_SOLID )
5997+ if( PM_HullPointContents( hull, hull->firstclipnode, pos_l ) == CONTENTS_SOLID )
5998 return i;
5999 }
6000 else
6001diff --git a/engine/platform/sdl/events.c b/engine/common/sdl/events.c
6002similarity index 100%
6003rename from engine/platform/sdl/events.c
6004rename to engine/common/sdl/events.c
6005diff --git a/engine/platform/sdl/events.h b/engine/common/sdl/events.h
6006similarity index 100%
6007rename from engine/platform/sdl/events.h
6008rename to engine/common/sdl/events.h
6009diff --git a/engine/common/sys_con.c b/engine/common/sys_con.c
6010index f9efba8..4251b6d 100644
6011--- a/engine/common/sys_con.c
6012+++ b/engine/common/sys_con.c
6013@@ -1,5 +1,5 @@
6014 /*
6015-sys_con.c - stdout and log
6016+sys_con.c - win32 dedicated and developer console
6017 Copyright (C) 2007 Uncle Mike
6018
6019 This program is free software: you can redistribute it and/or modify
6020@@ -14,15 +14,71 @@ GNU General Public License for more details.
6021 */
6022
6023 #include "common.h"
6024+#ifdef XASH_SDL
6025+#include <SDL_mutex.h>
6026+#endif
6027 #ifdef __ANDROID__
6028 #include <android/log.h>
6029 #endif
6030
6031 #ifdef USE_SELECT
6032 // non-blocking console input
6033+#ifdef _WIN32
6034+#include "winsock2.h"
6035+#else
6036 #include <sys/select.h>
6037 #endif
6038+#endif
6039+/*
6040+===============================================================================
6041+
6042+WIN32 CONSOLE
6043+
6044+===============================================================================
6045+*/
6046+
6047+#if defined(_WIN32) && !defined(__amd64__)
6048+#define WINCON
6049+#endif
6050
6051+// console defines
6052+#define SUBMIT_ID 1 // "submit" button
6053+#define QUIT_ON_ESCAPE_ID 2 // escape event
6054+#define EDIT_ID 110
6055+#define INPUT_ID 109
6056+#define IDI_ICON1 101
6057+
6058+#define SYSCONSOLE "XashConsole"
6059+#define COMMAND_HISTORY 64 // system console keep more commands than game console
6060+#ifdef WINCON
6061+typedef struct
6062+{
6063+
6064+ char title[64];
6065+
6066+ HWND hWnd;
6067+ HWND hwndBuffer;
6068+ HWND hwndButtonSubmit;
6069+ HBRUSH hbrEditBackground;
6070+ HFONT hfBufferFont;
6071+ HWND hwndInputLine;
6072+ WNDPROC SysInputLineWndProc;
6073+
6074+ string consoleText;
6075+ string returnedText;
6076+ string historyLines[COMMAND_HISTORY];
6077+ int nextHistoryLine;
6078+ int historyLine;
6079+ int status;
6080+ int windowWidth, windowHeight;
6081+ size_t outLen;
6082+ // log stuff
6083+
6084+
6085+} WinConData;
6086+
6087+static WinConData s_wcd;
6088+#endif
6089 typedef struct {
6090 char title[64];
6091 qboolean log_active;
6092@@ -33,7 +89,407 @@ typedef struct {
6093
6094 static LogData s_ld;
6095
6096-char *Sys_Input( void )
6097+void Con_ShowConsole( qboolean show )
6098+{
6099+#ifdef WINCON
6100+ if( !s_wcd.hWnd || show == s_wcd.status )
6101+ return;
6102+
6103+ s_wcd.status = show;
6104+ if( show )
6105+ {
6106+ ShowWindow( s_wcd.hWnd, SW_SHOWNORMAL );
6107+ SendMessage( s_wcd.hwndBuffer, EM_LINESCROLL, 0, 0xffff );
6108+ }
6109+ else ShowWindow( s_wcd.hWnd, SW_HIDE );
6110+#endif
6111+}
6112+
6113+void Con_DisableInput( void )
6114+{
6115+#ifdef WINCON
6116+ if( host.type != HOST_DEDICATED ) return;
6117+ SendMessage( s_wcd.hwndButtonSubmit, WM_ENABLE, 0, 0 );
6118+ SendMessage( s_wcd.hwndInputLine, WM_ENABLE, 0, 0 );
6119+#endif
6120+}
6121+#ifdef WINCON
6122+void Con_SetInputText( const char *inputText )
6123+{
6124+ if( host.type != HOST_DEDICATED ) return;
6125+ SetWindowText( s_wcd.hwndInputLine, inputText );
6126+ SendMessage( s_wcd.hwndInputLine, EM_SETSEL, Q_strlen( inputText ), -1 );
6127+}
6128+
6129+static void Con_Clear_f( void )
6130+{
6131+ if( host.type != HOST_DEDICATED ) return;
6132+ SendMessage( s_wcd.hwndBuffer, EM_SETSEL, 0, -1 );
6133+ SendMessage( s_wcd.hwndBuffer, EM_REPLACESEL, FALSE, (LPARAM)"" );
6134+ UpdateWindow( s_wcd.hwndBuffer );
6135+}
6136+
6137+static int Con_KeyEvent( int key, qboolean down )
6138+{
6139+ char inputBuffer[1024];
6140+
6141+ if( !down )
6142+ return 0;
6143+
6144+ switch( key )
6145+ {
6146+ case VK_TAB:
6147+ GetWindowText( s_wcd.hwndInputLine, inputBuffer, sizeof( inputBuffer ));
6148+ Cmd_AutoComplete( inputBuffer );
6149+ Con_SetInputText( inputBuffer );
6150+ return 1;
6151+ case VK_DOWN:
6152+ if( s_wcd.historyLine == s_wcd.nextHistoryLine )
6153+ return 0;
6154+ s_wcd.historyLine++;
6155+ Con_SetInputText( s_wcd.historyLines[s_wcd.historyLine % COMMAND_HISTORY] );
6156+ return 1;
6157+ case VK_UP:
6158+ if( s_wcd.nextHistoryLine - s_wcd.historyLine < COMMAND_HISTORY && s_wcd.historyLine > 0 )
6159+ s_wcd.historyLine--;
6160+ Con_SetInputText( s_wcd.historyLines[s_wcd.historyLine % COMMAND_HISTORY] );
6161+ return 1;
6162+ }
6163+ return 0;
6164+}
6165+
6166+static long _stdcall Con_WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
6167+{
6168+ switch( uMsg )
6169+ {
6170+ case WM_ACTIVATE:
6171+ if( LOWORD( wParam ) != WA_INACTIVE )
6172+ SetFocus( s_wcd.hwndInputLine );
6173+ break;
6174+ case WM_CLOSE:
6175+ if( host.state == HOST_ERR_FATAL )
6176+ {
6177+ // send windows message
6178+ PostQuitMessage( 0 );
6179+ }
6180+ else Sys_Quit(); // otherwise
6181+ return 0;
6182+ case WM_CTLCOLORSTATIC:
6183+ if((HWND)lParam == s_wcd.hwndBuffer )
6184+ {
6185+ SetBkColor((HDC)wParam, RGB( 0x90, 0x90, 0x90 ));
6186+ SetTextColor((HDC)wParam, RGB( 0xff, 0xff, 0xff ));
6187+ return (long)s_wcd.hbrEditBackground;
6188+ }
6189+ break;
6190+ case WM_COMMAND:
6191+ if( wParam == SUBMIT_ID )
6192+ {
6193+ SendMessage( s_wcd.hwndInputLine, WM_CHAR, 13, 0L );
6194+ SetFocus( s_wcd.hwndInputLine );
6195+ }
6196+ break;
6197+ case WM_HOTKEY:
6198+ switch( LOWORD( wParam ))
6199+ {
6200+ case QUIT_ON_ESCAPE_ID:
6201+ PostQuitMessage( 0 );
6202+ break;
6203+ }
6204+ break;
6205+ case WM_CREATE:
6206+ s_wcd.hbrEditBackground = CreateSolidBrush( RGB( 0x90, 0x90, 0x90 ));
6207+ break;
6208+ }
6209+ return DefWindowProc( hWnd, uMsg, wParam, lParam );
6210+}
6211+
6212+long _stdcall Con_InputLineProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
6213+{
6214+ char inputBuffer[1024];
6215+
6216+ switch( uMsg )
6217+ {
6218+ case WM_KILLFOCUS:
6219+ if(( HWND )wParam == s_wcd.hWnd )
6220+ {
6221+ SetFocus( hWnd );
6222+ return 0;
6223+ }
6224+ break;
6225+ case WM_SYSKEYDOWN:
6226+ case WM_KEYDOWN:
6227+ if( Con_KeyEvent( LOWORD( wParam ), true ))
6228+ return 0;
6229+ break;
6230+ case WM_SYSKEYUP:
6231+ case WM_KEYUP:
6232+ if( Con_KeyEvent( LOWORD( wParam ), false ))
6233+ return 0;
6234+ break;
6235+ case WM_CHAR:
6236+ if( Con_KeyEvent( wParam, true ))
6237+ return 0;
6238+ if( wParam == 13 && host.state != HOST_ERR_FATAL )
6239+ {
6240+ GetWindowText( s_wcd.hwndInputLine, inputBuffer, sizeof( inputBuffer ));
6241+ Q_strncat( s_wcd.consoleText, inputBuffer, sizeof( s_wcd.consoleText ) - Q_strlen( s_wcd.consoleText ) - 5 );
6242+ Q_strcat( s_wcd.consoleText, "\n" );
6243+ SetWindowText( s_wcd.hwndInputLine, "" );
6244+ Msg( ">%s\n", inputBuffer );
6245+
6246+ // copy line to history buffer
6247+ Q_strncpy( s_wcd.historyLines[s_wcd.nextHistoryLine % COMMAND_HISTORY], inputBuffer, MAX_STRING );
6248+ s_wcd.nextHistoryLine++;
6249+ s_wcd.historyLine = s_wcd.nextHistoryLine;
6250+ return 0;
6251+ }
6252+ break;
6253+ }
6254+ return CallWindowProc( s_wcd.SysInputLineWndProc, hWnd, uMsg, wParam, lParam );
6255+}
6256+#endif
6257+
6258+/*
6259+===============================================================================
6260+
6261+WIN32 IO
6262+
6263+===============================================================================
6264+*/
6265+/*
6266+================
6267+Con_WinPrint
6268+
6269+print into window console
6270+================
6271+*/
6272+void Con_WinPrint( const char *pMsg )
6273+{
6274+#ifdef WINCON
6275+ size_t len = Q_strlen( pMsg );
6276+
6277+ // replace selection instead of appending if we're overflowing
6278+ s_wcd.outLen += len;
6279+ if( s_wcd.outLen >= 0x7fff )
6280+ {
6281+ SendMessage( s_wcd.hwndBuffer, EM_SETSEL, 0, -1 );
6282+ s_wcd.outLen = len;
6283+ }
6284+
6285+ SendMessage( s_wcd.hwndBuffer, EM_REPLACESEL, 0, (LPARAM)pMsg );
6286+
6287+ // put this text into the windows console
6288+ SendMessage( s_wcd.hwndBuffer, EM_LINESCROLL, 0, 0xffff );
6289+ SendMessage( s_wcd.hwndBuffer, EM_SCROLLCARET, 0, 0 );
6290+#endif
6291+}
6292+
6293+
6294+/*
6295+================
6296+Con_CreateConsole
6297+
6298+create win32 console
6299+================
6300+*/
6301+void Con_CreateConsole( void )
6302+{
6303+#ifdef WINCON
6304+ HDC hDC;
6305+ WNDCLASS wc;
6306+ RECT rect;
6307+ int nHeight;
6308+ int swidth, sheight, fontsize;
6309+ int DEDSTYLE = WS_POPUPWINDOW | WS_CAPTION;
6310+ int CONSTYLE = WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_BORDER|WS_EX_CLIENTEDGE|ES_LEFT|ES_MULTILINE|ES_AUTOVSCROLL|ES_READONLY;
6311+ string FontName;
6312+
6313+ wc.style = 0;
6314+ wc.lpfnWndProc = (WNDPROC)Con_WndProc;
6315+ wc.cbClsExtra = 0;
6316+ wc.cbWndExtra = 0;
6317+ wc.hInstance = host.hInst;
6318+ wc.hIcon = LoadIcon( host.hInst, MAKEINTRESOURCE( IDI_ICON1 ));
6319+ wc.hCursor = LoadCursor( NULL, IDC_ARROW );
6320+ wc.hbrBackground = (void *)COLOR_3DSHADOW;
6321+ wc.lpszClassName = SYSCONSOLE;
6322+ wc.lpszMenuName = 0;
6323+
6324+ if( Sys_CheckParm( "-log" ) && host.developer != 0 )
6325+ s_ld.log_active = true;
6326+
6327+ if( host.type == HOST_NORMAL )
6328+ {
6329+ rect.left = 0;
6330+ rect.right = 536;
6331+ rect.top = 0;
6332+ rect.bottom = 364;
6333+ Q_strncpy( FontName, "Fixedsys", sizeof( FontName ));
6334+ Q_strncpy( s_wcd.title, va( "Xash3D FWGS %s", XASH_VERSION ), sizeof( s_wcd.title ));
6335+ Q_strncpy( s_ld.log_path, "engine.log", sizeof( s_ld.log_path ));
6336+ fontsize = 8;
6337+ }
6338+ else // dedicated console
6339+ {
6340+ rect.left = 0;
6341+ rect.right = 640;
6342+ rect.top = 0;
6343+ rect.bottom = 392;
6344+ Q_strncpy( FontName, "System", sizeof( FontName ));
6345+ Q_strncpy( s_wcd.title, "Xash3D FWGS Dedicated Server", sizeof( s_wcd.title ));
6346+ Q_strncpy( s_ld.log_path, "dedicated.log", sizeof( s_ld.log_path ));
6347+ s_ld.log_active = true; // always make log
6348+ fontsize = 14;
6349+ }
6350+
6351+ Sys_InitLog();
6352+ if( !RegisterClass( &wc ))
6353+ {
6354+ // print into log
6355+ MsgDev( D_ERROR, "Can't register window class '%s'\n", SYSCONSOLE );
6356+ return;
6357+ }
6358+
6359+ AdjustWindowRect( &rect, DEDSTYLE, FALSE );
6360+
6361+ hDC = GetDC( GetDesktopWindow() );
6362+ swidth = GetDeviceCaps( hDC, HORZRES );
6363+ sheight = GetDeviceCaps( hDC, VERTRES );
6364+ ReleaseDC( GetDesktopWindow(), hDC );
6365+
6366+ s_wcd.windowWidth = rect.right - rect.left;
6367+ s_wcd.windowHeight = rect.bottom - rect.top;
6368+
6369+ s_wcd.hWnd = CreateWindowEx( WS_EX_DLGMODALFRAME, SYSCONSOLE, s_wcd.title, DEDSTYLE, ( swidth - 600 ) / 2, ( sheight - 450 ) / 2 , rect.right - rect.left + 1, rect.bottom - rect.top + 1, NULL, NULL, host.hInst, NULL );
6370+ if( s_wcd.hWnd == NULL )
6371+ {
6372+ MsgDev( D_ERROR, "Can't create window '%s'\n", s_wcd.title );
6373+ return;
6374+ }
6375+
6376+ // create fonts
6377+ hDC = GetDC( s_wcd.hWnd );
6378+ nHeight = -MulDiv( fontsize, GetDeviceCaps( hDC, LOGPIXELSY ), 72 );
6379+ s_wcd.hfBufferFont = CreateFont( nHeight, 0, 0, 0, FW_LIGHT, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_MODERN|FIXED_PITCH, FontName );
6380+ ReleaseDC( s_wcd.hWnd, hDC );
6381+
6382+ if( Host_IsDedicated() )
6383+ {
6384+ // create the input line
6385+ s_wcd.hwndInputLine = CreateWindowEx( WS_EX_CLIENTEDGE, "edit", NULL, WS_CHILD|WS_VISIBLE|WS_BORDER|ES_LEFT|ES_AUTOHSCROLL, 0, 366, 550, 25, s_wcd.hWnd, (HMENU)INPUT_ID, host.hInst, NULL );
6386+
6387+ s_wcd.hwndButtonSubmit = CreateWindow( "button", NULL, BS_PUSHBUTTON|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON, 552, 367, 87, 25, s_wcd.hWnd, (HMENU)SUBMIT_ID, host.hInst, NULL );
6388+ SendMessage( s_wcd.hwndButtonSubmit, WM_SETTEXT, 0, ( LPARAM ) "submit" );
6389+ }
6390+
6391+ // create the scrollbuffer
6392+ GetClientRect( s_wcd.hWnd, &rect );
6393+
6394+ s_wcd.hwndBuffer = CreateWindowEx( WS_EX_DLGMODALFRAME|WS_EX_CLIENTEDGE, "edit", NULL, CONSTYLE, 0, 0, rect.right - rect.left, min(365, rect.bottom), s_wcd.hWnd, (HMENU)EDIT_ID, host.hInst, NULL );
6395+ SendMessage( s_wcd.hwndBuffer, WM_SETFONT, (WPARAM)s_wcd.hfBufferFont, 0 );
6396+
6397+ if( Host_IsDedicated() )
6398+ {
6399+ s_wcd.SysInputLineWndProc = (WNDPROC)SetWindowLong( s_wcd.hwndInputLine, GWL_WNDPROC, (long)Con_InputLineProc );
6400+ SendMessage( s_wcd.hwndInputLine, WM_SETFONT, ( WPARAM )s_wcd.hfBufferFont, 0 );
6401+ }
6402+
6403+ // show console if needed
6404+ if( host.con_showalways )
6405+ {
6406+ // make console visible
6407+ ShowWindow( s_wcd.hWnd, SW_SHOWDEFAULT );
6408+ UpdateWindow( s_wcd.hWnd );
6409+ SetForegroundWindow( s_wcd.hWnd );
6410+
6411+ if( host.type != HOST_DEDICATED )
6412+ SetFocus( s_wcd.hWnd );
6413+ else SetFocus( s_wcd.hwndInputLine );
6414+ s_wcd.status = true;
6415+ }
6416+ else s_wcd.status = false;
6417+#endif
6418+
6419+ if( Sys_CheckParm( "-log" ) && host.developer != 0 )
6420+ {
6421+ s_ld.log_active = true;
6422+ Q_strncpy( s_ld.log_path, "engine.log", sizeof( s_ld.log_path ));
6423+ }
6424+
6425+ Sys_InitLog();
6426+}
6427+
6428+/*
6429+================
6430+Con_InitConsoleCommands
6431+
6432+register console commands (dedicated only)
6433+================
6434+*/
6435+void Con_InitConsoleCommands( void )
6436+{
6437+#ifdef WINCON
6438+ if( host.type != HOST_DEDICATED ) return;
6439+ Cmd_AddCommand( "clear", Con_Clear_f, "clear console history" );
6440+#endif
6441+}
6442+
6443+/*
6444+================
6445+Con_DestroyConsole
6446+
6447+destroy win32 console
6448+================
6449+*/
6450+void Con_DestroyConsole( void )
6451+{
6452+ // last text message into console or log
6453+ MsgDev( D_NOTE, "Con_DestroyConsole: Exiting!\n" );
6454+
6455+ Sys_CloseLog();
6456+#ifdef WINCON
6457+ if( s_wcd.hWnd )
6458+ {
6459+ DeleteObject( s_wcd.hbrEditBackground );
6460+ DeleteObject( s_wcd.hfBufferFont );
6461+
6462+ if( Host_IsDedicated() )
6463+ {
6464+ ShowWindow( s_wcd.hwndButtonSubmit, SW_HIDE );
6465+ DestroyWindow( s_wcd.hwndButtonSubmit );
6466+ s_wcd.hwndButtonSubmit = 0;
6467+
6468+ ShowWindow( s_wcd.hwndInputLine, SW_HIDE );
6469+ DestroyWindow( s_wcd.hwndInputLine );
6470+ s_wcd.hwndInputLine = 0;
6471+ }
6472+
6473+ ShowWindow( s_wcd.hwndBuffer, SW_HIDE );
6474+ DestroyWindow( s_wcd.hwndBuffer );
6475+ s_wcd.hwndBuffer = 0;
6476+
6477+ ShowWindow( s_wcd.hWnd, SW_HIDE );
6478+ DestroyWindow( s_wcd.hWnd );
6479+ s_wcd.hWnd = 0;
6480+ }
6481+
6482+ UnregisterClass( SYSCONSOLE, host.hInst );
6483+#endif
6484+ // place it here in case Sys_Crash working properly
6485+#ifdef XASH_SDL
6486+ if( host.hMutex ) SDL_DestroyMutex( host.hMutex );
6487+#endif
6488+}
6489+
6490+/*
6491+================
6492+Con_Input
6493+
6494+returned input text
6495+================
6496+*/
6497+char *Con_Input( void )
6498 {
6499 #ifdef USE_SELECT
6500 {
6501@@ -61,53 +517,33 @@ char *Sys_Input( void )
6502 }
6503 }
6504 #endif
6505-#ifdef XASH_W32CON
6506- return Wcon_Input();
6507-#endif
6508+#ifdef WINCON
6509+ if( s_wcd.consoleText[0] == 0 )
6510 return NULL;
6511-}
6512
6513-void Sys_DestroyConsole( void )
6514-{
6515- // last text message into console or log
6516- MsgDev( D_NOTE, "Sys_DestroyConsole: Exiting!\n" );
6517-#ifdef XASH_W32CON
6518- Wcon_DestroyConsole();
6519-#endif
6520-}
6521+ Q_strncpy( s_wcd.returnedText, s_wcd.consoleText, sizeof( s_wcd.returnedText ));
6522+ s_wcd.consoleText[0] = 0;
6523
6524-void Sys_CloseLog( void )
6525-{
6526- char event_name[64];
6527-
6528- // continue logged
6529- switch( host.state )
6530- {
6531- case HOST_CRASHED:
6532- Q_strncpy( event_name, "crashed", sizeof( event_name ));
6533- break;
6534- case HOST_ERR_FATAL:
6535- Q_strncpy( event_name, "stopped with error", sizeof( event_name ));
6536- break;
6537- default:
6538- if( !host.change_game ) Q_strncpy( event_name, "stopped", sizeof( event_name ));
6539- else Q_strncpy( event_name, host.finalmsg, sizeof( event_name ));
6540- break;
6541+ return s_wcd.returnedText;
6542+#endif
6543+ return NULL;
6544 }
6545
6546- printf( "\n================================================================================\n");
6547- printf( "\t%s (build %i) %s at %s\n", s_ld.title, Q_buildnum(), event_name, Q_timestamp( TIME_FULL ));
6548- printf( "================================================================================\n");
6549+/*
6550+================
6551+Con_SetFocus
6552
6553- if( s_ld.logfile )
6554+change focus to console hwnd
6555+================
6556+*/
6557+void Con_RegisterHotkeys( void )
6558 {
6559- fprintf( s_ld.logfile, "\n================================================================================\n");
6560- fprintf( s_ld.logfile, "\t%s (build %i) %s at %s\n", s_ld.title, Q_buildnum(), event_name, Q_timestamp( TIME_FULL ));
6561- fprintf( s_ld.logfile, "================================================================================\n");
6562+#ifdef WINCON
6563+ SetFocus( s_wcd.hWnd );
6564
6565- fclose( s_ld.logfile );
6566- s_ld.logfile = NULL;
6567- }
6568+ // user can hit escape for quit
6569+ RegisterHotKey( s_wcd.hWnd, QUIT_ON_ESCAPE_ID, 0, VK_ESCAPE );
6570+#endif
6571 }
6572
6573 /*
6574@@ -122,12 +558,6 @@ void Sys_InitLog( void )
6575 {
6576 const char *mode;
6577
6578- if( Sys_CheckParm( "-log" ) && host.developer != 0 )
6579- {
6580- s_ld.log_active = true;
6581- Q_strncpy( s_ld.log_path, "engine.log", sizeof( s_ld.log_path ));
6582- }
6583-
6584 if( host.change_game )
6585 mode = "a";
6586 else mode = "w";
6587@@ -152,7 +582,7 @@ void Sys_InitLog( void )
6588 }
6589 }
6590
6591-/*void Sys_CloseLog( void )
6592+void Sys_CloseLog( void )
6593 {
6594 char event_name[64];
6595
6596@@ -184,7 +614,7 @@ void Sys_InitLog( void )
6597 fclose( s_ld.logfile );
6598 s_ld.logfile = NULL;
6599 }
6600-}*/
6601+}
6602
6603 void Sys_PrintLog( const char *pMsg )
6604 {
6605diff --git a/engine/common/system.c b/engine/common/sys_win.c
6606similarity index 94%
6607rename from engine/common/system.c
6608rename to engine/common/sys_win.c
6609index cc88b98..226bbc3 100644
6610--- a/engine/common/system.c
6611+++ b/engine/common/sys_win.c
6612@@ -40,7 +40,7 @@ extern char **environ;
6613 #include "mathlib.h"
6614
6615 qboolean error_on_exit = false; // arg for exit();
6616-#define DEBUG_BREAK
6617+
6618 #if defined _WIN32 && !defined XASH_SDL
6619 #include <winbase.h>
6620 /*
6621@@ -96,59 +96,6 @@ double Sys_DoubleTime( void )
6622 }
6623 #endif
6624
6625-#ifdef GDB_BREAK
6626-#include <fcntl.h>
6627-qboolean Sys_DebuggerPresent( void )
6628-{
6629- char buf[1024];
6630-
6631- int status_fd = open( "/proc/self/status", O_RDONLY );
6632- if ( status_fd == -1 )
6633- return 0;
6634-
6635- ssize_t num_read = read( status_fd, buf, sizeof( buf ) );
6636-
6637- if ( num_read > 0 )
6638- {
6639- static const char TracerPid[] = "TracerPid:";
6640- const byte *tracer_pid;
6641-
6642- buf[num_read] = 0;
6643- tracer_pid = (const byte*)Q_strstr( buf, TracerPid );
6644- if( !tracer_pid )
6645- return false;
6646- //printf( "%s\n", tracer_pid );
6647- while( *tracer_pid < '0' || *tracer_pid > '9' )
6648- if( *tracer_pid++ == '\n' )
6649- return false;
6650- //printf( "%s\n", tracer_pid );
6651- return !!Q_atoi( (const char*)tracer_pid );
6652- }
6653-
6654- return false;
6655-}
6656-
6657-#undef DEBUG_BREAK
6658-#ifdef __i386__
6659-#define DEBUG_BREAK \
6660- if( Sys_DebuggerPresent() ) \
6661- asm volatile("int $3;")
6662-#else
6663-#define DEBUG_BREAK \
6664- if( Sys_DebuggerPresent() ) \
6665- raise( SIGINT )
6666-#endif
6667-#endif
6668-#if defined _WIN32 && !defined __amd64__
6669-#ifdef _MSC_VER
6670-#define DEBUG_BREAK if( IsDebuggerPresent() ) \
6671- _asm{ int 3 }
6672-#else
6673-#define DEBUG_BREAK if( IsDebuggerPresent() ) \
6674- asm volatile("int $3;")
6675-#endif
6676-#endif
6677-
6678 /*
6679 ================
6680 Sys_GetClipboardData
6681@@ -510,9 +457,7 @@ void Sys_WaitForQuit( void )
6682 #ifdef _WIN32
6683 MSG msg;
6684
6685-#ifdef XASH_W32CON
6686- Wcon_RegisterHotkeys();
6687-#endif
6688+ Con_RegisterHotkeys();
6689
6690 msg.message = 0;
6691
6692@@ -529,7 +474,7 @@ void Sys_WaitForQuit( void )
6693 #endif
6694 }
6695
6696-#if 0
6697+
6698 /*
6699 ================
6700 Sys_Crash
6701@@ -725,7 +670,7 @@ long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
6702 }
6703
6704 // all other states keep unchanged to let debugger find bug
6705- Sys_DestroyConsole();
6706+ Con_DestroyConsole();
6707 }
6708
6709 if( oldFilter )
6710@@ -749,7 +694,7 @@ void Sys_RestoreCrashHandler( void )
6711 #elif defined (CRASHHANDLER)
6712 // Posix signal handler
6713 #include "library.h"
6714-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined __ANDROID__
6715+#if defined(__FreeBSD__) || defined(__NetBSD__)
6716 #define HAVE_UCONTEXT_H 1
6717 #endif
6718
6719@@ -946,7 +891,7 @@ void Sys_RestoreCrashHandler( void )
6720 // stub
6721 }
6722 #endif
6723-#endif
6724+
6725 /*
6726 ================
6727 Sys_Warn
6728@@ -1008,19 +953,16 @@ void Sys_Error( const char *format, ... )
6729
6730 if( host.developer > 0 )
6731 {
6732-#ifdef XASH_W32CON
6733- Wcon_ShowConsole( true );
6734- Wcon_DisableInput(); // disable input line for dedicated server
6735-#endif
6736+ Con_ShowConsole( true );
6737+ Con_DisableInput(); // disable input line for dedicated server
6738+
6739 Sys_Print( text ); // print error message
6740 MSGBOX( text );
6741 Sys_WaitForQuit();
6742 }
6743 else
6744 {
6745-#ifdef XASH_W32CON
6746- Wcon_ShowConsole( false );
6747-#endif
6748+ Con_ShowConsole( false );
6749 MSGBOX( text );
6750 }
6751
6752@@ -1058,19 +1000,15 @@ void Sys_Break( const char *format, ... )
6753
6754 if( Host_IsDedicated() || host.developer > 0 )
6755 {
6756-#ifdef XASH_W32CON
6757- Wcon_ShowConsole( true );
6758- Wcon_DisableInput(); // disable input line for dedicated server
6759-#endif
6760+ Con_ShowConsole( true );
6761+ Con_DisableInput(); // disable input line for dedicated server
6762 Sys_Print( text );
6763 MSGBOX( text );
6764 Sys_WaitForQuit();
6765 }
6766 else
6767 {
6768-#ifdef XASH_W32CON
6769- Wcon_ShowConsole( false );
6770-#endif
6771+ Con_ShowConsole( false );
6772 MSGBOX( text );
6773 }
6774
6775@@ -1085,8 +1023,6 @@ void Sys_Quit( void )
6776 {
6777 MsgDev(D_INFO, "Shutting down...\n");
6778 Host_Shutdown();
6779- if( host.crashed )
6780- exit( 127 );
6781 exit( error_on_exit );
6782 }
6783
6784@@ -1101,8 +1037,7 @@ void Sys_Print( const char *pMsg )
6785 {
6786 if( !Host_IsDedicated() )
6787 Con_Print( pMsg );
6788-
6789-#ifdef XASH_W32CON
6790+#ifdef _WIN32
6791
6792 {
6793 const char *msg;
6794@@ -1159,12 +1094,24 @@ void Sys_Print( const char *pMsg )
6795 *b = *c = 0; // cutoff garbage
6796
6797 Sys_PrintLog( logbuf );
6798- Wcon_Print( buffer );
6799+ Con_WinPrint( buffer );
6800 }
6801 #else
6802 Sys_PrintLog( pMsg );
6803 #endif
6804- Rcon_Print( pMsg );
6805+ if( host.rd.target )
6806+ {
6807+ if(( Q_strlen( pMsg ) + Q_strlen( host.rd.buffer )) > ( host.rd.buffersize - 1 ))
6808+ {
6809+ if( host.rd.flush )
6810+ {
6811+ host.rd.flush( host.rd.address, host.rd.target, host.rd.buffer );
6812+ *host.rd.buffer = 0;
6813+ }
6814+ }
6815+ Q_strcat( host.rd.buffer, pMsg );
6816+ return;
6817+ }
6818 }
6819
6820 /*
6821diff --git a/engine/common/system.h b/engine/common/system.h
6822index 1aa1186..8929b8d 100644
6823--- a/engine/common/system.h
6824+++ b/engine/common/system.h
6825@@ -35,10 +35,7 @@ extern "C" {
6826 #define MSGBOX( x ) Android_MessageBox("Xash Error", x )
6827 #define MSGBOX2( x ) Android_MessageBox("Host Error", x )
6828 #define MSGBOX3( x ) Android_MessageBox("Host Recursive Error", x )
6829-#elif defined _WIN32
6830-#define MSGBOX( x ) MessageBox( NULL, x, "Xash Error", MB_OK|MB_SETFOREGROUND|MB_ICONSTOP )
6831-#define MSGBOX2( x ) MessageBox( host.hWnd, x, "Host Error", MB_OK|MB_SETFOREGROUND|MB_ICONSTOP )
6832-#define MSGBOX3( x ) MessageBox( host.hWnd, x, "Host Recursive Error", MB_OK|MB_SETFOREGROUND|MB_ICONSTOP )
6833+
6834 #else
6835 #define BORDER1 "======================================\n"
6836 #define MSGBOX( x ) fprintf(stderr, BORDER1"Xash Error: %s\n"BORDER1,x)
6837@@ -123,24 +120,14 @@ int Sys_LogFileNo( void );
6838 //
6839 // sys_con.c
6840 //
6841-char *Sys_Input( void );
6842-void Sys_DestroyConsole( void );
6843-void Sys_CloseLog( void );
6844-void Sys_InitLog( void );
6845-void Sys_PrintLog( const char *pMsg );
6846-int Sys_LogFileNo( void );
6847-
6848-//
6849-// con_win.c
6850-//
6851-void Wcon_ShowConsole( qboolean show );
6852-void Wcon_Print( const char *pMsg );
6853-void Wcon_Init( void );
6854-void Wcon_CreateConsole( void );
6855-void Wcon_DestroyConsole( void );
6856-void Wcon_DisableInput( void );
6857-void Wcon_Clear( void );
6858-char *Wcon_Input( void );
6859+void Con_ShowConsole( qboolean show );
6860+void Con_WinPrint( const char *pMsg );
6861+void Con_InitConsoleCommands( void );
6862+void Con_CreateConsole( void );
6863+void Con_DestroyConsole( void );
6864+void Con_RegisterHotkeys( void );
6865+void Con_DisableInput( void );
6866+char *Con_Input( void );
6867
6868 // text messages
6869 void Msg( const char *pMsg, ... ) _format(1);
6870diff --git a/engine/client/touch.c b/engine/common/touch.c
6871similarity index 100%
6872rename from engine/client/touch.c
6873rename to engine/common/touch.c
6874diff --git a/engine/common/zone.c b/engine/common/zone.c
6875index 47466ff..899bfbe 100644
6876--- a/engine/common/zone.c
6877+++ b/engine/common/zone.c
6878@@ -166,7 +166,7 @@ static const char *Mem_CheckFilename( const char *filename )
6879
6880 if( !out ) return dummy;
6881 for( i = 0; i < 128; i++, out++ )
6882- if( *out == '\0' ) break; // valid name
6883+ if( out == '\0' ) break; // valid name
6884 if( i == 128 ) return dummy;
6885 return filename;
6886 }
6887@@ -457,12 +457,8 @@ void Mem_PrintList( size_t minallocationsize )
6888 for( pool = poolchain; pool; pool = pool->next )
6889 {
6890 // poolnames can contain color symbols, make sure what color is reset
6891- if( (pool->totalsize - pool->lastchecksize ) != 0 )
6892- Msg( "%5luk (%5luk actual) %s (^7%+3li byte change)\n",
6893- (long unsigned int)((pool->totalsize + 1023) / 1024),
6894- (long unsigned int)((pool->realsize + 1023) / 1024),
6895- pool->name,
6896- pool->totalsize - pool->lastchecksize );
6897+ if( ((long)pool->totalsize - pool->lastchecksize ) != 0 )
6898+ Msg( "%5luk (%5luk actual) %s (^7%+3li byte change)\n", (long unsigned int)((pool->totalsize + 1023) / 1024), (long unsigned int)((pool->realsize + 1023) / 1024), pool->name, (long)pool->totalsize - pool->lastchecksize );
6899 else Msg( "%5luk (%5luk actual) %s\n", (long unsigned int)((pool->totalsize + 1023) / 1024), (long unsigned int)((pool->realsize + 1023) / 1024), pool->name );
6900 pool->lastchecksize = pool->totalsize;
6901 for( mem = pool->chain; mem; mem = mem->next )
6902diff --git a/engine/engine.vcxproj b/engine/engine.vcxproj
6903index a44cda9..3cc1653 100644
6904--- a/engine/engine.vcxproj
6905+++ b/engine/engine.vcxproj
6906@@ -127,7 +127,6 @@
6907 <ClCompile Include="client\s_vox.c" />
6908 <ClCompile Include="client\vgui\vgui_draw.c" />
6909 <ClCompile Include="common\avikit.c" />
6910- <ClCompile Include="common\base_cmd.c" />
6911 <ClCompile Include="common\build.c" />
6912 <ClCompile Include="common\cmd.c" />
6913 <ClCompile Include="common\common.c" />
6914diff --git a/engine/platform/win32/con_win.c b/engine/platform/win32/con_win.c
6915deleted file mode 100644
6916index a9fc169..0000000
6917--- a/engine/platform/win32/con_win.c
6918+++ /dev/null
6919@@ -1,447 +0,0 @@
6920-/*
6921-con_win.c - win32 dedicated and developer console
6922-Copyright (C) 2007 Uncle Mike
6923-
6924-This program is free software: you can redistribute it and/or modify
6925-it under the terms of the GNU General Public License as published by
6926-the Free Software Foundation, either version 3 of the License, or
6927-(at your option) any later version.
6928-
6929-This program is distributed in the hope that it will be useful,
6930-but WITHOUT ANY WARRANTY; without even the implied warranty of
6931-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6932-GNU General Public License for more details.
6933-*/
6934-
6935-#ifdef XASH_W32CON
6936-
6937-#include "common.h"
6938-
6939-#define SYSCONSOLE "XashConsole"
6940-#define COMMAND_HISTORY 64 // system console keep more commands than game console
6941-
6942-
6943-
6944-// console defines
6945-#define SUBMIT_ID 1 // "submit" button
6946-#define QUIT_ON_ESCAPE_ID 2 // escape event
6947-#define EDIT_ID 110
6948-#define INPUT_ID 109
6949-#define IDI_ICON1 101
6950-
6951-typedef struct
6952-{
6953-
6954- char title[64];
6955-
6956- HWND hWnd;
6957- HWND hwndBuffer;
6958- HWND hwndButtonSubmit;
6959- HBRUSH hbrEditBackground;
6960- HFONT hfBufferFont;
6961- HWND hwndInputLine;
6962- WNDPROC SysInputLineWndProc;
6963-
6964- string consoleText;
6965- string returnedText;
6966- string historyLines[COMMAND_HISTORY];
6967- int nextHistoryLine;
6968- int historyLine;
6969- int status;
6970- int windowWidth, windowHeight;
6971- size_t outLen;
6972- // log stuff
6973-
6974-
6975-} WinConData;
6976-
6977-static WinConData s_wcd;
6978-
6979-void Wcon_DisableInput( void )
6980-{
6981- if( host.type != HOST_DEDICATED ) return;
6982- SendMessage( s_wcd.hwndButtonSubmit, WM_ENABLE, 0, 0 );
6983- SendMessage( s_wcd.hwndInputLine, WM_ENABLE, 0, 0 );
6984-}
6985-
6986-void Wcon_SetInputText( const char *inputText )
6987-{
6988- SetWindowText( s_wcd.hwndInputLine, inputText );
6989- SendMessage( s_wcd.hwndInputLine, EM_SETSEL, Q_strlen( inputText ), -1 );
6990-}
6991-
6992-void Wcon_Clear( void )
6993-{
6994- if( host.type != HOST_DEDICATED ) return;
6995- SendMessage( s_wcd.hwndBuffer, EM_SETSEL, 0, -1 );
6996- SendMessage( s_wcd.hwndBuffer, EM_REPLACESEL, FALSE, (LPARAM)"" );
6997- UpdateWindow( s_wcd.hwndBuffer );
6998-}
6999-
7000-static int Wcon_KeyEvent( int key, qboolean down )
7001-{
7002- char inputBuffer[1024];
7003-
7004- if( !down )
7005- return 0;
7006-
7007- switch( key )
7008- {
7009- case VK_TAB:
7010- GetWindowText( s_wcd.hwndInputLine, inputBuffer, sizeof( inputBuffer ));
7011- Cmd_AutoComplete( inputBuffer );
7012- Wcon_SetInputText( inputBuffer );
7013- return 1;
7014- case VK_DOWN:
7015- if( s_wcd.historyLine == s_wcd.nextHistoryLine )
7016- return 0;
7017- s_wcd.historyLine++;
7018- Wcon_SetInputText( s_wcd.historyLines[s_wcd.historyLine % COMMAND_HISTORY] );
7019- return 1;
7020- case VK_UP:
7021- if( s_wcd.nextHistoryLine - s_wcd.historyLine < COMMAND_HISTORY && s_wcd.historyLine > 0 )
7022- s_wcd.historyLine--;
7023- Wcon_SetInputText( s_wcd.historyLines[s_wcd.historyLine % COMMAND_HISTORY] );
7024- return 1;
7025- }
7026- return 0;
7027-}
7028-
7029-static long _stdcall Wcon_WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
7030-{
7031- switch( uMsg )
7032- {
7033- case WM_ACTIVATE:
7034- if( LOWORD( wParam ) != WA_INACTIVE )
7035- SetFocus( s_wcd.hwndInputLine );
7036- break;
7037- case WM_CLOSE:
7038- if( host.state == HOST_ERR_FATAL )
7039- {
7040- // send windows message
7041- PostQuitMessage( 0 );
7042- }
7043- else Sys_Quit(); // otherwise
7044- return 0;
7045- case WM_CTLCOLORSTATIC:
7046- if((HWND)lParam == s_wcd.hwndBuffer )
7047- {
7048- SetBkColor((HDC)wParam, RGB( 0x90, 0x90, 0x90 ));
7049- SetTextColor((HDC)wParam, RGB( 0xff, 0xff, 0xff ));
7050- return (long)s_wcd.hbrEditBackground;
7051- }
7052- break;
7053- case WM_COMMAND:
7054- if( wParam == SUBMIT_ID )
7055- {
7056- SendMessage( s_wcd.hwndInputLine, WM_CHAR, 13, 0L );
7057- SetFocus( s_wcd.hwndInputLine );
7058- }
7059- break;
7060- case WM_HOTKEY:
7061- switch( LOWORD( wParam ))
7062- {
7063- case QUIT_ON_ESCAPE_ID:
7064- PostQuitMessage( 0 );
7065- break;
7066- }
7067- break;
7068- case WM_CREATE:
7069- s_wcd.hbrEditBackground = CreateSolidBrush( RGB( 0x90, 0x90, 0x90 ));
7070- break;
7071- }
7072- return DefWindowProc( hWnd, uMsg, wParam, lParam );
7073-}
7074-
7075-long _stdcall Wcon_InputLineProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
7076-{
7077- char inputBuffer[1024];
7078-
7079- switch( uMsg )
7080- {
7081- case WM_KILLFOCUS:
7082- if(( HWND )wParam == s_wcd.hWnd )
7083- {
7084- SetFocus( hWnd );
7085- return 0;
7086- }
7087- break;
7088- case WM_SYSKEYDOWN:
7089- case WM_KEYDOWN:
7090- if( Wcon_KeyEvent( LOWORD( wParam ), true ))
7091- return 0;
7092- break;
7093- case WM_SYSKEYUP:
7094- case WM_KEYUP:
7095- if( Wcon_KeyEvent( LOWORD( wParam ), false ))
7096- return 0;
7097- break;
7098- case WM_CHAR:
7099- if( Wcon_KeyEvent( wParam, true ))
7100- return 0;
7101- if( wParam == 13 && host.state != HOST_ERR_FATAL )
7102- {
7103- GetWindowText( s_wcd.hwndInputLine, inputBuffer, sizeof( inputBuffer ));
7104- Q_strncat( s_wcd.consoleText, inputBuffer, sizeof( s_wcd.consoleText ) - Q_strlen( s_wcd.consoleText ) - 5 );
7105- Q_strcat( s_wcd.consoleText, "\n" );
7106- SetWindowText( s_wcd.hwndInputLine, "" );
7107- Msg( ">%s\n", inputBuffer );
7108-
7109- // copy line to history buffer
7110- Q_strncpy( s_wcd.historyLines[s_wcd.nextHistoryLine % COMMAND_HISTORY], inputBuffer, MAX_STRING );
7111- s_wcd.nextHistoryLine++;
7112- s_wcd.historyLine = s_wcd.nextHistoryLine;
7113- return 0;
7114- }
7115- break;
7116- }
7117- return CallWindowProc( s_wcd.SysInputLineWndProc, hWnd, uMsg, wParam, lParam );
7118-}
7119-
7120-/*
7121-===============================================================================
7122-
7123-WIN32 IO
7124-
7125-===============================================================================
7126-*/
7127-/*
7128-================
7129-Con_WinPrint
7130-
7131-print into window console
7132-================
7133-*/
7134-void Wcon_Print( const char *pMsg )
7135-{
7136- size_t len = Q_strlen( pMsg );
7137-
7138- // replace selection instead of appending if we're overflowing
7139- s_wcd.outLen += len;
7140- if( s_wcd.outLen >= 0x7fff )
7141- {
7142- SendMessage( s_wcd.hwndBuffer, EM_SETSEL, 0, -1 );
7143- s_wcd.outLen = len;
7144- }
7145-
7146- SendMessage( s_wcd.hwndBuffer, EM_REPLACESEL, 0, (LPARAM)pMsg );
7147-
7148- // put this text into the windows console
7149- SendMessage( s_wcd.hwndBuffer, EM_LINESCROLL, 0, 0xffff );
7150- SendMessage( s_wcd.hwndBuffer, EM_SCROLLCARET, 0, 0 );
7151-}
7152-
7153-
7154-/*
7155-================
7156-Con_CreateConsole
7157-
7158-create win32 console
7159-================
7160-*/
7161-void Wcon_CreateConsole( void )
7162-{
7163- HDC hDC;
7164- WNDCLASS wc;
7165- RECT rect;
7166- int nHeight;
7167- int swidth, sheight, fontsize;
7168- int DEDSTYLE = WS_POPUPWINDOW | WS_CAPTION;
7169- int CONSTYLE = WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_BORDER|WS_EX_CLIENTEDGE|ES_LEFT|ES_MULTILINE|ES_AUTOVSCROLL|ES_READONLY;
7170- string FontName;
7171-
7172- if( Sys_CheckParm( "-nowcon" ) )
7173- return;
7174-
7175- wc.style = 0;
7176- wc.lpfnWndProc = (WNDPROC)Wcon_WndProc;
7177- wc.cbClsExtra = 0;
7178- wc.cbWndExtra = 0;
7179- wc.hInstance = host.hInst;
7180- wc.hIcon = LoadIcon( host.hInst, MAKEINTRESOURCE( IDI_ICON1 ));
7181- wc.hCursor = LoadCursor( NULL, IDC_ARROW );
7182- wc.hbrBackground = (void *)COLOR_3DSHADOW;
7183- wc.lpszClassName = SYSCONSOLE;
7184- wc.lpszMenuName = 0;
7185-
7186-
7187- if( host.type == HOST_NORMAL )
7188- {
7189- rect.left = 0;
7190- rect.right = 536;
7191- rect.top = 0;
7192- rect.bottom = 364;
7193- Q_strncpy( FontName, "Fixedsys", sizeof( FontName ));
7194- Q_strncpy( s_wcd.title, va( "Xash3D FWGS %s", XASH_VERSION ), sizeof( s_wcd.title ));
7195- fontsize = 8;
7196- }
7197- else // dedicated console
7198- {
7199- rect.left = 0;
7200- rect.right = 640;
7201- rect.top = 0;
7202- rect.bottom = 392;
7203- Q_strncpy( FontName, "System", sizeof( FontName ));
7204- Q_strncpy( s_wcd.title, "Xash3D FWGS Dedicated Server", sizeof( s_wcd.title ));
7205- fontsize = 14;
7206- }
7207-
7208- if( !RegisterClass( &wc ))
7209- {
7210- // print into log
7211- MsgDev( D_ERROR, "Can't register window class '%s'\n", SYSCONSOLE );
7212- return;
7213- }
7214-
7215- AdjustWindowRect( &rect, DEDSTYLE, FALSE );
7216-
7217- hDC = GetDC( GetDesktopWindow() );
7218- swidth = GetDeviceCaps( hDC, HORZRES );
7219- sheight = GetDeviceCaps( hDC, VERTRES );
7220- ReleaseDC( GetDesktopWindow(), hDC );
7221-
7222- s_wcd.windowWidth = rect.right - rect.left;
7223- s_wcd.windowHeight = rect.bottom - rect.top;
7224-
7225- s_wcd.hWnd = CreateWindowEx( WS_EX_DLGMODALFRAME, SYSCONSOLE, s_wcd.title, DEDSTYLE, ( swidth - 600 ) / 2, ( sheight - 450 ) / 2 , rect.right - rect.left + 1, rect.bottom - rect.top + 1, NULL, NULL, host.hInst, NULL );
7226- if( s_wcd.hWnd == NULL )
7227- {
7228- MsgDev( D_ERROR, "Can't create window '%s'\n", s_wcd.title );
7229- return;
7230- }
7231-
7232- // create fonts
7233- hDC = GetDC( s_wcd.hWnd );
7234- nHeight = -MulDiv( fontsize, GetDeviceCaps( hDC, LOGPIXELSY ), 72 );
7235- s_wcd.hfBufferFont = CreateFont( nHeight, 0, 0, 0, FW_LIGHT, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_MODERN|FIXED_PITCH, FontName );
7236- ReleaseDC( s_wcd.hWnd, hDC );
7237-
7238- if( Host_IsDedicated() )
7239- {
7240- // create the input line
7241- s_wcd.hwndInputLine = CreateWindowEx( WS_EX_CLIENTEDGE, "edit", NULL, WS_CHILD|WS_VISIBLE|WS_BORDER|ES_LEFT|ES_AUTOHSCROLL, 0, 366, 550, 25, s_wcd.hWnd, (HMENU)INPUT_ID, host.hInst, NULL );
7242-
7243- s_wcd.hwndButtonSubmit = CreateWindow( "button", NULL, BS_PUSHBUTTON|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON, 552, 367, 87, 25, s_wcd.hWnd, (HMENU)SUBMIT_ID, host.hInst, NULL );
7244- SendMessage( s_wcd.hwndButtonSubmit, WM_SETTEXT, 0, ( LPARAM ) "submit" );
7245- }
7246-
7247- // create the scrollbuffer
7248- GetClientRect( s_wcd.hWnd, &rect );
7249-
7250- s_wcd.hwndBuffer = CreateWindowEx( WS_EX_DLGMODALFRAME|WS_EX_CLIENTEDGE, "edit", NULL, CONSTYLE, 0, 0, rect.right - rect.left, min(365, rect.bottom), s_wcd.hWnd, (HMENU)EDIT_ID, host.hInst, NULL );
7251- SendMessage( s_wcd.hwndBuffer, WM_SETFONT, (WPARAM)s_wcd.hfBufferFont, 0 );
7252-
7253- if( Host_IsDedicated() )
7254- {
7255- s_wcd.SysInputLineWndProc = (WNDPROC)SetWindowLong( s_wcd.hwndInputLine, GWL_WNDPROC, (size_t)Wcon_InputLineProc );
7256- SendMessage( s_wcd.hwndInputLine, WM_SETFONT, ( WPARAM )s_wcd.hfBufferFont, 0 );
7257- }
7258-
7259- // show console if needed
7260- if( host.con_showalways )
7261- {
7262- // make console visible
7263- ShowWindow( s_wcd.hWnd, SW_SHOWDEFAULT );
7264- UpdateWindow( s_wcd.hWnd );
7265- SetForegroundWindow( s_wcd.hWnd );
7266-
7267- if( host.type != HOST_DEDICATED )
7268- SetFocus( s_wcd.hWnd );
7269- else SetFocus( s_wcd.hwndInputLine );
7270- s_wcd.status = true;
7271- }
7272- else s_wcd.status = false;
7273-}
7274-
7275-/*
7276-================
7277-Wcon_Init
7278-
7279-register console commands (dedicated only)
7280-================
7281-*/
7282-void Wcon_Init( void )
7283-{
7284-
7285-}
7286-
7287-/*
7288-================
7289-Con_DestroyConsole
7290-
7291-destroy win32 console
7292-================
7293-*/
7294-void Wcon_DestroyConsole( void )
7295-{
7296-
7297- if( s_wcd.hWnd )
7298- {
7299- DeleteObject( s_wcd.hbrEditBackground );
7300- DeleteObject( s_wcd.hfBufferFont );
7301-
7302- if( Host_IsDedicated() )
7303- {
7304- ShowWindow( s_wcd.hwndButtonSubmit, SW_HIDE );
7305- DestroyWindow( s_wcd.hwndButtonSubmit );
7306- s_wcd.hwndButtonSubmit = 0;
7307-
7308- ShowWindow( s_wcd.hwndInputLine, SW_HIDE );
7309- DestroyWindow( s_wcd.hwndInputLine );
7310- s_wcd.hwndInputLine = 0;
7311- }
7312-
7313- ShowWindow( s_wcd.hwndBuffer, SW_HIDE );
7314- DestroyWindow( s_wcd.hwndBuffer );
7315- s_wcd.hwndBuffer = 0;
7316-
7317- ShowWindow( s_wcd.hWnd, SW_HIDE );
7318- DestroyWindow( s_wcd.hWnd );
7319- s_wcd.hWnd = 0;
7320- }
7321-
7322- UnregisterClass( SYSCONSOLE, host.hInst );
7323-}
7324-
7325-/*
7326-================
7327-Wcon_Input
7328-
7329-returned input text
7330-================
7331-*/
7332-char *Wcon_Input( void )
7333-{
7334- if( s_wcd.consoleText[0] == 0 )
7335- return NULL;
7336-
7337- Q_strncpy( s_wcd.returnedText, s_wcd.consoleText, sizeof( s_wcd.returnedText ));
7338- s_wcd.consoleText[0] = 0;
7339-
7340- return s_wcd.returnedText;
7341-
7342- return NULL;
7343-}
7344-
7345-void Wcon_ShowConsole( qboolean show )
7346-{
7347- if( !s_wcd.hWnd || show == s_wcd.status )
7348- return;
7349-
7350- s_wcd.status = show;
7351- if( show )
7352- {
7353- ShowWindow( s_wcd.hWnd, SW_SHOWNORMAL );
7354- SendMessage( s_wcd.hwndBuffer, EM_LINESCROLL, 0, 0xffff );
7355- }
7356- else ShowWindow( s_wcd.hWnd, SW_HIDE );
7357-}
7358-
7359-void Wcon_RegisterHotkeys( void )
7360-{
7361- SetFocus( s_wcd.hWnd );
7362- // user can hit escape for quit
7363- RegisterHotKey( s_wcd.hWnd, QUIT_ON_ESCAPE_ID, 0, VK_ESCAPE );
7364-}
7365-
7366-#endif
7367diff --git a/engine/server/sv_client.c b/engine/server/sv_client.c
7368index ff6dc38..13a0e48 100644
7369--- a/engine/server/sv_client.c
7370+++ b/engine/server/sv_client.c
7371@@ -250,9 +250,9 @@ gotnewcl:
7372 // clear any dlls data but keep engine data
7373 Mem_Free( ent->pvPrivateData );
7374 ent->pvPrivateData = NULL;
7375- ent->serialnumber++;
7376 }
7377-
7378+ // invalidate serial number
7379+ ent->serialnumber++;
7380 }
7381 // "3" enables both clean and disconnect
7382 if( sv_clientclean->integer & 2 )
7383@@ -535,8 +535,6 @@ void SV_BeginRedirect( netadr_t adr, int target, char *buffer, int buffersize, v
7384 host.rd.flush = flush;
7385 host.rd.address = adr;
7386 host.rd.buffer[0] = 0;
7387- if( !host.rd.lines )
7388- host.rd.lines = -1;
7389 }
7390
7391 void SV_FlushRedirect( netadr_t adr, int dest, char *buf )
7392@@ -563,9 +561,6 @@ void SV_FlushRedirect( netadr_t adr, int dest, char *buf )
7393
7394 void SV_EndRedirect( void )
7395 {
7396- if( host.rd.lines > 0 )
7397- return;
7398-
7399 if( host.rd.flush )
7400 host.rd.flush( host.rd.address, host.rd.target, host.rd.buffer );
7401
7402@@ -576,32 +571,6 @@ void SV_EndRedirect( void )
7403 }
7404
7405 /*
7406-================
7407-Rcon_Print
7408-
7409-Print message to rcon buffer and send to rcon redirect target
7410-================
7411-*/
7412-
7413-void Rcon_Print( const char *pMsg )
7414-{
7415- if( host.rd.target && host.rd.lines && host.rd.flush )
7416- {
7417- int len = Q_strncat( host.rd.buffer, pMsg, host.rd.buffersize );
7418-
7419- if( len && host.rd.buffer[len-1] == '\n' )
7420- {
7421- host.rd.flush( host.rd.address, host.rd.target, host.rd.buffer );
7422- if( host.rd.lines > 0 )
7423- host.rd.lines--;
7424- host.rd.buffer[0] = 0;
7425- if( !host.rd.lines )
7426- Msg( "End of redirection!\n" );
7427- }
7428- }
7429-}
7430-
7431-/*
7432 ===============
7433 SV_StatusString
7434
7435@@ -865,7 +834,7 @@ void SV_RemoteCommand( netadr_t from, sizebuf_t *msg )
7436 int i;
7437
7438 MsgDev( D_INFO, "Rcon from %s:\n%s\n", NET_AdrToString( from ), BF_GetData( msg ) + 4 );
7439- SV_BeginRedirect( from, RD_PACKET, outputbuf, sizeof( outputbuf ), SV_FlushRedirect );
7440+ SV_BeginRedirect( from, RD_PACKET, outputbuf, sizeof( outputbuf ) - 16, SV_FlushRedirect );
7441
7442 if( Rcon_Validate( ))
7443 {
7444@@ -1861,8 +1830,7 @@ void SV_Baselines_f( sv_client_t *cl )
7445 while( BF_GetNumBytesWritten( &cl->netchan.message ) < ( cl->maxpacket ) && start < svgame.numEntities )
7446 {
7447 base = &svs.baselines[start];
7448- // if baseline created in SV_CreateBaselines
7449- if( base->number || !start )
7450+ if( base->number && ( base->modelindex || base->effects != EF_NODRAW ))
7451 {
7452 BF_WriteByte( &cl->netchan.message, svc_spawnbaseline );
7453 MSG_WriteDeltaEntity( &nullstate, base, &cl->netchan.message, true, SV_IsPlayerIndex( base->number ), sv.time );
7454@@ -2810,7 +2778,7 @@ void SV_EntCreate_f( sv_client_t *cl )
7455 if( !ent->v.targetname )
7456 {
7457 char newname[256], clientname[256];
7458- for( i = 0; i < sizeof( cl->name ); i++ )
7459+ for( i = 0; i < 256; i++ )
7460 {
7461 char c = Q_tolower( cl->name[i] );
7462 if( c < 'a' || c > 'z' )
7463@@ -3093,6 +3061,7 @@ static void SV_ParseClientMove( sv_client_t *cl, sizebuf_t *msg )
7464 usercmd_t cmds[32], *to;
7465 edict_t *player;
7466
7467+ numbackup = 2;
7468 player = cl->edict;
7469
7470 frame = &cl->frames[cl->netchan.incoming_acknowledged & SV_UPDATE_MASK];
7471diff --git a/engine/server/sv_cmds.c b/engine/server/sv_cmds.c
7472index 309fd7b..1a28fd9 100644
7473--- a/engine/server/sv_cmds.c
7474+++ b/engine/server/sv_cmds.c
7475@@ -1008,30 +1008,6 @@ void SV_EntityInfo_f( void )
7476 }
7477
7478 /*
7479-================
7480-Rcon_Redirect_f
7481-
7482-Force redirect N lines of console output to client
7483-================
7484-*/
7485-void Rcon_Redirect_f( void )
7486-{
7487- int lines = 2000;
7488-
7489- if( !host.rd.target )
7490- {
7491- Msg( "redirect is only valid from rcon\n" );
7492- return;
7493- }
7494-
7495- if( Cmd_Argc() == 2 )
7496- lines = Q_atoi( Cmd_Argv( 1 ) );
7497-
7498- host.rd.lines = lines;
7499- Msg( "Redirection enabled for next %d lines\n", lines );
7500-}
7501-
7502-/*
7503 ==================
7504 SV_InitOperatorCommands
7505 ==================
7506@@ -1063,7 +1039,6 @@ void SV_InitOperatorCommands( void )
7507 Cmd_AddCommand( "loadquick", SV_QuickLoad_f, "load a quick-saved game file" );
7508 Cmd_AddCommand( "killsave", SV_DeleteSave_f, "delete a saved game file and saveshot" );
7509 Cmd_AddCommand( "autosave", SV_AutoSave_f, "save the game to 'autosave' file" );
7510- Cmd_AddCommand( "redirect", Rcon_Redirect_f, "force enable rcon redirection" );
7511 if( Host_IsDedicated() )
7512 {
7513 Cmd_AddCommand( "say", SV_ConSay_f, "send a chat message to everyone on the server" );
7514@@ -1084,6 +1059,7 @@ void SV_KillOperatorCommands( void )
7515 {
7516 Cmd_RemoveCommand( "heartbeat" );
7517 Cmd_RemoveCommand( "kick" );
7518+ Cmd_RemoveCommand( "kill" );
7519 Cmd_RemoveCommand( "status" );
7520 Cmd_RemoveCommand( "serverinfo" );
7521 Cmd_RemoveCommand( "clientinfo" );
7522diff --git a/engine/server/sv_log.c b/engine/server/sv_log.c
7523index e66675e..6e16721 100644
7524--- a/engine/server/sv_log.c
7525+++ b/engine/server/sv_log.c
7526@@ -25,6 +25,8 @@ convar_t *mp_logecho;
7527 convar_t *sv_log_singleplayer;
7528 convar_t *sv_log_onefile;
7529
7530+extern convar_t *cvar_vars;
7531+
7532 void Log_InitCvars ( void )
7533 {
7534 mp_logfile = Cvar_Get( "mp_logfile", "1", CVAR_ARCHIVE, "log server information in the log file" );
7535@@ -71,14 +73,14 @@ void Log_Printf( const char *fmt, ... )
7536
7537 void Log_PrintServerVars( void )
7538 {
7539- cvar_t *var;
7540+ convar_t *var;
7541
7542 if ( !svs.log.active )
7543 return;
7544
7545 Log_Printf( "Server cvars start\n" );
7546
7547- for ( var = Cvar_GetList(); var != NULL; var = var->next )
7548+ for ( var = cvar_vars; var != NULL; var = var->next )
7549 {
7550 if ( var->flags & FCVAR_SERVER )
7551 Log_Printf( "Server cvar \"%s\" = \"%s\"\n", var->name, var->string );
7552diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c
7553index 0ae40a2..015ec97 100644
7554--- a/engine/server/sv_main.c
7555+++ b/engine/server/sv_main.c
7556@@ -149,7 +149,7 @@ void SV_CalcPings( void )
7557 }
7558
7559 if( !count ) cl->ping = 0;
7560- else cl->ping = (float)total / (float)count;
7561+ else cl->ping = total / count;
7562 }
7563 }
7564
7565@@ -837,7 +837,7 @@ void SV_Init( void )
7566 rcon_password = Cvar_Get( "rcon_password", "", 0, "remote connect password" );
7567 sv_stepsize = Cvar_Get( "sv_stepsize", "18", CVAR_ARCHIVE|CVAR_PHYSICINFO, "how high you can step up" );
7568 sv_newunit = Cvar_Get( "sv_newunit", "0", 0, "sets to 1 while new unit is loading" );
7569- hostname = Cvar_Get( "hostname", "unnamed", CVAR_SERVERNOTIFY|CVAR_ARCHIVE, "host name" );
7570+ hostname = Cvar_Get( "hostname", "unnamed", CVAR_SERVERNOTIFY|CVAR_SERVERNOTIFY|CVAR_ARCHIVE, "host name" );
7571 sv_timeout = Cvar_Get( "sv_timeout", "125", CVAR_SERVERNOTIFY, "connection timeout" );
7572 zombietime = Cvar_Get( "zombietime", "2", CVAR_SERVERNOTIFY, "timeout for clients-zombie (who died but not respawned)" );
7573 sv_pausable = Cvar_Get( "pausable", "1", CVAR_SERVERNOTIFY, "allow players to pause or not" );
7574@@ -881,7 +881,7 @@ void SV_Init( void )
7575 sv_allow_download = Cvar_Get( "sv_allow_download", "0", CVAR_ARCHIVE, "allow clients to download missing resources" );
7576 sv_allow_fragment = Cvar_Get( "sv_allow_fragment", "0", CVAR_ARCHIVE, "allow direct download from server" );
7577 sv_downloadurl = Cvar_Get( "sv_downloadurl", "", CVAR_ARCHIVE, "custom fastdl server to pass to client" );
7578- sv_clientclean = Cvar_Get( "sv_clientclean", "1", CVAR_ARCHIVE, "client cleaning mode (0-3), useful for bots" );
7579+ sv_clientclean = Cvar_Get( "sv_clientclean", "0", CVAR_ARCHIVE, "client cleaning mode (0-3), useful for bots" );
7580 sv_send_logos = Cvar_Get( "sv_send_logos", "1", 0, "send custom player decals to other clients" );
7581 sv_send_resources = Cvar_Get( "sv_send_resources", "1", 0, "send generic resources that are specified in 'mapname.res'" );
7582 sv_sendvelocity = Cvar_Get( "sv_sendvelocity", "1", CVAR_ARCHIVE, "force to send velocity for event_t structure across network" );
7583@@ -990,19 +990,19 @@ void SV_Shutdown( qboolean reconnect )
7584 // free server static data
7585 if( svs.clients )
7586 {
7587- Mem_Free( svs.clients );
7588+ Z_Free( svs.clients );
7589 svs.clients = NULL;
7590 }
7591
7592 if( svs.baselines )
7593 {
7594- Mem_Free( svs.baselines );
7595+ Z_Free( svs.baselines );
7596 svs.baselines = NULL;
7597 }
7598
7599 if( svs.packet_entities )
7600 {
7601- Mem_Free( svs.packet_entities );
7602+ Z_Free( svs.packet_entities );
7603 svs.packet_entities = NULL;
7604 svs.num_client_entities = 0;
7605 svs.next_client_entities = 0;
7606diff --git a/engine/server/sv_phys.c b/engine/server/sv_phys.c
7607index e912a89..5c1eb2a 100644
7608--- a/engine/server/sv_phys.c
7609+++ b/engine/server/sv_phys.c
7610@@ -472,7 +472,7 @@ qboolean SV_CheckWater( edict_t *ent )
7611 }
7612 }
7613
7614- return (ent->v.waterlevel > 1); //-V602
7615+ return (ent->v.waterlevel > 1);
7616 }
7617
7618 /*
7619diff --git a/engine/server/sv_save.c b/engine/server/sv_save.c
7620index 1de5079..478d1b9 100644
7621--- a/engine/server/sv_save.c
7622+++ b/engine/server/sv_save.c
7623@@ -443,11 +443,8 @@ void ReapplyDecal( SAVERESTOREDATA *pSaveData, decallist_t *entry, qboolean adja
7624
7625 // restore entity and model index
7626 pEdict = pSaveData->pTable[entry->entityIndex].pent;
7627- if( SV_IsValidEdict( pEdict ) )
7628- {
7629- modelIndex = pEdict->v.modelindex;
7630- entityIndex = NUM_FOR_EDICT( pEdict );
7631- }
7632+ if( SV_IsValidEdict( pEdict )) modelIndex = pEdict->v.modelindex;
7633+ if( SV_IsValidEdict( pEdict )) entityIndex = NUM_FOR_EDICT( pEdict );
7634
7635 if( SV_RestoreCustomDecal( entry, pEdict, adjacent ))
7636 return; // decal was sucessfully restored at the game-side
7637@@ -2361,14 +2358,14 @@ qboolean SV_GetComment( const char *savename, char *comment )
7638 size += tokenSize;
7639
7640 // sanity check.
7641- if( tokenCount <= 0 || tokenCount > ( 1024 * 1024 * 32 ))
7642+ if( tokenCount < 0 || tokenCount > ( 1024 * 1024 * 32 ))
7643 {
7644 Q_strncpy( comment, "<corrupted>", MAX_STRING );
7645 FS_Close( f );
7646 return 0;
7647 }
7648
7649- if( tokenSize <= 0 || tokenSize > ( 1024 * 1024 * 32 ))
7650+ if( tokenSize < 0 || tokenSize > ( 1024 * 1024 * 32 ))
7651 {
7652 Q_strncpy( comment, "<corrupted>", MAX_STRING );
7653 FS_Close( f );
7654@@ -2380,17 +2377,9 @@ qboolean SV_GetComment( const char *savename, char *comment )
7655 pData = pSaveData;
7656
7657 // allocate a table for the strings, and parse the table
7658- pTokenList = Mem_Alloc( host.mempool, tokenCount * sizeof( char* ));
7659-
7660- if( !pTokenList || !pSaveData )
7661+ if( tokenSize > 0 )
7662 {
7663- Q_strncpy( comment, "<corrupted>", MAX_STRING );
7664-
7665- FS_Close( f );
7666- Z_Free( pTokenList );
7667- Z_Free( pSaveData );
7668- return 0;
7669- }
7670+ pTokenList = Mem_Alloc( host.mempool, tokenCount * sizeof( char* ));
7671
7672 // make sure the token strings pointed to by the pToken hashtable.
7673 for( i = 0; i < tokenCount; i++ )
7674@@ -2398,6 +2387,8 @@ qboolean SV_GetComment( const char *savename, char *comment )
7675 pTokenList[i] = *pData ? pData : NULL; // point to each string in the pToken table
7676 while( *pData++ ); // find next token (after next null)
7677 }
7678+ }
7679+ else pTokenList = NULL;
7680
7681 // short, short (size, index of field name)
7682 Q_memcpy(&shortpool, pData, sizeof(short));
7683@@ -2410,8 +2401,8 @@ qboolean SV_GetComment( const char *savename, char *comment )
7684 if( Q_stricmp( pFieldName, "GameHeader" ))
7685 {
7686 Q_strncpy( comment, "<missing GameHeader>", MAX_STRING );
7687- Mem_Free( pTokenList );
7688- Mem_Free( pSaveData );
7689+ if( pTokenList ) Mem_Free( pTokenList );
7690+ if( pSaveData ) Mem_Free( pSaveData );
7691 FS_Close( f );
7692 return 0;
7693 }
7694@@ -2450,8 +2441,8 @@ qboolean SV_GetComment( const char *savename, char *comment )
7695 }
7696
7697 // delete the string table we allocated
7698- Mem_Free( pTokenList );
7699- Mem_Free( pSaveData );
7700+ if( pTokenList ) Mem_Free( pTokenList );
7701+ if( pSaveData ) Mem_Free( pSaveData );
7702 FS_Close( f );
7703
7704 if( Q_strlen( name ) > 0 && Q_strlen( description ) > 0 )
7705diff --git a/engine/server/sv_world.c b/engine/server/sv_world.c
7706index ec3ff65..3dbfed1 100644
7707--- a/engine/server/sv_world.c
7708+++ b/engine/server/sv_world.c
7709@@ -991,7 +991,7 @@ eventually rotation) of the end points
7710 */
7711 void SV_ClipMoveToEntity( edict_t *ent, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, trace_t *trace )
7712 {
7713- hull_t *hull = NULL;
7714+ hull_t *hull;
7715 model_t *model;
7716 vec3_t start_l, end_l;
7717 vec3_t offset, temp;
7718@@ -1018,10 +1018,6 @@ void SV_ClipMoveToEntity( edict_t *ent, const vec3_t start, vec3_t mins, vec3_t
7719 hullcount = 1;
7720 }
7721
7722- // prevent crash on incorrect hull
7723- if( !hull )
7724- return;
7725-
7726 // rotate start and end into the models frame of reference
7727 if( ent->v.solid == SOLID_BSP && !VectorIsNull( ent->v.angles ))
7728 rotated = true;
7729@@ -1050,7 +1046,7 @@ void SV_ClipMoveToEntity( edict_t *ent, const vec3_t start, vec3_t mins, vec3_t
7730 if( transform_bbox )
7731 {
7732 World_TransformAABB( matrix, mins, maxs, out_mins, out_maxs );
7733- VectorSubtract( hull[0].clip_mins, out_mins, offset ); // calc new local offset
7734+ VectorSubtract( hull->clip_mins, out_mins, offset ); // calc new local offset
7735
7736 for( j = 0; j < 3; j++ )
7737 {
7738@@ -1069,6 +1065,10 @@ void SV_ClipMoveToEntity( edict_t *ent, const vec3_t start, vec3_t mins, vec3_t
7739 VectorSubtract( end, offset, end_l );
7740 }
7741
7742+ // prevent crash on incorrect hull
7743+ if( !hull )
7744+ return;
7745+
7746 if( hullcount == 1 )
7747 {
7748 SV_RecursiveHullCheck( hull, hull->firstclipnode, 0.0f, 1.0f, start_l, end_l, trace );
7749diff --git a/game_launch/xash.c b/game_launch/xash.c
7750index d6a921c..2885dc9 100644
7751--- a/game_launch/xash.c
7752+++ b/game_launch/xash.c
7753@@ -45,7 +45,7 @@ GNU General Public License for more details.
7754 #define dlmount(x) LoadLibraryA(x)
7755 #define dlclose(x) FreeLibrary(x)
7756 #define dlsym(x,y) GetProcAddress(x,y)
7757-#ifndef XASH_DEDICATED
7758+#ifdef XASH_SDL
7759 #define XASHLIB "xash_sdl.dll"
7760 #else
7761 #define XASHLIB "xash_dedicated.dll"
7762@@ -70,9 +70,8 @@ void Xash_Error( const char *errorstring )
7763 {
7764 #ifdef XASH_SDL
7765 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Xash Error", errorstring, NULL);
7766-#else
7767- fprintf(stderr, "Xash Error: %s\n", errorstring);
7768 #endif
7769+ fprintf(stderr, "Xash Error: %s\n", errorstring);
7770 exit( 1 );
7771 }
7772
7773@@ -118,17 +117,14 @@ void Sys_ChangeGame( const char *progname )
7774
7775 Xash_Main( szArgc, szArgv, szGameDir, true, ( Xash_Shutdown != NULL ) ? Sys_ChangeGame : NULL );
7776 }
7777-
7778-
7779-#if _WIN32 && !__MINGW32__ && ( _MSC_VER == 1200 || !defined(XASH_SDL) )
7780-#pragma comment(lib, "shell32.lib")
7781+#if _MSC_VER == 1200
7782 int __stdcall WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdLine, int nShow)
7783 #else // _WIN32
7784 int main( int argc, char **argv )
7785 #endif
7786 {
7787
7788-#if _WIN32 && !__MINGW32__ && ( _MSC_VER == 1200 || !defined(XASH_SDL) )
7789+#if _MSC_VER == 1200
7790 LPWSTR* lpArgv = CommandLineToArgvW(GetCommandLineW(), &szArgc);
7791 int size, i = 0;
7792 szArgv = (char**)malloc(szArgc*sizeof(char*));
7793diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt
7794index 0c5630f..3e99ce3 100644
7795--- a/loader/CMakeLists.txt
7796+++ b/loader/CMakeLists.txt
7797@@ -34,11 +34,7 @@ set (LOADER_LIBRARY loader)
7798
7799 file (GLOB_RECURSE LOADER_SOURCES *.c)
7800 INCLUDE_DIRECTORIES(. wine/)
7801-if(XASH_STATIC)
7802- add_library (${LOADER_LIBRARY} STATIC ${LOADER_SOURCES})
7803-else()
7804 add_library (${LOADER_LIBRARY} SHARED ${LOADER_SOURCES})
7805-endif()
7806
7807 IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
7808 target_link_libraries (${LOADER_LIBRARY} -lm -pthread -lexecinfo)
7809diff --git a/loader/win32.c b/loader/win32.c
7810index af676a3..6d122ce 100644
7811--- a/loader/win32.c
7812+++ b/loader/win32.c
7813@@ -6577,6 +6577,7 @@ no_dll_byname:
7814 static void *WINAPI expwglGetProcAddress(const char *name)
7815 {
7816 int i;
7817+#ifdef SDL
7818 for(i=0; i < sizeof(glfunctions)/sizeof(struct glfuncs);i++)
7819 {
7820 if(strcasecmp(glfunctions[i].name, name))
7821@@ -6587,6 +6588,7 @@ static void *WINAPI expwglGetProcAddress(const char *name)
7822 return 0;
7823 }
7824 dbgprintf("Function %s not implemented in loader\n", name);
7825+#endif
7826 return 0;
7827 }
7828
7829diff --git a/mainui/basemenu.cpp b/mainui/basemenu.cpp
7830index 31bad8c..c4f501a 100644
7831--- a/mainui/basemenu.cpp
7832+++ b/mainui/basemenu.cpp
7833@@ -1171,7 +1171,7 @@ void UI_KeyEvent( int key, int down )
7834 return;
7835 if( key == K_MOUSE1 )
7836 {
7837- cursorDown = !!down;
7838+ cursorDown = down;
7839 }
7840
7841 if( uiStatic.menuActive->keyFunc )
7842@@ -1434,7 +1434,7 @@ void UI_AddServerToList( netadr_t adr, const char *info )
7843 if( uiStatic.numServers == UI_MAX_SERVERS )
7844 return; // full
7845
7846- if( stricmp( gMenu.m_gameinfo.gamefolder, Info_ValueForKey( info, "gamedir" )) != 0 )
7847+ if( stricmp( gMenu.m_gameinfo.gamefolder, Info_ValueForKey( info, "gamedir" )))
7848 return;
7849
7850 // ignore if duplicated
7851diff --git a/mainui/menu_credits.cpp b/mainui/menu_credits.cpp
7852index 7b9154a..5aec6d7 100644
7853--- a/mainui/menu_credits.cpp
7854+++ b/mainui/menu_credits.cpp
7855@@ -58,21 +58,18 @@ UI_Credits_DrawFunc
7856 static void UI_Credits_DrawFunc( void )
7857 {
7858 int i, y;
7859- float speed;
7860+ float speed = 40.0f;
7861 int w = UI_MED_CHAR_WIDTH;
7862 int h = UI_MED_CHAR_HEIGHT;
7863 int color = 0;
7864
7865 // draw the background first
7866 if( !uiCredits.finalCredits && !CVAR_GET_FLOAT( "cl_background" ))
7867- {
7868 UI_DrawPic( 0, 0, 1024 * uiStatic.scaleX, 768 * uiStatic.scaleY, uiColorWhite, ART_BACKGROUND );
7869+ else speed = 45.0f; // syncronize with final background track :-)
7870
7871 // otherwise running on cutscene
7872 speed = 32.0f * (768.0f / ScreenHeight);
7873- }
7874- else speed = 45.0f; // syncronize with final background track :-)
7875-
7876
7877 // now draw the credits
7878 UI_ScaleCoords( NULL, NULL, &w, &h );
7879diff --git a/mainui/menu_customgame.cpp b/mainui/menu_customgame.cpp
7880index 3871051..09c8171 100644
7881--- a/mainui/menu_customgame.cpp
7882+++ b/mainui/menu_customgame.cpp
7883@@ -166,7 +166,7 @@ static void UI_CustomGame_GetModList( void )
7884 // see if the load button should be grayed
7885 if( !stricmp( gMenu.m_gameinfo.gamefolder, uiCustomGame.modsDir[uiCustomGame.modList.curItem] ))
7886 uiCustomGame.load.generic.flags |= QMF_GRAYED;
7887- if( uiCustomGame.modsWebSites[uiCustomGame.modList.curItem][0] == '\0' )
7888+ if( strlen( uiCustomGame.modsWebSites[uiCustomGame.modList.curItem] ) == 0 )
7889 uiCustomGame.go2url.generic.flags |= QMF_GRAYED;
7890 }
7891
7892@@ -186,7 +186,7 @@ static void UI_CustomGame_Callback( void *self, int event )
7893 uiCustomGame.load.generic.flags |= QMF_GRAYED;
7894 else uiCustomGame.load.generic.flags &= ~QMF_GRAYED;
7895
7896- if( uiCustomGame.modsWebSites[uiCustomGame.modList.curItem][0] == '\0' )
7897+ if( strlen( uiCustomGame.modsWebSites[uiCustomGame.modList.curItem] ) == 0 )
7898 uiCustomGame.go2url.generic.flags |= QMF_GRAYED;
7899 else uiCustomGame.go2url.generic.flags &= ~QMF_GRAYED;
7900 return;
7901@@ -201,7 +201,7 @@ static void UI_CustomGame_Callback( void *self, int event )
7902 UI_PopMenu();
7903 break;
7904 case ID_GOTOSITE:
7905- if( uiCustomGame.modsWebSites[uiCustomGame.modList.curItem][0] )
7906+ if( strlen( uiCustomGame.modsWebSites[uiCustomGame.modList.curItem] ))
7907 SHELL_EXECUTE( uiCustomGame.modsWebSites[uiCustomGame.modList.curItem], NULL, false );
7908 break;
7909 case ID_ACTIVATE:
7910diff --git a/mainui/menu_loadgame.cpp b/mainui/menu_loadgame.cpp
7911index a38e95a..883548b 100644
7912--- a/mainui/menu_loadgame.cpp
7913+++ b/mainui/menu_loadgame.cpp
7914@@ -142,7 +142,7 @@ static void UI_LoadGame_GetGameList( void )
7915
7916 if( !GET_SAVE_COMMENT( filenames[i], comment ))
7917 {
7918- if( comment[0] )
7919+ if( strlen( comment ))
7920 {
7921 // get name string even if not found - SV_GetComment can be mark saves
7922 // as <CORRUPTED> <OLD VERSION> etc
7923@@ -177,11 +177,11 @@ static void UI_LoadGame_GetGameList( void )
7924
7925 uiLoadGame.savesList.itemNames = (const char **)uiLoadGame.saveDescriptionPtr;
7926
7927- if ( uiLoadGame.saveName[0][0] == '\0' )
7928+ if ( strlen( uiLoadGame.saveName[0] ) == 0 )
7929 uiLoadGame.load.generic.flags |= QMF_GRAYED;
7930 else uiLoadGame.load.generic.flags &= ~QMF_GRAYED;
7931
7932- if ( uiLoadGame.delName[0][0] == '\0' )
7933+ if ( strlen( uiLoadGame.delName[0] ) == 0 )
7934 uiLoadGame.remove.generic.flags |= QMF_GRAYED;
7935 else uiLoadGame.remove.generic.flags &= ~QMF_GRAYED;
7936 }
7937@@ -197,11 +197,11 @@ static void UI_LoadGame_Callback( void *self, int event )
7938
7939 if( event == QM_CHANGED )
7940 {
7941- if( uiLoadGame.saveName[uiLoadGame.savesList.curItem][0] == '\0' )
7942+ if( strlen( uiLoadGame.saveName[uiLoadGame.savesList.curItem] ) == 0 )
7943 uiLoadGame.load.generic.flags |= QMF_GRAYED;
7944 else uiLoadGame.load.generic.flags &= ~QMF_GRAYED;
7945
7946- if( uiLoadGame.delName[uiLoadGame.savesList.curItem][0] == '\0' )
7947+ if( strlen( uiLoadGame.delName[uiLoadGame.savesList.curItem] ) == 0 )
7948 uiLoadGame.remove.generic.flags |= QMF_GRAYED;
7949 else uiLoadGame.remove.generic.flags &= ~QMF_GRAYED;
7950 return;
7951@@ -216,7 +216,7 @@ static void UI_LoadGame_Callback( void *self, int event )
7952 UI_PopMenu();
7953 break;
7954 case ID_LOAD:
7955- if( uiLoadGame.saveName[uiLoadGame.savesList.curItem][0] )
7956+ if( strlen( uiLoadGame.saveName[uiLoadGame.savesList.curItem] ))
7957 {
7958 char cmd[128];
7959 sprintf( cmd, "load \"%s\"\n", uiLoadGame.saveName[uiLoadGame.savesList.curItem] );
7960@@ -231,7 +231,7 @@ static void UI_LoadGame_Callback( void *self, int event )
7961 UI_DeleteDialog();
7962 break;
7963 case ID_YES:
7964- if( uiLoadGame.delName[uiLoadGame.savesList.curItem][0] )
7965+ if( strlen( uiLoadGame.delName[uiLoadGame.savesList.curItem] ))
7966 {
7967 char cmd[128];
7968 sprintf( cmd, "killsave \"%s\"\n", uiLoadGame.delName[uiLoadGame.savesList.curItem] );
7969@@ -272,7 +272,7 @@ static void UI_LoadGame_Ownerdraw( void *self )
7970
7971 UI_ScaleCoords( &x, &y, &w, &h );
7972
7973- if( uiLoadGame.saveName[uiLoadGame.savesList.curItem][0] )
7974+ if( strlen( uiLoadGame.saveName[uiLoadGame.savesList.curItem] ))
7975 {
7976 char saveshot[128];
7977
7978diff --git a/mainui/menu_main.cpp b/mainui/menu_main.cpp
7979index 9dd9221..c7cf7f6 100644
7980--- a/mainui/menu_main.cpp
7981+++ b/mainui/menu_main.cpp
7982@@ -353,7 +353,7 @@ static void UI_Main_Init( void )
7983 memset( &uiMain, 0, sizeof( uiMain_t ));
7984
7985 // training map is present and not equal to startmap
7986- if( gMenu.m_gameinfo.trainmap[0] && stricmp( gMenu.m_gameinfo.trainmap, gMenu.m_gameinfo.startmap ) != 0 )
7987+ if( strlen( gMenu.m_gameinfo.trainmap ) && stricmp( gMenu.m_gameinfo.trainmap, gMenu.m_gameinfo.startmap ))
7988 bTrainMap = true;
7989 else bTrainMap = false;
7990
7991diff --git a/mainui/menu_playersetup.cpp b/mainui/menu_playersetup.cpp
7992index 144d507..dc5cf67 100644
7993--- a/mainui/menu_playersetup.cpp
7994+++ b/mainui/menu_playersetup.cpp
7995@@ -123,7 +123,7 @@ static void UI_PlayerSetup_FindModels( void )
7996 for( i = 0; i < numFiles; i++ )
7997 {
7998 COM_FileBase( filenames[i], name );
7999- snprintf( path, sizeof(path), "models/player/%s/%s.mdl", name, name );
8000+ sprintf( path, "models/player/%s/%s.mdl", name, name );
8001 if( !FILE_EXISTS( path )) continue;
8002
8003 strcpy( uiPlayerSetup.models[uiPlayerSetup.num_models], name );
8004@@ -206,7 +206,7 @@ static void UI_PlayerSetup_UpdateConfig( void )
8005 int topColor, bottomColor;
8006
8007 // see if the model has changed
8008- if( stricmp( uiPlayerSetup.currentModel, uiPlayerSetup.models[(int)uiPlayerSetup.model.curValue] ) != 0 )
8009+ if( stricmp( uiPlayerSetup.currentModel, uiPlayerSetup.models[(int)uiPlayerSetup.model.curValue] ))
8010 {
8011 strcpy( uiPlayerSetup.currentModel, uiPlayerSetup.models[(int)uiPlayerSetup.model.curValue] );
8012 }
8013@@ -221,8 +221,8 @@ static void UI_PlayerSetup_UpdateConfig( void )
8014 }
8015 else
8016 {
8017- snprintf( path, sizeof(path), "models/player/%s/%s.mdl", name, name );
8018- snprintf( newImage, sizeof(newImage), "models/player/%s/%s.bmp", name, name );
8019+ sprintf( path, "models/player/%s/%s.mdl", name, name );
8020+ sprintf( newImage, "models/player/%s/%s.bmp", name, name );
8021 }
8022
8023 topColor = (int)(uiPlayerSetup.topColor.curValue * 255 );
8024@@ -243,7 +243,7 @@ static void UI_PlayerSetup_UpdateConfig( void )
8025
8026 if( !ui_showmodels->value )
8027 {
8028- if( stricmp( lastImage, newImage ) != 0 )
8029+ if( stricmp( lastImage, newImage ))
8030 {
8031 if( lastImage[0] && playerImage )
8032 {
8033@@ -253,9 +253,9 @@ static void UI_PlayerSetup_UpdateConfig( void )
8034 playerImage = 0;
8035 }
8036
8037- if( stricmp( name, "player" ) != 0 )
8038+ if( stricmp( name, "player" ))
8039 {
8040- snprintf( lastImage, sizeof(lastImage), "models/player/%s/%s.bmp", name, name );
8041+ sprintf( lastImage, "models/player/%s/%s.bmp", name, name );
8042 playerImage = PIC_Load( lastImage, PIC_KEEP_8BIT ); // if present of course
8043 }
8044 else if( lastImage[0] && playerImage )
8045diff --git a/mainui/menu_savegame.cpp b/mainui/menu_savegame.cpp
8046index 1463029..9dc63ea 100644
8047--- a/mainui/menu_savegame.cpp
8048+++ b/mainui/menu_savegame.cpp
8049@@ -158,7 +158,7 @@ static void UI_SaveGame_GetGameList( void )
8050
8051 if ( !GET_SAVE_COMMENT( filenames[j], comment ))
8052 {
8053- if ( comment[0] )
8054+ if ( strlen( comment ))
8055 {
8056 // get name string even if not found - SV_GetComment can be mark saves
8057 // as <CORRUPTED> <OLD VERSION> etc
8058@@ -194,11 +194,11 @@ static void UI_SaveGame_GetGameList( void )
8059
8060 uiSaveGame.savesList.itemNames = (const char **)uiSaveGame.saveDescriptionPtr;
8061
8062- if ( uiSaveGame.saveName[0][0] == 0 || CL_IsActive() == FALSE )
8063+ if ( strlen( uiSaveGame.saveName[0] ) == 0 || CL_IsActive() == FALSE )
8064 uiSaveGame.save.generic.flags |= QMF_GRAYED;
8065 else uiSaveGame.save.generic.flags &= ~QMF_GRAYED;
8066
8067- if ( uiSaveGame.delName[0][0] == 0 )
8068+ if ( strlen( uiSaveGame.delName[0] ) == 0 )
8069 uiSaveGame.remove.generic.flags |= QMF_GRAYED;
8070 else uiSaveGame.remove.generic.flags &= ~QMF_GRAYED;
8071 }
8072@@ -215,11 +215,11 @@ static void UI_SaveGame_Callback( void *self, int event )
8073 if( event == QM_CHANGED )
8074 {
8075 // never overwrite existing saves, because their names was never get collision
8076- if ( uiSaveGame.saveName[uiSaveGame.savesList.curItem][0] == 0 || CL_IsActive() == FALSE )
8077+ if ( strlen( uiSaveGame.saveName[uiSaveGame.savesList.curItem] ) == 0 || CL_IsActive() == FALSE )
8078 uiSaveGame.save.generic.flags |= QMF_GRAYED;
8079 else uiSaveGame.save.generic.flags &= ~QMF_GRAYED;
8080
8081- if ( uiSaveGame.delName[uiSaveGame.savesList.curItem][0] == 0 )
8082+ if ( strlen( uiSaveGame.delName[uiSaveGame.savesList.curItem] ) == 0 )
8083 uiSaveGame.remove.generic.flags |= QMF_GRAYED;
8084 else uiSaveGame.remove.generic.flags &= ~QMF_GRAYED;
8085 return;
8086@@ -234,7 +234,7 @@ static void UI_SaveGame_Callback( void *self, int event )
8087 UI_PopMenu();
8088 break;
8089 case ID_SAVE:
8090- if( uiSaveGame.saveName[uiSaveGame.savesList.curItem][0] )
8091+ if( strlen( uiSaveGame.saveName[uiSaveGame.savesList.curItem] ))
8092 {
8093 char cmd[128];
8094
8095@@ -251,7 +251,7 @@ static void UI_SaveGame_Callback( void *self, int event )
8096 UI_DeleteDialog();
8097 break;
8098 case ID_YES:
8099- if( uiSaveGame.delName[uiSaveGame.savesList.curItem][0] )
8100+ if( strlen( uiSaveGame.delName[uiSaveGame.savesList.curItem] ))
8101 {
8102 char cmd[128];
8103 sprintf( cmd, "killsave \"%s\"\n", uiSaveGame.delName[uiSaveGame.savesList.curItem] );
8104@@ -292,7 +292,7 @@ static void UI_SaveGame_Ownerdraw( void *self )
8105
8106 UI_ScaleCoords( &x, &y, &w, &h );
8107
8108- if( uiSaveGame.saveName[uiSaveGame.savesList.curItem][0] )
8109+ if( strlen( uiSaveGame.saveName[uiSaveGame.savesList.curItem] ))
8110 {
8111 char saveshot[128];
8112
8113diff --git a/mainui/menu_touchbuttons.cpp b/mainui/menu_touchbuttons.cpp
8114index cacb8f0..4424ee1 100644
8115--- a/mainui/menu_touchbuttons.cpp
8116+++ b/mainui/menu_touchbuttons.cpp
8117@@ -396,7 +396,7 @@ static void UI_TouchButtons_Callback( void *self, int event )
8118 uiTouchButtons.yes.generic.flags |= QMF_HIDDEN;
8119 break;
8120 case ID_SAVE:
8121- if( uiTouchButtons.name.buffer[0] )
8122+ if( strlen(uiTouchButtons.name.buffer) > 0)
8123 {
8124 char command[256];
8125 snprintf( command, 256, "touch_addbutton \"%s\" \"%s\" \"%s\"\n", uiTouchButtons.name.buffer,
8126@@ -404,7 +404,7 @@ static void UI_TouchButtons_Callback( void *self, int event )
8127 CLIENT_COMMAND(0, command);
8128 snprintf( command, 256, "touch_setflags \"%s\" %i\n", uiTouchButtons.name.buffer, uiTouchButtons.curflags );
8129 CLIENT_COMMAND(0, command);
8130- snprintf( command, 256, "touch_setcolor \"%s\" %u %u %u %u\n", uiTouchButtons.name.buffer, CURCOLOR1(red), CURCOLOR1(green), CURCOLOR1(blue),CURCOLOR1(alpha) );
8131+ snprintf( command, 256, "touch_setcolor \"%s\" %d %d %d %d\n", uiTouchButtons.name.buffer, CURCOLOR1(red), CURCOLOR1(green), CURCOLOR1(blue),CURCOLOR1(alpha) );
8132 CLIENT_COMMAND(1, command);
8133 uiTouchButtons.name.buffer[0] = 0;
8134 uiTouchButtons.name.cursor = 0;
8135@@ -418,7 +418,7 @@ static void UI_TouchButtons_Callback( void *self, int event )
8136 CLIENT_COMMAND(0, command);
8137 snprintf( command, 256, "touch_setflags \"%s\" %i\n", uiTouchButtons.selectedName, uiTouchButtons.curflags );
8138 CLIENT_COMMAND(0, command);
8139- snprintf( command, 256, "touch_setcolor \"%s\" %u %u %u %u\n", uiTouchButtons.selectedName, CURCOLOR1(red), CURCOLOR1(green), CURCOLOR1(blue),CURCOLOR1(alpha) );
8140+ snprintf( command, 256, "touch_setcolor \"%s\" %d %d %d %d\n", uiTouchButtons.selectedName, CURCOLOR1(red), CURCOLOR1(green), CURCOLOR1(blue),CURCOLOR1(alpha) );
8141 CLIENT_COMMAND(1, command);
8142 }
8143 UI_TouchButtons_GetButtonList();
8144diff --git a/mainui/utils.cpp b/mainui/utils.cpp
8145index bd9dc97..c47b730 100644
8146--- a/mainui/utils.cpp
8147+++ b/mainui/utils.cpp
8148@@ -683,14 +683,14 @@ void UI_ScrollList_Draw( menuScrollList_s *sl )
8149 static float ac_y = 0;
8150 ac_y += cursorDY;
8151 cursorDY = 0;
8152- if( ac_y > sl->generic.charHeight / 2.0f )
8153+ if( ac_y > sl->generic.charHeight / 2 )
8154 {
8155 sl->topItem -= ac_y/ sl->generic.charHeight - 0.5;
8156 if( sl->topItem < 0 )
8157 sl->topItem = 0;
8158 ac_y = 0;
8159 }
8160- if( ac_y < -sl->generic.charHeight / 2.0f )
8161+ if( ac_y < -sl->generic.charHeight / 2 )
8162 {
8163 sl->topItem -= ac_y/ sl->generic.charHeight - 0.5 ;
8164 if( sl->topItem > sl->numItems - sl->numRows )
8165@@ -1101,8 +1101,8 @@ void UI_SpinControl_Draw( menuSpinControl_s *sc )
8166 if( sc->generic.flags & QMF_HIGHLIGHTIFFOCUS )
8167 {
8168 UI_DrawString( x, y, w, h, sc->generic.name, sc->generic.focusColor, false, sc->generic.charWidth, sc->generic.charHeight, justify, shadow );
8169- UI_DrawPic( leftX, leftY, arrowWidth, arrowHeight, sc->generic.color, (leftFocus) ? sc->leftArrowFocus : sc->leftArrow );
8170- UI_DrawPic( rightX, rightY, arrowWidth, arrowHeight, sc->generic.color, (rightFocus) ? sc->rightArrowFocus : sc->rightArrow );
8171+ UI_DrawPic( leftX, leftY, arrowWidth, arrowHeight, (leftFocus) ? sc->generic.color : sc->generic.color, (leftFocus) ? sc->leftArrowFocus : sc->leftArrow );
8172+ UI_DrawPic( rightX, rightY, arrowWidth, arrowHeight, (rightFocus) ? sc->generic.color : sc->generic.color, (rightFocus) ? sc->rightArrowFocus : sc->rightArrow );
8173 }
8174 else if( sc->generic.flags & QMF_PULSEIFFOCUS )
8175 {
8176diff --git a/vgui_support/CMakeLists.txt b/vgui_support/CMakeLists.txt
8177index bdd3a10..4169117 100644
8178--- a/vgui_support/CMakeLists.txt
8179+++ b/vgui_support/CMakeLists.txt
8180@@ -35,7 +35,7 @@ set (VGUI_SUPPORT_LIBRARY vgui_support)
8181 file (GLOB VGUI_SUPPORT_SOURCES *.cpp *.c)
8182 include_directories (. ../common ../engine ../engine/common ../engine/client ../engine/client/vgui ${HL_SDK_DIR}/utils/vgui/include/)
8183
8184-add_library (${VGUI_SUPPORT_LIBRARY} MODULE ${VGUI_SUPPORT_SOURCES})
8185+add_library (${VGUI_SUPPORT_LIBRARY} SHARED ${VGUI_SUPPORT_SOURCES})
8186
8187 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
8188 target_link_libraries(${VGUI_SUPPORT_LIBRARY} -L${HL_SDK_DIR}/linux/release/ ${HL_SDK_DIR}/linux/release/vgui.dylib)
8189@@ -44,7 +44,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
8190
8191 #Make GCC don't put full path to vgui.so
8192 add_custom_command(TARGET vgui_support PRE_LINK COMMAND
8193- ${CMAKE_COMMAND} -E copy ${HL_SDK_DIR}/linux/vgui.so $<TARGET_FILE_DIR:vgui_support>)
8194+ ${CMAKE_COMMAND} -E copy ${HL_SDK_DIR}/linux/vgui.so $<TARGET_SONAME_FILE_DIR:vgui_support>)
8195 target_link_libraries(${VGUI_SUPPORT_LIBRARY} -L. -l:vgui.so)
8196 endif()
8197
8198@@ -56,5 +56,5 @@ set_target_properties (${VGUI_SUPPORT_SHARED} PROPERTIES
8199
8200 install( TARGETS ${VGUI_SUPPORT_LIBRARY} DESTINATION ${LIB_INSTALL_DIR}/xash3d
8201 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
8202-install( FILES $<TARGET_FILE_DIR:vgui_support>/vgui.so DESTINATION ${LIB_INSTALL_DIR}/xash3d
8203+install( FILES $<TARGET_SONAME_FILE_DIR:vgui_support>/vgui.so DESTINATION ${LIB_INSTALL_DIR}/xash3d
8204 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
8205diff --git a/vgui_support/utlmemory.h b/vgui_support/utlmemory.h
8206index 640f43b..7136515 100644
8207--- a/vgui_support/utlmemory.h
8208+++ b/vgui_support/utlmemory.h
8209@@ -294,12 +294,7 @@ void CUtlMemory<T>::Grow( int num )
8210
8211 if (m_pMemory)
8212 {
8213- T* pTempMemory = ( T* )realloc( m_pMemory, m_nAllocationCount * sizeof( T ) );
8214-
8215- if( !pTempMemory )
8216- return;
8217-
8218- m_pMemory = pTempMemory;
8219+ m_pMemory = (T*)realloc( m_pMemory, m_nAllocationCount * sizeof(T) );
8220 }
8221 else
8222 {
8223@@ -327,12 +322,7 @@ inline void CUtlMemory<T>::EnsureCapacity( int num )
8224 m_nAllocationCount = num;
8225 if (m_pMemory)
8226 {
8227- T* pTempMemory = ( T* )realloc( m_pMemory, m_nAllocationCount * sizeof( T ) );
8228-
8229- if( !pTempMemory )
8230- return;
8231-
8232- m_pMemory = pTempMemory;
8233+ m_pMemory = (T*)realloc( m_pMemory, m_nAllocationCount * sizeof(T) );
8234 }
8235 else
8236 {
8237diff --git a/vgui_support/vgui_font.cpp b/vgui_support/vgui_font.cpp
8238index 40421df..11275aa 100644
8239--- a/vgui_support/vgui_font.cpp
8240+++ b/vgui_support/vgui_font.cpp
8241@@ -123,10 +123,6 @@ bool FontCache::AllocatePageForChar( int charWide, int charTall, int &pageIndex,
8242 {
8243 // see if there is room in the last page for this character
8244 int nPageType = ComputePageType( charTall );
8245-
8246- if( nPageType < 0 )
8247- return false;
8248-
8249 pageIndex = m_pCurrPage[nPageType];
8250
8251 int nNextX = 0;
8252diff --git a/vgui_support/vgui_surf.cpp b/vgui_support/vgui_surf.cpp
8253index 0960104..102f3ee 100644
8254--- a/vgui_support/vgui_surf.cpp
8255+++ b/vgui_support/vgui_surf.cpp
8256@@ -40,8 +40,6 @@ CEngineSurface :: CEngineSurface( Panel *embeddedPanel ):SurfaceBase( embeddedPa
8257 embeddedPanel->getSize(_surfaceExtents[2], _surfaceExtents[3]);
8258 _drawTextPos[0] = _drawTextPos[1] = 0;
8259 _hCurrentFont = null;
8260- _hCurrentCursor = null;
8261- _translateX = _translateY = 0;
8262 }
8263
8264 CEngineSurface :: ~CEngineSurface( void )