Merge remote-tracking branch 'upstream/master'

Reverted .gitattributes xcode_ccache_wrapper change. Fixed line endings
for .gitignore and .gitattributes.
This commit is contained in:
Narendra Umate 2013-12-08 01:27:41 -08:00
commit 4fa56874ba
6113 changed files with 1508950 additions and 1508782 deletions

29
.gitattributes vendored
View File

@ -6,9 +6,12 @@ vpc_linux binary
vpc_osx binary vpc_osx binary
*.sh text *.sh text
*.bat text
*.txt text
*.c text *.c text
*.h text *.h text
*.H text *.H text
*.cc text
*.cpp text *.cpp text
*.vpc text *.vpc text
*.vgc text *.vgc text
@ -17,8 +20,32 @@ vpc_osx binary
*.pl text *.pl text
*.py text *.py text
*.xcconfig text *.xcconfig text
*.vcd text
*.vbsp text
*.proto text
*.inc text
*.fxc text
*.vsh text
*.lst text
*.mm text
*.cfg text
*.res text
*.rc text
*.def text
*.vmt text
*.inl text
*.asm text
.gitignore text
sourcesdk_def.mak text
smdlexp.mak text
README text
CONTRIBUTING text
LICENSE text
*.exe binary *.exe binary
protoc binary protoc binary
ccache binary ccache binary
xcode_ccache_wrapper text
gtest_output_test_golden_lin.txt binary
mod_*_english.txt binary

124
.gitignore vendored
View File

