Merged updated SDK code from upstream git repo at https://github.com/ValveSoftware/halflife/
authorScott Ehlert <ds@alliedmods.net>
Thu Sep 05 19:47:29 2013 -0500 (2013-09-05)
changeset 10e4fa4607efa0
parent 9 71f739086823
child 11 93715aa63ae0
Merged updated SDK code from upstream git repo at https://github.com/ValveSoftware/halflife/
multiplayer/LICENSE
multiplayer/README.md
multiplayer/cl_dll/Exports.h
multiplayer/cl_dll/GameStudioModelRenderer.cpp
multiplayer/cl_dll/MOTD.cpp
multiplayer/cl_dll/StudioModelRenderer.cpp
multiplayer/cl_dll/ammo.cpp
multiplayer/cl_dll/ammo.h
multiplayer/cl_dll/ammohistory.cpp
multiplayer/cl_dll/ammohistory.h
multiplayer/cl_dll/battery.cpp
multiplayer/cl_dll/bench.h
multiplayer/cl_dll/cdll_int.cpp
multiplayer/cl_dll/cl_dll.dsp
multiplayer/cl_dll/cl_dll.h
multiplayer/cl_dll/cl_util.h
multiplayer/cl_dll/com_weapons.cpp
multiplayer/cl_dll/com_weapons.h
multiplayer/cl_dll/death.cpp
multiplayer/cl_dll/demo.cpp
multiplayer/cl_dll/entity.cpp
multiplayer/cl_dll/ev_hldm.cpp
multiplayer/cl_dll/geiger.cpp
multiplayer/cl_dll/global_consts.h
multiplayer/cl_dll/health.cpp
multiplayer/cl_dll/health.h
multiplayer/cl_dll/hl/hl_baseentity.cpp
multiplayer/cl_dll/hl/hl_weapons.cpp
multiplayer/cl_dll/hud.cpp
multiplayer/cl_dll/hud.h
multiplayer/cl_dll/hud_bench.cpp
multiplayer/cl_dll/hud_benchtrace.cpp
multiplayer/cl_dll/hud_benchtrace.h
multiplayer/cl_dll/hud_iface.h
multiplayer/cl_dll/hud_msg.cpp
multiplayer/cl_dll/hud_redraw.cpp
multiplayer/cl_dll/hud_servers.cpp
multiplayer/cl_dll/hud_spectator.cpp
multiplayer/cl_dll/hud_spectator.h
multiplayer/cl_dll/in_camera.cpp
multiplayer/cl_dll/in_defs.h
multiplayer/cl_dll/input.cpp
multiplayer/cl_dll/inputw32.cpp
multiplayer/cl_dll/interpolation.cpp
multiplayer/cl_dll/interpolation.h
multiplayer/cl_dll/menu.cpp
multiplayer/cl_dll/message.cpp
multiplayer/cl_dll/msvc10/cl_dll.sln
multiplayer/cl_dll/msvc10/cl_dll.vcxproj
multiplayer/cl_dll/msvc10/cl_dll.vcxproj.filters
multiplayer/cl_dll/msvc11/cl_dll.sln
multiplayer/cl_dll/msvc11/cl_dll.vcxproj
multiplayer/cl_dll/msvc11/cl_dll.vcxproj.filters
multiplayer/cl_dll/msvc6/cl_dll.dsp
multiplayer/cl_dll/msvc7/cl_dll.vcproj
multiplayer/cl_dll/msvc8/cl_dll.vcproj
multiplayer/cl_dll/overview.h
multiplayer/cl_dll/parsemsg.cpp
multiplayer/cl_dll/parsemsg.h
multiplayer/cl_dll/player_info.h
multiplayer/cl_dll/readme.txt
multiplayer/cl_dll/saytext.cpp
multiplayer/cl_dll/scoreboard.cpp
multiplayer/cl_dll/status_icons.cpp
multiplayer/cl_dll/statusbar.cpp
multiplayer/cl_dll/text_message.cpp
multiplayer/cl_dll/tri.cpp
multiplayer/cl_dll/tri.h
multiplayer/cl_dll/util.cpp
multiplayer/cl_dll/util_vector.h
multiplayer/cl_dll/vgui_ClassMenu.cpp
multiplayer/cl_dll/vgui_CustomObjects.cpp
multiplayer/cl_dll/vgui_MOTDWindow.cpp
multiplayer/cl_dll/vgui_SchemeManager.cpp
multiplayer/cl_dll/vgui_ScorePanel.cpp
multiplayer/cl_dll/vgui_ScorePanel.h
multiplayer/cl_dll/vgui_ServerBrowser.cpp
multiplayer/cl_dll/vgui_ServerBrowser.h
multiplayer/cl_dll/vgui_SpectatorPanel.cpp
multiplayer/cl_dll/vgui_SpectatorPanel.h
multiplayer/cl_dll/vgui_TeamFortressViewport.cpp
multiplayer/cl_dll/vgui_TeamFortressViewport.h
multiplayer/cl_dll/vgui_teammenu.cpp
multiplayer/cl_dll/view.cpp
multiplayer/cl_dll/voice_status.cpp
multiplayer/cl_dll/voice_status.h
multiplayer/common/Sequence.h
multiplayer/common/con_nprint.h
multiplayer/common/const.h
multiplayer/common/crc.h
multiplayer/common/cvardef.h
multiplayer/common/engine_launcher_api.h
multiplayer/common/enums.h
multiplayer/common/exefuncs.h
multiplayer/common/hltv.h
multiplayer/common/ivoicetweak.h
multiplayer/common/mathlib.h
multiplayer/common/nowin.h
multiplayer/common/parsemsg.cpp
multiplayer/common/parsemsg.h
multiplayer/common/port.h
multiplayer/common/qfont.h
multiplayer/common/r_efx.h
multiplayer/common/r_studioint.h
multiplayer/common/triangleapi.h
multiplayer/dlls/AI_BaseNPC_Schedule.cpp
multiplayer/dlls/Makefile
multiplayer/dlls/Wxdebug.cpp
multiplayer/dlls/activity.h
multiplayer/dlls/aflock.cpp
multiplayer/dlls/agrunt.cpp
multiplayer/dlls/animation.cpp
multiplayer/dlls/apache.cpp
multiplayer/dlls/barnacle.cpp
multiplayer/dlls/barney.cpp
multiplayer/dlls/basemonster.h
multiplayer/dlls/bigmomma.cpp
multiplayer/dlls/bloater.cpp
multiplayer/dlls/bmodels.cpp
multiplayer/dlls/bullsquid.cpp
multiplayer/dlls/buttons.cpp
multiplayer/dlls/cbase.cpp
multiplayer/dlls/cbase.h
multiplayer/dlls/client.cpp
multiplayer/dlls/combat.cpp
multiplayer/dlls/controller.cpp
multiplayer/dlls/crossbow.cpp
multiplayer/dlls/crowbar.cpp
multiplayer/dlls/decals.h
multiplayer/dlls/defaultai.cpp
multiplayer/dlls/defaultai.h
multiplayer/dlls/doors.cpp
multiplayer/dlls/effects.cpp
multiplayer/dlls/effects.h
multiplayer/dlls/extdll.h
multiplayer/dlls/flyingmonster.cpp
multiplayer/dlls/flyingmonster.h
multiplayer/dlls/func_break.cpp
multiplayer/dlls/func_tank.cpp
multiplayer/dlls/game.cpp
multiplayer/dlls/gargantua.cpp
multiplayer/dlls/gauss.cpp
multiplayer/dlls/genericmonster.cpp
multiplayer/dlls/ggrenade.cpp
multiplayer/dlls/glock.cpp
multiplayer/dlls/gman.cpp
multiplayer/dlls/h_battery.cpp
multiplayer/dlls/h_cine.cpp
multiplayer/dlls/h_cycler.cpp
multiplayer/dlls/h_export.cpp
multiplayer/dlls/handgrenade.cpp
multiplayer/dlls/hassassin.cpp
multiplayer/dlls/headcrab.cpp
multiplayer/dlls/healthkit.cpp
multiplayer/dlls/hgrunt.cpp
multiplayer/dlls/hl.def
multiplayer/dlls/hl.dsp
multiplayer/dlls/hlgl.def
multiplayer/dlls/hornet.cpp
multiplayer/dlls/hornetgun.cpp
multiplayer/dlls/houndeye.cpp
multiplayer/dlls/ichthyosaur.cpp
multiplayer/dlls/islave.cpp
multiplayer/dlls/leech.cpp
multiplayer/dlls/lights.cpp
multiplayer/dlls/monstermaker.cpp
multiplayer/dlls/monsters.cpp
multiplayer/dlls/monsters.h
multiplayer/dlls/monsterstate.cpp
multiplayer/dlls/mortar.cpp
multiplayer/dlls/mp.def
multiplayer/dlls/mp.dsp
multiplayer/dlls/mp5.cpp
multiplayer/dlls/msvc10/hl.sln
multiplayer/dlls/msvc10/hl.vcxproj
multiplayer/dlls/msvc10/hl.vcxproj.filters
multiplayer/dlls/msvc11/hl.sln
multiplayer/dlls/msvc11/hl.vcxproj
multiplayer/dlls/msvc11/hl.vcxproj.filters
multiplayer/dlls/msvc6/mp.dsp
multiplayer/dlls/msvc7/mp.vcproj
multiplayer/dlls/msvc8/mp.vcproj
multiplayer/dlls/multiplay_gamerules.cpp
multiplayer/dlls/nihilanth.cpp
multiplayer/dlls/nodes.cpp
multiplayer/dlls/nodes.h
multiplayer/dlls/observer.cpp
multiplayer/dlls/osprey.cpp
multiplayer/dlls/plats.cpp
multiplayer/dlls/player.cpp
multiplayer/dlls/player.h
multiplayer/dlls/playermonster.cpp
multiplayer/dlls/python.cpp
multiplayer/dlls/rat.cpp
multiplayer/dlls/roach.cpp
multiplayer/dlls/rpg.cpp
multiplayer/dlls/satchel.cpp
multiplayer/dlls/saverestore.h
multiplayer/dlls/schedule.cpp
multiplayer/dlls/schedule.h
multiplayer/dlls/scientist.cpp
multiplayer/dlls/scripted.cpp
multiplayer/dlls/scripted.h
multiplayer/dlls/shotgun.cpp
multiplayer/dlls/skill.cpp
multiplayer/dlls/skill.h
multiplayer/dlls/sound.cpp
multiplayer/dlls/squad.h
multiplayer/dlls/squadmonster.cpp
multiplayer/dlls/squadmonster.h
multiplayer/dlls/squeakgrenade.cpp
multiplayer/dlls/stats.cpp
multiplayer/dlls/subs.cpp
multiplayer/dlls/talkmonster.cpp
multiplayer/dlls/talkmonster.h
multiplayer/dlls/tempmonster.cpp
multiplayer/dlls/tentacle.cpp
multiplayer/dlls/triggers.cpp
multiplayer/dlls/tripmine.cpp
multiplayer/dlls/turret.cpp
multiplayer/dlls/util.cpp
multiplayer/dlls/util.h
multiplayer/dlls/weapons.cpp
multiplayer/dlls/weapons.h
multiplayer/dlls/world.cpp
multiplayer/dlls/wpn_shared/hl_wpn_glock.cpp
multiplayer/dlls/wxdebug.h
multiplayer/dlls/zombie.cpp
multiplayer/dmc/cl_dll/CTF_FlagStatus.cpp
multiplayer/dmc/cl_dll/CTF_HudMessage.cpp
multiplayer/dmc/cl_dll/DMC_Teleporters.cpp
multiplayer/dmc/cl_dll/Exports.h
multiplayer/dmc/cl_dll/GameStudioModelRenderer.cpp
multiplayer/dmc/cl_dll/StudioModelRenderer.cpp
multiplayer/dmc/cl_dll/ammo.cpp
multiplayer/dmc/cl_dll/ammo.h
multiplayer/dmc/cl_dll/ammohistory.cpp
multiplayer/dmc/cl_dll/ammohistory.h
multiplayer/dmc/cl_dll/battery.cpp
multiplayer/dmc/cl_dll/cdll_int.cpp
multiplayer/dmc/cl_dll/cl_dll.dsp
multiplayer/dmc/cl_dll/cl_dll.h
multiplayer/dmc/cl_dll/cl_util.h
multiplayer/dmc/cl_dll/com_model.h
multiplayer/dmc/cl_dll/com_weapons.cpp
multiplayer/dmc/cl_dll/com_weapons.h
multiplayer/dmc/cl_dll/death.cpp
multiplayer/dmc/cl_dll/demo.cpp
multiplayer/dmc/cl_dll/entity.cpp
multiplayer/dmc/cl_dll/ev_hldm.cpp
multiplayer/dmc/cl_dll/flashlight.cpp
multiplayer/dmc/cl_dll/geiger.cpp
multiplayer/dmc/cl_dll/health.cpp
multiplayer/dmc/cl_dll/health.h
multiplayer/dmc/cl_dll/hud.cpp
multiplayer/dmc/cl_dll/hud.h
multiplayer/dmc/cl_dll/hud_iface.h
multiplayer/dmc/cl_dll/hud_msg.cpp
multiplayer/dmc/cl_dll/hud_redraw.cpp
multiplayer/dmc/cl_dll/hud_servers.cpp
multiplayer/dmc/cl_dll/hud_spectator.cpp
multiplayer/dmc/cl_dll/hud_spectator.h
multiplayer/dmc/cl_dll/in_camera.cpp
multiplayer/dmc/cl_dll/input.cpp
multiplayer/dmc/cl_dll/inputw32.cpp
multiplayer/dmc/cl_dll/menu.cpp
multiplayer/dmc/cl_dll/message.cpp
multiplayer/dmc/cl_dll/msvc10/cl_dll.sln
multiplayer/dmc/cl_dll/msvc10/cl_dll.vcxproj
multiplayer/dmc/cl_dll/msvc10/cl_dll.vcxproj.filters
multiplayer/dmc/cl_dll/msvc11/cl_dll.sln
multiplayer/dmc/cl_dll/msvc11/cl_dll.vcxproj
multiplayer/dmc/cl_dll/msvc11/cl_dll.vcxproj.filters
multiplayer/dmc/cl_dll/msvc6/cl_dll.dsp
multiplayer/dmc/cl_dll/msvc7/cl_dll.vcproj
multiplayer/dmc/cl_dll/msvc8/cl_dll.vcproj
multiplayer/dmc/cl_dll/parsemsg.cpp
multiplayer/dmc/cl_dll/parsemsg.h
multiplayer/dmc/cl_dll/quake/quake_baseentity.cpp
multiplayer/dmc/cl_dll/quake/quake_weapons.cpp
multiplayer/dmc/cl_dll/readme.txt
multiplayer/dmc/cl_dll/saytext.cpp
multiplayer/dmc/cl_dll/status_icons.cpp
multiplayer/dmc/cl_dll/statusbar.cpp
multiplayer/dmc/cl_dll/text_message.cpp
multiplayer/dmc/cl_dll/tri.cpp
multiplayer/dmc/cl_dll/util.cpp
multiplayer/dmc/cl_dll/util.h
multiplayer/dmc/cl_dll/util_vector.h
multiplayer/dmc/cl_dll/vgui_CustomObjects.cpp
multiplayer/dmc/cl_dll/vgui_SchemeManager.cpp
multiplayer/dmc/cl_dll/vgui_ScorePanel.cpp
multiplayer/dmc/cl_dll/vgui_ScorePanel.h
multiplayer/dmc/cl_dll/vgui_ServerBrowser.cpp
multiplayer/dmc/cl_dll/vgui_ServerBrowser.h
multiplayer/dmc/cl_dll/vgui_viewport.cpp
multiplayer/dmc/cl_dll/vgui_viewport.h
multiplayer/dmc/cl_dll/view.cpp
multiplayer/dmc/cl_dll/voice_status.cpp
multiplayer/dmc/cl_dll/voice_status.h
multiplayer/dmc/dlls/activity.h
multiplayer/dmc/dlls/animation.cpp
multiplayer/dmc/dlls/basemonster.h
multiplayer/dmc/dlls/bmodels.cpp
multiplayer/dmc/dlls/buttons.cpp
multiplayer/dmc/dlls/cbase.cpp
multiplayer/dmc/dlls/cbase.h
multiplayer/dmc/dlls/client.cpp
multiplayer/dmc/dlls/combat.cpp
multiplayer/dmc/dlls/decals.h
multiplayer/dmc/dlls/dmc.dsp
multiplayer/dmc/dlls/doors.cpp
multiplayer/dmc/dlls/effects.cpp
multiplayer/dmc/dlls/effects.h
multiplayer/dmc/dlls/enginecallback.h
multiplayer/dmc/dlls/extdll.h
multiplayer/dmc/dlls/func_break.cpp
multiplayer/dmc/dlls/func_tank.cpp
multiplayer/dmc/dlls/h_export.cpp
multiplayer/dmc/dlls/hl.def
multiplayer/dmc/dlls/hl.dsp
multiplayer/dmc/dlls/hlgl.def
multiplayer/dmc/dlls/lights.cpp
multiplayer/dmc/dlls/monsters.cpp
multiplayer/dmc/dlls/msvc10/hl.sln
multiplayer/dmc/dlls/msvc10/hl.vcxproj
multiplayer/dmc/dlls/msvc10/hl.vcxproj.filters
multiplayer/dmc/dlls/msvc11/hl.sln
multiplayer/dmc/dlls/msvc11/hl.vcxproj
multiplayer/dmc/dlls/msvc11/hl.vcxproj.filters
multiplayer/dmc/dlls/msvc6/dmc.dsp
multiplayer/dmc/dlls/msvc7/dmc.vcproj
multiplayer/dmc/dlls/msvc8/dmc.vcproj
multiplayer/dmc/dlls/multiplay_gamerules.cpp
multiplayer/dmc/dlls/nodes.cpp
multiplayer/dmc/dlls/plats.cpp
multiplayer/dmc/dlls/player.cpp
multiplayer/dmc/dlls/player.h
multiplayer/dmc/dlls/quake_gun.cpp
multiplayer/dmc/dlls/quake_items.cpp
multiplayer/dmc/dlls/quake_nail.cpp
multiplayer/dmc/dlls/quake_rocket.cpp
multiplayer/dmc/dlls/quake_weapons_all.cpp
multiplayer/dmc/dlls/saverestore.h
multiplayer/dmc/dlls/skill.cpp
multiplayer/dmc/dlls/skill.h
multiplayer/dmc/dlls/sound.cpp
multiplayer/dmc/dlls/threewave_gamerules.cpp
multiplayer/dmc/dlls/threewave_gamerules.h
multiplayer/dmc/dlls/triggers.cpp
multiplayer/dmc/dlls/util.cpp
multiplayer/dmc/dlls/util.h
multiplayer/dmc/dlls/weapons.cpp
multiplayer/dmc/dlls/weapons.h
multiplayer/dmc/dlls/world.cpp
multiplayer/dmc/pm_shared/pm_defs.h
multiplayer/dmc/pm_shared/pm_math.c
multiplayer/dmc/pm_shared/pm_shared.c
multiplayer/engine/APIProxy.h
multiplayer/engine/Sequence.h
multiplayer/engine/archtypes.h
multiplayer/engine/cdll_int.h
multiplayer/engine/custom.h
multiplayer/engine/eiface.h
multiplayer/engine/keydefs.h
multiplayer/engine/shake.h
multiplayer/engine/studio.h
multiplayer/external/SDL2/SDL.h
multiplayer/external/SDL2/SDL_assert.h
multiplayer/external/SDL2/SDL_atomic.h
multiplayer/external/SDL2/SDL_audio.h
multiplayer/external/SDL2/SDL_bits.h
multiplayer/external/SDL2/SDL_blendmode.h
multiplayer/external/SDL2/SDL_clipboard.h
multiplayer/external/SDL2/SDL_config.h
multiplayer/external/SDL2/SDL_config_android.h
multiplayer/external/SDL2/SDL_config_iphoneos.h
multiplayer/external/SDL2/SDL_config_macosx.h
multiplayer/external/SDL2/SDL_config_minimal.h
multiplayer/external/SDL2/SDL_config_nintendods.h
multiplayer/external/SDL2/SDL_config_pandora.h
multiplayer/external/SDL2/SDL_config_windows.h
multiplayer/external/SDL2/SDL_config_wiz.h
multiplayer/external/SDL2/SDL_copying.h
multiplayer/external/SDL2/SDL_cpuinfo.h
multiplayer/external/SDL2/SDL_endian.h
multiplayer/external/SDL2/SDL_error.h
multiplayer/external/SDL2/SDL_events.h
multiplayer/external/SDL2/SDL_gamecontroller.h
multiplayer/external/SDL2/SDL_gesture.h
multiplayer/external/SDL2/SDL_haptic.h
multiplayer/external/SDL2/SDL_hints.h
multiplayer/external/SDL2/SDL_input.h
multiplayer/external/SDL2/SDL_joystick.h
multiplayer/external/SDL2/SDL_keyboard.h
multiplayer/external/SDL2/SDL_keycode.h
multiplayer/external/SDL2/SDL_loadso.h
multiplayer/external/SDL2/SDL_log.h
multiplayer/external/SDL2/SDL_main.h
multiplayer/external/SDL2/SDL_messagebox.h
multiplayer/external/SDL2/SDL_mouse.h
multiplayer/external/SDL2/SDL_mutex.h
multiplayer/external/SDL2/SDL_name.h
multiplayer/external/SDL2/SDL_opengl.h
multiplayer/external/SDL2/SDL_opengles.h
multiplayer/external/SDL2/SDL_opengles2.h
multiplayer/external/SDL2/SDL_pixels.h
multiplayer/external/SDL2/SDL_platform.h
multiplayer/external/SDL2/SDL_power.h
multiplayer/external/SDL2/SDL_quit.h
multiplayer/external/SDL2/SDL_rect.h
multiplayer/external/SDL2/SDL_render.h
multiplayer/external/SDL2/SDL_revision.h
multiplayer/external/SDL2/SDL_rwops.h
multiplayer/external/SDL2/SDL_scancode.h
multiplayer/external/SDL2/SDL_shape.h
multiplayer/external/SDL2/SDL_stdinc.h
multiplayer/external/SDL2/SDL_surface.h
multiplayer/external/SDL2/SDL_system.h
multiplayer/external/SDL2/SDL_syswm.h
multiplayer/external/SDL2/SDL_test.h
multiplayer/external/SDL2/SDL_test_assert.h
multiplayer/external/SDL2/SDL_test_common.h
multiplayer/external/SDL2/SDL_test_compare.h
multiplayer/external/SDL2/SDL_test_crc32.h
multiplayer/external/SDL2/SDL_test_font.h
multiplayer/external/SDL2/SDL_test_fuzzer.h
multiplayer/external/SDL2/SDL_test_harness.h
multiplayer/external/SDL2/SDL_test_images.h
multiplayer/external/SDL2/SDL_test_log.h
multiplayer/external/SDL2/SDL_test_md5.h
multiplayer/external/SDL2/SDL_test_random.h
multiplayer/external/SDL2/SDL_thread.h
multiplayer/external/SDL2/SDL_timer.h
multiplayer/external/SDL2/SDL_touch.h
multiplayer/external/SDL2/SDL_types.h
multiplayer/external/SDL2/SDL_version.h
multiplayer/external/SDL2/SDL_video.h
multiplayer/external/SDL2/begin_code.h
multiplayer/external/SDL2/close_code.h
multiplayer/external/SDL2/merge_sdl2.sh
multiplayer/filecopy.bat
multiplayer/game_shared/GameEvent.h
multiplayer/game_shared/bitvec.h
multiplayer/game_shared/bot/bot.cpp
multiplayer/game_shared/bot/bot.h
multiplayer/game_shared/bot/bot_constants.h
multiplayer/game_shared/bot/bot_manager.cpp
multiplayer/game_shared/bot/bot_manager.h
multiplayer/game_shared/bot/bot_profile.cpp
multiplayer/game_shared/bot/bot_profile.h
multiplayer/game_shared/bot/bot_util.cpp
multiplayer/game_shared/bot/bot_util.h
multiplayer/game_shared/bot/improv.h
multiplayer/game_shared/bot/nav.h
multiplayer/game_shared/bot/nav_area.cpp
multiplayer/game_shared/bot/nav_area.h
multiplayer/game_shared/bot/nav_file.cpp
multiplayer/game_shared/bot/nav_node.cpp
multiplayer/game_shared/bot/nav_node.h
multiplayer/game_shared/bot/nav_path.cpp
multiplayer/game_shared/bot/nav_path.h
multiplayer/game_shared/bot/simple_state_machine.h
multiplayer/game_shared/perf_counter.h
multiplayer/game_shared/shared_util.cpp
multiplayer/game_shared/shared_util.h
multiplayer/game_shared/simple_checksum.h
multiplayer/game_shared/steam_util.h
multiplayer/game_shared/vgui_checkbutton2.cpp
multiplayer/game_shared/vgui_checkbutton2.h
multiplayer/game_shared/vgui_defaultinputsignal.h
multiplayer/game_shared/vgui_grid.cpp
multiplayer/game_shared/vgui_grid.h
multiplayer/game_shared/vgui_helpers.h
multiplayer/game_shared/vgui_listbox.cpp
multiplayer/game_shared/vgui_listbox.h
multiplayer/game_shared/vgui_loadtga.cpp
multiplayer/game_shared/vgui_loadtga.h
multiplayer/game_shared/vgui_scrollbar2.cpp
multiplayer/game_shared/vgui_slider2.cpp
multiplayer/game_shared/voice_gamemgr.cpp
multiplayer/game_shared/voice_gamemgr.h
multiplayer/game_shared/voice_status.cpp
multiplayer/game_shared/voice_status.h
multiplayer/game_shared/voice_status_hud.cpp
multiplayer/game_shared/voice_status_hud.h
multiplayer/lib/public/SDL2.lib
multiplayer/lib/public/game_controls.lib
multiplayer/linux/Makefile
multiplayer/linux/Makefile.dmc_cdll
multiplayer/linux/Makefile.dmcdll
multiplayer/linux/Makefile.hl_cdll
multiplayer/linux/Makefile.hldll
multiplayer/linux/Makefile.ricochet_cdll
multiplayer/linux/Makefile.ricochetdll
multiplayer/linux/gendbg.sh
multiplayer/linux/libSDL2-2.0.0.dylib
multiplayer/linux/libSDL2-2.0.0.dylib.dSYM/Contents/Info.plist
multiplayer/linux/libSDL2-2.0.0.dylib.dSYM/Contents/Resources/DWARF/libsdl2-2.0.0.dylib
multiplayer/linux/libSDL2-2.0.so.0
multiplayer/linux/libSDL2-2.0.so.0.dbg
multiplayer/linux/libSDL2.dylib
multiplayer/linux/libSDL2.so
multiplayer/linux/release/vgui.dylib
multiplayer/linux/release/vgui.so
multiplayer/pm_shared/pm_defs.h
multiplayer/pm_shared/pm_materials.h
multiplayer/pm_shared/pm_math.c
multiplayer/pm_shared/pm_shared.c
multiplayer/public/FileSystem.h
multiplayer/public/archtypes.h
multiplayer/public/cl_dll/IGameClientExports.h
multiplayer/public/interface.cpp
multiplayer/public/interface.h
multiplayer/public/keydefs.h
multiplayer/public/particleman.h
multiplayer/public/pman_particlemem.h
multiplayer/public/pman_triangleffect.h
multiplayer/public/steam/steamtypes.h
multiplayer/ricochet/cl_dll/Exports.h
multiplayer/ricochet/cl_dll/GameStudioModelRenderer.cpp
multiplayer/ricochet/cl_dll/Ricochet_JumpPads.cpp
multiplayer/ricochet/cl_dll/StudioModelRenderer.cpp
multiplayer/ricochet/cl_dll/ammo.cpp
multiplayer/ricochet/cl_dll/ammo.h
multiplayer/ricochet/cl_dll/ammohistory.cpp
multiplayer/ricochet/cl_dll/ammohistory.h
multiplayer/ricochet/cl_dll/cdll_int.cpp
multiplayer/ricochet/cl_dll/cl_dll.dsp
multiplayer/ricochet/cl_dll/cl_dll.h
multiplayer/ricochet/cl_dll/cl_util.h
multiplayer/ricochet/cl_dll/com_weapons.cpp
multiplayer/ricochet/cl_dll/com_weapons.h
multiplayer/ricochet/cl_dll/death.cpp
multiplayer/ricochet/cl_dll/demo.cpp
multiplayer/ricochet/cl_dll/entity.cpp
multiplayer/ricochet/cl_dll/geiger.cpp
multiplayer/ricochet/cl_dll/health.cpp
multiplayer/ricochet/cl_dll/health.h
multiplayer/ricochet/cl_dll/hl/hl_baseentity.cpp
multiplayer/ricochet/cl_dll/hl/hl_weapons.cpp
multiplayer/ricochet/cl_dll/hud.cpp
multiplayer/ricochet/cl_dll/hud.h
multiplayer/ricochet/cl_dll/hud_iface.h
multiplayer/ricochet/cl_dll/hud_redraw.cpp
multiplayer/ricochet/cl_dll/hud_servers.cpp
multiplayer/ricochet/cl_dll/in_camera.cpp
multiplayer/ricochet/cl_dll/in_defs.h
multiplayer/ricochet/cl_dll/input.cpp
multiplayer/ricochet/cl_dll/inputw32.cpp
multiplayer/ricochet/cl_dll/menu.cpp
multiplayer/ricochet/cl_dll/message.cpp
multiplayer/ricochet/cl_dll/msvc10/cl_dll.sln
multiplayer/ricochet/cl_dll/msvc10/cl_dll.vcxproj
multiplayer/ricochet/cl_dll/msvc10/cl_dll.vcxproj.filters
multiplayer/ricochet/cl_dll/msvc11/cl_dll.sln
multiplayer/ricochet/cl_dll/msvc11/cl_dll.vcxproj
multiplayer/ricochet/cl_dll/msvc11/cl_dll.vcxproj.filters
multiplayer/ricochet/cl_dll/msvc6/cl_dll.dsp
multiplayer/ricochet/cl_dll/msvc7/cl_dll.vcproj
multiplayer/ricochet/cl_dll/msvc8/cl_dll.vcproj
multiplayer/ricochet/cl_dll/parsemsg.cpp
multiplayer/ricochet/cl_dll/parsemsg.h
multiplayer/ricochet/cl_dll/readme.txt
multiplayer/ricochet/cl_dll/status_icons.cpp
multiplayer/ricochet/cl_dll/text_message.cpp
multiplayer/ricochet/cl_dll/tri.cpp
multiplayer/ricochet/cl_dll/util.cpp
multiplayer/ricochet/cl_dll/util_vector.h
multiplayer/ricochet/cl_dll/vgui_CustomObjects.cpp
multiplayer/ricochet/cl_dll/vgui_SchemeManager.cpp
multiplayer/ricochet/cl_dll/vgui_ScorePanel.cpp
multiplayer/ricochet/cl_dll/vgui_ScorePanel.h
multiplayer/ricochet/cl_dll/vgui_ServerBrowser.cpp
multiplayer/ricochet/cl_dll/vgui_ServerBrowser.h
multiplayer/ricochet/cl_dll/vgui_TeamFortressViewport.cpp
multiplayer/ricochet/cl_dll/vgui_TeamFortressViewport.h
multiplayer/ricochet/cl_dll/vgui_discobjects.cpp
multiplayer/ricochet/cl_dll/view.cpp
multiplayer/ricochet/cl_dll/voice_status.cpp
multiplayer/ricochet/cl_dll/voice_status.h
multiplayer/ricochet/dlls/activity.h
multiplayer/ricochet/dlls/animation.cpp
multiplayer/ricochet/dlls/bmodels.cpp
multiplayer/ricochet/dlls/buttons.cpp
multiplayer/ricochet/dlls/cbase.cpp
multiplayer/ricochet/dlls/cbase.h
multiplayer/ricochet/dlls/client.cpp
multiplayer/ricochet/dlls/combat.cpp
multiplayer/ricochet/dlls/decals.h
multiplayer/ricochet/dlls/disc_arena.cpp
multiplayer/ricochet/dlls/disc_powerups.cpp
multiplayer/ricochet/dlls/doors.cpp
multiplayer/ricochet/dlls/effects.cpp
multiplayer/ricochet/dlls/effects.h
multiplayer/ricochet/dlls/enginecallback.h
multiplayer/ricochet/dlls/extdll.h
multiplayer/ricochet/dlls/func_break.cpp
multiplayer/ricochet/dlls/func_tank.cpp
multiplayer/ricochet/dlls/ggrenade.cpp
multiplayer/ricochet/dlls/h_battery.cpp
multiplayer/ricochet/dlls/h_cycler.cpp
multiplayer/ricochet/dlls/h_export.cpp
multiplayer/ricochet/dlls/healthkit.cpp
multiplayer/ricochet/dlls/lights.cpp
multiplayer/ricochet/dlls/mortar.cpp
multiplayer/ricochet/dlls/mp.dsp
multiplayer/ricochet/dlls/msvc10/mp.sln
multiplayer/ricochet/dlls/msvc10/mp.vcxproj
multiplayer/ricochet/dlls/msvc10/mp.vcxproj.filters
multiplayer/ricochet/dlls/msvc11/mp.sln
multiplayer/ricochet/dlls/msvc11/mp.vcxproj
multiplayer/ricochet/dlls/msvc11/mp.vcxproj.filters
multiplayer/ricochet/dlls/msvc6/mp.dsp
multiplayer/ricochet/dlls/msvc7/mp.vcproj
multiplayer/ricochet/dlls/msvc8/mp.vcproj
multiplayer/ricochet/dlls/multiplay_gamerules.cpp
multiplayer/ricochet/dlls/plats.cpp
multiplayer/ricochet/dlls/player.cpp
multiplayer/ricochet/dlls/player.h
multiplayer/ricochet/dlls/saverestore.h
multiplayer/ricochet/dlls/skill.cpp
multiplayer/ricochet/dlls/skill.h
multiplayer/ricochet/dlls/sound.cpp
multiplayer/ricochet/dlls/subs.cpp
multiplayer/ricochet/dlls/triggers.cpp
multiplayer/ricochet/dlls/util.cpp
multiplayer/ricochet/dlls/util.h
multiplayer/ricochet/dlls/weapons.cpp
multiplayer/ricochet/dlls/weapons.h
multiplayer/ricochet/dlls/world.cpp
multiplayer/ricochet/dlls/wpn_shared/disc_weapon_disc.cpp
multiplayer/ricochet/pm_shared/pm_defs.h
multiplayer/ricochet/pm_shared/pm_math.c
multiplayer/ricochet/pm_shared/pm_shared.c
multiplayer/utils/bspinfo/bspinfo.c
multiplayer/utils/bspinfo/msvc10/bspinfo.sln
multiplayer/utils/bspinfo/msvc10/bspinfo.vcxproj
multiplayer/utils/bspinfo/msvc10/bspinfo.vcxproj.filters
multiplayer/utils/bspinfo/msvc11/bspinfo.sln
multiplayer/utils/bspinfo/msvc11/bspinfo.vcxproj
multiplayer/utils/bspinfo/msvc11/bspinfo.vcxproj.filters
multiplayer/utils/bspinfo/msvc6/bspinfo.dsp
multiplayer/utils/bspinfo/msvc6/bspinfo.dsw
multiplayer/utils/bspinfo/msvc7/bspinfo.vcproj
multiplayer/utils/bspinfo/msvc8/bspinfo.vcproj
multiplayer/utils/common/bsplib.c
multiplayer/utils/common/bsplib.h
multiplayer/utils/common/l3dslib.c
multiplayer/utils/common/l3dslib.h
multiplayer/utils/common/meter.c
multiplayer/utils/common/meter.h
multiplayer/utils/light/msvc10/light.sln
multiplayer/utils/light/msvc10/light.vcxproj
multiplayer/utils/light/msvc10/light.vcxproj.filters
multiplayer/utils/light/msvc11/light.sln
multiplayer/utils/light/msvc11/light.vcxproj
multiplayer/utils/light/msvc11/light.vcxproj.filters
multiplayer/utils/light/msvc6/light.dsp
multiplayer/utils/light/msvc7/light.vcproj
multiplayer/utils/light/msvc8/light.vcproj
multiplayer/utils/light/new/light.c
multiplayer/utils/light/new/light.h
multiplayer/utils/light/new/ltface.c
multiplayer/utils/light/new/trace.c
multiplayer/utils/makefont/msvc10/makefont.sln
multiplayer/utils/makefont/msvc10/makefont.vcxproj
multiplayer/utils/makefont/msvc10/makefont.vcxproj.filters
multiplayer/utils/makefont/msvc11/makefont.sln
multiplayer/utils/makefont/msvc11/makefont.vcxproj
multiplayer/utils/makefont/msvc11/makefont.vcxproj.filters
multiplayer/utils/makefont/msvc6/makefont.dsp
multiplayer/utils/makefont/msvc6/makefont.dsw
multiplayer/utils/makefont/msvc7/makefont.vcproj
multiplayer/utils/makefont/msvc8/makefont.vcproj
multiplayer/utils/makels/msvc10/makels.sln
multiplayer/utils/makels/msvc10/makels.vcxproj
multiplayer/utils/makels/msvc10/makels.vcxproj.filters
multiplayer/utils/makels/msvc11/makels.sln
multiplayer/utils/makels/msvc11/makels.vcxproj
multiplayer/utils/makels/msvc11/makels.vcxproj.filters
multiplayer/utils/makels/msvc6/makels.dsp
multiplayer/utils/makels/msvc6/makels.dsw
multiplayer/utils/makels/msvc7/makels.vcproj
multiplayer/utils/makels/msvc8/makels.vcproj
multiplayer/utils/mdlviewer/mdlviewer.cpp
multiplayer/utils/mdlviewer/msvc10/mdlviewer.sln
multiplayer/utils/mdlviewer/msvc10/mdlviewer.vcxproj
multiplayer/utils/mdlviewer/msvc10/mdlviewer.vcxproj.filters
multiplayer/utils/mdlviewer/msvc11/mdlviewer.sln
multiplayer/utils/mdlviewer/msvc11/mdlviewer.vcxproj
multiplayer/utils/mdlviewer/msvc11/mdlviewer.vcxproj.filters
multiplayer/utils/mdlviewer/msvc6/mdlviewer.dsp
multiplayer/utils/mdlviewer/msvc6/mdlviewer.dsw
multiplayer/utils/mdlviewer/msvc7/mdlviewer.vcproj
multiplayer/utils/mdlviewer/msvc8/mdlviewer.vcproj
multiplayer/utils/mdlviewer/studio_utils.cpp
multiplayer/utils/mkmovie/mkmovie.dsp
multiplayer/utils/mkmovie/msvc10/mkmovie.sln
multiplayer/utils/mkmovie/msvc10/mkmovie.vcxproj
multiplayer/utils/mkmovie/msvc10/mkmovie.vcxproj.filters
multiplayer/utils/mkmovie/msvc11/mkmovie.sln
multiplayer/utils/mkmovie/msvc11/mkmovie.vcxproj
multiplayer/utils/mkmovie/msvc11/mkmovie.vcxproj.filters
multiplayer/utils/procinfo/msvc10/procinfo.sln
multiplayer/utils/procinfo/msvc10/procinfo.vcxproj
multiplayer/utils/procinfo/msvc10/procinfo.vcxproj.filters
multiplayer/utils/procinfo/msvc11/procinfo.sln
multiplayer/utils/procinfo/msvc11/procinfo.vcxproj
multiplayer/utils/procinfo/msvc11/procinfo.vcxproj.filters
multiplayer/utils/procinfo/procinfo.cpp
multiplayer/utils/procinfo/procinfo.dsp
multiplayer/utils/qbsp2/bsp5.h
multiplayer/utils/qbsp2/makefile
multiplayer/utils/qbsp2/msvc10/qbsp2.sln
multiplayer/utils/qbsp2/msvc10/qbsp2.vcxproj
multiplayer/utils/qbsp2/msvc10/qbsp2.vcxproj.filters
multiplayer/utils/qbsp2/msvc11/qbsp2.sln
multiplayer/utils/qbsp2/msvc11/qbsp2.vcxproj
multiplayer/utils/qbsp2/msvc11/qbsp2.vcxproj.filters
multiplayer/utils/qbsp2/msvc6/qbsp2.dsp
multiplayer/utils/qbsp2/msvc6/qbsp2.dsw
multiplayer/utils/qbsp2/msvc7/qbsp2.vcproj
multiplayer/utils/qbsp2/msvc8/qbsp2.vcproj
multiplayer/utils/qbsp2/qbsp2.dsp
multiplayer/utils/qcsg/msvc10/qcsg.sln
multiplayer/utils/qcsg/msvc10/qcsg.vcxproj
multiplayer/utils/qcsg/msvc10/qcsg.vcxproj.filters
multiplayer/utils/qcsg/msvc11/qcsg.sln
multiplayer/utils/qcsg/msvc11/qcsg.vcxproj
multiplayer/utils/qcsg/msvc11/qcsg.vcxproj.filters
multiplayer/utils/qcsg/msvc6/qcsg.dsp
multiplayer/utils/qcsg/msvc6/qcsg.dsw
multiplayer/utils/qcsg/msvc7/qcsg.vcproj
multiplayer/utils/qcsg/msvc8/qcsg.vcproj
multiplayer/utils/qcsg/source.p0
multiplayer/utils/qcsg/source.p1
multiplayer/utils/qcsg/source.p2
multiplayer/utils/qlumpy/msvc10/qlumpy.sln
multiplayer/utils/qlumpy/msvc10/qlumpy.vcxproj
multiplayer/utils/qlumpy/msvc10/qlumpy.vcxproj.filters
multiplayer/utils/qlumpy/msvc11/qlumpy.sln
multiplayer/utils/qlumpy/msvc11/qlumpy.vcxproj
multiplayer/utils/qlumpy/msvc11/qlumpy.vcxproj.filters
multiplayer/utils/qlumpy/msvc6/qlumpy.dsp
multiplayer/utils/qlumpy/msvc6/qlumpy.dsw
multiplayer/utils/qlumpy/msvc7/qlumpy.vcproj
multiplayer/utils/qlumpy/msvc8/qlumpy.vcproj
multiplayer/utils/qlumpy/qlumpy.doc
multiplayer/utils/qrad/msvc10/qrad.sln
multiplayer/utils/qrad/msvc10/qrad.vcxproj
multiplayer/utils/qrad/msvc10/qrad.vcxproj.filters
multiplayer/utils/qrad/msvc11/qrad.sln
multiplayer/utils/qrad/msvc11/qrad.vcxproj
multiplayer/utils/qrad/msvc11/qrad.vcxproj.filters
multiplayer/utils/qrad/msvc6/qrad.dsp
multiplayer/utils/qrad/msvc6/qrad.dsw
multiplayer/utils/qrad/msvc7/qrad.vcproj
multiplayer/utils/qrad/msvc8/qrad.vcproj
multiplayer/utils/qrad/qrad.txt
multiplayer/utils/serverctrl/StdAfx.h
multiplayer/utils/serverctrl/msvc10/serverctrl.sln
multiplayer/utils/serverctrl/msvc10/serverctrl.vcxproj
multiplayer/utils/serverctrl/msvc10/serverctrl.vcxproj.filters
multiplayer/utils/serverctrl/msvc11/serverctrl.sln
multiplayer/utils/serverctrl/msvc11/serverctrl.vcxproj
multiplayer/utils/serverctrl/msvc11/serverctrl.vcxproj.filters
multiplayer/utils/serverctrl/msvc6/serverctrl.dsp
multiplayer/utils/serverctrl/msvc7/serverctrl.vcproj
multiplayer/utils/serverctrl/msvc8/serverctrl.vcproj
multiplayer/utils/smdlexp/msvc10/smdlexp.sln
multiplayer/utils/smdlexp/msvc10/smdlexp.vcxproj
multiplayer/utils/smdlexp/msvc10/smdlexp.vcxproj.filters
multiplayer/utils/smdlexp/msvc11/smdlexp.sln
multiplayer/utils/smdlexp/msvc11/smdlexp.vcxproj
multiplayer/utils/smdlexp/msvc11/smdlexp.vcxproj.filters
multiplayer/utils/smdlexp/smdlexp.aps
multiplayer/utils/smdlexp/smdlexp.cpp
multiplayer/utils/smdlexp/smdlexp.dsp
multiplayer/utils/smdlexp/smedefs.h
multiplayer/utils/sprgen/msvc10/sprgen.sln
multiplayer/utils/sprgen/msvc10/sprgen.vcxproj
multiplayer/utils/sprgen/msvc10/sprgen.vcxproj.filters
multiplayer/utils/sprgen/msvc11/sprgen.sln
multiplayer/utils/sprgen/msvc11/sprgen.vcxproj
multiplayer/utils/sprgen/msvc11/sprgen.vcxproj.filters
multiplayer/utils/sprgen/msvc6/sprgen.dsp
multiplayer/utils/sprgen/msvc6/sprgen.dsw
multiplayer/utils/sprgen/msvc7/sprgen.vcproj
multiplayer/utils/sprgen/msvc8/sprgen.vcproj
multiplayer/utils/sprgen/s_bubble.spr
multiplayer/utils/sprgen/s_explod.spr
multiplayer/utils/sprgen/s_light.spr
multiplayer/utils/studiomdl/msvc10/studiomdl.sln
multiplayer/utils/studiomdl/msvc10/studiomdl.vcxproj
multiplayer/utils/studiomdl/msvc10/studiomdl.vcxproj.filters
multiplayer/utils/studiomdl/msvc11/studiomdl.sln
multiplayer/utils/studiomdl/msvc11/studiomdl.vcxproj
multiplayer/utils/studiomdl/msvc11/studiomdl.vcxproj.filters
multiplayer/utils/studiomdl/msvc6/studiomdl.dsp
multiplayer/utils/studiomdl/msvc6/studiomdl.dsw
multiplayer/utils/studiomdl/msvc7/studiomdl.vcproj
multiplayer/utils/studiomdl/msvc8/studiomdl.vcproj
multiplayer/utils/studiomdl/studiomdl.c
multiplayer/utils/studiomdl/tristrip.c
multiplayer/utils/studiomdl/write.c
multiplayer/utils/vgui/include/VGUI.h
multiplayer/utils/vgui/include/VGUI_App.h
multiplayer/utils/vgui/include/VGUI_BuildGroup.h
multiplayer/utils/vgui/include/VGUI_Dar.h
multiplayer/utils/vgui/include/VGUI_Font.h
multiplayer/utils/vgui/include/VGUI_Label.h
multiplayer/utils/vgui/include/VGUI_Panel.h
multiplayer/utils/vgui/include/VGUI_Point.h
multiplayer/utils/vgui/include/VGUI_RepaintSignal.h
multiplayer/utils/vgui/include/VGUI_String.h
multiplayer/utils/vgui/include/VGUI_Surface.h
multiplayer/utils/vgui/include/VGUI_SurfaceBase.h
multiplayer/utils/vgui/include/VGUI_WizardPanel.h
multiplayer/utils/vgui/lib/win32_vc6/vgui.lib
multiplayer/utils/visx2/msvc10/vis.sln
multiplayer/utils/visx2/msvc10/vis.vcxproj
multiplayer/utils/visx2/msvc10/vis.vcxproj.filters
multiplayer/utils/visx2/msvc11/vis.sln
multiplayer/utils/visx2/msvc11/vis.vcxproj
multiplayer/utils/visx2/msvc11/vis.vcxproj.filters
multiplayer/utils/visx2/msvc6/vis.dsp
multiplayer/utils/visx2/msvc6/vis.dsw
multiplayer/utils/visx2/msvc7/vis.vcproj
multiplayer/utils/visx2/msvc8/vis.vcproj
multiplayer/utils/visx2/vis.dsp
multiplayer/utils/xwad/msvc10/xwad.sln
multiplayer/utils/xwad/msvc10/xwad.vcxproj
multiplayer/utils/xwad/msvc11/xwad.sln
multiplayer/utils/xwad/msvc11/xwad.vcxproj
multiplayer/utils/xwad/xwad.c
multiplayer/utils/xwad/xwad.dsp
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/multiplayer/LICENSE	Thu Sep 05 19:47:29 2013 -0500
     1.3 @@ -0,0 +1,20 @@
     1.4 +Half Life 1 SDK LICENSE
     1.5 +======================
     1.6 +
     1.7 +Half Life 1 SDK Copyright(C) Valve Corp.  
     1.8 +
     1.9 +THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE CORPORATION (?Valve?).  PLEASE READ IT BEFORE DOWNLOADING OR USING THE HALF LIFE 1 SDK (?SDK?). BY DOWNLOADING AND/OR USING THE SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE PLEASE DON?T DOWNLOAD OR USE THE SDK.
    1.10 +
    1.11 +You may, free of charge, download and use the SDK to develop a modified Valve game running on the Source engine.  You may distribute your modified Valve game in source and object code form, but only for free. Terms of use for Valve games are found in the Steam Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/ 
    1.12 +
    1.13 +You may copy, modify, and distribute the SDK and any modifications you make to the SDK in source and object code form, but only for free.  Any distribution of this SDK must include this license.txt and third_party_licenses.txt.  
    1.14 + 
    1.15 +Any distribution of the SDK or a substantial portion of the SDK must include the above copyright notice and the following: 
    1.16 +
    1.17 +DISCLAIMER OF WARRANTIES.  THE SOURCE SDK AND ANY OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED ?AS IS?.  VALVE AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, TITLE AND FITNESS FOR A PARTICULAR PURPOSE.  
    1.18 +
    1.19 +LIMITATION OF LIABILITY.  IN NO EVENT SHALL VALVE OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  
    1.20 + 
    1.21 + 
    1.22 +If you would like to use the SDK for a commercial purpose, please contact Valve at [email protected]
    1.23 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/multiplayer/README.md	Thu Sep 05 19:47:29 2013 -0500
     2.3 @@ -0,0 +1,57 @@
     2.4 +Half Life 1 SDK LICENSE
     2.5 +======================
     2.6 +
     2.7 +Half Life 1 SDK Copyright© Valve Corp.  
     2.8 +
     2.9 +THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE CORPORATION (“Valve”).  PLEASE READ IT BEFORE DOWNLOADING OR USING THE HALF LIFE 1 SDK (“SDK”). BY DOWNLOADING AND/OR USING THE SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE PLEASE DON’T DOWNLOAD OR USE THE SDK.
    2.10 +
    2.11 +You may, free of charge, download and use the SDK to develop a modified Valve game running on the Half-Life engine.  You may distribute your modified Valve game in source and object code form, but only for free. Terms of use for Valve games are found in the Steam Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/ 
    2.12 +
    2.13 +You may copy, modify, and distribute the SDK and any modifications you make to the SDK in source and object code form, but only for free.  Any distribution of this SDK must include this license.txt and third_party_licenses.txt.  
    2.14 + 
    2.15 +Any distribution of the SDK or a substantial portion of the SDK must include the above copyright notice and the following: 
    2.16 +
    2.17 +DISCLAIMER OF WARRANTIES.  THE SOURCE SDK AND ANY OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED “AS IS”.  VALVE AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, TITLE AND FITNESS FOR A PARTICULAR PURPOSE.  
    2.18 +
    2.19 +LIMITATION OF LIABILITY.  IN NO EVENT SHALL VALVE OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  
    2.20 + 
    2.21 + 
    2.22 +If you would like to use the SDK for a commercial purpose, please contact Valve at [email protected]
    2.23 +
    2.24 +
    2.25 +Half-Life 1
    2.26 +======================
    2.27 +
    2.28 +This is the README for the Half-Life 1 engine and its associated games.
    2.29 +
    2.30 +Please use this repository to report bugs and feature requests for Half-Life 1 related products.
    2.31 +
    2.32 +Reporting Issues
    2.33 +----------------
    2.34 +
    2.35 +If you encounter an issue while using Half-Life 1 games, first search the [issue list](https://github.com/ValveSoftware/halflife/issues) to see if it has already been reported. Include closed issues in your search.
    2.36 +
    2.37 +If it has not been reported, create a new issue with at least the following information:
    2.38 +
    2.39 +- a short, descriptive title;
    2.40 +- a detailed description of the issue, including any output from the command line;
    2.41 +- steps for reproducing the issue;
    2.42 +- your system information.\*; and
    2.43 +- the `version` output from the in‐game console.
    2.44 +
    2.45 +Please place logs either in a code block (press `M` in your browser for a GFM cheat sheet) or a [gist](https://gist.github.com).
    2.46 +
    2.47 +\* The preferred and easiest way to get this information is from Steam's Hardware Information viewer from the menu (`Help -> System Information`). Once your information appears: right-click within the dialog, choose `Select All`, right-click again, and then choose `Copy`. Paste this information into your report, preferably in a code block.
    2.48 +
    2.49 +Conduct
    2.50 +-------
    2.51 +
    2.52 +
    2.53 +There are basic rules of conduct that should be followed at all times by everyone participating in the discussions.  While this is generally a relaxed environment, please remember the following:
    2.54 +
    2.55 +- Do not insult, harass, or demean anyone.
    2.56 +- Do not intentionally multi-post an issue.
    2.57 +- Do not use ALL CAPS when creating an issue report.
    2.58 +- Do not repeatedly update an open issue remarking that the issue persists.
    2.59 +
    2.60 +Remember: Just because the issue you reported was reported here does not mean that it is an issue with Half-Life.  As well, should your issue not be resolved immediately, it does not mean that a resolution is not being researched or tested.  Patience is always appreciated.
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/multiplayer/cl_dll/Exports.h	Thu Sep 05 19:47:29 2013 -0500
     3.3 @@ -0,0 +1,117 @@
     3.4 +// CL_DLLEXPORT is the client version of dllexport.  It's turned off for secure clients.
     3.5 +#ifdef _WIN32
     3.6 +#define CL_DLLEXPORT __declspec(dllexport)
     3.7 +#else
     3.8 +#define CL_DLLEXPORT __attribute__ ((visibility("default")))
     3.9 +#endif
    3.10 +
    3.11 +extern "C" 
    3.12 +{
    3.13 +	// From hl_weapons
    3.14 +	void CL_DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s *to, struct usercmd_s *cmd, int runfuncs, double time, unsigned int random_seed );
    3.15 +
    3.16 +	// From cdll_int
    3.17 +	int CL_DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion );
    3.18 +	int CL_DLLEXPORT HUD_VidInit( void );
    3.19 +	void CL_DLLEXPORT HUD_Init( void );
    3.20 +	int CL_DLLEXPORT HUD_Redraw( float flTime, int intermission );
    3.21 +	int CL_DLLEXPORT HUD_UpdateClientData( client_data_t *cdata, float flTime );
    3.22 +	void CL_DLLEXPORT HUD_Reset ( void );
    3.23 +	void CL_DLLEXPORT HUD_PlayerMove( struct playermove_s *ppmove, int server );
    3.24 +	void CL_DLLEXPORT HUD_PlayerMoveInit( struct playermove_s *ppmove );
    3.25 +	char CL_DLLEXPORT HUD_PlayerMoveTexture( char *name );
    3.26 +	int CL_DLLEXPORT HUD_ConnectionlessPacket( const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size );
    3.27 +	int CL_DLLEXPORT HUD_GetHullBounds( int hullnumber, float *mins, float *maxs );
    3.28 +	void CL_DLLEXPORT HUD_Frame( double time );
    3.29 +	void CL_DLLEXPORT HUD_VoiceStatus(int entindex, qboolean bTalking);
    3.30 +	void CL_DLLEXPORT HUD_DirectorMessage( int iSize, void *pbuf );
    3.31 +	void CL_DLLEXPORT HUD_ChatInputPosition( int *x, int *y );
    3.32 +
    3.33 +	// From demo
    3.34 +	void CL_DLLEXPORT Demo_ReadBuffer( int size, unsigned char *buffer );
    3.35 +
    3.36 +	// From entity
    3.37 +	int CL_DLLEXPORT HUD_AddEntity( int type, struct cl_entity_s *ent, const char *modelname );
    3.38 +	void CL_DLLEXPORT HUD_CreateEntities( void );
    3.39 +	void CL_DLLEXPORT HUD_StudioEvent( const struct mstudioevent_s *event, const struct cl_entity_s *entity );
    3.40 +	void CL_DLLEXPORT HUD_TxferLocalOverrides( struct entity_state_s *state, const struct clientdata_s *client );
    3.41 +	void CL_DLLEXPORT HUD_ProcessPlayerState( struct entity_state_s *dst, const struct entity_state_s *src );
    3.42 +	void CL_DLLEXPORT HUD_TxferPredictionData ( struct entity_state_s *ps, const struct entity_state_s *pps, struct clientdata_s *pcd, const struct clientdata_s *ppcd, struct weapon_data_s *wd, const struct weapon_data_s *pwd );
    3.43 +	void CL_DLLEXPORT HUD_TempEntUpdate( double frametime, double client_time, double cl_gravity, struct tempent_s **ppTempEntFree, struct tempent_s **ppTempEntActive, int ( *Callback_AddVisibleEntity )( struct cl_entity_s *pEntity ), void ( *Callback_TempEntPlaySound )( struct tempent_s *pTemp, float damp ) );
    3.44 +	struct cl_entity_s CL_DLLEXPORT *HUD_GetUserEntity( int index );
    3.45 +
    3.46 +	// From in_camera
    3.47 +	void CL_DLLEXPORT CAM_Think( void );
    3.48 +	int CL_DLLEXPORT CL_IsThirdPerson( void );
    3.49 +	void CL_DLLEXPORT CL_CameraOffset( float *ofs );
    3.50 +
    3.51 +	// From input
    3.52 +	struct kbutton_s CL_DLLEXPORT *KB_Find( const char *name );
    3.53 +	void CL_DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int active );
    3.54 +	void CL_DLLEXPORT HUD_Shutdown( void );
    3.55 +	int CL_DLLEXPORT HUD_Key_Event( int eventcode, int keynum, const char *pszCurrentBinding );
    3.56 +
    3.57 +	// From inputw32
    3.58 +	void CL_DLLEXPORT IN_ActivateMouse( void );
    3.59 +	void CL_DLLEXPORT IN_DeactivateMouse( void );
    3.60 +	void CL_DLLEXPORT IN_MouseEvent (int mstate);
    3.61 +	void CL_DLLEXPORT IN_Accumulate (void);
    3.62 +	void CL_DLLEXPORT IN_ClearStates (void);
    3.63 +
    3.64 +	// From tri
    3.65 +	void CL_DLLEXPORT HUD_DrawNormalTriangles( void );
    3.66 +	void CL_DLLEXPORT HUD_DrawTransparentTriangles( void );
    3.67 +
    3.68 +	// From view
    3.69 +	void	CL_DLLEXPORT V_CalcRefdef( struct ref_params_s *pparams );
    3.70 +
    3.71 +	// From GameStudioModelRenderer
    3.72 +	int CL_DLLEXPORT HUD_GetStudioModelInterface( int version, struct r_studio_interface_s **ppinterface, struct engine_studio_api_s *pstudio );
    3.73 +}
    3.74 +
    3.75 +/*
    3.76 +extern cldll_func_dst_t *g_pcldstAddrs;
    3.77 +
    3.78 +// Macros for the client receiving calls from the engine
    3.79 +#define RecClInitialize(a, b)			(g_pcldstAddrs->pInitFunc(&a, &b))
    3.80 +#define RecClHudInit()					(g_pcldstAddrs->pHudInitFunc())
    3.81 +#define RecClHudVidInit()				(g_pcldstAddrs->pHudVidInitFunc())
    3.82 +#define RecClHudRedraw(a, b)			(g_pcldstAddrs->pHudRedrawFunc(&a, &b))
    3.83 +#define RecClHudUpdateClientData(a, b)	(g_pcldstAddrs->pHudUpdateClientDataFunc(&a, &b))
    3.84 +#define RecClHudReset()					(g_pcldstAddrs->pHudResetFunc())
    3.85 +#define RecClClientMove(a, b)			(g_pcldstAddrs->pClientMove(&a, &b))
    3.86 +#define RecClClientMoveInit(a)			(g_pcldstAddrs->pClientMoveInit(&a))
    3.87 +#define RecClClientTextureType(a)		(g_pcldstAddrs->pClientTextureType(&a))
    3.88 +#define RecClIN_ActivateMouse()			(g_pcldstAddrs->pIN_ActivateMouse())
    3.89 +#define RecClIN_DeactivateMouse()		(g_pcldstAddrs->pIN_DeactivateMouse())
    3.90 +#define RecClIN_MouseEvent(a)			(g_pcldstAddrs->pIN_MouseEvent(&a))
    3.91 +#define RecClIN_ClearStates()			(g_pcldstAddrs->pIN_ClearStates())
    3.92 +#define RecClIN_Accumulate()			(g_pcldstAddrs->pIN_Accumulate())
    3.93 +#define RecClCL_CreateMove(a, b, c)		(g_pcldstAddrs->pCL_CreateMove(&a, &b, &c))
    3.94 +#define RecClCL_IsThirdPerson()			(g_pcldstAddrs->pCL_IsThirdPerson())
    3.95 +#define RecClCL_GetCameraOffsets(a)		(g_pcldstAddrs->pCL_GetCameraOffsets(&a))
    3.96 +#define RecClFindKey(a)					(g_pcldstAddrs->pFindKey(&a))
    3.97 +#define RecClCamThink()					(g_pcldstAddrs->pCamThink())
    3.98 +#define RecClCalcRefdef(a)				(g_pcldstAddrs->pCalcRefdef(&a))
    3.99 +#define RecClAddEntity(a, b, c)			(g_pcldstAddrs->pAddEntity(&a, &b, &c))
   3.100 +#define RecClCreateEntities()			(g_pcldstAddrs->pCreateEntities())
   3.101 +#define RecClDrawNormalTriangles()		(g_pcldstAddrs->pDrawNormalTriangles())
   3.102 +#define RecClDrawTransparentTriangles()	(g_pcldstAddrs->pDrawTransparentTriangles())
   3.103 +#define RecClStudioEvent(a, b)			(g_pcldstAddrs->pStudioEvent(&a, &b))
   3.104 +#define RecClPostRunCmd(a, b, c, d, e, f)		(g_pcldstAddrs->pPostRunCmd(&a, &b, &c, &d, &e, &f))
   3.105 +#define RecClShutdown()					(g_pcldstAddrs->pShutdown())
   3.106 +#define RecClTxferLocalOverrides(a, b)	(g_pcldstAddrs->pTxferLocalOverrides(&a, &b))
   3.107 +#define RecClProcessPlayerState(a, b)	(g_pcldstAddrs->pProcessPlayerState(&a, &b))
   3.108 +#define RecClTxferPredictionData(a, b, c, d, e, f)		(g_pcldstAddrs->pTxferPredictionData(&a, &b, &c, &d, &e, &f))
   3.109 +#define RecClReadDemoBuffer(a, b)		(g_pcldstAddrs->pReadDemoBuffer(&a, &b))
   3.110 +#define RecClConnectionlessPacket(a, b, c, d)		(g_pcldstAddrs->pConnectionlessPacket(&a, &b, &c, &d))
   3.111 +#define RecClGetHullBounds(a, b, c)		(g_pcldstAddrs->pGetHullBounds(&a, &b, &c))
   3.112 +#define RecClHudFrame(a)				(g_pcldstAddrs->pHudFrame(&a))
   3.113 +#define RecClKeyEvent(a, b, c)			(g_pcldstAddrs->pKeyEvent(&a, &b, &c))
   3.114 +#define RecClTempEntUpdate(a, b, c, d, e, f, g)	(g_pcldstAddrs->pTempEntUpdate(&a, &b, &c, &d, &e, &f, &g))
   3.115 +#define RecClGetUserEntity(a)			(g_pcldstAddrs->pGetUserEntity(&a))
   3.116 +#define RecClVoiceStatus(a, b)			(g_pcldstAddrs->pVoiceStatus(&a, &b))
   3.117 +#define RecClDirectorMessage(a, b)		(g_pcldstAddrs->pDirectorMessage(&a, &b))
   3.118 +#define RecClStudioInterface(a, b, c)	(g_pcldstAddrs->pStudioInterface(&a, &b, &c))
   3.119 +#define RecClChatInputPosition(a, b)	(g_pcldstAddrs->pChatInputPosition(&a, &b))
   3.120 +*/
   3.121 \ No newline at end of file
     4.1 --- a/multiplayer/cl_dll/GameStudioModelRenderer.cpp	Fri Mar 15 01:26:54 2013 -0500
     4.2 +++ b/multiplayer/cl_dll/GameStudioModelRenderer.cpp	Thu Sep 05 19:47:29 2013 -0500
     4.3 @@ -26,6 +26,7 @@
     4.4  
     4.5  #include "StudioModelRenderer.h"
     4.6  #include "GameStudioModelRenderer.h"
     4.7 +#include "Exports.h"
     4.8  
     4.9  //
    4.10  // Override the StudioModelRender virtual member functions here to implement custom bone
    4.11 @@ -99,9 +100,10 @@
    4.12  Export this function for the engine to use the studio renderer class to render objects.
    4.13  ====================
    4.14  */
    4.15 -#define DLLEXPORT __declspec( dllexport )
    4.16 -extern "C" int DLLEXPORT HUD_GetStudioModelInterface( int version, struct r_studio_interface_s **ppinterface, struct engine_studio_api_s *pstudio )
    4.17 +int CL_DLLEXPORT HUD_GetStudioModelInterface( int version, struct r_studio_interface_s **ppinterface, struct engine_studio_api_s *pstudio )
    4.18  {
    4.19 +//	RecClStudioInterface(version, ppinterface, pstudio);
    4.20 +
    4.21  	if ( version != STUDIO_INTERFACE_VERSION )
    4.22  		return 0;
    4.23  
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/multiplayer/cl_dll/MOTD.cpp	Thu Sep 05 19:47:29 2013 -0500
     5.3 @@ -0,0 +1,155 @@
     5.4 +/***
     5.5 +*
     5.6 +*	Copyright (c) 1999, Valve LLC. All rights reserved.
     5.7 +*	
     5.8 +*	This product contains software technology licensed from Id 
     5.9 +*	Software, Inc. ("Id Technology").  Id Technology (c) 1996 Id Software, Inc. 
    5.10 +*	All Rights Reserved.
    5.11 +*
    5.12 +*   Use, distribution, and modification of this source code and/or resulting
    5.13 +*   object code is restricted to non-commercial enhancements to products from
    5.14 +*   Valve LLC.  All other use, distribution, or modification is prohibited
    5.15 +*   without written permission from Valve LLC.
    5.16 +*
    5.17 +****/
    5.18 +//
    5.19 +// MOTD.cpp
    5.20 +//
    5.21 +// for displaying a server-sent message of the day
    5.22 +//
    5.23 +
    5.24 +#include "hud.h"
    5.25 +#include "cl_util.h"
    5.26 +#include "parsemsg.h"
    5.27 +
    5.28 +#include <string.h>
    5.29 +#include <stdio.h>
    5.30 +
    5.31 +//DECLARE_MESSAGE( m_MOTD, MOTD );
    5.32 +
    5.33 +int CHudMOTD::MOTD_DISPLAY_TIME;
    5.34 +
    5.35 +int CHudMOTD :: Init( void )
    5.36 +{
    5.37 +	gHUD.AddHudElem( this );
    5.38 +
    5.39 +	// HOOK_MESSAGE( MOTD );
    5.40 +
    5.41 +	CVAR_CREATE( "motd_display_time", "15", 0 );
    5.42 +
    5.43 +	m_iFlags &= ~HUD_ACTIVE;  // start out inactive
    5.44 +	m_szMOTD[0] = 0;
    5.45 +
    5.46 +	return 1;
    5.47 +}
    5.48 +
    5.49 +int CHudMOTD :: VidInit( void )
    5.50 +{
    5.51 +	// Load sprites here
    5.52 +
    5.53 +	return 1;
    5.54 +}
    5.55 +
    5.56 +void CHudMOTD :: Reset( void )
    5.57 +{
    5.58 +	m_iFlags &= ~HUD_ACTIVE;  // start out inactive
    5.59 +	m_szMOTD[0] = 0;
    5.60 +	m_iLines = 0;
    5.61 +	m_flActiveRemaining = 0;
    5.62 +}
    5.63 +
    5.64 +#define LINE_HEIGHT  13
    5.65 +
    5.66 +int CHudMOTD :: Draw( float fTime )
    5.67 +{
    5.68 +	static float sfLastTime;
    5.69 +	float fElapsed;
    5.70 +
    5.71 +	// Draw MOTD line-by-line
    5.72 +	if ( m_flActiveRemaining <= 0.0 )
    5.73 +	{ 
    5.74 +		// finished with MOTD, disable it
    5.75 +		m_szMOTD[0] = 0;
    5.76 +		m_iLines = 0;
    5.77 +		m_iFlags &= ~HUD_ACTIVE;
    5.78 +		m_flActiveRemaining = 0.0;
    5.79 +		return 1;
    5.80 +	}
    5.81 +
    5.82 +	fElapsed = gHUD.m_flTime - sfLastTime;
    5.83 +
    5.84 +	// Don't let time go negative ( level transition? )
    5.85 +	fElapsed = max( 0.0, fElapsed );
    5.86 +	// Don't let time go hugely positive ( first connection to active server ? )
    5.87 +	fElapsed = min( 1.0, fElapsed );
    5.88 +
    5.89 +	// Remember last timestamp
    5.90 +	sfLastTime = gHUD.m_flTime;
    5.91 +
    5.92 +	// Remove a bit of time
    5.93 +	m_flActiveRemaining -= fElapsed;
    5.94 +
    5.95 +	// find the top of where the MOTD should be drawn,  so the whole thing is centered in the screen
    5.96 +	int ypos = max(((ScreenHeight - (m_iLines * LINE_HEIGHT)) / 2) - 40, 30 ); // shift it up slightly
    5.97 +	char *ch = m_szMOTD;
    5.98 +	while ( *ch )
    5.99 +	{
   5.100 +		int line_length = 0;  // count the length of the current line
   5.101 +		for ( char *next_line = ch; *next_line != '\n' && *next_line != 0; next_line++ )
   5.102 +			line_length += gHUD.m_scrinfo.charWidths[ *next_line ];
   5.103 +		char *top = next_line;
   5.104 +		if ( *top == '\n' )
   5.105 +			*top = 0;
   5.106 +		else
   5.107 +			top = NULL;
   5.108 +
   5.109 +		// find where to start drawing the line
   5.110 +		int xpos = (ScreenWidth - line_length) / 2;
   5.111 +
   5.112 +		gHUD.DrawHudString( xpos, ypos, ScreenWidth, ch, 255, 180, 0 );
   5.113 +
   5.114 +		ypos += LINE_HEIGHT;
   5.115 +
   5.116 +		if ( top )  // restore 
   5.117 +			*top = '\n';
   5.118 +		ch = next_line;
   5.119 +		if ( *ch == '\n' )
   5.120 +			ch++;
   5.121 +
   5.122 +		if ( ypos > (ScreenHeight - 20) )
   5.123 +			break;  // don't let it draw too low
   5.124 +	}
   5.125 +	
   5.126 +	return 1;
   5.127 +}
   5.128 +
   5.129 +int CHudMOTD :: MsgFunc_MOTD( const char *pszName, int iSize, void *pbuf )
   5.130 +{
   5.131 +	if ( m_iFlags & HUD_ACTIVE )
   5.132 +	{
   5.133 +		Reset(); // clear the current MOTD in prep for this one
   5.134 +	}
   5.135 +
   5.136 +	BEGIN_READ( pbuf, iSize );
   5.137 +
   5.138 +	int is_finished = READ_BYTE();
   5.139 +	strcat( m_szMOTD, READ_STRING() );
   5.140 +
   5.141 +	if ( is_finished )
   5.142 +	{
   5.143 +		m_iFlags |= HUD_ACTIVE;
   5.144 +
   5.145 +		MOTD_DISPLAY_TIME = max( 10, CVAR_GET_FLOAT( "motd_display_time" ) );
   5.146 +
   5.147 +		m_flActiveRemaining = MOTD_DISPLAY_TIME;
   5.148 +
   5.149 +		for ( char *sz = m_szMOTD; *sz != 0; sz++ )  // count the number of lines in the MOTD
   5.150 +		{
   5.151 +			if ( *sz == '\n' )
   5.152 +				m_iLines++;
   5.153 +		}
   5.154 +	}
   5.155 +
   5.156 +	return 1;
   5.157 +}
   5.158 +
     6.1 --- a/multiplayer/cl_dll/StudioModelRenderer.cpp	Fri Mar 15 01:26:54 2013 -0500
     6.2 +++ b/multiplayer/cl_dll/StudioModelRenderer.cpp	Thu Sep 05 19:47:29 2013 -0500
     6.3 @@ -29,6 +29,18 @@
     6.4  #include "StudioModelRenderer.h"
     6.5  #include "GameStudioModelRenderer.h"
     6.6  
     6.7 +extern cvar_t *tfc_newmodels;
     6.8 +
     6.9 +extern extra_player_info_t  g_PlayerExtraInfo[MAX_PLAYERS+1];
    6.10 +
    6.11 +// team colors for old TFC models
    6.12 +#define TEAM1_COLOR		150
    6.13 +#define TEAM2_COLOR		250
    6.14 +#define TEAM3_COLOR		45
    6.15 +#define TEAM4_COLOR		100
    6.16 +
    6.17 +int m_nPlayerGaitSequences[MAX_CLIENTS];
    6.18 +
    6.19  // Global engine <-> studio model rendering code interface
    6.20  engine_studio_api_t IEngineStudio;
    6.21  
    6.22 @@ -363,7 +375,7 @@
    6.23  
    6.24  	if (pseqdesc->seqgroup == 0)
    6.25  	{
    6.26 -		return (mstudioanim_t *)((byte *)m_pStudioHeader + pseqgroup->data + pseqdesc->animindex);
    6.27 +		return (mstudioanim_t *)((byte *)m_pStudioHeader + pseqdesc->animindex);
    6.28  	}
    6.29  
    6.30  	paSequences = (cache_user_t *)m_pSubModel->submodels;
    6.31 @@ -793,6 +805,22 @@
    6.32  
    6.33  	pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pCurrentEntity->curstate.sequence;
    6.34  
    6.35 +	// always want new gait sequences to start on frame zero
    6.36 +/*	if ( m_pPlayerInfo )
    6.37 +	{
    6.38 +		int playerNum = m_pCurrentEntity->index - 1;
    6.39 +
    6.40 +		// new jump gaitsequence?  start from frame zero
    6.41 +		if ( m_nPlayerGaitSequences[ playerNum ] != m_pPlayerInfo->gaitsequence )
    6.42 +		{
    6.43 +	//		m_pPlayerInfo->gaitframe = 0.0;
    6.44 +			gEngfuncs.Con_Printf( "Setting gaitframe to 0\n" );
    6.45 +		}
    6.46 +
    6.47 +		m_nPlayerGaitSequences[ playerNum ] = m_pPlayerInfo->gaitsequence;
    6.48 +//		gEngfuncs.Con_Printf( "index: %d     gaitsequence: %d\n",playerNum, m_pPlayerInfo->gaitsequence);
    6.49 +	}
    6.50 +*/
    6.51  	f = StudioEstimateFrame( pseqdesc );
    6.52  
    6.53  	if (m_pCurrentEntity->latched.prevframe > f)
    6.54 @@ -842,6 +870,11 @@
    6.55  		static vec4_t		q1b[MAXSTUDIOBONES];
    6.56  		float				s;
    6.57  
    6.58 +		if (m_pCurrentEntity->latched.prevsequence >=  m_pStudioHeader->numseq) 
    6.59 +		{
    6.60 +			m_pCurrentEntity->latched.prevsequence = 0;
    6.61 +		}
    6.62 +
    6.63  		pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pCurrentEntity->latched.prevsequence;
    6.64  		panim = StudioGetAnim( m_pRenderModel, pseqdesc );
    6.65  		// clip prevframe
    6.66 @@ -882,29 +915,49 @@
    6.67  
    6.68  	pbones = (mstudiobone_t *)((byte *)m_pStudioHeader + m_pStudioHeader->boneindex);
    6.69  
    6.70 +	// bounds checking
    6.71 +	if ( m_pPlayerInfo )
    6.72 +	{
    6.73 +		if ( m_pPlayerInfo->gaitsequence >= m_pStudioHeader->numseq )
    6.74 +		{
    6.75 +			m_pPlayerInfo->gaitsequence = 0;
    6.76 +		}
    6.77 +	}
    6.78 +
    6.79  	// calc gait animation
    6.80 -	if (m_pPlayerInfo && m_pPlayerInfo->gaitsequence != 0)
    6.81 -	{
    6.82 -		if (m_pPlayerInfo->gaitsequence >= m_pStudioHeader->numseq) 
    6.83 +	if ( m_pPlayerInfo && m_pPlayerInfo->gaitsequence != 0 )
    6.84 +	{ 
    6.85 +		if (m_pPlayerInfo->gaitsequence >=  m_pStudioHeader->numseq) 
    6.86  		{
    6.87  			m_pPlayerInfo->gaitsequence = 0;
    6.88  		}
    6.89  
    6.90 -		pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pPlayerInfo->gaitsequence;
    6.91 +		int copy = 1;
    6.92 +
    6.93 +		pseqdesc = (mstudioseqdesc_t *)( (byte *)m_pStudioHeader + m_pStudioHeader->seqindex ) + m_pPlayerInfo->gaitsequence;
    6.94  
    6.95  		panim = StudioGetAnim( m_pRenderModel, pseqdesc );
    6.96  		StudioCalcRotations( pos2, q2, pseqdesc, panim, m_pPlayerInfo->gaitframe );
    6.97  
    6.98 -		for (i = 0; i < m_pStudioHeader->numbones; i++)
    6.99 +		for ( i = 0; i < m_pStudioHeader->numbones; i++ )
   6.100  		{
   6.101 -			if (strcmp( pbones[i].name, "Bip01 Spine") == 0)
   6.102 -				break;
   6.103 -			memcpy( pos[i], pos2[i], sizeof( pos[i] ));
   6.104 -			memcpy( q[i], q2[i], sizeof( q[i] ));
   6.105 +			if ( !strcmp( pbones[i].name, "Bip01 Spine" ) )
   6.106 +			{
   6.107 +				copy = 0;
   6.108 +			}
   6.109 +			else if ( !strcmp( pbones[ pbones[i].parent ].name, "Bip01 Pelvis" ) )
   6.110 +			{
   6.111 +				copy = 1;
   6.112 +			}
   6.113 +				
   6.114 +			if ( copy )
   6.115 +			{
   6.116 +				memcpy( pos[i], pos2[i], sizeof( pos[i] ) );
   6.117 +				memcpy( q[i], q2[i], sizeof( q[i] ) );
   6.118 +			}
   6.119  		}
   6.120  	}
   6.121  
   6.122 -
   6.123  	for (i = 0; i < m_pStudioHeader->numbones; i++) 
   6.124  	{
   6.125  		QuaternionMatrix( q[i], bonematrix );
   6.126 @@ -975,7 +1028,6 @@
   6.127  {
   6.128  	int					i, j;
   6.129  	double				f;
   6.130 -	int					do_hunt = true;
   6.131  
   6.132  	mstudiobone_t		*pbones;
   6.133  	mstudioseqdesc_t	*pseqdesc;
   6.134 @@ -1052,6 +1104,52 @@
   6.135  	}
   6.136  }
   6.137  
   6.138 +#if defined( _TFC )
   6.139 +#include "pm_shared.h"
   6.140 +const Vector& GetTeamColor( int team_no );
   6.141 +#define IS_FIRSTPERSON_SPEC ( g_iUser1 == OBS_IN_EYE || (g_iUser1 && (gHUD.m_Spectator.m_pip->value == INSET_IN_EYE)) )
   6.142 +
   6.143 +int GetRemapColor( int iTeam, bool bTopColor )
   6.144 +{
   6.145 +	int retVal = 0;
   6.146 +
   6.147 +	switch( iTeam )
   6.148 +	{
   6.149 +	default:
   6.150 +	case 1: 
   6.151 +		if ( bTopColor )
   6.152 +			retVal = TEAM1_COLOR;
   6.153 +		else
   6.154 +			retVal = TEAM1_COLOR - 10;
   6.155 +
   6.156 +		break;
   6.157 +	case 2: 
   6.158 +		if ( bTopColor )
   6.159 +			retVal = TEAM2_COLOR;
   6.160 +		else
   6.161 +			retVal = TEAM2_COLOR - 10;
   6.162 +
   6.163 +		break;
   6.164 +	case 3: 
   6.165 +		if ( bTopColor )
   6.166 +			retVal = TEAM3_COLOR;
   6.167 +		else
   6.168 +			retVal = TEAM3_COLOR - 10;
   6.169 +
   6.170 +		break;
   6.171 +	case 4: 
   6.172 +		if ( bTopColor )
   6.173 +			retVal = TEAM4_COLOR;
   6.174 +		else
   6.175 +			retVal = TEAM4_COLOR - 10;
   6.176 +
   6.177 +		break;
   6.178 +	}
   6.179 +
   6.180 +	return retVal;
   6.181 +}
   6.182 +#endif 
   6.183 +
   6.184  /*
   6.185  ====================
   6.186  StudioDrawModel
   6.187 @@ -1154,9 +1252,86 @@
   6.188  		IEngineStudio.StudioSetupLighting (&lighting);
   6.189  
   6.190  		// get remap colors
   6.191 -		m_nTopColor = m_pCurrentEntity->curstate.colormap & 0xFF;
   6.192 +#if defined( _TFC )
   6.193 +
   6.194 +		m_nTopColor    = m_pCurrentEntity->curstate.colormap & 0xFF;
   6.195  		m_nBottomColor = (m_pCurrentEntity->curstate.colormap & 0xFF00) >> 8;
   6.196  
   6.197 +		// use the old tfc colors for the models (view models)
   6.198 +		// team 1
   6.199 +		if ( ( m_nTopColor < 155 ) && ( m_nTopColor > 135 ) )
   6.200 +		{
   6.201 +			m_nTopColor    = TEAM1_COLOR;
   6.202 +			m_nBottomColor = TEAM1_COLOR - 10;
   6.203 +		}
   6.204 +		// team 2
   6.205 +		else if ( ( m_nTopColor < 260 ) && ( ( m_nTopColor > 240 ) || ( m_nTopColor == 5 ) ) )
   6.206 +		{
   6.207 +			m_nTopColor    = TEAM2_COLOR;
   6.208 +			m_nBottomColor = TEAM2_COLOR - 10;
   6.209 +		}
   6.210 +		// team 3
   6.211 +		else if ( ( m_nTopColor < 50 ) && ( m_nTopColor > 40 ) )
   6.212 +		{
   6.213 +			m_nTopColor    = TEAM3_COLOR;
   6.214 +			m_nBottomColor = TEAM3_COLOR - 10;
   6.215 +		}
   6.216 +		// team 4
   6.217 +		else if ( ( m_nTopColor < 110 )  && ( m_nTopColor > 75 ) )
   6.218 +		{
   6.219 +			m_nTopColor    = TEAM4_COLOR;
   6.220 +			m_nBottomColor = TEAM4_COLOR - 10;
   6.221 +		}
   6.222 +
   6.223 +		// is this our view model and should it be glowing? we also fix a remap colors
   6.224 +		// problem if we're spectating in first-person mode
   6.225 +		if ( m_pCurrentEntity == gEngfuncs.GetViewModel() )
   6.226 +		{
   6.227 +			cl_entity_t *pTarget = NULL;
   6.228 +
   6.229 +			// we're spectating someone via first-person mode
   6.230 +			if ( IS_FIRSTPERSON_SPEC )
   6.231 +			{
   6.232 +				pTarget = gEngfuncs.GetEntityByIndex( g_iUser2 );
   6.233 +
   6.234 +				if ( pTarget )
   6.235 +				{
   6.236 +					// we also need to correct the m_nTopColor and m_nBottomColor for the 
   6.237 +					// view model here. this is separate from the glowshell stuff, but
   6.238 +					// the same conditions need to be met (this is the view model and we're
   6.239 +					// in first-person spectator mode)
   6.240 +					m_nTopColor = GetRemapColor( g_PlayerExtraInfo[pTarget->index].teamnumber, true );
   6.241 +					m_nBottomColor = GetRemapColor( g_PlayerExtraInfo[pTarget->index].teamnumber, false );
   6.242 +				}
   6.243 +			}
   6.244 +			// we're not spectating, this is OUR view model
   6.245 +			else 
   6.246 +			{
   6.247 +				pTarget = gEngfuncs.GetLocalPlayer();
   6.248 +			}
   6.249 +
   6.250 +			if ( pTarget && pTarget->curstate.renderfx == kRenderFxGlowShell )
   6.251 +			{
   6.252 +				m_pCurrentEntity->curstate.renderfx = kRenderFxGlowShell;
   6.253 +				m_pCurrentEntity->curstate.rendercolor.r = pTarget->curstate.rendercolor.r;
   6.254 +				m_pCurrentEntity->curstate.rendercolor.g = pTarget->curstate.rendercolor.g;
   6.255 +				m_pCurrentEntity->curstate.rendercolor.b = pTarget->curstate.rendercolor.b;
   6.256 +			}
   6.257 +			else
   6.258 +			{
   6.259 +				m_pCurrentEntity->curstate.renderfx = kRenderFxNone;
   6.260 +				m_pCurrentEntity->curstate.rendercolor.r = 0;
   6.261 +				m_pCurrentEntity->curstate.rendercolor.g = 0;
   6.262 +				m_pCurrentEntity->curstate.rendercolor.b = 0;
   6.263 +			}
   6.264 +		}
   6.265 +
   6.266 +#else
   6.267 +		m_nTopColor    = m_pCurrentEntity->curstate.colormap & 0xFF;
   6.268 +		m_nBottomColor = (m_pCurrentEntity->curstate.colormap & 0xFF00) >> 8;
   6.269 +
   6.270 +#endif 
   6.271 +
   6.272  		IEngineStudio.StudioSetRemapColors( m_nTopColor, m_nBottomColor );
   6.273  
   6.274  		StudioRenderModel( );
   6.275 @@ -1312,7 +1487,7 @@
   6.276  		m_pCurrentEntity->angles[YAW] += 360;
   6.277  	m_pCurrentEntity->latched.prevangles[YAW] = m_pCurrentEntity->angles[YAW];
   6.278  
   6.279 -	if (pplayer->gaitsequence >= m_pStudioHeader->numseq) 
   6.280 +	if (pplayer->gaitsequence >=  m_pStudioHeader->numseq) 
   6.281  	{
   6.282  		pplayer->gaitsequence = 0;
   6.283  	}
   6.284 @@ -1335,6 +1510,149 @@
   6.285  		m_pPlayerInfo->gaitframe += pseqdesc->numframes;
   6.286  }
   6.287  
   6.288 +#if defined _TFC
   6.289 +
   6.290 +#define PC_UNDEFINED	0 
   6.291 +
   6.292 +#define PC_SCOUT		1 
   6.293 +#define PC_SNIPER		2 
   6.294 +#define PC_SOLDIER		3 
   6.295 +#define PC_DEMOMAN		4 
   6.296 +#define PC_MEDIC		5 
   6.297 +#define PC_HVYWEAP		6 
   6.298 +#define PC_PYRO			7
   6.299 +#define PC_SPY			8
   6.300 +#define PC_ENGINEER		9
   6.301 +#define PC_RANDOM		10 	
   6.302 +#define PC_CIVILIAN		11
   6.303 +
   6.304 +#define PC_LASTCLASS	12
   6.305 +
   6.306 +#define TFC_MODELS_OLD	0
   6.307 +
   6.308 +extern cvar_t *tfc_newmodels;
   6.309 +
   6.310 +char *sNewClassModelFiles[] =
   6.311 +{
   6.312 +	NULL,
   6.313 +	"models/player/scout/scout.mdl",
   6.314 +	"models/player/sniper/sniper.mdl",
   6.315 +	"models/player/soldier/soldier.mdl",
   6.316 +	"models/player/demo/demo.mdl",
   6.317 +	"models/player/medic/medic.mdl",
   6.318 +	"models/player/hvyweapon/hvyweapon.mdl",
   6.319 +	"models/player/pyro/pyro.mdl",
   6.320 +	"models/player/spy/spy.mdl",
   6.321 +	"models/player/engineer/engineer.mdl",
   6.322 +	"models/player/scout/scout.mdl",	// PC_RANDOM
   6.323 +	"models/player/civilian/civilian.mdl",
   6.324 +};
   6.325 +
   6.326 +char *sOldClassModelFiles[] =
   6.327 +{
   6.328 +	NULL,
   6.329 +	"models/player/scout/scout2.mdl",
   6.330 +	"models/player/sniper/sniper2.mdl",
   6.331 +	"models/player/soldier/soldier2.mdl",
   6.332 +	"models/player/demo/demo2.mdl",
   6.333 +	"models/player/medic/medic2.mdl",
   6.334 +	"models/player/hvyweapon/hvyweapon2.mdl",
   6.335 +	"models/player/pyro/pyro2.mdl",
   6.336 +	"models/player/spy/spy2.mdl",
   6.337 +	"models/player/engineer/engineer2.mdl",
   6.338 +	"models/player/scout/scout2.mdl",	// PC_RANDOM
   6.339 +	"models/player/civilian/civilian.mdl",
   6.340 +};
   6.341 +
   6.342 +#define NUM_WEAPON_PMODELS 18
   6.343 +
   6.344 +char *sNewWeaponPModels[] =
   6.345 +{
   6.346 +	"models/p_9mmhandgun.mdl",
   6.347 +	"models/p_crowbar.mdl",
   6.348 +	"models/p_egon.mdl",
   6.349 +	"models/p_glauncher.mdl",
   6.350 +	"models/p_grenade.mdl",
   6.351 +	"models/p_knife.mdl",
   6.352 +	"models/p_medkit.mdl",
   6.353 +	"models/p_mini.mdl",
   6.354 +	"models/p_nailgun.mdl",
   6.355 +	"models/p_srpg.mdl",
   6.356 +	"models/p_shotgun.mdl",
   6.357 +	"models/p_snailgun.mdl",
   6.358 +	"models/p_sniper.mdl",
   6.359 +	"models/p_spanner.mdl",
   6.360 +	"models/p_umbrella.mdl",
   6.361 +	"models/p_rpg.mdl",
   6.362 +	"models/p_spygun.mdl",
   6.363 +	"models/p_smallshotgun.mdl"
   6.364 +};
   6.365 +
   6.366 +char *sOldWeaponPModels[] =
   6.367 +{
   6.368 +	"models/p_9mmhandgun2.mdl",
   6.369 +	"models/p_crowbar2.mdl",
   6.370 +	"models/p_egon2.mdl",
   6.371 +	"models/p_glauncher2.mdl",
   6.372 +	"models/p_grenade2.mdl",
   6.373 +	"models/p_knife2.mdl",
   6.374 +	"models/p_medkit2.mdl",
   6.375 +	"models/p_mini2.mdl",
   6.376 +	"models/p_nailgun2.mdl",
   6.377 +	"models/p_rpg2.mdl",
   6.378 +	"models/p_shotgun2.mdl",
   6.379 +	"models/p_snailgun2.mdl",
   6.380 +	"models/p_sniper2.mdl",
   6.381 +	"models/p_spanner2.mdl",
   6.382 +	"models/p_umbrella.mdl",
   6.383 +	"models/p_rpg2.mdl",
   6.384 +	"models/p_9mmhandgun2.mdl",
   6.385 +	"models/p_shotgun2.mdl"
   6.386 +};
   6.387 +
   6.388 +
   6.389 +int CStudioModelRenderer :: ReturnDiguisedClass ( int iPlayerIndex )
   6.390 +{
   6.391 +	m_pRenderModel = IEngineStudio.SetupPlayerModel( iPlayerIndex );
   6.392 +
   6.393 +	if ( !m_pRenderModel )
   6.394 +		return PC_SCOUT;
   6.395 +	
   6.396 +	for ( int i = PC_SCOUT ; i < PC_LASTCLASS ;  i++ )
   6.397 +	{
   6.398 +		if ( !strcmp ( m_pRenderModel->name, sNewClassModelFiles[ i ] ) )
   6.399 +			return i;
   6.400 +	}
   6.401 +
   6.402 +	return PC_SCOUT;
   6.403 +}
   6.404 +
   6.405 +char * ReturnCorrectedModelString ( int iSwitchClass )
   6.406 +{
   6.407 +	if ( tfc_newmodels->value == TFC_MODELS_OLD )
   6.408 +	{
   6.409 +		if ( sOldClassModelFiles[ iSwitchClass ] )
   6.410 +			return sOldClassModelFiles[ iSwitchClass ];
   6.411 +		else
   6.412 +			return sOldClassModelFiles[ PC_SCOUT ];
   6.413 +	}
   6.414 +	else
   6.415 +	{
   6.416 +		if ( sNewClassModelFiles[ iSwitchClass ] )
   6.417 +			return sNewClassModelFiles[ iSwitchClass ];
   6.418 +		else
   6.419 +			return sNewClassModelFiles[ PC_SCOUT ];
   6.420 +	}
   6.421 +}
   6.422 +
   6.423 +#endif
   6.424 +
   6.425 +#ifdef _TFC
   6.426 +float g_flSpinUpTime[ 33 ];
   6.427 +float g_flSpinDownTime[ 33 ];
   6.428 +#endif
   6.429 +
   6.430 +
   6.431  /*
   6.432  ====================
   6.433  StudioDrawPlayer
   6.434 @@ -1351,18 +1669,36 @@
   6.435  	IEngineStudio.GetViewInfo( m_vRenderOrigin, m_vUp, m_vRight, m_vNormal );
   6.436  	IEngineStudio.GetAliasScale( &m_fSoftwareXScale, &m_fSoftwareYScale );
   6.437  
   6.438 -	// Con_DPrintf("DrawPlayer %d\n", m_pCurrentEntity->blending[0] );
   6.439 -
   6.440 -	// Con_DPrintf("DrawPlayer %d %d (%d)\n", m_nFrameCount, pplayer->player_index, m_pCurrentEntity->curstate.sequence );
   6.441 -
   6.442 -	// Con_DPrintf("Player %.2f %.2f %.2f\n", pplayer->velocity[0], pplayer->velocity[1], pplayer->velocity[2] );
   6.443 -
   6.444  	m_nPlayerIndex = pplayer->number - 1;
   6.445  
   6.446  	if (m_nPlayerIndex < 0 || m_nPlayerIndex >= gEngfuncs.GetMaxClients())
   6.447  		return 0;
   6.448  
   6.449 +#if defined( _TFC )
   6.450 +
   6.451 +	int modelindex; 
   6.452 +	int iSwitchClass = pplayer->playerclass;
   6.453 +
   6.454 +	if ( iSwitchClass == PC_SPY )
   6.455 +		iSwitchClass = ReturnDiguisedClass( m_nPlayerIndex );
   6.456 +
   6.457 +	// do we have a "replacement_model" for this player?
   6.458 +	if ( pplayer->fuser1 )
   6.459 +	{
   6.460 +		m_pRenderModel = IEngineStudio.SetupPlayerModel( m_nPlayerIndex );
   6.461 +	}
   6.462 +	else
   6.463 +	{
   6.464 +		// get the model pointer using a "corrected" model string based on tfc_newmodels
   6.465 +		m_pRenderModel = gEngfuncs.CL_LoadModel( ReturnCorrectedModelString( iSwitchClass ), &modelindex );
   6.466 +	}
   6.467 +
   6.468 +#else
   6.469 +
   6.470  	m_pRenderModel = IEngineStudio.SetupPlayerModel( m_nPlayerIndex );
   6.471 +
   6.472 +#endif
   6.473 +
   6.474  	if (m_pRenderModel == NULL)
   6.475  		return 0;
   6.476  
   6.477 @@ -1458,9 +1794,48 @@
   6.478  
   6.479  		m_pPlayerInfo = IEngineStudio.PlayerInfo( m_nPlayerIndex );
   6.480  
   6.481 +#if defined _TFC
   6.482 +
   6.483 +		m_nTopColor    = m_pPlayerInfo->topcolor;
   6.484 +		m_nBottomColor = m_pPlayerInfo->bottomcolor;
   6.485 +
   6.486 +		// get old remap colors
   6.487 +		if ( tfc_newmodels->value == TFC_MODELS_OLD )
   6.488 +		{
   6.489 +			// team 1
   6.490 +			if ( ( m_nTopColor < 155 ) && ( m_nTopColor > 135 ) )
   6.491 +			{
   6.492 +				m_nTopColor    = TEAM1_COLOR;
   6.493 +				m_nBottomColor = TEAM1_COLOR - 10;
   6.494 +			}
   6.495 +			// team 2
   6.496 +			else if ( ( m_nTopColor < 260 ) && ( ( m_nTopColor > 240 ) || ( m_nTopColor == 5 ) ) )
   6.497 +			{
   6.498 +				m_nTopColor    = TEAM2_COLOR;
   6.499 +				m_nBottomColor = TEAM2_COLOR - 10;
   6.500 +			}
   6.501 +			// team 3
   6.502 +			else if ( ( m_nTopColor < 50 ) && ( m_nTopColor > 40 ) )
   6.503 +			{
   6.504 +				m_nTopColor    = TEAM3_COLOR;
   6.505 +				m_nBottomColor = TEAM3_COLOR - 10;
   6.506 +			}
   6.507 +			// team 4
   6.508 +			else if ( ( m_nTopColor < 110 )  && ( m_nTopColor > 75 ) )
   6.509 +			{
   6.510 +				m_nTopColor    = TEAM4_COLOR;
   6.511 +				m_nBottomColor = TEAM4_COLOR - 10;
   6.512 +			}
   6.513 +		}
   6.514 +
   6.515 +#else
   6.516  		// get remap colors
   6.517 -		m_nTopColor = m_pPlayerInfo->topcolor;
   6.518 +		m_nTopColor    = m_pPlayerInfo->topcolor;
   6.519  		m_nBottomColor = m_pPlayerInfo->bottomcolor;
   6.520 +
   6.521 +#endif
   6.522 +
   6.523 +		// bounds check
   6.524  		if (m_nTopColor < 0)
   6.525  			m_nTopColor = 0;
   6.526  		if (m_nTopColor > 360)
   6.527 @@ -1481,10 +1856,77 @@
   6.528  
   6.529  			model_t *pweaponmodel = IEngineStudio.GetModelByIndex( pplayer->weaponmodel );
   6.530  
   6.531 +#if defined _TFC
   6.532 +			if ( pweaponmodel )
   6.533 +			{
   6.534 +				// if we want to see the old p_models
   6.535 +				if ( tfc_newmodels->value == TFC_MODELS_OLD )
   6.536 +				{
   6.537 +					for ( int i = 0 ; i < NUM_WEAPON_PMODELS ; ++i )
   6.538 +					{
   6.539 +						if ( !stricmp( pweaponmodel->name, sNewWeaponPModels[i] ) )
   6.540 +						{
   6.541 +							gEngfuncs.CL_LoadModel(  sOldWeaponPModels[i] , &modelindex );
   6.542 +							pweaponmodel = IEngineStudio.GetModelByIndex( modelindex );
   6.543 +							break;
   6.544 +						}
   6.545 +					}
   6.546 +				}
   6.547 +			}
   6.548 +#endif
   6.549  			m_pStudioHeader = (studiohdr_t *)IEngineStudio.Mod_Extradata (pweaponmodel);
   6.550  			IEngineStudio.StudioSetHeader( m_pStudioHeader );
   6.551  
   6.552 -			StudioMergeBones( pweaponmodel);
   6.553 +#ifdef _TFC		
   6.554 +			//Do spinning stuff for the HWGuy minigun
   6.555 +			if ( strstr ( m_pStudioHeader->name, "p_mini.mdl" ) )
   6.556 +			{
   6.557 +				if ( g_flSpinUpTime[ m_nPlayerIndex ] && g_flSpinUpTime[ m_nPlayerIndex ] > gEngfuncs.GetClientTime() )
   6.558 +				{
   6.559 +					float flmod = ( g_flSpinUpTime[ m_nPlayerIndex ] - ( gEngfuncs.GetClientTime() + 3.5 ) );
   6.560 +					flmod *= -30;
   6.561 +				
   6.562 +					m_pCurrentEntity->curstate.frame = flmod;
   6.563 +					m_pCurrentEntity->curstate.sequence = 2;
   6.564 +				}
   6.565 +				
   6.566 +				else if ( g_flSpinUpTime[ m_nPlayerIndex ] && g_flSpinUpTime[ m_nPlayerIndex ] <= gEngfuncs.GetClientTime() )
   6.567 +					g_flSpinUpTime[ m_nPlayerIndex ] = 0.0;
   6.568 +								
   6.569 +				else if ( g_flSpinDownTime[ m_nPlayerIndex ] && g_flSpinDownTime[ m_nPlayerIndex ] > gEngfuncs.GetClientTime() && !g_flSpinUpTime[ m_nPlayerIndex ] )
   6.570 +				{
   6.571 +					float flmod = ( g_flSpinDownTime[ m_nPlayerIndex ] - ( gEngfuncs.GetClientTime() + 3.5 ) );
   6.572 +					flmod *= -30;
   6.573 +				
   6.574 +					m_pCurrentEntity->curstate.frame = flmod;
   6.575 +					m_pCurrentEntity->curstate.sequence = 3;
   6.576 +				}
   6.577 +				
   6.578 +				else if ( g_flSpinDownTime[ m_nPlayerIndex ] && g_flSpinDownTime[ m_nPlayerIndex ] <= gEngfuncs.GetClientTime() && !g_flSpinUpTime[ m_nPlayerIndex ] )
   6.579 +					g_flSpinDownTime[ m_nPlayerIndex ] = 0.0;
   6.580 +
   6.581 +				if ( m_pCurrentEntity->curstate.sequence == 70 || m_pCurrentEntity->curstate.sequence == 72 )
   6.582 +				{
   6.583 +					if ( g_flSpinUpTime[ m_nPlayerIndex ] )
   6.584 +						g_flSpinUpTime[ m_nPlayerIndex ] = 0.0;
   6.585 +				
   6.586 +					m_pCurrentEntity->curstate.sequence = 1;
   6.587 +				}
   6.588 +
   6.589 +				StudioSetupBones( );
   6.590 +			}
   6.591 +			else
   6.592 +			{
   6.593 +				if ( g_flSpinUpTime[ m_nPlayerIndex ] || g_flSpinDownTime[ m_nPlayerIndex ] )
   6.594 +				{
   6.595 +					g_flSpinUpTime[ m_nPlayerIndex ] = 0.0;
   6.596 +					g_flSpinDownTime[ m_nPlayerIndex ] = 0.0;
   6.597 +				}
   6.598 +			}
   6.599 +
   6.600 +#endif
   6.601 +
   6.602 +			StudioMergeBones( pweaponmodel );
   6.603  
   6.604  			IEngineStudio.StudioSetupLighting (&lighting);
   6.605  
   6.606 @@ -1675,3 +2117,4 @@
   6.607  	}
   6.608  }
   6.609  
   6.610 +
     7.1 --- a/multiplayer/cl_dll/ammo.cpp	Fri Mar 15 01:26:54 2013 -0500
     7.2 +++ b/multiplayer/cl_dll/ammo.cpp	Thu Sep 05 19:47:29 2013 -0500
     7.3 @@ -109,7 +109,7 @@
     7.4  		pWeapon->rcCrosshair = p->rc;
     7.5  	}
     7.6  	else
     7.7 -		pWeapon->hCrosshair = NULL;
     7.8 +		pWeapon->hCrosshair = 0;
     7.9  
    7.10  	p = GetSpriteList(pList, "autoaim", iRes, i);
    7.11  	if (p)
    7.12 @@ -229,7 +229,7 @@
    7.13  
    7.14  int giBucketHeight, giBucketWidth, giABHeight, giABWidth; // Ammo Bar width and height
    7.15  
    7.16 -HSPRITE ghsprBuckets;					// Sprite for top row of weapons menu
    7.17 +HLSPRITE ghsprBuckets;					// Sprite for top row of weapons menu
    7.18  
    7.19  DECLARE_MESSAGE(m_Ammo, CurWeapon );	// Current weapon and clip
    7.20  DECLARE_MESSAGE(m_Ammo, WeaponList);	// new weapon type
    7.21 @@ -308,9 +308,6 @@
    7.22  
    7.23  	gWR.Reset();
    7.24  	gHR.Reset();
    7.25 -
    7.26 -	//	VidInit();
    7.27 -
    7.28  }
    7.29  
    7.30  int CHudAmmo::VidInit(void)
    7.31 @@ -394,7 +391,7 @@
    7.32  // Helper function to return a Ammo pointer from id
    7.33  //
    7.34  
    7.35 -HSPRITE* WeaponsResource :: GetAmmoPicFromWeapon( int iAmmoId, wrect_t& rect )
    7.36 +HLSPRITE* WeaponsResource :: GetAmmoPicFromWeapon( int iAmmoId, wrect_t& rect )
    7.37  {
    7.38  	for ( int i = 0; i < MAX_WEAPONS; i++ )
    7.39  	{
    7.40 @@ -740,7 +737,7 @@
    7.41  		PlaySound("common/wpn_hudoff.wav", 1);
    7.42  	}
    7.43  	else
    7.44 -		ClientCmd("escape");
    7.45 +		EngineClientCmd("escape");
    7.46  }
    7.47  
    7.48  
    7.49 @@ -890,11 +887,11 @@
    7.50  			x = ScreenWidth - (8 * AmmoWidth) - iIconWidth;
    7.51  			x = gHUD.DrawHudNumber(x, y, iFlags | DHN_3DIGITS, pw->iClip, r, g, b);
    7.52  
    7.53 -			wrect_t rc;
    7.54 +			/*wrect_t rc;
    7.55  			rc.top = 0;
    7.56  			rc.left = 0;
    7.57  			rc.right = AmmoWidth;
    7.58 -			rc.bottom = 100;
    7.59 +			rc.bottom = 100;*/
    7.60  
    7.61  			int iBarWidth =  AmmoWidth/10;
    7.62  
     8.1 --- a/multiplayer/cl_dll/ammo.h	Fri Mar 15 01:26:54 2013 -0500
     8.2 +++ b/multiplayer/cl_dll/ammo.h	Thu Sep 05 19:47:29 2013 -0500
     8.3 @@ -38,21 +38,21 @@
     8.4  
     8.5  	int		iCount;		// # of itesm in plist
     8.6  
     8.7 -	HSPRITE hActive;
     8.8 +	HLSPRITE hActive;
     8.9  	wrect_t rcActive;
    8.10 -	HSPRITE hInactive;
    8.11 +	HLSPRITE hInactive;
    8.12  	wrect_t rcInactive;
    8.13 -	HSPRITE	hAmmo;
    8.14 +	HLSPRITE hAmmo;
    8.15  	wrect_t rcAmmo;
    8.16 -	HSPRITE hAmmo2;
    8.17 +	HLSPRITE hAmmo2;
    8.18  	wrect_t rcAmmo2;
    8.19 -	HSPRITE hCrosshair;
    8.20 +	HLSPRITE hCrosshair;
    8.21  	wrect_t rcCrosshair;
    8.22 -	HSPRITE hAutoaim;
    8.23 +	HLSPRITE hAutoaim;
    8.24  	wrect_t rcAutoaim;
    8.25 -	HSPRITE hZoomedCrosshair;
    8.26 +	HLSPRITE hZoomedCrosshair;
    8.27  	wrect_t rcZoomedCrosshair;
    8.28 -	HSPRITE hZoomedAutoaim;
    8.29 +	HLSPRITE hZoomedAutoaim;
    8.30  	wrect_t rcZoomedAutoaim;
    8.31  };
    8.32  
     9.1 --- a/multiplayer/cl_dll/ammohistory.cpp	Fri Mar 15 01:26:54 2013 -0500
     9.2 +++ b/multiplayer/cl_dll/ammohistory.cpp	Thu Sep 05 19:47:29 2013 -0500
     9.3 @@ -39,7 +39,7 @@
     9.4  struct ITEM_INFO
     9.5  {
     9.6  	char szName[MAX_ITEM_NAME];
     9.7 -	HSPRITE spr;
     9.8 +	HLSPRITE spr;
     9.9  	wrect_t rect;
    9.10  };
    9.11  
    9.12 @@ -121,7 +121,7 @@
    9.13  			else if ( rgAmmoHistory[i].type == HISTSLOT_AMMO )
    9.14  			{
    9.15  				wrect_t rcPic;
    9.16 -				HSPRITE *spr = gWR.GetAmmoPicFromWeapon( rgAmmoHistory[i].iId, rcPic );
    9.17 +				HLSPRITE *spr = gWR.GetAmmoPicFromWeapon( rgAmmoHistory[i].iId, rcPic );
    9.18  
    9.19  				int r, g, b;
    9.20  				UnpackRGB(r,g,b, RGB_YELLOWISH);
    10.1 --- a/multiplayer/cl_dll/ammohistory.h	Fri Mar 15 01:26:54 2013 -0500
    10.2 +++ b/multiplayer/cl_dll/ammohistory.h	Thu Sep 05 19:47:29 2013 -0500
    10.3 @@ -89,7 +89,7 @@
    10.4  
    10.5  	int CountAmmo( int iId );
    10.6  
    10.7 -	HSPRITE* GetAmmoPicFromWeapon( int iAmmoId, wrect_t& rect );
    10.8 +	HLSPRITE* GetAmmoPicFromWeapon( int iAmmoId, wrect_t& rect );
    10.9  };
   10.10  
   10.11  extern WeaponsResource gWR;
    11.1 --- a/multiplayer/cl_dll/battery.cpp	Fri Mar 15 01:26:54 2013 -0500
    11.2 +++ b/multiplayer/cl_dll/battery.cpp	Thu Sep 05 19:47:29 2013 -0500
    11.3 @@ -57,16 +57,26 @@
    11.4  int CHudBattery:: MsgFunc_Battery(const char *pszName,  int iSize, void *pbuf )
    11.5  {
    11.6  	m_iFlags |= HUD_ACTIVE;
    11.7 -
    11.8  	
    11.9  	BEGIN_READ( pbuf, iSize );
   11.10  	int x = READ_SHORT();
   11.11  
   11.12 -	if (x != m_iBat)
   11.13 +#if defined( _TFC )
   11.14 +	int y = READ_SHORT();
   11.15 +
   11.16 +	if ( x != m_iBat || y != m_iBatMax )
   11.17 +	{
   11.18 +		m_fFade = FADE_TIME;
   11.19 +		m_iBat = x;
   11.20 +		m_iBatMax = y;
   11.21 +	}
   11.22 +#else
   11.23 +	if ( x != m_iBat )
   11.24  	{
   11.25  		m_fFade = FADE_TIME;
   11.26  		m_iBat = x;
   11.27  	}
   11.28 +#endif
   11.29  
   11.30  	return 1;
   11.31  }
   11.32 @@ -81,7 +91,17 @@
   11.33  	wrect_t rc;
   11.34  
   11.35  	rc = *m_prc2;
   11.36 +
   11.37 +#if defined( _TFC )
   11.38 +	float fScale = 0.0;
   11.39 +	
   11.40 +	if ( m_iBatMax > 0 )
   11.41 +		fScale = 1.0 / (float)m_iBatMax;
   11.42 +
   11.43 +	rc.top  += m_iHeight * ((float)(m_iBatMax-(min(m_iBatMax,m_iBat))) * fScale); // battery can go from 0 to m_iBatMax so * fScale goes from 0 to 1
   11.44 +#else
   11.45  	rc.top  += m_iHeight * ((float)(100-(min(100,m_iBat))) * 0.01);	// battery can go from 0 to 100 so * 0.01 goes from 0 to 1
   11.46 +#endif
   11.47  
   11.48  	UnpackRGB(r,g,b, RGB_YELLOWISH);
   11.49  
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/multiplayer/cl_dll/bench.h	Thu Sep 05 19:47:29 2013 -0500
    12.3 @@ -0,0 +1,26 @@
    12.4 +#if !defined ( BENCHH )
    12.5 +#define BENCHH
    12.6 +#pragma once
    12.7 +
    12.8 +#define FIRST_STAGE		1
    12.9 +#define SECOND_STAGE	2
   12.10 +#define THIRD_STAGE		3
   12.11 +#define FOURTH_STAGE	4
   12.12 +#define LAST_STAGE		( FOURTH_STAGE )
   12.13 +
   12.14 +void Bench_CheckStart( void );
   12.15 +
   12.16 +int Bench_InStage( int stage );
   12.17 +int Bench_GetPowerPlay( void );
   12.18 +int Bench_GetStage( void );
   12.19 +void Bench_SetPowerPlay( int set );
   12.20 +int Bench_Active( void );
   12.21 +
   12.22 +void Bench_SetDotAdded( int dot );
   12.23 +void Bench_SpotPosition( vec3_t dot, vec3_t target );
   12.24 +void Bench_CheckEntity( int type, struct cl_entity_s *ent, const char *modelname );
   12.25 +void Bench_AddObjects( void );
   12.26 +void Bench_SetViewAngles( int recalc_wander, float *viewangles, float frametime, struct usercmd_s *cmd );
   12.27 +void Bench_SetViewOrigin( float *vieworigin, float frametime );
   12.28 +
   12.29 +#endif
   12.30 \ No newline at end of file
    13.1 --- a/multiplayer/cl_dll/cdll_int.cpp	Fri Mar 15 01:26:54 2013 -0500
    13.2 +++ b/multiplayer/cl_dll/cdll_int.cpp	Thu Sep 05 19:47:29 2013 -0500
    13.3 @@ -21,7 +21,9 @@
    13.4  #include "hud.h"
    13.5  #include "cl_util.h"
    13.6  #include "netadr.h"
    13.7 -#include "vgui_schememanager.h"
    13.8 +#undef INTERFACE_H
    13.9 +#include "../public/interface.h"
   13.10 +//#include "vgui_schememanager.h"
   13.11  
   13.12  extern "C"
   13.13  {
   13.14 @@ -33,51 +35,41 @@
   13.15  #include "vgui_int.h"
   13.16  #include "interface.h"
   13.17  
   13.18 -#define DLLEXPORT __declspec( dllexport )
   13.19 -
   13.20 +#ifdef _WIN32
   13.21 +#include <windows.h>
   13.22 +#endif
   13.23 +#include "Exports.h"
   13.24 +#include "tri.h"
   13.25 +#include "vgui_TeamFortressViewport.h"
   13.26 +#include "../public/interface.h"
   13.27  
   13.28  cl_enginefunc_t gEngfuncs;
   13.29  CHud gHUD;
   13.30  TeamFortressViewport *gViewPort = NULL;
   13.31  
   13.32 +
   13.33 +#include "particleman.h"
   13.34 +CSysModule *g_hParticleManModule = NULL;
   13.35 +IParticleMan *g_pParticleMan = NULL;
   13.36 +
   13.37 +void CL_LoadParticleMan( void );
   13.38 +void CL_UnloadParticleMan( void );
   13.39 +
   13.40  void InitInput (void);
   13.41  void EV_HookEvents( void );
   13.42  void IN_Commands( void );
   13.43  
   13.44  /*
   13.45 -========================== 
   13.46 -    Initialize
   13.47 -
   13.48 -Called when the DLL is first loaded.
   13.49 -==========================
   13.50 -*/
   13.51 -extern "C" 
   13.52 -{
   13.53 -int		DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion );
   13.54 -int		DLLEXPORT HUD_VidInit( void );
   13.55 -void	DLLEXPORT HUD_Init( void );
   13.56 -int		DLLEXPORT HUD_Redraw( float flTime, int intermission );
   13.57 -int		DLLEXPORT HUD_UpdateClientData( client_data_t *cdata, float flTime );
   13.58 -void	DLLEXPORT HUD_Reset ( void );
   13.59 -void	DLLEXPORT HUD_PlayerMove( struct playermove_s *ppmove, int server );
   13.60 -void	DLLEXPORT HUD_PlayerMoveInit( struct playermove_s *ppmove );
   13.61 -char	DLLEXPORT HUD_PlayerMoveTexture( char *name );
   13.62 -int		DLLEXPORT HUD_ConnectionlessPacket( const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size );
   13.63 -int		DLLEXPORT HUD_GetHullBounds( int hullnumber, float *mins, float *maxs );
   13.64 -void	DLLEXPORT HUD_Frame( double time );
   13.65 -void	DLLEXPORT HUD_VoiceStatus(int entindex, qboolean bTalking);
   13.66 -void	DLLEXPORT HUD_DirectorMessage( int iSize, void *pbuf );
   13.67 -}
   13.68 -
   13.69 -/*
   13.70  ================================
   13.71  HUD_GetHullBounds
   13.72  
   13.73    Engine calls this to enumerate player collision hulls, for prediction.  Return 0 if the hullnumber doesn't exist.
   13.74  ================================
   13.75  */
   13.76 -int DLLEXPORT HUD_GetHullBounds( int hullnumber, float *mins, float *maxs )
   13.77 +int CL_DLLEXPORT HUD_GetHullBounds( int hullnumber, float *mins, float *maxs )
   13.78  {
   13.79 +//	RecClGetHullBounds(hullnumber, mins, maxs);
   13.80 +
   13.81  	int iret = 0;
   13.82  
   13.83  	switch ( hullnumber )
   13.84 @@ -110,11 +102,10 @@
   13.85    size of the response_buffer, so you must zero it out if you choose not to respond.
   13.86  ================================
   13.87  */
   13.88 -int	DLLEXPORT HUD_ConnectionlessPacket( const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size )
   13.89 +int	CL_DLLEXPORT HUD_ConnectionlessPacket( const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size )
   13.90  {
   13.91 -	// Parse stuff from args
   13.92 -	int max_buffer_size = *response_buffer_size;
   13.93 -
   13.94 +//	RecClConnectionlessPacket(net_from, args, response_buffer, response_buffer_size);
   13.95 +	
   13.96  	// Zero it out since we aren't going to respond.
   13.97  	// If we wanted to response, we'd write data into response_buffer
   13.98  	*response_buffer_size = 0;
   13.99 @@ -124,32 +115,42 @@
  13.100  	return 0;
  13.101  }
  13.102  
  13.103 -void DLLEXPORT HUD_PlayerMoveInit( struct playermove_s *ppmove )
  13.104 +void CL_DLLEXPORT HUD_PlayerMoveInit( struct playermove_s *ppmove )
  13.105  {
  13.106 +//	RecClClientMoveInit(ppmove);
  13.107 +
  13.108  	PM_Init( ppmove );
  13.109  }
  13.110  
  13.111 -char DLLEXPORT HUD_PlayerMoveTexture( char *name )
  13.112 +char CL_DLLEXPORT HUD_PlayerMoveTexture( char *name )
  13.113  {
  13.114 +//	RecClClientTextureType(name);
  13.115 +
  13.116  	return PM_FindTextureType( name );
  13.117  }
  13.118  
  13.119 -void DLLEXPORT HUD_PlayerMove( struct playermove_s *ppmove, int server )
  13.120 +void CL_DLLEXPORT HUD_PlayerMove( struct playermove_s *ppmove, int server )
  13.121  {
  13.122 +//	RecClClientMove(ppmove, server);
  13.123 +
  13.124  	PM_Move( ppmove, server );
  13.125  }
  13.126  
  13.127 -int DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion )
  13.128 +int CL_DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion )
  13.129  {
  13.130  	gEngfuncs = *pEnginefuncs;
  13.131  
  13.132 +//	RecClInitialize(pEnginefuncs, iVersion);
  13.133 +
  13.134  	if (iVersion != CLDLL_INTERFACE_VERSION)
  13.135  		return 0;
  13.136  
  13.137  	memcpy(&gEngfuncs, pEnginefuncs, sizeof(cl_enginefunc_t));
  13.138  
  13.139  	EV_HookEvents();
  13.140 +	CL_LoadParticleMan();
  13.141  
  13.142 +	// get tracker interface, if any
  13.143  	return 1;
  13.144  }
  13.145  
  13.146 @@ -164,8 +165,9 @@
  13.147  ==========================
  13.148  */
  13.149  
  13.150 -int DLLEXPORT HUD_VidInit( void )
  13.151 +int CL_DLLEXPORT HUD_VidInit( void )
  13.152  {
  13.153 +//	RecClHudVidInit();
  13.154  	gHUD.VidInit();
  13.155  
  13.156  	VGui_Startup();
  13.157 @@ -183,8 +185,9 @@
  13.158  ==========================
  13.159  */
  13.160  
  13.161 -void DLLEXPORT HUD_Init( void )
  13.162 +void CL_DLLEXPORT HUD_Init( void )
  13.163  {
  13.164 +//	RecClHudInit();
  13.165  	InitInput();
  13.166  	gHUD.Init();
  13.167  	Scheme_Init();
  13.168 @@ -200,8 +203,10 @@
  13.169  ===========================
  13.170  */
  13.171  
  13.172 -int DLLEXPORT HUD_Redraw( float time, int intermission )
  13.173 +int CL_DLLEXPORT HUD_Redraw( float time, int intermission )
  13.174  {
  13.175 +//	RecClHudRedraw(time, intermission);
  13.176 +
  13.177  	gHUD.Redraw( time, intermission );
  13.178  
  13.179  	return 1;
  13.180 @@ -221,8 +226,10 @@
  13.181  ==========================
  13.182  */
  13.183  
  13.184 -int DLLEXPORT HUD_UpdateClientData(client_data_t *pcldata, float flTime )
  13.185 +int CL_DLLEXPORT HUD_UpdateClientData(client_data_t *pcldata, float flTime )
  13.186  {
  13.187 +//	RecClHudUpdateClientData(pcldata, flTime);
  13.188 +
  13.189  	IN_Commands();
  13.190  
  13.191  	return gHUD.UpdateClientData(pcldata, flTime );
  13.192 @@ -236,8 +243,10 @@
  13.193  ==========================
  13.194  */
  13.195  
  13.196 -void DLLEXPORT HUD_Reset( void )
  13.197 +void CL_DLLEXPORT HUD_Reset( void )
  13.198  {
  13.199 +//	RecClHudReset();
  13.200 +
  13.201  	gHUD.VidInit();
  13.202  }
  13.203  
  13.204 @@ -249,8 +258,10 @@
  13.205  ==========================
  13.206  */
  13.207  
  13.208 -void DLLEXPORT HUD_Frame( double time )
  13.209 +void CL_DLLEXPORT HUD_Frame( double time )
  13.210  {
  13.211 +//	RecClHudFrame(time);
  13.212 +
  13.213  	ServersThink( time );
  13.214  
  13.215  	GetClientVoiceMgr()->Frame(time);
  13.216 @@ -265,22 +276,166 @@
  13.217  ==========================
  13.218  */
  13.219  
  13.220 -void DLLEXPORT HUD_VoiceStatus(int entindex, qboolean bTalking)
  13.221 +void CL_DLLEXPORT HUD_VoiceStatus(int entindex, qboolean bTalking)
  13.222  {
  13.223 +////	RecClVoiceStatus(entindex, bTalking);
  13.224 +
  13.225  	GetClientVoiceMgr()->UpdateSpeakerStatus(entindex, bTalking);
  13.226  }
  13.227  
  13.228  /*
  13.229  ==========================
  13.230 -HUD_DirectorEvent
  13.231 +HUD_DirectorMessage
  13.232  
  13.233  Called when a director event message was received
  13.234  ==========================
  13.235  */
  13.236  
  13.237 -void DLLEXPORT HUD_DirectorMessage( int iSize, void *pbuf )
  13.238 +void CL_DLLEXPORT HUD_DirectorMessage( int iSize, void *pbuf )
  13.239  {
  13.240 -	 gHUD.m_Spectator.DirectorMessage( iSize, pbuf );
  13.241 +//	RecClDirectorMessage(iSize, pbuf);
  13.242 +
  13.243 +	gHUD.m_Spectator.DirectorMessage( iSize, pbuf );
  13.244  }
  13.245  
  13.246 +void CL_UnloadParticleMan( void )
  13.247 +{
  13.248 +	Sys_UnloadModule( g_hParticleManModule );
  13.249  
  13.250 +	g_pParticleMan = NULL;
  13.251 +	g_hParticleManModule = NULL;
  13.252 +}
  13.253 +
  13.254 +void CL_LoadParticleMan( void )
  13.255 +{
  13.256 +	char szPDir[512];
  13.257 +
  13.258 +	if ( gEngfuncs.COM_ExpandFilename( PARTICLEMAN_DLLNAME, szPDir, sizeof( szPDir ) ) == FALSE )
  13.259 +	{
  13.260 +		g_pParticleMan = NULL;
  13.261 +		g_hParticleManModule = NULL;
  13.262 +		return;
  13.263 +	}
  13.264 +
  13.265 +	g_hParticleManModule = Sys_LoadModule( szPDir );
  13.266 +	CreateInterfaceFn particleManFactory = Sys_GetFactory( g_hParticleManModule );
  13.267 +
  13.268 +	if ( particleManFactory == NULL )
  13.269 +	{
  13.270 +		g_pParticleMan = NULL;
  13.271 +		g_hParticleManModule = NULL;
  13.272 +		return;
  13.273 +	}
  13.274 +
  13.275 +	g_pParticleMan = (IParticleMan *)particleManFactory( PARTICLEMAN_INTERFACE, NULL);
  13.276 +
  13.277 +	if ( g_pParticleMan )
  13.278 +	{
  13.279 +		 g_pParticleMan->SetUp( &gEngfuncs );
  13.280 +
  13.281 +		 // Add custom particle classes here BEFORE calling anything else or you will die.
  13.282 +		 g_pParticleMan->AddCustomParticleClassSize ( sizeof ( CBaseParticle ) );
  13.283 +	}
  13.284 +}
  13.285 +
  13.286 +cldll_func_dst_t *g_pcldstAddrs;
  13.287 +
  13.288 +extern "C" void CL_DLLEXPORT F(void *pv)
  13.289 +{
  13.290 +	cldll_func_t *pcldll_func = (cldll_func_t *)pv;
  13.291 +
  13.292 +	// Hack!
  13.293 +	g_pcldstAddrs = ((cldll_func_dst_t *)pcldll_func->pHudVidInitFunc);
  13.294 +
  13.295 +	cldll_func_t cldll_func = 
  13.296 +	{
  13.297 +	Initialize,
  13.298 +	HUD_Init,
  13.299 +	HUD_VidInit,
  13.300 +	HUD_Redraw,
  13.301 +	HUD_UpdateClientData,
  13.302 +	HUD_Reset,
  13.303 +	HUD_PlayerMove,
  13.304 +	HUD_PlayerMoveInit,
  13.305 +	HUD_PlayerMoveTexture,
  13.306 +	IN_ActivateMouse,
  13.307 +	IN_DeactivateMouse,
  13.308 +	IN_MouseEvent,
  13.309 +	IN_ClearStates,
  13.310 +	IN_Accumulate,
  13.311 +	CL_CreateMove,
  13.312 +	CL_IsThirdPerson,
  13.313 +	CL_CameraOffset,
  13.314 +	KB_Find,
  13.315 +	CAM_Think,
  13.316 +	V_CalcRefdef,
  13.317 +	HUD_AddEntity,
  13.318 +	HUD_CreateEntities,
  13.319 +	HUD_DrawNormalTriangles,
  13.320 +	HUD_DrawTransparentTriangles,
  13.321 +	HUD_StudioEvent,
  13.322 +	HUD_PostRunCmd,
  13.323 +	HUD_Shutdown,
  13.324 +	HUD_TxferLocalOverrides,
  13.325 +	HUD_ProcessPlayerState,
  13.326 +	HUD_TxferPredictionData,
  13.327 +	Demo_ReadBuffer,
  13.328 +	HUD_ConnectionlessPacket,
  13.329 +	HUD_GetHullBounds,
  13.330 +	HUD_Frame,
  13.331 +	HUD_Key_Event,
  13.332 +	HUD_TempEntUpdate,
  13.333 +	HUD_GetUserEntity,
  13.334 +	HUD_VoiceStatus,
  13.335 +	HUD_DirectorMessage,
  13.336 +	HUD_GetStudioModelInterface,
  13.337 +	HUD_ChatInputPosition,
  13.338 +	};
  13.339 +
  13.340 +	*pcldll_func = cldll_func;
  13.341 +}
  13.342 +
  13.343 +#include "cl_dll/IGameClientExports.h"
  13.344 +
  13.345 +//-----------------------------------------------------------------------------
  13.346 +// Purpose: Exports functions that are used by the gameUI for UI dialogs
  13.347 +//-----------------------------------------------------------------------------
  13.348 +class CClientExports : public IGameClientExports
  13.349 +{
  13.350 +public:
  13.351 +	// returns the name of the server the user is connected to, if any
  13.352 +	virtual const char *GetServerHostName()
  13.353 +	{
  13.354 +		/*if (gViewPortInterface)
  13.355 +		{
  13.356 +			return gViewPortInterface->GetServerName();
  13.357 +		}*/
  13.358 +		return "";
  13.359 +	}
  13.360 +
  13.361 +	// ingame voice manipulation
  13.362 +	virtual bool IsPlayerGameVoiceMuted(int playerIndex)
  13.363 +	{
  13.364 +		if (GetClientVoiceMgr())
  13.365 +			return GetClientVoiceMgr()->IsPlayerBlocked(playerIndex);
  13.366 +		return false;
  13.367 +	}
  13.368 +
  13.369 +	virtual void MutePlayerGameVoice(int playerIndex)
  13.370 +	{
  13.371 +		if (GetClientVoiceMgr())
  13.372 +		{
  13.373 +			GetClientVoiceMgr()->SetPlayerBlockedState(playerIndex, true);
  13.374 +		}
  13.375 +	}
  13.376 +
  13.377 +	virtual void UnmutePlayerGameVoice(int playerIndex)
  13.378 +	{
  13.379 +		if (GetClientVoiceMgr())
  13.380 +		{
  13.381 +			GetClientVoiceMgr()->SetPlayerBlockedState(playerIndex, false);
  13.382 +		}
  13.383 +	}
  13.384 +};
  13.385 +
  13.386 +EXPOSE_SINGLE_INTERFACE(CClientExports, IGameClientExports, GAMECLIENTEXPORTS_INTERFACE_VERSION);
    14.1 --- a/multiplayer/cl_dll/cl_dll.dsp	Fri Mar 15 01:26:54 2013 -0500
    14.2 +++ b/multiplayer/cl_dll/cl_dll.dsp	Thu Sep 05 19:47:29 2013 -0500
    14.3 @@ -23,8 +23,6 @@
    14.4  
    14.5  # Begin Project
    14.6  # PROP AllowPerConfigDependencies 0
    14.7 -# PROP Scc_ProjName ""
    14.8 -# PROP Scc_LocalPath ""
    14.9  CPP=cl.exe
   14.10  MTL=midl.exe
   14.11  RSC=rc.exe
   14.12 @@ -43,7 +41,7 @@
   14.13  # PROP Ignore_Export_Lib 0
   14.14  # PROP Target_Dir ""
   14.15  # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
   14.16 -# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "..\utils\vgui\include" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\dlls" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "CLIENT_DLL" /D "CLIENT_WEAPONS" /YX /FD /c
   14.17 +# ADD CPP /nologo /W3 /GR /GX /Zi /O2 /I "..\dlls" /I "." /I "..\tfc" /I "..\public" /I "..\common" /I "..\pm_shared" /I "..\engine" /I "..\utils\vgui\include" /I "..\game_shared" /I "..\external" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "CLIENT_DLL" /D "CLIENT_WEAPONS" /D "HL_DLL" /FR /YX /FD /c
   14.18  # ADD BASE MTL /nologo /D "NDEBUG" /win32
   14.19  # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
   14.20  # ADD BASE RSC /l 0x409 /d "NDEBUG"
   14.21 @@ -53,7 +51,26 @@
   14.22  # ADD BSC32 /nologo
   14.23  LINK32=link.exe
   14.24  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
   14.25 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib winmm.lib ../utils/vgui/lib/win32_vc6/vgui.lib wsock32.lib /nologo /subsystem:windows /dll /map /machine:I386 /out:".\Release\client.dll"
   14.26 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib winmm.lib ..\utils\vgui\lib\win32_vc6\vgui.lib wsock32.lib ..\lib\public\sdl2.lib /nologo /base:"0x01900000" /subsystem:windows /dll /map /debug /machine:I386 /nodefaultlib:"LIBCMTD" /nodefaultlib:"LIBCD" /out:".\Release\client.dll"
   14.27 +# SUBTRACT LINK32 /pdb:none
   14.28 +# Begin Custom Build
   14.29 +InputDir=.\Release
   14.30 +ProjDir=.
   14.31 +InputPath=.\Release\client.dll
   14.32 +InputName=client
   14.33 +SOURCE="$(InputPath)"
   14.34 +
   14.35 +BuildCmds= \
   14.36 +	call ..\filecopy.bat $(InputDir)\$(InputName).dll $(ProjDir)\..\..\game\mod\cl_dlls\$(InputName).dll \
   14.37 +	call ..\filecopy.bat $(InputDir)\$(InputName).pdb $(ProjDir)\..\..\game\mod\cl_dlls\$(InputName).pdb \
   14.38 +	
   14.39 +
   14.40 +"$(ProjDir)\..\..\game\mod\cl_dlls\$(InputName).dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
   14.41 +   $(BuildCmds)
   14.42 +
   14.43 +"$(ProjDir)\..\..\game\mod\cl_dlls\$(InputName).pdb" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
   14.44 +   $(BuildCmds)
   14.45 +# End Custom Build
   14.46  
   14.47  !ELSEIF  "$(CFG)" == "cl_dll - Win32 Debug"
   14.48  
   14.49 @@ -69,7 +86,7 @@
   14.50  # PROP Ignore_Export_Lib 0
   14.51  # PROP Target_Dir ""
   14.52  # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
   14.53 -# ADD CPP /nologo /G5 /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\dlls" /I "..\common" /I "..\pm_shared" /I "..\engine" /I "..\utils\vgui\include" /I "..\game_shared" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "CLIENT_DLL" /D "CLIENT_WEAPONS" /FR /YX /FD /c
   14.54 +# ADD CPP /nologo /G5 /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\dlls" /I "." /I "..\tfc" /I "..\public" /I "..\common" /I "..\pm_shared" /I "..\engine" /I "..\utils\vgui\include" /I "..\game_shared" /I "..\external" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "CLIENT_DLL" /D "CLIENT_WEAPONS" /D "_WINDLL" /D "HL_DLL" /FR /YX /FD /c
   14.55  # ADD BASE MTL /nologo /D "_DEBUG" /win32
   14.56  # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
   14.57  # ADD BASE RSC /l 0x409 /d "_DEBUG"
   14.58 @@ -79,7 +96,26 @@
   14.59  # ADD BSC32 /nologo
   14.60  LINK32=link.exe
   14.61  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
   14.62 -# ADD LINK32 oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib winmm.lib ../utils/vgui/lib/win32_vc6/vgui.lib wsock32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:".\Debug\client.dll"
   14.63 +# ADD LINK32 oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib winmm.lib ..\utils\vgui\lib\win32_vc6\vgui.lib wsock32.lib ..\lib\public\sdl2.lib /nologo /base:"0x01900000" /subsystem:windows /dll /debug /machine:I386 /out:".\Debug\client.dll"
   14.64 +# SUBTRACT LINK32 /pdb:none
   14.65 +# Begin Custom Build
   14.66 +InputDir=.\Debug
   14.67 +ProjDir=.
   14.68 +InputPath=.\Debug\client.dll
   14.69 +InputName=client
   14.70 +SOURCE="$(InputPath)"
   14.71 +
   14.72 +BuildCmds= \
   14.73 +	call ..\filecopy.bat $(InputDir)\$(InputName).dll $(ProjDir)\..\..\game\mod\cl_dlls\$(InputName).dll \
   14.74 +	call ..\filecopy.bat $(InputDir)\$(InputName).pdb $(ProjDir)\..\..\game\mod\cl_dlls\$(InputName).pdb \
   14.75 +	
   14.76 +
   14.77 +"$(ProjDir)\..\..\game\mod\cl_dlls\$(InputName).dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
   14.78 +   $(BuildCmds)
   14.79 +
   14.80 +"$(ProjDir)\..\..\game\mod\cl_dlls\$(InputName).pdb" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
   14.81 +   $(BuildCmds)
   14.82 +# End Custom Build
   14.83  
   14.84  !ENDIF 
   14.85  
   14.86 @@ -92,7 +128,7 @@
   14.87  # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
   14.88  # Begin Group "hl"
   14.89  
   14.90 -# PROP Default_Filter "*.CPP"
   14.91 +# PROP Default_Filter "*.cpp"
   14.92  # Begin Source File
   14.93  
   14.94  SOURCE=..\dlls\crossbow.cpp
   14.95 @@ -143,10 +179,6 @@
   14.96  # End Source File
   14.97  # Begin Source File
   14.98  
   14.99 -SOURCE=..\common\interface.cpp
  14.100 -# End Source File
  14.101 -# Begin Source File
  14.102 -
  14.103  SOURCE=..\dlls\mp5.cpp
  14.104  # End Source File
  14.105  # Begin Source File
  14.106 @@ -173,22 +205,6 @@
  14.107  
  14.108  SOURCE=..\dlls\tripmine.cpp
  14.109  # End Source File
  14.110 -# Begin Source File
  14.111 -
  14.112 -SOURCE=..\game_shared\vgui_scrollbar2.cpp
  14.113 -# End Source File
  14.114 -# Begin Source File
  14.115 -
  14.116 -SOURCE=..\game_shared\vgui_slider2.cpp
  14.117 -# End Source File
  14.118 -# Begin Source File
  14.119 -
  14.120 -SOURCE=..\game_shared\voice_banmgr.cpp
  14.121 -# End Source File
  14.122 -# Begin Source File
  14.123 -
  14.124 -SOURCE=..\game_shared\voice_status.cpp
  14.125 -# End Source File
  14.126  # End Group
  14.127  # Begin Source File
  14.128  
  14.129 @@ -225,6 +241,15 @@
  14.130  # Begin Source File
  14.131  
  14.132  SOURCE=.\entity.cpp
  14.133 +
  14.134 +!IF  "$(CFG)" == "cl_dll - Win32 Release"
  14.135 +
  14.136 +!ELSEIF  "$(CFG)" == "cl_dll - Win32 Debug"
  14.137 +
  14.138 +# ADD CPP /MT
  14.139 +
  14.140 +!ENDIF 
  14.141 +
  14.142  # End Source File
  14.143  # Begin Source File
  14.144  
  14.145 @@ -256,6 +281,14 @@
  14.146  # End Source File
  14.147  # Begin Source File
  14.148  
  14.149 +SOURCE=.\hud_bench.cpp
  14.150 +# End Source File
  14.151 +# Begin Source File
  14.152 +
  14.153 +SOURCE=.\hud_benchtrace.cpp
  14.154 +# End Source File
  14.155 +# Begin Source File
  14.156 +
  14.157  SOURCE=.\hud_msg.cpp
  14.158  # End Source File
  14.159  # Begin Source File
  14.160 @@ -288,6 +321,14 @@
  14.161  # End Source File
  14.162  # Begin Source File
  14.163  
  14.164 +SOURCE=..\public\interface.cpp
  14.165 +# End Source File
  14.166 +# Begin Source File
  14.167 +
  14.168 +SOURCE=.\interpolation.cpp
  14.169 +# End Source File
  14.170 +# Begin Source File
  14.171 +
  14.172  SOURCE=.\menu.cpp
  14.173  # End Source File
  14.174  # Begin Source File
  14.175 @@ -296,16 +337,7 @@
  14.176  # End Source File
  14.177  # Begin Source File
  14.178  
  14.179 -SOURCE=.\overview.cpp
  14.180 -# PROP Exclude_From_Build 1
  14.181 -# End Source File
  14.182 -# Begin Source File
  14.183 -
  14.184 -SOURCE=.\parsemsg.cpp
  14.185 -# End Source File
  14.186 -# Begin Source File
  14.187 -
  14.188 -SOURCE=.\parsemsg.h
  14.189 +SOURCE=..\common\parsemsg.cpp
  14.190  # End Source File
  14.191  # Begin Source File
  14.192  
  14.193 @@ -365,10 +397,6 @@
  14.194  # End Source File
  14.195  # Begin Source File
  14.196  
  14.197 -SOURCE=.\vgui_ConsolePanel.cpp
  14.198 -# End Source File
  14.199 -# Begin Source File
  14.200 -
  14.201  SOURCE=.\vgui_ControlConfigPanel.cpp
  14.202  # End Source File
  14.203  # Begin Source File
  14.204 @@ -409,10 +437,18 @@
  14.205  # End Source File
  14.206  # Begin Source File
  14.207  
  14.208 +SOURCE=..\game_shared\vgui_scrollbar2.cpp
  14.209 +# End Source File
  14.210 +# Begin Source File
  14.211 +
  14.212  SOURCE=.\vgui_ServerBrowser.cpp
  14.213  # End Source File
  14.214  # Begin Source File
  14.215  
  14.216 +SOURCE=..\game_shared\vgui_slider2.cpp
  14.217 +# End Source File
  14.218 +# Begin Source File
  14.219 +
  14.220  SOURCE=.\vgui_SpectatorPanel.cpp
  14.221  # End Source File
  14.222  # Begin Source File
  14.223 @@ -421,12 +457,20 @@
  14.224  # End Source File
  14.225  # Begin Source File
  14.226  
  14.227 -SOURCE=.\vgui_teammenu.cpp
  14.228 +SOURCE=.\vgui_TeamMenu.cpp
  14.229  # End Source File
  14.230  # Begin Source File
  14.231  
  14.232  SOURCE=.\view.cpp
  14.233  # End Source File
  14.234 +# Begin Source File
  14.235 +
  14.236 +SOURCE=..\game_shared\voice_banmgr.cpp
  14.237 +# End Source File
  14.238 +# Begin Source File
  14.239 +
  14.240 +SOURCE=.\voice_status.cpp
  14.241 +# End Source File
  14.242  # End Group
  14.243  # Begin Group "Header Files"
  14.244  
  14.245 @@ -449,6 +493,10 @@
  14.246  # End Source File
  14.247  # Begin Source File
  14.248  
  14.249 +SOURCE=.\cl_util.h
  14.250 +# End Source File
  14.251 +# Begin Source File
  14.252 +
  14.253  SOURCE=.\com_weapons.h
  14.254  # End Source File
  14.255  # Begin Source File
  14.256 @@ -477,10 +525,6 @@
  14.257  # End Source File
  14.258  # Begin Source File
  14.259  
  14.260 -SOURCE=.\hud_iface.h
  14.261 -# End Source File
  14.262 -# Begin Source File
  14.263 -
  14.264  SOURCE=.\hud_servers.h
  14.265  # End Source File
  14.266  # Begin Source File
  14.267 @@ -497,7 +541,7 @@
  14.268  # End Source File
  14.269  # Begin Source File
  14.270  
  14.271 -SOURCE=..\common\itrackeruser.h
  14.272 +SOURCE=.\interpolation.h
  14.273  # End Source File
  14.274  # Begin Source File
  14.275  
  14.276 @@ -505,7 +549,7 @@
  14.277  # End Source File
  14.278  # Begin Source File
  14.279  
  14.280 -SOURCE=.\overview.h
  14.281 +SOURCE=..\common\parsemsg.h
  14.282  # End Source File
  14.283  # Begin Source File
  14.284  
  14.285 @@ -533,15 +577,11 @@
  14.286  # End Source File
  14.287  # Begin Source File
  14.288  
  14.289 -SOURCE=.\studio_util.h
  14.290 -# End Source File
  14.291 -# Begin Source File
  14.292 -
  14.293  SOURCE=.\StudioModelRenderer.h
  14.294  # End Source File
  14.295  # Begin Source File
  14.296  
  14.297 -SOURCE=.\util.h
  14.298 +SOURCE=.\tri.h
  14.299  # End Source File
  14.300  # Begin Source File
  14.301  
  14.302 @@ -549,10 +589,6 @@
  14.303  # End Source File
  14.304  # Begin Source File
  14.305  
  14.306 -SOURCE=.\vgui_ConsolePanel.h
  14.307 -# End Source File
  14.308 -# Begin Source File
  14.309 -
  14.310  SOURCE=.\vgui_ControlConfigPanel.h
  14.311  # End Source File
  14.312  # Begin Source File
  14.313 @@ -569,15 +605,19 @@
  14.314  # End Source File
  14.315  # Begin Source File
  14.316  
  14.317 +SOURCE=..\game_shared\vgui_scrollbar2.h
  14.318 +# End Source File
  14.319 +# Begin Source File
  14.320 +
  14.321  SOURCE=.\vgui_ServerBrowser.h
  14.322  # End Source File
  14.323  # Begin Source File
  14.324  
  14.325 -SOURCE=.\vgui_SpectatorPanel.h
  14.326 +SOURCE=..\game_shared\vgui_slider2.h
  14.327  # End Source File
  14.328  # Begin Source File
  14.329  
  14.330 -SOURCE=.\vgui_TeamFortressViewport.h
  14.331 +SOURCE=.\vgui_SpectatorPanel.h
  14.332  # End Source File
  14.333  # Begin Source File
  14.334  
  14.335 @@ -593,10 +633,6 @@
  14.336  # End Source File
  14.337  # Begin Source File
  14.338  
  14.339 -SOURCE=..\game_shared\voice_vgui_tweakdlg.h
  14.340 -# End Source File
  14.341 -# Begin Source File
  14.342 -
  14.343  SOURCE=.\wrect.h
  14.344  # End Source File
  14.345  # End Group
  14.346 @@ -604,5 +640,9 @@
  14.347  
  14.348  # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
  14.349  # End Group
  14.350 +# Begin Source File
  14.351 +
  14.352 +SOURCE=..\lib\public\game_controls.lib
  14.353 +# End Source File
  14.354  # End Target
  14.355  # End Project
    15.1 --- a/multiplayer/cl_dll/cl_dll.h	Fri Mar 15 01:26:54 2013 -0500
    15.2 +++ b/multiplayer/cl_dll/cl_dll.h	Thu Sep 05 19:47:29 2013 -0500
    15.3 @@ -31,7 +31,11 @@
    15.4  typedef int (*pfnUserMsgHook)(const char *pszName, int iSize, void *pbuf);
    15.5  
    15.6  #include "util_vector.h"
    15.7 +#ifdef _WIN32
    15.8  #define EXPORT	_declspec( dllexport )
    15.9 +#else
   15.10 +#define EXPORT	__attribute__ ((visibility("default")))
   15.11 +#endif
   15.12  
   15.13  #include "../engine/cdll_int.h"
   15.14  #include "../dlls/cdll_dll.h"
    16.1 --- a/multiplayer/cl_dll/cl_util.h	Fri Mar 15 01:26:54 2013 -0500
    16.2 +++ b/multiplayer/cl_dll/cl_util.h	Thu Sep 05 19:47:29 2013 -0500
    16.3 @@ -23,19 +23,23 @@
    16.4  #define FALSE 0
    16.5  #endif
    16.6  
    16.7 +#include <stdio.h> // for safe_sprintf()
    16.8 +#include <stdarg.h>  // "
    16.9 +#include <string.h> // for strncpy()
   16.10 +
   16.11  // Macros to hook function calls into the HUD object
   16.12  #define HOOK_MESSAGE(x) gEngfuncs.pfnHookUserMsg(#x, __MsgFunc_##x );
   16.13  
   16.14  #define DECLARE_MESSAGE(y, x) int __MsgFunc_##x(const char *pszName, int iSize, void *pbuf) \
   16.15  							{ \
   16.16 -							return gHUD.##y.MsgFunc_##x(pszName, iSize, pbuf ); \
   16.17 +							return gHUD.y.MsgFunc_##x(pszName, iSize, pbuf ); \
   16.18  							}
   16.19  
   16.20  
   16.21  #define HOOK_COMMAND(x, y) gEngfuncs.pfnAddCommand( x, __CmdFunc_##y );
   16.22  #define DECLARE_COMMAND(y, x) void __CmdFunc_##x( void ) \
   16.23  							{ \
   16.24 -								gHUD.##y.UserCmd_##x( ); \
   16.25 +								gHUD.y.UserCmd_##x( ); \
   16.26  							}
   16.27  
   16.28  inline float CVAR_GET_FLOAT( const char *x ) {	return gEngfuncs.pfnGetCvarFloat( (char*)x ); }
   16.29 @@ -67,24 +71,25 @@
   16.30  // ScreenWidth returns the width of the screen, in pixels
   16.31  #define ScreenWidth (gHUD.m_scrinfo.iWidth)
   16.32  
   16.33 -// Use this to set any co-ords in 640x480 space
   16.34 -#define XRES(x)		((int)(float(x)  * ((float)ScreenWidth / 640.0f) + 0.5f))
   16.35 -#define YRES(y)		((int)(float(y)  * ((float)ScreenHeight / 480.0f) + 0.5f))
   16.36 +#define BASE_XRES 640.f
   16.37  
   16.38  // use this to project world coordinates to screen coordinates
   16.39  #define XPROJECT(x)	( (1.0f+(x))*ScreenWidth*0.5f )
   16.40  #define YPROJECT(y) ( (1.0f-(y))*ScreenHeight*0.5f )
   16.41  
   16.42 +#define XRES(x)					(x  * ((float)ScreenWidth / 640))
   16.43 +#define YRES(y)					(y  * ((float)ScreenHeight / 480))
   16.44 +
   16.45  #define GetScreenInfo (*gEngfuncs.pfnGetScreenInfo)
   16.46  #define ServerCmd (*gEngfuncs.pfnServerCmd)
   16.47 -#define ClientCmd (*gEngfuncs.pfnClientCmd)
   16.48 +#define EngineClientCmd (*gEngfuncs.pfnClientCmd)
   16.49  #define SetCrosshair (*gEngfuncs.pfnSetCrosshair)
   16.50  #define AngleVectors (*gEngfuncs.pfnAngleVectors)
   16.51  
   16.52  
   16.53  // Gets the height & width of a sprite,  at the specified frame
   16.54 -inline int SPR_Height( HSPRITE x, int f )	{ return gEngfuncs.pfnSPR_Height(x, f); }
   16.55 -inline int SPR_Width( HSPRITE x, int f )	{ return gEngfuncs.pfnSPR_Width(x, f); }
   16.56 +inline int SPR_Height( HLSPRITE x, int f )	{ return gEngfuncs.pfnSPR_Height(x, f); }
   16.57 +inline int SPR_Width( HLSPRITE x, int f )	{ return gEngfuncs.pfnSPR_Width(x, f); }
   16.58  
   16.59  inline 	client_textmessage_t	*TextMessageGet( const char *pName ) { return gEngfuncs.pfnTextMessageGet( pName ); }
   16.60  inline 	int						TextMessageDrawChar( int x, int y, int number, int r, int g, int b ) 
   16.61 @@ -119,11 +124,42 @@
   16.62  	gEngfuncs.pfnCenterPrint( string );
   16.63  }
   16.64  
   16.65 -// returns the players name of entity no.
   16.66 -#define GetPlayerInfo (*gEngfuncs.pfnGetPlayerInfo)
   16.67 +
   16.68 +inline char *safe_strcpy( char *dst, const char *src, int len_dst)
   16.69 +{
   16.70 +	if( len_dst <= 0 )
   16.71 +	{
   16.72 +		return NULL; // this is bad
   16.73 +	}
   16.74 +
   16.75 +	strncpy(dst,src,len_dst);
   16.76 +	dst[ len_dst - 1 ] = '\0';
   16.77 +
   16.78 +	return dst;
   16.79 +}
   16.80 +
   16.81 +inline int safe_sprintf( char *dst, int len_dst, const char *format, ...)
   16.82 +{
   16.83 +	if( len_dst <= 0 )
   16.84 +	{
   16.85 +		return -1; // this is bad
   16.86 +	}
   16.87 +
   16.88 +	va_list v;
   16.89 +
   16.90 +    va_start(v, format);
   16.91 +
   16.92 +	_vsnprintf(dst,len_dst,format,v);
   16.93 +
   16.94 +	va_end(v);
   16.95 +
   16.96 +	dst[ len_dst - 1 ] = '\0';
   16.97 +
   16.98 +	return 0;
   16.99 +}
  16.100  
  16.101  // sound functions
  16.102 -inline void PlaySound( char *szSound, float vol ) { gEngfuncs.pfnPlaySoundByName( szSound, vol ); }
  16.103 +inline void PlaySound( const char *szSound, float vol ) { gEngfuncs.pfnPlaySoundByName( szSound, vol ); }
  16.104  inline void PlaySound( int iSound, float vol ) { gEngfuncs.pfnPlaySoundByIndex( iSound, vol ); }
  16.105  
  16.106  #define max(a, b)  (((a) > (b)) ? (a) : (b))
  16.107 @@ -145,10 +181,12 @@
  16.108  
  16.109  extern vec3_t vec3_origin;
  16.110  
  16.111 +#ifdef _MSC_VER
  16.112  // disable 'possible loss of data converting float to int' warning message
  16.113  #pragma warning( disable: 4244 )
  16.114  // disable 'truncation from 'const double' to 'float' warning message
  16.115  #pragma warning( disable: 4305 )
  16.116 +#endif
  16.117  
  16.118  inline void UnpackRGB(int &r, int &g, int &b, unsigned long ulRGB)\
  16.119  {\
  16.120 @@ -157,4 +195,4 @@
  16.121  	b = ulRGB & 0xFF;\
  16.122  }
  16.123  
  16.124 -HSPRITE LoadSprite(const char *pszName);
  16.125 +HLSPRITE LoadSprite(const char *pszName);
    17.1 --- a/multiplayer/cl_dll/com_weapons.cpp	Fri Mar 15 01:26:54 2013 -0500
    17.2 +++ b/multiplayer/cl_dll/com_weapons.cpp	Thu Sep 05 19:47:29 2013 -0500
    17.3 @@ -41,12 +41,12 @@
    17.4  Log debug messages to file ( appends )
    17.5  ====================
    17.6  */
    17.7 -void COM_Log( char *pszFile, char *fmt, ...)
    17.8 +void COM_Log( const char *pszFile, const char *fmt, ...)
    17.9  {
   17.10  	va_list		argptr;
   17.11  	char		string[1024];
   17.12  	FILE *fp;
   17.13 -	char *pfilename;
   17.14 +	const char *pfilename;
   17.15  	
   17.16  	if ( !pszFile )
   17.17  	{
   17.18 @@ -111,7 +111,7 @@
   17.19  Play a sound, if we are seeing this command for the first time
   17.20  =====================
   17.21  */
   17.22 -void HUD_PlaySound( char *sound, float volume )
   17.23 +void HUD_PlaySound( const char *sound, float volume )
   17.24  {
   17.25  	if ( !g_runfuncs || !g_finalstate )
   17.26  		return;
   17.27 @@ -270,8 +270,8 @@
   17.28   is compiled into both game and client .dlls.
   17.29  ======================
   17.30  */
   17.31 -int				stub_PrecacheModel		( char* s ) { return 0; }
   17.32 -int				stub_PrecacheSound		( char* s ) { return 0; }
   17.33 +int				stub_PrecacheModel		( const char *s ) { return 0; }
   17.34 +int				stub_PrecacheSound		( const char *s ) { return 0; }
   17.35  unsigned short	stub_PrecacheEvent		( int type, const char *s ) { return 0; }
   17.36  const char		*stub_NameForFunction	( uint32 function ) { return "func"; }
   17.37  void			stub_SetModel			( edict_t *e, const char *m ) {}
    18.1 --- a/multiplayer/cl_dll/com_weapons.h	Fri Mar 15 01:26:54 2013 -0500
    18.2 +++ b/multiplayer/cl_dll/com_weapons.h	Thu Sep 05 19:47:29 2013 -0500
    18.3 @@ -14,13 +14,9 @@
    18.4  #endif
    18.5  
    18.6  #include "hud_iface.h"
    18.7 +#include "Exports.h"
    18.8  
    18.9 -extern "C"
   18.10 -{
   18.11 -	void _DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s *to, struct usercmd_s *cmd, int runfuncs, double time, unsigned int random_seed );
   18.12 -}
   18.13 -
   18.14 -void			COM_Log( char *pszFile, char *fmt, ...);
   18.15 +void			COM_Log( const char *pszFile, const char *fmt, ...);
   18.16  int				CL_IsDead( void );
   18.17  
   18.18  float			UTIL_SharedRandomFloat( unsigned int seed, float low, float high );
   18.19 @@ -28,11 +24,11 @@
   18.20  
   18.21  int				HUD_GetWeaponAnim( void );
   18.22  void			HUD_SendWeaponAnim( int iAnim, int body, int force );
   18.23 -void			HUD_PlaySound( char *sound, float volume );
   18.24 +void			HUD_PlaySound( const char *sound, float volume );
   18.25  void			HUD_PlaybackEvent( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
   18.26  void			HUD_SetMaxSpeed( const struct edict_s *ed, float speed );
   18.27 -int				stub_PrecacheModel( char* s );
   18.28 -int				stub_PrecacheSound( char* s );
   18.29 +int				stub_PrecacheModel( const char *s );
   18.30 +int				stub_PrecacheSound( const char *s );
   18.31  unsigned short	stub_PrecacheEvent( int type, const char *s );
   18.32  const char		*stub_NameForFunction	( uint32 function );
   18.33  void			stub_SetModel			( struct edict_s *e, const char *m );
   18.34 @@ -45,4 +41,4 @@
   18.35  extern float g_lastFOV;
   18.36  extern struct local_state_s *g_finalstate;
   18.37  
   18.38 -#endif
   18.39 \ No newline at end of file
   18.40 +#endif
    19.1 --- a/multiplayer/cl_dll/death.cpp	Fri Mar 15 01:26:54 2013 -0500
    19.2 +++ b/multiplayer/cl_dll/death.cpp	Thu Sep 05 19:47:29 2013 -0500
    19.3 @@ -115,7 +115,7 @@
    19.4  		if ( gViewPort && gViewPort->AllowedToPrintText() )
    19.5  		{
    19.6  			// Draw the death notice
    19.7 -			y = YRES(DEATHNOTICE_TOP) + 2 + (20 * i);  //!!!
    19.8 +			y = DEATHNOTICE_TOP + 2 + (20 * i);  //!!!
    19.9  
   19.10  			int id = (rgDeathNoticeList[i].iId == -1) ? m_HUD_d_skull : rgDeathNoticeList[i].iId;
   19.11  			x = ScreenWidth - ConsoleStringLen(rgDeathNoticeList[i].szVictim) - (gHUD.GetSpriteRect(id).right - gHUD.GetSpriteRect(id).left);
   19.12 @@ -173,7 +173,6 @@
   19.13  		gViewPort->DeathMsg( killer, victim );
   19.14  
   19.15  	gHUD.m_Spectator.DeathMessage(victim);
   19.16 -
   19.17  	int i;
   19.18  	for ( i = 0; i < MAX_DEATHNOTICES; i++ )
   19.19  	{
   19.20 @@ -190,7 +189,7 @@
   19.21  		gViewPort->GetAllPlayersInfo();
   19.22  
   19.23  	// Get the Killer's name
   19.24 -	char *killer_name = g_PlayerInfoList[ killer ].name;
   19.25 +	const char *killer_name = g_PlayerInfoList[ killer ].name;
   19.26  	if ( !killer_name )
   19.27  	{
   19.28  		killer_name = "";
   19.29 @@ -204,7 +203,7 @@
   19.30  	}
   19.31  
   19.32  	// Get the Victim's name
   19.33 -	char *victim_name = NULL;
   19.34 +	const char *victim_name = NULL;
   19.35  	// If victim is -1, the killer killed a specific, non-player object (like a sentrygun)
   19.36  	if ( ((char)victim) != -1 )
   19.37  		victim_name = g_PlayerInfoList[ victim ].name;
   19.38 @@ -281,7 +280,7 @@
   19.39  			ConsolePrint( rgDeathNoticeList[i].szVictim );
   19.40  		}
   19.41  
   19.42 -		if ( killedwith && *killedwith && (*killedwith > 13 ) && strcmp( killedwith, "d_world" ) && !rgDeathNoticeList[i].iTeamKill )
   19.43 +		if ( *killedwith && (*killedwith > 13 ) && strcmp( killedwith, "d_world" ) && !rgDeathNoticeList[i].iTeamKill )
   19.44  		{
   19.45  			ConsolePrint( " with " );
   19.46  
    20.1 --- a/multiplayer/cl_dll/demo.cpp	Fri Mar 15 01:26:54 2013 -0500
    20.2 +++ b/multiplayer/cl_dll/demo.cpp	Thu Sep 05 19:47:29 2013 -0500
    20.3 @@ -17,8 +17,7 @@
    20.4  #include "demo.h"
    20.5  #include "demo_api.h"
    20.6  #include <memory.h>
    20.7 -
    20.8 -#define DLLEXPORT __declspec( dllexport )
    20.9 +#include "Exports.h"
   20.10  
   20.11  int g_demosniper = 0;
   20.12  int g_demosniperdamage = 0;
   20.13 @@ -28,11 +27,6 @@
   20.14  
   20.15  // FIXME:  There should be buffer helper functions to avoid all of the *(int *)& crap.
   20.16  
   20.17 -extern "C" 
   20.18 -{
   20.19 -	void DLLEXPORT Demo_ReadBuffer( int size, unsigned char *buffer );
   20.20 -}
   20.21 -
   20.22  /*
   20.23  =====================
   20.24  Demo_WriteBuffer
   20.25 @@ -60,8 +54,10 @@
   20.26  Engine wants us to parse some data from the demo stream
   20.27  =====================
   20.28  */
   20.29 -void DLLEXPORT Demo_ReadBuffer( int size, unsigned char *buffer )
   20.30 +void CL_DLLEXPORT Demo_ReadBuffer( int size, unsigned char *buffer )
   20.31  {
   20.32 +//	RecClReadDemoBuffer(size, buffer);
   20.33 +
   20.34  	int type;
   20.35  	int i = 0;
   20.36  
    21.1 --- a/multiplayer/cl_dll/entity.cpp	Fri Mar 15 01:26:54 2013 -0500
    21.2 +++ b/multiplayer/cl_dll/entity.cpp	Thu Sep 05 19:47:29 2013 -0500
    21.3 @@ -19,8 +19,11 @@
    21.4  #include "pm_defs.h"
    21.5  #include "pmtrace.h"	
    21.6  #include "pm_shared.h"
    21.7 +#include "bench.h"
    21.8 +#include "Exports.h"
    21.9  
   21.10 -#define DLLEXPORT __declspec( dllexport )
   21.11 +#include "particleman.h"
   21.12 +extern IParticleMan *g_pParticleMan;
   21.13  
   21.14  void Game_AddObjects( void );
   21.15  
   21.16 @@ -28,29 +31,21 @@
   21.17  
   21.18  int g_iAlive = 1;
   21.19  
   21.20 -extern "C" 
   21.21 -{
   21.22 -	int DLLEXPORT HUD_AddEntity( int type, struct cl_entity_s *ent, const char *modelname );
   21.23 -	void DLLEXPORT HUD_CreateEntities( void );
   21.24 -	void DLLEXPORT HUD_StudioEvent( const struct mstudioevent_s *event, const struct cl_entity_s *entity );
   21.25 -	void DLLEXPORT HUD_TxferLocalOverrides( struct entity_state_s *state, const struct clientdata_s *client );
   21.26 -	void DLLEXPORT HUD_ProcessPlayerState( struct entity_state_s *dst, const struct entity_state_s *src );
   21.27 -	void DLLEXPORT HUD_TxferPredictionData ( struct entity_state_s *ps, const struct entity_state_s *pps, struct clientdata_s *pcd, const struct clientdata_s *ppcd, struct weapon_data_s *wd, const struct weapon_data_s *pwd );
   21.28 -	void DLLEXPORT HUD_TempEntUpdate( double frametime, double client_time, double cl_gravity, struct tempent_s **ppTempEntFree, struct tempent_s **ppTempEntActive, int ( *Callback_AddVisibleEntity )( struct cl_entity_s *pEntity ), void ( *Callback_TempEntPlaySound )( struct tempent_s *pTemp, float damp ) );
   21.29 -	struct cl_entity_s DLLEXPORT *HUD_GetUserEntity( int index );
   21.30 -}
   21.31 -
   21.32  /*
   21.33  ========================
   21.34  HUD_AddEntity
   21.35  	Return 0 to filter entity from visible list for rendering
   21.36  ========================
   21.37  */
   21.38 -int DLLEXPORT HUD_AddEntity( int type, struct cl_entity_s *ent, const char *modelname )
   21.39 +int CL_DLLEXPORT HUD_AddEntity( int type, struct cl_entity_s *ent, const char *modelname )
   21.40  {
   21.41 +//	RecClAddEntity(type, ent, modelname);
   21.42 +
   21.43  	switch ( type )
   21.44  	{
   21.45  	case ET_NORMAL:
   21.46 +		Bench_CheckEntity( type, ent, modelname );
   21.47 +		break;
   21.48  	case ET_PLAYER:
   21.49  	case ET_BEAM:
   21.50  	case ET_TEMPENTITY:
   21.51 @@ -85,8 +80,10 @@
   21.52  structure, we need to copy them into the state structure at this point.
   21.53  =========================
   21.54  */
   21.55 -void DLLEXPORT HUD_TxferLocalOverrides( struct entity_state_s *state, const struct clientdata_s *client )
   21.56 +void CL_DLLEXPORT HUD_TxferLocalOverrides( struct entity_state_s *state, const struct clientdata_s *client )
   21.57  {
   21.58 +//	RecClTxferLocalOverrides(state, client);
   21.59 +
   21.60  	VectorCopy( client->origin, state->origin );
   21.61  
   21.62  	// Spectator
   21.63 @@ -108,8 +105,10 @@
   21.64  playerstate structure
   21.65  =========================
   21.66  */
   21.67 -void DLLEXPORT HUD_ProcessPlayerState( struct entity_state_s *dst, const struct entity_state_s *src )
   21.68 +void CL_DLLEXPORT HUD_ProcessPlayerState( struct entity_state_s *dst, const struct entity_state_s *src )
   21.69  {
   21.70 +//	RecClProcessPlayerState(dst, src);
   21.71 +
   21.72  	// Copy in network data
   21.73  	VectorCopy( src->origin, dst->origin );
   21.74  	VectorCopy( src->angles, dst->angles );
   21.75 @@ -151,6 +150,10 @@
   21.76  	dst->team					= src->team;
   21.77  	dst->colormap				= src->colormap;
   21.78  
   21.79 +#if defined( _TFC )
   21.80 +	dst->fuser1					= src->fuser1;
   21.81 +#endif
   21.82 +
   21.83  	// Save off some data so other areas of the Client DLL can get to it
   21.84  	cl_entity_t *player = gEngfuncs.GetLocalPlayer();	// Get the local player's index
   21.85  	if ( dst->number == player->index )
   21.86 @@ -174,8 +177,10 @@
   21.87   update is occupying.
   21.88  =========================
   21.89  */
   21.90 -void DLLEXPORT HUD_TxferPredictionData ( struct entity_state_s *ps, const struct entity_state_s *pps, struct clientdata_s *pcd, const struct clientdata_s *ppcd, struct weapon_data_s *wd, const struct weapon_data_s *pwd )
   21.91 +void CL_DLLEXPORT HUD_TxferPredictionData ( struct entity_state_s *ps, const struct entity_state_s *pps, struct clientdata_s *pcd, const struct clientdata_s *ppcd, struct weapon_data_s *wd, const struct weapon_data_s *pwd )
   21.92  {
   21.93 +//	RecClTxferPredictionData(ps, pps, pcd, ppcd, wd, pwd);
   21.94 +
   21.95  	ps->oldbuttons				= pps->oldbuttons;
   21.96  	ps->flFallVelocity			= pps->flFallVelocity;
   21.97  	ps->iStepLeft				= pps->iStepLeft;
   21.98 @@ -212,7 +217,6 @@
   21.99  		pcd->iuser1 = g_iUser1;	// observer mode
  21.100  		pcd->iuser2 = g_iUser2; // first target
  21.101  		pcd->iuser3 = g_iUser3; // second target
  21.102 -
  21.103  	}
  21.104  
  21.105  	// Fire prevention
  21.106 @@ -229,210 +233,6 @@
  21.107  	memcpy( wd, pwd, 32 * sizeof( weapon_data_t ) );
  21.108  }
  21.109  
  21.110 -/*
  21.111 -//#define TEST_IT
  21.112 -#if defined( TEST_IT )
  21.113 -
  21.114 -cl_entity_t mymodel[9];
  21.115 -
  21.116 -void MoveModel( void )
  21.117 -{
  21.118 -	cl_entity_t *player;
  21.119 -	int i, j;
  21.120 -	int modelindex;
  21.121 -	struct model_s *mod;
  21.122 -
  21.123 -	// Load it up with some bogus data
  21.124 -	player = gEngfuncs.GetLocalPlayer();
  21.125 -	if ( !player )
  21.126 -		return;
  21.127 -
  21.128 -	mod = gEngfuncs.CL_LoadModel( "models/sentry3.mdl", &modelindex );
  21.129 -	for ( i = 0; i < 3; i++ )
  21.130 -	{
  21.131 -		for ( j = 0; j < 3; j++ )
  21.132 -		{
  21.133 -			// Don't draw over ourself...
  21.134 -			if ( ( i == 1 ) && ( j == 1 ) )
  21.135 -				continue;
  21.136 -
  21.137 -			mymodel[ i * 3 + j ] = *player;
  21.138 -
  21.139 -			mymodel[ i * 3 + j ].player = 0;
  21.140 -
  21.141 -			mymodel[ i * 3 + j ].model = mod;
  21.142 -			mymodel[ i * 3 + j ].curstate.modelindex = modelindex;
  21.143 -		
  21.144 -				// Move it out a bit
  21.145 -			mymodel[ i * 3 + j ].origin[0] = player->origin[0] + 50 * ( 1 - i );
  21.146 -			mymodel[ i * 3 + j ].origin[1] = player->origin[1] + 50 * ( 1 - j );
  21.147 -
  21.148 -			gEngfuncs.CL_CreateVisibleEntity( ET_NORMAL, &mymodel[i*3+j] );
  21.149 -		}
  21.150 -	}
  21.151 -
  21.152 -}
  21.153 -
  21.154 -#endif
  21.155 -
  21.156 -//#define TRACE_TEST
  21.157 -#if defined( TRACE_TEST )
  21.158 -
  21.159 -extern int hitent;
  21.160 -
  21.161 -cl_entity_t hit;
  21.162 -
  21.163 -void TraceModel( void )
  21.164 -{
  21.165 -	cl_entity_t *ent;
  21.166 -
  21.167 -	if ( hitent <= 0 )
  21.168 -		return;
  21.169 -
  21.170 -	// Load it up with some bogus data
  21.171 -	ent = gEngfuncs.GetEntityByIndex( hitent );
  21.172 -	if ( !ent )
  21.173 -		return;
  21.174 -
  21.175 -	hit = *ent;
  21.176 -	//hit.curstate.rendermode = kRenderTransTexture;
  21.177 -	//hit.curstate.renderfx = kRenderFxGlowShell;
  21.178 -	//hit.curstate.renderamt = 100;
  21.179 -
  21.180 -	hit.origin[2] += 40;
  21.181 -
  21.182 -	gEngfuncs.CL_CreateVisibleEntity( ET_NORMAL, &hit );
  21.183 -}
  21.184 -
  21.185 -#endif
  21.186 -*/
  21.187 -
  21.188 -/*
  21.189 -void ParticleCallback( struct particle_s *particle, float frametime )
  21.190 -{
  21.191 -	int i;
  21.192 -
  21.193 -	for ( i = 0; i < 3; i++ )
  21.194 -	{
  21.195 -		particle->org[ i ] += particle->vel[ i ] * frametime;
  21.196 -	}
  21.197 -}
  21.198 -
  21.199 -cvar_t *color = NULL;
  21.200 -void Particles( void )
  21.201 -{
  21.202 -	static float lasttime;
  21.203 -	float curtime;
  21.204 -	
  21.205 -	curtime = gEngfuncs.GetClientTime();
  21.206 -
  21.207 -	if ( ( curtime - lasttime ) < 2.0 )
  21.208 -		return;
  21.209 -
  21.210 -	if ( !color )
  21.211 -	{
  21.212 -		color = gEngfuncs.pfnRegisterVariable ( "color","255 0 0", 0 );
  21.213 -	}
  21.214 -
  21.215 -	lasttime = curtime;
  21.216 -
  21.217 -	// Create a few particles
  21.218 -	particle_t *p;
  21.219 -	int i, j;
  21.220 -
  21.221 -	for ( i = 0; i < 1000; i++ )
  21.222 -	{
  21.223 -		int r, g, b;
  21.224 -		p = gEngfuncs.pEfxAPI->R_AllocParticle( ParticleCallback );
  21.225 -		if ( !p )
  21.226 -			break;
  21.227 -
  21.228 -		for ( j = 0; j < 3; j++ )
  21.229 -		{
  21.230 -			p->org[ j ] = v_origin[ j ] + gEngfuncs.pfnRandomFloat( -32.0, 32.0 );;
  21.231 -			p->vel[ j ] = gEngfuncs.pfnRandomFloat( -100.0, 100.0 );
  21.232 -		}
  21.233 -
  21.234 -		if ( color )
  21.235 -		{
  21.236 -			sscanf( color->string, "%i %i %i", &r, &g, &b );
  21.237 -		}
  21.238 -		else
  21.239 -		{
  21.240 -			r = 192;
  21.241 -			g = 0;
  21.242 -			b = 0;
  21.243 -		}
  21.244 -
  21.245 -		p->color = 	gEngfuncs.pEfxAPI->R_LookupColor( r, g, b );
  21.246 -		gEngfuncs.pEfxAPI->R_GetPackedColor( &p->packedColor, p->color );
  21.247 -
  21.248 -		// p->die is set to current time so all you have to do is add an additional time to it
  21.249 -		p->die += 3.0;
  21.250 -	}
  21.251 -}
  21.252 -*/
  21.253 -
  21.254 -/*
  21.255 -void TempEntCallback ( struct tempent_s *ent, float frametime, float currenttime )
  21.256 -{
  21.257 -	int i;
  21.258 -
  21.259 -	for ( i = 0; i < 3; i++ )
  21.260 -	{
  21.261 -		ent->entity.curstate.origin[ i ] += ent->entity.baseline.origin[ i ] * frametime;
  21.262 -	}
  21.263 -}
  21.264 -
  21.265 -void TempEnts( void )
  21.266 -{
  21.267 -	static float lasttime;
  21.268 -	float curtime;
  21.269 -	
  21.270 -	curtime = gEngfuncs.GetClientTime();
  21.271 -
  21.272 -	if ( ( curtime - lasttime ) < 10.0 )
  21.273 -		return;
  21.274 -
  21.275 -	lasttime = curtime;
  21.276 -
  21.277 -	TEMPENTITY *p;
  21.278 -	int i, j;
  21.279 -	struct model_s *mod;
  21.280 -	vec3_t origin;
  21.281 -	int index;
  21.282 -
  21.283 -	mod = gEngfuncs.CL_LoadModel( "sprites/laserdot.spr", &index );
  21.284 -
  21.285 -	for ( i = 0; i < 100; i++ )
  21.286 -	{
  21.287 -		for ( j = 0; j < 3; j++ )
  21.288 -		{
  21.289 -			origin[ j ] = v_origin[ j ];
  21.290 -			if ( j != 2 )
  21.291 -			{
  21.292 -				origin[ j ] += 75;
  21.293 -			}
  21.294 -		}
  21.295 -
  21.296 -		p = gEngfuncs.pEfxAPI->CL_TentEntAllocCustom( (float *)&origin, mod, 0, TempEntCallback );
  21.297 -		if ( !p )
  21.298 -			break;
  21.299 -
  21.300 -		for ( j = 0; j < 3; j++ )
  21.301 -		{
  21.302 -			p->entity.curstate.origin[ j ] = origin[ j ];
  21.303 -
  21.304 -			// Store velocity in baseline origin
  21.305 -			p->entity.baseline.origin[ j ] = gEngfuncs.pfnRandomFloat( -100, 100 );
  21.306 -		}
  21.307 -
  21.308 -		// p->die is set to current time so all you have to do is add an additional time to it
  21.309 -		p->die += 10.0;
  21.310 -	}
  21.311 -}
  21.312 -*/
  21.313 -
  21.314  #if defined( BEAM_TEST )
  21.315  // Note can't index beam[ 0 ] in Beam callback, so don't use that index
  21.316  // Room for 1 beam ( 0 can't be used )
  21.317 @@ -511,37 +311,26 @@
  21.318  Gives us a chance to add additional entities to the render this frame
  21.319  =========================
  21.320  */
  21.321 -void DLLEXPORT HUD_CreateEntities( void )
  21.322 +void CL_DLLEXPORT HUD_CreateEntities( void )
  21.323  {
  21.324 -	// e.g., create a persistent cl_entity_t somewhere.
  21.325 -	// Load an appropriate model into it ( gEngfuncs.CL_LoadModel )
  21.326 -	// Call gEngfuncs.CL_CreateVisibleEntity to add it to the visedicts list
  21.327 -/*
  21.328 -#if defined( TEST_IT )
  21.329 -	MoveModel();
  21.330 -#endif
  21.331 -
  21.332 -#if defined( TRACE_TEST )
  21.333 -	TraceModel();
  21.334 -#endif
  21.335 -*/
  21.336 -/*
  21.337 -	Particles();
  21.338 -*/
  21.339 -/*
  21.340 -	TempEnts();
  21.341 -*/
  21.342 +//	RecClCreateEntities();
  21.343  
  21.344  #if defined( BEAM_TEST )
  21.345  	Beams();
  21.346  #endif
  21.347  
  21.348 +	Bench_AddObjects();
  21.349 +
  21.350  	// Add in any game specific objects
  21.351  	Game_AddObjects();
  21.352  
  21.353  	GetClientVoiceMgr()->CreateEntities();
  21.354  }
  21.355  
  21.356 +#if defined( _TFC )
  21.357 +extern int g_bACSpinning[33];
  21.358 +#endif 
  21.359 +
  21.360  /*
  21.361  =========================
  21.362  HUD_StudioEvent
  21.363 @@ -550,21 +339,36 @@
  21.364  fired during this frame, handle the event by it's tag ( e.g., muzzleflash, sound )
  21.365  =========================
  21.366  */
  21.367 -void DLLEXPORT HUD_StudioEvent( const struct mstudioevent_s *event, const struct cl_entity_s *entity )
  21.368 +void CL_DLLEXPORT HUD_StudioEvent( const struct mstudioevent_s *event, const struct cl_entity_s *entity )
  21.369  {
  21.370 +//	RecClStudioEvent(event, entity);
  21.371 +
  21.372 +	int iMuzzleFlash = 1;
  21.373 +
  21.374 +#if defined( _TFC )
  21.375 +
  21.376 +	if ( g_bACSpinning[ entity->index - 1 ] )
  21.377 +		iMuzzleFlash = 0;
  21.378 +
  21.379 +#endif 
  21.380 +
  21.381  	switch( event->event )
  21.382  	{
  21.383  	case 5001:
  21.384 -		gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[0], atoi( event->options) );
  21.385 +		if ( iMuzzleFlash )
  21.386 +			gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[0], atoi( event->options) );
  21.387  		break;
  21.388  	case 5011:
  21.389 -		gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[1], atoi( event->options) );
  21.390 +		if ( iMuzzleFlash )
  21.391 +			gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[1], atoi( event->options) );
  21.392  		break;
  21.393  	case 5021:
  21.394 -		gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[2], atoi( event->options) );
  21.395 +		if ( iMuzzleFlash )
  21.396 +			gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[2], atoi( event->options) );
  21.397  		break;
  21.398  	case 5031:
  21.399 -		gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[3], atoi( event->options) );
  21.400 +		if ( iMuzzleFlash )
  21.401 +			gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[3], atoi( event->options) );
  21.402  		break;
  21.403  	case 5002:
  21.404  		gEngfuncs.pEfxAPI->R_SparkEffect( (float *)&entity->attachment[0], atoi( event->options), -100, 100 );
  21.405 @@ -585,7 +389,7 @@
  21.406  Simulation and cleanup of temporary entities
  21.407  =================
  21.408  */
  21.409 -void DLLEXPORT HUD_TempEntUpdate (
  21.410 +void CL_DLLEXPORT HUD_TempEntUpdate (
  21.411  	double frametime,   // Simulation time
  21.412  	double client_time, // Absolute time on client
  21.413  	double cl_gravity,  // True gravity on client
  21.414 @@ -594,10 +398,19 @@
  21.415  	int		( *Callback_AddVisibleEntity )( cl_entity_t *pEntity ),
  21.416  	void	( *Callback_TempEntPlaySound )( TEMPENTITY *pTemp, float damp ) )
  21.417  {
  21.418 +//	RecClTempEntUpdate(frametime, client_time, cl_gravity, ppTempEntFree, ppTempEntActive, Callback_AddVisibleEntity, Callback_TempEntPlaySound);
  21.419 +
  21.420  	static int gTempEntFrame = 0;
  21.421  	int			i;
  21.422  	TEMPENTITY	*pTemp, *pnext, *pprev;
  21.423 -	float		freq, gravity, gravitySlow, life, fastFreq;
  21.424 +	float		/*freq,*/ gravity, gravitySlow, life, fastFreq;
  21.425 +
  21.426 +	Vector		vAngles;
  21.427 +
  21.428 +	gEngfuncs.GetViewAngles( (float*)vAngles );
  21.429 +
  21.430 +	if ( g_pParticleMan )
  21.431 +		 g_pParticleMan->SetVariables( cl_gravity, vAngles );
  21.432  
  21.433  	// Nothing to simulate
  21.434  	if ( !*ppTempEntActive )		
  21.435 @@ -635,7 +448,7 @@
  21.436  	}
  21.437  
  21.438  	pprev = NULL;
  21.439 -	freq = client_time * 0.01;
  21.440 +	//freq = client_time * 0.01;
  21.441  	fastFreq = client_time * 5.5;
  21.442  	gravity = -frametime * cl_gravity;
  21.443  	gravitySlow = gravity * 0.5;
  21.444 @@ -722,9 +535,9 @@
  21.445  			}
  21.446  			else if ( pTemp->flags & FTENT_SPIRAL )
  21.447  			{
  21.448 -				float s, c;
  21.449 -				s = sin( pTemp->entity.baseline.origin[2] + fastFreq );
  21.450 -				c = cos( pTemp->entity.baseline.origin[2] + fastFreq );
  21.451 +				//float s, c;
  21.452 +				//s = sin( pTemp->entity.baseline.origin[2] + fastFreq );
  21.453 +				//c = cos( pTemp->entity.baseline.origin[2] + fastFreq );
  21.454  
  21.455  				pTemp->entity.origin[0] += pTemp->entity.baseline.origin[0] * frametime + 8 * sin( client_time * 20 + (int)pTemp );
  21.456  				pTemp->entity.origin[1] += pTemp->entity.baseline.origin[1] * frametime + 4 * sin( client_time * 30 + (int)pTemp );
  21.457 @@ -957,8 +770,10 @@
  21.458  Indices must start at 1, not zero.
  21.459  =================
  21.460  */
  21.461 -cl_entity_t DLLEXPORT *HUD_GetUserEntity( int index )
  21.462 +cl_entity_t CL_DLLEXPORT *HUD_GetUserEntity( int index )
  21.463  {
  21.464 +//	RecClGetUserEntity(index);
  21.465 +
  21.466  #if defined( BEAM_TEST )
  21.467  	// None by default, you would return a valic pointer if you create a client side
  21.468  	//  beam and attach it to a client side entity.
    22.1 --- a/multiplayer/cl_dll/ev_hldm.cpp	Fri Mar 15 01:26:54 2013 -0500
    22.2 +++ b/multiplayer/cl_dll/ev_hldm.cpp	Thu Sep 05 19:47:29 2013 -0500
    22.3 @@ -39,7 +39,10 @@
    22.4  
    22.5  static int tracerCount[ 32 ];
    22.6  
    22.7 -extern "C" char PM_FindTextureType( char *name );
    22.8 +extern "C"
    22.9 +{
   22.10 +#include "pm_shared.h"
   22.11 +}
   22.12  
   22.13  void V_PunchAxis( int axis, float punch );
   22.14  void VectorAngles( const float *forward, float *angles );
   22.15 @@ -86,6 +89,7 @@
   22.16  #define VECTOR_CONE_15DEGREES Vector( 0.13053, 0.13053, 0.13053 )
   22.17  #define VECTOR_CONE_20DEGREES Vector( 0.17365, 0.17365, 0.17365 )
   22.18  
   22.19 +
   22.20  // play a strike sound based on the texture that was hit by the attack traceline.  VecSrc/VecEnd are the
   22.21  // original traceline endpoints used by the attacker, iBulletType is the type of bullet that hit the texture.
   22.22  // returns volume of strike instrument (crowbar) to play
   22.23 @@ -95,7 +99,7 @@
   22.24  	char chTextureType = CHAR_TEX_CONCRETE;
   22.25  	float fvol;
   22.26  	float fvolbar;
   22.27 -	char *rgsz[4];
   22.28 +	const char *rgsz[4];
   22.29  	int cnt;
   22.30  	float fattn = ATTN_NORM;
   22.31  	int entity;
   22.32 @@ -553,7 +557,6 @@
   22.33  	vec3_t vecSrc, vecAiming;
   22.34  	vec3_t vecSpread;
   22.35  	vec3_t up, right, forward;
   22.36 -	float flSpread = 0.01;
   22.37  
   22.38  	idx = args->entindex;
   22.39  	VectorCopy( args->origin, origin );
   22.40 @@ -607,7 +610,6 @@
   22.41  	vec3_t vecSrc, vecAiming;
   22.42  	vec3_t vecSpread;
   22.43  	vec3_t up, right, forward;
   22.44 -	float flSpread = 0.01;
   22.45  
   22.46  	idx = args->entindex;
   22.47  	VectorCopy( args->origin, origin );
   22.48 @@ -664,7 +666,6 @@
   22.49  	int shell;
   22.50  	vec3_t vecSrc, vecAiming;
   22.51  	vec3_t up, right, forward;
   22.52 -	float flSpread = 0.01;
   22.53  
   22.54  	idx = args->entindex;
   22.55  	VectorCopy( args->origin, origin );
   22.56 @@ -754,7 +755,6 @@
   22.57  
   22.58  	vec3_t vecSrc, vecAiming;
   22.59  	vec3_t up, right, forward;
   22.60 -	float flSpread = 0.01;
   22.61  
   22.62  	idx = args->entindex;
   22.63  	VectorCopy( args->origin, origin );
   22.64 @@ -845,16 +845,12 @@
   22.65  	vec3_t angles;
   22.66  	vec3_t velocity;
   22.67  	float flDamage = args->fparam1;
   22.68 -	int primaryfire = args->bparam1;
   22.69  
   22.70  	int m_fPrimaryFire = args->bparam1;
   22.71 -	int m_iWeaponVolume = GAUSS_PRIMARY_FIRE_VOLUME;
   22.72  	vec3_t vecSrc;
   22.73  	vec3_t vecDest;
   22.74 -	edict_t		*pentIgnore;
   22.75  	pmtrace_t tr, beam_tr;
   22.76  	float flMaxFrac = 1.0;
   22.77 -	int	nTotal = 0;
   22.78  	int fHasPunched = 0;
   22.79  	int fFirstBeam = 1;
   22.80  	int	nMaxHits = 10;
   22.81 @@ -966,8 +962,6 @@
   22.82  		{
   22.83  			float n;
   22.84  
   22.85 -			pentIgnore = NULL;
   22.86 -
   22.87  			n = -DotProduct( tr.plane.normal, forward );
   22.88  
   22.89  			if (n < 0.5) // 60 degrees	
   22.90 @@ -1385,12 +1379,12 @@
   22.91  
   22.92  void EV_EgonFire( event_args_t *args )
   22.93  {
   22.94 -	int idx, iFireState, iFireMode;
   22.95 +	int idx, /*iFireState,*/ iFireMode;
   22.96  	vec3_t origin;
   22.97  
   22.98  	idx = args->entindex;
   22.99  	VectorCopy( args->origin, origin );
  22.100 -	iFireState = args->iparam1;
  22.101 +	//iFireState = args->iparam1;
  22.102  	iFireMode = args->iparam2;
  22.103  	int iStartup = args->bparam1;
  22.104  
  22.105 @@ -1514,13 +1508,13 @@
  22.106  
  22.107  void EV_HornetGunFire( event_args_t *args )
  22.108  {
  22.109 -	int idx, iFireMode;
  22.110 +	int idx; //, iFireMode;
  22.111  	vec3_t origin, angles, vecSrc, forward, right, up;
  22.112  
  22.113  	idx = args->entindex;
  22.114  	VectorCopy( args->origin, origin );
  22.115  	VectorCopy( args->angles, angles );
  22.116 -	iFireMode = args->iparam1;
  22.117 +	//iFireMode = args->iparam1;
  22.118  
  22.119  	//Only play the weapon anims if I shot it.
  22.120  	if ( EV_IsLocal( idx ) )
  22.121 @@ -1697,4 +1691,4 @@
  22.122  int EV_TFC_IsAllyTeam( int iTeam1, int iTeam2 )
  22.123  {
  22.124  	return 0;
  22.125 -}
  22.126 \ No newline at end of file
  22.127 +}
    23.1 --- a/multiplayer/cl_dll/geiger.cpp	Fri Mar 15 01:26:54 2013 -0500
    23.2 +++ b/multiplayer/cl_dll/geiger.cpp	Thu Sep 05 19:47:29 2013 -0500
    23.3 @@ -64,8 +64,8 @@
    23.4  int CHudGeiger::Draw (float flTime)
    23.5  {
    23.6  	int pct;
    23.7 -	float flvol;
    23.8 -	int rg[3];
    23.9 +	float flvol = 0.0;
   23.10 +	//int rg[3];
   23.11  	int i;
   23.12  	
   23.13  	if (m_iGeigerRange < 1000 && m_iGeigerRange > 0)
   23.14 @@ -79,61 +79,61 @@
   23.15  		{
   23.16  			pct = 2;
   23.17  			flvol = 0.4;		//Con_Printf ( "range > 600\n");
   23.18 -			rg[0] = 1;
   23.19 -			rg[1] = 1;
   23.20 +			//rg[0] = 1;
   23.21 +			//rg[1] = 1;
   23.22  			i = 2;
   23.23  		}
   23.24  		else if (m_iGeigerRange > 500)
   23.25  		{
   23.26  			pct = 4;
   23.27  			flvol = 0.5;		//Con_Printf ( "range > 500\n");
   23.28 -			rg[0] = 1;
   23.29 -			rg[1] = 2;
   23.30 +			//rg[0] = 1;
   23.31 +			//rg[1] = 2;
   23.32  			i = 2;
   23.33  		}
   23.34  		else if (m_iGeigerRange > 400)
   23.35  		{
   23.36  			pct = 8;
   23.37  			flvol = 0.6;		//Con_Printf ( "range > 400\n");
   23.38 -			rg[0] = 1;
   23.39 -			rg[1] = 2;
   23.40 -			rg[2] = 3;
   23.41 +			//rg[0] = 1;
   23.42 +			//rg[1] = 2;
   23.43 +			//rg[2] = 3;
   23.44  			i = 3;
   23.45  		}
   23.46  		else if (m_iGeigerRange > 300)
   23.47  		{
   23.48  			pct = 8;
   23.49  			flvol = 0.7;		//Con_Printf ( "range > 300\n");
   23.50 -			rg[0] = 2;
   23.51 -			rg[1] = 3;
   23.52 -			rg[2] = 4;
   23.53 +			//rg[0] = 2;
   23.54 +			//rg[1] = 3;
   23.55 +			//rg[2] = 4;
   23.56  			i = 3;
   23.57  		}
   23.58  		else if (m_iGeigerRange > 200)
   23.59  		{
   23.60  			pct = 28;
   23.61  			flvol = 0.78;		//Con_Printf ( "range > 200\n");
   23.62 -			rg[0] = 2;
   23.63 -			rg[1] = 3;
   23.64 -			rg[2] = 4;
   23.65 +			//rg[0] = 2;
   23.66 +			//rg[1] = 3;
   23.67 +			//rg[2] = 4;
   23.68  			i = 3;
   23.69  		}
   23.70  		else if (m_iGeigerRange > 150)
   23.71  		{
   23.72  			pct = 40;
   23.73  			flvol = 0.80;		//Con_Printf ( "range > 150\n");
   23.74 -			rg[0] = 3;
   23.75 -			rg[1] = 4;
   23.76 -			rg[2] = 5;
   23.77 +			//rg[0] = 3;
   23.78 +			//rg[1] = 4;
   23.79 +			//rg[2] = 5;
   23.80  			i = 3;
   23.81  		}
   23.82  		else if (m_iGeigerRange > 100)
   23.83  		{
   23.84  			pct = 60;
   23.85  			flvol = 0.85;		//Con_Printf ( "range > 100\n");
   23.86 -			rg[0] = 3;
   23.87 -			rg[1] = 4;
   23.88 -			rg[2] = 5;
   23.89 +			//rg[0] = 3;
   23.90 +			//rg[1] = 4;
   23.91 +			//rg[2] = 5;
   23.92  			i = 3;
   23.93  		}
   23.94  		else if (m_iGeigerRange > 75)
   23.95 @@ -141,25 +141,25 @@
   23.96  			pct = 80;
   23.97  			flvol = 0.9;		//Con_Printf ( "range > 75\n");
   23.98  			//gflGeigerDelay = cl.time + GEIGERDELAY * 0.75;
   23.99 -			rg[0] = 4;
  23.100 -			rg[1] = 5;
  23.101 -			rg[2] = 6;
  23.102 +			//rg[0] = 4;
  23.103 +			//rg[1] = 5;
  23.104 +			//rg[2] = 6;
  23.105  			i = 3;
  23.106  		}
  23.107  		else if (m_iGeigerRange > 50)
  23.108  		{
  23.109  			pct = 90;
  23.110  			flvol = 0.95;		//Con_Printf ( "range > 50\n");
  23.111 -			rg[0] = 5;
  23.112 -			rg[1] = 6;
  23.113 +			//rg[0] = 5;
  23.114 +			//rg[1] = 6;
  23.115  			i = 2;
  23.116  		}
  23.117  		else
  23.118  		{
  23.119  			pct = 95;
  23.120  			flvol = 1.0;		//Con_Printf ( "range < 50\n");
  23.121 -			rg[0] = 5;
  23.122 -			rg[1] = 6;
  23.123 +			//rg[0] = 5;
  23.124 +			//rg[1] = 6;
  23.125  			i = 2;
  23.126  		}
  23.127  
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/multiplayer/cl_dll/global_consts.h	Thu Sep 05 19:47:29 2013 -0500
    24.3 @@ -0,0 +1,30 @@
    24.4 +//========= Copyright  1996-2002, Valve LLC, All rights reserved. ============
    24.5 +//
    24.6 +// Purpose: 
    24.7 +//
    24.8 +// $NoKeywords: $
    24.9 +//=============================================================================
   24.10 +#ifndef GLOBALCONSTS_H
   24.11 +#define GLOBALCONSTS_H
   24.12 +#ifdef _WIN32
   24.13 +#pragma once
   24.14 +#endif
   24.15 +
   24.16 +
   24.17 +
   24.18 +enum 
   24.19 +{ 
   24.20 +	MAX_PLAYERS = 64,
   24.21 +	MAX_TEAMS = 64,
   24.22 +	MAX_TEAM_NAME = 16,
   24.23 +};
   24.24 +
   24.25 +#define MAX_SCORES					10
   24.26 +#define MAX_SCOREBOARD_TEAMS		5
   24.27 +
   24.28 +#define NUM_ROWS		(MAX_PLAYERS + (MAX_SCOREBOARD_TEAMS * 2))
   24.29 +
   24.30 +#define MAX_SERVERNAME_LENGTH	64
   24.31 +#define MAX_TEAMNAME_SIZE 32
   24.32 +
   24.33 +#endif // GLOBALCONSTS_H
   24.34 \ No newline at end of file
    25.1 --- a/multiplayer/cl_dll/health.cpp	Fri Mar 15 01:26:54 2013 -0500
    25.2 +++ b/multiplayer/cl_dll/health.cpp	Thu Sep 05 19:47:29 2013 -0500
    25.3 @@ -18,9 +18,9 @@
    25.4  // implementation of CHudHealth class
    25.5  //
    25.6  
    25.7 -#include "STDIO.H"
    25.8 -#include "STDLIB.H"
    25.9 -#include "MATH.H"
   25.10 +#include "stdio.h"
   25.11 +#include "stdlib.h"
   25.12 +#include "math.h"
   25.13  
   25.14  #include "hud.h"
   25.15  #include "cl_util.h"
    26.1 --- a/multiplayer/cl_dll/health.h	Fri Mar 15 01:26:54 2013 -0500
    26.2 +++ b/multiplayer/cl_dll/health.h	Thu Sep 05 19:47:29 2013 -0500
    26.3 @@ -115,8 +115,7 @@
    26.4  	float m_fFade;
    26.5  
    26.6  private:
    26.7 -	HSPRITE m_hSprite;
    26.8 -	HSPRITE m_hDamage;
    26.9 +	HLSPRITE m_hSprite;
   26.10  	
   26.11  	DAMAGE_IMAGE m_dmg[NUM_DMG_TYPES];
   26.12  	int	m_bitsDamage;
    27.1 --- a/multiplayer/cl_dll/hl/hl_baseentity.cpp	Fri Mar 15 01:26:54 2013 -0500
    27.2 +++ b/multiplayer/cl_dll/hl/hl_baseentity.cpp	Thu Sep 05 19:47:29 2013 -0500
    27.3 @@ -53,7 +53,7 @@
    27.4  BOOL CBaseEntity :: IsInWorld( void ) { return TRUE; }
    27.5  int CBaseEntity::ShouldToggle( USE_TYPE useType, BOOL currentState ) { return 0; }
    27.6  int	CBaseEntity :: DamageDecal( int bitsDamageType ) { return -1; }
    27.7 -CBaseEntity * CBaseEntity::Create( char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner ) { return NULL; }
    27.8 +CBaseEntity * CBaseEntity::Create( const char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner ) { return NULL; }
    27.9  void CBaseEntity::SUB_Remove( void ) { }
   27.10  
   27.11  // CBaseDelay Stubs
   27.12 @@ -110,22 +110,78 @@
   27.13  
   27.14  
   27.15  CBaseEntity* CBaseMonster :: CheckTraceHullAttack( float flDist, int iDamage, int iDmgType ) { return NULL; }
   27.16 +void CBaseMonster :: Eat ( float flFullDuration ) { }
   27.17 +BOOL CBaseMonster :: FShouldEat ( void ) { return TRUE; }
   27.18 +void CBaseMonster :: BarnacleVictimBitten ( entvars_t *pevBarnacle ) { }
   27.19 +void CBaseMonster :: BarnacleVictimReleased ( void ) { }
   27.20 +void CBaseMonster :: Listen ( void ) { }
   27.21 +float CBaseMonster :: FLSoundVolume ( CSound *pSound ) { return 0.0; }
   27.22 +BOOL CBaseMonster :: FValidateHintType ( short sHint ) { return FALSE; }
   27.23  void CBaseMonster :: Look ( int iDistance ) { }
   27.24 +int CBaseMonster :: ISoundMask ( void ) { return 0; }
   27.25 +CSound* CBaseMonster :: PBestSound ( void ) { return NULL; }
   27.26 +CSound* CBaseMonster :: PBestScent ( void ) { return NULL; } 
   27.27  float CBaseAnimating :: StudioFrameAdvance ( float flInterval ) { return 0.0; }
   27.28 +void CBaseMonster :: MonsterThink ( void ) { }
   27.29 +void CBaseMonster :: MonsterUse ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { }
   27.30 +int CBaseMonster :: IgnoreConditions ( void ) { return 0; }
   27.31 +void CBaseMonster :: RouteClear ( void ) { }
   27.32 +void CBaseMonster :: RouteNew ( void ) { }
   27.33 +BOOL CBaseMonster :: FRouteClear ( void ) { return FALSE; }
   27.34 +BOOL CBaseMonster :: FRefreshRoute ( void ) { return 0; }
   27.35 +BOOL CBaseMonster::MoveToEnemy( Activity movementAct, float waitTime ) { return FALSE; }
   27.36 +BOOL CBaseMonster::MoveToLocation( Activity movementAct, float waitTime, const Vector &goal ) { return FALSE; }
   27.37 +BOOL CBaseMonster::MoveToTarget( Activity movementAct, float waitTime ) { return FALSE; }
   27.38 +BOOL CBaseMonster::MoveToNode( Activity movementAct, float waitTime, const Vector &goal ) { return FALSE; }
   27.39 +int ShouldSimplify( int routeType ) { return TRUE; }
   27.40 +void CBaseMonster :: RouteSimplify( CBaseEntity *pTargetEnt ) { }
   27.41 +BOOL CBaseMonster :: FBecomeProne ( void ) { return TRUE; }
   27.42 +BOOL CBaseMonster :: CheckRangeAttack1 ( float flDot, float flDist ) { return FALSE; }
   27.43 +BOOL CBaseMonster :: CheckRangeAttack2 ( float flDot, float flDist ) { return FALSE; }
   27.44 +BOOL CBaseMonster :: CheckMeleeAttack1 ( float flDot, float flDist ) { return FALSE; }
   27.45 +BOOL CBaseMonster :: CheckMeleeAttack2 ( float flDot, float flDist ) { return FALSE; }
   27.46 +void CBaseMonster :: CheckAttacks ( CBaseEntity *pTarget, float flDist ) { }
   27.47 +BOOL CBaseMonster :: FCanCheckAttacks ( void ) { return FALSE; }
   27.48 +int CBaseMonster :: CheckEnemy ( CBaseEntity *pEnemy ) { return 0; }
   27.49 +void CBaseMonster :: PushEnemy( CBaseEntity *pEnemy, Vector &vecLastKnownPos ) { }
   27.50 +BOOL CBaseMonster :: PopEnemy( ) { return FALSE; }
   27.51 +void CBaseMonster :: SetActivity ( Activity NewActivity ) { }
   27.52 +void CBaseMonster :: SetSequenceByName ( const char *szSequence ) { }
   27.53 +int CBaseMonster :: CheckLocalMove ( const Vector &vecStart, const Vector &vecEnd, CBaseEntity *pTarget, float *pflDist ) { return 0; }
   27.54 +float CBaseMonster :: OpenDoorAndWait( entvars_t *pevDoor ) { return 0.0; }
   27.55 +void CBaseMonster :: AdvanceRoute ( float distance ) { }
   27.56 +int CBaseMonster :: RouteClassify( int iMoveFlag ) { return 0; }
   27.57 +BOOL CBaseMonster :: BuildRoute ( const Vector &vecGoal, int iMoveFlag, CBaseEntity *pTarget ) { return FALSE; }
   27.58 +void CBaseMonster :: InsertWaypoint ( Vector vecLocation, int afMoveFlags ) { }
   27.59 +BOOL CBaseMonster :: FTriangulate ( const Vector &vecStart , const Vector &vecEnd, float flDist, CBaseEntity *pTargetEnt, Vector *pApex ) { return FALSE; }
   27.60 +void CBaseMonster :: Move ( float flInterval ) { }
   27.61 +BOOL CBaseMonster:: ShouldAdvanceRoute( float flWaypointDist ) { return FALSE; }
   27.62 +void CBaseMonster::MoveExecute( CBaseEntity *pTargetEnt, const Vector &vecDir, float flInterval ) { }
   27.63 +void CBaseMonster :: MonsterInit ( void ) { }
   27.64 +void CBaseMonster :: MonsterInitThink ( void ) { }
   27.65 +void CBaseMonster :: StartMonster ( void ) { }
   27.66 +void CBaseMonster :: MovementComplete( void ) { }
   27.67 +int CBaseMonster::TaskIsRunning( void ) { return 0; }
   27.68  int CBaseMonster::IRelationship ( CBaseEntity *pTarget ) { return 0; }
   27.69 +BOOL CBaseMonster :: FindCover ( Vector vecThreat, Vector vecViewOffset, float flMinDist, float flMaxDist ) { return FALSE; }
   27.70 +BOOL CBaseMonster :: BuildNearestRoute ( Vector vecThreat, Vector vecViewOffset, float flMinDist, float flMaxDist ) { return FALSE; }
   27.71  CBaseEntity *CBaseMonster :: BestVisibleEnemy ( void ) { return NULL; }
   27.72  BOOL CBaseMonster :: FInViewCone ( CBaseEntity *pEntity ) { return FALSE; }
   27.73  BOOL CBaseMonster :: FInViewCone ( Vector *pOrigin ) { return FALSE; }
   27.74  BOOL CBaseEntity :: FVisible ( CBaseEntity *pEntity ) { return FALSE; }
   27.75  BOOL CBaseEntity :: FVisible ( const Vector &vecOrigin ) { return FALSE; }
   27.76  void CBaseMonster :: MakeIdealYaw( Vector vecTarget ) { }
   27.77 +float	CBaseMonster::FlYawDiff ( void ) { return 0.0; }
   27.78  float CBaseMonster::ChangeYaw ( int yawSpeed ) { return 0; }
   27.79 +float	CBaseMonster::VecToYaw ( Vector vecDir ) { return 0.0; }
   27.80  int CBaseAnimating :: LookupActivity ( int activity ) { return 0; }
   27.81  int CBaseAnimating :: LookupActivityHeaviest ( int activity ) { return 0; }
   27.82 +void CBaseMonster :: SetEyePosition ( void ) { }
   27.83  int CBaseAnimating :: LookupSequence ( const char *label ) { return 0; }
   27.84  void CBaseAnimating :: ResetSequenceInfo ( ) { }
   27.85  BOOL CBaseAnimating :: GetSequenceFlags( ) { return FALSE; }
   27.86  void CBaseAnimating :: DispatchAnimEvents ( float flInterval ) { }
   27.87 +void CBaseMonster :: HandleAnimEvent( MonsterEvent_t *pEvent ) { }
   27.88  float CBaseAnimating :: SetBoneController ( int iController, float flValue ) { return 0.0; }
   27.89  void CBaseAnimating :: InitBoneControllers ( void ) { }
   27.90  float CBaseAnimating :: SetBlending ( int iBlender, float flValue ) { return 0; }
   27.91 @@ -135,16 +191,30 @@
   27.92  void CBaseAnimating :: GetAutomovement( Vector &origin, Vector &angles, float flInterval ) { }
   27.93  void CBaseAnimating :: SetBodygroup( int iGroup, int iValue ) { }
   27.94  int CBaseAnimating :: GetBodygroup( int iGroup ) { return 0; }
   27.95 +Vector CBaseMonster :: GetGunPosition( void ) { return g_vecZero; }
   27.96  void CBaseEntity::TraceAttack(entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType) { }
   27.97  void CBaseEntity::FireBullets(ULONG cShots, Vector vecSrc, Vector vecDirShooting, Vector vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker ) { }
   27.98  void CBaseEntity :: TraceBleed( float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType ) { }
   27.99  void CBaseMonster :: MakeDamageBloodDecal ( int cCount, float flNoise, TraceResult *ptr, const Vector &vecDir ) { }
  27.100 +BOOL CBaseMonster :: FGetNodeRoute ( Vector vecDest ) { return TRUE; }
  27.101 +int CBaseMonster :: FindHintNode ( void ) { return NO_NODE; }
  27.102  void CBaseMonster::ReportAIState( void ) { }
  27.103  void CBaseMonster :: KeyValue( KeyValueData *pkvd ) { }
  27.104  BOOL CBaseMonster :: FCheckAITrigger ( void ) { return FALSE; }
  27.105 +int CBaseMonster :: CanPlaySequence( BOOL fDisregardMonsterState, int interruptLevel ) { return FALSE; }
  27.106 +BOOL CBaseMonster :: FindLateralCover ( const Vector &vecThreat, const Vector &vecViewOffset ) { return FALSE; }
  27.107 +Vector CBaseMonster :: ShootAtEnemy( const Vector &shootOrigin ) { return g_vecZero; }
  27.108 +BOOL CBaseMonster :: FacingIdeal( void ) { return FALSE; }
  27.109 +BOOL CBaseMonster :: FCanActiveIdle ( void ) { return FALSE; }
  27.110 +void CBaseMonster::PlaySentence( const char *pszSentence, float duration, float volume, float attenuation ) { }
  27.111 +void CBaseMonster::PlayScriptedSentence( const char *pszSentence, float duration, float volume, float attenuation, BOOL bConcurrent, CBaseEntity *pListener ) { }
  27.112 +void CBaseMonster::SentenceStop( void ) { }
  27.113  void CBaseMonster::CorpseFallThink( void ) { }
  27.114  void CBaseMonster :: MonsterInitDead( void ) { }
  27.115 +BOOL CBaseMonster :: BBoxFlat ( void ) { return TRUE; }
  27.116 +BOOL CBaseMonster :: GetEnemy ( void ) { return FALSE; }
  27.117  void CBaseMonster :: TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType) { }
  27.118 +CBaseEntity* CBaseMonster :: DropItem ( const char *pszItemName, const Vector &vecPos, const Vector &vecAng ) { return NULL; }
  27.119  BOOL CBaseMonster :: ShouldFadeOnDeath( void ) { return FALSE; }
  27.120  void CBaseMonster :: RadiusDamage(entvars_t* pevInflictor, entvars_t*	pevAttacker, float flDamage, int iClassIgnore, int bitsDamageType ) { }
  27.121  void CBaseMonster :: RadiusDamage( Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int iClassIgnore, int bitsDamageType ) { }
  27.122 @@ -153,16 +223,26 @@
  27.123  BOOL CBaseMonster :: HasHumanGibs( void ) { return FALSE; }
  27.124  BOOL CBaseMonster :: HasAlienGibs( void ) { return FALSE; }
  27.125  Activity CBaseMonster :: GetDeathActivity ( void ) { return ACT_DIE_HEADSHOT; }
  27.126 +MONSTERSTATE CBaseMonster :: GetIdealState ( void ) { return MONSTERSTATE_ALERT; }
  27.127 +Schedule_t* CBaseMonster :: GetScheduleOfType ( int Type ) { return NULL; }
  27.128 +Schedule_t *CBaseMonster :: GetSchedule ( void ) { return NULL; }
  27.129 +void CBaseMonster :: RunTask ( Task_t *pTask ) { }
  27.130 +void CBaseMonster :: StartTask ( Task_t *pTask ) { }
  27.131 +Schedule_t *CBaseMonster::ScheduleFromName( const char *pName ) { return NULL;}
  27.132  void CBaseMonster::BecomeDead( void ) {}
  27.133 +void CBaseMonster :: RunAI ( void ) {}
  27.134  void CBaseMonster :: Killed( entvars_t *pevAttacker, int iGib ) {}
  27.135  int CBaseMonster :: TakeHealth (float flHealth, int bitsDamageType) { return 0; }
  27.136  int CBaseMonster :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType ) { return 0; }
  27.137 +int CBaseMonster::Restore( class CRestore & ) { return 1; }
  27.138 +int CBaseMonster::Save( class CSave & ) { return 1; }
  27.139  
  27.140  int TrainSpeed(int iSpeed, int iMax) { 	return 0; }
  27.141  void CBasePlayer :: DeathSound( void ) { }
  27.142  int CBasePlayer :: TakeHealth( float flHealth, int bitsDamageType ) { return 0; }
  27.143  void CBasePlayer :: TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType) { }
  27.144  int CBasePlayer :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType ) { return 0; }
  27.145 +void CBasePlayer::PackDeadPlayerItems( void ) { }
  27.146  void CBasePlayer::RemoveAllItems( BOOL removeSuit ) { }
  27.147  void CBasePlayer::SetAnimation( PLAYER_ANIM playerAnim ) { }
  27.148  void CBasePlayer::WaterMove() { }
  27.149 @@ -178,7 +258,7 @@
  27.150  void CBasePlayer::CheckTimeBasedDamage()  { }
  27.151  void CBasePlayer :: UpdateGeigerCounter( void ) { }
  27.152  void CBasePlayer::CheckSuitUpdate() { }
  27.153 -void CBasePlayer::SetSuitUpdate(char *name, int fgroup, int iNoRepeatTime) { }
  27.154 +void CBasePlayer::SetSuitUpdate(const char *name, int fgroup, int iNoRepeatTime) { }
  27.155  void CBasePlayer :: UpdatePlayerSound ( void ) { }
  27.156  void CBasePlayer::PostThink() { }
  27.157  void CBasePlayer :: Precache( void ) { }
  27.158 @@ -218,7 +298,7 @@
  27.159  BOOL CBasePlayer :: SwitchWeapon( CBasePlayerItem *pWeapon )  { return FALSE; }
  27.160  Vector CBasePlayer :: GetGunPosition( void ) { return g_vecZero; }
  27.161  const char *CBasePlayer::TeamID( void ) { return ""; }
  27.162 -int CBasePlayer :: GiveAmmo( int iCount, char *szName, int iMax ) { return 0; }
  27.163 +int CBasePlayer :: GiveAmmo( int iCount, const char *szName, int iMax ) { return 0; }
  27.164  void CBasePlayer::AddPoints( int score, BOOL bAllowNegativeScore ) { } 
  27.165  void CBasePlayer::AddPointsToTeam( int score, BOOL bAllowNegativeScore ) { } 
  27.166  
  27.167 @@ -234,6 +314,7 @@
  27.168  int CBasePlayerItem::Save( class CSave & ) { return 1; }
  27.169  int CBasePlayerWeapon::Restore( class CRestore & ) { return 1; }
  27.170  int CBasePlayerWeapon::Save( class CSave & ) { return 1; }
  27.171 +float CBasePlayerWeapon::GetNextAttackDelay( float flTime ) { return flTime; }
  27.172  void CBasePlayerItem :: SetObjectCollisionBox( void ) { }
  27.173  void CBasePlayerItem :: FallInit( void ) { }
  27.174  void CBasePlayerItem::FallThink ( void ) { }
    28.1 --- a/multiplayer/cl_dll/hl/hl_weapons.cpp	Fri Mar 15 01:26:54 2013 -0500
    28.2 +++ b/multiplayer/cl_dll/hl/hl_weapons.cpp	Thu Sep 05 19:47:29 2013 -0500
    28.3 @@ -75,7 +75,7 @@
    28.4  Print debug messages to console
    28.5  ======================
    28.6  */
    28.7 -void AlertMessage( ALERT_TYPE atype, char *szFmt, ... )
    28.8 +void AlertMessage( ALERT_TYPE atype, const char *szFmt, ... )
    28.9  {
   28.10  	va_list		argptr;
   28.11  	static char	string[1024];
   28.12 @@ -95,7 +95,7 @@
   28.13  	return gEngfuncs.GetMaxClients() == 1 ? 0 : 1;
   28.14  }
   28.15  //Just loads a v_ model.
   28.16 -void LoadVModel ( char *szViewModel, CBasePlayer *m_pPlayer )
   28.17 +void LoadVModel ( const char *szViewModel, CBasePlayer *m_pPlayer )
   28.18  {
   28.19  	gEngfuncs.CL_LoadModel( szViewModel, &m_pPlayer->pev->viewmodel );
   28.20  }
   28.21 @@ -208,7 +208,7 @@
   28.22  
   28.23  =====================
   28.24  */
   28.25 -BOOL CBasePlayerWeapon :: DefaultDeploy( char *szViewModel, char *szWeaponModel, int iAnim, char *szAnimExt, int skiplocal, int	body )
   28.26 +BOOL CBasePlayerWeapon :: DefaultDeploy( const char *szViewModel, const char *szWeaponModel, int iAnim, const char *szAnimExt, int skiplocal, int body )
   28.27  {
   28.28  	if ( !CanDeploy() )
   28.29  		return FALSE;
   28.30 @@ -288,7 +288,7 @@
   28.31  */
   28.32  Vector CBaseEntity::FireBulletsPlayer ( ULONG cShots, Vector vecSrc, Vector vecDirShooting, Vector vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker, int shared_rand )
   28.33  {
   28.34 -	float x, y, z;
   28.35 +	float x = 0.0, y = 0.0, z;
   28.36  
   28.37  	for ( ULONG iShot = 1; iShot <= cShots; iShot++ )
   28.38  	{
   28.39 @@ -565,22 +565,6 @@
   28.40  
   28.41  /*
   28.42  =====================
   28.43 -CBasePlayerWeapon::PrintState
   28.44 -
   28.45 -For debugging, print out state variables to log file
   28.46 -=====================
   28.47 -*/
   28.48 -void CBasePlayerWeapon::PrintState( void )
   28.49 -{
   28.50 -	COM_Log( "c:\\hl.log", "%.4f ", gpGlobals->time );
   28.51 -	COM_Log( "c:\\hl.log", "%.4f ", m_pPlayer->m_flNextAttack );
   28.52 -	COM_Log( "c:\\hl.log", "%.4f ", m_flNextPrimaryAttack );
   28.53 -	COM_Log( "c:\\hl.log", "%.4f ", m_flTimeWeaponIdle - gpGlobals->time);
   28.54 -	COM_Log( "c:\\hl.log", "%i ", m_iClip );
   28.55 -}
   28.56 -
   28.57 -/*
   28.58 -=====================
   28.59  HUD_InitClientWeapons
   28.60  
   28.61  Set up weapons, player and functions needed to run weapons code client-side.
   28.62 @@ -867,7 +851,7 @@
   28.63  		 ( ( CRpg * )player.m_pActiveItem)->m_cActiveRockets = (int)from->client.vuser2[ 2 ];
   28.64  	}
   28.65  	
   28.66 -	// Don't go firing anything if we have died.
   28.67 +	// Don't go firing anything if we have died or are spectating
   28.68  	// Or if we don't have a weapon model deployed
   28.69  	if ( ( player.pev->deadflag != ( DEAD_DISCARDBODY + 1 ) ) && 
   28.70  		 !CL_IsDead() && player.pev->viewmodel && !g_iUser1 )
   28.71 @@ -1067,8 +1051,10 @@
   28.72  be ignored
   28.73  =====================
   28.74  */
   28.75 -void _DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s *to, struct usercmd_s *cmd, int runfuncs, double time, unsigned int random_seed )
   28.76 +void CL_DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s *to, struct usercmd_s *cmd, int runfuncs, double time, unsigned int random_seed )
   28.77  {
   28.78 +//	RecClPostRunCmd(from, to, cmd, runfuncs, time, random_seed);
   28.79 +
   28.80  	g_runfuncs = runfuncs;
   28.81  
   28.82  #if defined( CLIENT_WEAPONS )
    29.1 --- a/multiplayer/cl_dll/hud.cpp	Fri Mar 15 01:26:54 2013 -0500
    29.2 +++ b/multiplayer/cl_dll/hud.cpp	Thu Sep 05 19:47:29 2013 -0500
    29.3 @@ -29,9 +29,10 @@
    29.4  
    29.5  #include "demo.h"
    29.6  #include "demo_api.h"
    29.7 -#include "vgui_scorepanel.h"
    29.8 +#include "vgui_ScorePanel.h"
    29.9  
   29.10 -
   29.11 +hud_player_info_t	 g_PlayerInfoList[MAX_PLAYERS+1];	   // player info from the engine
   29.12 +extra_player_info_t  g_PlayerExtraInfo[MAX_PLAYERS+1];   // additional player info sent directly to the client dll
   29.13  
   29.14  class CHLVoiceStatusHelper : public IVoiceStatusHelper
   29.15  {
   29.16 @@ -40,7 +41,7 @@
   29.17  	{
   29.18  		color[0] = color[1] = color[2] = 255;
   29.19  
   29.20 -		if( entindex >= 0 && entindex < sizeof(g_PlayerExtraInfo)/sizeof(g_PlayerExtraInfo[0]) )
   29.21 +		if( entindex >= 0 && size_t(entindex) < sizeof(g_PlayerExtraInfo)/sizeof(g_PlayerExtraInfo[0]) )
   29.22  		{
   29.23  			int iTeam = g_PlayerExtraInfo[entindex].teamnumber;
   29.24  
   29.25 @@ -258,13 +259,27 @@
   29.26  	return 0;
   29.27  }
   29.28  
   29.29 +int __MsgFunc_SpecFade(const char *pszName, int iSize, void *pbuf)
   29.30 +{
   29.31 +	if (gViewPort)
   29.32 +		return gViewPort->MsgFunc_SpecFade( pszName, iSize, pbuf );
   29.33 +	return 0;
   29.34 +}
   29.35 +
   29.36 +int __MsgFunc_ResetFade(const char *pszName, int iSize, void *pbuf)
   29.37 +{
   29.38 +	if (gViewPort)
   29.39 +		return gViewPort->MsgFunc_ResetFade( pszName, iSize, pbuf );
   29.40 +	return 0;
   29.41 +}
   29.42 +
   29.43  int __MsgFunc_AllowSpec(const char *pszName, int iSize, void *pbuf)
   29.44  {
   29.45  	if (gViewPort)
   29.46  		return gViewPort->MsgFunc_AllowSpec( pszName, iSize, pbuf );
   29.47  	return 0;
   29.48  }
   29.49 - 
   29.50 +
   29.51  // This is called every time the DLL is loaded
   29.52  void CHud :: Init( void )
   29.53  {
   29.54 @@ -297,6 +312,9 @@
   29.55  
   29.56  	HOOK_MESSAGE( Spectator );
   29.57  	HOOK_MESSAGE( AllowSpec );
   29.58 +	
   29.59 +	HOOK_MESSAGE( SpecFade );
   29.60 +	HOOK_MESSAGE( ResetFade );
   29.61  
   29.62  	// VGUI Menus
   29.63  	HOOK_MESSAGE( VGUIMenu );
   29.64 @@ -431,7 +449,7 @@
   29.65  			}
   29.66  
   29.67  			// allocated memory for sprite handle arrays
   29.68 - 			m_rghSprites = new HSPRITE[m_iSpriteCount];
   29.69 + 			m_rghSprites = new HLSPRITE[m_iSpriteCount];
   29.70  			m_rgrcRects = new wrect_t[m_iSpriteCount];
   29.71  			m_rgszSpriteNames = new char[m_iSpriteCount * MAX_SPRITE_NAME_LENGTH];
   29.72  
    30.1 --- a/multiplayer/cl_dll/hud.h	Fri Mar 15 01:26:54 2013 -0500
    30.2 +++ b/multiplayer/cl_dll/hud.h	Thu Sep 05 19:47:29 2013 -0500
    30.3 @@ -25,6 +25,10 @@
    30.4  #define RGB_REDISH 0x00FF1010 //255,160,0
    30.5  #define RGB_GREENISH 0x0000A000 //0,160,0
    30.6  
    30.7 +#ifndef _WIN32
    30.8 +#define _cdecl 
    30.9 +#endif
   30.10 +
   30.11  #include "wrect.h"
   30.12  #include "cl_dll.h"
   30.13  #include "ammo.h"
   30.14 @@ -40,12 +44,7 @@
   30.15  	int x, y;
   30.16  } POSITION;
   30.17  
   30.18 -enum 
   30.19 -{ 
   30.20 -	MAX_PLAYERS = 64,
   30.21 -	MAX_TEAMS = 64,
   30.22 -	MAX_TEAM_NAME = 16,
   30.23 -};
   30.24 +#include "global_consts.h"
   30.25  
   30.26  typedef struct {
   30.27  	unsigned char r,g,b,a;
   30.28 @@ -90,7 +89,7 @@
   30.29  //
   30.30  //-----------------------------------------------------
   30.31  //
   30.32 -#include "..\game_shared\voice_status.h"
   30.33 +#include "voice_status.h" // base voice handling class
   30.34  #include "hud_spectator.h"
   30.35  
   30.36  
   30.37 @@ -131,7 +130,6 @@
   30.38  
   30.39  private:
   30.40  	float m_fFade;
   30.41 -	RGBA  m_rgba;
   30.42  	WEAPON *m_pWeapon;
   30.43  	int	m_HUD_bucket0;
   30.44  	int m_HUD_selection;
   30.45 @@ -198,7 +196,7 @@
   30.46  	int MsgFunc_Train(const char *pszName, int iSize, void *pbuf);
   30.47  
   30.48  private:
   30.49 -	HSPRITE m_hSprite;
   30.50 +	HLSPRITE m_hSprite;
   30.51  	int m_iPos;
   30.52  
   30.53  };
   30.54 @@ -206,30 +204,6 @@
   30.55  //
   30.56  //-----------------------------------------------------
   30.57  //
   30.58 -// REMOVED: Vgui has replaced this.
   30.59 -//
   30.60 -/*
   30.61 -class CHudMOTD : public CHudBase
   30.62 -{
   30.63 -public:
   30.64 -	int Init( void );
   30.65 -	int VidInit( void );
   30.66 -	int Draw( float flTime );
   30.67 -	void Reset( void );
   30.68 -
   30.69 -	int MsgFunc_MOTD( const char *pszName, int iSize, void *pbuf );
   30.70 -
   30.71 -protected:
   30.72 -	static int MOTD_DISPLAY_TIME;
   30.73 -	char m_szMOTD[ MAX_MOTD_LENGTH ];
   30.74 -	float m_flActiveRemaining;
   30.75 -	int m_iLines;
   30.76 -};
   30.77 -*/
   30.78 -
   30.79 -//
   30.80 -//-----------------------------------------------------
   30.81 -//
   30.82  class CHudStatusBar : public CHudBase
   30.83  {
   30.84  public:
   30.85 @@ -246,7 +220,7 @@
   30.86  	enum { 
   30.87  		MAX_STATUSTEXT_LENGTH = 128,
   30.88  		MAX_STATUSBAR_VALUES = 8,
   30.89 -		MAX_STATUSBAR_LINES = 2,
   30.90 +		MAX_STATUSBAR_LINES = 3,
   30.91  	};
   30.92  
   30.93  	char m_szStatusText[MAX_STATUSBAR_LINES][MAX_STATUSTEXT_LENGTH];  // a text string describing how the status bar is to be drawn
   30.94 @@ -259,46 +233,13 @@
   30.95  	float *m_pflNameColors[MAX_STATUSBAR_LINES];
   30.96  };
   30.97  
   30.98 -//
   30.99 -//-----------------------------------------------------
  30.100 -//
  30.101 -// REMOVED: Vgui has replaced this.
  30.102 -//
  30.103 -/*
  30.104 -class CHudScoreboard: public CHudBase
  30.105 -{
  30.106 -public:
  30.107 -	int Init( void );
  30.108 -	void InitHUDData( void );
  30.109 -	int VidInit( void );
  30.110 -	int Draw( float flTime );
  30.111 -	int DrawPlayers( int xoffset, float listslot, int nameoffset = 0, char *team = NULL ); // returns the ypos where it finishes drawing
  30.112 -	void UserCmd_ShowScores( void );
  30.113 -	void UserCmd_HideScores( void );
  30.114 -	int MsgFunc_ScoreInfo( const char *pszName, int iSize, void *pbuf );
  30.115 -	int MsgFunc_TeamInfo( const char *pszName, int iSize, void *pbuf );
  30.116 -	int MsgFunc_TeamScore( const char *pszName, int iSize, void *pbuf );
  30.117 -	void DeathMsg( int killer, int victim );
  30.118 -
  30.119 -	int m_iNumTeams;
  30.120 -
  30.121 -	int m_iLastKilledBy;
  30.122 -	int m_fLastKillTime;
  30.123 -	int m_iPlayerNum;
  30.124 -	int m_iShowscoresHeld;
  30.125 -
  30.126 -	void GetAllPlayersInfo( void );
  30.127 -private:
  30.128 -	struct cvar_s *cl_showpacketloss;
  30.129 -
  30.130 -};
  30.131 -*/
  30.132 -
  30.133  struct extra_player_info_t 
  30.134  {
  30.135  	short frags;
  30.136  	short deaths;
  30.137  	short playerclass;
  30.138 +	short health; // UNUSED currently, spectator UI would like this
  30.139 +	bool dead; // UNUSED currently, spectator UI would like this
  30.140  	short teamnumber;
  30.141  	char teamname[MAX_TEAM_NAME];
  30.142  };
  30.143 @@ -317,11 +258,7 @@
  30.144  	int teamnumber;
  30.145  };
  30.146  
  30.147 -extern hud_player_info_t	g_PlayerInfoList[MAX_PLAYERS+1];	   // player info from the engine
  30.148 -extern extra_player_info_t  g_PlayerExtraInfo[MAX_PLAYERS+1];   // additional player info sent directly to the client dll
  30.149 -extern team_info_t			g_TeamInfo[MAX_TEAMS+1];
  30.150 -extern int					g_IsSpectator[MAX_PLAYERS+1];
  30.151 -
  30.152 +#include "player_info.h"
  30.153  
  30.154  //
  30.155  //-----------------------------------------------------
  30.156 @@ -393,8 +330,8 @@
  30.157  	int MsgFunc_Battery(const char *pszName,  int iSize, void *pbuf );
  30.158  	
  30.159  private:
  30.160 -	HSPRITE m_hSprite1;
  30.161 -	HSPRITE m_hSprite2;
  30.162 +	HLSPRITE m_hSprite1;
  30.163 +	HLSPRITE m_hSprite2;
  30.164  	wrect_t *m_prc1;
  30.165  	wrect_t *m_prc2;
  30.166  	int	  m_iBat;	
  30.167 @@ -417,9 +354,9 @@
  30.168  	int MsgFunc_FlashBat(const char *pszName,  int iSize, void *pbuf );
  30.169  	
  30.170  private:
  30.171 -	HSPRITE m_hSprite1;
  30.172 -	HSPRITE m_hSprite2;
  30.173 -	HSPRITE m_hBeam;
  30.174 +	HLSPRITE m_hSprite1;
  30.175 +	HLSPRITE m_hSprite2;
  30.176 +	HLSPRITE m_hBeam;
  30.177  	wrect_t *m_prc1;
  30.178  	wrect_t *m_prc2;
  30.179  	wrect_t *m_prcBeam;
  30.180 @@ -461,7 +398,7 @@
  30.181  	int Init( void );
  30.182  	static char *LocaliseTextString( const char *msg, char *dst_buffer, int buffer_size );
  30.183  	static char *BufferedLocaliseTextString( const char *msg );
  30.184 -	char *LookupString( const char *msg_name, int *msg_dest = NULL );
  30.185 +	const char *LookupString( const char *msg_name, int *msg_dest = NULL );
  30.186  	int MsgFunc_TextMsg(const char *pszName, int iSize, void *pbuf);
  30.187  };
  30.188  
  30.189 @@ -476,6 +413,7 @@
  30.190  	int VidInit( void );
  30.191  	int Draw(float flTime);
  30.192  	int MsgFunc_HudText(const char *pszName, int iSize, void *pbuf);
  30.193 +	int MsgFunc_HudTextPro(const char *pszName, int iSize, void *pbuf);
  30.194  	int MsgFunc_GameTitle(const char *pszName, int iSize, void *pbuf);
  30.195  
  30.196  	float FadeBlend( float fadein, float fadeout, float hold, float localTime );
  30.197 @@ -522,15 +460,15 @@
  30.198  	
  30.199  	//had to make these public so CHud could access them (to enable concussion icon)
  30.200  	//could use a friend declaration instead...
  30.201 -	void EnableIcon( char *pszIconName, unsigned char red, unsigned char green, unsigned char blue );
  30.202 -	void DisableIcon( char *pszIconName );
  30.203 +	void EnableIcon( const char *pszIconName, unsigned char red, unsigned char green, unsigned char blue );
  30.204 +	void DisableIcon( const char *pszIconName );
  30.205  
  30.206  private:
  30.207  
  30.208  	typedef struct
  30.209  	{
  30.210  		char szSpriteName[MAX_ICONSPRITENAME_LENGTH];
  30.211 -		HSPRITE spr;
  30.212 +		HLSPRITE spr;
  30.213  		wrect_t rc;
  30.214  		unsigned char r, g, b;
  30.215  	} icon_sprite_t;
  30.216 @@ -542,14 +480,67 @@
  30.217  //
  30.218  //-----------------------------------------------------
  30.219  //
  30.220 +class CHudBenchmark : public CHudBase
  30.221 +{
  30.222 +public:
  30.223 +	int Init( void );
  30.224 +	int VidInit( void );
  30.225 +	int Draw( float flTime );
  30.226  
  30.227 +	void SetScore( float score );
  30.228 +
  30.229 +	void Think( void );
  30.230 +
  30.231 +	void StartNextSection( int section );
  30.232 +
  30.233 +	int MsgFunc_Bench(const char *pszName, int iSize, void *pbuf);
  30.234 +
  30.235 +	void CountFrame( float dt );
  30.236 +
  30.237 +	int GetObjects( void ) { return m_nObjects; };
  30.238 +
  30.239 +	void SetCompositeScore( void );
  30.240 +
  30.241 +	void Restart( void );
  30.242 +
  30.243 +	int Bench_ScoreForValue( int stage, float raw );
  30.244 +
  30.245 +private:
  30.246 +	float	m_fDrawTime;
  30.247 +	float	m_fDrawScore;
  30.248 +	float	m_fAvgScore;
  30.249 +
  30.250 +	float   m_fSendTime;
  30.251 +	float	m_fReceiveTime;
  30.252 +
  30.253 +	int		m_nFPSCount;
  30.254 +	float	m_fAverageFT;
  30.255 +	float	m_fAvgFrameRate;
  30.256 +
  30.257 +	int		m_nSentFinish;
  30.258 +	float	m_fStageStarted;
  30.259 +
  30.260 +	float	m_StoredLatency;
  30.261 +	float	m_StoredPacketLoss;
  30.262 +	int		m_nStoredHopCount;
  30.263 +	int		m_nTraceDone;
  30.264 +
  30.265 +	int		m_nObjects;
  30.266 +
  30.267 +	int		m_nScoreComputed;
  30.268 +	int 	m_nCompositeScore;
  30.269 +};
  30.270 +
  30.271 +//
  30.272 +//-----------------------------------------------------
  30.273 +//
  30.274  
  30.275  
  30.276  class CHud
  30.277  {
  30.278  private:
  30.279  	HUDLIST						*m_pHudList;
  30.280 -	HSPRITE						m_hsprLogo;
  30.281 +	HLSPRITE					m_hsprLogo;
  30.282  	int							m_iLogo;
  30.283  	client_sprite_t				*m_pSpriteList;
  30.284  	int							m_iSpriteCount;
  30.285 @@ -559,7 +550,7 @@
  30.286  
  30.287  public:
  30.288  
  30.289 -	HSPRITE						m_hsprCursor;
  30.290 +	HLSPRITE					m_hsprCursor;
  30.291  	float m_flTime;	   // the current client time
  30.292  	float m_fOldTime;  // the time at which the HUD was last redrawn
  30.293  	double m_flTimeDelta; // the difference between flTime and fOldTime
  30.294 @@ -575,21 +566,21 @@
  30.295  
  30.296  	int m_iFontHeight;
  30.297  	int DrawHudNumber(int x, int y, int iFlags, int iNumber, int r, int g, int b );
  30.298 -	int DrawHudString(int x, int y, int iMaxX, char *szString, int r, int g, int b );
  30.299 -	int DrawHudStringReverse( int xpos, int ypos, int iMinX, char *szString, int r, int g, int b );
  30.300 +	int DrawHudString(int x, int y, int iMaxX, const char *szString, int r, int g, int b );
  30.301 +	int DrawHudStringReverse( int xpos, int ypos, int iMinX, const char *szString, int r, int g, int b );
  30.302  	int DrawHudNumberString( int xpos, int ypos, int iMinX, int iNumber, int r, int g, int b );
  30.303  	int GetNumWidth(int iNumber, int iFlags);
  30.304  
  30.305  private:
  30.306  	// the memory for these arrays are allocated in the first call to CHud::VidInit(), when the hud.txt and associated sprites are loaded.
  30.307  	// freed in ~CHud()
  30.308 -	HSPRITE *m_rghSprites;	/*[HUD_SPRITE_COUNT]*/			// the sprites loaded from hud.txt
  30.309 +	HLSPRITE *m_rghSprites;	/*[HUD_SPRITE_COUNT]*/			// the sprites loaded from hud.txt
  30.310  	wrect_t *m_rgrcRects;	/*[HUD_SPRITE_COUNT]*/
  30.311  	char *m_rgszSpriteNames; /*[HUD_SPRITE_COUNT][MAX_SPRITE_NAME_LENGTH]*/
  30.312  
  30.313  	struct cvar_s *default_fov;
  30.314  public:
  30.315 -	HSPRITE GetSprite( int index ) 
  30.316 +	HLSPRITE GetSprite( int index ) 
  30.317  	{
  30.318  		return (index < 0) ? 0 : m_rghSprites[index];
  30.319  	}
  30.320 @@ -617,6 +608,7 @@
  30.321  	CHudAmmoSecondary	m_AmmoSecondary;
  30.322  	CHudTextMessage m_TextMessage;
  30.323  	CHudStatusIcons m_StatusIcons;
  30.324 +	CHudBenchmark	m_Benchmark;
  30.325  
  30.326  	void Init( void );
  30.327  	void VidInit( void );
  30.328 @@ -624,7 +616,7 @@
  30.329  	int Redraw( float flTime, int intermission );
  30.330  	int UpdateClientData( client_data_t *cdata, float time );
  30.331  
  30.332 -	CHud() : m_iSpriteCount(0), m_pHudList(NULL) {}  
  30.333 +	CHud() : m_pHudList(NULL), m_iSpriteCount(0) {}  
  30.334  	~CHud();			// destructor, frees allocated memory
  30.335  
  30.336  	// user messages
  30.337 @@ -654,10 +646,7 @@
  30.338  
  30.339  };
  30.340  
  30.341 -class TeamFortressViewport;
  30.342 -
  30.343  extern CHud gHUD;
  30.344 -extern TeamFortressViewport *gViewPort;
  30.345  
  30.346  extern int g_iPlayerClass;
  30.347  extern int g_iTeamNumber;
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/multiplayer/cl_dll/hud_bench.cpp	Thu Sep 05 19:47:29 2013 -0500
    31.3 @@ -0,0 +1,1129 @@
    31.4 +//
    31.5 +//-----------------------------------------------------
    31.6 +//
    31.7 +#define BENCH_TIME 10.0
    31.8 +
    31.9 +#include "hud.h"
   31.10 +#include "cl_util.h"
   31.11 +
   31.12 +#include "const.h"
   31.13 +#include "entity_state.h"
   31.14 +#include "cl_entity.h"
   31.15 +#include "usercmd.h"
   31.16 +#include "pm_defs.h"
   31.17 +#include "event_api.h"
   31.18 +
   31.19 +#include "bench.h"
   31.20 +
   31.21 +#include <string.h>
   31.22 +#include <stdio.h>
   31.23 +#include "parsemsg.h"
   31.24 +
   31.25 +#include "con_nprint.h"
   31.26 +
   31.27 +#include "netadr.h"
   31.28 +#include "hud_benchtrace.h"
   31.29 +
   31.30 +#include "net_api.h"
   31.31 +
   31.32 +#include "entity_types.h"
   31.33 +
   31.34 +#ifndef M_PI
   31.35 +#define M_PI		3.14159265358979323846	// matches value in gcc v2 math.h
   31.36 +#endif
   31.37 +
   31.38 +#define NUM_BENCH_OBJ 12
   31.39 +#define BENCH_CYCLE_TIME 10.0
   31.40 +#define BENCH_INNER_CYCLE_TIME 4.0
   31.41 +#define BENCH_VIEW_CYCLE_TIME 7.1
   31.42 +#define BENCH_SWEEP 360.0
   31.43 +#define BENCH_RADIUS 80.0
   31.44 +#define BENCH_VIEW_OFFSET 250.0
   31.45 +#define BLEND_IN_SPEED 150.0
   31.46 +#define BENCH_BALLHEIGHT 72.0
   31.47 +#define BENCH_BALL_VIEWDRIFT 60.0;
   31.48 +#define BENCH_RANGE 60.0
   31.49 +// Scale:
   31.50 +// 0 - 100
   31.51 +// 0 is worst
   31.52 +// 100 is best
   31.53 +//  PP has 40 - 100 range
   31.54 +//  Non-pp has 0 - 60 range
   31.55 +const float weights[3] = { 0.2, 0.3, 0.5 };
   31.56 +
   31.57 +const char *g_title = "PowerPlay QoS Test"; //uality of Service Test";
   31.58 +const char *pp_strings[2] =
   31.59 +{
   31.60 +	"  PowerPlay Detected",
   31.61 +	"  PowerPlay Not Detected" ,
   31.62 +};
   31.63 +const char *g_stage1[2] =
   31.64 +{
   31.65 +	"  Stage 1:  Testing System Connectivity...",
   31.66 +	"  Stage 1:  %i",
   31.67 +};
   31.68 +const char *g_stage2[2] =
   31.69 +{
   31.70 +	"  Stage 2:  Testing System Performance...",
   31.71 +	"  Stage 2:  %i",
   31.72 +};
   31.73 +const char *g_stage3[2] =
   31.74 +{
   31.75 +	"  Stage 3:  Testing Tracking Accuracy...",
   31.76 +	"  Stage 3:  %i",
   31.77 +};
   31.78 +const char *g_stage4 = "  Composite Score:  %i";
   31.79 +
   31.80 +extern vec3_t v_origin;
   31.81 +
   31.82 +static int g_isPowerPlay = 0;
   31.83 +static int g_currentstage = 0;
   31.84 +static int g_renderedBenchmarkDot = 0;
   31.85 +static float g_benchSwitchTime = 0.0;
   31.86 +static float g_benchSwitchTimes[ LAST_STAGE + 1 ] = { 0.0, 10.0, 12.0, 10.0, 5.0 };
   31.87 +
   31.88 +#define SCORE_TIME_UP 1.5
   31.89 +
   31.90 +DECLARE_MESSAGE(m_Benchmark, Bench);
   31.91 +
   31.92 +void VectorAngles( const float *forward, float *angles );
   31.93 +
   31.94 +void Bench_SetStage( int stage )
   31.95 +{
   31.96 +	g_currentstage = stage;
   31.97 +}
   31.98 +
   31.99 +int Bench_GetStage( void )
  31.100 +{
  31.101 +	return g_currentstage;
  31.102 +}
  31.103 +
  31.104 +float Bench_GetSwitchTime( void )
  31.105 +{
  31.106 +	return g_benchSwitchTimes[ min( Bench_GetStage(), LAST_STAGE ) ];
  31.107 +}
  31.108 +
  31.109 +int Bench_InStage( int stage )
  31.110 +{
  31.111 +	return ( Bench_GetStage() == stage ) ? 1 : 0;
  31.112 +}
  31.113 +
  31.114 +void Bench_SetPowerPlay( int set )
  31.115 +{
  31.116 +	g_isPowerPlay = set ? 1 : 0;
  31.117 +}
  31.118 +
  31.119 +int Bench_GetPowerPlay( void )
  31.120 +{
  31.121 +	return g_isPowerPlay;
  31.122 +}
  31.123 +
  31.124 +int Bench_Active( void )
  31.125 +{
  31.126 +	return g_currentstage != 0 ? 1 : 0;
  31.127 +}
  31.128 +
  31.129 +void __CmdFunc_BenchMark( void )
  31.130 +{
  31.131 +	gHUD.m_Benchmark.Restart();
  31.132 +}
  31.133 +
  31.134 +
  31.135 +void CHudBenchmark::Restart( void )
  31.136 +{
  31.137 +	Bench_SetStage( FIRST_STAGE );
  31.138 +	g_benchSwitchTime = gHUD.m_flTime + g_benchSwitchTimes[ FIRST_STAGE ];
  31.139 +	StartNextSection( FIRST_STAGE );
  31.140 +
  31.141 +	gHUD.m_Benchmark.m_iFlags |= HUD_ACTIVE;
  31.142 +	gHUD.m_Benchmark.m_fDrawTime = gHUD.m_flTime + BENCH_TIME;
  31.143 +}
  31.144 +
  31.145 +int CHudBenchmark::MsgFunc_Bench(const char *pszName, int iSize, void *pbuf)
  31.146 +{
  31.147 +	READ_BYTE();
  31.148 +
  31.149 +	m_fReceiveTime = gHUD.m_flTime;
  31.150 +	m_StoredLatency = ( m_fReceiveTime - m_fSendTime );
  31.151 +
  31.152 +	m_StoredLatency = min( 1.0, m_StoredLatency );
  31.153 +	m_StoredLatency = max( 0.0, m_StoredLatency );
  31.154 +
  31.155 +	m_StoredPacketLoss = 0.0;
  31.156 +
  31.157 +	{
  31.158 +		char sz[ 256 ];
  31.159 +		netadr_t adr;
  31.160 +		net_status_t status;
  31.161 +
  31.162 +		gEngfuncs.pNetAPI->Status( &status );
  31.163 +
  31.164 +		if ( status.connected )
  31.165 +		{
  31.166 +			adr = status.remote_address;
  31.167 +
  31.168 +			sprintf( sz, "%i.%i.%i.%i",
  31.169 +				adr.ip[ 0 ], adr.ip[ 1 ], adr.ip[ 2 ], adr.ip[ 3 ] );
  31.170 +
  31.171 +			if ( adr.type == NA_IP )
  31.172 +			{
  31.173 +				Trace_StartTrace( &m_nStoredHopCount, &m_nTraceDone, (const char *)sz );
  31.174 +			}
  31.175 +			else
  31.176 +			{
  31.177 +				m_nStoredHopCount = 0;
  31.178 +			}
  31.179 +		}
  31.180 +	}
  31.181 +
  31.182 +	return 1;
  31.183 +}
  31.184 +
  31.185 +void CHudBenchmark::StartNextSection( int section )
  31.186 +{
  31.187 +	net_status_t status;
  31.188 +
  31.189 +	switch ( section )
  31.190 +	{
  31.191 +	case 1:
  31.192 +		// Stage 2 requires that we tell the server to "drop" an item
  31.193 +		m_fSendTime = gHUD.m_flTime;
  31.194 +		m_fReceiveTime = 0.0;
  31.195 +		m_StoredLatency = 0.0;
  31.196 +		m_StoredPacketLoss = 0.0;
  31.197 +		m_nStoredHopCount = 0;
  31.198 +		m_nTraceDone = 0;
  31.199 +		ServerCmd( "ppdemo 1 start\n" );
  31.200 +		break;
  31.201 +	case 2:
  31.202 +		if ( m_nTraceDone )
  31.203 +		{
  31.204 +			gEngfuncs.pNetAPI->Status( &status );
  31.205 +
  31.206 +			gEngfuncs.Con_Printf( "Hops == %i\n", m_nStoredHopCount );
  31.207 +			m_StoredPacketLoss = status.packet_loss;
  31.208 +			gEngfuncs.Con_Printf( "PL == %i\n", (int)m_StoredPacketLoss );
  31.209 +
  31.210 +		}
  31.211 +		m_nSentFinish = 0;	// added by minman
  31.212 +		ServerCmd( "ppdemo 2\n" );
  31.213 +		break;
  31.214 +	case 3:
  31.215 +		m_nSentFinish = 0;	// added by minman
  31.216 +		ServerCmd( "ppdemo 3\n" );
  31.217 +		break;
  31.218 +	default:
  31.219 +		break;
  31.220 +	}
  31.221 +
  31.222 +	m_fStageStarted = gHUD.m_flTime;
  31.223 +	g_benchSwitchTime = gHUD.m_flTime + Bench_GetSwitchTime();
  31.224 +}
  31.225 +
  31.226 +void CHudBenchmark::CountFrame( float dt )
  31.227 +{
  31.228 +	m_nFPSCount++;
  31.229 +	m_fAverageFT += dt;
  31.230 +}
  31.231 +
  31.232 +
  31.233 +static int started = 0;
  31.234 +
  31.235 +void Bench_CheckStart( void )
  31.236 +{
  31.237 +	const char *level;
  31.238 +	if ( !started && !Bench_Active() )
  31.239 +	{
  31.240 +		level = gEngfuncs.pfnGetLevelName();
  31.241 +		if ( level && level[0] && !stricmp( level, "maps/ppdemo.bsp" ) )
  31.242 +		{
  31.243 +			started = 1;
  31.244 +			EngineClientCmd( "ppdemostart\n" );
  31.245 +		}
  31.246 +	}
  31.247 +}
  31.248 +
  31.249 +void CHudBenchmark::Think( void )
  31.250 +{
  31.251 +	if ( !Bench_Active() )
  31.252 +		return;
  31.253 +
  31.254 +	Trace_Think();
  31.255 +
  31.256 +	if ( started )
  31.257 +	{
  31.258 +		started = 0;
  31.259 +
  31.260 +		// Clear variable
  31.261 +		m_fReceiveTime = 0.0;
  31.262 +		m_nFPSCount = 0;
  31.263 +		m_fAverageFT = 0.0;
  31.264 +		m_nSentFinish = 0;
  31.265 +		m_StoredLatency = 0.0;
  31.266 +		m_StoredPacketLoss = 0.0;
  31.267 +		m_nStoredHopCount = 0;
  31.268 +		m_nTraceDone = 0;
  31.269 +		m_nObjects = 0;
  31.270 +		m_nScoreComputed = 0;
  31.271 +		m_nCompositeScore = 0;
  31.272 +		m_fAvgScore = 0;
  31.273 +		m_fDrawScore = 0.0;
  31.274 +		m_fAvgFrameRate = 0.0;
  31.275 +	}
  31.276 +
  31.277 +	if ( gHUD.m_flTime > g_benchSwitchTime )
  31.278 +	{
  31.279 +		Bench_SetStage( Bench_GetStage() + 1 );
  31.280 +		StartNextSection( Bench_GetStage() );
  31.281 +	}
  31.282 +
  31.283 +	if ( Bench_InStage( FIRST_STAGE ) )
  31.284 +	{
  31.285 +		// Assume 1000 ms lag is the max and that would take all but 2 seconds of this interval to traverse
  31.286 +		if ( m_fReceiveTime )
  31.287 +		{
  31.288 +			float latency = 2.0 * m_StoredLatency;
  31.289 +			float switch_time;
  31.290 +			float total_time;
  31.291 +			
  31.292 +			latency = max( 0.0, latency );
  31.293 +			latency = min( 1.0, latency );
  31.294 +
  31.295 +			total_time = Bench_GetSwitchTime();
  31.296 +			total_time -= 2.0;
  31.297 +
  31.298 +			switch_time = m_fStageStarted + latency * total_time;
  31.299 +			switch_time += 1.0;
  31.300 +
  31.301 +			if ( gHUD.m_flTime >= switch_time )
  31.302 +			{
  31.303 +				if ( !m_nSentFinish )
  31.304 +				{
  31.305 +					g_benchSwitchTime = gHUD.m_flTime + 1.0 + SCORE_TIME_UP;
  31.306 +
  31.307 +					ServerCmd( "ppdemo 1 finish\n" );
  31.308 +					m_nSentFinish = 1;
  31.309 +				}
  31.310 +			}
  31.311 +			else
  31.312 +			{
  31.313 +				g_benchSwitchTime = gHUD.m_flTime + 10.0;
  31.314 +			}
  31.315 +		}
  31.316 +	}
  31.317 +
  31.318 +	if ( Bench_InStage( SECOND_STAGE ) )
  31.319 +	{
  31.320 +		// frametime
  31.321 +		static float lasttime;
  31.322 +		float elapsed;
  31.323 +		float total;
  31.324 +		float frac;
  31.325 +		float switch_time;	// added by minman
  31.326 +
  31.327 +		if ( lasttime )
  31.328 +		{
  31.329 +			float dt;
  31.330 +
  31.331 +			dt = gHUD.m_flTime - lasttime;
  31.332 +			if ( dt > 0 )
  31.333 +			{
  31.334 +				CountFrame( dt );
  31.335 +			}
  31.336 +		}
  31.337 +		lasttime = gHUD.m_flTime;
  31.338 +
  31.339 +		elapsed = gHUD.m_flTime - m_fStageStarted;
  31.340 +		total = Bench_GetSwitchTime();
  31.341 +		if ( total )
  31.342 +		{
  31.343 +			frac = elapsed / total;
  31.344 +
  31.345 +			// Only takes 1/2 time to get up to maximum speed
  31.346 +			frac *= 2.0;
  31.347 +			frac = max( 0.0, frac );
  31.348 +			frac = min( 1.0, frac );
  31.349 +
  31.350 +			m_nObjects = (int)(NUM_BENCH_OBJ * frac);
  31.351 +		}
  31.352 +		switch_time = m_fStageStarted + total;
  31.353 +
  31.354 +		/* BELOW ADDED BY minman */
  31.355 +		if (gHUD.m_flTime >= switch_time)
  31.356 +		{
  31.357 +			if ( !m_nSentFinish)
  31.358 +			{
  31.359 +				g_benchSwitchTime = gHUD.m_flTime + SCORE_TIME_UP;
  31.360 +				m_nSentFinish = 1;
  31.361 +			}
  31.362 +		}
  31.363 +		else
  31.364 +			g_benchSwitchTime = gHUD.m_flTime + 10.0;
  31.365 +	}
  31.366 +
  31.367 +	/* BELOW ADDED BY minman */
  31.368 +	if ( Bench_InStage (THIRD_STAGE))
  31.369 +	{
  31.370 +		float switch_time = m_fStageStarted + Bench_GetSwitchTime();
  31.371 +
  31.372 +		if (gHUD.m_flTime >= switch_time)
  31.373 +		{
  31.374 +			if ( !m_nSentFinish)
  31.375 +			{
  31.376 +				g_benchSwitchTime = gHUD.m_flTime + SCORE_TIME_UP;
  31.377 +				m_nSentFinish = 1;
  31.378 +			}
  31.379 +		}
  31.380 +		else
  31.381 +			g_benchSwitchTime = gHUD.m_flTime + 10.0;
  31.382 +	}
  31.383 +
  31.384 +	if ( Bench_InStage( FOURTH_STAGE ) )
  31.385 +	{
  31.386 +		if ( !m_nScoreComputed )
  31.387 +		{
  31.388 +			m_nScoreComputed = 1;
  31.389 +			gHUD.m_Benchmark.SetCompositeScore();
  31.390 +		}
  31.391 +	}
  31.392 +
  31.393 +	if ( Bench_GetStage() > LAST_STAGE )
  31.394 +	{
  31.395 +		m_iFlags &= ~HUD_ACTIVE;
  31.396 +		EngineClientCmd( "quit\n" );
  31.397 +	}
  31.398 +}
  31.399 +
  31.400 +
  31.401 +int CHudBenchmark::Init( void )
  31.402 +{
  31.403 +	gHUD.AddHudElem( this );
  31.404 +
  31.405 +	HOOK_COMMAND( "ppdemostart", BenchMark );
  31.406 +
  31.407 +	HOOK_MESSAGE(Bench);
  31.408 +
  31.409 +	return 1;
  31.410 +}
  31.411 +
  31.412 +int CHudBenchmark::VidInit( void )
  31.413 +{
  31.414 +	return 1;
  31.415 +}
  31.416 +
  31.417 +int CHudBenchmark::Bench_ScoreForValue( int stage, float raw )
  31.418 +{
  31.419 +	int	score = 100.0;
  31.420 +	int power_play = Bench_GetPowerPlay() ? 1 : 0;
  31.421 +	
  31.422 +	switch ( stage )
  31.423 +	{
  31.424 +	case 1:  // ping
  31.425 +		score = 100.0 * ( m_StoredLatency );
  31.426 +		score = max( score, 0 );
  31.427 +		score = min( score, 100 );
  31.428 +
  31.429 +		// score is inverted
  31.430 +		score = 100 - score;
  31.431 +
  31.432 +		break;
  31.433 +	case 2:  // framerate/performance
  31.434 +		score = (int)( 100 * m_fAvgFrameRate ) / 72;
  31.435 +		score = min( score, 100 );
  31.436 +		score = max( score, 0 );
  31.437 +
  31.438 +		score *= BENCH_RANGE/100.0;
  31.439 +		if ( power_play )
  31.440 +		{
  31.441 +			score += ( 100 - BENCH_RANGE );
  31.442 +		}
  31.443 +		break;
  31.444 +	case 3:  // tracking
  31.445 +		score = (100 * m_fAvgScore) / 40;
  31.446 +		score = max( score, 0 );
  31.447 +		score = min( score, 100 );
  31.448 +
  31.449 +		// score is inverted
  31.450 +		score = 100 - score;
  31.451 +
  31.452 +		score *= BENCH_RANGE/100.0;
  31.453 +		if ( power_play )
  31.454 +		{
  31.455 +			score += ( 100 - BENCH_RANGE );
  31.456 +		}
  31.457 +		break;
  31.458 +	}
  31.459 +
  31.460 +	return score;
  31.461 +}
  31.462 +
  31.463 +void CHudBenchmark::SetCompositeScore( void )
  31.464 +{
  31.465 +	int	tracking_score	= Bench_ScoreForValue( THIRD_STAGE, m_fAvgScore );
  31.466 +	int ping_score		= Bench_ScoreForValue( FIRST_STAGE, m_StoredLatency );
  31.467 +	int frame_score		= Bench_ScoreForValue( SECOND_STAGE, m_fAvgFrameRate );
  31.468 +
  31.469 +	int composite = ( ping_score * weights[ 0 ] + frame_score * weights[ 1 ] + tracking_score * weights[ 2 ] );
  31.470 +	
  31.471 +	composite = min( 100, composite );
  31.472 +	composite = max( 0, composite );
  31.473 +
  31.474 +	m_nCompositeScore = composite;
  31.475 +}
  31.476 +
  31.477 +int CHudBenchmark::Draw( float flTime )
  31.478 +{
  31.479 +	char sz[ 256 ];
  31.480 +	int x, y;
  31.481 +
  31.482 +	if ( m_fDrawTime < flTime || !Bench_Active() )
  31.483 +	{
  31.484 +		m_iFlags &= ~HUD_ACTIVE;
  31.485 +		return 1;
  31.486 +	}
  31.487 +
  31.488 +	x = 10;
  31.489 +	y = 25; //480 - 150;
  31.490 +
  31.491 +	sprintf( sz, "%s: %s", g_title , pp_strings[ Bench_GetPowerPlay() ? 0 : 1]);
  31.492 +
  31.493 +	gHUD.DrawHudString( x, y, 320, sz, 251, 237, 7);// , 200, 200); //255, 255, 255 );
  31.494 +
  31.495 +	y += 20;
  31.496 +	
  31.497 +//	sprintf( sz, pp_strings[ Bench_GetPowerPlay() ? 0 : 1 ] );
  31.498 +
  31.499 +//	gHUD.DrawHudString( x, y, 320, sz, 31, 200, 200 );
  31.500 +
  31.501 +//	y += 20;
  31.502 +
  31.503 +	
  31.504 +	if ( Bench_InStage( FIRST_STAGE) /*|| Bench_InStage( SECOND_STAGE ) || Bench_InStage( THIRD_STAGE )*/ || Bench_InStage( FOURTH_STAGE ) )
  31.505 +	{
  31.506 +		if ( m_fReceiveTime && m_nSentFinish )
  31.507 +		{
  31.508 +			sprintf( sz, g_stage1[1], Bench_ScoreForValue( FIRST_STAGE, m_StoredLatency ));
  31.509 +		}
  31.510 +		else
  31.511 +		{
  31.512 +			sprintf( sz, "%s", g_stage1[0] );
  31.513 +		}
  31.514 +		gHUD.DrawHudString( x, y, 320, sz, 255, 255, 255 );
  31.515 +
  31.516 +		y += 20;
  31.517 +
  31.518 +	}
  31.519 +
  31.520 +
  31.521 +	if ( Bench_InStage( SECOND_STAGE )/* || Bench_InStage( THIRD_STAGE )*/ || Bench_InStage( FOURTH_STAGE ) )
  31.522 +	{
  31.523 +		float avg = 0.0;
  31.524 +		
  31.525 +		if ( m_nFPSCount > 0 )
  31.526 +		{
  31.527 +			avg = m_fAverageFT / (float)m_nFPSCount;
  31.528 +			m_fAvgFrameRate = 1.0 / avg;
  31.529 +		}
  31.530 +
  31.531 +		if ( m_nSentFinish /* Bench_InStage( THIRD_STAGE ) */|| Bench_InStage( FOURTH_STAGE ) )
  31.532 +		{
  31.533 +			sprintf( sz, g_stage2[1], Bench_ScoreForValue( SECOND_STAGE, m_fAvgFrameRate ) );
  31.534 +		}
  31.535 +		else
  31.536 +		{
  31.537 +			sprintf( sz, "%s", g_stage2[0] );
  31.538 +		}
  31.539 +		gHUD.DrawHudString( x, y, 320, sz, 255, 255, 255 );
  31.540 +		y += 20;
  31.541 +	}
  31.542 +
  31.543 +
  31.544 +	if ( Bench_InStage( THIRD_STAGE ) || Bench_InStage( FOURTH_STAGE ) )
  31.545 +	{
  31.546 +		if ( m_nSentFinish || Bench_InStage( FOURTH_STAGE ) )
  31.547 +		{
  31.548 +			sprintf( sz, g_stage3[1], Bench_ScoreForValue( THIRD_STAGE, m_fAvgScore ) );
  31.549 +		}
  31.550 +		else
  31.551 +		{
  31.552 +			sprintf( sz, "%s", g_stage3[0] );
  31.553 +		}
  31.554 +
  31.555 +		gHUD.DrawHudString( x, y, 320, sz, 255, 255, 255 );
  31.556 +
  31.557 +		y += 20;
  31.558 +	}
  31.559 +
  31.560 +	if ( Bench_InStage( FOURTH_STAGE ) )
  31.561 +	{
  31.562 +		sprintf( sz, g_stage4, m_nCompositeScore );
  31.563 +		gHUD.DrawHudString( x, y, 320, sz, 31, 200, 200 );
  31.564 +	}
  31.565 +
  31.566 +	m_fDrawTime = gHUD.m_flTime + BENCH_TIME;
  31.567 +
  31.568 +	return 1;
  31.569 +}
  31.570 +
  31.571 +#define SCORE_AVG 0.9 
  31.572 +
  31.573 +void CHudBenchmark::SetScore( float score )
  31.574 +{
  31.575 +	// added by minman
  31.576 +	if (m_nSentFinish)
  31.577 +		return;
  31.578 +
  31.579 +	m_fDrawScore = score;
  31.580 +	m_fDrawTime = gHUD.m_flTime + BENCH_TIME;
  31.581 +
  31.582 +	m_fAvgScore = ( SCORE_AVG ) * m_fAvgScore + ( 1.0 - SCORE_AVG ) * m_fDrawScore;
  31.583 +}
  31.584 +
  31.585 +void Bench_SetDotAdded( int dot )
  31.586 +{
  31.587 +	g_renderedBenchmarkDot = dot;
  31.588 +}
  31.589 +
  31.590 +int Bench_GetDotAdded( void )
  31.591 +{
  31.592 +	return g_renderedBenchmarkDot;
  31.593 +}
  31.594 +
  31.595 +void Bench_SpotPosition( vec3_t dot, vec3_t target )
  31.596 +{
  31.597 +	// Compute new score
  31.598 +	vec3_t delta;
  31.599 +
  31.600 +	VectorSubtract( target, dot, delta );
  31.601 +
  31.602 +	gHUD.m_Benchmark.SetScore( delta.Length() );
  31.603 +}
  31.604 +
  31.605 +typedef struct model_s
  31.606 +{
  31.607 +	char		name[64];
  31.608 +	qboolean	needload;		// bmodels and sprites don't cache normally
  31.609 +
  31.610 +	int			type;
  31.611 +	int			numframes;
  31.612 +	int			synctype;
  31.613 +	
  31.614 +	int			flags;
  31.615 +
  31.616 +//
  31.617 +// volume occupied by the model
  31.618 +//		
  31.619 +	vec3_t		mins, maxs;
  31.620 +} model_t;
  31.621 +
  31.622 +static vec3_t g_dotorg;
  31.623 +vec3_t g_aimorg;
  31.624 +float g_fZAdjust = 0.0;
  31.625 +
  31.626 +void Bench_CheckEntity( int type, struct cl_entity_s *ent, const char *modelname )
  31.627 +{
  31.628 +	if ( Bench_InStage( THIRD_STAGE ) && !stricmp( modelname, "*3" ) )
  31.629 +	{
  31.630 +		model_t *pmod;
  31.631 +		vec3_t v;
  31.632 +		pmod = (model_t *)( ent->model );
  31.633 +
  31.634 +		VectorAdd( pmod->mins, pmod->maxs, v );
  31.635 +		VectorScale( v, 0.5, v );
  31.636 +
  31.637 +		VectorAdd( v, ent->origin, g_aimorg );
  31.638 +	}
  31.639 +
  31.640 +	if ( Bench_InStage( THIRD_STAGE ) && strstr( modelname, "ppdemodot" ) )
  31.641 +	{
  31.642 +		Bench_SetDotAdded( 1 );
  31.643 +		VectorCopy( ent->origin, g_dotorg );
  31.644 +
  31.645 +		// Adjust end position
  31.646 +		if ( Bench_Active() && Bench_InStage( THIRD_STAGE ) )
  31.647 +		{
  31.648 +			static float fZAdjust = 0.0;
  31.649 +			static float fLastTime;
  31.650 +			float dt;
  31.651 +			float fRate = Bench_GetPowerPlay() ? 4.0 : 8.0;
  31.652 +			float fBounds = Bench_GetPowerPlay() ? 8.0 : 15.0;
  31.653 +
  31.654 +			dt = gHUD.m_flTime - fLastTime;
  31.655 +			if ( dt > 0.0 && dt < 1.0 )
  31.656 +			{
  31.657 +				fZAdjust += gEngfuncs.pfnRandomFloat( -fRate, fRate );
  31.658 +				fZAdjust = min( fBounds, fZAdjust );
  31.659 +				fZAdjust = max( -fBounds, fZAdjust );
  31.660 +
  31.661 +				ent->origin[2] += fZAdjust;
  31.662 +
  31.663 +				g_fZAdjust = fZAdjust;
  31.664 +			}
  31.665 +			fLastTime = gHUD.m_flTime;
  31.666 +		}
  31.667 +	}
  31.668 +}
  31.669 +
  31.670 +
  31.671 +void NormalizeVector( vec3_t v )
  31.672 +{
  31.673 +	int i;
  31.674 +	for ( i = 0; i < 3; i++ )
  31.675 +	{
  31.676 +		while ( v[i] < -180.0 )
  31.677 +		{
  31.678 +			v[i] += 360.0;
  31.679 +		}
  31.680 +
  31.681 +		while ( v[i] > 180.0 )
  31.682 +		{
  31.683 +			v[i] -= 360.0;
  31.684 +		}
  31.685 +	}
  31.686 +}
  31.687 +
  31.688 +float g_flStartTime;
  31.689 +int HUD_SetupBenchObjects( cl_entity_t *bench, int plindex, vec3_t origin )
  31.690 +{
  31.691 +	int i, j;
  31.692 +	vec3_t ang;
  31.693 +	float offset;
  31.694 +	struct model_s *mdl;
  31.695 +	int index;
  31.696 +	vec3_t forward, right, up;
  31.697 +	vec3_t farpoint;
  31.698 +	vec3_t centerspot;
  31.699 +	pmtrace_t tr;
  31.700 +	
  31.701 +	ang = vec3_origin;
  31.702 +	//ang[1] = 90.0;
  31.703 +	
  31.704 +	// Determine forward vector
  31.705 +	AngleVectors ( ang, forward, right, up );
  31.706 +
  31.707 +	// Try to find the laserdot sprite model and retrieve the modelindex for it
  31.708 +	mdl = gEngfuncs.CL_LoadModel( "models/spikeball.mdl", &index );
  31.709 +	if ( !mdl )
  31.710 +		return 0;
  31.711 +
  31.712 +	gEngfuncs.pEventAPI->EV_SetUpPlayerPrediction( false, true );
  31.713 +
  31.714 +	// Store off the old count
  31.715 +	gEngfuncs.pEventAPI->EV_PushPMStates();
  31.716 +
  31.717 +	// Now add in all of the players.
  31.718 +	gEngfuncs.pEventAPI->EV_SetSolidPlayers ( plindex );	
  31.719 +
  31.720 +	gEngfuncs.pEventAPI->EV_SetTraceHull( 2 );
  31.721 +
  31.722 +	centerspot = origin;
  31.723 +	centerspot[2] -= 512;
  31.724 +
  31.725 +	gEngfuncs.pEventAPI->EV_PlayerTrace( (float *)&origin, (float *)&centerspot, PM_NORMAL, -1, &tr );
  31.726 +
  31.727 +	centerspot = tr.endpos;
  31.728 +	centerspot[2] += BENCH_BALLHEIGHT;
  31.729 +
  31.730 +	// Move center out from here
  31.731 +	centerspot = centerspot + BENCH_VIEW_OFFSET * forward;
  31.732 +	
  31.733 +	g_flStartTime = gHUD.m_flTime;
  31.734 +
  31.735 +	for ( i = 0; i < NUM_BENCH_OBJ; i++ )
  31.736 +	{
  31.737 +		offset = ( float ) i / (float) ( NUM_BENCH_OBJ - 1 );
  31.738 +
  31.739 +		ang[ 0 ] = 0;
  31.740 +		ang[ 2 ] = 0;
  31.741 +		ang[ 1 ] = BENCH_SWEEP * offset;
  31.742 +
  31.743 +		// normalize
  31.744 +		NormalizeVector( ang );
  31.745 +
  31.746 +		// Determine forward vector
  31.747 +		AngleVectors ( ang, forward, right, up );
  31.748 +
  31.749 +		bench[ i ].model = mdl;
  31.750 +
  31.751 +		bench[ i ].curstate.modelindex		= index;
  31.752 +
  31.753 +		// Set up dot info.
  31.754 +		bench[ i ].curstate.movetype		= MOVETYPE_NONE;
  31.755 +		bench[ i ].curstate.solid			= SOLID_NOT;
  31.756 +
  31.757 +		// Get a far point for ray trace
  31.758 +		farpoint = centerspot + BENCH_RADIUS * forward;
  31.759 +
  31.760 +		gEngfuncs.pEventAPI->EV_PlayerTrace( (float *)&centerspot, (float *)&farpoint, PM_NORMAL, -1, &tr );
  31.761 +
  31.762 +		// Move dot to trace endpoint
  31.763 +		bench[ i ].origin			= tr.endpos;
  31.764 +		bench[ i ].curstate.origin = bench[ i ].origin;
  31.765 +		//bench[ i ].curstate.gravity = 0.5;
  31.766 +		for ( j = 0; j < 2; j++ )
  31.767 +		{
  31.768 +		//	bench[ i ].curstate.velocity[ j ] = gEngfuncs.pfnRandomLong( -300, 300 );
  31.769 +		}
  31.770 +		//bench[ i ].curstate.velocity[ 2 ] = gEngfuncs.pfnRandomLong( 0, 50 );
  31.771 +		bench[ i ].curstate.velocity = vec3_origin;
  31.772 +
  31.773 +		bench[ i ].curstate.angles[ 2 ] = 0.0;
  31.774 +		bench[ i ].curstate.angles[ 0 ] = 0.0;
  31.775 +		bench[ i ].curstate.angles[ 1 ] = 0.0; // gEngfuncs.pfnRandomLong( -180, 180 );
  31.776 +
  31.777 +		for ( j = 0; j < 3; j++ )
  31.778 +		{
  31.779 +			// angular velocity
  31.780 +			bench[ i ].baseline.angles[ 0 ] = gEngfuncs.pfnRandomLong( -300, 300 );
  31.781 +			//bench[ i ].baseline.angles[ 0 ] = 0;
  31.782 +			bench[ i ].baseline.angles[ 2 ] = 0;
  31.783 +			bench[ i ].baseline.angles[ 1 ] = gEngfuncs.pfnRandomLong( -300, 300 );
  31.784 +		}
  31.785 +
  31.786 +		bench[ i ].curstate.renderamt = 0;
  31.787 +
  31.788 +		// Force no interpolation, etc., probably not necessary
  31.789 +		bench[ i ].prevstate		= bench[ i ].curstate;
  31.790 +	}
  31.791 +	
  31.792 +	gEngfuncs.pEventAPI->EV_PopPMStates();
  31.793 +
  31.794 +	return 1;
  31.795 +}
  31.796 +
  31.797 +void HUD_CreateBenchObjects( vec3_t origin )
  31.798 +{
  31.799 +	static cl_entity_t bench[ NUM_BENCH_OBJ ];
  31.800 +	cl_entity_t *player;
  31.801 +	vec3_t forward, right, up;
  31.802 +	vec3_t farpoint;
  31.803 +	vec3_t centerspot;
  31.804 +	static int first = true;
  31.805 +	static int failed = false;
  31.806 +	static float last_time;
  31.807 +	float frametime;
  31.808 +	float frac;
  31.809 +	float frac2;
  31.810 +	float dt;
  31.811 +
  31.812 +	pmtrace_t tr;
  31.813 +	int i = 0;
  31.814 +
  31.815 +	if ( gHUD.m_flTime == last_time )
  31.816 +		return;
  31.817 +
  31.818 +	frametime = gHUD.m_flTime - last_time;
  31.819 +	last_time = gHUD.m_flTime;
  31.820 +
  31.821 +	if ( frametime <= 0.0 )
  31.822 +		return;
  31.823 +
  31.824 +	if ( failed )
  31.825 +		return;
  31.826 +
  31.827 +	player = gEngfuncs.GetLocalPlayer();
  31.828 +	if ( !player )
  31.829 +	{
  31.830 +		failed = true;
  31.831 +		return;
  31.832 +	}
  31.833 +
  31.834 +	if ( first )
  31.835 +	{
  31.836 +		first = false;
  31.837 +		
  31.838 +		if ( !HUD_SetupBenchObjects( bench, player->index - 1, origin ) )
  31.839 +		{
  31.840 +			failed = true;
  31.841 +			return;
  31.842 +		}
  31.843 +	}
  31.844 +
  31.845 +	gEngfuncs.pEventAPI->EV_SetUpPlayerPrediction( false, true );
  31.846 +
  31.847 +	// Store off the old count
  31.848 +	gEngfuncs.pEventAPI->EV_PushPMStates();
  31.849 +
  31.850 +	// Now add in all of the players.
  31.851 +	gEngfuncs.pEventAPI->EV_SetSolidPlayers ( player->index - 1 );	
  31.852 +
  31.853 +	gEngfuncs.pEventAPI->EV_SetTraceHull( 2 );
  31.854 +
  31.855 +	dt = gHUD.m_flTime - g_flStartTime;
  31.856 +	if ( dt < 0 )
  31.857 +		return;
  31.858 +
  31.859 +	frac = dt / BENCH_CYCLE_TIME;
  31.860 +	if ( frac > 1.0 )
  31.861 +	{
  31.862 +		frac = frac - (float)(int)frac;
  31.863 +	}
  31.864 +
  31.865 +	frac2 = dt /BENCH_INNER_CYCLE_TIME;
  31.866 +	if ( frac2 > 1.0 )
  31.867 +	{
  31.868 +		frac2 = frac2 - (float)(int)frac2;
  31.869 +	}
  31.870 +
  31.871 +	// Determine forward vector
  31.872 +	AngleVectors ( vec3_origin, forward, right, up );
  31.873 +
  31.874 +	centerspot = origin;
  31.875 +	centerspot[2] -= 512;
  31.876 +
  31.877 +	gEngfuncs.pEventAPI->EV_PlayerTrace( (float *)&origin, (float *)&centerspot, PM_NORMAL, -1, &tr );
  31.878 +
  31.879 +	centerspot = tr.endpos;
  31.880 +	centerspot[2] += BENCH_BALLHEIGHT;
  31.881 +
  31.882 +	// Move center out from here
  31.883 +	centerspot = centerspot + BENCH_VIEW_OFFSET * forward;
  31.884 +
  31.885 +	for ( i = 0; i < NUM_BENCH_OBJ; i++ )
  31.886 +	{
  31.887 +		int j;
  31.888 +		float jitter = 0.0;
  31.889 +		float jfrac;
  31.890 +		float offset;
  31.891 +		float ofs_radius = 5.0;
  31.892 +
  31.893 +		vec3_t ang;
  31.894 +		offset = ( float ) i / (float) ( NUM_BENCH_OBJ - 1 );
  31.895 +
  31.896 +		ang[ 0 ] = 0;
  31.897 +		ang[ 2 ] = 0;
  31.898 +		ang[ 1 ] = BENCH_SWEEP * offset + frac * 360.0;
  31.899 +		// normalize
  31.900 +		NormalizeVector( ang );
  31.901 +
  31.902 +		// Determine forward vector
  31.903 +		AngleVectors ( ang, forward, right, up );
  31.904 +
  31.905 +		// Get a far point for ray trace
  31.906 +		farpoint = centerspot + ( BENCH_RADIUS + ofs_radius * sin( BENCH_SWEEP * offset + frac2 * 2 * M_PI ) ) * forward;
  31.907 +		farpoint[2] += 10 * cos( BENCH_SWEEP * offset + frac2 * 2 * M_PI );
  31.908 +
  31.909 +		gEngfuncs.pEventAPI->EV_PlayerTrace( (float *)&centerspot, (float *)&farpoint, PM_NORMAL, -1, &tr );
  31.910 +
  31.911 +		// Add angular velocity
  31.912 +		VectorMA( bench[ i ].curstate.angles, frametime, bench[ i ].baseline.angles, bench[ i ].curstate.angles );
  31.913 +
  31.914 +		NormalizeVector( bench[ i ].curstate.angles );
  31.915 +		
  31.916 +		jfrac = ( (float)gHUD.m_Benchmark.GetObjects() / (float)NUM_BENCH_OBJ );
  31.917 +
  31.918 +		// Adjust velocity
  31.919 +		//bench[ i ].curstate.velocity[ 2 ] -= bench[ i ].curstate.gravity * frametime * 800;
  31.920 +
  31.921 +		/*
  31.922 +		// Did we hit something?
  31.923 +		if ( tr.fraction != 1.0 && !tr.inwater )
  31.924 +		{
  31.925 +			float damp;
  31.926 +			float proj;
  31.927 +			vec3_t traceNormal;
  31.928 +			int j;
  31.929 +
  31.930 +			traceNormal = tr.plane.normal;
  31.931 +
  31.932 +			damp = 0.9;
  31.933 +
  31.934 +			// Reflect velocity
  31.935 +			if ( damp != 0 )
  31.936 +			{
  31.937 +				proj = DotProduct( bench[ i ].curstate.velocity, traceNormal );
  31.938 +				VectorMA( bench[ i ].curstate.velocity, -proj*2, traceNormal, bench[ i ].curstate.velocity );
  31.939 +				// Reflect rotation (fake)
  31.940 +
  31.941 +				for ( j = 0 ; j < 3; j++ )
  31.942 +				{
  31.943 +					if ( bench[ i ].curstate.velocity[ j ] > 1000.0 )
  31.944 +					{
  31.945 +						bench[ i ].curstate.velocity[ j ] = 1000.0;
  31.946 +					}
  31.947 +					else if ( bench[ i ].curstate.velocity[ j ] < -1000.0 )
  31.948 +					{
  31.949 +						bench[ i ].curstate.velocity[ j ] = -1000.0;
  31.950 +					}
  31.951 +				}
  31.952 +
  31.953 +				bench[ i ].baseline.angles[1] = -bench[ i ].baseline.angles[1];
  31.954 +
  31.955 +				VectorScale( bench[ i ].curstate.velocity, damp, bench[ i ].curstate.velocity );
  31.956 +			}
  31.957 +		}
  31.958 +		*/
  31.959 +
  31.960 +		if ( i == ( NUM_BENCH_OBJ - 1 ) )
  31.961 +		{
  31.962 +			g_aimorg = tr.endpos;
  31.963 +		}
  31.964 +
  31.965 +		if ( Bench_GetPowerPlay() )
  31.966 +		{
  31.967 +			jitter = 0.5;
  31.968 +		}
  31.969 +		else
  31.970 +		{
  31.971 +			jitter = 8.0;
  31.972 +		}
  31.973 +				
  31.974 +		jitter *= jfrac;
  31.975 +
  31.976 +		for ( j = 0; j < 2; j++ )
  31.977 +		{
  31.978 +			tr.endpos[ j ] += gEngfuncs.pfnRandomFloat( -jitter, jitter );
  31.979 +		}
  31.980 +
  31.981 +		// Add to visedicts list for rendering
  31.982 +		// Move dot to trace endpoint
  31.983 +		bench[ i ].origin			= tr.endpos;
  31.984 +		bench[ i ].curstate.origin = bench[ i ].origin;
  31.985 +		bench[ i ].angles = bench[ i ].curstate.angles;
  31.986 +
  31.987 +		// Force no interpolation, etc., probably not necessary
  31.988 +		bench[ i ].prevstate		= bench[ i ].curstate;
  31.989 +
  31.990 +		if ( ( NUM_BENCH_OBJ - i - 1 ) < gHUD.m_Benchmark.GetObjects() )
  31.991 +		{
  31.992 +			if ( bench[ i ].curstate.renderamt == 255 )
  31.993 +			{
  31.994 +				bench[i].curstate.rendermode = kRenderNormal;
  31.995 +			}
  31.996 +			else
  31.997 +			{
  31.998 +				bench[i].curstate.renderamt += BLEND_IN_SPEED * frametime;
  31.999 +				bench[i].curstate.renderamt = min( 255, bench[i].curstate.renderamt );
 31.1000 +				bench[i].curstate.rendermode = kRenderTransAlpha;
 31.1001 +			}
 31.1002 +
 31.1003 +			gEngfuncs.CL_CreateVisibleEntity( ET_NORMAL, &bench[ i ] );
 31.1004 +		}
 31.1005 +	}
 31.1006 +
 31.1007 +	gEngfuncs.pEventAPI->EV_PopPMStates();
 31.1008 +}
 31.1009 +
 31.1010 +void Bench_AddObjects( void )
 31.1011 +{
 31.1012 +	if ( Bench_GetDotAdded() )
 31.1013 +	{
 31.1014 +		Bench_SpotPosition( g_dotorg, g_aimorg );
 31.1015 +		Bench_SetDotAdded( 0 );
 31.1016 +	}
 31.1017 +
 31.1018 +	if ( Bench_InStage( SECOND_STAGE ) )
 31.1019 +	{
 31.1020 +		HUD_CreateBenchObjects( v_origin );	
 31.1021 +	}
 31.1022 +}
 31.1023 +
 31.1024 +
 31.1025 +static vec3_t v_stochastic;
 31.1026 +
 31.1027 +void Bench_SetViewAngles( int recalc_wander, float *viewangles, float frametime, struct usercmd_s *cmd )
 31.1028 +{
 31.1029 +	if ( !Bench_Active() )
 31.1030 +		return;
 31.1031 +
 31.1032 +	int i;
 31.1033 +	vec3_t lookdir;
 31.1034 +
 31.1035 +	// Clear stochastic offset between runs
 31.1036 +	if ( Bench_InStage( FIRST_STAGE ) )
 31.1037 +	{
 31.1038 +		VectorCopy( vec3_origin, v_stochastic );
 31.1039 +	}
 31.1040 +
 31.1041 +	if ( Bench_InStage( SECOND_STAGE ) || Bench_InStage( THIRD_STAGE ) )
 31.1042 +	{
 31.1043 +		VectorSubtract( g_aimorg, v_origin, lookdir );
 31.1044 +		VectorNormalize( lookdir );
 31.1045 +		VectorAngles( (float *)&lookdir, viewangles );
 31.1046 +		
 31.1047 +		viewangles[0] = -viewangles[0];
 31.1048 +
 31.1049 +		/*
 31.1050 +		if ( recalc_wander )
 31.1051 +		{
 31.1052 +			float fmag = 2.0;
 31.1053 +			if ( Bench_GetPowerPlay() )
 31.1054 +			{
 31.1055 +				fmag = 10.0;
 31.1056 +			}
 31.1057 +
 31.1058 +			for ( i = 0; i < 2; i++ )
 31.1059 +			{
 31.1060 +				v_stochastic[ i ] += frametime * gEngfuncs.pfnRandomFloat( -fmag, fmag );
 31.1061 +				v_stochastic[ i ] = max( -15.0, v_stochastic[ i ] );
 31.1062 +				v_stochastic[ i ] = min( 15.0, v_stochastic[ i ] );
 31.1063 +			}
 31.1064 +
 31.1065 +			v_stochastic[ 2 ] = 0.0;
 31.1066 +		}
 31.1067 +		*/
 31.1068 +
 31.1069 +		VectorAdd( viewangles, v_stochastic, viewangles );
 31.1070 +
 31.1071 +		for ( i = 0; i < 3; i++ )
 31.1072 +		{
 31.1073 +			if ( viewangles[ i ] > 180 )
 31.1074 +				viewangles[ i ] -= 360;
 31.1075 +			if ( viewangles[ i ] < -180 )
 31.1076 +				viewangles[ i ] += 360;
 31.1077 +		}
 31.1078 +	}
 31.1079 +	else
 31.1080 +	{
 31.1081 +		VectorCopy( vec3_origin, viewangles )
 31.1082 +
 31.1083 +		if ( Bench_InStage( FIRST_STAGE ) )
 31.1084 +		{
 31.1085 +			viewangles[ 1 ] = -90;