@ -1,67 +1,67 @@
# Files to ignore when considering what GIT should commit. # Files to ignore when considering what GIT should commit.
# Visual Studio # Visual Studio
*.suo *.suo
*.user *.user
*.sln.docstates *.sln.docstates
*.obj *.obj
*.pch *.pch
*.tlog *.tlog
*.log *.log
*.scc *.scc
*.exp *.exp
*.ilk *.ilk
*.lastbuildstate *.lastbuildstate
vc100.pdb vc100.pdb
ipch ipch
*.sdf *.sdf
*.opensdf *.opensdf
*.idb *.idb
*.vcxproj *.vcxproj
*.vcxproj.filters *.vcxproj.filters
*.sln *.sln
[Dd]ebug*/ [Dd]ebug*/
[Rr]elease*/ [Rr]elease*/
# OSX/Linux build products # OSX/Linux build products
*.DS_Store *.DS_Store
*.mak *.mak
*.mak.vpc_crc *.mak.vpc_crc
*.xcodeproj/ *.xcodeproj/
obj*/ obj*/
!devtools/*.mak !devtools/*.mak
!utils/smdlexp/smdlexp.mak !utils/smdlexp/smdlexp.mak
*_osx32* *_osx32*
# Specific Source build products # Specific Source build products
client.pdb client.pdb
client.dll client.dll
client.lib client.lib
server.pdb server.pdb
server.dll server.dll
server.lib server.lib
client.so client.so
client.so.dbg client.so.dbg
server.so server.so
server.so.dbg server.so.dbg
server_srv.so server_srv.so
server_srv.so.dbg server_srv.so.dbg
client.dylib client.dylib
client.dylib.dSYM/ client.dylib.dSYM/
server.dylib server.dylib
server.dylib.dSYM/ server.dylib.dSYM/
*.vpc.sentinel *.vpc.sentinel
*.vpc_crc *.vpc_crc
**/generated_proto/** **/generated_proto/**
**/src/utils/sapi51/** **/src/utils/sapi51/**
**/game/**/bin/** **/game/**/bin/**
# files generated by running a mod # files generated by running a mod
config.cfg config.cfg
# shader files # shader files
*.tmp *.tmp

View File

@ -1,39 +1,39 @@
Thanks for your interest in the Source SDK 2013 project. When you make a Thanks for your interest in the Source SDK 2013 project. When you make a
contribution to the project (e.g. create an Issue or submit a Pull Request) contribution to the project (e.g. create an Issue or submit a Pull Request)
(a "Contribution"), Valve wants to be able to use your Contribution to improve (a "Contribution"), Valve wants to be able to use your Contribution to improve
the SDK and other Valve products. the SDK and other Valve products.
As a condition of providing a Contribution, you agree that: As a condition of providing a Contribution, you agree that:
- You grant Valve a non-exclusive, irrevocable, royalty-free, worldwide license - You grant Valve a non-exclusive, irrevocable, royalty-free, worldwide license
to make, use, sell, reproduce, modify, distribute (directly and indirectly), to make, use, sell, reproduce, modify, distribute (directly and indirectly),
and publicly display and perform the Contribution, and any derivative works and publicly display and perform the Contribution, and any derivative works
that Valve may make from the Contribution, under any intellectual property you that Valve may make from the Contribution, under any intellectual property you
own or have the right to license. own or have the right to license.
- You warrant and represent that the Contribution is your original creation, - You warrant and represent that the Contribution is your original creation,
that you have the authority to grant this license to Valve, and that this that you have the authority to grant this license to Valve, and that this
license does not require the permission of any third party. Otherwise, you license does not require the permission of any third party. Otherwise, you
provide your Contribution "as is" without warranties. provide your Contribution "as is" without warranties.
Should you wish to submit a suggestion or work that is not your original Should you wish to submit a suggestion or work that is not your original
creation, you may submit it to Valve separate from any Contribution, creation, you may submit it to Valve separate from any Contribution,
explicitly identifying it as sourced from a third party, stating the details explicitly identifying it as sourced from a third party, stating the details
of its origin, and informing Valve of any license or other restriction of of its origin, and informing Valve of any license or other restriction of
which you are personally aware. which you are personally aware.
Valve is happy to accept pull requests and issues in the source-sdk-2013 Valve is happy to accept pull requests and issues in the source-sdk-2013
repository in these cases: repository in these cases:
* Changes that fix bugs in the SDK deployment process itself. The repository * Changes that fix bugs in the SDK deployment process itself. The repository
should build out of the box, and anything that prevents that is a pull should build out of the box, and anything that prevents that is a pull
request we want. request we want.
* High priority bugs in HL2, the Episodes, or HL2MP that can be fixed in * High priority bugs in HL2, the Episodes, or HL2MP that can be fixed in
client.dll or server.dll. client.dll or server.dll.
For other changes we suggest that you issue a pull request to one of these For other changes we suggest that you issue a pull request to one of these
fine community-maintained repositories instead: fine community-maintained repositories instead:
https://developer.valvesoftware.com/wiki/Source-sdk-2013-community-repos https://developer.valvesoftware.com/wiki/Source-sdk-2013-community-repos
If you are going to make a pull request, please keep them as granular as If you are going to make a pull request, please keep them as granular as
possible. Pull requests with 3-4 unrelated changes in them aren't going to possible. Pull requests with 3-4 unrelated changes in them aren't going to
be accepted. be accepted.

86
LICENSE
View File

@ -1,43 +1,43 @@
SOURCE 1 SDK LICENSE SOURCE 1 SDK LICENSE
Source SDK Copyright(c) Valve Corp. Source SDK Copyright(c) Valve Corp.
THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE
CORPORATION ("Valve"). PLEASE READ IT BEFORE DOWNLOADING OR USING CORPORATION ("Valve"). PLEASE READ IT BEFORE DOWNLOADING OR USING
THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE
SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO
THE TERMS OF THIS LICENSE PLEASE DONT DOWNLOAD OR USE THE SDK. THE TERMS OF THIS LICENSE PLEASE DONT DOWNLOAD OR USE THE SDK.
You may, free of charge, download and use the SDK to develop a modified Valve game 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 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 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/ Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/
You may copy, modify, and distribute the SDK and any modifications you make to the 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 SDK in source and object code form, but only for free. Any distribution of this SDK must
include this LICENSE file and thirdpartylegalnotices.txt. include this LICENSE file and thirdpartylegalnotices.txt.
Any distribution of the SDK or a substantial portion of the SDK must include the above Any distribution of the SDK or a substantial portion of the SDK must include the above
copyright notice and the following: copyright notice and the following:
DISCLAIMER OF WARRANTIES. THE SOURCE SDK AND ANY DISCLAIMER OF WARRANTIES. THE SOURCE SDK AND ANY
OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED
"AS IS". VALVE AND ITS SUPPLIERS DISCLAIM ALL "AS IS". VALVE AND ITS SUPPLIERS DISCLAIM ALL
WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED
WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT,
TITLE AND FITNESS FOR A PARTICULAR PURPOSE. TITLE AND FITNESS FOR A PARTICULAR PURPOSE.
LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR
ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER
(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS)
ARISING OUT OF THE USE OF OR INABILITY TO USE THE ARISING OUT OF THE USE OF OR INABILITY TO USE THE
ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
If you would like to use the SDK for a commercial purpose, please contact Valve at If you would like to use the SDK for a commercial purpose, please contact Valve at
sourceengine@valvesoftware.com. sourceengine@valvesoftware.com.

86
README
View File

@ -1,43 +1,43 @@
SOURCE 1 SDK LICENSE SOURCE 1 SDK LICENSE
Source SDK Copyright(c) Valve Corp. Source SDK Copyright(c) Valve Corp.
THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE
CORPORATION ("Valve"). PLEASE READ IT BEFORE DOWNLOADING OR USING CORPORATION ("Valve"). PLEASE READ IT BEFORE DOWNLOADING OR USING
THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE
SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO
THE TERMS OF THIS LICENSE PLEASE DONT DOWNLOAD OR USE THE SDK. THE TERMS OF THIS LICENSE PLEASE DONT DOWNLOAD OR USE THE SDK.
You may, free of charge, download and use the SDK to develop a modified Valve game 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 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 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/ Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/
You may copy, modify, and distribute the SDK and any modifications you make to the 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 SDK in source and object code form, but only for free. Any distribution of this SDK must
include this LICENSE file and thirdpartylegalnotices.txt. include this LICENSE file and thirdpartylegalnotices.txt.
Any distribution of the SDK or a substantial portion of the SDK must include the above Any distribution of the SDK or a substantial portion of the SDK must include the above
copyright notice and the following: copyright notice and the following:
DISCLAIMER OF WARRANTIES. THE SOURCE SDK AND ANY DISCLAIMER OF WARRANTIES. THE SOURCE SDK AND ANY
OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED
"AS IS". VALVE AND ITS SUPPLIERS DISCLAIM ALL "AS IS". VALVE AND ITS SUPPLIERS DISCLAIM ALL
WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED
WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT,
TITLE AND FITNESS FOR A PARTICULAR PURPOSE. TITLE AND FITNESS FOR A PARTICULAR PURPOSE.
LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR
ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER
(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS)
ARISING OUT OF THE USE OF OR INABILITY TO USE THE ARISING OUT OF THE USE OF OR INABILITY TO USE THE
ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
If you would like to use the SDK for a commercial purpose, please contact Valve at If you would like to use the SDK for a commercial purpose, please contact Valve at
sourceengine@valvesoftware.com. sourceengine@valvesoftware.com.

View File

@ -1,15 +1,15 @@
// HEALTH/SUIT CHARGE DISTRIBUTION // HEALTH/SUIT CHARGE DISTRIBUTION
sk_suitcharger "75" sk_suitcharger "75"
sk_suitcharger_citadel "200" sk_suitcharger_citadel "200"
sk_suitcharger_citadel_maxarmor "200" sk_suitcharger_citadel_maxarmor "200"
sk_battery "15" sk_battery "15"
sk_healthcharger "50" sk_healthcharger "50"
sk_healthkit "25" sk_healthkit "25"
sk_healthvial "10" sk_healthvial "10"
// player damage adjusters // player damage adjusters
sk_player_head "3" sk_player_head "3"
sk_player_chest "1" sk_player_chest "1"
sk_player_stomach "1" sk_player_stomach "1"
sk_player_arm "1" sk_player_arm "1"
sk_player_leg "1" sk_player_leg "1"

View File

@ -1 +1 @@
exec skill.cfg exec skill.cfg

View File

@ -1,84 +1,84 @@
"GameInfo" "GameInfo"
{ {
game "My First HL2MP Mod" game "My First HL2MP Mod"
title "HALF+LIFE'" title "HALF+LIFE'"
title2 "deathmatch mod" title2 "deathmatch mod"
type multiplayer_only type multiplayer_only
nomodels 0 nomodels 0
nohimodel 1 nohimodel 1
nocrosshair 1 nocrosshair 1
hidden_maps hidden_maps
{ {
"test_speakers" 1 "test_speakers" 1
"test_hardware" 1 "test_hardware" 1
} }
FileSystem FileSystem
{ {
SteamAppId 243750 SteamAppId 243750
// //
// The code that loads this file automatically does a few things here: // The code that loads this file automatically does a few things here:
// //
// 1. For each "Game" search path, it adds a "GameBin" path, in <dir>\bin // 1. For each "Game" search path, it adds a "GameBin" path, in <dir>\bin
// 2. For each "Game" search path, it adds another "Game" path in front of it with _<langage> at the end. // 2. For each "Game" search path, it adds another "Game" path in front of it with _<langage> at the end.
// For example: c:\hl2\cstrike on a french machine would get a c:\hl2\cstrike_french path added to it. // For example: c:\hl2\cstrike on a french machine would get a c:\hl2\cstrike_french path added to it.
// 3. For the first "Game" search path, it adds a search path called "MOD". // 3. For the first "Game" search path, it adds a search path called "MOD".
// 4. For the first "Game" search path, it adds a search path called "DEFAULT_WRITE_PATH". // 4. For the first "Game" search path, it adds a search path called "DEFAULT_WRITE_PATH".
// //
// //
// Search paths are relative to the base directory, which is where hl2.exe is found. // Search paths are relative to the base directory, which is where hl2.exe is found.
// //
// |gameinfo_path| points at the directory where gameinfo.txt is. // |gameinfo_path| points at the directory where gameinfo.txt is.
// We always want to mount that directory relative to gameinfo.txt, so // We always want to mount that directory relative to gameinfo.txt, so
// people can mount stuff in c:\mymod, and the main game resources are in // people can mount stuff in c:\mymod, and the main game resources are in
// someplace like c:\program files\valve\steam\steamapps\half-life 2. // someplace like c:\program files\valve\steam\steamapps\half-life 2.
// //
SearchPaths SearchPaths
{ {
// First, mount all user customizations. This will search for VPKs and subfolders // First, mount all user customizations. This will search for VPKs and subfolders
// and mount them in alphabetical order. The easiest way to distribute a mod is to // and mount them in alphabetical order. The easiest way to distribute a mod is to
// pack up the custom content into a VPK. To "install" a mod, just drop it in this // pack up the custom content into a VPK. To "install" a mod, just drop it in this
// folder. // folder.
// //
// Note that this folder is scanned only when the game is booted. // Note that this folder is scanned only when the game is booted.
game+mod hl2mp/custom/* game+mod hl2mp/custom/*
game+mod hl2/custom/* game+mod hl2/custom/*
// Now search loose files. We'll set the directory containing the gameinfo.txt file // Now search loose files. We'll set the directory containing the gameinfo.txt file
// as the first "mod" search path (after any user customizations). This is also the one // as the first "mod" search path (after any user customizations). This is also the one
// that's used when writing to the "mod" path. // that's used when writing to the "mod" path.
game+mod+mod_write+default_write_path |gameinfo_path|. game+mod+mod_write+default_write_path |gameinfo_path|.
gamebin |gameinfo_path|bin gamebin |gameinfo_path|bin
// We search VPK files before ordinary folders, because most files will be found in // We search VPK files before ordinary folders, because most files will be found in
// VPK and we can avoid making thousands of file system calls to attempt to open files // VPK and we can avoid making thousands of file system calls to attempt to open files
// in folders where they don't exist. (Searching a VPK is much faster than making an operating // in folders where they don't exist. (Searching a VPK is much faster than making an operating
// system call.) // system call.)
game_lv hl2/hl2_lv.vpk game_lv hl2/hl2_lv.vpk
game+mod hl2mp/hl2mp_english.vpk game+mod hl2mp/hl2mp_english.vpk
game+mod hl2mp/hl2mp_pak.vpk game+mod hl2mp/hl2mp_pak.vpk
game |all_source_engine_paths|hl2/hl2_english.vpk game |all_source_engine_paths|hl2/hl2_english.vpk
game |all_source_engine_paths|hl2/hl2_pak.vpk game |all_source_engine_paths|hl2/hl2_pak.vpk
game |all_source_engine_paths|hl2/hl2_textures.vpk game |all_source_engine_paths|hl2/hl2_textures.vpk
game |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk game |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk
game |all_source_engine_paths|hl2/hl2_sound_misc.vpk game |all_source_engine_paths|hl2/hl2_sound_misc.vpk
game |all_source_engine_paths|hl2/hl2_misc.vpk game |all_source_engine_paths|hl2/hl2_misc.vpk
platform |all_source_engine_paths|platform/platform_misc.vpk platform |all_source_engine_paths|platform/platform_misc.vpk
// Add the HL2 directory as a game search path. This is also where where writes // Add the HL2 directory as a game search path. This is also where where writes
// to the "game" path go. // to the "game" path go.
game+game_write hl2mp game+game_write hl2mp
// Where the game's binaries are // Where the game's binaries are
gamebin hl2mp/bin gamebin hl2mp/bin
// Last, mount in shared HL2 loose files // Last, mount in shared HL2 loose files
game |all_source_engine_paths|hl2mp game |all_source_engine_paths|hl2mp
game |all_source_engine_paths|hl2 game |all_source_engine_paths|hl2
platform |all_source_engine_paths|platform platform |all_source_engine_paths|platform
} }
} }
} }

View File

@ -1,7 +1,7 @@
"Mod_Example_Model" "Mod_Example_Model"
{ {
"$basetexture" "Models/props_c17/Oil_Drum001g" "$basetexture" "Models/props_c17/Oil_Drum001g"
// "$basetexturetransform" "center 0 0 scale 1 2 rotate 0 translate 0 0" // "$basetexturetransform" "center 0 0 scale 1 2 rotate 0 translate 0 0"
// "$AlphaTestReference" "0.5" // "$AlphaTestReference" "0.5"
"$surfaceprop" "metal" "$surfaceprop" "metal"
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,48 +1,64 @@
"GameMenu" "GameMenu"
{ {
"1" "1"
{ {
"label" "#GameUI_GameMenu_ResumeGame" "label" "#GameUI_GameMenu_ResumeGame"
"command" "ResumeGame" "command" "ResumeGame"
"OnlyInGame" "1" "OnlyInGame" "1"
} }
"2" "2"
{ {
"label" "#GameUI_GameMenu_Disconnect" "label" "#GameUI_GameMenu_Disconnect"
"command" "Disconnect" "command" "Disconnect"
"OnlyInGame" "1" "OnlyInGame" "1"
} }
"3" "3"
{ {
"label" "#GameUI_GameMenu_PlayerList" "label" "#GameUI_GameMenu_PlayerList"
"command" "OpenPlayerListDialog" "command" "OpenPlayerListDialog"
"OnlyInGame" "1" "OnlyInGame" "1"
} }
"4" "4"
{ {
"label" "" "label" ""
"command" "" "command" ""
"OnlyInGame" "1" "OnlyInGame" "1"
} }
"5" "5"
{ {
"label" "#GameUI_GameMenu_FindServers" "label" "#GameUI_GameMenu_FindServers"
"command" "OpenServerBrowser" "command" "OpenServerBrowser"
} }
"6" "6"
{ {
"label" "#GameUI_GameMenu_CreateServer" "label" "#GameUI_GameMenu_CreateServer"
"command" "OpenCreateMultiplayerGameDialog" "command" "OpenCreateMultiplayerGameDialog"
} }
"10" "7"
{ {
"label" "#GameUI_GameMenu_Options" "label" "#GameUI_GameMenu_ActivateVR"
"command" "OpenOptionsDialog" "command" "engine vr_activate"
} "InGameOrder" "40"
"11" "OnlyWhenVREnabled" "1"
{ "OnlyWhenVRInactive" "1"
"label" "#GameUI_GameMenu_Quit" }
"command" "Quit" "8"
} {
} "label" "#GameUI_GameMenu_DeactivateVR"
"command" "engine vr_deactivate"
"InGameOrder" "40"
"OnlyWhenVREnabled" "1"
"OnlyWhenVRActive" "1"
}
"10"
{
"label" "#GameUI_GameMenu_Options"
"command" "OpenOptionsDialog"
}
"11"
{
"label" "#GameUI_GameMenu_Quit"
"command" "Quit"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,51 +1,51 @@
//=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. =========== //=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. ===========
// //
// The copyright to the contents herein is the property of Valve, L.L.C. // The copyright to the contents herein is the property of Valve, L.L.C.
// The contents may be used and/or copied only with the written permission of // The contents may be used and/or copied only with the written permission of
// Valve, L.L.C., or in accordance with the terms and conditions stipulated in // Valve, L.L.C., or in accordance with the terms and conditions stipulated in
// the agreement/contract under which the contents have been supplied. // the agreement/contract under which the contents have been supplied.
//============================================================================= //=============================================================================
// No spaces in event names, max length 32 // No spaces in event names, max length 32
// All strings are case sensitive // All strings are case sensitive
// //
// valid data key types are: // valid data key types are:
// string : a zero terminated string // string : a zero terminated string
// bool : unsigned int, 1 bit // bool : unsigned int, 1 bit
// byte : unsigned int, 8 bit // byte : unsigned int, 8 bit
// short : signed int, 16 bit // short : signed int, 16 bit
// long : signed int, 32 bit // long : signed int, 32 bit
// float : float, 32 bit // float : float, 32 bit
// local : any data, but not networked to clients // local : any data, but not networked to clients
// //
// following key names are reserved: // following key names are reserved:
// local : if set to 1, event is not networked to clients // local : if set to 1, event is not networked to clients
// unreliable : networked, but unreliable // unreliable : networked, but unreliable
// suppress : never fire this event // suppress : never fire this event
// time : firing server time // time : firing server time
// eventid : holds the event ID // eventid : holds the event ID
"modevents" "modevents"
{ {
"player_death" // a game event, name may be 32 charaters long "player_death" // a game event, name may be 32 charaters long
{ {
"userid" "short" // user ID who died "userid" "short" // user ID who died
"attacker" "short" // user ID who killed "attacker" "short" // user ID who killed
"weapon" "string" // weapon name killed used "weapon" "string" // weapon name killed used
} }
"teamplay_round_start" // round restart "teamplay_round_start" // round restart
{ {
"full_reset" "bool" // is this a full reset of the map "full_reset" "bool" // is this a full reset of the map
} }
"spec_target_updated" "spec_target_updated"
{ {
} }
"achievement_earned" "achievement_earned"
{ {
"player" "byte" // entindex of the player "player" "byte" // entindex of the player
"achievement" "short" // achievement ID "achievement" "short" // achievement ID
} }
} }

View File

@ -1,4 +1,4 @@
"chapters" "chapters"
{ {
1 "background01" 1 "background01"
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,2 @@
// Game specific definitions // Game specific definitions
"$game" "HL2MP" "$game" "HL2MP"

View File

@ -1,332 +1,332 @@
"HL2Player.SprintNoPower" "HL2Player.SprintNoPower"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_60dB" "soundlevel" "SNDLVL_60dB"
"wave" "player/suit_denydevice.wav" "wave" "player/suit_denydevice.wav"
} }
"HL2Player.SprintStart" "HL2Player.SprintStart"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.9" "volume" "0.9"
"soundlevel" "SNDLVL_60dB" "soundlevel" "SNDLVL_60dB"
"wave" "player/suit_sprint.wav" "wave" "player/suit_sprint.wav"
} }
"HL2Player.FlashLightOn" "HL2Player.FlashLightOn"
{ {
"channel" "CHAN_WEAPON" "channel" "CHAN_WEAPON"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"wave" "items/flashlight1.wav" "wave" "items/flashlight1.wav"
} }
"HL2Player.FlashLightOff" "HL2Player.FlashLightOff"
{ {
"channel" "CHAN_WEAPON" "channel" "CHAN_WEAPON"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"wave" "items/flashlight1.wav" "wave" "items/flashlight1.wav"
} }
"HL2Player.PickupWeapon" "HL2Player.PickupWeapon"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "items/ammo_pickup.wav" "wave" "items/ammo_pickup.wav"
} }
"HL2Player.TrainUse" "HL2Player.TrainUse"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "plats/train_use1.wav" "wave" "plats/train_use1.wav"
} }
"HL2Player.Use" "HL2Player.Use"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.4" "volume" "0.4"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "common/wpn_select.wav" "wave" "common/wpn_select.wav"
} }
"HL2Player.UseNPC" "HL2Player.UseNPC"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.4" "volume" "0.4"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "common/wpn_select.wav" "wave" "common/wpn_select.wav"
} }
"HL2Player.UseDeny" "HL2Player.UseDeny"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.4" "volume" "0.4"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "common/wpn_denyselect.wav" "wave" "common/wpn_denyselect.wav"
} }
"HL2Player.BurnPain" "HL2Player.BurnPain"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.5" "volume" "0.5"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"rndwave" "rndwave"
{ {
"wave" "player/pl_burnpain1.wav" "wave" "player/pl_burnpain1.wav"
"wave" "player/pl_burnpain2.wav" "wave" "player/pl_burnpain2.wav"
"wave" "player/pl_burnpain3.wav" "wave" "player/pl_burnpain3.wav"
} }
} }
// SHARED player sounds // SHARED player sounds
"Player.Death" "Player.Death"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"rndwave" "rndwave"
{ {
"wave" "player/pl_pain5.wav" "wave" "player/pl_pain5.wav"
"wave" "player/pl_pain6.wav" "wave" "player/pl_pain6.wav"
"wave" "player/pl_pain7.wav" "wave" "player/pl_pain7.wav"
} }
} }
"Player.PlasmaDamage" "Player.PlasmaDamage"
{ {
"channel" "CHAN_BODY" "channel" "CHAN_BODY"
"volume" "0.5" "volume" "0.5"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "player/general/flesh_burn.wav" "wave" "player/general/flesh_burn.wav"
} }
"Player.SonicDamage" "Player.SonicDamage"
{ {
"channel" "CHAN_BODY" "channel" "CHAN_BODY"
"volume" "0.7" "volume" "0.7"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"rndwave" "rndwave"
{ {
"wave" "player/pl_pain5.wav" "wave" "player/pl_pain5.wav"
"wave" "player/pl_pain6.wav" "wave" "player/pl_pain6.wav"
"wave" "player/pl_pain7.wav" "wave" "player/pl_pain7.wav"
} }
} }
"Player.DrownStart" "Player.DrownStart"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "1.0" "volume" "1.0"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"pitch" "90,110" "pitch" "90,110"
"wave" "player/pl_drown1.wav" "wave" "player/pl_drown1.wav"
} }
"Player.Swim" "Player.Swim"
{ {
"channel" "CHAN_STATIC" "channel" "CHAN_STATIC"
"volume" "0.5" "volume" "0.5"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_NORM" "soundlevel" "SNDLVL_NORM"
"rndwave" "rndwave"
{ {
"wave" "player/footsteps/wade5.wav" "wave" "player/footsteps/wade5.wav"
"wave" "player/footsteps/wade6.wav" "wave" "player/footsteps/wade6.wav"
"wave" "player/footsteps/wade7.wav" "wave" "player/footsteps/wade7.wav"
"wave" "player/footsteps/wade8.wav" "wave" "player/footsteps/wade8.wav"
} }
} }
"Player.FallDamage" "Player.FallDamage"
{ {
"channel" "CHAN_AUTO" "channel" "CHAN_AUTO"
"volume" "0.75" "volume" "0.75"
"pitch" "90,110" "pitch" "90,110"
"soundlevel" "SNDLVL_NORM" "soundlevel" "SNDLVL_NORM"
"rndwave" "rndwave"
{ {
"wave" "player/pl_fallpain1.wav" "wave" "player/pl_fallpain1.wav"
"wave" "player/pl_fallpain3.wav" "wave" "player/pl_fallpain3.wav"
} }
} }
"Player.FallGib" "Player.FallGib"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.75" "volume" "0.75"
"pitch" "90,110" "pitch" "90,110"
"soundlevel" "SNDLVL_NORM" "soundlevel" "SNDLVL_NORM"
"rndwave" "rndwave"
{ {
"wave" "physics/body/body_medium_break2.wav" "wave" "physics/body/body_medium_break2.wav"
} }
} }
"Player.DrownContinue" "Player.DrownContinue"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "1.0" "volume" "1.0"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"pitch" "90,110" "pitch" "90,110"
"rndwave" "rndwave"
{ {
"wave" "player/pl_drown1.wav" "wave" "player/pl_drown1.wav"
"wave" "player/pl_drown2.wav" "wave" "player/pl_drown2.wav"
"wave" "player/pl_drown3.wav" "wave" "player/pl_drown3.wav"
} }
} }
"Player.Wade" "Player.Wade"
{ {
"channel" "CHAN_BODY" "channel" "CHAN_BODY"
"volume" "0.25" "volume" "0.25"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"rndwave" "rndwave"
{ {
"wave" "player/footsteps/wade5.wav" "wave" "player/footsteps/wade5.wav"
"wave" "player/footsteps/wade6.wav" "wave" "player/footsteps/wade6.wav"
"wave" "player/footsteps/wade7.wav" "wave" "player/footsteps/wade7.wav"
"wave" "player/footsteps/wade8.wav" "wave" "player/footsteps/wade8.wav"
} }
} }
"Player.AmbientUnderWater" "Player.AmbientUnderWater"
{ {
"channel" "CHAN_STATIC" "channel" "CHAN_STATIC"
"volume" "0.22" "volume" "0.22"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "ambient/water/underwater.wav" "wave" "ambient/water/underwater.wav"
} }
"Player.UseTrain" "Player.UseTrain"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "plats/train_use1.wav" "wave" "plats/train_use1.wav"
} }
"Player.UseDeny" "Player.UseDeny"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.4" "volume" "0.4"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "common/wpn_select.wav" "wave" "common/wpn_select.wav"
} }
"Player.PickupWeapon" "Player.PickupWeapon"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"pitch" "95,105" "pitch" "95,105"
"wave" "items/ammo_pickup.wav" "wave" "items/ammo_pickup.wav"
} }
"Geiger.BeepLow" "Geiger.BeepLow"
{ {
"channel" "CHAN_STATIC" "channel" "CHAN_STATIC"
"soundlevel" "SNDLVL_NONE" "soundlevel" "SNDLVL_NONE"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"rndwave" "rndwave"
{ {
"wave" "player/geiger1.wav" "wave" "player/geiger1.wav"
"wave" "player/geiger2.wav" "wave" "player/geiger2.wav"
} }
} }
"Geiger.BeepHigh" "Geiger.BeepHigh"
{ {
"channel" "CHAN_STATIC" "channel" "CHAN_STATIC"
"soundlevel" "SNDLVL_NONE" "soundlevel" "SNDLVL_NONE"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"rndwave" "rndwave"
{ {
"wave" "player/geiger2.wav" "wave" "player/geiger2.wav"
"wave" "player/geiger3.wav" "wave" "player/geiger3.wav"
} }
} }
//HL2MP //HL2MP
"NPC_MetroPolice.Die" "NPC_MetroPolice.Die"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.500" "volume" "0.500"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_80dB" "soundlevel" "SNDLVL_80dB"
"rndwave" "rndwave"
{ {
"wave" "npc/metropolice/die1.wav" "wave" "npc/metropolice/die1.wav"
"wave" "npc/metropolice/die2.wav" "wave" "npc/metropolice/die2.wav"
"wave" "npc/metropolice/die3.wav" "wave" "npc/metropolice/die3.wav"
"wave" "npc/metropolice/die4.wav" "wave" "npc/metropolice/die4.wav"
} }
} }
"NPC_CombineS.Die" "NPC_CombineS.Die"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.500" "volume" "0.500"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_80dB" "soundlevel" "SNDLVL_80dB"
"rndwave" "rndwave"
{ {
"wave" "npc/combine_soldier/die1.wav" "wave" "npc/combine_soldier/die1.wav"
"wave" "npc/combine_soldier/die2.wav" "wave" "npc/combine_soldier/die2.wav"
"wave" "npc/combine_soldier/die3.wav" "wave" "npc/combine_soldier/die3.wav"
} }
} }
"NPC_Citizen.die" "NPC_Citizen.die"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "VOL_NORM" "volume" "VOL_NORM"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_NORM" "soundlevel" "SNDLVL_NORM"
"rndwave" "rndwave"
{ {
"wave" "*vo/npc/$gender01/pain07.wav" "wave" "*vo/npc/$gender01/pain07.wav"
"wave" "*vo/npc/$gender01/pain08.wav" "wave" "*vo/npc/$gender01/pain08.wav"
"wave" "*vo/npc/$gender01/pain09.wav" "wave" "*vo/npc/$gender01/pain09.wav"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,69 +1,69 @@
"blank" "==========================" "blank" "=========================="
"blank" "#Valve_Movement_Title" "blank" "#Valve_Movement_Title"
"blank" "==========================" "blank" "=========================="
"+forward" "#Valve_Move_Forward" "+forward" "#Valve_Move_Forward"
"+back" "#Valve_Move_Back" "+back" "#Valve_Move_Back"
"+moveleft" "#Valve_Move_Left" "+moveleft" "#Valve_Move_Left"
"+moveright" "#Valve_Move_Right" "+moveright" "#Valve_Move_Right"
"+speed" "#Valve_Sprint" "+speed" "#Valve_Sprint"
"+jump" "#Valve_Jump" "+jump" "#Valve_Jump"
"+duck" "#Valve_Duck" "+duck" "#Valve_Duck"
"blank" "==========================" "blank" "=========================="
"blank" "#Valve_Combat_Title" "blank" "#Valve_Combat_Title"
"blank" "==========================" "blank" "=========================="
"+attack" "#Valve_Primary_Attack" "+attack" "#Valve_Primary_Attack"
"+attack2" "#Valve_Secondary_Attack" "+attack2" "#Valve_Secondary_Attack"
"+reload" "#Valve_Reload_Weapon" "+reload" "#Valve_Reload_Weapon"
"+use" "#Valve_Use_Items" "+use" "#Valve_Use_Items"
"phys_swap" "#Valve_Gravity_Gun" "phys_swap" "#Valve_Gravity_Gun"
"impulse 100" "#Valve_Flashlight" "impulse 100" "#Valve_Flashlight"
"+zoom" "#Valve_Suit_Zoom" "+zoom" "#Valve_Suit_Zoom"
"slot1" "#Valve_Weapon_Category_1" "slot1" "#Valve_Weapon_Category_1"
"slot2" "#Valve_Weapon_Category_2" "slot2" "#Valve_Weapon_Category_2"
"slot3" "#Valve_Weapon_Category_3" "slot3" "#Valve_Weapon_Category_3"
"slot4" "#Valve_Weapon_Category_4" "slot4" "#Valve_Weapon_Category_4"
"slot5" "#Valve_Weapon_Category_5" "slot5" "#Valve_Weapon_Category_5"
"slot6" "#Valve_Weapon_Category_6" "slot6" "#Valve_Weapon_Category_6"
"invnext" "#Valve_Next_Weapon" "invnext" "#Valve_Next_Weapon"
"invprev" "#Valve_Previous_Weapon" "invprev" "#Valve_Previous_Weapon"
"lastinv" "#Valve_Last_Weapon_Used" "lastinv" "#Valve_Last_Weapon_Used"
"use weapon_crowbar;use weapon_stunstick" "#HL2_Crowbar_Menu" "use weapon_crowbar;use weapon_stunstick" "#HL2_Crowbar_Menu"
"use weapon_physcannon" "#HL2_GravityGun_Menu" "use weapon_physcannon" "#HL2_GravityGun_Menu"
"use weapon_pistol" "#HL2_Pistol_Menu" "use weapon_pistol" "#HL2_Pistol_Menu"
"use weapon_357" "#HL2_357Handgun_Menu" "use weapon_357" "#HL2_357Handgun_Menu"
"use weapon_smg1" "#HL2_SMG1_Menu" "use weapon_smg1" "#HL2_SMG1_Menu"
"use weapon_ar2" "#HL2_Pulse_Rifle_Menu" "use weapon_ar2" "#HL2_Pulse_Rifle_Menu"
"use weapon_shotgun" "#HL2_Shotgun_Menu" "use weapon_shotgun" "#HL2_Shotgun_Menu"
"use weapon_crossbow" "#HL2_Crossbow_Menu" "use weapon_crossbow" "#HL2_Crossbow_Menu"
"use weapon_frag" "#HL2_Grenade_Menu" "use weapon_frag" "#HL2_Grenade_Menu"
"use weapon_rpg" "#HL2_RPG_Menu" "use weapon_rpg" "#HL2_RPG_Menu"
"use weapon_SLAM" "#HL2_SLAM_Menu" "use weapon_SLAM" "#HL2_SLAM_Menu"
"blank" "==========================" "blank" "=========================="
"blank" "#Valve_Communication_Title" "blank" "#Valve_Communication_Title"
"blank" "==========================" "blank" "=========================="
"+voicerecord" "#Valve_Use_Voice_Communication" "+voicerecord" "#Valve_Use_Voice_Communication"
"messagemode" "#Valve_Chat_Message" "messagemode" "#Valve_Chat_Message"
"messagemode2" "#Valve_Team_Message" "messagemode2" "#Valve_Team_Message"
"blank" "==========================" "blank" "=========================="
"blank" "#Valve_Miscellaneous_Title" "blank" "#Valve_Miscellaneous_Title"
"blank" "==========================" "blank" "=========================="
"jpeg" "#Valve_Take_Screen_Shot" "jpeg" "#Valve_Take_Screen_Shot"
"+showscores" "#Valve_Display_Scores" "+showscores" "#Valve_Display_Scores"
"impulse 201" "#Valve_Spray_Logo" "impulse 201" "#Valve_Spray_Logo"
"pause" "#Valve_Pause_Game" "pause" "#Valve_Pause_Game"
"quit" "#Valve_Quit_Game" "quit" "#Valve_Quit_Game"
"timeleft" "Time Left in Round" "timeleft" "Time Left in Round"
"askconnect_accept" "#Valve_Accept_Redirect" "askconnect_accept" "#Valve_Accept_Redirect"
"blank" "==========================" "blank" "=========================="
"blank" "#Valve_Miscellaneous_Keyboard_Keys_Title" "blank" "#Valve_Miscellaneous_Keyboard_Keys_Title"
"blank" "==========================" "blank" "=========================="
"+walk" "#Valve_Walk" "+walk" "#Valve_Walk"
"+left" "#Valve_Turn_Left" "+left" "#Valve_Turn_Left"
"+right" "#Valve_Turn_Right" "+right" "#Valve_Turn_Right"
"+moveup" "#Valve_Swim_Up" "+moveup" "#Valve_Swim_Up"
"+movedown" "#Valve_Swim_Down" "+movedown" "#Valve_Swim_Down"
"+lookup" "#Valve_Look_Up" "+lookup" "#Valve_Look_Up"
"+lookdown" "#Valve_Look_Down" "+lookdown" "#Valve_Look_Down"
"+strafe" "#Valve_Strafe_Modifier" "+strafe" "#Valve_Strafe_Modifier"
"+klook" "#Valve_Keyboard_Look_Modifier" "+klook" "#Valve_Keyboard_Look_Modifier"

View File

@ -1,59 +1,59 @@
"w" "+forward" "w" "+forward"
"UPARROW" "+forward" "UPARROW" "+forward"
"s" "+back" "s" "+back"
"DOWNARROW" "+back" "DOWNARROW" "+back"
"LEFTARROW" "+left" "LEFTARROW" "+left"
"RIGHTARROW" "+right" "RIGHTARROW" "+right"
"a" "+moveleft" "a" "+moveleft"
"," "+moveleft" "," "+moveleft"
"d" "+moveright" "d" "+moveright"
"." "+moveright" "." "+moveright"
"SPACE" "+jump" "SPACE" "+jump"
"CTRL" "+duck" "CTRL" "+duck"
"TAB" "+showscores" "TAB" "+showscores"
"e" "+use" "e" "+use"
"v" "+moveup" "v" "+moveup"
"'" "+moveup" "'" "+moveup"
"c" "impulse 50" "c" "impulse 50"
"/" "+movedown" "/" "+movedown"
"PGUP" "+lookup" "PGUP" "+lookup"
"PGDN" "+lookdown" "PGDN" "+lookdown"
"END" "centerview" "END" "centerview"
"z" "+strafe" "z" "+strafe"
"INS" "+klook" "INS" "+klook"
";" "+mlook" ";" "+mlook"
"r" "+reload" "r" "+reload"
"ALT" "+walk" "ALT" "+walk"
"SHIFT" "+speed" "SHIFT" "+speed"
"MOUSE1" "+attack" "MOUSE1" "+attack"
"ENTER" "+attack" "ENTER" "+attack"
"MOUSE2" "+attack2" "MOUSE2" "+attack2"
"\\" "+attack2" "\\" "+attack2"
"f" "impulse 100" "f" "impulse 100"
"1" "slot1" "1" "slot1"
"2" "slot2" "2" "slot2"
"3" "slot3" "3" "slot3"
"4" "slot4" "4" "slot4"
"5" "slot5" "5" "slot5"
"6" "slot6" "6" "slot6"
"MWHEELUP" "invprev" "MWHEELUP" "invprev"
"[" "invprev" "[" "invprev"
"MWHEELDOWN" "invnext" "MWHEELDOWN" "invnext"
"]" "invnext" "]" "invnext"
"q" "lastinv" "q" "lastinv"
"F5" "jpeg" "F5" "jpeg"
"F6" "save quick" "F6" "save quick"
"F7" "load quick" "F7" "load quick"
"F10" "quit prompt" "F10" "quit prompt"
"PAUSE" "pause" "PAUSE" "pause"
"ESCAPE" "escape" "ESCAPE" "escape"
"~" "toggleconsole" "~" "toggleconsole"
"`" "toggleconsole" "`" "toggleconsole"
"+" "sizeup" "+" "sizeup"
"=" "sizeup" "=" "sizeup"
"-" "sizedown" "-" "sizedown"
"t" "impulse 201" "t" "impulse 201"
"y" "messagemode" "y" "messagemode"
"u" "messagemode2" "u" "messagemode2"
"g" "dropprimary" "g" "dropprimary"
"z" "+zoom" "z" "+zoom"

View File

@ -1,256 +1,256 @@
0 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 0 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
1 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 1 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
2 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 2 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
3 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 3 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
4 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 4 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
5 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 5 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
6 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 6 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
7 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 7 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
8 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 8 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
9 "TAB" "TAB" DEFAULTCOLOR 9 "TAB" "TAB" DEFAULTCOLOR
10 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 10 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
11 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 11 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
12 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 12 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
13 "ENTER" "ENTER" DEFAULTCOLOR 13 "ENTER" "ENTER" DEFAULTCOLOR
14 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 14 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
15 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 15 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
16 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 16 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
17 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 17 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
18 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 18 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
19 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 19 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
20 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 20 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
21 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 21 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
22 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 22 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
23 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 23 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
24 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 24 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
25 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 25 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
26 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 26 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
27 "ESCAPE" "ESCAPE" DEFAULTCOLOR 27 "ESCAPE" "ESCAPE" DEFAULTCOLOR
28 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 28 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
29 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 29 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
30 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 30 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
31 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 31 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
32 "SPACE" "SPACE" DEFAULTCOLOR 32 "SPACE" "SPACE" DEFAULTCOLOR
33 "!" "!" DEFAULTCOLOR 33 "!" "!" DEFAULTCOLOR
34 """ """ DEFAULTCOLOR 34 """ """ DEFAULTCOLOR
35 "#" "#" DEFAULTCOLOR 35 "#" "#" DEFAULTCOLOR
36 "$" "$" DEFAULTCOLOR 36 "$" "$" DEFAULTCOLOR
37 "BACKSPACE" "BACKSPACE" DEFAULTCOLOR 37 "BACKSPACE" "BACKSPACE" DEFAULTCOLOR
38 "&" "&" DEFAULTCOLOR 38 "&" "&" DEFAULTCOLOR
39 "'" "'" DEFAULTCOLOR 39 "'" "'" DEFAULTCOLOR
40 "(" "(" DEFAULTCOLOR 40 "(" "(" DEFAULTCOLOR
41 ")" ")" DEFAULTCOLOR 41 ")" ")" DEFAULTCOLOR
42 "*" "*" DEFAULTCOLOR 42 "*" "*" DEFAULTCOLOR
43 "+" "+" DEFAULTCOLOR 43 "+" "+" DEFAULTCOLOR
44 "," "," DEFAULTCOLOR 44 "," "," DEFAULTCOLOR
45 "-" "-" DEFAULTCOLOR 45 "-" "-" DEFAULTCOLOR
46 "." "." DEFAULTCOLOR 46 "." "." DEFAULTCOLOR
47 "/" "/" DEFAULTCOLOR 47 "/" "/" DEFAULTCOLOR
48 "0" "0" DEFAULTCOLOR 48 "0" "0" DEFAULTCOLOR
49 "1" "1" DEFAULTCOLOR 49 "1" "1" DEFAULTCOLOR
50 "2" "2" DEFAULTCOLOR 50 "2" "2" DEFAULTCOLOR
51 "3" "3" DEFAULTCOLOR 51 "3" "3" DEFAULTCOLOR
52 "4" "4" DEFAULTCOLOR 52 "4" "4" DEFAULTCOLOR
53 "5" "5" DEFAULTCOLOR 53 "5" "5" DEFAULTCOLOR
54 "6" "6" DEFAULTCOLOR 54 "6" "6" DEFAULTCOLOR
55 "7" "7" DEFAULTCOLOR 55 "7" "7" DEFAULTCOLOR
56 "8" "8" DEFAULTCOLOR 56 "8" "8" DEFAULTCOLOR
57 "9" "9" DEFAULTCOLOR 57 "9" "9" DEFAULTCOLOR
58 ":" ":" DEFAULTCOLOR 58 ":" ":" DEFAULTCOLOR
59 ";" ";" DEFAULTCOLOR 59 ";" ";" DEFAULTCOLOR
60 "<" "<" DEFAULTCOLOR 60 "<" "<" DEFAULTCOLOR
61 "=" "=" DEFAULTCOLOR 61 "=" "=" DEFAULTCOLOR
62 ">" ">" DEFAULTCOLOR 62 ">" ">" DEFAULTCOLOR
63 "?" "?" DEFAULTCOLOR 63 "?" "?" DEFAULTCOLOR
64 "@" "@" DEFAULTCOLOR 64 "@" "@" DEFAULTCOLOR
65 "A" "A" DEFAULTCOLOR 65 "A" "A" DEFAULTCOLOR
66 "B" "B" DEFAULTCOLOR 66 "B" "B" DEFAULTCOLOR
67 "C" "C" DEFAULTCOLOR 67 "C" "C" DEFAULTCOLOR
68 "D" "D" DEFAULTCOLOR 68 "D" "D" DEFAULTCOLOR
69 "E" "E" DEFAULTCOLOR 69 "E" "E" DEFAULTCOLOR
70 "F" "F" DEFAULTCOLOR 70 "F" "F" DEFAULTCOLOR
71 "G" "G" DEFAULTCOLOR 71 "G" "G" DEFAULTCOLOR
72 "H" "H" DEFAULTCOLOR 72 "H" "H" DEFAULTCOLOR
73 "I" "I" DEFAULTCOLOR 73 "I" "I" DEFAULTCOLOR
74 "J" "J" DEFAULTCOLOR 74 "J" "J" DEFAULTCOLOR
75 "K" "K" DEFAULTCOLOR 75 "K" "K" DEFAULTCOLOR
76 "L" "L" DEFAULTCOLOR 76 "L" "L" DEFAULTCOLOR
77 "M" "M" DEFAULTCOLOR 77 "M" "M" DEFAULTCOLOR
78 "N" "N" DEFAULTCOLOR 78 "N" "N" DEFAULTCOLOR
79 "O" "O" DEFAULTCOLOR 79 "O" "O" DEFAULTCOLOR
80 "P" "P" DEFAULTCOLOR 80 "P" "P" DEFAULTCOLOR
81 "Q" "Q" DEFAULTCOLOR 81 "Q" "Q" DEFAULTCOLOR
82 "R" "R" DEFAULTCOLOR 82 "R" "R" DEFAULTCOLOR
83 "S" "S" DEFAULTCOLOR 83 "S" "S" DEFAULTCOLOR
84 "T" "T" DEFAULTCOLOR 84 "T" "T" DEFAULTCOLOR
85 "U" "U" DEFAULTCOLOR 85 "U" "U" DEFAULTCOLOR
86 "V" "V" DEFAULTCOLOR 86 "V" "V" DEFAULTCOLOR
87 "W" "W" DEFAULTCOLOR 87 "W" "W" DEFAULTCOLOR
88 "X" "X" DEFAULTCOLOR 88 "X" "X" DEFAULTCOLOR
89 "Y" "Y" DEFAULTCOLOR 89 "Y" "Y" DEFAULTCOLOR
90 "Z" "Z" DEFAULTCOLOR 90 "Z" "Z" DEFAULTCOLOR
91 "[" "[" DEFAULTCOLOR 91 "[" "[" DEFAULTCOLOR
92 "\" "\" DEFAULTCOLOR 92 "\" "\" DEFAULTCOLOR
93 "]" "]" DEFAULTCOLOR 93 "]" "]" DEFAULTCOLOR
94 "^" "^" DEFAULTCOLOR 94 "^" "^" DEFAULTCOLOR
95 "_" "_" DEFAULTCOLOR 95 "_" "_" DEFAULTCOLOR
96 "`" "`" DEFAULTCOLOR 96 "`" "`" DEFAULTCOLOR
97 "a" "a" DEFAULTCOLOR 97 "a" "a" DEFAULTCOLOR
98 "b" "b" DEFAULTCOLOR 98 "b" "b" DEFAULTCOLOR
99 "c" "c" DEFAULTCOLOR 99 "c" "c" DEFAULTCOLOR
100 "d" "d" DEFAULTCOLOR 100 "d" "d" DEFAULTCOLOR
101 "e" "e" DEFAULTCOLOR 101 "e" "e" DEFAULTCOLOR
102 "f" "f" DEFAULTCOLOR 102 "f" "f" DEFAULTCOLOR
103 "g" "g" DEFAULTCOLOR 103 "g" "g" DEFAULTCOLOR
104 "h" "h" DEFAULTCOLOR 104 "h" "h" DEFAULTCOLOR
105 "i" "i" DEFAULTCOLOR 105 "i" "i" DEFAULTCOLOR
106 "j" "j" DEFAULTCOLOR 106 "j" "j" DEFAULTCOLOR
107 "k" "k" DEFAULTCOLOR 107 "k" "k" DEFAULTCOLOR
108 "l" "l" DEFAULTCOLOR 108 "l" "l" DEFAULTCOLOR
109 "m" "m" DEFAULTCOLOR 109 "m" "m" DEFAULTCOLOR
110 "n" "n" DEFAULTCOLOR 110 "n" "n" DEFAULTCOLOR
111 "o" "o" DEFAULTCOLOR 111 "o" "o" DEFAULTCOLOR
112 "p" "p" DEFAULTCOLOR 112 "p" "p" DEFAULTCOLOR
113 "q" "q" DEFAULTCOLOR 113 "q" "q" DEFAULTCOLOR
114 "r" "r" DEFAULTCOLOR 114 "r" "r" DEFAULTCOLOR
115 "s" "s" DEFAULTCOLOR 115 "s" "s" DEFAULTCOLOR
116 "t" "t" DEFAULTCOLOR 116 "t" "t" DEFAULTCOLOR
117 "u" "u" DEFAULTCOLOR 117 "u" "u" DEFAULTCOLOR
118 "v" "v" DEFAULTCOLOR 118 "v" "v" DEFAULTCOLOR
119 "w" "w" DEFAULTCOLOR 119 "w" "w" DEFAULTCOLOR
120 "x" "x" DEFAULTCOLOR 120 "x" "x" DEFAULTCOLOR
121 "y" "y" DEFAULTCOLOR 121 "y" "y" DEFAULTCOLOR
122 "z" "z" DEFAULTCOLOR 122 "z" "z" DEFAULTCOLOR
123 "{" "{" DEFAULTCOLOR 123 "{" "{" DEFAULTCOLOR
124 "|" "|" DEFAULTCOLOR 124 "|" "|" DEFAULTCOLOR
125 "}" "}" DEFAULTCOLOR 125 "}" "}" DEFAULTCOLOR
126 "~" "~" DEFAULTCOLOR 126 "~" "~" DEFAULTCOLOR
127 "BACKSPACE" "BACKSPACE" DEFAULTCOLOR 127 "BACKSPACE" "BACKSPACE" DEFAULTCOLOR
128 "UPARROW" "UPARROW" DEFAULTCOLOR 128 "UPARROW" "UPARROW" DEFAULTCOLOR
129 "DOWNARROW" "DOWNARROW" DEFAULTCOLOR 129 "DOWNARROW" "DOWNARROW" DEFAULTCOLOR
130 "LEFTARROW" "LEFTARROW" DEFAULTCOLOR 130 "LEFTARROW" "LEFTARROW" DEFAULTCOLOR
131 "RIGHTARROW" "RIGHTARROW" DEFAULTCOLOR 131 "RIGHTARROW" "RIGHTARROW" DEFAULTCOLOR
132 "ALT" "ALT" DEFAULTCOLOR 132 "ALT" "ALT" DEFAULTCOLOR
133 "CTRL" "CTRL" DEFAULTCOLOR 133 "CTRL" "CTRL" DEFAULTCOLOR
134 "SHIFT" "SHIFT" DEFAULTCOLOR 134 "SHIFT" "SHIFT" DEFAULTCOLOR
135 "F1" "F1" DEFAULTCOLOR 135 "F1" "F1" DEFAULTCOLOR
136 "F2" "F2" DEFAULTCOLOR 136 "F2" "F2" DEFAULTCOLOR
137 "F3" "F3" DEFAULTCOLOR 137 "F3" "F3" DEFAULTCOLOR
138 "F4" "F4" DEFAULTCOLOR 138 "F4" "F4" DEFAULTCOLOR
139 "F5" "F5" DEFAULTCOLOR 139 "F5" "F5" DEFAULTCOLOR
140 "F6" "F6" DEFAULTCOLOR 140 "F6" "F6" DEFAULTCOLOR
141 "F7" "F7" DEFAULTCOLOR 141 "F7" "F7" DEFAULTCOLOR
142 "F8" "F8" DEFAULTCOLOR 142 "F8" "F8" DEFAULTCOLOR
143 "F9" "F9" DEFAULTCOLOR 143 "F9" "F9" DEFAULTCOLOR
144 "F10" "F10" DEFAULTCOLOR 144 "F10" "F10" DEFAULTCOLOR
145 "F11" "F11" DEFAULTCOLOR 145 "F11" "F11" DEFAULTCOLOR
146 "F12" "F12" DEFAULTCOLOR 146 "F12" "F12" DEFAULTCOLOR
147 "INS" "INS" DEFAULTCOLOR 147 "INS" "INS" DEFAULTCOLOR
148 "DEL" "DEL" DEFAULTCOLOR 148 "DEL" "DEL" DEFAULTCOLOR
149 "PGDN" "PGDN" DEFAULTCOLOR 149 "PGDN" "PGDN" DEFAULTCOLOR
150 "PGUP" "PGUP" DEFAULTCOLOR 150 "PGUP" "PGUP" DEFAULTCOLOR
151 "HOME" "HOME" DEFAULTCOLOR 151 "HOME" "HOME" DEFAULTCOLOR
152 "END" "END" DEFAULTCOLOR 152 "END" "END" DEFAULTCOLOR
153 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 153 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
154 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 154 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
155 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 155 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
156 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 156 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
157 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 157 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
158 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 158 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
159 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 159 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
160 "KP_HOME" "KP_HOME" DEFAULTCOLOR 160 "KP_HOME" "KP_HOME" DEFAULTCOLOR
161 "KP_UPARROW" "KP_UPARROW" DEFAULTCOLOR 161 "KP_UPARROW" "KP_UPARROW" DEFAULTCOLOR
162 "KP_PGUP" "KP_PGUP" DEFAULTCOLOR 162 "KP_PGUP" "KP_PGUP" DEFAULTCOLOR
163 "KP_LEFTARROW" "KP_LEFTARROW" DEFAULTCOLOR 163 "KP_LEFTARROW" "KP_LEFTARROW" DEFAULTCOLOR
164 "KP_5" "KP_5" DEFAULTCOLOR 164 "KP_5" "KP_5" DEFAULTCOLOR
165 "KP_RIGHTARROW" "KP_RIGHTARROW" DEFAULTCOLOR 165 "KP_RIGHTARROW" "KP_RIGHTARROW" DEFAULTCOLOR
166 "KP_END" "KP_END" DEFAULTCOLOR 166 "KP_END" "KP_END" DEFAULTCOLOR
167 "KP_DOWNARROW" "KP_DOWNARROW" DEFAULTCOLOR 167 "KP_DOWNARROW" "KP_DOWNARROW" DEFAULTCOLOR
168 "KP_PGDN" "KP_PGDN" DEFAULTCOLOR 168 "KP_PGDN" "KP_PGDN" DEFAULTCOLOR
169 "KP_ENTER" "KP_ENTER" DEFAULTCOLOR 169 "KP_ENTER" "KP_ENTER" DEFAULTCOLOR
170 "KP_INS" "KP_INS" DEFAULTCOLOR 170 "KP_INS" "KP_INS" DEFAULTCOLOR
171 "KP_DEL" "KP_DEL" DEFAULTCOLOR 171 "KP_DEL" "KP_DEL" DEFAULTCOLOR
172 "KP_SLASH" "KP_SLASH" DEFAULTCOLOR 172 "KP_SLASH" "KP_SLASH" DEFAULTCOLOR
173 "KP_MINUS" "KP_MINUS" DEFAULTCOLOR 173 "KP_MINUS" "KP_MINUS" DEFAULTCOLOR
174 "KP_PLUS" "KP_PLUS" DEFAULTCOLOR 174 "KP_PLUS" "KP_PLUS" DEFAULTCOLOR
175 "CAPSLOCK" "CAPSLOCK" DEFAULTCOLOR 175 "CAPSLOCK" "CAPSLOCK" DEFAULTCOLOR
176 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 176 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
177 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 177 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
178 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 178 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
179 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 179 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
180 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 180 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
181 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 181 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
182 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 182 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
183 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 183 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
184 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 184 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
185 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 185 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
186 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 186 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
187 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 187 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
188 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 188 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
189 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 189 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
190 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 190 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
191 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 191 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
192 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 192 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
193 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 193 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
194 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 194 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
195 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 195 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
196 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 196 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
197 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 197 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
198 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 198 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
199 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 199 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
200 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR1 200 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR1
201 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 201 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
202 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 202 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
203 "JOY1" "JOY1" COLOR 255 0 0 203 "JOY1" "JOY1" COLOR 255 0 0
204 "JOY2" "JOY2" COLOR 255 0 0 204 "JOY2" "JOY2" COLOR 255 0 0
205 "JOY3" "JOY3" COLOR 255 0 0 205 "JOY3" "JOY3" COLOR 255 0 0
206 "JOY4" "JOY4" COLOR 255 0 0 206 "JOY4" "JOY4" COLOR 255 0 0
207 "AUX1" "AUX1" DEFAULTCOLOR 207 "AUX1" "AUX1" DEFAULTCOLOR
208 "AUX2" "AUX2" DEFAULTCOLOR 208 "AUX2" "AUX2" DEFAULTCOLOR
209 "AUX3" "AUX3" DEFAULTCOLOR 209 "AUX3" "AUX3" DEFAULTCOLOR
210 "AUX4" "AUX4" DEFAULTCOLOR 210 "AUX4" "AUX4" DEFAULTCOLOR
211 "AUX5" "AUX5" DEFAULTCOLOR 211 "AUX5" "AUX5" DEFAULTCOLOR
212 "AUX6" "AUX6" DEFAULTCOLOR 212 "AUX6" "AUX6" DEFAULTCOLOR
213 "AUX7" "AUX7" DEFAULTCOLOR 213 "AUX7" "AUX7" DEFAULTCOLOR
214 "AUX8" "AUX8" DEFAULTCOLOR 214 "AUX8" "AUX8" DEFAULTCOLOR
215 "AUX9" "AUX9" DEFAULTCOLOR 215 "AUX9" "AUX9" DEFAULTCOLOR
216 "AUX10" "AUX10" DEFAULTCOLOR 216 "AUX10" "AUX10" DEFAULTCOLOR
217 "AUX11" "AUX11" DEFAULTCOLOR 217 "AUX11" "AUX11" DEFAULTCOLOR
218 "AUX12" "AUX12" DEFAULTCOLOR 218 "AUX12" "AUX12" DEFAULTCOLOR
219 "AUX13" "AUX13" DEFAULTCOLOR 219 "AUX13" "AUX13" DEFAULTCOLOR
220 "AUX14" "AUX14" DEFAULTCOLOR 220 "AUX14" "AUX14" DEFAULTCOLOR
221 "AUX15" "AUX15" DEFAULTCOLOR 221 "AUX15" "AUX15" DEFAULTCOLOR
222 "AUX16" "AUX16" DEFAULTCOLOR 222 "AUX16" "AUX16" DEFAULTCOLOR
223 "AUX17" "AUX17" DEFAULTCOLOR 223 "AUX17" "AUX17" DEFAULTCOLOR
224 "AUX18" "AUX18" DEFAULTCOLOR 224 "AUX18" "AUX18" DEFAULTCOLOR
225 "AUX19" "AUX19" DEFAULTCOLOR 225 "AUX19" "AUX19" DEFAULTCOLOR
226 "AUX20" "AUX20" DEFAULTCOLOR 226 "AUX20" "AUX20" DEFAULTCOLOR
227 "AUX21" "AUX21" DEFAULTCOLOR 227 "AUX21" "AUX21" DEFAULTCOLOR
228 "AUX22" "AUX22" DEFAULTCOLOR 228 "AUX22" "AUX22" DEFAULTCOLOR
229 "AUX23" "AUX23" DEFAULTCOLOR 229 "AUX23" "AUX23" DEFAULTCOLOR
230 "AUX24" "AUX24" DEFAULTCOLOR 230 "AUX24" "AUX24" DEFAULTCOLOR
231 "AUX25" "AUX25" DEFAULTCOLOR 231 "AUX25" "AUX25" DEFAULTCOLOR
232 "AUX26" "AUX26" DEFAULTCOLOR 232 "AUX26" "AUX26" DEFAULTCOLOR
233 "AUX27" "AUX27" DEFAULTCOLOR 233 "AUX27" "AUX27" DEFAULTCOLOR
234 "AUX28" "AUX28" DEFAULTCOLOR 234 "AUX28" "AUX28" DEFAULTCOLOR
235 "AUX29" "AUX29" DEFAULTCOLOR 235 "AUX29" "AUX29" DEFAULTCOLOR
236 "AUX30" "AUX30" DEFAULTCOLOR 236 "AUX30" "AUX30" DEFAULTCOLOR
237 "AUX31" "AUX31" DEFAULTCOLOR 237 "AUX31" "AUX31" DEFAULTCOLOR
238 "AUX32" "AUX32" DEFAULTCOLOR 238 "AUX32" "AUX32" DEFAULTCOLOR
239 "MWHEELDOWN" "MWHEELDOWN" DEFAULTCOLOR 239 "MWHEELDOWN" "MWHEELDOWN" DEFAULTCOLOR
240 "MWHEELUP" "MWHEELUP" DEFAULTCOLOR 240 "MWHEELUP" "MWHEELUP" DEFAULTCOLOR
241 "MOUSE1" "MOUSE1" COLOR 0 255 255 241 "MOUSE1" "MOUSE1" COLOR 0 255 255
242 "MOUSE2" "MOUSE2" COLOR 0 255 255 242 "MOUSE2" "MOUSE2" COLOR 0 255 255
243 "MOUSE3" "MOUSE3" COLOR 0 255 255 243 "MOUSE3" "MOUSE3" COLOR 0 255 255
244 "MOUSE4" "MOUSE4" COLOR 0 255 255 244 "MOUSE4" "MOUSE4" COLOR 0 255 255
245 "MOUSE5" "MOUSE5" COLOR 0 255 255 245 "MOUSE5" "MOUSE5" COLOR 0 255 255
246 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 246 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
247 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 247 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
248 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 248 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
249 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 249 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
250 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 250 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
251 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 251 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
252 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 252 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
253 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 253 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
254 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 254 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
255 "PAUSE" "PAUSE" DEFAULTCOLOR 255 "PAUSE" "PAUSE" DEFAULTCOLOR

View File

@ -1,76 +1,76 @@
// keys with $ are to be substituted in the value strings where they occur // keys with $ are to be substituted in the value strings where they occur
// They must occur before any values that reference them since this file is // They must occur before any values that reference them since this file is
// parsed in order // parsed in order
// Substitutions $game is swapped with the text string specified // Substitutions $game is swapped with the text string specified
#include "scripts/game.txt" #include "scripts/game.txt"
"loading" "Loading $game..." "loading" "Loading $game..."
"nummasters" "2" "nummasters" "2"
"master0" "half-life.east.won.net:27010" "master0" "half-life.east.won.net:27010"
"master1" "half-life.west.won.net:27010" "master1" "half-life.west.won.net:27010"
//"master0" "127.0.0.1:27010" //"master0" "127.0.0.1:27010"
//"master1" "127.0.0.1:27010" //"master1" "127.0.0.1:27010"
// Actual text labels ( note that all $key strings in the value field will be // Actual text labels ( note that all $key strings in the value field will be
// substituted as noted above ). // substituted as noted above ).
"label_console" "Go to $game console" "label_console" "Go to $game console"
"label_quit" "Quit playing $game" "label_quit" "Quit playing $game"
"label_newgame" "Start a new game" "label_newgame" "Start a new game"
"label_loadgame" "Load a saved game" "label_loadgame" "Load a saved game"
"label_videomode" "Change video mode" "label_videomode" "Change video mode"
"label_configuration" "Configuration" "label_configuration" "Configuration"
"label_langame" "Connect to games on your LAN" "label_langame" "Connect to games on your LAN"
"label_internetgame" "Connect to internet games" "label_internetgame" "Connect to internet games"
"label_multiplayergame" "Multiplayer games" "label_multiplayergame" "Multiplayer games"
"dialog_main_header" "$game" "dialog_main_header" "$game"
"dialog_videomode_header" "Video Mode" "dialog_videomode_header" "Video Mode"
"dialog_newgame_header" "New Game" "dialog_newgame_header" "New Game"
"dialog_loadgame_header" "Load Game" "dialog_loadgame_header" "Load Game"
"dialog_configuration_header" "Configuration" "dialog_configuration_header" "Configuration"
"dialog_controls_header" "Controls" "dialog_controls_header" "Controls"
"dialog_lan_header" "Lan" "dialog_lan_header" "Lan"
"dialog_internet_header" "Internet Games" "dialog_internet_header" "Internet Games"
"dialog_multiplayer_header" "Multiplayer" "dialog_multiplayer_header" "Multiplayer"
"button_done" "Done" "button_done" "Done"
"button_ok" "OK" "button_ok" "OK"
"button_cancel" "Cancel" "button_cancel" "Cancel"
"button_yes" "Yes" "button_yes" "Yes"
"button_no" "No" "button_no" "No"
"button_newgame" "New Game" "button_newgame" "New Game"
"button_videomode" "Video Mode" "button_videomode" "Video Mode"
"button_console" "Console" "button_console" "Console"
"button_quit" "Quit" "button_quit" "Quit"
"button_loadgame" "Load Game" "button_loadgame" "Load Game"
"button_easy" "Easy" "button_easy" "Easy"
"button_medium" "Medium" "button_medium" "Medium"
"button_hard" "Hard" "button_hard" "Hard"
"button_configuration" "Configuration" "button_configuration" "Configuration"
"button_controls" "Controls" "button_controls" "Controls"
"button_usedefaults" "Use Defaults" "button_usedefaults" "Use Defaults"
"button_advancedcontrols" "Adv Controls" "button_advancedcontrols" "Adv Controls"
"button_delete" "Delete" "button_delete" "Delete"
"button_load" "Load" "button_load" "Load"
"button_langame" "Lan" "button_langame" "Lan"
"button_internetgame" "Internet Game" "button_internetgame" "Internet Game"
"button_connect" "Connect" "button_connect" "Connect"
"button_refresh" "Refresh" "button_refresh" "Refresh"
"button_multiplayergame" "Multiplayer" "button_multiplayergame" "Multiplayer"
"button_update" "Update" "button_update" "Update"
"keybinding_action" "Action" "keybinding_action" "Action"
"keybinding_keybutton" "Key / button" "keybinding_keybutton" "Key / button"
"keybinding_alternate" "Alternate" "keybinding_alternate" "Alternate"
"keybinding_prompt" "Press a button or key" "keybinding_prompt" "Press a button or key"
"loadgame_time" "Time" "loadgame_time" "Time"
"loadgame_game" "Game" "loadgame_game" "Game"
"loadgame_elapsed" "Elapsed Time" "loadgame_elapsed" "Elapsed Time"
"langame_address" "Address" "langame_address" "Address"
"langame_gamedir" "Game" "langame_gamedir" "Game"
"langame_map" "Map" "langame_map" "Map"
"langame_ping" "Ping" "langame_ping" "Ping"

View File

@ -1,228 +1,228 @@
"sprites/640_hud" "sprites/640_hud"
{ {
TextureData TextureData
{ {
"d_crowbar" "d_crowbar"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "0" "y" "0"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_9mmhandgun" "d_9mmhandgun"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "16" "y" "16"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_357" "d_357"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "32" "y" "32"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_9mmAR" "d_9mmAR"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "48" "y" "48"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_shotgun" "d_shotgun"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "64" "y" "64"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_bolt" "d_bolt"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "80" "y" "80"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_crossbow" "d_crossbow"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "80" "y" "80"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_rpg_rocket" "d_rpg_rocket"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "96" "y" "96"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_gauss" "d_gauss"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "112" "y" "112"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_egon" "d_egon"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "128" "y" "128"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_hornet" "d_hornet"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "144" "y" "144"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_grenade" "d_grenade"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "160" "y" "160"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_satchel" "d_satchel"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "176" "y" "176"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_tripmine" "d_tripmine"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "192" "y" "192"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_snark" "d_snark"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "208" "y" "208"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_skull" "d_skull"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "224" "y" "224"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_tracktrain" "d_tracktrain"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "240" "y" "240"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"death_357" "death_357"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "." "character" "."
} }
"death_ar2" "death_ar2"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "2" "character" "2"
} }
"death_crossbow_bolt" "death_crossbow_bolt"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "1" "character" "1"
} }
"death_smg1" "death_smg1"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "/" "character" "/"
} }
"death_shotgun" "death_shotgun"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "0" "character" "0"
} }
"death_rpg_missile" "death_rpg_missile"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "3" "character" "3"
} }
"death_grenade_frag" "death_grenade_frag"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "4" "character" "4"
} }
"death_pistol" "death_pistol"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "-" "character" "-"
} }
"death_physics" "death_physics"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "9" "character" "9"
} }
"death_combine_ball" "death_combine_ball"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "8" "character" "8"
} }
"death_smg1_grenade" "death_smg1_grenade"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "7" "character" "7"
} }
"death_stunstick" "death_stunstick"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "!" "character" "!"
} }
"death_slam" "death_slam"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "*" "character" "*"
} }
"death_crowbar" "death_crowbar"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "6" "character" "6"
} }
"voice_player" "voice_player"
{ {
"file" "voice/icntlk_sv" "file" "voice/icntlk_sv"
"x" "0" "x" "0"
"y" "0" "y" "0"
"width" "32" "width" "32"
"height" "32" "height" "32"
} }
"voice_self" "voice_self"
{ {
"file" "voice/icntlk_local" "file" "voice/icntlk_local"
"x" "0" "x" "0"
"y" "0" "y" "0"
"width" "32" "width" "32"
"height" "32" "height" "32"
} }
} }
} }

View File

@ -1,276 +1,276 @@
"labs_mp" "labs_mp"
{ {
"playlooping" "playlooping"
{ {
"volume" ".12" "volume" ".12"
"pitch" "100" "pitch" "100"
"wave" "ambient/machines/lab_loop1.wav" "wave" "ambient/machines/lab_loop1.wav"
} }
"playlooping" "playlooping"
{ {
"volume" ".4" "volume" ".4"
"pitch" "100" "pitch" "100"
"wave" "ambient/machines/combine_shield_loop3.wav" "wave" "ambient/machines/combine_shield_loop3.wav"
"position" "0" "position" "0"
// tele snd // tele snd
} }
"playlooping" "playlooping"
{ {
"volume" ".3" "volume" ".3"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/noise2.wav" "wave" "ambient/atmosphere/noise2.wav"
"position" "0" "position" "0"
// tele snd // tele snd
} }
"playrandom" "playrandom"
{ {
"time" "8, 15" "time" "8, 15"
"volume" "0.3,0.5" "volume" "0.3,0.5"
"pitch" "100" "pitch" "100"
"soundlevel" "SNDLVL_NORM" "soundlevel" "SNDLVL_NORM"
"rndwave" "rndwave"
{ {
"wave" "npc/headcrab/alert1.wav" "wave" "npc/headcrab/alert1.wav"
"wave" "npc/headcrab/idle1.wav" "wave" "npc/headcrab/idle1.wav"
"wave" "npc/headcrab/idle2.wav" "wave" "npc/headcrab/idle2.wav"
"wave" "npc/headcrab/idle3.wav" "wave" "npc/headcrab/idle3.wav"
} }
"position" "1" "position" "1"
// lamarr // lamarr
} }
} }
"under_boiler" "under_boiler"
{ {
"playlooping" "playlooping"
{ {
"volume" "0.2" "volume" "0.2"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/ambience5.wav" "wave" "ambient/atmosphere/ambience5.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.07" "volume" "0.07"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/underground.wav" "wave" "ambient/atmosphere/underground.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.06" "volume" "0.06"
"pitch" "100" "pitch" "100"
"wave" "ambient/machines/thumper_amb.wav" "wave" "ambient/machines/thumper_amb.wav"
} }
"playlooping" "playlooping"
{ {
"volume" ".08" "volume" ".08"
"pitch" "85" "pitch" "85"
"wave" "ambient/gas/steam_loop1.wav" "wave" "ambient/gas/steam_loop1.wav"
"position" "1" "position" "1"
// Steam pipe // Steam pipe
} }
} }
"under_tunnels" "under_tunnels"
{ {
"playlooping" "playlooping"
{ {
"volume" "0.1" "volume" "0.1"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/cargo_hold2.wav" "wave" "ambient/atmosphere/cargo_hold2.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.2" "volume" "0.2"
"pitch" "80" "pitch" "80"
"wave" "ambient/wind/wind_tunnel1.wav" "wave" "ambient/wind/wind_tunnel1.wav"
} }
"playlooping" "playlooping"
{ {
"volume" ".08" "volume" ".08"
"pitch" "85" "pitch" "85"
"wave" "ambient/gas/steam_loop1.wav" "wave" "ambient/gas/steam_loop1.wav"
"position" "0" "position" "0"
// Steam pipe // Steam pipe
} }
} }
"under_basement1" "under_basement1"
{ {
"playlooping" "playlooping"
{ {
"volume" "0.07" "volume" "0.07"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/cargo_hold2.wav" "wave" "ambient/atmosphere/cargo_hold2.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.2" "volume" "0.2"
"pitch" "80" "pitch" "80"
"wave" "ambient/wind/wind_tunnel1.wav" "wave" "ambient/wind/wind_tunnel1.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.15" "volume" "0.15"
"pitch" "100" "pitch" "100"
"wave" "ambient/wind/wasteland_wind.wav" "wave" "ambient/wind/wasteland_wind.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.1" "volume" "0.1"
"pitch" "90" "pitch" "90"
"wave" "ambient/atmosphere/quiet_cellblock_amb.wav" "wave" "ambient/atmosphere/quiet_cellblock_amb.wav"
} }
"playlooping" "playlooping"
{ {
"volume" ".08" "volume" ".08"
"pitch" "85" "pitch" "85"
"wave" "ambient/gas/steam_loop1.wav" "wave" "ambient/gas/steam_loop1.wav"
"position" "0" "position" "0"
// Steam pipe // Steam pipe
} }
} }
"combine_tunnel" "combine_tunnel"
{ {
"dsp" "1" "dsp" "1"
"playlooping" "playlooping"
{ {
"volume" "0.3" "volume" "0.3"
"pitch" "100" "pitch" "100"
"wave" "ambient/levels/citadel/citadel_drone_loop6.wav" "wave" "ambient/levels/citadel/citadel_drone_loop6.wav"
} }
"playrandom" "playrandom"
{ {
"time" "8, 30" "time" "8, 30"
"volume" "0.05,0.1" "volume" "0.05,0.1"
"pitch" "90,110" "pitch" "90,110"
"soundlevel" "SNDLVL_140dB" "soundlevel" "SNDLVL_140dB"
"rndwave" "rndwave"
{ {
"wave" "ambient/levels/citadel/strange_talk1.wav" "wave" "ambient/levels/citadel/strange_talk1.wav"
"wave" "ambient/levels/citadel/strange_talk3.wav" "wave" "ambient/levels/citadel/strange_talk3.wav"
"wave" "ambient/levels/citadel/strange_talk4.wav" "wave" "ambient/levels/citadel/strange_talk4.wav"
"wave" "ambient/levels/citadel/strange_talk5.wav" "wave" "ambient/levels/citadel/strange_talk5.wav"
"wave" "ambient/levels/citadel/strange_talk6.wav" "wave" "ambient/levels/citadel/strange_talk6.wav"
"wave" "ambient/levels/citadel/strange_talk7.wav" "wave" "ambient/levels/citadel/strange_talk7.wav"
"wave" "ambient/levels/citadel/strange_talk8.wav" "wave" "ambient/levels/citadel/strange_talk8.wav"
"wave" "ambient/levels/citadel/strange_talk9.wav" "wave" "ambient/levels/citadel/strange_talk9.wav"
"wave" "ambient/levels/citadel/strange_talk10.wav" "wave" "ambient/levels/citadel/strange_talk10.wav"
"wave" "ambient/levels/citadel/strange_talk11.wav" "wave" "ambient/levels/citadel/strange_talk11.wav"
} }
} }
"playrandom" "playrandom"
{ {
"time" "20, 35" "time" "20, 35"
"volume" "0.08,0.15" "volume" "0.08,0.15"
"pitch" "90,110" "pitch" "90,110"
"soundlevel" "SNDLVL_140dB" "soundlevel" "SNDLVL_140dB"
"position" "0" "position" "0"
"rndwave" "rndwave"
{ {
"wave" "npc/combine_soldier/vo/weaponsoffsafeprepforcontact.wav" "wave" "npc/combine_soldier/vo/weaponsoffsafeprepforcontact.wav"
"wave" "npc/combine_soldier/vo/teamdeployedandscanning.wav" "wave" "npc/combine_soldier/vo/teamdeployedandscanning.wav"
"wave" "npc/combine_soldier/vo/unitismovingin.wav" "wave" "npc/combine_soldier/vo/unitismovingin.wav"
"wave" "npc/combine_soldier/vo/sweepingin.wav" "wave" "npc/combine_soldier/vo/sweepingin.wav"
"wave" "npc/combine_soldier/vo/targetcompromisedmovein.wav" "wave" "npc/combine_soldier/vo/targetcompromisedmovein.wav"
"wave" "npc/combine_soldier/vo/stabilizationteamhassector.wav" "wave" "npc/combine_soldier/vo/stabilizationteamhassector.wav"
"wave" "npc/combine_soldier/vo/overwatchrequestreinforcement.wav" "wave" "npc/combine_soldier/vo/overwatchrequestreinforcement.wav"
"wave" "npc/combine_soldier/vo/overwatchtarget1sterilized.wav" "wave" "npc/combine_soldier/vo/overwatchtarget1sterilized.wav"
} }
} }
"playrandom" "playrandom"
{ {
"time" "45, 120" "time" "45, 120"
"volume" "0.01,0.1" "volume" "0.01,0.1"
"pitch" "90,115" "pitch" "90,115"
"soundlevel" "SNDLVL_140dB" "soundlevel" "SNDLVL_140dB"
"rndwave" "rndwave"
{ {
"wave" "*ambient/levels/citadel/citadel_ambient_voices1.wav" "wave" "*ambient/levels/citadel/citadel_ambient_voices1.wav"
} }
} }
"playlooping" "playlooping"
{ {
"volume" "0.08" "volume" "0.08"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/underground.wav" "wave" "ambient/atmosphere/underground.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.25" "volume" "0.25"
"pitch" "80" "pitch" "80"
"wave" "ambient/wind/wind_tunnel1.wav" "wave" "ambient/wind/wind_tunnel1.wav"
} }
} }

View File

@ -1,18 +1,18 @@
soundscaples_manifest soundscaples_manifest
{ {
"file" "scripts/soundscapes.txt" "file" "scripts/soundscapes.txt"
// List additional soundscape files here // List additional soundscape files here
"file" "scripts/soundscapes_canals.txt" "file" "scripts/soundscapes_canals.txt"
"file" "scripts/soundscapes_klab.txt" "file" "scripts/soundscapes_klab.txt"
"file" "scripts/soundscapes_elab.txt" "file" "scripts/soundscapes_elab.txt"
"file" "scripts/soundscapes_streetwar.txt" "file" "scripts/soundscapes_streetwar.txt"
"file" "scripts/soundscapes_citadel.txt" "file" "scripts/soundscapes_citadel.txt"
"file" "scripts/soundscapes_town.txt" "file" "scripts/soundscapes_town.txt"
"file" "scripts/soundscapes_coast.txt" "file" "scripts/soundscapes_coast.txt"
"file" "scripts/soundscapes_prison.txt" "file" "scripts/soundscapes_prison.txt"
"file" "scripts/soundscapes_trainyard.txt" "file" "scripts/soundscapes_trainyard.txt"
"file" "scripts/soundscapes_labs.txt" "file" "scripts/soundscapes_labs.txt"
"file" "scripts/soundscapes_strike.txt" "file" "scripts/soundscapes_strike.txt"
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,53 +1,53 @@
"strike_ware" "strike_ware"
{ {
"dsp" "1" "dsp" "1"
// The ambient sounds of the warehouse // The ambient sounds of the warehouse
"playlooping" "playlooping"
{ {
"volume" "0.1" "volume" "0.1"
"pitch" "100" "pitch" "100"
"soundlevel" "SNDLVL_90dB" "soundlevel" "SNDLVL_90dB"
"wave" "ambient/atmosphere/ambience_base.wav" "wave" "ambient/atmosphere/ambience_base.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.15" "volume" "0.15"
"wave" "ambient/atmosphere/indoor2.wav" "wave" "ambient/atmosphere/indoor2.wav"
"pitch" "100" "pitch" "100"
} }
} }
"strike_outside" "strike_outside"
{ {
"playlooping" "playlooping"
{ {
"volume" "0.25" "volume" "0.25"
"wave" "ambient/wind/wind1.wav" "wave" "ambient/wind/wind1.wav"
"pitch" "100" "pitch" "100"
} }
"playsoundscape" "playsoundscape"
{ {
"name" "d1_canals.util_tunnel_windgusts" "name" "d1_canals.util_tunnel_windgusts"
"volume" "0.7" "volume" "0.7"
} }
"playsoundscape" "playsoundscape"
{ {
"name" "d1_canals.util_birds" "name" "d1_canals.util_birds"
"volume" "0.25" "volume" "0.25"
} }
} }

View File

@ -1,62 +1,62 @@
// 357 // 357
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_357Handgun" "printname" "#HL2_357Handgun"
"viewmodel" "models/weapons/v_357.mdl" "viewmodel" "models/weapons/v_357.mdl"
"playermodel" "models/weapons/w_357.mdl" "playermodel" "models/weapons/w_357.mdl"
"anim_prefix" "python" "anim_prefix" "python"
"bucket" "1" "bucket" "1"
"bucket_position" "1" "bucket_position" "1"
"clip_size" "6" "clip_size" "6"
"default_clip" "6" "default_clip" "6"
"primary_ammo" "357" "primary_ammo" "357"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "7" "weight" "7"
"item_flags" "0" "item_flags" "0"
"damage" "75" "damage" "75"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"empty" "Weapon_Pistol.Empty" "empty" "Weapon_Pistol.Empty"
"single_shot" "Weapon_357.Single" "single_shot" "Weapon_357.Single"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "e" "character" "e"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "e" "character" "e"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "q" "character" "q"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,78 +1,78 @@
// Assault Rifle 2 // Assault Rifle 2
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Pulse_Rifle" "printname" "#HL2_Pulse_Rifle"
"viewmodel" "models/weapons/v_irifle.mdl" "viewmodel" "models/weapons/v_irifle.mdl"
"playermodel" "models/weapons/w_irifle.mdl" "playermodel" "models/weapons/w_irifle.mdl"
"anim_prefix" "ar2" "anim_prefix" "ar2"
"bucket" "2" "bucket" "2"
"bucket_position" "1" "bucket_position" "1"
"clip_size" "30" "clip_size" "30"
"default_clip" "60" "default_clip" "60"
"clip2_size" "-1" "clip2_size" "-1"
"default_clip2" "-1" "default_clip2" "-1"
"primary_ammo" "AR2" "primary_ammo" "AR2"
"secondary_ammo" "AR2AltFire" "secondary_ammo" "AR2AltFire"
"weight" "5" "weight" "5"
"item_flags" "0" "item_flags" "0"
"damage" "11" "damage" "11"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"special1" "Weapon_CombineGuard.Special1" "special1" "Weapon_CombineGuard.Special1"
"empty" "Weapon_IRifle.Empty" "empty" "Weapon_IRifle.Empty"
"double_shot" "Weapon_IRifle.Single" "double_shot" "Weapon_IRifle.Single"
"reload" "Weapon_AR2.Reload" "reload" "Weapon_AR2.Reload"
"single_shot" "Weapon_AR2.Single" "single_shot" "Weapon_AR2.Single"
// NPC SECTION // NPC SECTION
"single_shot_npc" "Weapon_AR2.NPC_Single" "single_shot_npc" "Weapon_AR2.NPC_Single"
"reload_npc" "Weapon_AR2.NPC_Reload" "reload_npc" "Weapon_AR2.NPC_Reload"
"double_shot_npc" "Weapon_AR2.NPC_Double" "double_shot_npc" "Weapon_AR2.NPC_Double"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "l" "character" "l"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "l" "character" "l"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "u" "character" "u"
} }
"ammo2" "ammo2"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "z" "character" "z"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,77 +1,77 @@
// Crossbow // Crossbow
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Crossbow" "printname" "#HL2_Crossbow"
"viewmodel" "models/weapons/v_crossbow.mdl" "viewmodel" "models/weapons/v_crossbow.mdl"
"playermodel" "models/weapons/w_crossbow.mdl" "playermodel" "models/weapons/w_crossbow.mdl"
"anim_prefix" "bow" "anim_prefix" "bow"
"bucket" "3" "bucket" "3"
"bucket_position" "1" "bucket_position" "1"
"clip_size" "1" "clip_size" "1"
"default_clip" "5" "default_clip" "5"
"primary_ammo" "XBowBolt" "primary_ammo" "XBowBolt"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "6" "weight" "6"
"item_flags" "0" "item_flags" "0"
"damage" "100" "damage" "100"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"single_shot" "Weapon_Crossbow.Single" "single_shot" "Weapon_Crossbow.Single"
"reload" "Weapon_Crossbow.Reload" "reload" "Weapon_Crossbow.Reload"
"special1" "Weapon_Crossbow.BoltElectrify" "special1" "Weapon_Crossbow.BoltElectrify"
"special2" "Weapon_Crossbow.BoltFly" "special2" "Weapon_Crossbow.BoltFly"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "g" "character" "g"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "g" "character" "g"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "w" "character" "w"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "96" "y" "96"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"zoom" "zoom"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"zoom_autoaim" "zoom_autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "24" "x" "24"
"y" "112" "y" "112"
"width" "104" "width" "104"
"height" "16" "height" "16"
} }
} }
} }

View File

@ -1,68 +1,68 @@
// Crowbar // Crowbar
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Crowbar" "printname" "#HL2_Crowbar"
"viewmodel" "models/weapons/v_crowbar.mdl" "viewmodel" "models/weapons/v_crowbar.mdl"
"playermodel" "models/weapons/w_crowbar.mdl" "playermodel" "models/weapons/w_crowbar.mdl"
"anim_prefix" "crowbar" "anim_prefix" "crowbar"
"bucket" "0" "bucket" "0"
"bucket_position" "0" "bucket_position" "0"
"clip_size" "-1" "clip_size" "-1"
"primary_ammo" "None" "primary_ammo" "None"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "0" "weight" "0"
"item_flags" "0" "item_flags" "0"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"single_shot" "Weapon_Crowbar.Single" "single_shot" "Weapon_Crowbar.Single"
"melee_hit" "Weapon_Crowbar.Melee_Hit" "melee_hit" "Weapon_Crowbar.Melee_Hit"
"melee_hit_world" "Weapon_Crowbar.Melee_HitWorld" "melee_hit_world" "Weapon_Crowbar.Melee_HitWorld"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "c" "character" "c"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "c" "character" "c"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "c" "character" "c"
} }
"ammo2" "ammo2"
{ {
"file" "sprites/640hud7" "file" "sprites/640hud7"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,69 +1,69 @@
// Cubemap visualization tool // Cubemap visualization tool
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Cubemap" "printname" "#HL2_Cubemap"
"viewmodel" "models/shadertest/envballs.mdl" "viewmodel" "models/shadertest/envballs.mdl"
"playermodel" "models/shadertest/envballs.mdl" "playermodel" "models/shadertest/envballs.mdl"
"anim_prefix" "envballs" "anim_prefix" "envballs"
"bucket" "2" "bucket" "2"
"bucket_position" "2" "bucket_position" "2"
"clip_size" "-1" "clip_size" "-1"
"clip2_size" "-1" "clip2_size" "-1"
"default_clip" "-1" "default_clip" "-1"
"default_clip2" "-1" "default_clip2" "-1"
"primary_ammo" "None" "primary_ammo" "None"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "0" "weight" "0"
"item_flags" "0" "item_flags" "0"
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"file" "sprites/w_icons1" "file" "sprites/w_icons1"
"x" "128" "x" "128"
"y" "128" "y" "128"
"width" "128" "width" "128"
"height" "64" "height" "64"
} }
"weapon_s" "weapon_s"
{ {
"file" "sprites/w_icons1b" "file" "sprites/w_icons1b"
"x" "128" "x" "128"
"y" "128" "y" "128"
"width" "128" "width" "128"
"height" "64" "height" "64"
} }
"ammo" "ammo"
{ {
"file" "sprites/a_icons1" "file" "sprites/a_icons1"
"x" "55" "x" "55"
"y" "60" "y" "60"
"width" "73" "width" "73"
"height" "15" "height" "15"
} }
"crosshair" "crosshair"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,63 +1,63 @@
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Grenade" "printname" "#HL2_Grenade"
"viewmodel" "models/weapons/v_grenade.mdl" "viewmodel" "models/weapons/v_grenade.mdl"
"playermodel" "models/weapons/w_grenade.mdl" "playermodel" "models/weapons/w_grenade.mdl"
"anim_prefix" "Grenade" "anim_prefix" "Grenade"
"bucket" "4" "bucket" "4"
"bucket_position" "0" "bucket_position" "0"
"clip_size" "-1" "clip_size" "-1"
"clip2_size" "-1" "clip2_size" "-1"
"default_clip" "1" "default_clip" "1"
"default_clip2" "-1" "default_clip2" "-1"
"primary_ammo" "grenade" "primary_ammo" "grenade"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "1" "weight" "1"
"item_flags" "18" // ITEM_FLAG_NOAUTORELOAD | ITEM_FLAG_EXHAUSTIBLE "item_flags" "18" // ITEM_FLAG_NOAUTORELOAD | ITEM_FLAG_EXHAUSTIBLE
"damage" "150" "damage" "150"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"special1" "WeaponFrag.Roll" "special1" "WeaponFrag.Roll"
"double_shot" "common/null.wav" "double_shot" "common/null.wav"
"single_shot" "common/null.wav" "single_shot" "common/null.wav"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "k" "character" "k"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "k" "character" "k"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "v" "character" "v"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,78 +1,78 @@
// Physics Gun // Physics Gun
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_GravityGun" "printname" "#HL2_GravityGun"
"viewmodel" "models/weapons/v_physcannon.mdl" "viewmodel" "models/weapons/v_physcannon.mdl"
"playermodel" "models/weapons/w_Physics.mdl" "playermodel" "models/weapons/w_Physics.mdl"
"anim_prefix" "gauss" "anim_prefix" "gauss"
"bucket" "0" "bucket" "0"
"bucket_position" "2" "bucket_position" "2"
"clip_size" "0" "clip_size" "0"
"clip2_size" "0" "clip2_size" "0"
"primary_ammo" "None" "primary_ammo" "None"
"secondary_ammo" "None" "secondary_ammo" "None"
"default_clip" "0" "default_clip" "0"
"default_clip2" "0" "default_clip2" "0"
"weight" "0" "weight" "0"
"autoswitchto" "0" "autoswitchto" "0"
"autoswitchfrom" "0" "autoswitchfrom" "0"
"item_flags" "2" "item_flags" "2"
SoundData SoundData
{ {
// launch held object // launch held object
"single_shot" "Weapon_PhysCannon.Launch" "single_shot" "Weapon_PhysCannon.Launch"
// Ignore? // Ignore?
"reload" "Weapon_PhysCannon.Charge" "reload" "Weapon_PhysCannon.Charge"
// dry fire - no target // dry fire - no target
"empty" "Weapon_PhysCannon.DryFire" "empty" "Weapon_PhysCannon.DryFire"
// pick up object // pick up object
"special1" "Weapon_PhysCannon.Pickup" "special1" "Weapon_PhysCannon.Pickup"
// open claws, target object // open claws, target object
"special2" "Weapon_PhysCannon.OpenClaws" "special2" "Weapon_PhysCannon.OpenClaws"
// close claws, target out of range/invalid // close claws, target out of range/invalid
"melee_hit" "Weapon_PhysCannon.CloseClaws" "melee_hit" "Weapon_PhysCannon.CloseClaws"
// drop object // drop object
"melee_miss" "Weapon_PhysCannon.Drop" "melee_miss" "Weapon_PhysCannon.Drop"
// too heavy // too heavy
"special3" "Weapon_PhysCannon.TooHeavy" "special3" "Weapon_PhysCannon.TooHeavy"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "m" "character" "m"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "m" "character" "m"
} }
"ammo" "ammo"
{ {
"file" "sprites/a_icons1" "file" "sprites/a_icons1"
"x" "0" "x" "0"
"y" "0" "y" "0"
"width" "32" "width" "32"
"height" "32" "height" "32"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,67 +1,67 @@
// Pistol // Pistol
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Pistol" "printname" "#HL2_Pistol"
"viewmodel" "models/weapons/v_pistol.mdl" "viewmodel" "models/weapons/v_pistol.mdl"
"playermodel" "models/weapons/w_pistol.mdl" "playermodel" "models/weapons/w_pistol.mdl"
"anim_prefix" "pistol" "anim_prefix" "pistol"
"bucket" "1" "bucket" "1"
"bucket_position" "0" "bucket_position" "0"
"clip_size" "18" "clip_size" "18"
"primary_ammo" "Pistol" "primary_ammo" "Pistol"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "2" "weight" "2"
"item_flags" "0" "item_flags" "0"
"damage" "8" "damage" "8"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"reload" "Weapon_Pistol.Reload" "reload" "Weapon_Pistol.Reload"
"reload_npc" "Weapon_Pistol.NPC_Reload" "reload_npc" "Weapon_Pistol.NPC_Reload"
"empty" "Weapon_Pistol.Empty" "empty" "Weapon_Pistol.Empty"
"single_shot" "Weapon_Pistol.Single" "single_shot" "Weapon_Pistol.Single"
"single_shot_npc" "Weapon_Pistol.NPC_Single" "single_shot_npc" "Weapon_Pistol.NPC_Single"
"special1" "Weapon_Pistol.Special1" "special1" "Weapon_Pistol.Special1"
"special2" "Weapon_Pistol.Special2" "special2" "Weapon_Pistol.Special2"
"burst" "Weapon_Pistol.Burst" "burst" "Weapon_Pistol.Burst"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "d" "character" "d"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "d" "character" "d"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "p" "character" "p"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,70 +1,70 @@
// Missile Launcher // Missile Launcher
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_RPG" "printname" "#HL2_RPG"
"viewmodel" "models/weapons/v_rpg.mdl" "viewmodel" "models/weapons/v_rpg.mdl"
"playermodel" "models/weapons/w_rocket_launcher.mdl" "playermodel" "models/weapons/w_rocket_launcher.mdl"
"anim_prefix" "missile launcher" "anim_prefix" "missile launcher"
"bucket" "4" "bucket" "4"
"bucket_position" "1" "bucket_position" "1"
"autoswitchfrom" "1" "autoswitchfrom" "1"
"clip_size" "-1" "clip_size" "-1"
"clip2_size" "-1" "clip2_size" "-1"
"default_clip" "3" "default_clip" "3"
"default_clip2" "-1" "default_clip2" "-1"
"primary_ammo" "rpg_round" "primary_ammo" "rpg_round"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "0" "weight" "0"
"item_flags" "0" "item_flags" "0"
"damage" "150" "damage" "150"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"single_shot" "Weapon_RPG.Single" "single_shot" "Weapon_RPG.Single"
"single_shot_npc" "Weapon_RPG.NPC_Single" "single_shot_npc" "Weapon_RPG.NPC_Single"
//Laser on //Laser on
"special1" "Weapon_RPG.LaserOn" "special1" "Weapon_RPG.LaserOn"
//Laser off //Laser off
"special2" "Weapon_RPG.LaserOff" "special2" "Weapon_RPG.LaserOff"
"empty" "Weapon_SMG1.Empty" "empty" "Weapon_SMG1.Empty"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "i" "character" "i"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "i" "character" "i"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "x" "character" "x"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,67 +1,67 @@
// Shotgun // Shotgun
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Shotgun" "printname" "#HL2_Shotgun"
"viewmodel" "models/weapons/v_shotgun.mdl" "viewmodel" "models/weapons/v_shotgun.mdl"
"playermodel" "models/weapons/w_shotgun.mdl" "playermodel" "models/weapons/w_shotgun.mdl"
"anim_prefix" "shotgun" "anim_prefix" "shotgun"
"bucket" "3" "bucket" "3"
"bucket_position" "0" "bucket_position" "0"
"clip_size" "6" "clip_size" "6"
"primary_ammo" "Buckshot" "primary_ammo" "Buckshot"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "4" "weight" "4"
"item_flags" "0" "item_flags" "0"
"damage" "9" "damage" "9"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"empty" "Weapon_Shotgun.Empty" "empty" "Weapon_Shotgun.Empty"
"reload" "Weapon_Shotgun.Reload" "reload" "Weapon_Shotgun.Reload"
"special1" "Weapon_Shotgun.Special1" "special1" "Weapon_Shotgun.Special1"
"single_shot" "Weapon_Shotgun.Single" "single_shot" "Weapon_Shotgun.Single"
"double_shot" "Weapon_Shotgun.Double" "double_shot" "Weapon_Shotgun.Double"
// NPC WEAPON SOUNDS // NPC WEAPON SOUNDS
"reload_npc" "Weapon_Shotgun.NPC_Reload" "reload_npc" "Weapon_Shotgun.NPC_Reload"
"single_shot_npc" "Weapon_Shotgun.NPC_Single" "single_shot_npc" "Weapon_Shotgun.NPC_Single"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "b" "character" "b"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "b" "character" "b"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "s" "character" "s"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,56 +1,56 @@
// Slam // Slam
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_SLAM" "printname" "#HL2_SLAM"
"viewmodel" "models/weapons/v_slam.mdl" "viewmodel" "models/weapons/v_slam.mdl"
"playermodel" "models/weapons/w_slam.mdl" "playermodel" "models/weapons/w_slam.mdl"
"anim_prefix" "slam" "anim_prefix" "slam"
"bucket" "4" "bucket" "4"
"bucket_position" "2" "bucket_position" "2"
"clip_size" "3" "clip_size" "3"
"primary_ammo" "None" "primary_ammo" "None"
"secondary_ammo" "slam" "secondary_ammo" "slam"
"default_clip2" "3" "default_clip2" "3"
"weight" "1" "weight" "1"
"item_flags" "2" "item_flags" "2"
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "o" "character" "o"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "o" "character" "o"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "o" "character" "o"
} }
"crosshair" "crosshair"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,77 +1,77 @@
// Small Machine Gun 1 // Small Machine Gun 1
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_SMG1" "printname" "#HL2_SMG1"
"viewmodel" "models/weapons/v_smg1.mdl" "viewmodel" "models/weapons/v_smg1.mdl"
"playermodel" "models/weapons/w_smg1.mdl" //FIXME: "playermodel" "models/weapons/w_smg1.mdl" //FIXME:
"anim_prefix" "smg2" "anim_prefix" "smg2"
"bucket" "2" "bucket" "2"
"bucket_position" "0" "bucket_position" "0"
"clip_size" "45" "clip_size" "45"
"clip2_size" "-1" "clip2_size" "-1"
"default_clip" "45" "default_clip" "45"
"default_clip2" "-1" "default_clip2" "-1"
"primary_ammo" "SMG1" "primary_ammo" "SMG1"
"secondary_ammo" "SMG1_Grenade" "secondary_ammo" "SMG1_Grenade"
"weight" "3" "weight" "3"
"item_flags" "0" "item_flags" "0"
"damage" "5" "damage" "5"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"reload" "Weapon_SMG1.Reload" "reload" "Weapon_SMG1.Reload"
"reload_npc" "Weapon_SMG1.NPC_Reload" "reload_npc" "Weapon_SMG1.NPC_Reload"
"empty" "Weapon_SMG1.Empty" "empty" "Weapon_SMG1.Empty"
"single_shot" "Weapon_SMG1.Single" "single_shot" "Weapon_SMG1.Single"
"single_shot_npc" "Weapon_SMG1.NPC_Single" "single_shot_npc" "Weapon_SMG1.NPC_Single"
"special1" "Weapon_SMG1.Special1" "special1" "Weapon_SMG1.Special1"
"special2" "Weapon_SMG1.Special2" "special2" "Weapon_SMG1.Special2"
"double_shot" "Weapon_SMG1.Double" "double_shot" "Weapon_SMG1.Double"
"burst" "Weapon_SMG1.Burst" "burst" "Weapon_SMG1.Burst"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "a" "character" "a"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "a" "character" "a"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "r" "character" "r"
} }
"ammo2" "ammo2"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "t" "character" "t"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,73 +1,73 @@
// stunstick // stunstick
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_StunBaton" "printname" "#HL2_StunBaton"
"viewmodel" "models/weapons/v_stunstick.mdl" "viewmodel" "models/weapons/v_stunstick.mdl"
"playermodel" "models/weapons/w_stunbaton.mdl" "playermodel" "models/weapons/w_stunbaton.mdl"
"anim_prefix" "stunbaton" "anim_prefix" "stunbaton"
"bucket" "0" "bucket" "0"
"bucket_position" "1" "bucket_position" "1"
"clip_size" "-1" "clip_size" "-1"
"primary_ammo" "None" "primary_ammo" "None"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "0" "weight" "0"
"item_flags" "0" "item_flags" "0"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"single_shot" "Weapon_StunStick.Swing" "single_shot" "Weapon_StunStick.Swing"
"melee_miss" "Weapon_StunStick.Melee_Miss" "melee_miss" "Weapon_StunStick.Melee_Miss"
"melee_hit" "Weapon_StunStick.Melee_Hit" "melee_hit" "Weapon_StunStick.Melee_Hit"
"melee_hit_world" "Weapon_StunStick.Melee_HitWorld" "melee_hit_world" "Weapon_StunStick.Melee_HitWorld"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "n" "character" "n"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "n" "character" "n"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "n" "character" "n"
} }
"ammo2" "ammo2"
{ {
"file" "sprites/640hud7" "file" "sprites/640hud7"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"crosshair" "crosshair"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1915,6 +1915,22 @@ int ByteswapMDLFile( void *pDestBase, void *pSrcBase, const int fileSize )
SET_INDEX_POINTERS_FIXUP( pData, pLinearBone, qalignmentindex ) SET_INDEX_POINTERS_FIXUP( pData, pLinearBone, qalignmentindex )
WriteBuffer<float>( &pDataDest, &pDataSrc, 4*numBones ); WriteBuffer<float>( &pDataDest, &pDataSrc, 4*numBones );
} }
/** BONE FLEX DRIVERS **/
if ( pStudioHdr2->m_nBoneFlexDriverIndex )
{
SET_INDEX_POINTERS_FIXUP( pData, pStudioHdr2, m_nBoneFlexDriverIndex )
DECLARE_OBJECT_POINTERS( pBoneFlexDriver, pData, mstudioboneflexdriver_t )
ITERATE_BLOCK( pBoneFlexDriver, pStudioHdr2->m_nBoneFlexDriverCount )
{
WriteObjects( pBoneFlexDriverDest, pBoneFlexDriverSrc );
/** BONE FLEX DRIVER CONTROLS **/
SET_INDEX_POINTERS_FIXUP( pData, pBoneFlexDriver, m_nControlIndex );
WriteObjects< mstudioboneflexdrivercontrol_t >( &pDataDest, &pDataSrc, SrcNative( &pBoneFlexDriver->m_nControlCount ) );
}
}
} }
} }
@ -2516,7 +2532,8 @@ BEGIN_BYTESWAP_DATADESC( studiohdr_t )
DEFINE_INDEX( unused4, FIELD_INTEGER ), DEFINE_INDEX( unused4, FIELD_INTEGER ),
DEFINE_FIELD( numflexcontrollerui, FIELD_INTEGER ), DEFINE_FIELD( numflexcontrollerui, FIELD_INTEGER ),
DEFINE_INDEX( flexcontrolleruiindex, FIELD_INTEGER ), DEFINE_INDEX( flexcontrolleruiindex, FIELD_INTEGER ),
DEFINE_ARRAY( unused3, FIELD_INTEGER, 2 ), DEFINE_FIELD( flVertAnimFixedPointScale, FIELD_FLOAT ),
DEFINE_ARRAY( unused3, FIELD_INTEGER, 1 ),
DEFINE_INDEX( studiohdr2index, FIELD_INTEGER ), DEFINE_INDEX( studiohdr2index, FIELD_INTEGER ),
DEFINE_ARRAY( unused2, FIELD_INTEGER, 1 ), DEFINE_ARRAY( unused2, FIELD_INTEGER, 1 ),
END_BYTESWAP_DATADESC() END_BYTESWAP_DATADESC()
@ -2530,7 +2547,9 @@ BEGIN_BYTESWAP_DATADESC( studiohdr2_t )
DEFINE_FIELD( flMaxEyeDeflection, FIELD_FLOAT ), DEFINE_FIELD( flMaxEyeDeflection, FIELD_FLOAT ),
DEFINE_INDEX( linearboneindex, FIELD_INTEGER ), DEFINE_INDEX( linearboneindex, FIELD_INTEGER ),
DEFINE_INDEX( sznameindex, FIELD_INTEGER ), DEFINE_INDEX( sznameindex, FIELD_INTEGER ),
DEFINE_ARRAY( reserved, FIELD_INTEGER, 58 ), DEFINE_INDEX( m_nBoneFlexDriverCount, FIELD_INTEGER ),
DEFINE_INDEX( m_nBoneFlexDriverIndex, FIELD_INTEGER ),
DEFINE_ARRAY( reserved, FIELD_INTEGER, 56 ),
END_BYTESWAP_DATADESC() END_BYTESWAP_DATADESC()
BEGIN_BYTESWAP_DATADESC( mstudiobone_t ) BEGIN_BYTESWAP_DATADESC( mstudiobone_t )
@ -2567,6 +2586,20 @@ BEGIN_BYTESWAP_DATADESC( mstudiolinearbone_t )
DEFINE_ARRAY( unused, FIELD_INTEGER, 6 ), DEFINE_ARRAY( unused, FIELD_INTEGER, 6 ),
END_BYTESWAP_DATADESC() END_BYTESWAP_DATADESC()
BEGIN_BYTESWAP_DATADESC( mstudioboneflexdrivercontrol_t )
DEFINE_INDEX( m_nBoneComponent, FIELD_INTEGER ),
DEFINE_FIELD( m_nFlexControllerIndex, FIELD_INTEGER ),
DEFINE_INDEX( m_flMin, FIELD_FLOAT ),
DEFINE_INDEX( m_flMax, FIELD_FLOAT ),
END_BYTESWAP_DATADESC()
BEGIN_BYTESWAP_DATADESC( mstudioboneflexdriver_t )
DEFINE_INDEX( m_nBoneIndex, FIELD_INTEGER ),
DEFINE_FIELD( m_nControlCount, FIELD_INTEGER ),
DEFINE_INDEX( m_nControlIndex, FIELD_FLOAT ),
DEFINE_ARRAY( unused, FIELD_INTEGER, 3 ),
END_BYTESWAP_DATADESC()
BEGIN_BYTESWAP_DATADESC( mstudioaxisinterpbone_t ) BEGIN_BYTESWAP_DATADESC( mstudioaxisinterpbone_t )
DEFINE_FIELD( control, FIELD_INTEGER ), DEFINE_FIELD( control, FIELD_INTEGER ),
DEFINE_FIELD( axis, FIELD_INTEGER ), DEFINE_FIELD( axis, FIELD_INTEGER ),

2
mp/src/createallprojects.bat Normal file → Executable file
View File

@ -1 +1 @@
devtools\bin\vpc.exe /hl2mp +everything /mksln everything.sln devtools\bin\vpc.exe /hl2mp +everything /mksln everything.sln

2
mp/src/creategameprojects.bat Normal file → Executable file
View File

@ -1 +1 @@
devtools\bin\vpc.exe /hl2mp +game /mksln games.sln devtools\bin\vpc.exe /hl2mp +game /mksln games.sln

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
mp/src/devtools/bin/vpccrccheck.exe Normal file → Executable file
View File

View File

@ -1,3 +1,3 @@
#defines these macros so that we skip VSIGN and P4 steps in the SDK #defines these macros so that we skip VSIGN and P4 steps in the SDK
SOURCE_SDK=1 SOURCE_SDK=1
VALVE_NO_AUTO_P4=1 VALVE_NO_AUTO_P4=1

View File

@ -1,14 +1,14 @@
{ {
global: *; global: *;
local: local:
extern "C++" { extern "C++" {
*std::*; *std::*;
__cxxabi*; __cxxabi*;
__gcc*; __gcc*;
__gxx*; __gxx*;
__gnu_cxx*; __gnu_cxx*;
__cxa*; __cxa*;
operator*; operator*;
__dynamic_cast __dynamic_cast
}; };
}; };

Binary file not shown.

View File

@ -1013,7 +1013,9 @@ CStudioHdr *C_BaseAnimating::OnNewModel()
{ {
// XXX what's authoritative? the model pointer or the model index? what a mess. // XXX what's authoritative? the model pointer or the model index? what a mess.
nNewIndex = modelinfo->GetModelIndex( modelinfo->GetModelName( GetModel() ) ); nNewIndex = modelinfo->GetModelIndex( modelinfo->GetModelName( GetModel() ) );
Assert( modelinfo->GetModel( nNewIndex ) == GetModel() ); Assert( nNewIndex < 0 || modelinfo->GetModel( nNewIndex ) == GetModel() );
if ( nNewIndex < 0 )
nNewIndex = m_nModelIndex;
} }
m_AutoRefModelIndex = nNewIndex; m_AutoRefModelIndex = nNewIndex;
@ -5099,7 +5101,7 @@ void C_BaseAnimating::StudioFrameAdvance()
SetCycle( flNewCycle ); SetCycle( flNewCycle );
m_flGroundSpeed = GetSequenceGroundSpeed( hdr, GetSequence() ); m_flGroundSpeed = GetSequenceGroundSpeed( hdr, GetSequence() ) * GetModelScale();
#if 0 #if 0
// I didn't have a test case for this, but it seems like the right thing to do. Check multi-player! // I didn't have a test case for this, but it seems like the right thing to do. Check multi-player!
@ -5289,7 +5291,7 @@ void C_BaseAnimating::ResetSequenceInfo( void )
} }
CStudioHdr *pStudioHdr = GetModelPtr(); CStudioHdr *pStudioHdr = GetModelPtr();
m_flGroundSpeed = GetSequenceGroundSpeed( pStudioHdr, GetSequence() ); m_flGroundSpeed = GetSequenceGroundSpeed( pStudioHdr, GetSequence() ) * GetModelScale();
m_bSequenceLoops = ((GetSequenceFlags( pStudioHdr, GetSequence() ) & STUDIO_LOOPING) != 0); m_bSequenceLoops = ((GetSequenceFlags( pStudioHdr, GetSequence() ) & STUDIO_LOOPING) != 0);
// m_flAnimTime = gpGlobals->time; // m_flAnimTime = gpGlobals->time;
m_flPlaybackRate = 1.0; m_flPlaybackRate = 1.0;

View File

@ -894,7 +894,12 @@ C_BaseEntity::C_BaseEntity() :
{ {
AddVar( &m_vecOrigin, &m_iv_vecOrigin, LATCH_SIMULATION_VAR ); AddVar( &m_vecOrigin, &m_iv_vecOrigin, LATCH_SIMULATION_VAR );
AddVar( &m_angRotation, &m_iv_angRotation, LATCH_SIMULATION_VAR ); AddVar( &m_angRotation, &m_iv_angRotation, LATCH_SIMULATION_VAR );
AddVar( &m_vecVelocity, &m_iv_vecVelocity, LATCH_SIMULATION_VAR ); // Removing this until we figure out why velocity introduces view hitching.
// One possible fix is removing the player->ResetLatched() call in CGameMovement::FinishDuck(),
// but that re-introduces a third-person hitching bug. One possible cause is the abrupt change
// in player size/position that occurs when ducking, and how prediction tries to work through that.
//
// AddVar( &m_vecVelocity, &m_iv_vecVelocity, LATCH_SIMULATION_VAR );
m_DataChangeEventRef = -1; m_DataChangeEventRef = -1;
m_EntClientFlags = 0; m_EntClientFlags = 0;

View File

@ -1158,6 +1158,33 @@ void C_BaseFlex::SetupWeights( const matrix3x4_t *pBoneToWorld, int nFlexWeightC
} }
//-----------------------------------------------------------------------------
// Purpose: Use the local bone positions to set flex control weights
// via boneflexdrivers specified in the model
//-----------------------------------------------------------------------------
void C_BaseFlex::BuildTransformations( CStudioHdr *pStudioHdr, Vector *pos, Quaternion q[], const matrix3x4_t& cameraTransform, int boneMask, CBoneBitList &boneComputed )
{
const int nBoneFlexDriverCount = pStudioHdr->BoneFlexDriverCount();
for ( int i = 0; i < nBoneFlexDriverCount; ++i )
{
const mstudioboneflexdriver_t *pBoneFlexDriver = pStudioHdr->BoneFlexDriver( i );
const Vector &position = pos[ pBoneFlexDriver->m_nBoneIndex ];
const int nControllerCount = pBoneFlexDriver->m_nControlCount;
for ( int j = 0; j < nControllerCount; ++j )
{
const mstudioboneflexdrivercontrol_t *pController = pBoneFlexDriver->pBoneFlexDriverControl( j );
Assert( pController->m_nFlexControllerIndex >= 0 && pController->m_nFlexControllerIndex < pStudioHdr->numflexcontrollers() );
Assert( pController->m_nBoneComponent >= 0 && pController->m_nBoneComponent <= 2 );
SetFlexWeight( static_cast< LocalFlexController_t >( pController->m_nFlexControllerIndex ), RemapValClamped( position[pController->m_nBoneComponent], pController->m_flMin, pController->m_flMax, 0.0f, 1.0f ) );
}
}
BaseClass::BuildTransformations( pStudioHdr, pos, q, cameraTransform, boneMask, boneComputed );
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: process the entities networked state, vcd playback, wav file visemes, and blinks into a global shared flex controller array // Purpose: process the entities networked state, vcd playback, wav file visemes, and blinks into a global shared flex controller array
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -147,6 +147,7 @@ public:
virtual void OnThreadedDrawSetup(); virtual void OnThreadedDrawSetup();
// model specific // model specific
virtual void BuildTransformations( CStudioHdr *pStudioHdr, Vector *pos, Quaternion q[], const matrix3x4_t& cameraTransform, int boneMask, CBoneBitList &boneComputed );
static void LinkToGlobalFlexControllers( CStudioHdr *hdr ); static void LinkToGlobalFlexControllers( CStudioHdr *hdr );
virtual void SetupWeights( const matrix3x4_t *pBoneToWorld, int nFlexWeightCount, float *pFlexWeights, float *pFlexDelayedWeights ); virtual void SetupWeights( const matrix3x4_t *pBoneToWorld, int nFlexWeightCount, float *pFlexWeights, float *pFlexDelayedWeights );
virtual bool SetupGlobalWeights( const matrix3x4_t *pBoneToWorld, int nFlexWeightCount, float *pFlexWeights, float *pFlexDelayedWeights ); virtual bool SetupGlobalWeights( const matrix3x4_t *pBoneToWorld, int nFlexWeightCount, float *pFlexWeights, float *pFlexDelayedWeights );

View File

@ -47,7 +47,7 @@
#include "replay/ienginereplay.h" #include "replay/ienginereplay.h"
#endif #endif
#include "steam/steam_api.h" #include "steam/steam_api.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
#include "client_virtualreality.h" #include "client_virtualreality.h"
#if defined USES_ECON_ITEMS #if defined USES_ECON_ITEMS
@ -115,6 +115,13 @@ static ConVar cl_first_person_uses_world_model ( "cl_first_person_uses_world_mod
ConVar demo_fov_override( "demo_fov_override", "0", FCVAR_CLIENTDLL | FCVAR_DONTRECORD, "If nonzero, this value will be used to override FOV during demo playback." ); ConVar demo_fov_override( "demo_fov_override", "0", FCVAR_CLIENTDLL | FCVAR_DONTRECORD, "If nonzero, this value will be used to override FOV during demo playback." );
// This only needs to be approximate - it just controls the distance to the pivot-point of the head ("the neck") of the in-game character, not the player's real-world neck length.
// Ideally we would find this vector by subtracting the neutral-pose difference between the head bone (the pivot point) and the "eyes" attachment point.
// However, some characters don't have this attachment point, and finding the neutral pose is a pain.
// This value is found by hand, and a good value depends more on the in-game models than on actual human shapes.
ConVar cl_meathook_neck_pivot_ingame_up( "cl_meathook_neck_pivot_ingame_up", "7.0" );
ConVar cl_meathook_neck_pivot_ingame_fwd( "cl_meathook_neck_pivot_ingame_fwd", "3.0" );
void RecvProxy_LocalVelocityX( const CRecvProxyData *pData, void *pStruct, void *pOut ); void RecvProxy_LocalVelocityX( const CRecvProxyData *pData, void *pStruct, void *pOut );
void RecvProxy_LocalVelocityY( const CRecvProxyData *pData, void *pStruct, void *pOut ); void RecvProxy_LocalVelocityY( const CRecvProxyData *pData, void *pStruct, void *pOut );
void RecvProxy_LocalVelocityZ( const CRecvProxyData *pData, void *pStruct, void *pOut ); void RecvProxy_LocalVelocityZ( const CRecvProxyData *pData, void *pStruct, void *pOut );
@ -429,6 +436,8 @@ C_BasePlayer::C_BasePlayer() : m_iv_vecViewOffset( "C_BasePlayer::m_iv_vecViewOf
m_bFiredWeapon = false; m_bFiredWeapon = false;
m_nForceVisionFilterFlags = 0; m_nForceVisionFilterFlags = 0;
ListenForGameEvent( "base_player_teleported" );
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -698,6 +707,20 @@ surfacedata_t* C_BasePlayer::GetGroundSurface()
return physprops->GetSurfaceData( trace.surface.surfaceProps ); return physprops->GetSurfaceData( trace.surface.surfaceProps );
} }
void C_BasePlayer::FireGameEvent( IGameEvent *event )
{
if ( FStrEq( event->GetName(), "base_player_teleported" ) )
{
const int index = event->GetInt( "entindex" );
if ( index == entindex() && IsLocalPlayer() )
{
// In VR, we want to make sure our head and body
// are aligned after we teleport.
g_ClientVirtualReality.AlignTorsoAndViewToWeapon();
}
}
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// returns the player name // returns the player name
@ -1851,11 +1874,9 @@ void C_BasePlayer::ThirdPersonSwitch( bool bThirdperson )
{ {
return !input->CAM_IsThirdPerson() && ( !ToolsEnabled() || !ToolFramework_IsThirdPersonCamera() ); return !input->CAM_IsThirdPerson() && ( !ToolsEnabled() || !ToolFramework_IsThirdPersonCamera() );
} }
else
{ // Not looking at the local player, e.g. in a replay in third person mode or freelook.
// Not looking at the local player, e.g. in a replay in third person mode or freelook. return false;
return false;
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -1867,11 +1888,9 @@ void C_BasePlayer::ThirdPersonSwitch( bool bThirdperson )
{ {
return !LocalPlayerInFirstPersonView() || cl_first_person_uses_world_model.GetBool(); return !LocalPlayerInFirstPersonView() || cl_first_person_uses_world_model.GetBool();
} }
else
{ static ConVarRef vr_first_person_uses_world_model( "vr_first_person_uses_world_model" );
static ConVarRef vr_first_person_uses_world_model( "vr_first_person_uses_world_model" ); return !LocalPlayerInFirstPersonView() || vr_first_person_uses_world_model.GetBool();
return !LocalPlayerInFirstPersonView() || vr_first_person_uses_world_model.GetBool();
}
} }
@ -1995,6 +2014,16 @@ void C_BasePlayer::PostThink( void )
if ( IsAlive()) if ( IsAlive())
{ {
// Need to do this on the client to avoid prediction errors
if ( GetFlags() & FL_DUCKING )
{
SetCollisionBounds( VEC_DUCK_HULL_MIN, VEC_DUCK_HULL_MAX );
}
else
{
SetCollisionBounds( VEC_HULL_MIN, VEC_HULL_MAX );
}
if ( !CommentaryModeShouldSwallowInput( this ) ) if ( !CommentaryModeShouldSwallowInput( this ) )
{ {
// do weapon stuff // do weapon stuff
@ -2850,7 +2879,13 @@ void C_BasePlayer::BuildFirstPersonMeathookTransformations( CStudioHdr *hdr, Vec
m_BoneAccessor.SetWritableBones( BONE_USED_BY_ANYTHING ); m_BoneAccessor.SetWritableBones( BONE_USED_BY_ANYTHING );
matrix3x4_t &mHeadTransform = GetBoneForWrite( LookupBone( pchHeadBoneName ) ); int iHead = LookupBone( pchHeadBoneName );
if ( iHead == -1 )
{
return;
}
matrix3x4_t &mHeadTransform = GetBoneForWrite( iHead );
// "up" on the head bone is along the negative Y axis - not sure why. // "up" on the head bone is along the negative Y axis - not sure why.
//Vector vHeadTransformUp ( -mHeadTransform[0][1], -mHeadTransform[1][1], -mHeadTransform[2][1] ); //Vector vHeadTransformUp ( -mHeadTransform[0][1], -mHeadTransform[1][1], -mHeadTransform[2][1] );
@ -2862,29 +2897,19 @@ void C_BasePlayer::BuildFirstPersonMeathookTransformations( CStudioHdr *hdr, Vec
// We can't move this with animations or effects without causing nausea, so we need to move // We can't move this with animations or effects without causing nausea, so we need to move
// the whole body so that the animated head is in the right place to match the player-controlled head. // the whole body so that the animated head is in the right place to match the player-controlled head.
Vector vHeadUp; Vector vHeadUp;
bool bMeathookEnable = true;
Vector vRealPivotPoint; Vector vRealPivotPoint;
bool bEnableDecapitation = true;
if( UseVR() ) if( UseVR() )
{ {
static ConVarRef vr_neck_pivot_ingame_up( "vr_neck_pivot_ingame_up" );
static ConVarRef vr_neck_pivot_ingame_fwd( "vr_neck_pivot_ingame_fwd" );
static ConVarRef vr_meathook_enable ( "vr_meathook_enable" );
static ConVarRef vr_decapitation_enable ( "vr_decapitation_enable" );
VMatrix mWorldFromMideye = g_ClientVirtualReality.GetWorldFromMidEye(); VMatrix mWorldFromMideye = g_ClientVirtualReality.GetWorldFromMidEye();
bMeathookEnable = vr_meathook_enable.GetBool();
bEnableDecapitation = vr_decapitation_enable.GetBool();
// What we do here is: // What we do here is:
// * Take the required eye pos+orn - the actual pose the player is controlling with the HMD. // * Take the required eye pos+orn - the actual pose the player is controlling with the HMD.
// * Go downwards in that space by headtrack_neck_pivot_ingame_* - this is now the neck-pivot in the game world of where the player is actually looking. // * Go downwards in that space by cl_meathook_neck_pivot_ingame_* - this is now the neck-pivot in the game world of where the player is actually looking.
// * Now place the body of the animated character so that the head bone is at that position. // * Now place the body of the animated character so that the head bone is at that position.
// The head bone is the neck pivot point of the in-game character. // The head bone is the neck pivot point of the in-game character.
Vector vRealMidEyePos = mWorldFromMideye.GetTranslation(); Vector vRealMidEyePos = mWorldFromMideye.GetTranslation();
vRealPivotPoint = vRealMidEyePos - ( mWorldFromMideye.GetUp() * vr_neck_pivot_ingame_up.GetFloat() ) - ( mWorldFromMideye.GetForward() * vr_neck_pivot_ingame_fwd.GetFloat() ); vRealPivotPoint = vRealMidEyePos - ( mWorldFromMideye.GetUp() * cl_meathook_neck_pivot_ingame_up.GetFloat() ) - ( mWorldFromMideye.GetForward() * cl_meathook_neck_pivot_ingame_fwd.GetFloat() );
} }
else else
{ {
@ -2892,55 +2917,48 @@ void C_BasePlayer::BuildFirstPersonMeathookTransformations( CStudioHdr *hdr, Vec
Vector vForward, vRight, vUp; Vector vForward, vRight, vUp;
AngleVectors( MainViewAngles(), &vForward, &vRight, &vUp ); AngleVectors( MainViewAngles(), &vForward, &vRight, &vUp );
vRealPivotPoint = MainViewOrigin() - ( vUp * 7.3f ) - ( vForward * 3.f ); vRealPivotPoint = MainViewOrigin() - ( vUp * cl_meathook_neck_pivot_ingame_up.GetFloat() ) - ( vForward * cl_meathook_neck_pivot_ingame_fwd.GetFloat() );
} }
Vector vDeltaToAdd = vRealPivotPoint - vHeadTransformTranslation; Vector vDeltaToAdd = vRealPivotPoint - vHeadTransformTranslation;
if ( bMeathookEnable ) // Now add this offset to the entire skeleton.
for (int i = 0; i < hdr->numbones(); i++)
{ {
// Now add this offset to the entire skeleton. // Only update bones reference by the bone mask.
for (int i = 0; i < hdr->numbones(); i++) if ( !( hdr->boneFlags( i ) & boneMask ) )
{ {
// Only update bones reference by the bone mask. continue;
if ( !( hdr->boneFlags( i ) & boneMask ) )
{
continue;
}
matrix3x4_t& bone = GetBoneForWrite( i );
Vector vBonePos;
MatrixGetTranslation ( bone, vBonePos );
vBonePos += vDeltaToAdd;
MatrixSetTranslation ( vBonePos, bone );
} }
matrix3x4_t& bone = GetBoneForWrite( i );
Vector vBonePos;
MatrixGetTranslation ( bone, vBonePos );
vBonePos += vDeltaToAdd;
MatrixSetTranslation ( vBonePos, bone );
} }
if ( bEnableDecapitation ) // Then scale the head to zero, but leave its position - forms a "neck stub".
// This prevents us rendering junk all over the screen, e.g. inside of mouth, etc.
MatrixScaleByZero( mHeadTransform );
// TODO: right now we nuke the hats by shrinking them to nothing,
// but it feels like we should do something more sensible.
// For example, for one sniper taunt he takes his hat off and waves it - would be nice to see it then.
int iHelm = LookupBone( "prp_helmet" );
if ( iHelm != -1 )
{ {
// Then scale the head to zero, but leave its position - forms a "neck stub". // Scale the helmet.
// This prevents us rendering junk all over the screen, e.g. inside of mouth, etc. matrix3x4_t &transformhelmet = GetBoneForWrite( iHelm );
MatrixScaleByZero ( mHeadTransform ); MatrixScaleByZero( transformhelmet );
// TODO: right now we nuke the hats by shrinking them to nothing,
// but it feels like we should do something more sensible.
// For example, for one sniper taunt he takes his hat off and waves it - would be nice to see it then.
int iHelm = LookupBone( "prp_helmet" );
if ( iHelm != -1 )
{
// Scale the helmet.
matrix3x4_t &transformhelmet = GetBoneForWrite( iHelm );
MatrixScaleByZero ( transformhelmet );
}
iHelm = LookupBone( "prp_hat" );
if ( iHelm != -1 )
{
matrix3x4_t &transformhelmet = GetBoneForWrite( iHelm );
MatrixScaleByZero ( transformhelmet );
}
} }
iHelm = LookupBone( "prp_hat" );
if ( iHelm != -1 )
{
matrix3x4_t &transformhelmet = GetBoneForWrite( iHelm );
MatrixScaleByZero( transformhelmet );
}
} }

View File

@ -23,6 +23,8 @@
#include "hintsystem.h" #include "hintsystem.h"
#include "SoundEmitterSystem/isoundemittersystembase.h" #include "SoundEmitterSystem/isoundemittersystembase.h"
#include "c_env_fog_controller.h" #include "c_env_fog_controller.h"
#include "igameevents.h"
#include "GameEventListener.h"
#if defined USES_ECON_ITEMS #if defined USES_ECON_ITEMS
#include "econ_item.h" #include "econ_item.h"
@ -66,7 +68,7 @@ bool IsInFreezeCam( void );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Base Player class // Purpose: Base Player class
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class C_BasePlayer : public C_BaseCombatCharacter class C_BasePlayer : public C_BaseCombatCharacter, public CGameEventListener
{ {
public: public:
DECLARE_CLASS( C_BasePlayer, C_BaseCombatCharacter ); DECLARE_CLASS( C_BasePlayer, C_BaseCombatCharacter );
@ -467,6 +469,8 @@ protected:
// used by client side player footsteps // used by client side player footsteps
surfacedata_t* GetGroundSurface(); surfacedata_t* GetGroundSurface();
virtual void FireGameEvent( IGameEvent *event );
protected: protected:
// Did we just enter a vehicle this frame? // Did we just enter a vehicle this frame?
bool JustEnteredVehicle(); bool JustEnteredVehicle();

View File

@ -16,7 +16,7 @@
#include "utlmultilist.h" #include "utlmultilist.h"
#include "vprof.h" #include "vprof.h"
#include "icommandline.h" #include "icommandline.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
static void PixelvisDrawChanged( IConVar *pPixelvisVar, const char *pOld, float flOldValue ); static void PixelvisDrawChanged( IConVar *pPixelvisVar, const char *pOld, float flOldValue );

View File

@ -18,7 +18,7 @@
#include "vgui/ISurface.h" #include "vgui/ISurface.h"
#include "client_virtualreality.h" #include "client_virtualreality.h"
#include "../hud_crosshair.h" #include "../hud_crosshair.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
// NVNT haptic utils // NVNT haptic utils
#include "haptics/haptic_utils.h" #include "haptics/haptic_utils.h"

View File

@ -121,7 +121,7 @@
#include "clientsteamcontext.h" #include "clientsteamcontext.h"
#include "renamed_recvtable_compat.h" #include "renamed_recvtable_compat.h"
#include "mouthinfo.h" #include "mouthinfo.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
#include "client_virtualreality.h" #include "client_virtualreality.h"
#include "mumble.h" #include "mumble.h"
@ -148,7 +148,6 @@
#endif #endif
extern vgui::IInputInternal *g_InputInternal; extern vgui::IInputInternal *g_InputInternal;
const char *COM_GetModDirectory(); // return the mod dir (rather than the complete -game param, which can be a path)
//============================================================================= //=============================================================================
// HPE_BEGIN // HPE_BEGIN
@ -332,6 +331,11 @@ static ConVar s_CV_ShowParticleCounts("showparticlecounts", "0", 0, "Display num
static ConVar s_cl_team("cl_team", "default", FCVAR_USERINFO|FCVAR_ARCHIVE, "Default team when joining a game"); static ConVar s_cl_team("cl_team", "default", FCVAR_USERINFO|FCVAR_ARCHIVE, "Default team when joining a game");
static ConVar s_cl_class("cl_class", "default", FCVAR_USERINFO|FCVAR_ARCHIVE, "Default class when joining a game"); static ConVar s_cl_class("cl_class", "default", FCVAR_USERINFO|FCVAR_ARCHIVE, "Default class when joining a game");
#ifdef HL1MP_CLIENT_DLL
static ConVar s_cl_load_hl1_content("cl_load_hl1_content", "0", FCVAR_ARCHIVE, "Mount the content from Half-Life: Source if possible");
#endif
// Physics system // Physics system
bool g_bLevelInitialized; bool g_bLevelInitialized;
bool g_bTextMode = false; bool g_bTextMode = false;
@ -943,7 +947,7 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi
InitFbx(); InitFbx();
#endif #endif
// it's ok if this is NULL. That just means the headtrack.dll wasn't found // it's ok if this is NULL. That just means the sourcevr.dll wasn't found
g_pSourceVR = (ISourceVirtualReality *)appSystemFactory(SOURCE_VIRTUAL_REALITY_INTERFACE_VERSION, NULL); g_pSourceVR = (ISourceVirtualReality *)appSystemFactory(SOURCE_VIRTUAL_REALITY_INTERFACE_VERSION, NULL);
factorylist_t factories; factorylist_t factories;
@ -977,17 +981,6 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi
g_pcv_ThreadMode = g_pCVar->FindVar( "host_thread_mode" ); g_pcv_ThreadMode = g_pCVar->FindVar( "host_thread_mode" );
// If we are in VR mode do some initial setup work
if( UseVR() )
{
int nViewportWidth, nViewportHeight;
g_pSourceVR->GetViewportBounds( ISourceVirtualReality::VREye_Left, NULL, NULL, &nViewportWidth, &nViewportHeight );
vgui::surface()->SetFullscreenViewport( 0, 0, nViewportWidth, nViewportHeight );
vgui::ivgui()->SetVRMode( true );
}
if (!Initializer::InitializeAllObjects()) if (!Initializer::InitializeAllObjects())
return false; return false;
@ -1091,6 +1084,7 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi
#ifndef _X360 #ifndef _X360
HookHapticMessages(); // Always hook the messages HookHapticMessages(); // Always hook the messages
#endif #endif
return true; return true;
} }
@ -1141,29 +1135,23 @@ void CHLClient::PostInit()
g_pSixenseInput->PostInit(); g_pSixenseInput->PostInit();
#endif #endif
// If we are in VR mode execute headtrack.cfg in PostInit so all the convars will g_ClientVirtualReality.StartupComplete();
// already be set up
if( UseVR() ) #ifdef HL1MP_CLIENT_DLL
if ( s_cl_load_hl1_content.GetBool() && steamapicontext && steamapicontext->SteamApps() )
{ {
// general all-game stuff char szPath[ MAX_PATH*2 ];
engine->ExecuteClientCmd( "exec headtrack\\headtrack.cfg" ); int ccFolder= steamapicontext->SteamApps()->GetAppInstallDir( 280, szPath, sizeof(szPath) );
if ( ccFolder > 0 )
{
V_AppendSlash( szPath, sizeof(szPath) );
V_strncat( szPath, "hl1", sizeof( szPath ) );
// game specific VR config g_pFullFileSystem->AddSearchPath( szPath, "HL1" );
CUtlString sCmd; g_pFullFileSystem->AddSearchPath( szPath, "GAME" );
sCmd.Format( "exec headtrack_%s.cfg", COM_GetModDirectory() ); }
engine->ExecuteClientCmd( sCmd.Get() );
engine->ExecuteClientCmd( "vr_start_tracking" );
vgui::surface()->SetSoftwareCursor( true );
#if defined(POSIX)
ConVarRef m_rawinput( "m_rawinput" );
m_rawinput.SetValue( 1 );
ConVarRef mat_vsync( "mat_vsync" );
mat_vsync.SetValue( 0 );
#endif
} }
#endif
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -206,6 +206,8 @@ $Project
$File "$SRCDIR\game\shared\basegrenade_shared.cpp" $File "$SRCDIR\game\shared\basegrenade_shared.cpp"
$File "$SRCDIR\game\shared\baseparticleentity.cpp" $File "$SRCDIR\game\shared\baseparticleentity.cpp"
$File "$SRCDIR\game\shared\baseplayer_shared.cpp" $File "$SRCDIR\game\shared\baseplayer_shared.cpp"
$File "$SRCDIR\game\shared\baseprojectile.cpp"
$File "$SRCDIR\game\shared\baseprojectile.h"
$File "$SRCDIR\game\shared\baseviewmodel_shared.cpp" $File "$SRCDIR\game\shared\baseviewmodel_shared.cpp"
$File "beamdraw.cpp" $File "beamdraw.cpp"
$File "$SRCDIR\game\shared\beam_shared.cpp" $File "$SRCDIR\game\shared\beam_shared.cpp"

View File

@ -9,15 +9,21 @@
#include "client_virtualreality.h" #include "client_virtualreality.h"
#include "materialsystem/itexture.h" #include "materialsystem/itexture.h"
#include "materialsystem/materialsystem_config.h"
#include "view_shared.h" #include "view_shared.h"
#include "view_scene.h"
#include "VGuiMatSurface/IMatSystemSurface.h" #include "VGuiMatSurface/IMatSystemSurface.h"
#include "vgui_controls/Controls.h" #include "vgui_controls/Controls.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
#include "ienginevgui.h" #include "ienginevgui.h"
#include "cdll_client_int.h" #include "cdll_client_int.h"
#include "vgui/IVGui.h"
#include "vgui_controls/Controls.h"
#include "tier0/vprof_telemetry.h" #include "tier0/vprof_telemetry.h"
#include <time.h> #include <time.h>
const char *COM_GetModDirectory(); // return the mod dir (rather than the complete -game param, which can be a path)
CClientVirtualReality g_ClientVirtualReality; CClientVirtualReality g_ClientVirtualReality;
EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CClientVirtualReality, IClientVirtualReality, EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CClientVirtualReality, IClientVirtualReality,
CLIENTVIRTUALREALITY_INTERFACE_VERSION, g_ClientVirtualReality ); CLIENTVIRTUALREALITY_INTERFACE_VERSION, g_ClientVirtualReality );
@ -26,6 +32,9 @@ EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CClientVirtualReality, IClientVirtualReality,
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// A huge pile of VR convars // A huge pile of VR convars
// -------------------------------------------------------------------- // --------------------------------------------------------------------
ConVar vr_activate_default( "vr_activate_default", "0", FCVAR_ARCHIVE, "If this is true the game will switch to VR mode once startup is complete." );
ConVar vr_moveaim_mode ( "vr_moveaim_mode", "3", FCVAR_ARCHIVE, "0=move+shoot from face. 1=move with torso. 2,3,4=shoot with face+mouse cursor. 5+ are probably not that useful." ); ConVar vr_moveaim_mode ( "vr_moveaim_mode", "3", FCVAR_ARCHIVE, "0=move+shoot from face. 1=move with torso. 2,3,4=shoot with face+mouse cursor. 5+ are probably not that useful." );
ConVar vr_moveaim_mode_zoom ( "vr_moveaim_mode_zoom", "3", FCVAR_ARCHIVE, "0=move+shoot from face. 1=move with torso. 2,3,4=shoot with face+mouse cursor. 5+ are probably not that useful." ); ConVar vr_moveaim_mode_zoom ( "vr_moveaim_mode_zoom", "3", FCVAR_ARCHIVE, "0=move+shoot from face. 1=move with torso. 2,3,4=shoot with face+mouse cursor. 5+ are probably not that useful." );
@ -54,21 +63,18 @@ ConVar vr_debug_remote_cam_target_z( "vr_debug_remote_cam_target_z", "-50.0" );
ConVar vr_translation_limit( "vr_translation_limit", "10.0", 0, "How far the in-game head will translate before being clamped." ); ConVar vr_translation_limit( "vr_translation_limit", "10.0", 0, "How far the in-game head will translate before being clamped." );
ConVar vr_dont_use_calibration_projection ( "vr_dont_use_calibration_projection", "0", 0, "1=use calibrated rotation, but not projection" );
// HUD config values // HUD config values
ConVar vr_render_hud_in_world( "vr_render_hud_in_world", "1" ); ConVar vr_render_hud_in_world( "vr_render_hud_in_world", "1" );
ConVar vr_hud_max_fov( "vr_hud_max_fov", "60", FCVAR_ARCHIVE, "Max FOV of the HUD" ); ConVar vr_hud_max_fov( "vr_hud_max_fov", "60", FCVAR_ARCHIVE, "Max FOV of the HUD" );
ConVar vr_hud_forward( "vr_hud_forward", "500", FCVAR_ARCHIVE, "Apparent distance of the HUD in inches" ); ConVar vr_hud_forward( "vr_hud_forward", "500", FCVAR_ARCHIVE, "Apparent distance of the HUD in inches" );
ConVar vr_hud_display_ratio( "vr_hud_display_ratio", "0.95", FCVAR_ARCHIVE ); ConVar vr_hud_display_ratio( "vr_hud_display_ratio", "0.95", FCVAR_ARCHIVE );
ConVar vr_hud_never_overlay( "vr_hud_never_overlay", "0" );
ConVar vr_hud_axis_lock_to_world( "vr_hud_axis_lock_to_world", "0", FCVAR_ARCHIVE, "Bitfield - locks HUD axes to the world - 0=pitch, 1=yaw, 2=roll" ); ConVar vr_hud_axis_lock_to_world( "vr_hud_axis_lock_to_world", "0", FCVAR_ARCHIVE, "Bitfield - locks HUD axes to the world - 0=pitch, 1=yaw, 2=roll" );
// Default distance clips through rocketlauncher, heavy's body, etc. // Default distance clips through rocketlauncher, heavy's body, etc.
ConVar vr_projection_znear_multiplier( "vr_projection_znear_multiplier", "0.3", 0, "Allows moving the ZNear plane to deal with body clipping" ); ConVar vr_projection_znear_multiplier( "vr_projection_znear_multiplier", "0.3", 0, "Allows moving the ZNear plane to deal with body clipping" );
ConVar vr_stat_sample_period ( "vr_stat_sample_period", "1", 0, "Frequency with which to sample motion stats" );
// Should the viewmodel (weapon) translate with the HMD, or remain fixed to the in-world body (but still rotate with the head)? Purely a graphics effect - no effect on actual bullet aiming. // Should the viewmodel (weapon) translate with the HMD, or remain fixed to the in-world body (but still rotate with the head)? Purely a graphics effect - no effect on actual bullet aiming.
// Has no effect in aim modes where aiming is not controlled by the head. // Has no effect in aim modes where aiming is not controlled by the head.
ConVar vr_viewmodel_translate_with_head ( "vr_viewmodel_translate_with_head", "0", 0, "1=translate the viewmodel with the head motion." ); ConVar vr_viewmodel_translate_with_head ( "vr_viewmodel_translate_with_head", "0", 0, "1=translate the viewmodel with the head motion." );
@ -80,16 +86,9 @@ ConVar vr_zoom_scope_scale ( "vr_zoom_scope_scale", "6.0", 0, "Something to do w
ConVar vr_viewmodel_offset_forward( "vr_viewmodel_offset_forward", "-8", 0 ); ConVar vr_viewmodel_offset_forward( "vr_viewmodel_offset_forward", "-8", 0 );
ConVar vr_viewmodel_offset_forward_large( "vr_viewmodel_offset_forward_large", "-15", 0 ); ConVar vr_viewmodel_offset_forward_large( "vr_viewmodel_offset_forward_large", "-15", 0 );
ConVar vr_ipdtest_left_t ( "vr_ipdtest_left_t", "260", FCVAR_ARCHIVE ); ConVar vr_force_windowed ( "vr_force_windowed", "0", FCVAR_ARCHIVE );
ConVar vr_ipdtest_left_b ( "vr_ipdtest_left_b", "530", FCVAR_ARCHIVE );
ConVar vr_ipdtest_left_i ( "vr_ipdtest_left_i", "550", FCVAR_ARCHIVE );
ConVar vr_ipdtest_left_o ( "vr_ipdtest_left_o", "200", FCVAR_ARCHIVE );
ConVar vr_ipdtest_right_t ( "vr_ipdtest_right_t", "260", FCVAR_ARCHIVE );
ConVar vr_ipdtest_right_b ( "vr_ipdtest_right_b", "530", FCVAR_ARCHIVE );
ConVar vr_ipdtest_right_i ( "vr_ipdtest_right_i", "550", FCVAR_ARCHIVE );
ConVar vr_ipdtest_right_o ( "vr_ipdtest_right_o", "200", FCVAR_ARCHIVE );
ConVar vr_first_person_uses_world_model ( "vr_first_person_uses_world_model", "1", 0, "Causes the third person model to be drawn instead of the view model" );
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// Purpose: Cycle through the aim & move modes. // Purpose: Cycle through the aim & move modes.
@ -122,6 +121,32 @@ void CC_VR_Cycle_Aim_Move_Mode ( const CCommand& args )
static ConCommand vr_cycle_aim_move_mode("vr_cycle_aim_move_mode", CC_VR_Cycle_Aim_Move_Mode, "Cycle through the aim & move modes." ); static ConCommand vr_cycle_aim_move_mode("vr_cycle_aim_move_mode", CC_VR_Cycle_Aim_Move_Mode, "Cycle through the aim & move modes." );
// --------------------------------------------------------------------
// Purpose: Switch to/from VR mode.
// --------------------------------------------------------------------
CON_COMMAND( vr_activate, "Switch to VR mode" )
{
g_ClientVirtualReality.Activate();
}
CON_COMMAND( vr_deactivate, "Switch from VR mode to normal mode" )
{
g_ClientVirtualReality.Deactivate();
}
CON_COMMAND( vr_toggle, "Toggles VR mode" )
{
if( g_pSourceVR )
{
if( g_pSourceVR->ShouldRunInVR() )
g_ClientVirtualReality.Deactivate();
else
g_ClientVirtualReality.Activate();
}
else
{
Msg( "VR Mode is not enabled.\n" );
}
}
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// Purpose: Returns true if the matrix is orthonormal // Purpose: Returns true if the matrix is orthonormal
@ -235,11 +260,9 @@ CClientVirtualReality::CClientVirtualReality()
m_rtLastMotionSample = 0; m_rtLastMotionSample = 0;
m_bMotionUpdated = false; m_bMotionUpdated = false;
m_bIpdTestEnabled = false; #if defined( USE_SDL )
m_nNonVRSDLDisplayIndex = 0;
// Needs to be after the tracker has initted. #endif
m_bIpdTestEnabled = false;
m_IpdTestControl = 0;
} }
CClientVirtualReality::~CClientVirtualReality() CClientVirtualReality::~CClientVirtualReality()
@ -378,8 +401,8 @@ void CClientVirtualReality::DrawMainMenu()
viewEye[STEREO_EYE_RIGHT].y = rightY; viewEye[STEREO_EYE_RIGHT].y = rightY;
viewEye[STEREO_EYE_RIGHT].m_eStereoEye = STEREO_EYE_RIGHT; viewEye[STEREO_EYE_RIGHT].m_eStereoEye = STEREO_EYE_RIGHT;
// let headtrack.dll tell us where to put the cameras // let sourcevr.dll tell us where to put the cameras
ProcessCurrentTrackingState( 75.f ); ProcessCurrentTrackingState( 0 );
Vector vViewModelOrigin; Vector vViewModelOrigin;
QAngle qViewModelAngles; QAngle qViewModelAngles;
OverrideView( &viewEye[ STEREO_EYE_MONO ] , &vViewModelOrigin, &qViewModelAngles, HMM_NOOVERRIDE ); OverrideView( &viewEye[ STEREO_EYE_MONO ] , &vViewModelOrigin, &qViewModelAngles, HMM_NOOVERRIDE );
@ -388,23 +411,22 @@ void CClientVirtualReality::DrawMainMenu()
// render both eyes // render both eyes
for( int nView = STEREO_EYE_LEFT; nView <= STEREO_EYE_RIGHT; nView++ ) for( int nView = STEREO_EYE_LEFT; nView <= STEREO_EYE_RIGHT; nView++ )
{ {
// clear happens here probably CMatRenderContextPtr pRenderContext( materials );
render->Push3DView( viewEye[nView], VIEW_CLEAR_DEPTH|VIEW_CLEAR_COLOR, NULL, NULL ); PIXEvent pixEvent( pRenderContext, nView == STEREO_EYE_LEFT ? "left eye" : "right eye" );
RenderHUDQuad( true, false );
ITexture *pColor = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(nView-1), ISourceVirtualReality::RT_Color );
ITexture *pDepth = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(nView-1), ISourceVirtualReality::RT_Depth );
render->Push3DView( viewEye[nView], VIEW_CLEAR_DEPTH|VIEW_CLEAR_COLOR, pColor, NULL, pDepth );
RenderHUDQuad( false, false );
render->PopView( NULL ); render->PopView( NULL );
PostProcessFrame( (StereoEye_t)nView );
OverlayHUDQuadWithUndistort( viewEye[nView], true, true, false );
} }
vrect_t rect;
rect.x = rect.y = 0;
rect.width = leftW*2;
rect.height = leftH;
PostProcessFrame( &rect );
} }
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// Purpose: // Purpose:
// Offset the incoming view appropriately. // Offset the incoming view appropriately.
@ -449,8 +471,7 @@ bool CClientVirtualReality::OverrideView ( CViewSetup *pViewMiddle, Vector *pVie
QAngle torsoAngles = m_PlayerTorsoAngle; QAngle torsoAngles = m_PlayerTorsoAngle;
VMatrix worldFromTorso; VMatrix worldFromTorso;
AngleMatrix ( torsoAngles, worldFromTorso.As3x4() ); worldFromTorso.SetupMatrixOrgAngles( m_PlayerTorsoOrigin, torsoAngles );
worldFromTorso.SetTranslation ( m_PlayerTorsoOrigin );
//// Scale translation e.g. to allow big in-game leans with only a small head movement. //// Scale translation e.g. to allow big in-game leans with only a small head movement.
//// Clamp HMD movement to a reasonable amount to avoid wallhacks, vis problems, etc. //// Clamp HMD movement to a reasonable amount to avoid wallhacks, vis problems, etc.
@ -484,16 +505,14 @@ bool CClientVirtualReality::OverrideView ( CViewSetup *pViewMiddle, Vector *pVie
// Aim point is independent of view - leave it as it was, just copy it into m_WorldFromWeapon for our use. // Aim point is independent of view - leave it as it was, just copy it into m_WorldFromWeapon for our use.
m_TorsoFromMideye = matMideyeZeroFromMideyeCurrent; m_TorsoFromMideye = matMideyeZeroFromMideyeCurrent;
m_WorldFromMidEye = worldFromTorso * matMideyeZeroFromMideyeCurrent; m_WorldFromMidEye = worldFromTorso * matMideyeZeroFromMideyeCurrent;
AngleMatrix ( originalMiddleAngles, m_WorldFromWeapon.As3x4() ); m_WorldFromWeapon.SetupMatrixOrgAngles( originalMiddleOrigin, originalMiddleAngles );
m_WorldFromWeapon.SetTranslation ( originalMiddleOrigin );
break; break;
case HMM_SHOOTMOVELOOKMOUSE: case HMM_SHOOTMOVELOOKMOUSE:
// HMD is ignored completely, mouse does everything. // HMD is ignored completely, mouse does everything.
m_PlayerTorsoAngle = originalMiddleAngles; m_PlayerTorsoAngle = originalMiddleAngles;
AngleMatrix ( originalMiddleAngles, worldFromTorso.As3x4() ); worldFromTorso.SetupMatrixOrgAngles( m_PlayerTorsoOrigin, originalMiddleAngles );
worldFromTorso.SetTranslation ( m_PlayerTorsoOrigin );
m_TorsoFromMideye.Identity(); m_TorsoFromMideye.Identity();
m_WorldFromMidEye = worldFromTorso; m_WorldFromMidEye = worldFromTorso;
@ -535,9 +554,8 @@ bool CClientVirtualReality::OverrideView ( CViewSetup *pViewMiddle, Vector *pVie
Vector vView = vLookat - vOffset; Vector vView = vLookat - vOffset;
VectorAngles ( vView, m_WorldFromMidEye.GetUp(), pViewMiddle->angles ); VectorAngles ( vView, m_WorldFromMidEye.GetUp(), pViewMiddle->angles );
AngleMatrix ( pViewMiddle->angles, m_WorldFromMidEye.As3x4() ); m_WorldFromMidEye.SetupMatrixOrgAngles( pViewMiddle->origin, pViewMiddle->angles );
m_WorldFromMidEye.SetTranslation ( pViewMiddle->origin );
m_TorsoFromMideye.Identity(); m_TorsoFromMideye.Identity();
} }
@ -584,47 +602,19 @@ bool CClientVirtualReality::OverrideStereoView( CViewSetup *pViewMiddle, CViewSe
return false; return false;
} }
if ( vr_stereo_swap_eyes.GetBool() ) VMatrix matOffsetLeft = g_pSourceVR->GetMidEyeFromEye( ISourceVirtualReality::VREye_Left );
{ VMatrix matOffsetRight = g_pSourceVR->GetMidEyeFromEye( ISourceVirtualReality::VREye_Right );
// Windows likes to randomly rename display numbers which causes eye-swaps, so this tries to cope with that.
CViewSetup *pViewTemp = pViewLeft;
pViewLeft = pViewRight;
pViewRight = pViewTemp;
}
// Move eyes to calibrated positions. // Move eyes to IPD positions.
VMatrix worldFromLeftEye = m_WorldFromMidEye * g_pSourceVR->GetMidEyeFromLeft(); VMatrix worldFromLeftEye = m_WorldFromMidEye * matOffsetLeft;
VMatrix worldFromRightEye = m_WorldFromMidEye * g_pSourceVR->GetMidEyeFromRight(); VMatrix worldFromRightEye = m_WorldFromMidEye * matOffsetRight;
Assert ( IsOrthonormal ( worldFromLeftEye, 0.001f ) );
Assert ( IsOrthonormal ( worldFromRightEye, 0.001f ) );
Vector rightFromLeft = worldFromRightEye.GetTranslation() - worldFromLeftEye.GetTranslation();
//float calibratedIPD = rightFromLeft.Length(); // THIS IS NOT CORRECT. The positions of the virtual cameras do have any real physical "meaning" with the way we currently calibrate.
float calibratedIPD = g_pSourceVR->GetDisplaySeparationMM() / 25.4f;
// Scale the eyes closer/further to fit the desired IPD.
// (the calibrated distance is the IPD of whoever calibrated it!)
float desiredIPD = g_pSourceVR->GetUserIPDMM() / 25.4f;
if ( calibratedIPD < 0.000001f )
{
// No HMD, or a monocular HMD.
}
else
{
float scale = 0.5f * ( desiredIPD - calibratedIPD ) / calibratedIPD;
worldFromLeftEye.SetTranslation ( worldFromLeftEye.GetTranslation() - ( scale * rightFromLeft ) );
worldFromRightEye.SetTranslation ( worldFromRightEye.GetTranslation() + ( scale * rightFromLeft ) );
}
Assert ( IsOrthonormal ( worldFromLeftEye, 0.001f ) ); Assert ( IsOrthonormal ( worldFromLeftEye, 0.001f ) );
Assert ( IsOrthonormal ( worldFromRightEye, 0.001f ) ); Assert ( IsOrthonormal ( worldFromRightEye, 0.001f ) );
// Finally convert back to origin+angles. // Finally convert back to origin+angles.
pViewLeft->origin = worldFromLeftEye.GetTranslation(); MatrixAngles( worldFromLeftEye.As3x4(), pViewLeft->angles, pViewLeft->origin );
VectorAngles ( worldFromLeftEye.GetForward(), worldFromLeftEye.GetUp(), pViewLeft->angles ); MatrixAngles( worldFromRightEye.As3x4(), pViewRight->angles, pViewRight->origin );
pViewRight->origin = worldFromRightEye.GetTranslation();
VectorAngles ( worldFromRightEye.GetForward(), worldFromRightEye.GetUp(), pViewRight->angles );
// Find the projection matrices. // Find the projection matrices.
@ -645,13 +635,6 @@ bool CClientVirtualReality::OverrideStereoView( CViewSetup *pViewMiddle, CViewSe
} }
} }
if ( vr_dont_use_calibration_projection.GetBool() )
{
pViewLeft ->m_bViewToProjectionOverride = false;
pViewRight ->m_bViewToProjectionOverride = false;
pViewMiddle->m_bViewToProjectionOverride = false;
}
switch ( vr_stereo_mono_set_eye.GetInt() ) switch ( vr_stereo_mono_set_eye.GetInt() )
{ {
case 0: case 0:
@ -683,6 +666,17 @@ bool CClientVirtualReality::OverrideStereoView( CViewSetup *pViewMiddle, CViewSe
CalcFovFromProjection ( &(pViewRight ->fov), pViewRight ->m_ViewToProjection ); CalcFovFromProjection ( &(pViewRight ->fov), pViewRight ->m_ViewToProjection );
CalcFovFromProjection ( &(pViewMiddle->fov), pViewMiddle->m_ViewToProjection ); CalcFovFromProjection ( &(pViewMiddle->fov), pViewMiddle->m_ViewToProjection );
// if we don't know the HUD FOV, figure that out now
if( m_fHudHorizontalFov == 0.f )
{
// Figure out the current HUD FOV.
m_fHudHorizontalFov = pViewLeft->fov * vr_hud_display_ratio.GetFloat();
if( m_fHudHorizontalFov > vr_hud_max_fov.GetFloat() )
{
m_fHudHorizontalFov = vr_hud_max_fov.GetFloat();
}
}
// remember the view angles so we can limit the weapon to something near those // remember the view angles so we can limit the weapon to something near those
m_PlayerViewAngle = pViewMiddle->angles; m_PlayerViewAngle = pViewMiddle->angles;
m_PlayerViewOrigin = pViewMiddle->origin; m_PlayerViewOrigin = pViewMiddle->origin;
@ -701,7 +695,6 @@ bool CClientVirtualReality::OverrideStereoView( CViewSetup *pViewMiddle, CViewSe
m_fHudHalfHeight = tan( DEG2RAD( fVFOV * 0.5f ) ) * fHudForward * m_WorldZoomScale; m_fHudHalfHeight = tan( DEG2RAD( fVFOV * 0.5f ) ) * fHudForward * m_WorldZoomScale;
QAngle HudAngles; QAngle HudAngles;
VMatrix HudUpCorrection;
switch ( m_hmmMovementActual ) switch ( m_hmmMovementActual )
{ {
case HMM_SHOOTFACE_MOVETORSO: case HMM_SHOOTFACE_MOVETORSO:
@ -709,7 +702,6 @@ bool CClientVirtualReality::OverrideStereoView( CViewSetup *pViewMiddle, CViewSe
// This helps keep you oriented about where "forwards" is, which is otherwise surprisingly tricky! // This helps keep you oriented about where "forwards" is, which is otherwise surprisingly tricky!
// TODO: try preserving roll and/or pitch from the view? // TODO: try preserving roll and/or pitch from the view?
HudAngles = m_PlayerTorsoAngle; HudAngles = m_PlayerTorsoAngle;
HudUpCorrection.Identity();
break; break;
case HMM_SHOOTFACE_MOVEFACE: case HMM_SHOOTFACE_MOVEFACE:
case HMM_SHOOTMOUSE_MOVEFACE: case HMM_SHOOTMOUSE_MOVEFACE:
@ -720,7 +712,6 @@ bool CClientVirtualReality::OverrideStereoView( CViewSetup *pViewMiddle, CViewSe
case HMM_SHOOTBOUNDEDMOUSE_LOOKFACE_MOVEMOUSE: case HMM_SHOOTBOUNDEDMOUSE_LOOKFACE_MOVEMOUSE:
// Put the HUD in front of wherever the player is looking. // Put the HUD in front of wherever the player is looking.
HudAngles = m_PlayerViewAngle; HudAngles = m_PlayerViewAngle;
HudUpCorrection = g_pSourceVR->GetHudUpCorrection();
break; break;
default: Assert ( false ); break; default: Assert ( false ); break;
} }
@ -742,9 +733,7 @@ bool CClientVirtualReality::OverrideStereoView( CViewSetup *pViewMiddle, CViewSe
MatrixAngles( m_WorldFromWeapon.As3x4(), aimAngles ); MatrixAngles( m_WorldFromWeapon.As3x4(), aimAngles );
HudAngles[YAW] = aimAngles[YAW]; HudAngles[YAW] = aimAngles[YAW];
} }
AngleMatrix ( HudAngles, m_WorldFromHud.As3x4() ); m_WorldFromHud.SetupMatrixOrgAngles( m_PlayerViewOrigin, HudAngles );
m_WorldFromHud.SetTranslation ( m_PlayerViewOrigin );
m_WorldFromHud = m_WorldFromHud * HudUpCorrection;
// Remember in source X forwards, Y left, Z up. // Remember in source X forwards, Y left, Z up.
// We need to transform to a more conventional X right, Y up, Z backwards before doing the projection. // We need to transform to a more conventional X right, Y up, Z backwards before doing the projection.
@ -806,8 +795,8 @@ bool CClientVirtualReality::OverridePlayerMotion( float flInputSampleFrametime,
{ {
// Figure out what changes were made to the WEAPON by mouse/joystick/etc // Figure out what changes were made to the WEAPON by mouse/joystick/etc
VMatrix worldFromOldWeapon, worldFromCurWeapon; VMatrix worldFromOldWeapon, worldFromCurWeapon;
AngleMatrix ( oldAngles, worldFromOldWeapon.As3x4() ); worldFromOldWeapon.SetupMatrixAngles( oldAngles );
AngleMatrix ( curAngles, worldFromCurWeapon.As3x4() ); worldFromCurWeapon.SetupMatrixAngles( curAngles );
// We ignore mouse pitch, the mouse can't do rolls, so it's just yaw changes. // We ignore mouse pitch, the mouse can't do rolls, so it's just yaw changes.
if( !m_bOverrideTorsoAngle ) if( !m_bOverrideTorsoAngle )
@ -817,7 +806,7 @@ bool CClientVirtualReality::OverridePlayerMotion( float flInputSampleFrametime,
m_PlayerTorsoAngle[PITCH] = 0.0f; m_PlayerTorsoAngle[PITCH] = 0.0f;
} }
AngleMatrix ( m_PlayerTorsoAngle, worldFromTorso.As3x4() ); worldFromTorso.SetupMatrixAngles( m_PlayerTorsoAngle );
// Weapon view = mideye view, so apply that to the torso to find the world view direction. // Weapon view = mideye view, so apply that to the torso to find the world view direction.
m_WorldFromWeapon = worldFromTorso * m_TorsoFromMideye; m_WorldFromWeapon = worldFromTorso * m_TorsoFromMideye;
@ -846,10 +835,8 @@ bool CClientVirtualReality::OverridePlayerMotion( float flInputSampleFrametime,
} }
// Let every other system know. // Let every other system know.
AngleMatrix( *pNewAngles, m_WorldFromWeapon.As3x4() ); m_WorldFromWeapon.SetupMatrixOrgAngles( vWeaponOrigin, *pNewAngles );
AngleMatrix( m_PlayerTorsoAngle, worldFromTorso.As3x4() ); worldFromTorso.SetupMatrixAngles( m_PlayerTorsoAngle );
// Restore the translation.
m_WorldFromWeapon.SetTranslation ( vWeaponOrigin );
} }
break; break;
case HMM_SHOOTBOUNDEDMOUSE_LOOKFACE_MOVEFACE: case HMM_SHOOTBOUNDEDMOUSE_LOOKFACE_MOVEFACE:
@ -913,10 +900,8 @@ bool CClientVirtualReality::OverridePlayerMotion( float flInputSampleFrametime,
} }
// Let every other system know. // Let every other system know.
AngleMatrix( *pNewAngles, m_WorldFromWeapon.As3x4() ); m_WorldFromWeapon.SetupMatrixOrgAngles( vWeaponOrigin, *pNewAngles );
AngleMatrix( m_PlayerTorsoAngle, worldFromTorso.As3x4() ); worldFromTorso.SetupMatrixAngles( m_PlayerTorsoAngle );
// Restore the translation.
m_WorldFromWeapon.SetTranslation ( vWeaponOrigin );
} }
break; break;
case HMM_SHOOTMOUSE_MOVEFACE: case HMM_SHOOTMOUSE_MOVEFACE:
@ -942,10 +927,8 @@ bool CClientVirtualReality::OverridePlayerMotion( float flInputSampleFrametime,
m_PlayerTorsoAngle[ YAW ] += AngleDiff( curAngles[YAW], oldAngles[YAW] ) /2.f; m_PlayerTorsoAngle[ YAW ] += AngleDiff( curAngles[YAW], oldAngles[YAW] ) /2.f;
} }
AngleMatrix( *pNewAngles, m_WorldFromWeapon.As3x4() ); m_WorldFromWeapon.SetupMatrixOrgAngles( vWeaponOrigin, *pNewAngles );
AngleMatrix( m_PlayerTorsoAngle, worldFromTorso.As3x4() ); worldFromTorso.SetupMatrixAngles( m_PlayerTorsoAngle );
// Restore the translation.
m_WorldFromWeapon.SetTranslation ( vWeaponOrigin );
} }
break; break;
default: Assert ( false ); break; default: Assert ( false ); break;
@ -1007,101 +990,6 @@ bool CClientVirtualReality::OverridePlayerMotion( float flInputSampleFrametime,
return true; return true;
} }
// --------------------------------------------------------------------
// Purpose: Collects convar and HMD state once a session
// --------------------------------------------------------------------
bool CClientVirtualReality::CollectSessionStartStats( KeyValues *pkvStats )
{
pkvStats->SetName( "TF2VRSessionDetails" );
CUtlString sSerialNumber = g_pSourceVR->GetDisplaySerialNumber();
if( sSerialNumber.IsValid() && !sSerialNumber.IsEmpty() )
{
pkvStats->SetString( "SerialNumber", sSerialNumber.Get() );
}
CUtlString sModelNumber = g_pSourceVR->GetDisplayModelNumber();
if( sModelNumber.IsValid() && !sModelNumber.IsEmpty() )
{
pkvStats->SetString( "ModelNumberID", sModelNumber.Get() );
}
pkvStats->SetFloat( "vr_separation_user_inches", g_pSourceVR->GetUserIPDMM() / 25.4f );
//pkvStats->SetFloat( "vr_separation_toein_pixels", vr_separation_toein_pixels.GetFloat() );
//pkvStats->SetInt( "vr_moveaim_mode", vr_moveaim_mode.GetInt() );
//pkvStats->SetFloat( "vr_moveaim_reticle_yaw_limit", vr_moveaim_reticle_yaw_limit.GetFloat() );
//pkvStats->SetFloat( "vr_moveaim_reticle_pitch_limit", vr_moveaim_reticle_pitch_limit.GetFloat() );
//pkvStats->SetInt( "vr_moveaim_mode_zoom", vr_moveaim_mode_zoom.GetInt() );
//pkvStats->SetFloat( "vr_moveaim_reticle_yaw_limit_zoom", vr_moveaim_reticle_yaw_limit_zoom.GetFloat() );
//pkvStats->SetFloat( "vr_moveaim_reticle_pitch_limit_zoom", vr_moveaim_reticle_pitch_limit_zoom.GetFloat() );
//pkvStats->SetFloat( "vr_hud_max_fov", vr_hud_max_fov.GetFloat() );
//pkvStats->SetFloat( "vr_hud_forward", vr_hud_forward.GetFloat() );
//pkvStats->SetFloat( "vr_neckmodel_up", vr_neckmodel_up.GetFloat() );
//pkvStats->SetFloat( "vr_neckmodel_forwards", vr_neckmodel_forwards.GetFloat() );
//pkvStats->SetInt( "vr_hud_axis_lock_to_world", vr_hud_axis_lock_to_world.GetInt() );
//pkvStats->SetInt( "vr_ipdtest_left_t", vr_ipdtest_left_t.GetInt() );
//pkvStats->SetInt( "vr_ipdtest_left_b", vr_ipdtest_left_b.GetInt() );
//pkvStats->SetInt( "vr_ipdtest_left_i", vr_ipdtest_left_i.GetInt() );
//pkvStats->SetInt( "vr_ipdtest_left_o", vr_ipdtest_left_o.GetInt() );
//pkvStats->SetInt( "vr_ipdtest_right_t", vr_ipdtest_right_t.GetInt() );
//pkvStats->SetInt( "vr_ipdtest_right_b", vr_ipdtest_right_b.GetInt() );
//pkvStats->SetInt( "vr_ipdtest_right_i", vr_ipdtest_right_i.GetInt() );
//pkvStats->SetInt( "vr_ipdtest_right_o", vr_ipdtest_right_o.GetInt() );
return true;
}
// --------------------------------------------------------------------
// Purpose: Collects view stats every so often
// --------------------------------------------------------------------
bool CClientVirtualReality::CollectPeriodicStats( KeyValues *pkvStats )
{
// maybe we haven't even been called to get tracking data
if( !m_bMotionUpdated )
return false;
m_bMotionUpdated = false;
uint32 unPeriod = (uint32) vr_stat_sample_period.GetInt();
if( unPeriod == 0 )
return false; // periodic stats are turned off
RTime32 rtCurrent = time(NULL);
if( rtCurrent == m_rtLastMotionSample && ( rtCurrent - m_rtLastMotionSample ) < unPeriod )
return false; // it isn't time to report yet
pkvStats->SetName( "TF2VRMotionSample" );
pkvStats->SetInt( "SampleTime", rtCurrent );
Vector vPos;
QAngle viewAngles;
MatrixAngles( m_WorldFromMidEye.As3x4(), viewAngles, vPos );
pkvStats->SetFloat( "LookYaw", viewAngles[YAW] );
pkvStats->SetFloat( "LookPitch", viewAngles[PITCH] );
pkvStats->SetFloat( "LookRoll", viewAngles[ROLL] );
pkvStats->SetFloat( "PositionX", vPos.x );
pkvStats->SetFloat( "PositionY", vPos.y );
pkvStats->SetFloat( "PositionZ", vPos.z );
pkvStats->SetFloat( "VelocityX", m_PlayerLastMovement.x );
pkvStats->SetFloat( "VelocityY", m_PlayerLastMovement.y );
pkvStats->SetFloat( "VelocityZ", m_PlayerLastMovement.z );
QAngle aimAngles;
MatrixAngles( m_WorldFromWeapon.As3x4(), aimAngles );
pkvStats->SetFloat( "AimYaw", aimAngles[YAW] );
pkvStats->SetFloat( "AimPitch", aimAngles[PITCH] );
m_rtLastMotionSample = rtCurrent;
return true;
}
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// Purpose: Returns true if the world is zoomed // Purpose: Returns true if the world is zoomed
// -------------------------------------------------------------------- // --------------------------------------------------------------------
@ -1154,6 +1042,19 @@ void CClientVirtualReality::CancelTorsoTransformOverride()
} }
bool CClientVirtualReality::CanOverlayHudQuad()
{
bool bCanOverlay = true;
bCanOverlay = bCanOverlay && vr_render_hud_in_world.GetBool();
bCanOverlay = bCanOverlay && ( ! vr_hud_never_overlay.GetBool() );
bCanOverlay = bCanOverlay && ( vr_hud_axis_lock_to_world.GetInt() == 0 );
bCanOverlay = bCanOverlay && ( m_hmmMovementActual != HMM_SHOOTFACE_MOVETORSO );
return bCanOverlay;
}
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// Purpose: Returns the bounds in world space where the game should // Purpose: Returns the bounds in world space where the game should
// position the HUD. // position the HUD.
@ -1177,6 +1078,10 @@ void CClientVirtualReality::GetHUDBounds( Vector *pViewer, Vector *pUL, Vector *
// -------------------------------------------------------------------- // --------------------------------------------------------------------
void CClientVirtualReality::RenderHUDQuad( bool bBlackout, bool bTranslucent ) void CClientVirtualReality::RenderHUDQuad( bool bBlackout, bool bTranslucent )
{ {
// If we can overlay the HUD directly onto the target later, we'll do that instead (higher image quality).
if ( CanOverlayHudQuad() )
return;
Vector vHead, vUL, vUR, vLL, vLR; Vector vHead, vUL, vUR, vLL, vLR;
GetHUDBounds ( &vHead, &vUL, &vUR, &vLL, &vLR ); GetHUDBounds ( &vHead, &vUL, &vUR, &vLL, &vLR );
@ -1304,14 +1209,6 @@ float CClientVirtualReality::GetZoomedModeMagnification()
// -------------------------------------------------------------------- // --------------------------------------------------------------------
bool CClientVirtualReality::ProcessCurrentTrackingState( float fGameFOV ) bool CClientVirtualReality::ProcessCurrentTrackingState( float fGameFOV )
{ {
// Figure out the current HUD FOV.
m_fHudHorizontalFov = g_pSourceVR->GetHorizontalFOVDegrees() * vr_hud_display_ratio.GetFloat();
if( m_fHudHorizontalFov > vr_hud_max_fov.GetFloat() )
{
m_fHudHorizontalFov = vr_hud_max_fov.GetFloat();
}
m_WorldZoomScale = 1.0f; m_WorldZoomScale = 1.0f;
if ( fGameFOV != 0.0f ) if ( fGameFOV != 0.0f )
{ {
@ -1397,8 +1294,7 @@ void CClientVirtualReality::AlignTorsoAndViewToWeapon()
if( !UseVR() ) if( !UseVR() )
return; return;
VRTrackerState_t state = g_pSourceVR->GetTrackerState(); if( g_pSourceVR->WillDriftInYaw() )
if( state.bWillDriftInYaw )
{ {
m_iAlignTorsoAndViewToWeaponCountdown = 2; m_iAlignTorsoAndViewToWeaponCountdown = 2;
} }
@ -1408,291 +1304,202 @@ void CClientVirtualReality::AlignTorsoAndViewToWeapon()
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// Purpose: Lets VR do stuff at the very end of the rendering process // Purpose: Lets VR do stuff at the very end of the rendering process
// -------------------------------------------------------------------- // --------------------------------------------------------------------
void CClientVirtualReality::PostProcessFrame( const vrect_t *SrcRect ) void CClientVirtualReality::PostProcessFrame( StereoEye_t eEye )
{ {
if( !UseVR() ) if( !UseVR() )
return; return;
g_pSourceVR->DoDistortionProcessing( SrcRect ); g_pSourceVR->DoDistortionProcessing( eEye == STEREO_EYE_LEFT ? ISourceVirtualReality::VREye_Left : ISourceVirtualReality::VREye_Right );
}
if ( m_bIpdTestEnabled )
// --------------------------------------------------------------------
// Pastes the HUD directly onto the backbuffer / render target.
// (higher quality than the RenderHUDQuad() path but can't always be used)
// --------------------------------------------------------------------
void CClientVirtualReality::OverlayHUDQuadWithUndistort( const CViewSetup &eyeView, bool bDoUndistort, bool bBlackout, bool bTranslucent )
{
if ( ! UseVR() )
return;
// If we can't overlay the HUD, it will be handled on another path (rendered into the scene with RenderHUDQuad()).
if ( ! CanOverlayHudQuad() )
return;
// Get the position of the HUD quad in world space as used by RenderHUDQuad(). Then convert to a rectangle in normalized
// device coordinates.
Vector vHead, vUL, vUR, vLL, vLR;
GetHUDBounds ( &vHead, &vUL, &vUR, &vLL, &vLR );
VMatrix worldToView, viewToProjection, worldToProjection, worldToPixels;
render->GetMatricesForView( eyeView, &worldToView, &viewToProjection, &worldToProjection, &worldToPixels );
Vector pUL, pUR, pLL, pLR;
worldToProjection.V3Mul( vUL, pUL );
worldToProjection.V3Mul( vUR, pUR );
worldToProjection.V3Mul( vLL, pLL );
worldToProjection.V3Mul( vLR, pLR );
float ndcHudBounds[4];
ndcHudBounds[0] = Min ( Min( pUL.x, pUR.x ), Min( pLL.x, pLR.x ) );
ndcHudBounds[1] = Min ( Min( pUL.y, pUR.y ), Min( pLL.y, pLR.y ) );
ndcHudBounds[2] = Max ( Max( pUL.x, pUR.x ), Max( pLL.x, pLR.x ) );
ndcHudBounds[3] = Max ( Max( pUL.y, pUR.y ), Max( pLL.y, pLR.y ) );
ISourceVirtualReality::VREye sourceVrEye = ( eyeView.m_eStereoEye == STEREO_EYE_LEFT ) ? ISourceVirtualReality::VREye_Left : ISourceVirtualReality::VREye_Right;
g_pSourceVR->CompositeHud ( sourceVrEye, ndcHudBounds, bDoUndistort, bBlackout, bTranslucent );
}
// --------------------------------------------------------------------
// Purpose: Switches to VR mode
// --------------------------------------------------------------------
void CClientVirtualReality::Activate()
{
// we can only do this if a headtrack DLL is loaded
if( !g_pSourceVR )
return;
// see if VR mode is even enabled
if( materials->GetCurrentConfigForVideoCard().m_nVRModeAdapter == -1 )
{ {
DrawIpdCalibration ( SrcRect ); Warning( "Enable VR mode in the video options before trying to use it.\n" );
return;
} }
}
// See if we have an actual adapter
//----------------------------------------------------------------------------- int32 nVRModeAdapter = g_pSourceVR->GetVRModeAdapter();
// Calibration UI if( nVRModeAdapter == -1 )
//-----------------------------------------------------------------------------
// These control the conversion of IPD from pixels to inches.
ConVar vr_ipdtest_interp_ipd_start_pixels ( "vr_ipdtest_interp_ipd_start_pixels", "491.0", 0 );
ConVar vr_ipdtest_interp_ipd_start_inches ( "vr_ipdtest_interp_ipd_start_inches", "2.717", 0 ); // 69mm
ConVar vr_ipdtest_interp_ipd_end_pixels ( "vr_ipdtest_interp_ipd_end_pixels", "602.0", 0 );
ConVar vr_ipdtest_interp_ipd_end_inches ( "vr_ipdtest_interp_ipd_end_inches", "2.205", 0 ); // 56mm
// These numbers need to be filled in from physical tests. Right now they are placeholder.
ConVar vr_ipdtest_interp_relief_start_pixels ( "vr_ipdtest_interp_relief_start_pixels", "400.0", 0 );
ConVar vr_ipdtest_interp_relief_start_inches ( "vr_ipdtest_interp_relief_start_inches", "0.0", 0 );
ConVar vr_ipdtest_interp_relief_end_pixels ( "vr_ipdtest_interp_relief_end_pixels", "600.0", 0 );
ConVar vr_ipdtest_interp_relief_end_inches ( "vr_ipdtest_interp_relief_end_inches", "1.0", 0 );
float Interpolate ( float fIn, float fInStart, float fInEnd, float fOutStart, float fOutEnd )
{
float fLamdba = ( fIn - fInStart ) / ( fInEnd - fInStart );
float fOut = fOutStart + fLamdba * ( fOutEnd - fOutStart );
return fOut;
}
void CClientVirtualReality::RecalcEyeCalibration ( TEyeCalibration *p )
{
int iDisplayWidth, iDisplayHeight;
bool bSuccess = g_pSourceVR->GetWindowSize ( &iDisplayWidth, &iDisplayHeight );
Assert ( bSuccess );
if ( bSuccess )
{ {
// Eye relief. Warning( "Unable to get VRMode adapter from OpenVR. VR mode cannot be enabled. Try restarting and then enabling VR again.\n" );
// Many ways to take the average eye size. But since the top edge is hard to find (strains the eyes, and there's problems with glasses), let's just use the difference between left and right. return;
p->Left.fSizePixels = (float)( p->Left.iIn - p->Left.iOut ); }
p->Right.fSizePixels = (float)( p->Right.iIn - p->Right.iOut );
// ...not that we have any data yet, nor do we know what to do with it if we had it. // we can only activate if we've got a VR device
float fLeftInches = Interpolate ( p->Left.fSizePixels, if( materials->GetCurrentConfigForVideoCard().m_nVRModeAdapter != nVRModeAdapter )
vr_ipdtest_interp_relief_start_pixels.GetFloat(), {
vr_ipdtest_interp_relief_end_pixels.GetFloat(), Warning( "VR Mode expects adapter %d which is different from %d which we are currently using. Try restarting and enabling VR mode again.\n",
vr_ipdtest_interp_relief_start_inches.GetFloat(), nVRModeAdapter, materials->GetCurrentConfigForVideoCard().m_nVRModeAdapter );
vr_ipdtest_interp_relief_end_inches.GetFloat() ); engine->ExecuteClientCmd( "mat_enable_vrmode 0\n" );
p->Left.fReliefInches = fLeftInches; return;
float fRightInches = Interpolate ( p->Right.fSizePixels,
vr_ipdtest_interp_relief_start_pixels.GetFloat(),
vr_ipdtest_interp_relief_end_pixels.GetFloat(),
vr_ipdtest_interp_relief_start_inches.GetFloat(),
vr_ipdtest_interp_relief_end_inches.GetFloat() );
p->Right.fReliefInches = fRightInches;
// Calculate IPD
// In and Out are both measured from the nearest edge of the display, i.e. the left ones from the left edge, the right ones from the right edge.
float fLeftMid = (float)( p->Left.iIn + p->Left.iOut ) * 0.5f;
float fRightMid = (float)( p->Right.iIn + p->Right.iOut ) * 0.5f;
// An outside value of 0 is the first actual pixel on the outer edge of the display.
// So if both values are 0, the two lines are (iDisplayWidth-1) apart.
float fSeparationInPixels = (float)( iDisplayWidth - 1 ) - fLeftMid - fRightMid;
float fIpdInches = Interpolate ( fSeparationInPixels,
vr_ipdtest_interp_ipd_start_pixels.GetFloat(),
vr_ipdtest_interp_ipd_end_pixels.GetFloat(),
vr_ipdtest_interp_ipd_start_inches.GetFloat(),
vr_ipdtest_interp_ipd_end_inches.GetFloat() );
p->fIpdInches = fIpdInches;
p->fIpdPixels = fSeparationInPixels;
} }
}
void CClientVirtualReality::GetCurrentEyeCalibration ( TEyeCalibration *p ) // can't activate twice
{ if( UseVR() )
p->Left.iTop = vr_ipdtest_left_t.GetInt(); return;
p->Left.iBot = vr_ipdtest_left_b.GetInt();
p->Left.iIn = vr_ipdtest_left_i.GetInt();
p->Left.iOut = vr_ipdtest_left_o.GetInt();
p->Right.iTop = vr_ipdtest_right_t.GetInt();
p->Right.iBot = vr_ipdtest_right_b.GetInt();
p->Right.iIn = vr_ipdtest_right_i.GetInt();
p->Right.iOut = vr_ipdtest_right_o.GetInt();
RecalcEyeCalibration ( p );
m_IpdTestCurrent = *p;
}
void CClientVirtualReality::SetCurrentEyeCalibration ( TEyeCalibration const &p ) // remember where we were
{ m_bNonVRWindowed = g_pMaterialSystem->GetCurrentConfigForVideoCard().Windowed();
m_IpdTestCurrent = p; vgui::surface()->GetScreenSize( m_nNonVRWidth, m_nNonVRHeight );
RecalcEyeCalibration ( &m_IpdTestCurrent ); #if defined( USE_SDL )
g_pSourceVR->SetUserIPDMM( m_IpdTestCurrent.fIpdInches * 25.4f ); static ConVarRef sdl_displayindex( "sdl_displayindex" );
vr_ipdtest_left_t.SetValue ( m_IpdTestCurrent.Left.iTop ); m_nNonVRSDLDisplayIndex = sdl_displayindex.GetInt();
vr_ipdtest_left_b.SetValue ( m_IpdTestCurrent.Left.iBot );
vr_ipdtest_left_i.SetValue ( m_IpdTestCurrent.Left.iIn );
vr_ipdtest_left_o.SetValue ( m_IpdTestCurrent.Left.iOut );
vr_ipdtest_right_t.SetValue ( m_IpdTestCurrent.Right.iTop );
vr_ipdtest_right_b.SetValue ( m_IpdTestCurrent.Right.iBot );
vr_ipdtest_right_i.SetValue ( m_IpdTestCurrent.Right.iIn );
vr_ipdtest_right_o.SetValue ( m_IpdTestCurrent.Right.iOut );
#ifdef _DEBUG
Warning ( " TBIO: left %d %d %d %d: right %d %d %d %d: %f inches\n", // Need the spaces to center it so I can read it!
m_IpdTestCurrent.Left.iTop,
m_IpdTestCurrent.Left.iBot,
m_IpdTestCurrent.Left.iIn,
m_IpdTestCurrent.Left.iOut,
m_IpdTestCurrent.Right.iTop,
m_IpdTestCurrent.Right.iBot,
m_IpdTestCurrent.Right.iIn,
m_IpdTestCurrent.Right.iOut,
m_IpdTestCurrent.fIpdInches );
#endif #endif
if( !g_pSourceVR->Activate() )
{
// we couldn't activate, so just punt on this whole thing
return;
}
// general all-game stuff
engine->ExecuteClientCmd( "mat_reset_rendertargets\n" );
// game specific VR config
CUtlString sCmd;
sCmd.Format( "exec sourcevr_%s.cfg\n", COM_GetModDirectory() );
engine->ExecuteClientCmd( sCmd.Get() );
vgui::surface()->SetSoftwareCursor( true );
#if defined(POSIX)
ConVarRef m_rawinput( "m_rawinput" );
m_bNonVRRawInput = m_rawinput.GetBool();
m_rawinput.SetValue( 1 );
ConVarRef mat_vsync( "mat_vsync" );
mat_vsync.SetValue( 0 );
#endif
g_pMatSystemSurface->ForceScreenSizeOverride(true, 640, 480 );
int nViewportWidth, nViewportHeight;
g_pSourceVR->GetViewportBounds( ISourceVirtualReality::VREye_Left, NULL, NULL, &nViewportWidth, &nViewportHeight );
vgui::surface()->SetFullscreenViewportAndRenderTarget( 0, 0, nViewportWidth, nViewportHeight, g_pSourceVR->GetRenderTarget( ISourceVirtualReality::VREye_Left, ISourceVirtualReality::RT_Color ) );
vgui::ivgui()->SetVRMode( true );
VRRect_t rect;
if( g_pSourceVR->GetDisplayBounds( &rect ) )
{
// set mode
char szCmd[ 256 ];
Q_snprintf( szCmd, sizeof( szCmd ), "mat_setvideomode %i %i %i\n", rect.nWidth, rect.nHeight, vr_force_windowed.GetBool()? 1 : 0 );
engine->ClientCmd_Unrestricted( szCmd );
}
} }
void CClientVirtualReality::SetEyeCalibrationDisplayMisc ( int iEditingNum, bool bVisible )
void CClientVirtualReality::Deactivate()
{ {
if( bVisible && !m_bIpdTestEnabled ) // can't deactivate when we aren't active
if( !UseVR() )
return;
g_pSourceVR->Deactivate();
g_pMatSystemSurface->ForceScreenSizeOverride(false, 0, 0 );
g_pMaterialSystem->GetRenderContext()->Viewport( 0, 0, m_nNonVRWidth, m_nNonVRHeight );
vgui::surface()->SetFullscreenViewportAndRenderTarget( 0, 0, m_nNonVRWidth, m_nNonVRHeight, NULL );
static ConVarRef cl_software_cursor( "cl_software_cursor" );
vgui::surface()->SetSoftwareCursor( cl_software_cursor.GetBool() );
#if defined( USE_SDL )
static ConVarRef sdl_displayindex( "sdl_displayindex" );
sdl_displayindex.SetValue( m_nNonVRSDLDisplayIndex );
#endif
#if defined(POSIX)
ConVarRef m_rawinput( "m_rawinput" );
m_rawinput.SetValue( m_bNonVRRawInput );
#endif
// Make sure the client .dll root panel is at the proper point before doing the "SolveTraverse" calls
vgui::VPANEL root = enginevgui->GetPanel( PANEL_CLIENTDLL );
if ( root != 0 )
{ {
// if we're being shown, read out the current config from the convars vgui::ipanel()->SetSize( root, m_nNonVRWidth, m_nNonVRHeight );
GetCurrentEyeCalibration ( &m_IpdTestCurrent ); }
// Same for client .dll tools
root = enginevgui->GetPanel( PANEL_CLIENTDLL_TOOLS );
if ( root != 0 )
{
vgui::ipanel()->SetSize( root, m_nNonVRWidth, m_nNonVRHeight );
} }
m_IpdTestControl = iEditingNum; int viewWidth, viewHeight;
m_bIpdTestEnabled = bVisible; vgui::surface()->GetScreenSize( viewWidth, viewHeight );
engine->ExecuteClientCmd( "mat_reset_rendertargets\n" );
// set mode
char szCmd[ 256 ];
Q_snprintf( szCmd, sizeof( szCmd ), "mat_setvideomode %i %i %i\n", m_nNonVRWidth, m_nNonVRHeight, m_bNonVRWindowed ? 1 : 0 );
engine->ClientCmd_Unrestricted( szCmd );
} }
void CClientVirtualReality::DrawIpdCalibration ( const vrect_t *SrcRect ) // Called when startup is complete
void CClientVirtualReality::StartupComplete()
{ {
int ControlNum = m_IpdTestControl; if( vr_activate_default.GetBool() )
int WhichEdges = 0; Activate();
bool bShowLeft = false;
bool bShowRight = false;
switch ( ControlNum )
{
case 0: case 1: case 2: case 3:
bShowLeft = true;
WhichEdges = 1 << ControlNum;
break;
case 4: case 5: case 6: case 7:
bShowRight = true;
WhichEdges = 1 << ControlNum;
break;
case 8:
// Adjust IPD directly.
bShowLeft = true;
bShowRight = true;
WhichEdges = 0x33;
break;
case 9:
// Left relief.
bShowLeft = true;
WhichEdges = 0xff;
break;
case 10:
// Right relief.
bShowRight = true;
WhichEdges = 0xff;
break;
default:
Assert ( false );
break;
}
CMatRenderContextPtr pRenderContext( materials );
//pRenderContext->ClearColor4ub ( 0, 0, 0, 0 );
//pRenderContext->ClearBuffers ( true, true );
IMaterial *pMaterial = materials->FindMaterial ( "debug/debugtranslucentsinglecolor", TEXTURE_GROUP_OTHER, true );
pMaterial->ColorModulate( 1.0f, 1.0f, 1.0f );
pMaterial->AlphaModulate( 1.0f );
const int Border = 4;
const int BlueStart = 10; // Well, it used to be blue, now it isn't.
const int BlueSize = 30;
// You want a pure green for the "current" edge so that it has no chromatic aberration smearing (i.e. white is a terrible choice!)
// The non-current lines can be a different colour because you're not actively tuning them.
#define SET_COLOR1(num) if ( 0 != ( WhichEdges & (1<<(num)) ) ) { pMaterial->ColorModulate( 0.0f, 1.0f, 0.0f ); } else { pMaterial->ColorModulate( 0.25f, 0.25f, 0.25f ); }
#define SET_COLOR2(num) if ( 0 != ( WhichEdges & (1<<(num)) ) ) { pMaterial->ColorModulate( 1.0f, 1.0f, 1.0f ); } else { pMaterial->ColorModulate( 0.0f, 0.0f, 0.0f ); }
if ( bShowLeft )
{
int t = m_IpdTestCurrent.Left.iTop;
int b = m_IpdTestCurrent.Left.iBot;
int l = m_IpdTestCurrent.Left.iOut;
int r = m_IpdTestCurrent.Left.iIn;
// Render a black rect to enhance contrast.
pMaterial->ColorModulate( 0.0f, 0.0f, 0.0f );
pMaterial->AlphaModulate( 1.0f );
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l-Border-1, t-Border-1, r-l+Border*2+3, Border*2+3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l-Border-1, b-Border-1, r-l+Border*2+3, Border*2+3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l-Border-1, t-Border-1, Border*2+3, b-t+Border*2+3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, r-Border-1, t-Border-1, Border*2+3, b-t+Border*2+3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
int cx = (l+r)/2;
int cy = (t+b)/2;
// For each side, draw the line along the side, and also a line "pointing to" it from the middle.
// Left
SET_COLOR1(1);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l, t, 1, b-t+1, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
SET_COLOR2(1);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l+BlueStart, cy-1, BlueSize, 3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
// Right
SET_COLOR1(0);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, r, t, 1, b-t+1, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
SET_COLOR2(0);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, r-BlueStart-BlueSize, cy-1, BlueSize, 3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
// Top
SET_COLOR1(2);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l, t, r-l+1, 1, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
SET_COLOR2(2);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, cx-1, t+BlueStart, 3, BlueSize, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
// Bottom
SET_COLOR1(3);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l, b, r-l+1, 1, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
SET_COLOR2(3);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, cx-1, b-BlueStart-BlueSize, 3, BlueSize, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
}
if ( bShowRight )
{
int t = m_IpdTestCurrent.Right.iTop;
int b = m_IpdTestCurrent.Right.iBot;
// An outside value of 0 is the first actual pixel on the edge of the display. So if both values are 0, the two lines are (SrcRect->width - 1) apart.
int l = SrcRect->width - 1 - m_IpdTestCurrent.Right.iIn;
int r = SrcRect->width - 1 - m_IpdTestCurrent.Right.iOut;
// Render a black rect to enhance contrast.
pMaterial->ColorModulate( 0.0f, 0.0f, 0.0f );
pMaterial->AlphaModulate( 1.0f );
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l-Border-1, t-Border-1, r-l+Border*2+3, Border*2+3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l-Border-1, b-Border-1, r-l+Border*2+3, Border*2+3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l-Border-1, t-Border-1, Border*2+3, b-t+Border*2+3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, r-Border-1, t-Border-1, Border*2+3, b-t+Border*2+3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
int cx = (l+r)/2;
int cy = (t+b)/2;
// For each side, draw the line along the side, and also a line "pointing to" it from the middle.
// Left
SET_COLOR1(4);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l, t, 1, b-t+1, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
SET_COLOR2(4);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l+BlueStart, cy-1, BlueSize, 3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
// Right
SET_COLOR1(5);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, r, t, 1, b-t+1, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
SET_COLOR2(5);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, r-BlueStart-BlueSize, cy-1, BlueSize, 3, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
// Top
SET_COLOR1(6);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l, t, r-l+1, 1, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
SET_COLOR2(6);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, cx-1, t+BlueStart, 3, BlueSize, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
// Bottom
SET_COLOR1(7);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, l, b, r-l+1, 1, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
SET_COLOR2(7);
pRenderContext->DrawScreenSpaceRectangle ( pMaterial, cx-1, b-BlueStart-BlueSize, 3, BlueSize, 0.0f, 0.0f, 0.0f, 0.0f, 16, 16 );
}
return;
} }

View File

@ -14,6 +14,7 @@
#include "tier3/tier3.h" #include "tier3/tier3.h"
#include "iclientvirtualreality.h" #include "iclientvirtualreality.h"
#include "view_shared.h"
enum HeadtrackMovementMode_t enum HeadtrackMovementMode_t
{ {
@ -34,20 +35,6 @@ enum HeadtrackMovementMode_t
}; };
// used for interacting with the calibration UI
struct TEyeCalibration
{
struct TEyeEdges
{
int iTop, iBot, iIn, iOut; // These are used to calculate everything else.
float fSizePixels;
float fReliefInches;
} Left, Right;
float fIpdPixels;
float fIpdInches;
};
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// The implementation // The implementation
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -77,6 +64,8 @@ public:
virtual InitReturnVal_t Init(); virtual InitReturnVal_t Init();
virtual void Shutdown(); virtual void Shutdown();
// Called when startup is complete
void StartupComplete();
//--------------------------------------------------------- //---------------------------------------------------------
// IClientVirtualReality implementation // IClientVirtualReality implementation
@ -94,6 +83,7 @@ public:
bool CurrentlyZoomed(); bool CurrentlyZoomed();
void OverrideTorsoTransform( const Vector & position, const QAngle & angles ) ; void OverrideTorsoTransform( const Vector & position, const QAngle & angles ) ;
void CancelTorsoTransformOverride( ) ; void CancelTorsoTransformOverride( ) ;
bool CanOverlayHudQuad();
void GetHUDBounds( Vector *pViewer, Vector *pUL, Vector *pUR, Vector *pLL, Vector *pLR ); void GetHUDBounds( Vector *pViewer, Vector *pUL, Vector *pUR, Vector *pLL, Vector *pLR );
void RenderHUDQuad( bool bBlackout, bool bTranslucent ); void RenderHUDQuad( bool bBlackout, bool bTranslucent );
float GetZoomedModeMagnification(); float GetZoomedModeMagnification();
@ -105,23 +95,14 @@ public:
const VMatrix & GetWorldFromMidEye() const { return m_WorldFromMidEyeNoDebugCam; } const VMatrix & GetWorldFromMidEye() const { return m_WorldFromMidEyeNoDebugCam; }
void OverrideViewModelTransform( Vector & vmorigin, QAngle & vmangles, bool bUseLargeOverride ); void OverrideViewModelTransform( Vector & vmorigin, QAngle & vmangles, bool bUseLargeOverride );
void AlignTorsoAndViewToWeapon(); void AlignTorsoAndViewToWeapon();
void PostProcessFrame( const vrect_t *SrcRect ); void PostProcessFrame( StereoEye_t eEye );
void OverlayHUDQuadWithUndistort( const CViewSetup &view, bool bDoUndistort, bool bBlackout, bool bTranslucent );
//--------------------------------------------------------- //---------------------------------------------------------
// Stat collection // Enter/leave VR mode
//--------------------------------------------------------- //---------------------------------------------------------
bool CollectSessionStartStats( KeyValues *pkvStats ); void Activate();
bool CollectPeriodicStats( KeyValues *pkvStats ); void Deactivate();
//---------------------------------------------------------
// IPD Calibration
//---------------------------------------------------------
void DrawIpdCalibration ( const vrect_t *SrcRect );
void RecalcEyeCalibration ( TEyeCalibration *p );
void GetCurrentEyeCalibration ( TEyeCalibration *p );
void SetCurrentEyeCalibration ( TEyeCalibration const &p );
void SetEyeCalibrationDisplayMisc ( int iEditingNum, bool bVisible );
private: private:
HeadtrackMovementMode_t m_hmmMovementActual; HeadtrackMovementMode_t m_hmmMovementActual;
@ -169,11 +150,14 @@ private:
RTime32 m_rtLastMotionSample; RTime32 m_rtLastMotionSample;
// IPD test fields // video mode we had before we entered VR mode
bool m_bIpdTestEnabled; bool m_bNonVRWindowed;
int m_IpdTestControl; int m_nNonVRWidth;
TEyeCalibration m_IpdTestCurrent; int m_nNonVRHeight;
#if defined( USE_SDL )
int m_nNonVRSDLDisplayIndex;
#endif
bool m_bNonVRRawInput;
}; };
extern CClientVirtualReality g_ClientVirtualReality; extern CClientVirtualReality g_ClientVirtualReality;

View File

@ -36,7 +36,7 @@
#include <vgui/ILocalize.h> #include <vgui/ILocalize.h>
#include "hud_vote.h" #include "hud_vote.h"
#include "ienginevgui.h" #include "ienginevgui.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
#if defined( _X360 ) #if defined( _X360 )
#include "xbox/xbox_console.h" #include "xbox/xbox_console.h"
#endif #endif
@ -208,6 +208,7 @@ static void __MsgFunc_VGUIMenu( bf_read &msg )
if ( count > 0 ) if ( count > 0 )
{ {
KeyValues *keys = new KeyValues("data"); KeyValues *keys = new KeyValues("data");
//Msg( "MsgFunc_VGUIMenu:\n" );
for ( int i=0; i<count; i++) for ( int i=0; i<count; i++)
{ {
@ -216,10 +217,25 @@ static void __MsgFunc_VGUIMenu( bf_read &msg )
msg.ReadString( name, sizeof(name) ); msg.ReadString( name, sizeof(name) );
msg.ReadString( data, sizeof(data) ); msg.ReadString( data, sizeof(data) );
//Msg( " %s <- '%s'\n", name, data );
keys->SetString( name, data ); keys->SetString( name, data );
} }
// !KLUDGE! Whitelist of URL protocols formats for MOTD
if (
!V_stricmp( panelname, PANEL_INFO ) // MOTD
&& keys->GetInt( "type", 0 ) == 2 // URL message type
) {
const char *pszURL = keys->GetString( "msg", "" );
if ( Q_strncmp( pszURL, "http://", 7 ) != 0 && Q_strncmp( pszURL, "https://", 8 ) != 0 )
{
Warning( "Blocking MOTD URL '%s'; must begin with 'http://' or 'https://'\n", pszURL );
keys->deleteThis();
return;
}
}
viewport->SetData( keys ); viewport->SetData( keys );
keys->deleteThis(); keys->deleteThis();
@ -496,7 +512,7 @@ bool ClientModeShared::ShouldBlackoutAroundHUD()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Allows the client mode to override mouse control stuff in headtrack // Purpose: Allows the client mode to override mouse control stuff in sourcevr
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
HeadtrackMovementMode_t ClientModeShared::ShouldOverrideHeadtrackControl() HeadtrackMovementMode_t ClientModeShared::ShouldOverrideHeadtrackControl()
{ {

View File

@ -132,6 +132,7 @@ public:
virtual bool IsInfoPanelAllowed() OVERRIDE { return true; } virtual bool IsInfoPanelAllowed() OVERRIDE { return true; }
virtual void InfoPanelDisplayed() OVERRIDE { } virtual void InfoPanelDisplayed() OVERRIDE { }
virtual bool IsHTMLInfoPanelAllowed() OVERRIDE { return true; }
protected: protected:
CBaseViewport *m_pViewport; CBaseViewport *m_pViewport;

View File

@ -9,6 +9,7 @@
#include "vguitextwindow.h" #include "vguitextwindow.h"
#include <networkstringtabledefs.h> #include <networkstringtabledefs.h>
#include <cdll_client_int.h> #include <cdll_client_int.h>
#include <clientmode_shared.h>
#include <vgui/IScheme.h> #include <vgui/IScheme.h>
#include <vgui/ILocalize.h> #include <vgui/ILocalize.h>
@ -165,8 +166,15 @@ void CTextWindow::ShowText( const char *text )
void CTextWindow::ShowURL( const char *URL, bool bAllowUserToDisable ) void CTextWindow::ShowURL( const char *URL, bool bAllowUserToDisable )
{ {
#if defined( ENABLE_CHROMEHTMLWINDOW ) #if defined( ENABLE_CHROMEHTMLWINDOW )
if ( bAllowUserToDisable && cl_disablehtmlmotd.GetBool() ) #ifdef _DEBUG
Msg( "CTextWindow::ShowURL( %s )\n", URL );
#endif
ClientModeShared *mode = ( ClientModeShared * )GetClientModeNormal();
if ( ( bAllowUserToDisable && cl_disablehtmlmotd.GetBool() ) || !mode->IsHTMLInfoPanelAllowed() )
{ {
Warning( "Blocking HTML info panel '%s'; Using plaintext instead.\n", URL );
// User has disabled HTML TextWindows. Show the fallback as text only. // User has disabled HTML TextWindows. Show the fallback as text only.
if ( g_pStringTableInfoPanel ) if ( g_pStringTableInfoPanel )
{ {
@ -289,7 +297,15 @@ void CTextWindow::Update( void )
} }
else if ( m_nContentType == TYPE_URL ) else if ( m_nContentType == TYPE_URL )
{ {
ShowURL( m_szMessage ); if ( !Q_strncmp( m_szMessage, "http://", 7 ) || !Q_strncmp( m_szMessage, "https://", 8 ) || !Q_stricmp( m_szMessage, "about:blank" ) )
{
ShowURL( m_szMessage );
}
else
{
// We should have trapped this at a higher level
Assert( !"URL protocol is missing or blocked" );
}
} }
else if ( m_nContentType == TYPE_FILE ) else if ( m_nContentType == TYPE_FILE )
{ {

View File

@ -146,6 +146,7 @@ void CHUDAutoAim::VidInit( void )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool CHUDAutoAim::ShouldDraw( void ) bool CHUDAutoAim::ShouldDraw( void )
{ {
#ifndef HL1_CLIENT_DLL
C_BaseHLPlayer *pLocalPlayer = (C_BaseHLPlayer *)C_BasePlayer::GetLocalPlayer(); C_BaseHLPlayer *pLocalPlayer = (C_BaseHLPlayer *)C_BasePlayer::GetLocalPlayer();
if ( pLocalPlayer ) if ( pLocalPlayer )
{ {
@ -154,6 +155,7 @@ bool CHUDAutoAim::ShouldDraw( void )
return false; return false;
} }
} }
#endif
return ( (hud_draw_fixed_reticle.GetBool() || hud_draw_active_reticle.GetBool()) && CHudElement::ShouldDraw() && !engine->IsDrawingLoadingImage() ); return ( (hud_draw_fixed_reticle.GetBool() || hud_draw_active_reticle.GetBool()) && CHudElement::ShouldDraw() && !engine->IsDrawingLoadingImage() );
} }

View File

@ -20,7 +20,7 @@
#include "IEffects.h" #include "IEffects.h"
#include "hudelement.h" #include "hudelement.h"
#include "clienteffectprecachesystem.h" #include "clienteffectprecachesystem.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
using namespace vgui; using namespace vgui;

View File

@ -451,6 +451,17 @@ void CHudWeaponSelection::Paint()
if ( !pSelectedWeapon ) if ( !pSelectedWeapon )
return; return;
bool bPushedViewport = false;
if( hud_fastswitch.GetInt() == HUDTYPE_FASTSWITCH || hud_fastswitch.GetInt() == HUDTYPE_PLUS )
{
CMatRenderContextPtr pRenderContext( materials );
if( pRenderContext->GetRenderTarget() )
{
surface()->PushFullscreenViewport();
bPushedViewport = true;
}
}
// interpolate the selected box size between the small box size and the large box size // interpolate the selected box size between the small box size and the large box size
// interpolation has been removed since there is no weapon pickup animation anymore, so it's all at the largest size // interpolation has been removed since there is no weapon pickup animation anymore, so it's all at the largest size
float percentageDone = 1.0f; //min(1.0f, (gpGlobals->curtime - m_flPickupStartTime) / m_flWeaponPickupGrowTime); float percentageDone = 1.0f; //min(1.0f, (gpGlobals->curtime - m_flPickupStartTime) / m_flWeaponPickupGrowTime);
@ -727,6 +738,11 @@ void CHudWeaponSelection::Paint()
} }
break; break;
} }
if( bPushedViewport )
{
surface()->PopFullscreenViewport();
}
} }
@ -1025,8 +1041,6 @@ void CHudWeaponSelection::ApplySchemeSettings(vgui::IScheme *pScheme)
{ {
SetBounds( x, y, screenWide - x, screenTall - y ); SetBounds( x, y, screenWide - x, screenTall - y );
} }
SetForceStereoRenderToFrameBuffer( true );
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -114,7 +114,8 @@ void CHudBaseDeathNotice::Paint()
DeathNoticeItem &msg = m_DeathNotices[i]; DeathNoticeItem &msg = m_DeathNotices[i];
CHudTexture *icon = msg.iconDeath; CHudTexture *icon = msg.iconDeath;
CHudTexture *iconPrekiller = msg.iconPreKiller;
wchar_t victim[256]=L""; wchar_t victim[256]=L"";
wchar_t killer[256]=L""; wchar_t killer[256]=L"";
@ -125,10 +126,15 @@ void CHudBaseDeathNotice::Paint()
int iVictimTextWide = UTIL_ComputeStringWidth( m_hTextFont, victim ) + xSpacing; int iVictimTextWide = UTIL_ComputeStringWidth( m_hTextFont, victim ) + xSpacing;
int iDeathInfoTextWide= msg.wzInfoText[0] ? UTIL_ComputeStringWidth( m_hTextFont, msg.wzInfoText ) + xSpacing : 0; int iDeathInfoTextWide= msg.wzInfoText[0] ? UTIL_ComputeStringWidth( m_hTextFont, msg.wzInfoText ) + xSpacing : 0;
int iDeathInfoEndTextWide= msg.wzInfoTextEnd[0] ? UTIL_ComputeStringWidth( m_hTextFont, msg.wzInfoTextEnd ) + xSpacing : 0;
int iKillerTextWide = killer[0] ? UTIL_ComputeStringWidth( m_hTextFont, killer ) + xSpacing : 0; int iKillerTextWide = killer[0] ? UTIL_ComputeStringWidth( m_hTextFont, killer ) + xSpacing : 0;
int iLineTall = m_flLineHeight; int iLineTall = m_flLineHeight;
int iTextTall = surface()->GetFontTall( m_hTextFont ); int iTextTall = surface()->GetFontTall( m_hTextFont );
int iconWide = 0, iconTall = 0, iDeathInfoOffset = 0, iVictimTextOffset = 0, iconActualWide = 0; int iconWide = 0, iconTall = 0, iDeathInfoOffset = 0, iVictimTextOffset = 0, iconActualWide = 0;
int iPreKillerTextWide = msg.wzPreKillerText[0] ? UTIL_ComputeStringWidth( m_hTextFont, msg.wzPreKillerText ) - xSpacing : 0;
int iconPrekillerWide = 0, iconPrekillerActualWide = 0, iconPreKillerTall = 0;
// Get the local position for this notice // Get the local position for this notice
if ( icon ) if ( icon )
@ -145,7 +151,25 @@ void CHudBaseDeathNotice::Paint()
iconTall *= flScale; iconTall *= flScale;
iconWide *= flScale; iconWide *= flScale;
} }
int iTotalWide = iKillerTextWide + iconWide + iVictimTextWide + iDeathInfoTextWide + ( xMargin * 2 );
if ( iconPrekiller )
{
iconPrekillerActualWide = iconPrekiller->EffectiveWidth( 1.0f );
iconPrekillerWide = iconPrekillerActualWide;
iconPreKillerTall = iconPrekiller->EffectiveHeight( 1.0f );
int iconTallDesired = iLineTall-YRES(2);
Assert( 0 != iconTallDesired );
float flScale = (float) iconTallDesired / (float) iconPreKillerTall;
iconPrekillerActualWide *= flScale;
iconPreKillerTall *= flScale;
iconPrekillerWide *= flScale;
}
int iTotalWide = iKillerTextWide + iconWide + iVictimTextWide + iDeathInfoTextWide + iDeathInfoEndTextWide + ( xMargin * 2 );
iTotalWide += iconPrekillerWide + iPreKillerTextWide;
int y = yStart + ( ( iLineTall + m_flLineSpacing ) * i ); int y = yStart + ( ( iLineTall + m_flLineSpacing ) * i );
int yText = y + ( ( iLineTall - iTextTall ) / 2 ); int yText = y + ( ( iLineTall - iTextTall ) / 2 );
int yIcon = y + ( ( iLineTall - iconTall ) / 2 ); int yIcon = y + ( ( iLineTall - iconTall ) / 2 );
@ -160,11 +184,11 @@ void CHudBaseDeathNotice::Paint()
Vertex_t vert[NUM_BACKGROUND_COORD]; Vertex_t vert[NUM_BACKGROUND_COORD];
GetBackgroundPolygonVerts( x, y+1, x+iTotalWide, y+iLineTall-1, ARRAYSIZE( vert ), vert ); GetBackgroundPolygonVerts( x, y+1, x+iTotalWide, y+iLineTall-1, ARRAYSIZE( vert ), vert );
surface()->DrawSetTexture( -1 ); surface()->DrawSetTexture( -1 );
surface()->DrawSetColor( msg.bLocalPlayerInvolved ? m_clrLocalBGColor : m_clrBaseBGColor ); surface()->DrawSetColor( GetBackgroundColor ( i ) );
surface()->DrawTexturedPolygon( ARRAYSIZE( vert ), vert ); surface()->DrawTexturedPolygon( ARRAYSIZE( vert ), vert );
x += xMargin; x += xMargin;
if ( killer[0] ) if ( killer[0] )
{ {
// Draw killer's name // Draw killer's name
@ -172,6 +196,22 @@ void CHudBaseDeathNotice::Paint()
x += iKillerTextWide; x += iKillerTextWide;
} }
// prekiller text
if ( msg.wzPreKillerText[0] )
{
x += xSpacing;
DrawText( x + iDeathInfoOffset, yText, m_hTextFont, GetInfoTextColor( i ), msg.wzPreKillerText );
x += iPreKillerTextWide;
}
// Prekiller icon
if ( iconPrekiller )
{
int yPreIconTall = y + ( ( iLineTall - iconPreKillerTall ) / 2 );
iconPrekiller->DrawSelf( x, yPreIconTall, iconPrekillerActualWide, iconPreKillerTall, m_clrIcon );
x += iconPrekillerWide + xSpacing;
}
// Draw glow behind weapon icon to show it was a crit death // Draw glow behind weapon icon to show it was a crit death
if ( msg.bCrit && msg.iconCritDeath ) if ( msg.bCrit && msg.iconCritDeath )
{ {
@ -194,13 +234,19 @@ void CHudBaseDeathNotice::Paint()
iVictimTextOffset -= iDeathInfoTextWide; iVictimTextOffset -= iDeathInfoTextWide;
} }
DrawText( x + iDeathInfoOffset, yText, m_hTextFont, GetInfoTextColor( msg.bLocalPlayerInvolved ), msg.wzInfoText ); DrawText( x + iDeathInfoOffset, yText, m_hTextFont, GetInfoTextColor( i ), msg.wzInfoText );
x += iDeathInfoTextWide; x += iDeathInfoTextWide;
} }
// Draw victims name // Draw victims name
DrawText( x + iVictimTextOffset, yText, m_hTextFont, GetTeamColor( msg.Victim.iTeam, msg.bLocalPlayerInvolved ), victim ); DrawText( x + iVictimTextOffset, yText, m_hTextFont, GetTeamColor( msg.Victim.iTeam, msg.bLocalPlayerInvolved ), victim );
x += iVictimTextWide; x += iVictimTextWide;
// Draw Additional Text on the end of the victims name
if ( msg.wzInfoTextEnd[0] )
{
DrawText( x , yText, m_hTextFont, GetInfoTextColor( i ), msg.wzInfoTextEnd );
}
} }
} }
@ -358,7 +404,12 @@ void CHudBaseDeathNotice::FireGameEvent( IGameEvent *event )
bLocalPlayerInvolved = true; bLocalPlayerInvolved = true;
} }
if ( event->GetInt( "damagebits" ) & DMG_CRITICAL ) if ( event->GetInt( "death_flags" ) & TF_DEATH_AUSTRALIUM )
{
m_DeathNotices[iMsg].bCrit= true;
m_DeathNotices[iMsg].iconCritDeath = GetIcon( "d_australium", bLocalPlayerInvolved ? kDeathNoticeIcon_Inverted : kDeathNoticeIcon_Standard );
}
else if ( event->GetInt( "damagebits" ) & DMG_CRITICAL )
{ {
m_DeathNotices[iMsg].bCrit= true; m_DeathNotices[iMsg].bCrit= true;
m_DeathNotices[iMsg].iconCritDeath = GetIcon( "d_crit", bLocalPlayerInvolved ? kDeathNoticeIcon_Inverted : kDeathNoticeIcon_Standard ); m_DeathNotices[iMsg].iconCritDeath = GetIcon( "d_crit", bLocalPlayerInvolved ? kDeathNoticeIcon_Inverted : kDeathNoticeIcon_Standard );

View File

@ -30,6 +30,7 @@ struct DeathNoticeItem
{ {
szIcon[0]=0; szIcon[0]=0;
wzInfoText[0]=0; wzInfoText[0]=0;
wzInfoTextEnd[0]=0;
iconDeath = NULL; iconDeath = NULL;
iconCritDeath = NULL; iconCritDeath = NULL;
bSelfInflicted = false; bSelfInflicted = false;
@ -40,6 +41,9 @@ struct DeathNoticeItem
iWeaponID = -1; iWeaponID = -1;
iKillerID = -1; iKillerID = -1;
iVictimID = -1; iVictimID = -1;
iconPreKiller = NULL;
wzPreKillerText[0] = 0;
} }
float GetExpiryTime(); float GetExpiryTime();
@ -48,8 +52,13 @@ struct DeathNoticeItem
DeathNoticePlayer Victim; DeathNoticePlayer Victim;
char szIcon[32]; // name of icon to display char szIcon[32]; // name of icon to display
wchar_t wzInfoText[32]; // any additional text to display next to icon wchar_t wzInfoText[32]; // any additional text to display next to icon
wchar_t wzInfoTextEnd[32]; // any additional text to display next to victim name
CHudTexture *iconDeath; CHudTexture *iconDeath;
CHudTexture *iconCritDeath; // crit background icon CHudTexture *iconCritDeath; // crit background icon
CHudTexture *iconPreKiller;
wchar_t wzPreKillerText[32];
bool bSelfInflicted; bool bSelfInflicted;
bool bLocalPlayerInvolved; bool bLocalPlayerInvolved;
bool bCrit; bool bCrit;
@ -104,7 +113,8 @@ protected:
virtual int UseExistingNotice( IGameEvent *event ) { return -1; } virtual int UseExistingNotice( IGameEvent *event ) { return -1; }
void GetLocalizedControlPointName( IGameEvent *event, char *namebuf, int namelen ); void GetLocalizedControlPointName( IGameEvent *event, char *namebuf, int namelen );
virtual Color GetInfoTextColor( bool bLocalPlayerInvolved ){ return Color( 255, 255, 255, 255 ); } virtual Color GetInfoTextColor( int iDeathNoticeMsg ){ return Color( 255, 255, 255, 255 ); }
virtual Color GetBackgroundColor ( int iDeathNoticeMsg ) { return m_DeathNotices[iDeathNoticeMsg].bLocalPlayerInvolved ? m_clrLocalBGColor : m_clrBaseBGColor; }
CPanelAnimationVarAliasType( float, m_flLineHeight, "LineHeight", "16", "proportional_float" ); CPanelAnimationVarAliasType( float, m_flLineHeight, "LineHeight", "16", "proportional_float" );
CPanelAnimationVarAliasType( float, m_flLineSpacing, "LineSpacing", "4", "proportional_float" ); CPanelAnimationVarAliasType( float, m_flLineSpacing, "LineSpacing", "4", "proportional_float" );
@ -115,6 +125,7 @@ protected:
CPanelAnimationVar( Color, m_clrIcon, "IconColor", "255 80 0 255" ); CPanelAnimationVar( Color, m_clrIcon, "IconColor", "255 80 0 255" );
CPanelAnimationVar( Color, m_clrBaseBGColor, "BaseBackgroundColor", "46 43 42 220" ); CPanelAnimationVar( Color, m_clrBaseBGColor, "BaseBackgroundColor", "46 43 42 220" );
CPanelAnimationVar( Color, m_clrLocalBGColor, "LocalBackgroundColor", "245 229 196 200" ); CPanelAnimationVar( Color, m_clrLocalBGColor, "LocalBackgroundColor", "245 229 196 200" );
CPanelAnimationVar( Color, m_clrKillStreakBg, "KillStreakBackgroundColor", "224 223 219 200" );
CUtlVector<DeathNoticeItem> m_DeathNotices; CUtlVector<DeathNoticeItem> m_DeathNotices;

View File

@ -16,7 +16,7 @@
#include "materialsystem/imaterialsystem.h" #include "materialsystem/imaterialsystem.h"
#include "VGuiMatSurface/IMatSystemSurface.h" #include "VGuiMatSurface/IMatSystemSurface.h"
#include "client_virtualreality.h" #include "client_virtualreality.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
#ifdef SIXENSE #ifdef SIXENSE
#include "sixense/in_sixense.h" #include "sixense/in_sixense.h"

View File

@ -1059,6 +1059,10 @@ void CHudVote::MsgFunc_CallVoteFailed( bf_read &msg )
case VOTE_FAILED_CANNOT_KICK_DURING_ROUND: case VOTE_FAILED_CANNOT_KICK_DURING_ROUND:
m_pCallVoteFailed->SetControlString( "FailedReason", "#GameUI_vote_failed_round_active" ); m_pCallVoteFailed->SetControlString( "FailedReason", "#GameUI_vote_failed_round_active" );
break; break;
case VOTE_FAILED_MODIFICATION_ALREADY_ACTIVE:
m_pCallVoteFailed->SetControlString( "FailedReason", "#GameUI_vote_failed_event_already_active" );
break;
} }
} }

View File

@ -147,6 +147,7 @@ public:
virtual bool IsInfoPanelAllowed() = 0; virtual bool IsInfoPanelAllowed() = 0;
virtual void InfoPanelDisplayed() = 0; virtual void InfoPanelDisplayed() = 0;
virtual bool IsHTMLInfoPanelAllowed() = 0;
}; };
extern IClientMode *g_pClientMode; extern IClientMode *g_pClientMode;

View File

@ -31,7 +31,7 @@
#endif #endif
#include "client_virtualreality.h" #include "client_virtualreality.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
// NVNT Include // NVNT Include
#include "haptics/haptic_utils.h" #include "haptics/haptic_utils.h"

View File

@ -1185,6 +1185,7 @@ CReplayPerformanceEditorPanel::CReplayPerformanceEditorPanel( Panel *parent, Rep
m_nRedBlueSigns[0] = -1; m_nRedBlueSigns[0] = -1;
m_nRedBlueSigns[1] = 1; m_nRedBlueSigns[1] = 1;
m_iCurPlayerTarget = -1; m_iCurPlayerTarget = -1;
m_bCurrentTargetNeedsVisibilityUpdate = false;
m_pImageList = new ImageList( false ); m_pImageList = new ImageList( false );
@ -1737,6 +1738,19 @@ void CReplayPerformanceEditorPanel::OnTick()
pCamera->SetPrimaryTarget( m_iCurPlayerTarget ); pCamera->SetPrimaryTarget( m_iCurPlayerTarget );
} }
// fixes a case where the replay would be paused and the player would cycle cameras but the
// target's visibility wouldn't be updated until the replay was unpaused (they would be invisible)
if ( m_bCurrentTargetNeedsVisibilityUpdate )
{
C_BaseEntity *pTarget = ClientEntityList().GetEnt( pCamera->GetPrimaryTargetIndex() );
if ( pTarget )
{
pTarget->UpdateVisibility();
}
m_bCurrentTargetNeedsVisibilityUpdate = false;
}
// If in free-cam mode, add set view event if we're not paused // If in free-cam mode, add set view event if we're not paused
if ( bInAControllableCameraMode && m_bShownAtLeastOnce && bRecording ) if ( bInAControllableCameraMode && m_bShownAtLeastOnce && bRecording )
{ {
@ -2444,12 +2458,14 @@ void CReplayPerformanceEditorPanel::OnCommand( const char *command )
{ {
ReplayCamera()->SetMode( OBS_MODE_IN_EYE ); ReplayCamera()->SetMode( OBS_MODE_IN_EYE );
UpdateCameraSelectionPosition( CAM_FIRST ); UpdateCameraSelectionPosition( CAM_FIRST );
m_bCurrentTargetNeedsVisibilityUpdate = true;
g_pReplayPerformanceController->AddEvent_Camera_Change_FirstPerson( flCurTime, nEntIndex ); g_pReplayPerformanceController->AddEvent_Camera_Change_FirstPerson( flCurTime, nEntIndex );
} }
else if ( !V_stricmp( pCamType, "third" ) ) else if ( !V_stricmp( pCamType, "third" ) )
{ {
ReplayCamera()->SetMode( OBS_MODE_CHASE ); ReplayCamera()->SetMode( OBS_MODE_CHASE );
UpdateCameraSelectionPosition( CAM_THIRD ); UpdateCameraSelectionPosition( CAM_THIRD );
m_bCurrentTargetNeedsVisibilityUpdate = true;
g_pReplayPerformanceController->AddEvent_Camera_Change_ThirdPerson( flCurTime, nEntIndex ); g_pReplayPerformanceController->AddEvent_Camera_Change_ThirdPerson( flCurTime, nEntIndex );
AddSetViewEvent(); AddSetViewEvent();
} }
@ -2457,6 +2473,7 @@ void CReplayPerformanceEditorPanel::OnCommand( const char *command )
{ {
ReplayCamera()->SetMode( OBS_MODE_ROAMING ); ReplayCamera()->SetMode( OBS_MODE_ROAMING );
UpdateCameraSelectionPosition( CAM_FREE ); UpdateCameraSelectionPosition( CAM_FREE );
m_bCurrentTargetNeedsVisibilityUpdate = true;
g_pReplayPerformanceController->AddEvent_Camera_Change_Free( flCurTime ); g_pReplayPerformanceController->AddEvent_Camera_Change_Free( flCurTime );
AddSetViewEvent(); AddSetViewEvent();
DisplayPerformanceTip( "#Replay_PerfTip_EnterFreeCam", &replay_perftip_count_freecam_enter, MAX_TIP_DISPLAYS ); DisplayPerformanceTip( "#Replay_PerfTip_EnterFreeCam", &replay_perftip_count_freecam_enter, MAX_TIP_DISPLAYS );

View File

@ -224,6 +224,8 @@ private:
float m_flActiveTimeInEditor; // Will be zero'd out if user is idle (ie if they don't press space bar often enough) float m_flActiveTimeInEditor; // Will be zero'd out if user is idle (ie if they don't press space bar often enough)
CPanelAnimationVarAliasType( int, m_nRightMarginWidth, "right_margin_width", "0", "proportional_xpos" ); CPanelAnimationVarAliasType( int, m_nRightMarginWidth, "right_margin_width", "0", "proportional_xpos" );
bool m_bCurrentTargetNeedsVisibilityUpdate;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -62,7 +62,7 @@ using sixenseMath::Line;
#include "iinput.h" #include "iinput.h"
#include "game/client/iviewport.h" #include "game/client/iviewport.h"
#include "filesystem.h" #include "filesystem.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
#ifdef TF_CLIENT_DLL #ifdef TF_CLIENT_DLL
#include "tf_hud_menu_engy_build.h" #include "tf_hud_menu_engy_build.h"

View File

@ -36,13 +36,14 @@
#include "materialsystem/itexture.h" #include "materialsystem/itexture.h"
#include "materialsystem/imaterialsystem.h" #include "materialsystem/imaterialsystem.h"
#include "materialsystem/materialsystem_config.h" #include "materialsystem/materialsystem_config.h"
#include "VGuiMatSurface/IMatSystemSurface.h"
#include "toolframework_client.h" #include "toolframework_client.h"
#include "tier0/icommandline.h" #include "tier0/icommandline.h"
#include "ienginevgui.h" #include "ienginevgui.h"
#include <vgui_controls/Controls.h> #include <vgui_controls/Controls.h>
#include <vgui/ISurface.h> #include <vgui/ISurface.h>
#include "ScreenSpaceEffects.h" #include "ScreenSpaceEffects.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
#include "client_virtualreality.h" #include "client_virtualreality.h"
#if defined( REPLAY_ENABLED ) #if defined( REPLAY_ENABLED )
@ -84,10 +85,6 @@ extern ConVar sensitivity;
ConVar zoom_sensitivity_ratio( "zoom_sensitivity_ratio", "1.0", 0, "Additional mouse sensitivity scale factor applied when FOV is zoomed in." ); ConVar zoom_sensitivity_ratio( "zoom_sensitivity_ratio", "1.0", 0, "Additional mouse sensitivity scale factor applied when FOV is zoomed in." );
#ifdef STAGING_ONLY
ConVar vr_stereo_debug_viewport( "vr_stereo_debug_viewport", "0" );
#endif
CViewRender g_DefaultViewRender; CViewRender g_DefaultViewRender;
IViewRender *view = NULL; // set in cldll_client_init.cpp if no mod creates their own IViewRender *view = NULL; // set in cldll_client_init.cpp if no mod creates their own
@ -301,16 +298,6 @@ void CViewRender::Init( void )
m_pDrawEntities = cvar->FindVar( "r_drawentities" ); m_pDrawEntities = cvar->FindVar( "r_drawentities" );
m_pDrawBrushModels = cvar->FindVar( "r_drawbrushmodels" ); m_pDrawBrushModels = cvar->FindVar( "r_drawbrushmodels" );
if( UseVR() )
{
m_eStartEye = STEREO_EYE_LEFT;
m_eLastEye = STEREO_EYE_RIGHT;
}
else
{
m_eStartEye = m_eLastEye = STEREO_EYE_MONO;
}
beams->InitBeams(); beams->InitBeams();
tempents->Init(); tempents->Init();
@ -500,12 +487,18 @@ void CViewRender::DriftPitch (void)
StereoEye_t CViewRender::GetFirstEye() const StereoEye_t CViewRender::GetFirstEye() const
{ {
return m_eStartEye; if( UseVR() )
return STEREO_EYE_LEFT;
else
return STEREO_EYE_MONO;
} }
StereoEye_t CViewRender::GetLastEye() const StereoEye_t CViewRender::GetLastEye() const
{ {
return m_eLastEye; if( UseVR() )
return STEREO_EYE_RIGHT;
else
return STEREO_EYE_MONO;
} }
@ -1177,57 +1170,14 @@ void CViewRender::Render( vrect_t *rect )
} }
break; break;
case STEREO_EYE_RIGHT:
case STEREO_EYE_LEFT: case STEREO_EYE_LEFT:
{ {
#ifdef STAGING_ONLY g_pSourceVR->GetViewportBounds( (ISourceVirtualReality::VREye)(eEye - 1 ), &view.x, &view.y, &view.width, &view.height );
if ( vr_stereo_debug_viewport.GetBool() ) view.m_nUnscaledWidth = view.width;
{ view.m_nUnscaledHeight = view.height;
// Stress-test for crazy viewports. view.m_nUnscaledX = view.x;
view.width = vr.width * flViewportScale * 0.25f; view.m_nUnscaledY = view.y;
view.height = vr.height * flViewportScale * 0.75f;
view.x = vr.x * flViewportScale;
view.y = (vr.y + vr.height * 0.20f) * flViewportScale;
view.m_nUnscaledWidth = vr.width / 2;
}
else
#endif
{
view.width = vr.width * flViewportScale * 0.5f;
view.height = vr.height * flViewportScale;
view.x = vr.x * flViewportScale ;
view.y = vr.y * flViewportScale;
view.m_nUnscaledWidth = vr.width / 2;
}
}
break;
case STEREO_EYE_RIGHT:
{
#ifdef STAGING_ONLY
if ( vr_stereo_debug_viewport.GetBool() )
{
// Stress-test for crazy viewports.
view.width = vr.width * flViewportScale * 0.75f;
view.height = vr.height * flViewportScale * 0.75f;
view.x = vr.x + vr.width * 0.25f;
view.y = vr.y + vr.height * 0.1f;
view.m_nUnscaledWidth = vr.width / 2;
view.m_nUnscaledX = vr.x + view.m_nUnscaledWidth;
}
else
#endif
{
view.width = vr.width * flViewportScale * 0.5f;
view.height = vr.height * flViewportScale;
view.x = (vr.x + view.width) * flViewportScale;
view.y = vr.y * flViewportScale;
view.m_nUnscaledWidth = vr.width / 2;
view.m_nUnscaledX = vr.x + view.m_nUnscaledWidth;
}
} }
break; break;
@ -1302,9 +1252,32 @@ void CViewRender::Render( vrect_t *rect )
// we should use the monitor view from the left eye for both eyes // we should use the monitor view from the left eye for both eyes
flags |= RENDERVIEW_SUPPRESSMONITORRENDERING; flags |= RENDERVIEW_SUPPRESSMONITORRENDERING;
} }
RenderView( view, nClearFlags, flags );
}
RenderView( view, nClearFlags, flags );
if ( UseVR() )
{
bool bDoUndistort = ! engine->IsTakingScreenshot();
if ( bDoUndistort )
{
g_ClientVirtualReality.PostProcessFrame( eEye );
}
// logic here all cloned from code in viewrender.cpp around RenderHUDQuad:
// figure out if we really want to draw the HUD based on freeze cam
bool bInFreezeCam = ( pPlayer && pPlayer->GetObserverMode() == OBS_MODE_FREEZECAM );
// draw the HUD after the view model so its "I'm closer" depth queues work right.
if( !bInFreezeCam && g_ClientVirtualReality.ShouldRenderHUDInWorld() )
{
// TODO - a bit of a shonky test - basically trying to catch the main menu, the briefing screen, the loadout screen, etc.
bool bTranslucent = !g_pMatSystemSurface->IsCursorVisible();
g_ClientVirtualReality.OverlayHUDQuadWithUndistort( view, bDoUndistort, g_pClientMode->ShouldBlackoutAroundHUD(), bTranslucent );
}
}
}
// TODO: should these be inside or outside the stereo eye stuff? // TODO: should these be inside or outside the stereo eye stuff?
@ -1334,15 +1307,6 @@ void CViewRender::Render( vrect_t *rect )
} }
if ( UseVR() )
{
if ( !engine->IsTakingScreenshot() )
{
// Deal with the distortion on the display.
g_ClientVirtualReality.PostProcessFrame( rect );
}
}
} }

View File

@ -11,7 +11,7 @@
#include "rendertexture.h" #include "rendertexture.h"
#include "view_scene.h" #include "view_scene.h"
#include "viewrender.h" #include "viewrender.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
#include "client_virtualreality.h" #include "client_virtualreality.h"
// memdbgon must be the last include file in a .cpp file!!! // memdbgon must be the last include file in a .cpp file!!!

View File

@ -834,7 +834,7 @@ void CLuminanceHistogramSystem::UpdateLuminanceRanges( void )
s_bFirstTime = false; s_bFirstTime = false;
// This seems like a bad idea but it's fine for now // This seems like a bad idea but it's fine for now
const char *sModsForOriginalAlgorithm[] = { "dod", "cstrike", "lostcoast" }; const char *sModsForOriginalAlgorithm[] = { "dod", "cstrike", "lostcoast", "hl1" };
for ( int i=0; i<3; i++ ) for ( int i=0; i<3; i++ )
{ {
if ( strlen( engine->GetGameDirectory() ) >= strlen( sModsForOriginalAlgorithm[i] ) ) if ( strlen( engine->GetGameDirectory() ) >= strlen( sModsForOriginalAlgorithm[i] ) )

View File

@ -51,7 +51,7 @@
#include "studio_stats.h" #include "studio_stats.h"
#include "con_nprint.h" #include "con_nprint.h"
#include "clientmode_shared.h" #include "clientmode_shared.h"
#include "headtrack/isourcevirtualreality.h" #include "sourcevr/isourcevirtualreality.h"
#include "client_virtualreality.h" #include "client_virtualreality.h"
#ifdef PORTAL #ifdef PORTAL
@ -394,7 +394,7 @@ protected:
bool GetSkyboxFogEnable(); bool GetSkyboxFogEnable();
void Enable3dSkyboxFog( void ); void Enable3dSkyboxFog( void );
void DrawInternal( view_id_t iSkyBoxViewID = VIEW_3DSKY, bool bInvokePreAndPostRender = true, ITexture *pRenderTarget = NULL ); void DrawInternal( view_id_t iSkyBoxViewID, bool bInvokePreAndPostRender, ITexture *pRenderTarget, ITexture *pDepthTarget );
sky3dparams_t * PreRender3dSkyboxWorld( SkyboxVisibility_t nSkyboxVisible ); sky3dparams_t * PreRender3dSkyboxWorld( SkyboxVisibility_t nSkyboxVisible );
@ -1055,7 +1055,15 @@ void CViewRender::DrawViewModels( const CViewSetup &view, bool drawViewmodel )
viewModelSetup.fov = view.fovViewmodel; viewModelSetup.fov = view.fovViewmodel;
viewModelSetup.m_flAspectRatio = engine->GetScreenAspectRatio(); viewModelSetup.m_flAspectRatio = engine->GetScreenAspectRatio();
render->Push3DView( viewModelSetup, 0, NULL, GetFrustum() ); ITexture *pRTColor = NULL;
ITexture *pRTDepth = NULL;
if( view.m_eStereoEye != STEREO_EYE_MONO )
{
pRTColor = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(view.m_eStereoEye-1), ISourceVirtualReality::RT_Color );
pRTDepth = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(view.m_eStereoEye-1), ISourceVirtualReality::RT_Depth );
}
render->Push3DView( viewModelSetup, 0, pRTColor, GetFrustum(), pRTDepth );
#ifdef PORTAL //the depth range hack doesn't work well enough for the portal mod (and messing with the depth hack values makes some models draw incorrectly) #ifdef PORTAL //the depth range hack doesn't work well enough for the portal mod (and messing with the depth hack values makes some models draw incorrectly)
//step up to a full depth clear if we're extremely close to a portal (in a portal environment) //step up to a full depth clear if we're extremely close to a portal (in a portal environment)
@ -1822,7 +1830,15 @@ void CViewRender::SetupMain3DView( const CViewSetup &view, int &nClearFlags )
} }
else else
{ {
render->Push3DView( view, nClearFlags, NULL, GetFrustum() ); ITexture *pRTColor = NULL;
ITexture *pRTDepth = NULL;
if( view.m_eStereoEye != STEREO_EYE_MONO )
{
pRTColor = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(view.m_eStereoEye-1), ISourceVirtualReality::RT_Color );
pRTDepth = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(view.m_eStereoEye-1), ISourceVirtualReality::RT_Depth );
}
render->Push3DView( view, nClearFlags, pRTColor, GetFrustum(), pRTDepth );
} }
// If we didn't clear the depth here, we'll need to clear it later // If we didn't clear the depth here, we'll need to clear it later
@ -2155,6 +2171,12 @@ void CViewRender::RenderView( const CViewSetup &view, int nClearFlags, int whatT
pCopyMaterial->DecrementReferenceCount(); pCopyMaterial->DecrementReferenceCount();
} }
// if we're in VR mode we might need to override the render target
if( UseVR() )
{
saveRenderTarget = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(view.m_eStereoEye - 1), ISourceVirtualReality::RT_Color );
}
// Draw the 2D graphics // Draw the 2D graphics
render->Push2DView( view, 0, saveRenderTarget, GetFrustum() ); render->Push2DView( view, 0, saveRenderTarget, GetFrustum() );
@ -2192,7 +2214,9 @@ void CViewRender::RenderView( const CViewSetup &view, int nClearFlags, int whatT
vgui::surface()->GetScreenSize( viewWidth, viewHeight ); vgui::surface()->GetScreenSize( viewWidth, viewHeight );
viewFramebufferX = view.m_eStereoEye == STEREO_EYE_RIGHT ? viewFramebufferWidth : 0; viewFramebufferX = 0;
if( view.m_eStereoEye == STEREO_EYE_RIGHT && !saveRenderTarget )
viewFramebufferX = viewFramebufferWidth;
viewFramebufferY = 0; viewFramebufferY = 0;
} }
} }
@ -2224,7 +2248,7 @@ void CViewRender::RenderView( const CViewSetup &view, int nClearFlags, int whatT
// let vgui know where to render stuff for the forced-to-framebuffer panels // let vgui know where to render stuff for the forced-to-framebuffer panels
if( UseVR() ) if( UseVR() )
{ {
vgui::surface()->SetFullscreenViewport( viewFramebufferX, viewFramebufferY, viewFramebufferWidth, viewFramebufferHeight ); vgui::surface()->SetFullscreenViewportAndRenderTarget( viewFramebufferX, viewFramebufferY, viewFramebufferWidth, viewFramebufferHeight, saveRenderTarget );
} }
// clear the render target if we need to // clear the render target if we need to
@ -4703,7 +4727,7 @@ sky3dparams_t *CSkyboxView::PreRender3dSkyboxWorld( SkyboxVisibility_t nSkyboxVi
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CSkyboxView::DrawInternal( view_id_t iSkyBoxViewID, bool bInvokePreAndPostRender, ITexture *pRenderTarget ) void CSkyboxView::DrawInternal( view_id_t iSkyBoxViewID, bool bInvokePreAndPostRender, ITexture *pRenderTarget, ITexture *pDepthTarget )
{ {
unsigned char **areabits = render->GetAreaBits(); unsigned char **areabits = render->GetAreaBits();
unsigned char *savebits; unsigned char *savebits;
@ -4736,7 +4760,7 @@ void CSkyboxView::DrawInternal( view_id_t iSkyBoxViewID, bool bInvokePreAndPostR
// cluster with sky. Then we could just connect the areas to do our vis. // cluster with sky. Then we could just connect the areas to do our vis.
//m_bOverrideVisOrigin could hose us here, so call direct //m_bOverrideVisOrigin could hose us here, so call direct
render->ViewSetupVis( false, 1, &m_pSky3dParams->origin.Get() ); render->ViewSetupVis( false, 1, &m_pSky3dParams->origin.Get() );
render->Push3DView( (*this), m_ClearFlags, pRenderTarget, GetFrustum() ); render->Push3DView( (*this), m_ClearFlags, pRenderTarget, GetFrustum(), pDepthTarget );
// Store off view origin and angles // Store off view origin and angles
SetupCurrentView( origin, angles, iSkyBoxViewID ); SetupCurrentView( origin, angles, iSkyBoxViewID );
@ -4832,7 +4856,15 @@ void CSkyboxView::Draw()
{ {
VPROF_BUDGET( "CViewRender::Draw3dSkyboxworld", "3D Skybox" ); VPROF_BUDGET( "CViewRender::Draw3dSkyboxworld", "3D Skybox" );
DrawInternal(); ITexture *pRTColor = NULL;
ITexture *pRTDepth = NULL;
if( m_eStereoEye != STEREO_EYE_MONO )
{
pRTColor = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(m_eStereoEye-1), ISourceVirtualReality::RT_Color );
pRTDepth = g_pSourceVR->GetRenderTarget( (ISourceVirtualReality::VREye)(m_eStereoEye-1), ISourceVirtualReality::RT_Depth );
}
DrawInternal(VIEW_3DSKY, true, pRTColor, pRTDepth );
} }
@ -4882,7 +4914,7 @@ void CPortalSkyboxView::Draw()
bool bInvokePreAndPostRender = ( g_pPortalRender->ShouldUseStencilsToRenderPortals() == false ); bool bInvokePreAndPostRender = ( g_pPortalRender->ShouldUseStencilsToRenderPortals() == false );
DrawInternal( iSkyBoxViewID, bInvokePreAndPostRender, m_pRenderTarget ); DrawInternal( iSkyBoxViewID, bInvokePreAndPostRender, m_pRenderTarget, NULL );
pRenderContext->EnableClipping( bClippingEnabled ); pRenderContext->EnableClipping( bClippingEnabled );

View File

@ -474,10 +474,6 @@ private:
// This stores the current view // This stores the current view
CViewSetup m_CurrentView; CViewSetup m_CurrentView;
// these will both be mono or they will be left/right
StereoEye_t m_eStartEye;
StereoEye_t m_eLastEye;
// VIS Overrides // VIS Overrides
// Set to true to turn off client side vis ( !!!! rendering will be slow since everything will draw ) // Set to true to turn off client side vis ( !!!! rendering will be slow since everything will draw )
bool m_bForceNoVis; bool m_bForceNoVis;

View File

@ -10,6 +10,8 @@ $Project
{ {
$Folder "Libraries" $Folder "Libraries"
{ {
$Libexternal libprotobuf $Libexternal libprotobuf [!$VS2012 && !$VS2013]
$Libexternal 2012\libprotobuf [$VS2012]
$Libexternal 2013\libprotobuf [$VS2013]
} }
} }

View File

@ -2153,4 +2153,8 @@ void CAI_BaseNPC::InitDefaultActivitySR(void)
ADD_ACTIVITY_TO_SR( ACT_THROWABLE_VM_IDLE ); ADD_ACTIVITY_TO_SR( ACT_THROWABLE_VM_IDLE );
ADD_ACTIVITY_TO_SR( ACT_THROWABLE_VM_FIRE ); ADD_ACTIVITY_TO_SR( ACT_THROWABLE_VM_FIRE );
ADD_ACTIVITY_TO_SR( ACT_SPELL_VM_DRAW );
ADD_ACTIVITY_TO_SR( ACT_SPELL_VM_IDLE );
ADD_ACTIVITY_TO_SR( ACT_SPELL_VM_ARM );
ADD_ACTIVITY_TO_SR( ACT_SPELL_VM_FIRE );
} }

View File

@ -15,7 +15,7 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
inline float round( float f ) inline float V_round( float f )
{ {
return (float)( (int)( f + 0.5 ) ); return (float)( (int)( f + 0.5 ) );
} }
@ -133,7 +133,7 @@ bool CAI_MoveSolver::Solve( const AI_MoveSuggestion_t *pSuggestions, int nSugges
// Convert arc values to solution indices relative to right post. Right is angle down, left is angle up. // Convert arc values to solution indices relative to right post. Right is angle down, left is angle up.
float halfSpan = current.arc.span * 0.5; float halfSpan = current.arc.span * 0.5;
int center = round( ( halfSpan * NUM_SOLUTIONS ) / 360 ); int center = V_round( ( halfSpan * NUM_SOLUTIONS ) / 360 );
int left = ( current.arc.span * NUM_SOLUTIONS ) / 360; int left = ( current.arc.span * NUM_SOLUTIONS ) / 360;
float angRight = current.arc.center - halfSpan; float angRight = current.arc.center - halfSpan;

View File

@ -983,7 +983,7 @@ bool CAI_NetworkManager::IsAIFileCurrent ( const char *szMapName )
Q_strncpy( szLoweredGameDir, pGameDir, sizeof( szLoweredGameDir ) ); Q_strncpy( szLoweredGameDir, pGameDir, sizeof( szLoweredGameDir ) );
Q_strlower( szLoweredGameDir ); Q_strlower( szLoweredGameDir );
if ( !V_stricmp( szLoweredGameDir, "hl2" ) || !V_stricmp( szLoweredGameDir, "episodic" ) || !V_stricmp( szLoweredGameDir, "ep2" ) || !V_stricmp( szLoweredGameDir, "portal" ) || !V_stricmp( szLoweredGameDir, "lostcoast" ) ) if ( !V_stricmp( szLoweredGameDir, "hl2" ) || !V_stricmp( szLoweredGameDir, "episodic" ) || !V_stricmp( szLoweredGameDir, "ep2" ) || !V_stricmp( szLoweredGameDir, "portal" ) || !V_stricmp( szLoweredGameDir, "lostcoast" ) || !V_stricmp( szLoweredGameDir, "hl1" ) )
{ {
// we shipped good node graphs for our games // we shipped good node graphs for our games
return true; return true;

View File

@ -210,6 +210,9 @@ BEGIN_DATADESC( CBaseAnimating )
DEFINE_INPUT( m_fadeMaxDist, FIELD_FLOAT, "fademaxdist" ), DEFINE_INPUT( m_fadeMaxDist, FIELD_FLOAT, "fademaxdist" ),
DEFINE_KEYFIELD( m_flFadeScale, FIELD_FLOAT, "fadescale" ), DEFINE_KEYFIELD( m_flFadeScale, FIELD_FLOAT, "fadescale" ),
DEFINE_KEYFIELD( m_flModelScale, FIELD_FLOAT, "modelscale" ),
DEFINE_INPUTFUNC( FIELD_VECTOR, "SetModelScale", InputSetModelScale ),
DEFINE_FIELD( m_fBoneCacheFlags, FIELD_SHORT ), DEFINE_FIELD( m_fBoneCacheFlags, FIELD_SHORT ),
END_DATADESC() END_DATADESC()
@ -441,7 +444,7 @@ void CBaseAnimating::StudioFrameAdvanceInternal( CStudioHdr *pStudioHdr, float f
m_flAnimTime.Get(), m_flPrevAnimTime, flInterval, GetCycle() ); m_flAnimTime.Get(), m_flPrevAnimTime, flInterval, GetCycle() );
*/ */
m_flGroundSpeed = GetSequenceGroundSpeed( pStudioHdr, GetSequence() ); m_flGroundSpeed = GetSequenceGroundSpeed( pStudioHdr, GetSequence() ) * GetModelScale();
// Msg("%s : %s : %5.1f\n", GetClassname(), GetSequenceName( GetSequence() ), GetCycle() ); // Msg("%s : %s : %5.1f\n", GetClassname(), GetSequenceName( GetSequence() ), GetCycle() );
InvalidatePhysicsRecursive( ANIMATION_CHANGED ); InvalidatePhysicsRecursive( ANIMATION_CHANGED );
@ -610,6 +613,17 @@ void CBaseAnimating::InputSetLightingOrigin( inputdata_t &inputdata )
SetLightingOrigin( strLightingOrigin ); SetLightingOrigin( strLightingOrigin );
} }
//-----------------------------------------------------------------------------
// Purpose: SetModelScale input handler
//-----------------------------------------------------------------------------
void CBaseAnimating::InputSetModelScale( inputdata_t &inputdata )
{
Vector vecScale;
inputdata.value.Vector3D( vecScale );
SetModelScale( vecScale.x, vecScale.y );
}
//========================================================= //=========================================================
// SelectWeightedSequence // SelectWeightedSequence
@ -877,7 +891,7 @@ void CBaseAnimating::ResetSequenceInfo ( )
} }
CStudioHdr *pStudioHdr = GetModelPtr(); CStudioHdr *pStudioHdr = GetModelPtr();
m_flGroundSpeed = GetSequenceGroundSpeed( pStudioHdr, GetSequence() ); m_flGroundSpeed = GetSequenceGroundSpeed( pStudioHdr, GetSequence() ) * GetModelScale();
m_bSequenceLoops = ((GetSequenceFlags( pStudioHdr, GetSequence() ) & STUDIO_LOOPING) != 0); m_bSequenceLoops = ((GetSequenceFlags( pStudioHdr, GetSequence() ) & STUDIO_LOOPING) != 0);
// m_flAnimTime = gpGlobals->time; // m_flAnimTime = gpGlobals->time;
m_flPlaybackRate = 1.0; m_flPlaybackRate = 1.0;

View File

@ -338,6 +338,7 @@ private:
void StudioFrameAdvanceInternal( CStudioHdr *pStudioHdr, float flInterval ); void StudioFrameAdvanceInternal( CStudioHdr *pStudioHdr, float flInterval );
void InputSetLightingOriginRelative( inputdata_t &inputdata ); void InputSetLightingOriginRelative( inputdata_t &inputdata );
void InputSetLightingOrigin( inputdata_t &inputdata ); void InputSetLightingOrigin( inputdata_t &inputdata );
void InputSetModelScale( inputdata_t &inputdata );
bool CanSkipAnimation( void ); bool CanSkipAnimation( void );

View File

@ -4524,6 +4524,17 @@ void CBaseEntity::Teleport( const Vector *newPosition, const QAngle *newAngles,
teleportList[i].pEntity->CollisionRulesChanged(); teleportList[i].pEntity->CollisionRulesChanged();
} }
if ( IsPlayer() )
{
// Tell the client being teleported
IGameEvent *event = gameeventmanager->CreateEvent( "base_player_teleported" );
if ( event )
{
event->SetInt( "entindex", entindex() );
gameeventmanager->FireEventClientSide( event );
}
}
Assert( g_TeleportStack[index] == this ); Assert( g_TeleportStack[index] == this );
g_TeleportStack.FastRemove( index ); g_TeleportStack.FastRemove( index );

View File

@ -132,7 +132,15 @@ bool CBaseMultiplayerPlayer::CanHearAndReadChatFrom( CBasePlayer *pPlayer )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool CBaseMultiplayerPlayer::ShouldRunRateLimitedCommand( const CCommand &args ) bool CBaseMultiplayerPlayer::ShouldRunRateLimitedCommand( const CCommand &args )
{ {
const char *pcmd = args[0]; return ShouldRunRateLimitedCommand( args[0] );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CBaseMultiplayerPlayer::ShouldRunRateLimitedCommand( const char *pszCommand )
{
const char *pcmd = pszCommand;
int i = m_RateLimitLastCommandTimes.Find( pcmd ); int i = m_RateLimitLastCommandTimes.Find( pcmd );
if ( i == m_RateLimitLastCommandTimes.InvalidIndex() ) if ( i == m_RateLimitLastCommandTimes.InvalidIndex() )

View File

@ -89,6 +89,7 @@ public:
// Command rate limiting. // Command rate limiting.
bool ShouldRunRateLimitedCommand( const CCommand &args ); bool ShouldRunRateLimitedCommand( const CCommand &args );
bool ShouldRunRateLimitedCommand( const char *pszCommand );
protected: protected:
virtual CAI_Expresser *CreateExpresser( void ); virtual CAI_Expresser *CreateExpresser( void );

View File

@ -1,136 +0,0 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================
#include "cbase.h"
#include "baseprojectile.h"
BEGIN_DATADESC( CBaseProjectile )
DEFINE_FIELD( m_flDamage, FIELD_FLOAT ),
DEFINE_FIELD( m_iDamageType, FIELD_INTEGER ),
DEFINE_FIELD( m_flDamageScale, FIELD_FLOAT ),
DEFINE_FUNCTION( ProjectileTouch ),
DEFINE_THINKFUNC( FlyThink ),
END_DATADESC()
LINK_ENTITY_TO_CLASS( proj_base, CBaseProjectile );
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CBaseProjectile::Spawn( void )
{
Precache();
SetModel( STRING( GetModelName() ) );
SetSolid( SOLID_BBOX );
SetMoveType( MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_CUSTOM );
AddFlag( FL_OBJECT );
UTIL_SetSize( this, -Vector( 1.0f, 1.0f, 1.0f ), Vector( 1.0f, 1.0f, 1.0f ) );
// Setup attributes.
SetGravity( 0.001f );
m_takedamage = DAMAGE_NO;
// Setup the touch and think functions.
SetTouch( &CBaseProjectile::ProjectileTouch );
SetThink( &CBaseProjectile::FlyThink );
SetNextThink( gpGlobals->curtime );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CBaseProjectile::Precache( void )
{
BaseClass::Precache();
PrecacheModel( STRING( GetModelName() ) );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CBaseProjectile *CBaseProjectile::Create( baseprojectilecreate_t &pCreate )
{
CBaseProjectile *pProjectile = static_cast<CBaseProjectile*>( CBaseEntity::CreateNoSpawn( "proj_base", pCreate.vecOrigin, vec3_angle, pCreate.pOwner ) );
if ( !pProjectile )
return NULL;
pProjectile->SetModelName( pCreate.iszModel );
pProjectile->SetDamage( pCreate.flDamage );
pProjectile->SetDamageType( pCreate.iDamageType );
pProjectile->SetDamageScale( pCreate.flDamageScale );
pProjectile->SetAbsVelocity( pCreate.vecVelocity );
// Setup the initial angles.
QAngle angles;
VectorAngles( -pCreate.vecVelocity, angles );
pProjectile->SetAbsAngles( angles );
// Spawn & Activate
DispatchSpawn( pProjectile );
pProjectile->Activate();
return pProjectile;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
unsigned int CBaseProjectile::PhysicsSolidMaskForEntity( void ) const
{
return BaseClass::PhysicsSolidMaskForEntity() | CONTENTS_HITBOX;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CBaseProjectile::ProjectileTouch( CBaseEntity *pOther )
{
// Verify a correct "other."
Assert( pOther );
if ( !pOther->IsSolid() || pOther->IsSolidFlagSet( FSOLID_VOLUME_CONTENTS ) )
return;
// Handle hitting skybox (disappear).
const trace_t *pTrace = &CBaseEntity::GetTouchTrace();
trace_t *pNewTrace = const_cast<trace_t*>( pTrace );
if( pTrace->surface.flags & SURF_SKY )
{
UTIL_Remove( this );
return;
}
CTakeDamageInfo info;
info.SetAttacker( GetOwnerEntity() );
info.SetInflictor( this );
info.SetDamage( GetDamage() );
info.SetDamageType( GetDamageType() );
CalculateMeleeDamageForce( &info, GetAbsVelocity(), GetAbsOrigin(), GetDamageScale() );
Vector dir;
AngleVectors( GetAbsAngles(), &dir );
pOther->DispatchTraceAttack( info, dir, pNewTrace );
ApplyMultiDamage();
UTIL_Remove( this );
}
//-----------------------------------------------------------------------------
// Purpose: Orient the projectile along its velocity
//-----------------------------------------------------------------------------
void CBaseProjectile::FlyThink( void )
{
QAngle angles;
VectorAngles( -(GetAbsVelocity()), angles );
SetAbsAngles( angles );
SetNextThink( gpGlobals->curtime + 0.1f );
}

View File

@ -1,61 +0,0 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================
#ifndef BASEPROJECTILE_H
#define BASEPROJECTILE_H
#ifdef _WIN32
#pragma once
#endif
// Creation.
struct baseprojectilecreate_t
{
Vector vecOrigin;
Vector vecVelocity;
CBaseEntity *pOwner;
string_t iszModel;
float flDamage;
int iDamageType;
float flDamageScale;
};
//=============================================================================
//
// Generic projectile
//
class CBaseProjectile : public CBaseAnimating
{
DECLARE_CLASS( CBaseProjectile, CBaseAnimating );
public:
DECLARE_DATADESC();
void Spawn( void );
void Precache( void );
static CBaseProjectile *Create( baseprojectilecreate_t &pCreate );
void SetDamage( float flDamage ) { m_flDamage = flDamage; }
void SetDamageScale( float &flScale ) { m_flDamageScale = flScale; }
void SetDamageType( int iType ) { m_iDamageType = iType; }
private:
// Damage
virtual float GetDamage() { return m_flDamage; }
virtual float GetDamageScale( void ) { return m_flDamageScale; }
virtual int GetDamageType( void ) { return m_iDamageType; }
unsigned int PhysicsSolidMaskForEntity( void ) const;
virtual void ProjectileTouch( CBaseEntity *pOther );
void FlyThink( void );
protected:
float m_flDamage;
int m_iDamageType;
float m_flDamageScale;
};
#endif // BASEPROJECTILE_H

Some files were not shown because too many files have changed in this diff Show More