diff --git a/.gitignore b/.gitignore index f9e4ed4cb9..1812c0ab3d 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,8 @@ ipch *.vcxproj.filters *.pdb *.lib +*.VC.db +*.VC.VC.opendb # OSX/Linux build products *.mak @@ -78,4 +80,6 @@ voice_ban.dt *.prt *.vmx *.lin -*.vdf \ No newline at end of file +*.vdf +*.pch.ib_tag +*.ib_pdb_index diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 324ab28f26..29ef18f765 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,16 @@ -# About contributing -Contributing to the mod is very easy. Just fork the repo, make your desired changes +# About Contributing +Contributing to this project is very easy. Just fork the repo, make your desired changes and then send us a pull request and we'll happily revise it. +Note: We use Hungarian Notation (Systems), spaces instead of tabs, and ClangFormat for any custom file added to the project. -When writing the Pull Request comment, don't forget to ask to get listed in the contributors section of the web by providing a name/alias that will be displayed in the credits section of the mod. If you don't provide a name, we'll use your GitHub username +If your work is to be used in our project, we will credit you with a Contributor role on [our credits page.](http://momentum-mod.org/about) If you wish to have a certain name in this credit, make sure to mention it in the comments of your Pull Request, otherwise, we'll just use your GitHub username. -**Every help we can get is welcomed** +If we like your work enough, we may invite you to be on the team! + +If you have any other concerns, feel free to [contact us!](http://momentum-mod.org/contact) + +**All the help we can get is very welcome!** Also, *as this is a Source mod*, VALVe's contributing conditions apply here as well: @@ -26,4 +31,4 @@ provide your Contribution "as is" without warranties.* creation, you may submit it to Valve separate from any Contribution, 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 -which you are personally aware.* +which you are personally aware.* \ No newline at end of file diff --git a/README.md b/README.md index 276f338354..1184ff6fd7 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,21 @@ # Momentum Mod ![Build Status](https://ci.appveyor.com/api/projects/status/9hpr4p9suvlge305?svg=true) -Momentum Mod is a free stand-alone Source mod with Counter-Strike: Source physics -dedicated to bhop and surfing while trying to improve them and simultaneously making -it easier to access and play (offline and online) as well as being cheaper +Momentum Mod is a free, stand-alone Source Engine mod, based on Counter-Strike: Source movement physics. +This project is dedicated to bhop and surfing, while not only trying to replicate them, but also trying to improve them. +Our goal is to make it easier to access and play (offline and online) as well as being cheaper (did we mention it's free?) than any other Source game you'd have to buy to play either of these game modes. ## Contributing You can read about how to contribute to the development of the mod -at the [contributing](CONTRIBUTING.md) section +at the [contributing](CONTRIBUTING.md) section. -You can find a (code focused) TO DO at [TODO.md](TODO.md), where you can see what we -plan to do next or what we have in mind (But, as it is a development list, we may skip some -of the ideas for whatever reason) +You can find a general TO-DO for the project over [at our Trello board](https://trello.com/momentum_mod). Feel free to tackle something if it tickles your fancy! Just note that if members are assigned to a feature, it is most likely already being worked on! ## Contact -You can contact us [at our website](http://momentum-mod.org/contact) - -The licenses and legal notices can be found at [SDK LICENSE](LICENSE) and [THIRD PARTY LEGAL NOTICES](thirdpartylegalnotices.txt) +You can [contact us at our website](http://momentum-mod.org/contact)! +## License +The licenses and legal notices can be found at [SDK LICENSE](LICENSE) and [THIRD PARTY LEGAL NOTICES](thirdpartylegalnotices.txt) \ No newline at end of file diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 653f4f0349..0000000000 --- a/TODO.md +++ /dev/null @@ -1,204 +0,0 @@ -## ALPHA -- [x] PORT TO MP BRANCH - -- [ ] Gameinterface.cpp (Server) - - [ ] Delete comment on Motd file not being able to be loaded (L:1721) once we're on MP branch - -- [ ] ClientScoreboardDialog.cpp (Client) - - [ ] Get online data from the API - - [x] Add friends leaderboard list - - [x] Add format for online & friends leaderboard lists - - [ ] Fill the lists with API data - - [ ] Update rank for event runtime_posted - - [x] Discuss update interval time - - [ ] Consider adding a "100 tick" column - - [x] Localize rank tokens - - [ ] Make FindItemIDForPlayerIndex(int) return an ItemID for another person's time - - [ ] Sort function for online times - - [x] Fix bugs: Lines being chopped down & mapsummary not being set - - [x] Discuss columns widths - - [ ] De-hardcode the font used on size checking - - [x] Find where to place friends leaderboards - - [ ] A lot of variables are not necessary. Ensure which are and remove the rest - - [ ] Use GetTextSize instead of calculating it per character - -- [ ] MapSelector.cpp (Client) - - [ ] Localize strings (remove ServerBrowser) - - [x] Make the panel display from menu selection (edit GameMenu.res and do "engine ToggleMapsPanel") - - [ ] Remove references to Server Browser - - [ ] Cleanup classes to remove useless/commented code - - [ ] Local Maps tab - - [x] Header columns: Completed | Map name | Game type | Difficulty | Best time - - [x] Populate with maps already on disk (parse .mom files?) - - [ ] Parse .mom/zon/bsp files to fill the Dialog with information - - [x] Change filters - - [x] Map name - - [x] Gametype (bhop/surf/etc) - - [x] Difficulty - - [x] Linear/Staged - - [ ] "Online Maps" Tab - - [ ] Apply filters to API searches - - [ ] Parse data from API and apply to list - - [ ] Start the selected map - - [ ] Download a selected map, and its .zon and .mom file (if not exist) - - [ ] Open a MapInfoDialog to show progress on download? - - [x] Set the correct gamemode type, tickrate, etc based on .mom file - -- [ ] MapInfoDialog.cpp (Client) - - [ ] Localize (remove ServerBrowser) - - [ ] Show information about the map - - [ ] Local info - - [ ] Local PBs - - [ ] Link replays to each local time - - [ ] Other local info/stats (how many total runs) - - [ ] Online info - - [ ] Top 10 times for the map - - [ ] Link replays to each online time - - [ ] Other online info/stats - - [ ] Make the user able to start the map from the Dialog - - [ ] Online maps need to be downloaded - - [ ] Local maps simply start like normal - -- [ ] The "mom"-ification and refactoring - - [ ] mom_player (Server/Client) - - [ ] Copy valuable snippets from HL2/CS Player classes - - [x] Clean up the EntSelectSpawnPoint() method - - [ ] mom_gamerules (Shared) - - [ ] Follow the hl2_gamerules.cpp file for creation - - [ ] Improve mom_spawn_with_weapons implementation - - [x] mom_gamemovement.cpp (Shared) - - [x] Implement rampboost fix by TotallyMehis - - [ ] mom_usermessages.cpp (Shared) - - [x] Remove the usermessages that aren't necessary - - [ ] Remove even more messages - - [ ] mom_client.cpp (Server) - - [ ] Precache all necessary sounds/models for the mod - - [ ] VPC Scripts - - [ ] Add the new mom files to the proper VPC scripts - - [ ] Verify & remove the files we deleted from the appropriate VPC scripts - - [ ] Remove any and all unnecessary HL2/generic code that doesn't pertain to the mod - - [x] Remove all ifdef (SIXENSE) code segments - - [x] Remove all ifdef (XBOX/X360 etc) & IsX360() code segments - - [x] Remove all ifdef (TF/PORTAL/DOD) code segments - - [x] Remove all ifdef (HL2_EPISODIC/HL2_LOSTCOAST/HL2MP) code segments - - [x] Remove all ifdef (HL1_DLL/CSPORT_DLL) code segments - - [x] Remove all ifdef (INVASION_DLL/NEXT_BOT/TERROR/USES_ECON_ITEMS) code segments - - [x] Inspect and cherry pick ifdef (CSTRIKE_DLL) code segments - - [ ] Format (CTRL + K, CTRL + D) every class to follow the tabs->spaces and other spacing style for code - - [ ] Remove any unused files - - [x] hud_squadstatus.cpp - - [x] hud_posture.cpp - - [x] hud_flashlight.cpp (the hud element) - - [x] hud_battery.cpp - - [ ] teamplayroundbased_gamerules.h/cpp - - [ ] Entire hl2/ subfolder in client/server/shared - - [x] Entire sdk/ subfolder in client/server/shared - - [ ] Eventually undefine HL2_DLL and remove corresponding code - -- [x] Creation of a shared (Client/Server) utils class with useful methods/data (gamemode, tickrate etc) - - [x] Create global enumeration for gamemodes - - [x] Store current gamemode on a global variable - -- [ ] Gamemodes - - [x] *BHOP* -> 100 tick, no stamina, autojump/no autojump (Cvar so people can manual scroll if they want) - - [ ] *SURF* -> 66 (default)/100 , no stamina, autojump - - [ ] *KZ* -> 100 tick, stamina, no autojump - -- [ ] weapon_momentum_gun.cpp (Shared) and CS:S weapon entities - - [x] Import CS:S weapon entities over - - [x] Import extra CS:S weapon entities (Knife and Grenades) - - [x] Cleanup CS:S weapon entities/reduce class clutter - - [ ] Make the main gun toggleable (the player spawns with it, presses button to use/hide it) - - [ ] Look into removing the crosshair? Customization? - - [ ] Consider keeping the hud_ammo.cpp HUD element for displaying how many bullets the player has in the clip - - [ ] Change model - - [ ] Tone down or remove view-bob - -- [ ] timer.cpp (Client) - - [ ] Play effects (animations) for run states - - [x] Move to bottom center (above speedometer) - - [x] Utilize the .res file variables for position/color/etc - - [x] Feed real data for the hud - - [x] Have more info (checkpoints, current stage/total stages, etc) - - [x] Only display relevant info - - [ ] Act accordingly to gamemode - - [ ] Add stamina settings for kz/scroll modes - - [x] Implement Hud Messaging system to interact with Timer.cpp (server) - - [x] Localization - - [x] Discuss bufsize for strings taking intoa count localizations - -- [ ] hud_cp_menu.cpp (Client) - - [x] Make creating a checkpoint stop your timer - - [ ] Make checkpoints available for output to files - - [ ] Consider local timer for routing - - [ ] Consider KZ game mode basically requiring checkpoints - - [ ] Extract underlying menu class and make hud_cp_menu create one - - [x] Use .res files - -- [ ] mom_triggers.cpp (Server) - - [ ] Tweak limit speed method - - [x] Implement Hud Messaging system to interact with timer.cpp (client) - - [x] Add the option to define what angles should the player have after being teleported - - [ ] Unify every spawnflag (So each one has an unique 'id') - - [ ] Bonus stages (either flags added to existing triggers or child entites) - -- [ ] Timer.cpp (Server) - - [ ] Add hash checking - - [x] GetCPCount seems to return wrongly - - [x] Are command flags needed? - -- [x] tickset.cpp (Server) Make tick-setting crossplatform - -- [x] In-game mapzone editor (Server/Client) allows for creation of zone files (on older CS maps) without using Hammer - -- [ ] mapzones.cpp (Server) - - [ ] Add support for the new custom triggers - -- [x] mapzones_edit.cpp (Server) - - [x] Change description for mom_zone_defmethod - - [x] Improve methods of triggers (Probbably also find a better suitting name) - - [ ] Improve binding (Add more build binds for things like mom_zone_defzone variations) - -- [ ] Credits - - [ ] Few values are set to default when the map ends, we have to set it to how the user had it before going to the credits - - [ ] If the user disconnects before the credits ending, hud convar values will not be set back to how they were before - -- [ ] GUI changes - - [ ] Add practice mode state to timer VGUI panel - -## BETA -- [ ] Implement CEF - - [ ] Create custom HTML HUD - - [ ] Create custom HTML menu - - [ ] Incorporate (precompiled/source?) into project - -- [ ] Consider importing Portal-like entities for non-euclidean geometry - -- [ ] Replays - - [ ] Use ghostingmod as an example of how to make/read the files - - [ ] Make map selection/leaderboards be able to download replays - -- [ ] Spectate system (like replays but streamed online) - - [ ] Use ghostingmod (server) as an example - - [ ] Racing system (like spectating but you can move around) - - [ ] Synchronize start, notified ends - - [ ] Allow disqualifications, drop outs, disconnections - - [ ] Free play online ghosts (Similar to current bhop/surf servers. Community is important.) - -- [ ] Global chat - - [ ] Simple general and map chat via IRC or something - -- [x] func_shootboost: (Potential entity that handles shootboosts (not needed)) - -- [ ] weapon_momentum_gun (Client/Server) - - [ ] "Wire-frame" models for each gun override - - [ ] Edited gun sounds that reference original sounds? - -- [ ] Gamemodes (Ideas) - - [ ] RocketJump -> 100 tick?, no stamina?, autojump? - -## BETA+ (Official Release) -- [ ] Get greenlit - -- [ ] Timer.cpp (Server) - - [ ] Include the extra security measures diff --git a/mp/game/momentum/cfg/config_default.cfg b/mp/game/momentum/cfg/config_default.cfg index c84c0051cd..f92a2c3f18 100644 --- a/mp/game/momentum/cfg/config_default.cfg +++ b/mp/game/momentum/cfg/config_default.cfg @@ -15,8 +15,7 @@ bind "CTRL" "+duck" bind "e" "+use" bind "c" "impulse 50" bind "r" "+reload" -bind "ALT" "+walk" -bind "SHIFT" "+speed" +bind "SHIFT" "+walk" bind "MOUSE1" "+attack" bind "MOUSE2" "+attack2" bind "f" "impulse 100" @@ -39,7 +38,7 @@ bind "g" "phys_swap" bind "y" "messagemode" bind "u" "messagemode2" bind "k" "+voicerecord" -//Momentum releated +//Momentum related bind "F5" "mom_restart" bind "F6" "mom_reset" bind "z" "showCPmenu" diff --git a/mp/game/momentum/cfg/valve.rc b/mp/game/momentum/cfg/valve.rc index d4fdf90abc..09a2b13946 100644 --- a/mp/game/momentum/cfg/valve.rc +++ b/mp/game/momentum/cfg/valve.rc @@ -14,8 +14,5 @@ exec autoexec.cfg stuffcmds sv_unlockedchapters 99 //Random background selection startupmenu - //THESE FIX DEMO PLAYBACK BUG, DO NOT REMOVE -sv_client_min_interp_ratio 0 -sv_client_max_interp_ratio 0 -cl_interp 0 -cl_interp_ratio 0 +//"fix" for demo playback stutter bug. MOM_TODO: fix this for realzies +demo_interpolateview 0 diff --git a/mp/game/momentum/materials/dev_nyro/dev_blue_b-02.vtf b/mp/game/momentum/materials/dev_nyro/dev_blue_b-02.vtf new file mode 100644 index 0000000000..3a7906b753 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_blue_b-02.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_blue_b-04.vtf b/mp/game/momentum/materials/dev_nyro/dev_blue_b-04.vtf new file mode 100644 index 0000000000..179a51be38 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_blue_b-04.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_blue_b-05.vtf b/mp/game/momentum/materials/dev_nyro/dev_blue_b-05.vtf new file mode 100644 index 0000000000..98e9d023ac Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_blue_b-05.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-01.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-01.vtf new file mode 100644 index 0000000000..80bc86de8a Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-01.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-03.vmt b/mp/game/momentum/materials/dev_nyro/dev_gray-03.vmt new file mode 100644 index 0000000000..207636cb55 --- /dev/null +++ b/mp/game/momentum/materials/dev_nyro/dev_gray-03.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ +"$basetexture" "dev_nyro\dev_gray-03" +} diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-03.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-03.vtf new file mode 100644 index 0000000000..3c712b75b4 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-03.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-04.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-04.vtf new file mode 100644 index 0000000000..2d258eb363 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-04.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-05.vmt b/mp/game/momentum/materials/dev_nyro/dev_gray-05.vmt new file mode 100644 index 0000000000..f9ed31da98 --- /dev/null +++ b/mp/game/momentum/materials/dev_nyro/dev_gray-05.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ +"$basetexture" "dev_nyro\dev_gray-05" +} diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-05.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-05.vtf new file mode 100644 index 0000000000..cb85ed6a61 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-05.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-06.vmt b/mp/game/momentum/materials/dev_nyro/dev_gray-06.vmt new file mode 100644 index 0000000000..36f161d01a --- /dev/null +++ b/mp/game/momentum/materials/dev_nyro/dev_gray-06.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ +"$basetexture" "dev_nyro\dev_gray-06" +} diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-06.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-06.vtf new file mode 100644 index 0000000000..f77678fe54 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-06.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-07.vmt b/mp/game/momentum/materials/dev_nyro/dev_gray-07.vmt new file mode 100644 index 0000000000..a61b86ae50 --- /dev/null +++ b/mp/game/momentum/materials/dev_nyro/dev_gray-07.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ +"$basetexture" "dev_nyro\dev_gray-07" +} diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-07.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-07.vtf new file mode 100644 index 0000000000..82bee7c689 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-07.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-08.vmt b/mp/game/momentum/materials/dev_nyro/dev_gray-08.vmt new file mode 100644 index 0000000000..5666144e95 --- /dev/null +++ b/mp/game/momentum/materials/dev_nyro/dev_gray-08.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ +"$basetexture" "dev_nyro\dev_gray-08" +} diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-08.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-08.vtf new file mode 100644 index 0000000000..90e739c391 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-08.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-09.vmt b/mp/game/momentum/materials/dev_nyro/dev_gray-09.vmt new file mode 100644 index 0000000000..4a56be738e --- /dev/null +++ b/mp/game/momentum/materials/dev_nyro/dev_gray-09.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ +"$basetexture" "dev_nyro\dev_gray-09" +} diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-09.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-09.vtf new file mode 100644 index 0000000000..7d208b3798 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-09.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-10.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-10.vtf new file mode 100644 index 0000000000..c04a9d7cf9 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-10.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-11.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-11.vtf new file mode 100644 index 0000000000..c64ae3f5cc Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-11.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-12.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-12.vtf new file mode 100644 index 0000000000..5bad85b896 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-12.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-13.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-13.vtf new file mode 100644 index 0000000000..61f1149108 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-13.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-14.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-14.vtf new file mode 100644 index 0000000000..1f808c3811 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-14.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-15.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-15.vtf new file mode 100644 index 0000000000..d657046a76 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-15.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-16.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-16.vtf new file mode 100644 index 0000000000..de4626c359 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-16.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-17.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-17.vtf new file mode 100644 index 0000000000..a13265ffb2 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-17.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-18.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-18.vtf new file mode 100644 index 0000000000..8894bb3d79 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-18.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-19.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-19.vtf new file mode 100644 index 0000000000..4076b28419 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-19.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-20.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-20.vtf new file mode 100644 index 0000000000..caec4ab895 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-20.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-21.vmt b/mp/game/momentum/materials/dev_nyro/dev_gray-21.vmt new file mode 100644 index 0000000000..45b09ea3a2 --- /dev/null +++ b/mp/game/momentum/materials/dev_nyro/dev_gray-21.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ +"$basetexture" "dev_nyro\dev_gray-21" +} diff --git a/mp/game/momentum/materials/dev_nyro/dev_gray-21.vtf b/mp/game/momentum/materials/dev_nyro/dev_gray-21.vtf new file mode 100644 index 0000000000..6b47e257d7 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_gray-21.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_green_a-03.vtf b/mp/game/momentum/materials/dev_nyro/dev_green_a-03.vtf new file mode 100644 index 0000000000..9244903f1c Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_green_a-03.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_green_a-04.vtf b/mp/game/momentum/materials/dev_nyro/dev_green_a-04.vtf new file mode 100644 index 0000000000..b6d187bcde Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_green_a-04.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_magenta_b-04.vtf b/mp/game/momentum/materials/dev_nyro/dev_magenta_b-04.vtf new file mode 100644 index 0000000000..354723e689 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_magenta_b-04.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_orange_b-04.vtf b/mp/game/momentum/materials/dev_nyro/dev_orange_b-04.vtf new file mode 100644 index 0000000000..5615a61bc3 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_orange_b-04.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_purple_a-04.vtf b/mp/game/momentum/materials/dev_nyro/dev_purple_a-04.vtf new file mode 100644 index 0000000000..12673f8efa Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_purple_a-04.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_red_a-01.vmt b/mp/game/momentum/materials/dev_nyro/dev_red_a-01.vmt new file mode 100644 index 0000000000..2269f0e51d --- /dev/null +++ b/mp/game/momentum/materials/dev_nyro/dev_red_a-01.vmt @@ -0,0 +1,4 @@ +"LightmappedGeneric" +{ +"$basetexture" "dev_nyro\dev_red_a-01" +} diff --git a/mp/game/momentum/materials/dev_nyro/dev_red_a-01.vtf b/mp/game/momentum/materials/dev_nyro/dev_red_a-01.vtf new file mode 100644 index 0000000000..b9e9474f81 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_red_a-01.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_red_a-02.vtf b/mp/game/momentum/materials/dev_nyro/dev_red_a-02.vtf new file mode 100644 index 0000000000..dd86f25e39 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_red_a-02.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_red_a-03.vtf b/mp/game/momentum/materials/dev_nyro/dev_red_a-03.vtf new file mode 100644 index 0000000000..eee656673b Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_red_a-03.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_red_a-04.vtf b/mp/game/momentum/materials/dev_nyro/dev_red_a-04.vtf new file mode 100644 index 0000000000..482b7326f8 Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_red_a-04.vtf differ diff --git a/mp/game/momentum/materials/dev_nyro/dev_yellow_b-04.vtf b/mp/game/momentum/materials/dev_nyro/dev_yellow_b-04.vtf new file mode 100644 index 0000000000..a2e0b8908a Binary files /dev/null and b/mp/game/momentum/materials/dev_nyro/dev_yellow_b-04.vtf differ diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_blue_b-02.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_blue_b-02.vmt new file mode 100644 index 0000000000..0eca79be92 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_blue_b-02.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_blue_b-02" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_blue_b-05.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_blue_b-05.vmt new file mode 100644 index 0000000000..5be67da4c3 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_blue_b-05.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_blue_b-05" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-03.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-03.vmt new file mode 100644 index 0000000000..6768dfeee7 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-03.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-03" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-05.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-05.vmt new file mode 100644 index 0000000000..4315481467 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-05.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-05" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-07.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-07.vmt new file mode 100644 index 0000000000..f527a59d7b --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-07.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-07" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-09.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-09.vmt new file mode 100644 index 0000000000..7afa6ecadf --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-09.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-09" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-10.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-10.vmt new file mode 100644 index 0000000000..e50a571ca8 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-10.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-10" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-11.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-11.vmt new file mode 100644 index 0000000000..68bff9defd --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-11.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-11" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-13.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-13.vmt new file mode 100644 index 0000000000..92b8c1690a --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-13.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-13" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-15.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-15.vmt new file mode 100644 index 0000000000..2f90edee15 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-15.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-15" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-17.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-17.vmt new file mode 100644 index 0000000000..3f03855fa1 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-17.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-17" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-19.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-19.vmt new file mode 100644 index 0000000000..784b6daf92 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-19.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-19" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-21.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-21.vmt new file mode 100644 index 0000000000..2eace71850 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_gray-21.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-21" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_green_a-03.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_green_a-03.vmt new file mode 100644 index 0000000000..ca6e9c31d1 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_green_a-03.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_green_a-03" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_orange_b-04.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_orange_b-04.vmt new file mode 100644 index 0000000000..e5bcf8d015 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_orange_b-04.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_orange_b-04" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/dev_wireframe.vmt b/mp/game/momentum/materials/models/props/dev_nyro/dev_wireframe.vmt new file mode 100644 index 0000000000..6a335a2765 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/dev_wireframe.vmt @@ -0,0 +1,6 @@ +"wireframe" +{ +"$model" "1" +"$basetexture" "dev_nyro\dev_gray-21" +"$nocull" "1" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_blue_b-04.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_blue_b-04.vmt new file mode 100644 index 0000000000..2384efd1e6 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_blue_b-04.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_blue_b-04" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-01.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-01.vmt new file mode 100644 index 0000000000..c2ef3e7d85 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-01.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-01" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-03.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-03.vmt new file mode 100644 index 0000000000..3096ba69ed --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-03.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-03" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-04.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-04.vmt new file mode 100644 index 0000000000..4a80983357 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-04.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-04" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-06.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-06.vmt new file mode 100644 index 0000000000..ddba3e57ea --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-06.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-06" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-07.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-07.vmt new file mode 100644 index 0000000000..7d6288c41e --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-07.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-07" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-09.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-09.vmt new file mode 100644 index 0000000000..1eebf2b1bb --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-09.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-09" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-10.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-10.vmt new file mode 100644 index 0000000000..a43d5c1c34 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-10.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-10" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-12.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-12.vmt new file mode 100644 index 0000000000..66f027b05d --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-12.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-12" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-13.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-13.vmt new file mode 100644 index 0000000000..ec5d774cae --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-13.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-13" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-15.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-15.vmt new file mode 100644 index 0000000000..bca801c658 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-15.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-15" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-16.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-16.vmt new file mode 100644 index 0000000000..200da96b82 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-16.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-16" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-18.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-18.vmt new file mode 100644 index 0000000000..0c31b01271 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-18.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-18" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-20.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-20.vmt new file mode 100644 index 0000000000..e6b04cf8b5 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-20.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-20" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-21.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-21.vmt new file mode 100644 index 0000000000..97f93a430e --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_gray-21.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_gray-21" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_green_a-04.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_green_a-04.vmt new file mode 100644 index 0000000000..53f42f10b5 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_green_a-04.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_green_a-04" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_magenta_b-04.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_magenta_b-04.vmt new file mode 100644 index 0000000000..fd152e1cbd --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_magenta_b-04.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_magenta_b-04" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_orange_b-04.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_orange_b-04.vmt new file mode 100644 index 0000000000..13ed72c843 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_orange_b-04.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_orange_b-04" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_purple_a-04.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_purple_a-04.vmt new file mode 100644 index 0000000000..cb8f8cb0a5 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_purple_a-04.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_purple_a-04" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_red_a-04.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_red_a-04.vmt new file mode 100644 index 0000000000..9d96174636 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_red_a-04.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_red_a-04" +} diff --git a/mp/game/momentum/materials/models/props/dev_nyro/glow_yellow_b-04.vmt b/mp/game/momentum/materials/models/props/dev_nyro/glow_yellow_b-04.vmt new file mode 100644 index 0000000000..a463cff6c0 --- /dev/null +++ b/mp/game/momentum/materials/models/props/dev_nyro/glow_yellow_b-04.vmt @@ -0,0 +1,6 @@ +"unlitgeneric" +{ +"$model" "1" +"$selfillum" "1" +"$basetexture" "dev_nyro\dev_yellow_b-04" +} diff --git a/mp/game/momentum/materials/vgui/close_button.vmt b/mp/game/momentum/materials/vgui/close_button.vmt new file mode 100644 index 0000000000..abb51e593c --- /dev/null +++ b/mp/game/momentum/materials/vgui/close_button.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "vgui\close_button" + "$translucent" 1 + "$ignorez" 1 +} \ No newline at end of file diff --git a/mp/game/momentum/materials/vgui/close_button.vtf b/mp/game/momentum/materials/vgui/close_button.vtf new file mode 100644 index 0000000000..f90b956a55 Binary files /dev/null and b/mp/game/momentum/materials/vgui/close_button.vtf differ diff --git a/mp/game/momentum/materials/vgui/left_arrow_button.vmt b/mp/game/momentum/materials/vgui/left_arrow_button.vmt new file mode 100644 index 0000000000..2ce04a90dc --- /dev/null +++ b/mp/game/momentum/materials/vgui/left_arrow_button.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "vgui\left_arrow_button" + "$translucent" 1 + "$ignorez" 1 +} \ No newline at end of file diff --git a/mp/game/momentum/materials/vgui/left_arrow_button.vtf b/mp/game/momentum/materials/vgui/left_arrow_button.vtf new file mode 100644 index 0000000000..d3f09fa246 Binary files /dev/null and b/mp/game/momentum/materials/vgui/left_arrow_button.vtf differ diff --git a/mp/game/momentum/materials/vgui/left_arrow_button_grey.vmt b/mp/game/momentum/materials/vgui/left_arrow_button_grey.vmt new file mode 100644 index 0000000000..03d0b0a2d0 --- /dev/null +++ b/mp/game/momentum/materials/vgui/left_arrow_button_grey.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "vgui\left_arrow_button_grey" + "$translucent" 1 + "$ignorez" 1 +} \ No newline at end of file diff --git a/mp/game/momentum/materials/vgui/left_arrow_button_grey.vtf b/mp/game/momentum/materials/vgui/left_arrow_button_grey.vtf new file mode 100644 index 0000000000..90deecb45e Binary files /dev/null and b/mp/game/momentum/materials/vgui/left_arrow_button_grey.vtf differ diff --git a/mp/game/momentum/materials/vgui/loop_button.vmt b/mp/game/momentum/materials/vgui/loop_button.vmt new file mode 100644 index 0000000000..590365225e --- /dev/null +++ b/mp/game/momentum/materials/vgui/loop_button.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "vgui\loop_button" + "$translucent" 1 + "$ignorez" 1 +} \ No newline at end of file diff --git a/mp/game/momentum/materials/vgui/loop_button.vtf b/mp/game/momentum/materials/vgui/loop_button.vtf new file mode 100644 index 0000000000..2a1d68cbb0 Binary files /dev/null and b/mp/game/momentum/materials/vgui/loop_button.vtf differ diff --git a/mp/game/momentum/materials/vgui/loop_button_grey.vmt b/mp/game/momentum/materials/vgui/loop_button_grey.vmt new file mode 100644 index 0000000000..3bce778942 --- /dev/null +++ b/mp/game/momentum/materials/vgui/loop_button_grey.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "vgui\loop_button_grey" + "$translucent" 1 + "$ignorez" 1 +} \ No newline at end of file diff --git a/mp/game/momentum/materials/vgui/loop_button_grey.vtf b/mp/game/momentum/materials/vgui/loop_button_grey.vtf new file mode 100644 index 0000000000..d950b43fa0 Binary files /dev/null and b/mp/game/momentum/materials/vgui/loop_button_grey.vtf differ diff --git a/mp/game/momentum/materials/vgui/replay_icon.vmt b/mp/game/momentum/materials/vgui/replay_icon.vmt new file mode 100644 index 0000000000..2ee42f3e87 --- /dev/null +++ b/mp/game/momentum/materials/vgui/replay_icon.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "vgui\replay_icon" + "$translucent" 1 + "$ignorez" 1 +} \ No newline at end of file diff --git a/mp/game/momentum/materials/vgui/replay_icon.vtf b/mp/game/momentum/materials/vgui/replay_icon.vtf new file mode 100644 index 0000000000..5d267f4863 Binary files /dev/null and b/mp/game/momentum/materials/vgui/replay_icon.vtf differ diff --git a/mp/game/momentum/materials/vgui/replay_icon_grey.vmt b/mp/game/momentum/materials/vgui/replay_icon_grey.vmt new file mode 100644 index 0000000000..60cb589963 --- /dev/null +++ b/mp/game/momentum/materials/vgui/replay_icon_grey.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "vgui\replay_icon_grey" + "$translucent" 1 + "$ignorez" 1 +} \ No newline at end of file diff --git a/mp/game/momentum/materials/vgui/replay_icon_grey.vtf b/mp/game/momentum/materials/vgui/replay_icon_grey.vtf new file mode 100644 index 0000000000..049ba9cfc1 Binary files /dev/null and b/mp/game/momentum/materials/vgui/replay_icon_grey.vtf differ diff --git a/mp/game/momentum/materials/vgui/right_arrow_button.vmt b/mp/game/momentum/materials/vgui/right_arrow_button.vmt new file mode 100644 index 0000000000..e15167bcf7 --- /dev/null +++ b/mp/game/momentum/materials/vgui/right_arrow_button.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "vgui\right_arrow_button" + "$translucent" 1 + "$ignorez" 1 +} \ No newline at end of file diff --git a/mp/game/momentum/materials/vgui/right_arrow_button.vtf b/mp/game/momentum/materials/vgui/right_arrow_button.vtf new file mode 100644 index 0000000000..a183211175 Binary files /dev/null and b/mp/game/momentum/materials/vgui/right_arrow_button.vtf differ diff --git a/mp/game/momentum/materials/vgui/right_arrow_button_grey.vmt b/mp/game/momentum/materials/vgui/right_arrow_button_grey.vmt new file mode 100644 index 0000000000..4ae55e633c --- /dev/null +++ b/mp/game/momentum/materials/vgui/right_arrow_button_grey.vmt @@ -0,0 +1,6 @@ +"UnlitGeneric" +{ + "$basetexture" "vgui\right_arrow_button_grey" + "$translucent" 1 + "$ignorez" 1 +} \ No newline at end of file diff --git a/mp/game/momentum/materials/vgui/right_arrow_button_grey.vtf b/mp/game/momentum/materials/vgui/right_arrow_button_grey.vtf new file mode 100644 index 0000000000..f64763a231 Binary files /dev/null and b/mp/game/momentum/materials/vgui/right_arrow_button_grey.vtf differ diff --git a/mp/game/momentum/models/player/player_shape_base.dx80.vtx b/mp/game/momentum/models/player/player_shape_base.dx80.vtx new file mode 100644 index 0000000000..96941ddd63 Binary files /dev/null and b/mp/game/momentum/models/player/player_shape_base.dx80.vtx differ diff --git a/mp/game/momentum/models/player/player_shape_base.dx90.vtx b/mp/game/momentum/models/player/player_shape_base.dx90.vtx new file mode 100644 index 0000000000..622ca9de95 Binary files /dev/null and b/mp/game/momentum/models/player/player_shape_base.dx90.vtx differ diff --git a/mp/game/momentum/models/player/player_shape_base.mdl b/mp/game/momentum/models/player/player_shape_base.mdl new file mode 100644 index 0000000000..363a060dd2 Binary files /dev/null and b/mp/game/momentum/models/player/player_shape_base.mdl differ diff --git a/mp/game/momentum/models/player/player_shape_base.sw.vtx b/mp/game/momentum/models/player/player_shape_base.sw.vtx new file mode 100644 index 0000000000..95b83f34e8 Binary files /dev/null and b/mp/game/momentum/models/player/player_shape_base.sw.vtx differ diff --git a/mp/game/momentum/models/player/player_shape_base.vvd b/mp/game/momentum/models/player/player_shape_base.vvd new file mode 100644 index 0000000000..5cf3d2e570 Binary files /dev/null and b/mp/game/momentum/models/player/player_shape_base.vvd differ diff --git a/mp/game/momentum/resource/ClientScheme.res b/mp/game/momentum/resource/ClientScheme.res index ab35a9adc4..9ca380f638 100644 --- a/mp/game/momentum/resource/ClientScheme.res +++ b/mp/game/momentum/resource/ClientScheme.res @@ -214,7 +214,7 @@ Scheme ToggleButton.SelectedTextColor "White" - Tooltip.TextColor "TransparentBlack" + Tooltip.TextColor "White" Tooltip.BgColor "Red" TreeView.BgColor "TransparentBlack" diff --git a/mp/game/momentum/resource/SourceScheme.res b/mp/game/momentum/resource/SourceScheme.res index 62385297f6..8a7796febd 100644 --- a/mp/game/momentum/resource/SourceScheme.res +++ b/mp/game/momentum/resource/SourceScheme.res @@ -182,7 +182,7 @@ Scheme ToggleButton.SelectedTextColor "White" - Tooltip.TextColor "Light Gray" + Tooltip.TextColor "White" Tooltip.BgColor "MOM.Panel.Bg" TreeView.BgColor "Light Gray" diff --git a/mp/game/momentum/resource/modevents.res b/mp/game/momentum/resource/modevents.res index 2923a99692..c073e83e8d 100644 --- a/mp/game/momentum/resource/modevents.res +++ b/mp/game/momentum/resource/modevents.res @@ -27,44 +27,11 @@ "modevents" { - "timer_stopped" + "zone_enter"//When the player/ghost enters a checkpoint/stage trigger { - "avg_sync" "float" - "avg_sync2" "float" - "num_strafes" "short" - "num_jumps" "short" - - "avg_vel" "float" - "max_vel" "float" - "start_vel" "float" - "end_vel" "float" - "avg_vel_2D" "float" - "max_vel_2D" "float" - "start_vel_2D" "float" - "end_vel_2D" "float" } - "stage_enter" - { - "stage_num" "byte" - "stage_enter_time" "float" //time is in seconds - "avg_sync" "float" - "avg_sync2" "float" - "num_strafes" "short" - "num_jumps" "short" - - "avg_vel" "float" - "max_vel" "float" - "stage_exit_vel" "float"//previous stage's exit velocity - //we save both XY and XYZ, so we can look at both if need be... - "avg_vel_2D" "float" - "max_vel_2D" "float" - "stage_exit_vel_2D" "float"//previous stage's horizontal exit velocity - } - "stage_exit"//When the player exits the start trigger for the stage + "zone_exit"//When the player exits the start trigger for the stage { - "stage_num" "byte" - "stage_enter_vel" "float"//velocity in which the player starts the stage (exits the stage trigger) - "stage_enter_vel_2D" "float" } "run_save" { @@ -77,20 +44,18 @@ } "timer_state" { + "ent" "short" "is_running" "bool" } - "keypress" - { - "num_jumps" "short" - "num_strafes" "short" - } - "practice_mode" - { - "has_practicemode" "bool" - } "map_init" { "is_linear" "bool" - "num_checkpoints" "byte" + "num_zones" "byte" + } + "spec_target_updated" // Used by the spectator GUI + { + } + "mapfinished_panel_closed" + { } } diff --git a/mp/game/momentum/resource/momentum_english.txt b/mp/game/momentum/resource/momentum_english.txt index abe1f9d62a..8831d92285 100644 Binary files a/mp/game/momentum/resource/momentum_english.txt and b/mp/game/momentum/resource/momentum_english.txt differ diff --git a/mp/game/momentum/resource/ui/MapFinishedDialog.res b/mp/game/momentum/resource/ui/MapFinishedDialog.res new file mode 100644 index 0000000000..8c2e422b8b --- /dev/null +++ b/mp/game/momentum/resource/ui/MapFinishedDialog.res @@ -0,0 +1,365 @@ +"resource/ui/MapFinishedDialog.res" +{ + "CHudMapFinishedDialog" + { + "fieldName" "CHudMapFinishedDialog" + "xpos" "c-110" + "ypos" "c-150" + "wide" "220" + "tall" "175" + "visible" "1" + "enabled" "1" + "TextFont" "Default" + } + + "Prev_Zone" + { + "ControlName" "ImagePanel" + "fieldName" "Prev_Zone" + "xpos" "2" + "ypos" "2" + "wide" "8" + "tall" "8" + "scaleImage" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "image" "left_arrow_button_grey" + } + + "Next_Zone" + { + "ControlName" "ImagePanel" + "fieldName" "Next_Zone" + "xpos" "50"//Determined by code + "ypos" "2" + "wide" "8" + "tall" "8" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "scaleImage" "1" + "image" "right_arrow_button_grey" + } + + "Replay_Icon" + { + "ControlName" "ImagePanel" + "fieldName" "Replay_Icon" + "xpos" "180" + "ypos" "80" + "wide" "32" + "tall" "32" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "scaleImage" "1" + "image" "replay_icon_grey" + } + + "Repeat_Button" + { + "ControlName" "ImagePanel" + "fieldName" "Repeat_Button" + "xpos" "180" + "ypos" "120" + "wide" "32" + "tall" "32" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "scaleImage" "1" + "image" "loop_button_grey" + } + + "Close_Panel" + { + "ControlName" "ImagePanel" + "fieldName" "Close_Panel" + "xpos" "180" + "ypos" "2" + "wide" "32" + "tall" "32" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "scaleImage" "1" + "image" "close_button" + } + + "Current_Zone"//This is the label that shows what the current zone on the map finished panel + { + "ControlName" "Label" + "fieldName" "Current_Zone" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "13" + "ypos" "2" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_OverallStats"//This changes based on page number + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Zone_Overall_Time"// or "ZoneTime" + { + "ControlName" "Label" + "fieldName" "Zone_Overall_Time" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "20" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_RunTime"//Possibly changing to #MOM_MF_Time_Zone + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Zone_Enter_Time" + { + "ControlName" "Label" + "fieldName" "Zone_Enter_Time" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "30" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_Zone_Enter" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Zone_Strafes" + { + "ControlName" "Label" + "fieldName" "Zone_Strafes" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "40" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_Strafes" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Zone_Jumps" + { + "ControlName" "Label" + "fieldName" "Zone_Jumps" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "50" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_Jumps" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Zone_Vel_Enter" + { + "ControlName" "Label" + "fieldName" "Zone_Vel_Enter" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "60" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_Velocity_Enter" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Zone_Vel_Exit" + { + "ControlName" "Label" + "fieldName" "Zone_Vel_Exit" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "70" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_Velocity_Exit" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Zone_Vel_Avg" + { + "ControlName" "Label" + "fieldName" "Zone_Vel_Avg" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "80" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_Velocity_Avg" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Zone_Vel_Max" + { + "ControlName" "Label" + "fieldName" "Zone_Vel_Max" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "90" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_Velocity_Max" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Zone_Sync1" + { + "ControlName" "Label" + "fieldName" "Zone_Sync1" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "100" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_Sync1" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Zone_Sync2" + { + "ControlName" "Label" + "fieldName" "Zone_Sync2" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "110" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_Sync2" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Run_Save_Status" + { + "ControlName" "Label" + "fieldName" "Run_Save_Status" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "130" + "wide" "100" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_RunNotSaved" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Run_Upload_Status" + { + "ControlName" "Label" + "fieldName" "Run_Upload_Status" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "20" + "ypos" "140" + "wide" "120" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_RunNotUploaded" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + "Detach_Mouse" + { + "ControlName" "Label" + "fieldName" "Detach_Mouse" + "font" "Default"//Set by "TextFont" in HudLayout.res + "xpos" "4" + "ypos" "160" + "wide" "150" + "tall" "10"//Set by font size + "autoResize" "1" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#MOM_MF_DetachMouse" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + + styles + { + status + { + bgcolor="PropertySheetBG" + inset="8 0 0 0" + } + } +} diff --git a/mp/game/momentum/resource/ui/Spectator.res b/mp/game/momentum/resource/ui/Spectator.res new file mode 100644 index 0000000000..d431037ecc --- /dev/null +++ b/mp/game/momentum/resource/ui/Spectator.res @@ -0,0 +1,126 @@ +"Resource/UI/SpectatorGUI.res" +{ + "SpectatorGUI" + { + "ControlName" "Frame" + "fieldName" "SpectatorGUI" + "tall" "480" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "topbar" + { + "ControlName" "Panel" + "fieldName" "topbar" + "xpos" "0" + "ypos" "0" + "tall" "52" + "wide" "640" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "bottombarblank" + { + "ControlName" "Panel" + "fieldName" "bottombarblank" + "xpos" "0" + "ypos" "428" + "tall" "55" // this needs to match the size of BottomBar + "wide" "640" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "playerlabel" + { + "ControlName" "Label" + "fieldName" "playerlabel" + "xpos" "r86" + "ypos" "20" + "wide" "81" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + "timelabel" + { + "ControlName" "Label" + "fieldName" "timelabel" + "xpos" "r86" + "ypos" "28" + "wide" "81" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + "replaylabel" + { + "ControlName" "Label" + "fieldName" "replaylabel" + "xpos" "c-175" + "ypos" "18" + "wide" "350" + "tall" "26" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "textAlignment" "center" + } + "extrainfo" + { + "ControlName" "Label" + "fieldName" "extrainfo" + "xpos" "r86" + "ypos" "12" + "wide" "81" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + "titlelabel" + { + "ControlName" "Label" + "fieldName" "titlelabel" + "xpos" "16" + "ypos" "16" + "wide" "320" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "font" "HudNumbersSmall" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } +} diff --git a/mp/game/momentum/scripts/HudLayout.res b/mp/game/momentum/scripts/HudLayout.res index 43c1383c80..51b16fa086 100644 --- a/mp/game/momentum/scripts/HudLayout.res +++ b/mp/game/momentum/scripts/HudLayout.res @@ -1,161 +1,131 @@ "Resource/HudLayout.res" { //Speedometer - HudSpeedMeter - { - "fieldName" "HudSpeedMeter" - "xpos" "c-60" - "ypos" "310" - "wide" "120" - "tall" "80" - "visible" "1" - "enabled" "1" - "NumberFont" "HudNumbersSmallBold" - "SmallNumberFont" "HudNumbersExtremelySmall" - "text_ypos" "5" - "digit_ypos" "15" - "digit2_ypos" "30" - "PrimaryValueColor" "MOM.Panel.Fg" - "SecondaryValueColor" "Light Gray" - "LabelColor" "MOM.Panel.Fg" - "BgColor" "Blank" + HudSpeedMeter + { + "fieldName" "HudSpeedMeter" + "xpos" "c-60" + "ypos" "310" + "wide" "120" + "tall" "80" + "visible" "1" + "enabled" "1" + "NumberFont" "HudNumbersSmallBold" + "SmallNumberFont" "HudNumbersExtremelySmall" + "text_ypos" "5" + "digit_ypos" "15" + "digit2_ypos" "30" + "PrimaryValueColor" "MOM.Panel.Fg" + "SecondaryValueColor" "Light Gray" + "LabelColor" "MOM.Panel.Fg" + "BgColor" "Blank" "SplitAlpha" "255"//Used for fading "JumpAlpha" "255"//Used for fading - } + } //Timer - HudTimer - { - "fieldName" "HudTimer" - "xpos" "c-50" - "ypos" "c+150" - "wide" "100" - "tall" "50" - "visible" "1" - "enabled" "1" + HudTimer + { + "fieldName" "HudTimer" + "xpos" "c-50" + "ypos" "c+150" + "wide" "100" + "tall" "50" + "visible" "1" + "enabled" "1" "PaintBackgroundType" "2" - "TimerFont" "HudNumbersSmallBold" - "TextFont" "HudHintTextLarge" - "SmallTextFont" "HudHintTextSmall" - "TextColor" "MOM.Panel.Fg" - "centerTime" "1" //If true, won't use time_xpos, centering the text instead - "time_xpos" "50" - "time_ypos" "3" - "centerCps" "1" //If true, won't use cps_xpos, centering the text instead - "cps_xpos" "50"//Note: checkpoints only show when there's no run (and therefore splits) - "cps_ypos" "19" - "centerSplit" "1" //If true, won't use stage_xpos, centering the stage split - "split_xpos" "50" - "split_ypos" "19" - } - //Strafe Sync Meter - CHudSyncMeter - { - "fieldName" "CHudSyncMeter" - "xpos" "c-25" - "ypos" "c+198" - "wide" "50" - "tall" "30" - "visible" "1" - "enabled" "1" - "TextFont" "HudNumbersVerySmall" - "NumberFont" "HudNumbersSmall" - "SmallNumberFont" "HudNumbersVerySmall" + "TimerFont" "HudNumbersSmallBold" + "TextFont" "HudHintTextLarge" + "SmallTextFont" "HudHintTextSmall" + "TextColor" "MOM.Panel.Fg" + "centerTime" "1" //If true, won't use time_xpos, centering the text instead + "time_xpos" "50" + "time_ypos" "3" + "centerCps" "1" //If true, won't use cps_xpos, centering the text instead + "cps_xpos" "50"//Note: checkpoints only show when there's no run (and therefore splits) + "cps_ypos" "19" + "centerSplit" "1" //If true, won't use stage_xpos, centering the stage split + "split_xpos" "50" + "split_ypos" "19" + } + //Strafe Sync Meter + CHudSyncMeter + { + "fieldName" "CHudSyncMeter" + "xpos" "c-25" + "ypos" "c+198" + "wide" "50" + "tall" "30" + "visible" "1" + "enabled" "1" + "TextFont" "HudNumbersVerySmall" + "NumberFont" "HudNumbersSmall" + "SmallNumberFont" "HudNumbersVerySmall" "PaintBackgroundType" "2" - "text_xpos" "15" - "text_ypos" "2" - "digit_xpos" "12" - "digit_ypos" "12" - "digit2_xpos" "30" - "digit2_ypos" "16" - "PrimaryValueColor" "MOM.Panel.Fg" - "SecondaryValueColor" "MOM.Panel.Fg" - "LabelColor" "White" - "BgColor" "Blank" - } + "text_xpos" "15" + "text_ypos" "2" + "digit_xpos" "12" + "digit_ypos" "12" + "digit2_xpos" "30" + "digit2_ypos" "16" + "PrimaryValueColor" "MOM.Panel.Fg" + "SecondaryValueColor" "MOM.Panel.Fg" + "LabelColor" "White" + "BgColor" "Blank" + } //The design for in-game menus CHudMenuStatic { "fieldName" "CHudMenuStatic" //You can override "MenuItemColor" etc here (I think) } - // Version warning - CHudVersionWarn - { - "fieldName" "CHudVersionWarn" - "xpos" "640" - "ypos" "460" - "visible" "1" - "enabled" "1" - "wide" "200" - "tall" "20" - "TextFont" "HudHintTextSmall" - } - CHudSyncBar - { - "fieldName" "CHudSyncBar" - "xpos" "c-60" - "ypos" "c+227" - "wide" "120" - "tall" "10" - "InitialValue" "0" - "BackgroundColor" "MOM.Panel.Bg" - "FillColor" "255 255 255 225" - "visible" "1" - "enabled" "1" - } - CHudMapFinishedDialog - { - "fieldName" "CHudMapFinishedDialog" - "xpos" "c-125" - "ypos" "c-100" - "wide" "250" - "tall" "120" - "visible" "1" - "enabled" "1" - "TextFont" "Default" - "time_xpos" "20" - "time_ypos" "5" - "strafes_xpos" "20" - "strafes_xpos" "25" - "jumps_xpos" "20" - "jumps_xpos" "45" - "sync_xpos" "20" - "sync_xpos" "65" - "sync2_xpos" "20" - "sync2_ypos" "85" - "startvel_xpos" "120" - "startvel_ypos" "5" - "endvel_xpos" "120" - "endvel_ypos" "25" - "avgvel_xpos" "120" - "avgvel_ypos" "45" - "maxvel_xpos" "120" - "maxvel_ypos" "65" - "runsave_ypos" "95" - "runupload_ypos""105" - } - CHudKeyPressDisplay - { - "fieldName" "CHudKeyPressDisplay" - "xpos" "c+265" - "ypos" "c+150" - "wide" "150" - "tall" "100" - "visible" "1" - "enabled" "1" - "top_row_ypos" "5" - "mid_row_ypos" "20" - "lower_row_ypos" "35" - "jump_row_ypos" "45" - "duck_row_ypos" "55" - "strafe_count_xpos" "100" - "jump_count_xpos" "100" - "TextFont" "MomentumIcons" - "CounterTextFont" "HudNumbersVerySmall" - "WordTextFont" "HudNumbersVerySmall" - "KeyPressedColor" "MOM.Panel.Fg" - "KeyOutlineColor" "Dark Gray" - } + // Version warning + CHudVersionWarn + { + "fieldName" "CHudVersionWarn" + "xpos" "640" + "ypos" "460" + "visible" "1" + "enabled" "1" + "wide" "200" + "tall" "20" + "TextFont" "HudHintTextSmall" + } + CHudSyncBar + { + "fieldName" "CHudSyncBar" + "xpos" "c-60" + "ypos" "c+227" + "wide" "120" + "tall" "10" + "InitialValue" "0" + "BackgroundColor" "MOM.Panel.Bg" + "FillColor" "255 255 255 225" + "visible" "1" + "enabled" "1" + } + + CHudKeyPressDisplay + { + "fieldName" "CHudKeyPressDisplay" + "xpos" "c+265" + "ypos" "c+150" + "wide" "150" + "tall" "100" + "visible" "1" + "enabled" "1" + "top_row_ypos" "5" + "mid_row_ypos" "20" + "lower_row_ypos" "35" + "jump_row_ypos" "45" + "duck_row_ypos" "55" + "strafe_count_xpos" "100" + "jump_count_xpos" "100" + "TextFont" "MomentumIcons" + "CounterTextFont" "HudNumbersVerySmall" + "WordTextFont" "HudNumbersVerySmall" + "KeyPressedColor" "MOM.Panel.Fg" + "KeyOutlineColor" "Dark Gray" + } CHudCompare { @@ -190,700 +160,700 @@ "MapInfoFont" "HudHintTextSmall"//Font for the map information } - HudHealth [$WIN32] - { - "fieldName" "HudHealth" - "xpos" "16" - "ypos" "432" - "wide" "102" - "tall" "36" - "visible" "1" - "enabled" "1" - - "PaintBackgroundType" "2" - - "text_xpos" "8" - "text_ypos" "20" - "digit_xpos" "50" - "digit_ypos" "2" - } - HudHealth [$X360] - { - "fieldName" "HudHealth" - "xpos" "48" - "ypos" "416" - "wide" "115" - "tall" "36" - "visible" "1" - "enabled" "1" - - "PaintBackgroundType" "2" - - "text_xpos" "8" - "text_ypos" "18" - "digit_xpos" "60" - "digit_ypos" "-1" - } - - HudSuit [$WIN32] - { - "fieldName" "HudSuit" - "xpos" "140" - "ypos" "432" - "wide" "108" - "tall" "36" - "visible" "1" - "enabled" "1" - - "PaintBackgroundType" "2" - - "text_xpos" "8" - "text_ypos" "20" - "digit_xpos" "50" - "digit_ypos" "2" - } - HudSuit [$X360] - { - "fieldName" "HudSuit" - "xpos" "176" - "ypos" "416" - "wide" "117" - "tall" "36" - "visible" "1" - "enabled" "1" - - "PaintBackgroundType" "2" - - "text_xpos" "8" - "text_ypos" "18" - "digit_xpos" "50" - "digit_ypos" "-1" - } - - HudAmmo [$WIN32] - { - "fieldName" "HudAmmo" - "xpos" "r150" - "ypos" "432" - "wide" "136" - "tall" "36" - "visible" "1" - "enabled" "1" - - "PaintBackgroundType" "2" - - "text_xpos" "8" - "text_ypos" "20" - "digit_xpos" "44" - "digit_ypos" "2" - "digit2_xpos" "98" - "digit2_ypos" "16" - } - HudAmmo [$X360] - { - "fieldName" "HudAmmo" - "xpos" "r208" - "ypos" "416" - "wide" "160" - "tall" "36" - "visible" "1" - "enabled" "1" - - "PaintBackgroundType" "2" - - "text_xpos" "8" - "text_ypos" "18" - "digit_xpos" "60" - "digit_ypos" "-1" - "digit2_xpos" "120" - "digit2_ypos" "14" - } - - HudAmmoSecondary [$WIN32] - { - "fieldName" "HudAmmoSecondary" - "xpos" "r76" - "ypos" "432" - "wide" "60" - "tall" "36" - "visible" "1" - "enabled" "1" - - "PaintBackgroundType" "2" - - "text_xpos" "8" - "text_ypos" "22" - "digit_xpos" "36" - "digit_ypos" "2" - } - HudAmmoSecondary [$X360] - { - "fieldName" "HudAmmoSecondary" - "xpos" "r113" - "ypos" "416" - "wide" "65" - "tall" "36" - "visible" "1" - "enabled" "1" - - "PaintBackgroundType" "2" - - "text_xpos" "8" - "text_ypos" "22" - "digit_xpos" "36" - "digit_ypos" "-1" - } - - HudSuitPower [$WIN32] - { - "fieldName" "HudSuitPower" - "visible" "1" - "enabled" "1" - "xpos" "16" - "ypos" "396" - "wide" "102" - "tall" "26" - - "AuxPowerLowColor" "255 0 0 220" - "AuxPowerHighColor" "255 220 0 220" - "AuxPowerDisabledAlpha" "70" - - "BarInsetX" "8" - "BarInsetY" "15" - "BarWidth" "92" - "BarHeight" "4" - "BarChunkWidth" "6" - "BarChunkGap" "3" - - "text_xpos" "8" - "text_ypos" "4" - "text2_xpos" "8" - "text2_ypos" "22" - "text2_gap" "10" - - "PaintBackgroundType" "2" - } - HudSuitPower [$X360] - { - "fieldName" "HudSuitPower" - "visible" "1" - "enabled" "1" - "xpos" "48" - "ypos" "370" - "wide" "102" - "tall" "26" - - "AuxPowerLowColor" "255 100 0 220" - "AuxPowerHighColor" "255 220 0 220" - "AuxPowerDisabledAlpha" "70" - - "BarInsetX" "8" - "BarInsetY" "19" - "BarWidth" "92" - "BarHeight" "5" - "BarChunkWidth" "6" - "BarChunkGap" "3" - - "text_xpos" "8" - "text_ypos" "4" - "text2_xpos" "8" - "text2_ypos" "25" - "text2_gap" "12" - - "PaintBackgroundType" "2" - } - - HudPosture [$WIN32] - { - "fieldName" "HudPosture" - "visible" "1" - "PaintBackgroundType" "2" - "xpos" "16" - "ypos" "316" - "tall" "36" - "wide" "36" - "font" "WeaponIconsSmall" - "icon_xpos" "10" - "icon_ypos" "0" - } - HudPosture [$X360] - { - "fieldName" "HudPosture" - "visible" "1" - "PaintBackgroundType" "2" - "xpos" "48" - "ypos" "316" - "tall" "36" - "wide" "36" - "font" "WeaponIconsSmall" - "icon_xpos" "10" - "icon_ypos" "2" - } - - HudFlashlight - { - "fieldName" "HudFlashlight" - "visible" "1" - "PaintBackgroundType" "2" - "xpos" "270" [$WIN32] - "ypos" "444" [$WIN32] - "xpos_hidef" "293" [$X360] // aligned to left - "xpos_lodef" "c-18" [$X360] // centered in screen - "ypos" "428" [$X360] - "tall" "24" - "wide" "36" - "font" "WeaponIconsSmall" - - "icon_xpos" "4" - "icon_ypos" "-8" - - "BarInsetX" "4" - "BarInsetY" "18" - "BarWidth" "28" - "BarHeight" "2" - "BarChunkWidth" "2" - "BarChunkGap" "1" - } - HudDamageIndicator - { - "fieldName" "HudDamageIndicator" - "visible" "1" - "enabled" "1" - "DmgColorLeft" "255 0 0 0" - "DmgColorRight" "255 0 0 0" - - "dmg_xpos" "30" - "dmg_ypos" "100" - "dmg_wide" "36" - "dmg_tall1" "240" - "dmg_tall2" "200" - } - - HudZoom - { - "fieldName" "HudZoom" - "visible" "1" - "enabled" "1" - "Circle1Radius" "66" - "Circle2Radius" "74" - "DashGap" "16" - "DashHeight" "4" [$WIN32] - "DashHeight" "6" [$X360] - "BorderThickness" "88" - } - HudWeaponSelection - { - "fieldName" "HudWeaponSelection" - "ypos" "16" [$WIN32] - "ypos" "32" [$X360] - "visible" "1" - "enabled" "1" - "SmallBoxSize" "32" - "MediumBoxWide" "95" - "MediumBoxWide_hidef" "78" - "MediumBoxTall" "50" - "MediumBoxTall_hidef" "50" - "MediumBoxWide_lodef" "74" - "MediumBoxTall_lodef" "50" - "LargeBoxWide" "112" - "LargeBoxTall" "80" - "BoxGap" "8" - "SelectionNumberXPos" "4" - "SelectionNumberYPos" "4" - "SelectionGrowTime" "0.4" - "TextYPos" "64" - } - - HudCrosshair - { - "fieldName" "HudCrosshair" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - HudDeathNotice - { - "fieldName" "HudDeathNotice" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - HudVehicle - { - "fieldName" "HudVehicle" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - ScorePanel - { - "fieldName" "ScorePanel" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - HudTrain - { - "fieldName" "HudTrain" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - HudMOTD - { - "fieldName" "HudMOTD" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - HudMessage - { - "fieldName" "HudMessage" - "visible" "1" - "enabled" "1" - "wide" "f0" - "tall" "480" - } - - HudMenu - { - "fieldName" "HudMenu" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - HudCloseCaption - { - "fieldName" "HudCloseCaption" - "visible" "1" - "enabled" "1" - "xpos" "c-250" - "ypos" "276" [$WIN32] - "ypos" "236" [$X360] - "wide" "500" - "tall" "136" [$WIN32] - "tall" "176" [$X360] - - "BgAlpha" "128" - - "GrowTime" "0.25" - "ItemHiddenTime" "0.2" // Nearly same as grow time so that the item doesn't start to show until growth is finished - "ItemFadeInTime" "0.15" // Once ItemHiddenTime is finished, takes this much longer to fade in - "ItemFadeOutTime" "0.3" - "topoffset" "0" [$WIN32] - "topoffset" "0" [$X360] - } - - HudChat - { - "fieldName" "HudChat" - "visible" "0" - "enabled" "1" - "xpos" "0" - "ypos" "0" - "wide" "4" - "tall" "4" - } - - HudHistoryResource [$WIN32] - { - "fieldName" "HudHistoryResource" - "visible" "1" - "enabled" "1" - "xpos" "r252" - "ypos" "40" - "wide" "248" - "tall" "320" - - "history_gap" "56" [!$OSX] - "history_gap" "64" [$OSX] - "icon_inset" "38" - "text_inset" "36" - "text_inset" "26" - "NumberFont" "HudNumbersSmall" - } - HudHistoryResource [$X360] - { - "fieldName" "HudHistoryResource" - "visible" "1" - "enabled" "1" - "xpos" "r300" - "ypos" "40" - "wide" "248" - "tall" "240" - - "history_gap" "50" - "icon_inset" "38" - "text_inset" "36" - "NumberFont" "HudNumbersSmall" - } - - HudGeiger - { - "fieldName" "HudGeiger" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - HUDQuickInfo - { - "fieldName" "HUDQuickInfo" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - HudWeapon - { - "fieldName" "HudWeapon" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - HudAnimationInfo - { - "fieldName" "HudAnimationInfo" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - HudPredictionDump - { - "fieldName" "HudPredictionDump" - "visible" "1" - "enabled" "1" - "wide" "640" - "tall" "480" - } - - HudHintDisplay - { - "fieldName" "HudHintDisplay" - "visible" "0" - "enabled" "1" - "xpos" "c-240" - "ypos" "c60" - "xpos" "r148" [$X360] - "ypos" "r338" [$X360] - "wide" "480" - "tall" "100" - "HintSize" "1" - "text_xpos" "8" - "text_ypos" "8" - "center_x" "0" // center text horizontally - "center_y" "-1" // align text on the bottom - "paintbackground" "0" - } - - HudHintKeyDisplay - { - "fieldName" "HudHintKeyDisplay" - "visible" "0" - "enabled" "1" - "xpos" "r120" [$WIN32] - "ypos" "r340" [$WIN32] - "xpos" "r148" [$X360] - "ypos" "r338" [$X360] - "wide" "100" - "tall" "200" - "text_xpos" "8" - "text_ypos" "8" - "text_xgap" "8" - "text_ygap" "8" - "TextColor" "255 170 0 220" - - "PaintBackgroundType" "2" - } - - - HudSquadStatus [$WIN32] - { - "fieldName" "HudSquadStatus" - "visible" "1" - "enabled" "1" - "xpos" "r120" - "ypos" "380" - "wide" "104" - "tall" "46" - "text_xpos" "8" - "text_ypos" "34" - "SquadIconColor" "255 220 0 160" - "IconInsetX" "8" - "IconInsetY" "0" - "IconGap" "24" - - "PaintBackgroundType" "2" - } - HudSquadStatus [$X360] - { - "fieldName" "HudSquadStatus" - "visible" "1" - "enabled" "1" - "xpos" "r182" - "ypos" "348" - "wide" "134" - "tall" "62" - "text_xpos" "8" - "text_ypos" "44" - "SquadIconColor" "255 220 0 160" - "IconInsetX" "8" - "IconInsetY" "-4" - "IconGap" "24" - "IconFont" "SquadIcon" - - "PaintBackgroundType" "2" - } - - HudPoisonDamageIndicator [$WIN32] - { - "fieldName" "HudPoisonDamageIndicator" - "visible" "0" - "enabled" "1" - "xpos" "16" - "ypos" "346" - "wide" "136" - "tall" "38" - "text_xpos" "8" - "text_ypos" "8" - "text_ygap" "14" - "TextColor" "255 170 0 220" - "PaintBackgroundType" "2" - } - HudPoisonDamageIndicator [$X360] - { - "fieldName" "HudPoisonDamageIndicator" - "visible" "0" - "enabled" "1" - "xpos" "48" - "ypos" "264" - "wide" "192" - "tall" "46" - "text_xpos" "8" - "text_ypos" "6" - "text_ygap" "16" - "TextColor" "255 170 0 220" - "PaintBackgroundType" "2" - } - - HudCredits - { - "fieldName" "HudCredits" - "TextFont" "Default" - "visible" "1" - "xpos" "0" - "ypos" "0" - "wide" "640" - "tall" "480" - "TextColor" "255 255 255 192" - - } - - HUDAutoAim - { - "fieldName" "HUDAutoAim" - "visible" "1" - "enabled" "1" - "wide" "640" [$WIN32] - "tall" "480" [$WIN32] - "wide" "960" [$X360] - "tall" "720" [$X360] - } - - HudCommentary - { - "fieldName" "HudCommentary" - "xpos" "c-190" - "ypos" "350" - "wide" "380" - "tall" "40" - "visible" "1" - "enabled" "1" - - "PaintBackgroundType" "2" - - "bar_xpos" "50" - "bar_ypos" "20" - "bar_height" "8" - "bar_width" "320" - "speaker_xpos" "50" - "speaker_ypos" "8" - "count_xpos_from_right" "10" // Counts from the right side - "count_ypos" "8" - - "icon_texture" "vgui/hud/icon_commentary" - "icon_xpos" "0" - "icon_ypos" "0" - "icon_width" "40" - "icon_height" "40" - } - - HudHDRDemo - { - "fieldName" "HudHDRDemo" - "xpos" "0" - "ypos" "0" - "wide" "640" - "tall" "480" - "visible" "1" - "enabled" "1" - - "Alpha" "255" - "PaintBackgroundType" "2" - - "BorderColor" "0 0 0 255" - "BorderLeft" "16" - "BorderRight" "16" - "BorderTop" "16" - "BorderBottom" "64" - "BorderCenter" "0" - - "TextColor" "255 255 255 255" - "LeftTitleY" "422" - "RightTitleY" "422" - } - - AchievementNotificationPanel - { - "fieldName" "AchievementNotificationPanel" - "visible" "1" - "enabled" "1" - "xpos" "0" - "ypos" "180" - "wide" "f10" [$WIN32] - "wide" "f60" [$X360] - "tall" "100" - } - - CHudVote - { - "fieldName" "CHudVote" - "xpos" "0" - "ypos" "0" - "wide" "640" - "tall" "480" - "visible" "1" - "enabled" "1" - "bgcolor_override" "0 0 0 0" - "PaintBackgroundType" "0" // rounded corners - } + HudHealth [$WIN32] + { + "fieldName" "HudHealth" + "xpos" "16" + "ypos" "432" + "wide" "102" + "tall" "36" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "text_xpos" "8" + "text_ypos" "20" + "digit_xpos" "50" + "digit_ypos" "2" + } + HudHealth [$X360] + { + "fieldName" "HudHealth" + "xpos" "48" + "ypos" "416" + "wide" "115" + "tall" "36" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "text_xpos" "8" + "text_ypos" "18" + "digit_xpos" "60" + "digit_ypos" "-1" + } + + HudSuit [$WIN32] + { + "fieldName" "HudSuit" + "xpos" "140" + "ypos" "432" + "wide" "108" + "tall" "36" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "text_xpos" "8" + "text_ypos" "20" + "digit_xpos" "50" + "digit_ypos" "2" + } + HudSuit [$X360] + { + "fieldName" "HudSuit" + "xpos" "176" + "ypos" "416" + "wide" "117" + "tall" "36" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "text_xpos" "8" + "text_ypos" "18" + "digit_xpos" "50" + "digit_ypos" "-1" + } + + HudAmmo [$WIN32] + { + "fieldName" "HudAmmo" + "xpos" "r150" + "ypos" "432" + "wide" "136" + "tall" "36" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "text_xpos" "8" + "text_ypos" "20" + "digit_xpos" "44" + "digit_ypos" "2" + "digit2_xpos" "98" + "digit2_ypos" "16" + } + HudAmmo [$X360] + { + "fieldName" "HudAmmo" + "xpos" "r208" + "ypos" "416" + "wide" "160" + "tall" "36" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "text_xpos" "8" + "text_ypos" "18" + "digit_xpos" "60" + "digit_ypos" "-1" + "digit2_xpos" "120" + "digit2_ypos" "14" + } + + HudAmmoSecondary [$WIN32] + { + "fieldName" "HudAmmoSecondary" + "xpos" "r76" + "ypos" "432" + "wide" "60" + "tall" "36" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "text_xpos" "8" + "text_ypos" "22" + "digit_xpos" "36" + "digit_ypos" "2" + } + HudAmmoSecondary [$X360] + { + "fieldName" "HudAmmoSecondary" + "xpos" "r113" + "ypos" "416" + "wide" "65" + "tall" "36" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "text_xpos" "8" + "text_ypos" "22" + "digit_xpos" "36" + "digit_ypos" "-1" + } + + HudSuitPower [$WIN32] + { + "fieldName" "HudSuitPower" + "visible" "1" + "enabled" "1" + "xpos" "16" + "ypos" "396" + "wide" "102" + "tall" "26" + + "AuxPowerLowColor" "255 0 0 220" + "AuxPowerHighColor" "255 220 0 220" + "AuxPowerDisabledAlpha" "70" + + "BarInsetX" "8" + "BarInsetY" "15" + "BarWidth" "92" + "BarHeight" "4" + "BarChunkWidth" "6" + "BarChunkGap" "3" + + "text_xpos" "8" + "text_ypos" "4" + "text2_xpos" "8" + "text2_ypos" "22" + "text2_gap" "10" + + "PaintBackgroundType" "2" + } + HudSuitPower [$X360] + { + "fieldName" "HudSuitPower" + "visible" "1" + "enabled" "1" + "xpos" "48" + "ypos" "370" + "wide" "102" + "tall" "26" + + "AuxPowerLowColor" "255 100 0 220" + "AuxPowerHighColor" "255 220 0 220" + "AuxPowerDisabledAlpha" "70" + + "BarInsetX" "8" + "BarInsetY" "19" + "BarWidth" "92" + "BarHeight" "5" + "BarChunkWidth" "6" + "BarChunkGap" "3" + + "text_xpos" "8" + "text_ypos" "4" + "text2_xpos" "8" + "text2_ypos" "25" + "text2_gap" "12" + + "PaintBackgroundType" "2" + } + + HudPosture [$WIN32] + { + "fieldName" "HudPosture" + "visible" "1" + "PaintBackgroundType" "2" + "xpos" "16" + "ypos" "316" + "tall" "36" + "wide" "36" + "font" "WeaponIconsSmall" + "icon_xpos" "10" + "icon_ypos" "0" + } + HudPosture [$X360] + { + "fieldName" "HudPosture" + "visible" "1" + "PaintBackgroundType" "2" + "xpos" "48" + "ypos" "316" + "tall" "36" + "wide" "36" + "font" "WeaponIconsSmall" + "icon_xpos" "10" + "icon_ypos" "2" + } + + HudFlashlight + { + "fieldName" "HudFlashlight" + "visible" "1" + "PaintBackgroundType" "2" + "xpos" "270" [$WIN32] + "ypos" "444" [$WIN32] + "xpos_hidef" "293" [$X360] // aligned to left + "xpos_lodef" "c-18" [$X360] // centered in screen + "ypos" "428" [$X360] + "tall" "24" + "wide" "36" + "font" "WeaponIconsSmall" + + "icon_xpos" "4" + "icon_ypos" "-8" + + "BarInsetX" "4" + "BarInsetY" "18" + "BarWidth" "28" + "BarHeight" "2" + "BarChunkWidth" "2" + "BarChunkGap" "1" + } + HudDamageIndicator + { + "fieldName" "HudDamageIndicator" + "visible" "1" + "enabled" "1" + "DmgColorLeft" "255 0 0 0" + "DmgColorRight" "255 0 0 0" + + "dmg_xpos" "30" + "dmg_ypos" "100" + "dmg_wide" "36" + "dmg_tall1" "240" + "dmg_tall2" "200" + } + + HudZoom + { + "fieldName" "HudZoom" + "visible" "1" + "enabled" "1" + "Circle1Radius" "66" + "Circle2Radius" "74" + "DashGap" "16" + "DashHeight" "4" [$WIN32] + "DashHeight" "6" [$X360] + "BorderThickness" "88" + } + HudWeaponSelection + { + "fieldName" "HudWeaponSelection" + "ypos" "16" [$WIN32] + "ypos" "32" [$X360] + "visible" "1" + "enabled" "1" + "SmallBoxSize" "32" + "MediumBoxWide" "95" + "MediumBoxWide_hidef" "78" + "MediumBoxTall" "50" + "MediumBoxTall_hidef" "50" + "MediumBoxWide_lodef" "74" + "MediumBoxTall_lodef" "50" + "LargeBoxWide" "112" + "LargeBoxTall" "80" + "BoxGap" "8" + "SelectionNumberXPos" "4" + "SelectionNumberYPos" "4" + "SelectionGrowTime" "0.4" + "TextYPos" "64" + } + + HudCrosshair + { + "fieldName" "HudCrosshair" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudDeathNotice + { + "fieldName" "HudDeathNotice" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudVehicle + { + "fieldName" "HudVehicle" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + ScorePanel + { + "fieldName" "ScorePanel" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudTrain + { + "fieldName" "HudTrain" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudMOTD + { + "fieldName" "HudMOTD" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudMessage + { + "fieldName" "HudMessage" + "visible" "1" + "enabled" "1" + "wide" "f0" + "tall" "480" + } + + HudMenu + { + "fieldName" "HudMenu" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudCloseCaption + { + "fieldName" "HudCloseCaption" + "visible" "1" + "enabled" "1" + "xpos" "c-250" + "ypos" "276" [$WIN32] + "ypos" "236" [$X360] + "wide" "500" + "tall" "136" [$WIN32] + "tall" "176" [$X360] + + "BgAlpha" "128" + + "GrowTime" "0.25" + "ItemHiddenTime" "0.2" // Nearly same as grow time so that the item doesn't start to show until growth is finished + "ItemFadeInTime" "0.15" // Once ItemHiddenTime is finished, takes this much longer to fade in + "ItemFadeOutTime" "0.3" + "topoffset" "0" [$WIN32] + "topoffset" "0" [$X360] + } + + HudChat + { + "fieldName" "HudChat" + "visible" "0" + "enabled" "1" + "xpos" "0" + "ypos" "0" + "wide" "4" + "tall" "4" + } + + HudHistoryResource [$WIN32] + { + "fieldName" "HudHistoryResource" + "visible" "1" + "enabled" "1" + "xpos" "r252" + "ypos" "40" + "wide" "248" + "tall" "320" + + "history_gap" "56" [!$OSX] + "history_gap" "64" [$OSX] + "icon_inset" "38" + "text_inset" "36" + "text_inset" "26" + "NumberFont" "HudNumbersSmall" + } + HudHistoryResource [$X360] + { + "fieldName" "HudHistoryResource" + "visible" "1" + "enabled" "1" + "xpos" "r300" + "ypos" "40" + "wide" "248" + "tall" "240" + + "history_gap" "50" + "icon_inset" "38" + "text_inset" "36" + "NumberFont" "HudNumbersSmall" + } + + HudGeiger + { + "fieldName" "HudGeiger" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HUDQuickInfo + { + "fieldName" "HUDQuickInfo" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudWeapon + { + "fieldName" "HudWeapon" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + HudAnimationInfo + { + "fieldName" "HudAnimationInfo" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudPredictionDump + { + "fieldName" "HudPredictionDump" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + HudHintDisplay + { + "fieldName" "HudHintDisplay" + "visible" "0" + "enabled" "1" + "xpos" "c-240" + "ypos" "c60" + "xpos" "r148" [$X360] + "ypos" "r338" [$X360] + "wide" "480" + "tall" "100" + "HintSize" "1" + "text_xpos" "8" + "text_ypos" "8" + "center_x" "0" // center text horizontally + "center_y" "-1" // align text on the bottom + "paintbackground" "0" + } + + HudHintKeyDisplay + { + "fieldName" "HudHintKeyDisplay" + "visible" "0" + "enabled" "1" + "xpos" "r120" [$WIN32] + "ypos" "r340" [$WIN32] + "xpos" "r148" [$X360] + "ypos" "r338" [$X360] + "wide" "100" + "tall" "200" + "text_xpos" "8" + "text_ypos" "8" + "text_xgap" "8" + "text_ygap" "8" + "TextColor" "255 170 0 220" + + "PaintBackgroundType" "2" + } + + + HudSquadStatus [$WIN32] + { + "fieldName" "HudSquadStatus" + "visible" "1" + "enabled" "1" + "xpos" "r120" + "ypos" "380" + "wide" "104" + "tall" "46" + "text_xpos" "8" + "text_ypos" "34" + "SquadIconColor" "255 220 0 160" + "IconInsetX" "8" + "IconInsetY" "0" + "IconGap" "24" + + "PaintBackgroundType" "2" + } + HudSquadStatus [$X360] + { + "fieldName" "HudSquadStatus" + "visible" "1" + "enabled" "1" + "xpos" "r182" + "ypos" "348" + "wide" "134" + "tall" "62" + "text_xpos" "8" + "text_ypos" "44" + "SquadIconColor" "255 220 0 160" + "IconInsetX" "8" + "IconInsetY" "-4" + "IconGap" "24" + "IconFont" "SquadIcon" + + "PaintBackgroundType" "2" + } + + HudPoisonDamageIndicator [$WIN32] + { + "fieldName" "HudPoisonDamageIndicator" + "visible" "0" + "enabled" "1" + "xpos" "16" + "ypos" "346" + "wide" "136" + "tall" "38" + "text_xpos" "8" + "text_ypos" "8" + "text_ygap" "14" + "TextColor" "255 170 0 220" + "PaintBackgroundType" "2" + } + HudPoisonDamageIndicator [$X360] + { + "fieldName" "HudPoisonDamageIndicator" + "visible" "0" + "enabled" "1" + "xpos" "48" + "ypos" "264" + "wide" "192" + "tall" "46" + "text_xpos" "8" + "text_ypos" "6" + "text_ygap" "16" + "TextColor" "255 170 0 220" + "PaintBackgroundType" "2" + } + + HudCredits + { + "fieldName" "HudCredits" + "TextFont" "Default" + "visible" "1" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "TextColor" "255 255 255 192" + + } + + HUDAutoAim + { + "fieldName" "HUDAutoAim" + "visible" "1" + "enabled" "1" + "wide" "640" [$WIN32] + "tall" "480" [$WIN32] + "wide" "960" [$X360] + "tall" "720" [$X360] + } + + HudCommentary + { + "fieldName" "HudCommentary" + "xpos" "c-190" + "ypos" "350" + "wide" "380" + "tall" "40" + "visible" "1" + "enabled" "1" + + "PaintBackgroundType" "2" + + "bar_xpos" "50" + "bar_ypos" "20" + "bar_height" "8" + "bar_width" "320" + "speaker_xpos" "50" + "speaker_ypos" "8" + "count_xpos_from_right" "10" // Counts from the right side + "count_ypos" "8" + + "icon_texture" "vgui/hud/icon_commentary" + "icon_xpos" "0" + "icon_ypos" "0" + "icon_width" "40" + "icon_height" "40" + } + + HudHDRDemo + { + "fieldName" "HudHDRDemo" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "visible" "1" + "enabled" "1" + + "Alpha" "255" + "PaintBackgroundType" "2" + + "BorderColor" "0 0 0 255" + "BorderLeft" "16" + "BorderRight" "16" + "BorderTop" "16" + "BorderBottom" "64" + "BorderCenter" "0" + + "TextColor" "255 255 255 255" + "LeftTitleY" "422" + "RightTitleY" "422" + } + + AchievementNotificationPanel + { + "fieldName" "AchievementNotificationPanel" + "visible" "1" + "enabled" "1" + "xpos" "0" + "ypos" "180" + "wide" "f10" [$WIN32] + "wide" "f60" [$X360] + "tall" "100" + } + + CHudVote + { + "fieldName" "CHudVote" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "visible" "1" + "enabled" "1" + "bgcolor_override" "0 0 0 0" + "PaintBackgroundType" "0" // rounded corners + } } \ No newline at end of file diff --git a/mp/game/momentum/scripts/propdata.txt b/mp/game/momentum/scripts/propdata.txt index 48c7f584f1..369bdea023 100644 --- a/mp/game/momentum/scripts/propdata.txt +++ b/mp/game/momentum/scripts/propdata.txt @@ -54,6 +54,13 @@ "health" "10" } + // Cardboard trash from props_junk still uses this. + "Cardboard.physics" + { + "base" "Cardboard.Base" + "health" "15" + } + // Cardboard / Paper blocks, less than 3 foot cubed. // i.e. cardboard boxes. thick books "Cardboard.Medium" @@ -68,6 +75,31 @@ { "base" "Cardboard.Base" "health" "40" + "physicsmode" "1" + } + + // Cardboard Boxes full of paper + // i.e. fileboxes, boxes of paper + "Cardboard.break" + { + "base" "Cardboard.Base" + "health" "10" + "physicsmode" "1" + } + // Cardboard / Paper blocks, less than 1 foot cubed. + // i.e. small cardboard boxes, notepads, newspapers, thin books. + "Cardboard.Indestructable" + { + "base" "Cardboard.Base" + } + + // Cardboard Boxes full of paper + // i.e. fileboxes, boxes of paper + "Cardboard.breakclient" + { + "base" "Cardboard.Base" + "health" "10" + "physicsmode" "3" } //================================================================================= @@ -104,9 +136,32 @@ { "base" "Cloth.Base" "health" "100" + "physicsmode" "1" } + // Misc cloth objects + // i.e. stuffed animals, hats, etc. + "Cloth.Object" + { + "base" "Cloth.Base" + "physicsmode" "3" + } + +//================================================================================= +// DOORS +//================================================================================= + // Base damage modifiers for doors + // All doors have the same propdata - metal/wood/etc is handled in the door QC! + "Door.Standard" + { + "dmg.bullets" "1.0" + "dmg.club" "1.25" + "dmg.explosive" "1.5" + "health" "1000" + } + + //================================================================================= // WOOD //================================================================================= @@ -128,8 +183,10 @@ { "base" "Wooden.Base" "health" "6" + "physicsmode" "3" "breakable_count" "0" + } // Wooden blocks, less than 1 foot cubed. @@ -138,31 +195,49 @@ { "base" "Wooden.Base" "health" "20" - + "breakable_count" "2" } + // Wooden chairs from c17 still use this entity + "Wooden.chair" + { + "base" "Wooden.Base" + "health" "25" + + "breakable_count" "4" + } + // Wooden blocks, less than 3 foot cubed. // i.e boards, small crates, pallettes, ladders, chairs. "Wooden.Medium" { "base" "Wooden.Base" "health" "30" - + "breakable_count" "4" } + + // Wooden blocks, less than 3 foot cubed. + // Client side, No break + "Wooden.MediumNobreak" + { + "base" "Wooden.Base" + "physicsmode" "3" + } + // Large wooden blocks, less than 5 foot cubed. // i.e Crates, benches. "Wooden.Large" { "base" "Wooden.Base" "health" "50" - + "physicsmode" "1" "breakable_count" "6" } - - // Extra large wooden objects + + // Extra large wooden objects // i.e posts "Wooden.ExtraLarge" { @@ -178,11 +253,54 @@ { "base" "Wooden.Base" "health" "130" + "physicsmode" "1" "breakable_count" "10" } + // small wooden objects + // i.e sticks + "Wooden.sticks" + { + "base" "Wooden.Base" + "physicsmode" "1" + "breakable_count" "0" + + } + // Breakable Barrels + // i.e Wine Barrel in de_Inferno + "Wooden.Barrel" + { + "base" "Wooden.Base" + "health" "50" + "physicsmode" "1" + + "breakable_count" "0" + + } + + // Wooden blocks, less than 1 foot cubed. + // i.e pieces of board, branches. (Server side version) + "Wooden.Small2" + { + "base" "Wooden.Base" + "health" "1" + "physicsmode" "1" + "breakable_count" "2" + } + + // Breakable Barrels + // i.e Wine Barrel in de_Inferno + "Wooden.Barrel2" + { + "base" "Wooden.Base" + "health" "201" + "physicsmode" "1" + + "breakable_count" "0" + + } //================================================================================= @@ -203,6 +321,7 @@ { "base" "Stone.Base" "health" "50" + "physicsmode" "3" } // Medium stone blocks, less than 3 foot cubed @@ -219,6 +338,7 @@ { "base" "Stone.Base" "health" "200" + "physicsmode" "1" } // Huge stone blocks, less than 5 foot cubed @@ -227,6 +347,16 @@ { "base" "Stone.Base" "health" "400" + "physicsmode" "1" + } + + // Gigantic stone blocks, more than 5 foot cubed + // i.e. only damaged by the bomb + "Stone.Gigantic" + { + "base" "Stone.Base" + "health" "600" + "physicsmode" "1" } //================================================================================= @@ -247,6 +377,7 @@ { "base" "Glass.Base" "health" "5" + "physicsmode" "3" "damage_table" "glass" } @@ -255,7 +386,39 @@ "base" "Glass.Base" "dmg.explosive" "1.0" // Override base glass explosive behavior "dmg.bullets" "0.5" - "health" "15" + "health" "1" + "physicsmode" "1" + "damage_table" "glass" + } + + "Glass.CSWindow" + { + "base" "Glass.Window" + "health" "1" // Shatter immediately, even from grenades. + + } + + "Glass.picture" + { + "base" "Glass.Base" + "physicsmode" "1" + } + "Glass.CSWindow2" + { + "base" "Glass.Window" + "health" "1" // Shatter immediately, even from grenades. + "physicsmode" "1" + + } + + + "Glass.WindowStrong" + { + "base" "Glass.Base" + "dmg.explosive" "1.0" // Override base glass explosive behavior + "dmg.bullets" "0.5" + "health" "100" + "physicsmode" "3" "damage_table" "glass" } @@ -286,6 +449,7 @@ "Metal.Medium" { "base" "Metal.Base" + "physicsmode" "1" } // Large metal objects. @@ -293,6 +457,31 @@ "Metal.Large" { "base" "Metal.Base" + "physicsmode" "1" + } + + // Breakable Medium Metal objects + "Metal.break" + { + "base" "Metal.Base" + "physicsmode" "1" + "health" "10" + } + + // Breakable Medium Metal objects + "Metal.break2" + { + "base" "Metal.Base" + "physicsmode" "1" + "health" "100" + } + + // Medium metal objects (Client Side). + // i.e. wheelbarrows, metal boxes, bicycles, barrels, ladders, filing cabinets. + "Metal.MediumClient" + { + "base" "Metal.Base" + "physicsmode" "3" } @@ -330,6 +519,46 @@ "Plastic.Large" { "base" "Plastic.Base" + "physicsmode" "1" + } + + + // Breakable medium plastic objects + "Plastic.break" + { + "base" "Plastic.Base" + "physicsmode" "1" + "health" "10" + } + + // Breakable small plastic objects + "PlasticSmall.break" + { + "base" "Plastic.Base" + "physicsmode" "3" + "health" "10" + } + + "PlasticSmall.NoBreak" + { + "base" "Plastic.Base" + "physicsmode" "3" + } + + + // Breakable small plastic objects + "Plastic.Small2" + { + "base" "Plastic.Base" + "physicsmode" "1" + } + + // Plastic blocks, less than 2 foot cubed + // i.e. plastic cups, plastic milk crates, phones + "Plastic.SmallClient" + { + "base" "Plastic.Base" + "physicsmode" "3" } @@ -367,6 +596,7 @@ "Item.Large" { "base" "Item.Base" + "physicsmode" "1" } @@ -405,6 +635,7 @@ { "base" "Pottery.Base" "health" "70" + "physicsmode" "1" } // Huge pottery objects. @@ -413,6 +644,38 @@ { "base" "Pottery.Base" "health" "100" + "physicsmode" "1" + } + + // Breakable small pottery + "Pottery.break" + { + "base" "Pottery.Base" + "physicsmode" "3" + "health" "20" + } + + // small potted plants + "Pottery.Plant" + { + "base" "Pottery.Base" + "physicsmode" "3" + } + + // Breakable small pottery (Server Side) + "Pottery.break2" + { + "base" "Pottery.Base" + "physicsmode" "1" + "health" "20" + } + + // small potted plants (Breakable) + "Pottery.PlantBreak" + { + "base" "Pottery.Base" + "physicsmode" "3" + "health" "20" } diff --git a/mp/src/creategameprojects.ps1 b/mp/src/creategameprojects.ps1 index 9b73bcc202..81c2ce3337 100644 --- a/mp/src/creategameprojects.ps1 +++ b/mp/src/creategameprojects.ps1 @@ -9,16 +9,24 @@ $path = (Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentV if (!$path) { - Write-Warning "You should install Source SDK Base 2013 Multiplayer.`nRequesting Steam to install the app..." - try { - $cmd ="cmd.exe" - &$cmd "/c start steam://install/243750/" + $path2 = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 243750" -Name InstallLocation).InstallLocation + if (!$path2) + { + Write-Warning "You should install Source SDK Base 2013 Multiplayer.`nRequesting Steam to install the app..." + try { + $cmd ="cmd.exe" + &$cmd "/c start steam://install/243750/" + } + catch { + Write-Warning "Steam is not running. Can not launch installation pop-up" + } + pause + exit } - catch { - Write-Warning "Steam is not running. Can not launch installation pop-up" + else + { + ($path = $path2) } - pause - exit } $hl2exe = Join-Path $path hl2.exe diff --git a/mp/src/game/client/client_momentum.vpc b/mp/src/game/client/client_momentum.vpc index 2c8c2492da..f79d1bd03c 100644 --- a/mp/src/game/client/client_momentum.vpc +++ b/mp/src/game/client/client_momentum.vpc @@ -1,45 +1,45 @@ //----------------------------------------------------------------------------- -// CLIENT_MOMENTUM.VPC +// CLIENT_MOMENTUM.VPC // -// Project Script +// Project Script //----------------------------------------------------------------------------- -$Macro SRCDIR "..\.." -$Macro GAMENAME "momentum" +$Macro SRCDIR "..\.." +$Macro GAMENAME "momentum" $Include "$SRCDIR\game\client\client_base.vpc" $Configuration { - $Compiler - { - $AdditionalIncludeDirectories "$BASE;momentum\ui\MapSelection,.\momentum\ui,.\momentum;$SRCDIR\game\shared\momentum;$SRCDIR\thirdparty\gason\src" - $PreprocessorDefinitions "$BASE;SOURCE_2013" - } + $Compiler + { + $AdditionalIncludeDirectories "$BASE;momentum\ui\MapSelection,.\momentum\ui,.\momentum;$SRCDIR\game\shared\momentum;$SRCDIR\thirdparty\gason\src" + $PreprocessorDefinitions "$BASE;SOURCE_2013" + } } $Project "Client (Momentum)" { - $Folder "Source Files" - { - $File "c_team_objectiveresource.cpp" - $File "c_team_objectiveresource.h" + $Folder "Source Files" + { + $File "c_team_objectiveresource.cpp" + $File "c_team_objectiveresource.h" - $Folder "Momentum" - { - $Folder "UI" - { + $Folder "Momentum" + { + $Folder "UI" + { $Folder "MapSelection" { $Folder "Headers" { $File "momentum\ui\MapSelection\BaseMapsPage.h" $File "momentum\ui\MapSelection\IMapList.h" - $File "momentum\ui\MapSelection\IMapSelector.h" + $File "momentum\ui\MapSelection\IMapSelector.h" $File "momentum\ui\MapSelection\LocalMaps.h" $File "momentum\ui\MapSelection\MapContextMenu.h" $File "momentum\ui\MapSelection\MapInfoDialog.h" - $File "momentum\ui\MapSelection\MapSelector.h" + $File "momentum\ui\MapSelection\MapSelector.h" $File "momentum\ui\MapSelection\MapSelectorDialog.h" $File "momentum\ui\MapSelection\OnlineMaps.h" $File "momentum\ui\MapSelection\pch_mapselection.h" @@ -48,128 +48,142 @@ $Project "Client (Momentum)" "momentum\ui\MapSelection\LocalMaps.cpp" \ "momentum\ui\MapSelection\MapContextMenu.cpp" \ "momentum\ui\MapSelection\MapInfoDialog.cpp" \ - "momentum\ui\MapSelection\MapSelector.cpp" \ + "momentum\ui\MapSelection\MapSelector.cpp" \ "momentum\ui\MapSelection\MapSelectorDialog.cpp" \ "momentum\ui\MapSelection\OnlineMaps.cpp" { - $Configuration - { - $Compiler - { - $Create/UsePrecompiledHeader "Not Using Precompiled Headers" - } - } - } + $Configuration + { + $Compiler + { + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + } + } + } } $File "momentum\ui\MomentumSettingsDialog.cpp" $File "momentum\ui\IMomentumSettingsPanel.h" - $File "momentum\ui\hud_speedometer.cpp" - $File "momentum\ui\hud_strafesync.cpp" - $File "momentum\ui\hud_timer.cpp" - $File "momentum\ui\hud_cp_menu.cpp" - $File "momentum\ui\hud_menu_static.h" - $File "momentum\ui\hud_menu_static.cpp" - $File "momentum\ui\hud_fillablebar.h" + $File "momentum\ui\hud_speedometer.cpp" + $File "momentum\ui\hud_strafesync.cpp" + $File "momentum\ui\hud_timer.cpp" + $File "momentum\ui\hud_cp_menu.cpp" + $File "momentum\ui\hud_menu_static.h" + $File "momentum\ui\hud_menu_static.cpp" + $File "momentum\ui\hud_fillablebar.h" $File "momentum\ui\ClientTimesDisplay.h" $File "momentum\ui\ClientTimesDisplay.cpp" - $File "momentum\ui\IVersionWarnPanel.h" - $File "momentum\ui\VersionWarnPanel.cpp" - $File "momentum\ui\hud_versionwarn.cpp" - $File "momentum\ui\hud_mapfinished.cpp" - $File "momentum\ui\hud_keypress.cpp" - $File "hl2\hud_credits.cpp" - $File "hl2\hud_weaponselection.cpp" - $File "hud_chat.cpp" + $File "momentum\ui\IVersionWarnPanel.h" + $File "momentum\ui\VersionWarnPanel.cpp" + $File "momentum\ui\hud_versionwarn.cpp" + $File "momentum\ui\hud_mapfinished.cpp" + $File "momentum\ui\hud_mapfinished.h" + $File "momentum\ui\hud_keypress.cpp" + $File "hl2\hud_credits.cpp" + $File "hl2\hud_weaponselection.cpp" + $File "hud_chat.cpp" $File "momentum\ui\hud_comparisons.cpp" - $File "momentum\ui\hud_comparisons.h" + $File "momentum\ui\hud_comparisons.h" $File "momentum\ui\hud_mapinfo.cpp" - } + $File "momentum\ui\momSpectatorGUI.cpp" + $File "momentum\ui\momSpectatorGUI.h" + } - $File "momentum\client_events.h" + $File "momentum\client_events.h" - $File "momentum\client_events.cpp" - { - $Configuration - { - $Compiler - { - $Create/UsePrecompiledHeader "Not Using Precompiled Headers" - } - } - } + $File "momentum\client_events.cpp" + { + $Configuration + { + $Compiler + { + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + } + } + } - $Folder "Weapons" - { - $File "$SRCDIR\game\shared\momentum\weapon_momentum_gun.cpp" - $File "$SRCDIR\game\shared\momentum\basecsgrenade_projectile.cpp" - $File "$SRCDIR\game\shared\momentum\basecsgrenade_projectile.h" - $File "$SRCDIR\game\shared\momentum\cs_ammodef.cpp" - $File "$SRCDIR\game\shared\momentum\cs_ammodef.h" - $File "$SRCDIR\game\shared\momentum\cs_playeranimstate.cpp" - $File "$SRCDIR\game\shared\momentum\cs_playeranimstate.h" - $File "$SRCDIR\game\shared\momentum\cs_weapon_parse.cpp" - $File "$SRCDIR\game\shared\momentum\cs_weapon_parse.h" - $File "$SRCDIR\game\shared\momentum\weapon_csbase.h" - $File "$SRCDIR\game\shared\momentum\weapon_csbase.cpp" - $File "$SRCDIR\game\shared\momentum\weapon_csbasegun.cpp" - $File "$SRCDIR\game\shared\momentum\weapon_csbasegun.h" - $File "$SRCDIR\game\shared\momentum\weapon_cs_heavy.cpp" - $File "$SRCDIR\game\shared\momentum\weapon_cs_pistols.cpp" + $Folder "Weapons" + { + $File "$SRCDIR\game\shared\momentum\weapon_momentum_gun.cpp" + $File "$SRCDIR\game\shared\momentum\basecsgrenade_projectile.cpp" + $File "$SRCDIR\game\shared\momentum\basecsgrenade_projectile.h" + $File "$SRCDIR\game\shared\momentum\cs_ammodef.cpp" + $File "$SRCDIR\game\shared\momentum\cs_ammodef.h" + $File "$SRCDIR\game\shared\momentum\cs_playeranimstate.cpp" + $File "$SRCDIR\game\shared\momentum\cs_playeranimstate.h" + $File "$SRCDIR\game\shared\momentum\cs_weapon_parse.cpp" + $File "$SRCDIR\game\shared\momentum\cs_weapon_parse.h" + $File "$SRCDIR\game\shared\momentum\weapon_csbase.h" + $File "$SRCDIR\game\shared\momentum\weapon_csbase.cpp" + $File "$SRCDIR\game\shared\momentum\weapon_csbasegun.cpp" + $File "$SRCDIR\game\shared\momentum\weapon_csbasegun.h" + $File "$SRCDIR\game\shared\momentum\weapon_cs_heavy.cpp" + $File "$SRCDIR\game\shared\momentum\weapon_cs_pistols.cpp" $File "$SRCDIR\game\shared\momentum\weapon_cs_rifles.cpp" - $File "$SRCDIR\game\shared\momentum\weapon_cs_smgs.cpp" - $File "$SRCDIR\game\shared\momentum\weapon_basecsgrenade.cpp" - $File "$SRCDIR\game\shared\momentum\weapon_basecsgrenade.h" - $File "$SRCDIR\game\shared\momentum\weapon_flashbang.h" - $File "$SRCDIR\game\shared\momentum\weapon_flashbang.cpp" - $File "$SRCDIR\game\shared\momentum\weapon_hegrenade.cpp" - $File "$SRCDIR\game\shared\momentum\weapon_hegrenade.h" - $File "$SRCDIR\game\shared\momentum\weapon_knife.cpp" - $File "$SRCDIR\game\shared\momentum\weapon_knife.h" - $File "$SRCDIR\game\shared\momentum\weapon_smokegrenade.h" - $File "$SRCDIR\game\shared\momentum\weapon_smokegrenade.cpp" - } + $File "$SRCDIR\game\shared\momentum\weapon_cs_smgs.cpp" + $File "$SRCDIR\game\shared\momentum\weapon_basecsgrenade.cpp" + $File "$SRCDIR\game\shared\momentum\weapon_basecsgrenade.h" + $File "$SRCDIR\game\shared\momentum\weapon_flashbang.h" + $File "$SRCDIR\game\shared\momentum\weapon_flashbang.cpp" + $File "$SRCDIR\game\shared\momentum\weapon_hegrenade.cpp" + $File "$SRCDIR\game\shared\momentum\weapon_hegrenade.h" + $File "$SRCDIR\game\shared\momentum\weapon_knife.cpp" + $File "$SRCDIR\game\shared\momentum\weapon_knife.h" + $File "$SRCDIR\game\shared\momentum\weapon_smokegrenade.h" + $File "$SRCDIR\game\shared\momentum\weapon_smokegrenade.cpp" + } - $Folder "Util" - { - $File "$SRCDIR\game\shared\momentum\util\mom_util.cpp" - $File "$SRCDIR\game\shared\momentum\util\mom_util.h" + $Folder "Util" + { + $File "$SRCDIR\game\shared\momentum\util\mom_util.cpp" + $File "$SRCDIR\game\shared\momentum\util\mom_util.h" + $File "$SRCDIR\game\shared\momentum\util\binary_reader.cpp" + $File "$SRCDIR\game\shared\momentum\util\binary_reader.h" + $File "$SRCDIR\game\shared\momentum\util\binary_writer.cpp" + $File "$SRCDIR\game\shared\momentum\util\binary_writer.h" + $File "$SRCDIR\game\shared\momentum\util\serialization.h" + $File "$SRCDIR\game\shared\momentum\util\baseautocompletefilelist.cpp" + $File "$SRCDIR\game\shared\momentum\util\baseautocompletefilelist.h" $File "$SRCDIR\game\shared\momentum\util\run_compare.h" - } + $File "$SRCDIR\game\shared\momentum\util\run_stats.h" + $File "$SRCDIR\game\shared\momentum\util\run_stats.cpp" + } $Folder "Shader Editor" [$WIN32] - { - $Folder "Header Files" - { - $File "$SRCDIR\game\client\ShaderEditor\ISEdit_ModelRender.h" - $File "$SRCDIR\game\client\ShaderEditor\IVShaderEditor.h" - $File "$SRCDIR\game\client\ShaderEditor\ShaderEditorSystem.h" - $File "$SRCDIR\game\client\ShaderEditor\SEdit_ModelRender.h" + { + $Folder "Header Files" + { + $File "$SRCDIR\game\client\ShaderEditor\ISEdit_ModelRender.h" + $File "$SRCDIR\game\client\ShaderEditor\IVShaderEditor.h" + $File "$SRCDIR\game\client\ShaderEditor\ShaderEditorSystem.h" + $File "$SRCDIR\game\client\ShaderEditor\SEdit_ModelRender.h" } - $Folder "Implementation Files" + $Folder "Implementation Files" { - $File "$SRCDIR\game\client\ShaderEditor\ShaderEditorSystem.cpp" - $File "$SRCDIR\game\client\ShaderEditor\SEdit_ModelRender.cpp" + $File "$SRCDIR\game\client\ShaderEditor\ShaderEditorSystem.cpp" + $File "$SRCDIR\game\client\ShaderEditor\SEdit_ModelRender.cpp" } } - $File "$SRCDIR\game\shared\momentum\mom_gamemovement.cpp" - $File "$SRCDIR\game\shared\momentum\mom_gamemovement.h" - $File "$SRCDIR\game\shared\momentum\mom_player_shared.h" - $File "$SRCDIR\game\shared\momentum\mom_player_shared.cpp" - $File "$SRCDIR\game\shared\momentum\mom_gamerules.cpp" - $File "$SRCDIR\game\shared\momentum\mom_usermessages.cpp" - $File "$SRCDIR\game\shared\momentum\mom_gamerules.h" - $File "$SRCDIR\game\shared\momentum\mom_shareddefs.h" - $File "momentum\c_mom_player.cpp" - $File "momentum\c_mom_player.h" - $File "momentum\c_te_shotgun_shot.cpp" - $File "momentum\fx_cs_muzzleflash.cpp" - $File "momentum\fx_cs_weaponfx.cpp" + $File "$SRCDIR\game\shared\momentum\mom_gamemovement.cpp" + $File "$SRCDIR\game\shared\momentum\mom_gamemovement.h" + $File "$SRCDIR\game\shared\momentum\mom_player_shared.h" + $File "$SRCDIR\game\shared\momentum\mom_player_shared.cpp" + $File "$SRCDIR\game\shared\momentum\mom_gamerules.cpp" + $File "$SRCDIR\game\shared\momentum\mom_usermessages.cpp" + $File "$SRCDIR\game\shared\momentum\mom_gamerules.h" + $File "$SRCDIR\game\shared\momentum\mom_shareddefs.h" + $File "momentum\c_mom_player.cpp" + $File "momentum\c_mom_player.h" + $File "momentum\c_mom_replay_entity.h" + $File "momentum\c_mom_replay_entity.cpp" + $File "momentum\c_te_shotgun_shot.cpp" + $File "momentum\fx_cs_muzzleflash.cpp" + $File "momentum\fx_cs_weaponfx.cpp" $File "momentum\fx_mom_impacts.cpp" - $File "$SRCDIR\game\shared\momentum\fx_cs_shared.h" - $File "$SRCDIR\game\shared\momentum\fx_cs_shared.cpp" + $File "$SRCDIR\game\shared\momentum\fx_cs_shared.h" + $File "$SRCDIR\game\shared\momentum\fx_cs_shared.cpp" $File "momentum\vgui_rootpanel_momentum.cpp" $File "momentum\mom_prediction.cpp" $File "momentum\mom_in_main.cpp" @@ -178,24 +192,26 @@ $Project "Client (Momentum)" $File "momentum\c_corpse.cpp" $File "momentum\clientmode_mom_normal.h" $File "momentum\clientmode_mom_normal.cpp" - $File "momentum\mom_event_listener.h" + $File "momentum\mom_event_listener.h" $File "momentum\mom_event_listener.cpp" - } + $File "$SRCDIR\game\shared\momentum\mom_entity_run_data.h" + $File "$SRCDIR\game\shared\momentum\mom_entity_run_data.cpp" + } - $Folder "JSON Parser" - { - $File "$SRCDIR\thirdparty\gason\src\gason.h" - $File "$SRCDIR\thirdparty\gason\src\gason.cpp" - { - $Configuration - { + $Folder "JSON Parser" + { + $File "$SRCDIR\thirdparty\gason\src\gason.h" + $File "$SRCDIR\thirdparty\gason\src\gason.cpp" + { + $Configuration + { $Compiler { - $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" $TreatWarningsAsErrors "No" } } } - } + } } } \ No newline at end of file diff --git a/mp/src/game/client/hl2/hud_credits.cpp b/mp/src/game/client/hl2/hud_credits.cpp index 74ed65d8d0..e704131afe 100644 --- a/mp/src/game/client/hl2/hud_credits.cpp +++ b/mp/src/game/client/hl2/hud_credits.cpp @@ -61,7 +61,7 @@ class CHudCredits : public CHudElement, public vgui::Panel { DECLARE_CLASS_SIMPLE(CHudCredits, vgui::Panel); - public: +public: CHudCredits(const char *pElementName); void Init(void) override; void LevelShutdown(void) override; @@ -81,11 +81,11 @@ class CHudCredits : public CHudElement, public vgui::Panel return IsActive(); } - protected: +protected: void Paint() override; void ApplySchemeSettings(vgui::IScheme *pScheme) override; - private: +private: void Clear(); void ReadNames(KeyValues *pKeyValue); @@ -548,13 +548,13 @@ void CHudCredits::DrawIntroCreditsName(void) { pNextCredits->flTimeAdd = (i + 1.0f); pNextCredits->flTime = gpGlobals->curtime + m_flFadeInTime + m_flFadeOutTime + - m_flFadeHoldTime + pNextCredits->flTimeAdd; + m_flFadeHoldTime + pNextCredits->flTimeAdd; } else { pNextCredits->flTimeAdd = m_flPauseBetweenWaves; pNextCredits->flTime = gpGlobals->curtime + m_flFadeInTime + m_flFadeOutTime + - m_flFadeHoldTime + pNextCredits->flTimeAdd; + m_flFadeHoldTime + pNextCredits->flTimeAdd; } pNextCredits->flTimeStart = gpGlobals->curtime; diff --git a/mp/src/game/client/hud_crosshair.cpp b/mp/src/game/client/hud_crosshair.cpp index fc7714fef3..cec7bd754c 100644 --- a/mp/src/game/client/hud_crosshair.cpp +++ b/mp/src/game/client/hud_crosshair.cpp @@ -29,8 +29,8 @@ // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" -ConVar crosshair( "crosshair", "1", FCVAR_ARCHIVE ); -ConVar cl_observercrosshair( "cl_observercrosshair", "1", FCVAR_ARCHIVE ); +ConVar crosshair( "crosshair", "0", FCVAR_ARCHIVE ); +ConVar cl_observercrosshair( "cl_observercrosshair", "0", FCVAR_ARCHIVE ); using namespace vgui; diff --git a/mp/src/game/client/momentum/c_mom_player.cpp b/mp/src/game/client/momentum/c_mom_player.cpp index 60fdca999e..37802bae8e 100644 --- a/mp/src/game/client/momentum/c_mom_player.cpp +++ b/mp/src/game/client/momentum/c_mom_player.cpp @@ -4,25 +4,16 @@ #include "tier0/memdbgon.h" - IMPLEMENT_CLIENTCLASS_DT(C_MomentumPlayer, DT_MOM_Player, CMomentumPlayer) RecvPropInt(RECVINFO(m_iShotsFired)), RecvPropInt(RECVINFO(m_iDirection)), RecvPropBool(RECVINFO(m_bResumeZoom)), RecvPropInt(RECVINFO(m_iLastZoom)), -RecvPropBool(RECVINFO(m_bAutoBhop)), RecvPropBool(RECVINFO(m_bDidPlayerBhop)), RecvPropInt(RECVINFO(m_iSuccessiveBhops)), -RecvPropFloat(RECVINFO(m_flStrafeSync)), -RecvPropFloat(RECVINFO(m_flStrafeSync2)), -RecvPropFloat(RECVINFO(m_flLastJumpVel)), -RecvPropInt(RECVINFO(m_iRunFlags)), -RecvPropBool(RECVINFO(m_bIsInZone)), -RecvPropInt(RECVINFO(m_iCurrentStage)), -RecvPropBool(RECVINFO(m_bMapFinished)), -RecvPropFloat(RECVINFO(m_flLastJumpTime)), -//RecvPropDataTable(RECVINFO_DT(m_HL2Local), 0, &REFERENCE_RECV_TABLE(DT_HL2Local)), -//RecvPropBool(RECVINFO(m_fIsSprinting)), +RecvPropBool(RECVINFO(m_bHasPracticeMode)), +RecvPropDataTable(RECVINFO_DT(m_RunData), SPROP_PROXY_ALWAYS_YES, &REFERENCE_RECV_TABLE(DT_MOM_RunEntData)), +RecvPropDataTable(RECVINFO_DT(m_RunStats), SPROP_PROXY_ALWAYS_YES, &REFERENCE_RECV_TABLE(DT_MOM_RunStats)), END_RECV_TABLE() @@ -30,8 +21,10 @@ C_MomentumPlayer::C_MomentumPlayer() { ConVarRef scissor("r_flashlightscissor"); scissor.SetValue("0"); - m_bMapFinished = false; - m_flLastJumpTime = 0.0f; + m_RunData.m_bMapFinished = false; + m_RunData.m_flLastJumpTime = 0.0f; + m_bHasPracticeMode = false; + m_RunStats.Init(); } C_MomentumPlayer::~C_MomentumPlayer() diff --git a/mp/src/game/client/momentum/c_mom_player.h b/mp/src/game/client/momentum/c_mom_player.h index 6f940b2560..8c8c5f6933 100644 --- a/mp/src/game/client/momentum/c_mom_player.h +++ b/mp/src/game/client/momentum/c_mom_player.h @@ -6,41 +6,47 @@ #include "cbase.h" #include "momentum/mom_shareddefs.h" +#include "c_mom_replay_entity.h" +#include "mom_entity_run_data.h" +#include "util/run_stats.h" class C_MomentumPlayer : public C_BasePlayer { public: DECLARE_CLASS(C_MomentumPlayer, C_BasePlayer); - + DECLARE_CLIENTCLASS(); + C_MomentumPlayer(); ~C_MomentumPlayer(); - DECLARE_CLIENTCLASS(); - Vector m_lastStandingPos; // used by the gamemovement code for finding ladders void SurpressLadderChecks(const Vector& pos, const Vector& normal); bool CanGrabLadder(const Vector& pos, const Vector& normal); bool DidPlayerBhop() { return m_bDidPlayerBhop; } - bool HasAutoBhop() { return m_bAutoBhop; } - void ResetStrafeSync(); + bool HasAutoBhop() { return m_RunData.m_bAutoBhop; } + //void ResetStrafeSync(); + + bool IsWatchingReplay() const + { + return m_hObserverTarget.Get() && GetReplayEnt(); + } + + //Returns the replay entity that the player is watching (first person only) + C_MomentumReplayGhostEntity *GetReplayEnt() const + { + return dynamic_cast(m_hObserverTarget.Get()); + } int m_iShotsFired; int m_iDirection; bool m_bResumeZoom; int m_iLastZoom; - bool m_bAutoBhop; bool m_bDidPlayerBhop; - bool m_bIsInZone; - bool m_bMapFinished; - int m_iRunFlags; - int m_iCurrentStage; - float m_flLastJumpTime; - - float m_flStrafeSync, m_flStrafeSync2; - float m_flLastJumpVel; + bool m_bHasPracticeMode; - float m_flLastRunTime; + CMOMRunEntityData m_RunData; + CMomRunStats m_RunStats; void GetBulletTypeParameters( int iBulletType, @@ -82,8 +88,6 @@ class C_MomentumPlayer : public C_BasePlayer bool m_duckUntilOnGround; float m_flStamina; - - friend class CMomentumGameMovement; }; diff --git a/mp/src/game/client/momentum/c_mom_replay_entity.cpp b/mp/src/game/client/momentum/c_mom_replay_entity.cpp new file mode 100644 index 0000000000..b951d4caee --- /dev/null +++ b/mp/src/game/client/momentum/c_mom_replay_entity.cpp @@ -0,0 +1,25 @@ +#include "cbase.h" +#include "c_mom_replay_entity.h" + +#include "tier0/memdbgon.h" + + +IMPLEMENT_CLIENTCLASS_DT(C_MomentumReplayGhostEntity, DT_MOM_ReplayEnt, CMomentumReplayGhostEntity) +RecvPropInt(RECVINFO(m_nReplayButtons)), +RecvPropInt(RECVINFO(m_iTotalStrafes)), +RecvPropInt(RECVINFO(m_iTotalJumps)), +RecvPropFloat(RECVINFO(m_flTickRate)), +RecvPropString(RECVINFO(m_pszPlayerName)), +RecvPropDataTable(RECVINFO_DT(m_RunData), 0, &REFERENCE_RECV_TABLE(DT_MOM_RunEntData)), +RecvPropDataTable(RECVINFO_DT(m_RunStats), SPROP_PROXY_ALWAYS_YES, &REFERENCE_RECV_TABLE(DT_MOM_RunStats)), +END_RECV_TABLE(); + +C_MomentumReplayGhostEntity::C_MomentumReplayGhostEntity() +{ + m_nReplayButtons = 0; + m_iTotalStrafes = 0; + m_iTotalJumps = 0; + m_flTickRate = 0.0f; + m_pszPlayerName[0] = '\0'; + m_RunStats.Init(); +} \ No newline at end of file diff --git a/mp/src/game/client/momentum/c_mom_replay_entity.h b/mp/src/game/client/momentum/c_mom_replay_entity.h new file mode 100644 index 0000000000..fc2f43036f --- /dev/null +++ b/mp/src/game/client/momentum/c_mom_replay_entity.h @@ -0,0 +1,31 @@ +#pragma once + +#include "cbase.h" +#include "mom_entity_run_data.h" +#include "util/run_stats.h" + +class C_MomentumReplayGhostEntity : public C_BaseAnimating +{ + DECLARE_CLASS(C_MomentumReplayGhostEntity, C_BaseAnimating); + DECLARE_CLIENTCLASS(); + +public: + C_MomentumReplayGhostEntity(); + + CMOMRunEntityData m_RunData; + CMomRunStats m_RunStats; + + float m_flTickRate; + + int m_nReplayButtons; + //These are stored here because run stats already has the ones obtained from the run + int m_iTotalStrafes; + int m_iTotalJumps; + + char m_pszPlayerName[MAX_PLAYER_NAME_LENGTH]; + bool ShouldInterpolate() override + { + return true; + } + +}; \ No newline at end of file diff --git a/mp/src/game/client/momentum/clientmode_mom_normal.cpp b/mp/src/game/client/momentum/clientmode_mom_normal.cpp index 2a3632fd39..a6fb99d37c 100644 --- a/mp/src/game/client/momentum/clientmode_mom_normal.cpp +++ b/mp/src/game/client/momentum/clientmode_mom_normal.cpp @@ -4,25 +4,25 @@ // //============================================================================= #include "cbase.h" + +#include "ClientTimesDisplay.h" #include "clientmode_mom_normal.h" +#include "hud.h" +#include "ienginevgui.h" +#include "iinput.h" +#include "momSpectatorGUI.h" #include "momentum/mom_shareddefs.h" #include "vgui_int.h" -#include "hud.h" #include #include #include -#include "ClientTimesDisplay.h" #include -#include "iinput.h" -#include "ienginevgui.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" extern bool g_bRollingCredits; -ConVar fov_desired("fov_desired", "90", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.\n", true, 90.0, true, 179.0); - //----------------------------------------------------------------------------- // Globals //----------------------------------------------------------------------------- @@ -40,93 +40,151 @@ IClientMode *GetClientModeNormal() //----------------------------------------------------------------------------- class CHudViewport : public CBaseViewport { -private: + private: DECLARE_CLASS_SIMPLE(CHudViewport, CBaseViewport); -protected: - virtual void ApplySchemeSettings(vgui::IScheme *pScheme) + protected: + void ApplySchemeSettings(vgui::IScheme *pScheme) override { BaseClass::ApplySchemeSettings(pScheme); gHUD.InitColors(pScheme); - + SetPaintBackgroundEnabled(false); } - IViewPortPanel *CreatePanelByName(const char *pzName) + IViewPortPanel *CreatePanelByName(const char *pzName) override { - IViewPortPanel *panel = BaseClass::CreatePanelByName(pzName); - if (!panel) + + if (!Q_strcmp(PANEL_TIMES, pzName)) { - if (!Q_strcmp(PANEL_TIMES, pzName)) - { - panel = new CClientTimesDisplay(this); - } + return new CClientTimesDisplay(this); + } + if (!Q_strcmp(PANEL_SPECMENU, pzName)) + { + return new CMOMSpectatorMenu(this); + } + if (!Q_strcmp(PANEL_SPECGUI, pzName)) + { + return new CMOMSpectatorGUI(this); } - return panel; + return BaseClass::CreatePanelByName(pzName); } - virtual void CreateDefaultPanels(void) + void CreateDefaultPanels(void) override { AddNewPanel(CreatePanelByName(PANEL_TIMES), "PANEL_TIMES"); - - BaseClass::CreateDefaultPanels();// MOM_TODO: do we want the other panels? - }; + AddNewPanel(CreatePanelByName(PANEL_SPECMENU), "PANEL_SPECMENU"); + AddNewPanel(CreatePanelByName(PANEL_SPECGUI), "PANEL_SPECGUI"); + //BaseClass::CreateDefaultPanels(); // MOM_TODO: do we want the other panels? + } }; - //----------------------------------------------------------------------------- // ClientModeHLNormal implementation //----------------------------------------------------------------------------- ClientModeMOMNormal::ClientModeMOMNormal() { - m_pHudMenuStatic = NULL; + m_pHudMenuStatic = nullptr; + m_pHudMapFinished = nullptr; + m_pLeaderboards = nullptr; m_pViewport = new CHudViewport(); m_pViewport->Start(gameuifuncs, gameeventmanager); } - //----------------------------------------------------------------------------- -// Purpose: +// Purpose: //----------------------------------------------------------------------------- ClientModeMOMNormal::~ClientModeMOMNormal() { + //MOM_TODO: delete pointers (m_pViewport) here? } - //----------------------------------------------------------------------------- -// Purpose: +// Purpose: //----------------------------------------------------------------------------- void ClientModeMOMNormal::Init() { BaseClass::Init(); - m_pHudMenuStatic = static_cast(GET_HUDELEMENT(CHudMenuStatic)); - + m_pHudMenuStatic = GET_HUDELEMENT(CHudMenuStatic); + m_pHudMapFinished = GET_HUDELEMENT(CHudMapFinishedDialog); + m_pLeaderboards = dynamic_cast(m_pViewport->FindPanelByName(PANEL_TIMES)); // Load up the combine control panel scheme - g_hVGuiCombineScheme = vgui::scheme()->LoadSchemeFromFileEx(enginevgui->GetPanel(PANEL_CLIENTDLL), IsXbox() ? "resource/ClientScheme.res" : "resource/CombinePanelScheme.res", "CombineScheme"); + g_hVGuiCombineScheme = vgui::scheme()->LoadSchemeFromFileEx( + enginevgui->GetPanel(PANEL_CLIENTDLL), + IsXbox() ? "resource/ClientScheme.res" : "resource/CombinePanelScheme.res", "CombineScheme"); if (!g_hVGuiCombineScheme) { Warning("Couldn't load combine panel scheme!\n"); } } -bool ClientModeMOMNormal::ShouldDrawCrosshair(void) -{ - return (g_bRollingCredits == false); -} +bool ClientModeMOMNormal::ShouldDrawCrosshair(void) { return (g_bRollingCredits == false); } int ClientModeMOMNormal::HudElementKeyInput(int down, ButtonCode_t keynum, const char *pszCurrentBinding) { + //Swallow the key input if a hud menu is open if (m_pHudMenuStatic && m_pHudMenuStatic->IsMenuDisplayed()) { if (down >= 1 && keynum >= KEY_0 && keynum <= KEY_9) { m_pHudMenuStatic->SelectMenuItem(keynum - KEY_0); - return 0;//The hud menu static swallowed the key input + return 0; // The hud menu static swallowed the key input } } - + + //Detach the mouse if the user right-clicked while the leaderboards are open + + if (m_pLeaderboards && m_pLeaderboards->IsVisible()) + { + if (keynum == MOUSE_RIGHT) + { + m_pLeaderboards->SetMouseInputEnabled(true); + return 0; + } + } + + //Detach the mouse if the user right-clicked while the map finished dialog is open + if (m_pHudMapFinished && m_pHudMapFinished->IsVisible()) + { + if (keynum == MOUSE_RIGHT) + { + m_pHudMapFinished->SetMouseInputEnabled(true); + return 0; + } + } + return BaseClass::HudElementKeyInput(down, keynum, pszCurrentBinding); +} + +int ClientModeMOMNormal::HandleSpectatorKeyInput(int down, ButtonCode_t keynum, const char *pszCurrentBinding) +{ + // MOM_TODO: re-enable this in beta when we add movie-style controls to the spectator menu! + /* + // we are in spectator mode, open spectator menu + if (down && pszCurrentBinding && Q_strcmp(pszCurrentBinding, "+duck") == 0) + { + m_pViewport->ShowPanel(PANEL_SPECMENU, true); + return 0; // we handled it, don't handle twice or send to server + } + */ + if (down && pszCurrentBinding && Q_strcmp(pszCurrentBinding, "+attack") == 0) + { + engine->ClientCmd("spec_next"); + return 0; + } + else if (down && pszCurrentBinding && Q_strcmp(pszCurrentBinding, "+attack2") == 0) + { + engine->ClientCmd("spec_prev"); + return 0; + } + else if (down && pszCurrentBinding && Q_strcmp(pszCurrentBinding, "+jump") == 0) + { + engine->ClientCmd("spec_mode"); + return 0; + } + + return 1; } \ No newline at end of file diff --git a/mp/src/game/client/momentum/clientmode_mom_normal.h b/mp/src/game/client/momentum/clientmode_mom_normal.h index 54ecab0cfe..c40995b66b 100644 --- a/mp/src/game/client/momentum/clientmode_mom_normal.h +++ b/mp/src/game/client/momentum/clientmode_mom_normal.h @@ -1,12 +1,12 @@ //========= Copyright Valve Corporation, All rights reserved. ============// // -// Purpose: +// Purpose: // // $Workfile: $ // $Date: $ // $NoKeywords: $ //=============================================================================// -#if !defined( CLIENTMODE_MOM_NORM_H ) +#if !defined(CLIENTMODE_MOM_NORM_H) #define CLIENTMODE_MOM_NORM_H #ifdef _WIN32 #pragma once @@ -14,34 +14,39 @@ #include "clientmode_shared.h" #include "hud_menu_static.h" -#include +#include "hud_mapfinished.h" +#include "ClientTimesDisplay.h" #include +#include class CHudViewport; namespace vgui { - typedef unsigned long HScheme; +typedef unsigned long HScheme; } - //----------------------------------------------------------------------------- -// Purpose: +// Purpose: //----------------------------------------------------------------------------- class ClientModeMOMNormal : public ClientModeShared { -public: + public: DECLARE_CLASS(ClientModeMOMNormal, ClientModeShared); ClientModeMOMNormal(); ~ClientModeMOMNormal(); - virtual void Init(); - virtual bool ShouldDrawCrosshair(void); - virtual int HudElementKeyInput(int down, ButtonCode_t keynum, const char *pszCurrentBinding); + void Init() override; + bool ShouldDrawCrosshair(void) override; + //NOTE: This includes mouse inputs!!! + int HudElementKeyInput(int down, ButtonCode_t keynum, const char *pszCurrentBinding) override; + int HandleSpectatorKeyInput(int down, ButtonCode_t keynum, const char *pszCurrentBinding) override; -private: + private: CHudMenuStatic *m_pHudMenuStatic; + CHudMapFinishedDialog *m_pHudMapFinished; + CClientTimesDisplay *m_pLeaderboards; }; extern IClientMode *GetClientModeNormal(); diff --git a/mp/src/game/client/momentum/mom_event_listener.cpp b/mp/src/game/client/momentum/mom_event_listener.cpp index 0919e39e94..7d290d2165 100644 --- a/mp/src/game/client/momentum/mom_event_listener.cpp +++ b/mp/src/game/client/momentum/mom_event_listener.cpp @@ -6,74 +6,14 @@ void C_Momentum_EventListener::Init() { //add listeners for all of our custom events - ListenForGameEvent("timer_stopped"); - ListenForGameEvent("stage_enter"); - ListenForGameEvent("stage_exit"); ListenForGameEvent("run_save"); ListenForGameEvent("run_upload"); - ListenForGameEvent("timer_state"); - ListenForGameEvent("practice_mode"); - ListenForGameEvent("keypress"); ListenForGameEvent("map_init"); } void C_Momentum_EventListener::FireGameEvent(IGameEvent *pEvent) { - if (!Q_strcmp("timer_stopped", pEvent->GetName())) - { - m_flStageStrafeSyncAvg[0] = pEvent->GetFloat("avg_sync"); - m_flStageStrafeSync2Avg[0] = pEvent->GetFloat("avg_sync2"); - //3D - m_flStageEnterSpeed[0][0] = pEvent->GetFloat("start_vel"); - m_flStageExitSpeed[0][0] = pEvent->GetFloat("end_vel"); - m_flStageVelocityAvg[0][0] = pEvent->GetFloat("avg_vel"); - m_flStageVelocityMax[0][0] = pEvent->GetFloat("max_vel"); - //2D - m_flStageEnterSpeed[0][1] = pEvent->GetFloat("start_vel_2D"); - m_flStageExitSpeed[0][1] = pEvent->GetFloat("end_vel_2D"); - m_flStageVelocityAvg[0][1] = pEvent->GetFloat("avg_vel_2D"); - m_flStageVelocityMax[0][1] = pEvent->GetFloat("max_vel_2D"); - } - else if (!Q_strcmp("stage_enter", pEvent->GetName())) - { - //NOTE: THE ONLY STAT BELOW THAT REQUIRES THE CURRENT STAGE GIVEN IN "stage_num" IS THE ENTER TIME! - //EVERYTHING ELSE IS m_iCurrentStage - 1 ! - - int currentStage = pEvent->GetInt("stage_num"); - //Note: stage_enter_time will NOT change upon multiple entries to the same stage trigger (only set once per run) - m_flStageEnterTime[currentStage] = pEvent->GetFloat("stage_enter_time"); - //Reset the stage enter speed for the speedometer - m_flStageEnterSpeed[currentStage][0] = 0.0f; - m_flStageEnterSpeed[currentStage][1] = 0.0f; - - if (currentStage > 1) //MOM_TODO: || m_iStageCount < 2 (linear maps use checkpoints?) - { - //The first stage doesn't have its time yet, we calculate it upon going into stage 2+ - m_flStageTime[currentStage - 1] = m_flStageEnterTime[currentStage] - m_flStageEnterTime[currentStage - 1]; - //And the rest of the stats are about the previous stage anyways, not calculated during stage 1 (start) - m_flStageStrafeSyncAvg[currentStage - 1] = pEvent->GetFloat("avg_sync"); - m_flStageStrafeSync2Avg[currentStage - 1] = pEvent->GetFloat("avg_sync2"); - - m_flStageExitSpeed[currentStage - 1][0] = pEvent->GetFloat("stage_exit_vel"); - m_flStageVelocityAvg[currentStage - 1][0] = pEvent->GetFloat("avg_vel"); - m_flStageVelocityMax[currentStage - 1][0] = pEvent->GetFloat("max_vel"); - - m_flStageExitSpeed[currentStage - 1][1] = pEvent->GetFloat("stage_exit_vel_2D"); - m_flStageVelocityAvg[currentStage - 1][1] = pEvent->GetFloat("avg_vel_2D"); - m_flStageVelocityMax[currentStage - 1][1] = pEvent->GetFloat("max_vel_2D"); - - m_iStageJumps[currentStage - 1] = pEvent->GetInt("num_jumps"); - m_iStageStrafes[currentStage - 1] = pEvent->GetInt("num_strafes"); - } - } - else if (!Q_strcmp("stage_exit", pEvent->GetName())) - { - int currentStage = pEvent->GetInt("stage_num"); - //Set the stage enter speed upon exiting the trigger - m_flStageEnterSpeed[currentStage][0] = pEvent->GetFloat("stage_enter_vel"); - m_flStageEnterSpeed[currentStage][1] = pEvent->GetFloat("stage_enter_vel_2D"); - } - else if (!Q_strcmp("run_save", pEvent->GetName())) + if (!Q_strcmp("run_save", pEvent->GetName())) { m_bTimeDidSave = pEvent->GetBool("run_saved"); } @@ -83,23 +23,10 @@ void C_Momentum_EventListener::FireGameEvent(IGameEvent *pEvent) Q_strncpy(m_szRunUploadStatus, pEvent->GetString("web_msg"), sizeof(m_szRunUploadStatus)); //MOM_TODO: potentially have stuff like new rank or something? } - else if (!Q_strcmp("timer_state", pEvent->GetName())) - { - m_bTimerIsRunning = pEvent->GetBool("is_running"); - } - else if (!Q_strcmp("practice_mode", pEvent->GetName())) - { - m_bPlayerHasPracticeMode = pEvent->GetBool("has_practicemode"); - } - else if (!Q_strcmp("keypress", pEvent->GetName())) - { - m_iStageJumps[0] = pEvent->GetInt("num_jumps"); - m_iStageStrafes[0] = pEvent->GetInt("num_strafes"); - } else if (!Q_strcmp("map_init", pEvent->GetName())) { m_bMapIsLinear = pEvent->GetBool("is_linear"); - m_iMapCheckpointCount = pEvent->GetInt("num_checkpoints"); + m_iMapZoneCount = pEvent->GetInt("num_zones"); } } diff --git a/mp/src/game/client/momentum/mom_event_listener.h b/mp/src/game/client/momentum/mom_event_listener.h index 3ff3dc5890..51075a3720 100644 --- a/mp/src/game/client/momentum/mom_event_listener.h +++ b/mp/src/game/client/momentum/mom_event_listener.h @@ -1,41 +1,24 @@ #pragma once #include "mom_shareddefs.h" - +#include "util/run_stats.h" class C_Momentum_EventListener : public CGameEventListener { public: - C_Momentum_EventListener() : - m_bTimerIsRunning(false), + C_Momentum_EventListener() : m_bTimeDidSave(false), - m_bTimeDidUpload(false), - m_bPlayerHasPracticeMode(false) + m_bTimeDidUpload(false), m_bMapIsLinear(false), m_iMapZoneCount(0) { } void Init(); void FireGameEvent(IGameEvent* pEvent) override; - bool m_bTimerIsRunning; bool m_bTimeDidSave, m_bTimeDidUpload; bool m_bMapIsLinear; - int m_iMapCheckpointCount; - - bool m_bPlayerHasPracticeMode; - - //MOM_TODO: We're going to hold an unbiased view at both - //checkpoint and stages. If a map is linear yet has checkpoints, - //it can be free to use these below to display stats for the player to compare against. - int m_iStageJumps[MAX_STAGES], m_iStageStrafes[MAX_STAGES]; - float m_flStageTime[MAX_STAGES], m_flStageEnterTime[MAX_STAGES], m_flStageStrafeSyncAvg[MAX_STAGES], - m_flStageStrafeSync2Avg[MAX_STAGES]; - - float m_flStageEnterSpeed[MAX_STAGES][2],//The velocity with which you started the stage (exit this stage's start trigger) - m_flStageVelocityMax[MAX_STAGES][2],//Max velocity for a stage - m_flStageVelocityAvg[MAX_STAGES][2],//Average velocity in a stage - m_flStageExitSpeed[MAX_STAGES][2];//The velocity with which you exit the stage (this stage -> next) + int m_iMapZoneCount; char m_szRunUploadStatus[512];//MOM_TODO: determine best (max) size for this }; diff --git a/mp/src/game/client/momentum/mom_in_main.cpp b/mp/src/game/client/momentum/mom_in_main.cpp index 671e95ab76..ef954338ad 100644 --- a/mp/src/game/client/momentum/mom_in_main.cpp +++ b/mp/src/game/client/momentum/mom_in_main.cpp @@ -21,7 +21,7 @@ class CMOMInput : public CInput typedef CInput BaseClass; public: - int GetButtonBits(int bResetState) + int GetButtonBits(int bResetState) override { int bits = BaseClass::GetButtonBits(bResetState); CalcButtonBits(bits, IN_TIMES, s_ClearInputState, &in_times, bResetState); @@ -36,7 +36,7 @@ class CMOMInput : public CInput return bits; } - void ClearInputButton(int bits) + void ClearInputButton(int bits) override { s_ClearInputState |= bits; BaseClass::ClearInputButton(bits); diff --git a/mp/src/game/client/momentum/ui/ClientTimesDisplay.cpp b/mp/src/game/client/momentum/ui/ClientTimesDisplay.cpp index 21464b7eff..c3e1051967 100644 --- a/mp/src/game/client/momentum/ui/ClientTimesDisplay.cpp +++ b/mp/src/game/client/momentum/ui/ClientTimesDisplay.cpp @@ -50,7 +50,7 @@ using namespace vgui; //----------------------------------------------------------------------------- // Purpose: Constructor //----------------------------------------------------------------------------- -CClientTimesDisplay::CClientTimesDisplay(IViewPort *pViewPort) : EditablePanel(NULL, PANEL_TIMES) +CClientTimesDisplay::CClientTimesDisplay(IViewPort *pViewPort) : EditablePanel(nullptr, PANEL_TIMES) { m_iPlayerIndexSymbol = KeyValuesSystem()->GetSymbolForString("playerIndex"); m_nCloseKey = BUTTON_CODE_INVALID; @@ -60,6 +60,8 @@ CClientTimesDisplay::CClientTimesDisplay(IViewPort *pViewPort) : EditablePanel(N SetProportional(true); SetKeyBoardInputEnabled(false); SetMouseInputEnabled(false); + //Create a "popup" so we can get the mouse to detach + surface()->CreatePopup(GetVPanel(), false, false, false, false, false); // set the scheme before any child control is created SetScheme("ClientScheme"); @@ -106,6 +108,10 @@ CClientTimesDisplay::CClientTimesDisplay(IViewPort *pViewPort) : EditablePanel(N m_pLocalLeaderboards->SetVerticalScrollbar(false); m_pFriendsLeaderboards->SetVerticalScrollbar(false); + m_pLocalLeaderboards->SetMouseInputEnabled(true); + m_pOnlineLeaderboards->SetMouseInputEnabled(true); + m_pFriendsLeaderboards->SetMouseInputEnabled(true); + m_pMomentumLogo->GetImage()->SetSize(scheme()->GetProportionalScaledValue(256), scheme()->GetProportionalScaledValue(64)); m_iDesiredHeight = GetTall(); @@ -220,8 +226,6 @@ void CClientTimesDisplay::Reset(bool pFullReset) //----------------------------------------------------------------------------- void CClientTimesDisplay::InitScoreboardSections() { -#define SCALE(num) scheme()->GetProportionalScaledValueEx(GetScheme(), (num)) - if (m_pLocalLeaderboards) { m_pLocalLeaderboards->AddSection(m_iSectionId, "", StaticLocalTimeSortFunc); @@ -248,7 +252,6 @@ void CClientTimesDisplay::InitScoreboardSections() m_pFriendsLeaderboards->AddColumnToSection(m_iSectionId, "name", "#MOM_Name", 0, NAME_WIDTH*1.8); m_pFriendsLeaderboards->AddColumnToSection(m_iSectionId, "time", "#MOM_Time", 0, SCALE(m_aiColumnWidths[2] * 1.8)); } -#undef SCALE } //----------------------------------------------------------------------------- @@ -257,7 +260,7 @@ void CClientTimesDisplay::InitScoreboardSections() void CClientTimesDisplay::ApplySchemeSettings(IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); - + if (m_pImageList) delete m_pImageList; m_pImageList = new ImageList(false); @@ -272,7 +275,6 @@ void CClientTimesDisplay::ApplySchemeSettings(IScheme *pScheme) //----------------------------------------------------------------------------- void CClientTimesDisplay::PostApplySchemeSettings(vgui::IScheme *pScheme) { -#define SCALE(num) scheme()->GetProportionalScaledValueEx(GetScheme(), (num)) // resize the images to our resolution for (int i = 0; i < m_pImageList->GetImageCount(); i++) { @@ -331,12 +333,13 @@ void CClientTimesDisplay::ShowPanel(bool bShow) { Reset(true); SetVisible(true); + //SetEnabled(true); MoveToFront(); } else - { - BaseClass::SetVisible(false); - SetMouseInputEnabled(false); + { + SetVisible(false); + SetMouseInputEnabled(false);//Turn mouse off SetKeyBoardInputEnabled(false); } } diff --git a/mp/src/game/client/momentum/ui/ClientTimesDisplay.h b/mp/src/game/client/momentum/ui/ClientTimesDisplay.h index be8b836f4e..a13eb8faea 100644 --- a/mp/src/game/client/momentum/ui/ClientTimesDisplay.h +++ b/mp/src/game/client/momentum/ui/ClientTimesDisplay.h @@ -1,6 +1,6 @@ //========= Copyright Valve Corporation, All rights reserved. ============// // -// Purpose: +// Purpose: // // $NoKeywords: $ //=============================================================================// @@ -11,63 +11,87 @@ #pragma once #endif -#include "GameEventListener.h" #include "cbase.h" + +#include "GameEventListener.h" #include "momentum/mom_shareddefs.h" #include #include #include +#include -#define TYPE_NOTEAM 0 // NOTEAM must be zero :) -#define TYPE_TEAM 1 // a section for a single team -#define TYPE_PLAYERS 2 -#define TYPE_SPECTATORS 3 // a section for a spectator group -#define TYPE_BLANK 4 +#define TYPE_NOTEAM 0 // NOTEAM must be zero :) +#define TYPE_TEAM 1 // a section for a single team +#define TYPE_PLAYERS 2 +#define TYPE_SPECTATORS 3 // a section for a spectator group +#define TYPE_BLANK 4 +#define SCALE(num) scheme()->GetProportionalScaledValueEx(GetScheme(), (num)) //----------------------------------------------------------------------------- // Purpose: Game ScoreBoard //----------------------------------------------------------------------------- class CClientTimesDisplay : public vgui::EditablePanel, public IViewPortPanel, public CGameEventListener { -private: + private: DECLARE_CLASS_SIMPLE(CClientTimesDisplay, vgui::EditablePanel); -protected: + protected: // column widths at 640 - enum { NAME_WIDTH = 160, SCORE_WIDTH = 60, DEATH_WIDTH = 60, PING_WIDTH = 80, VOICE_WIDTH = 0, FRIENDS_WIDTH = 0 }; + enum + { + NAME_WIDTH = 160, + SCORE_WIDTH = 60, + DEATH_WIDTH = 60, + PING_WIDTH = 80, + VOICE_WIDTH = 0, + FRIENDS_WIDTH = 0 + }; // total = 340 -public: + public: CClientTimesDisplay(IViewPort *pViewPort); ~CClientTimesDisplay(); - virtual const char *GetName(void) { return PANEL_TIMES; } - virtual void SetData(KeyValues *data) {}; - virtual void Reset(); - virtual void Update(); + const char *GetName(void) override { return PANEL_TIMES; } + + void SetData(KeyValues *data) override{}; + + void Reset() override; + void Update() override; void Update(bool pFullUpdate); void Reset(bool pFullReset); - virtual bool NeedsUpdate(void); - virtual bool HasInputElements(void) { return true; } - virtual void ShowPanel(bool bShow); + bool NeedsUpdate(void) override; - virtual bool ShowAvatars() - { - return IsPC(); - } + bool HasInputElements(void) override { return true; } + + void ShowPanel(bool bShow) override; + + virtual bool ShowAvatars() { return IsPC(); } // both vgui::Frame and IViewPortPanel define these, so explicitly define them here as passthroughs to vgui - vgui::VPANEL GetVPanel(void) { return BaseClass::GetVPanel(); } - virtual bool IsVisible() { return BaseClass::IsVisible(); } - virtual void SetParent(vgui::VPANEL parent) { BaseClass::SetParent(parent); } + vgui::VPANEL GetVPanel(void) override { return BaseClass::GetVPanel(); } + + bool IsVisible() override { return BaseClass::IsVisible(); } + + void SetParent(vgui::VPANEL parent) override { BaseClass::SetParent(parent); } // IGameEventListener interface: - virtual void FireGameEvent(IGameEvent *event); + void FireGameEvent(IGameEvent *event) override; virtual void UpdatePlayerAvatar(int playerIndex, KeyValues *kv); -protected: + void OnMousePressed(vgui::MouseCode code) override + { + //Log("MOUSE RELEASED: %i\n", code); + + if (code == MOUSE_RIGHT) + { + //MOM_TODO: Show a menu with like "Watch Replay" + } + } + + protected: MESSAGE_FUNC_INT(OnPollHideCode, "PollHideCode", code); // functions to override @@ -75,8 +99,8 @@ class CClientTimesDisplay : public vgui::EditablePanel, public IViewPortPanel, p virtual void InitScoreboardSections(); virtual void UpdateTeamInfo(); virtual void UpdatePlayerInfo(KeyValues *outPlayerInfo); - virtual void OnThink(); - virtual void AddHeader(vgui::Label *pMapSummary); // add the start header of the scoreboard + void OnThink() override; + virtual void AddHeader(vgui::Label *pMapSummary); // add the start header of the scoreboard virtual void AddSection(int teamType, int teamNumber); // add a new section header for a team virtual int GetAdditionalHeight() { return 0; } @@ -84,7 +108,7 @@ class CClientTimesDisplay : public vgui::EditablePanel, public IViewPortPanel, p static bool StaticLocalTimeSortFunc(vgui::SectionedListPanel *list, int itemID1, int itemID2); static bool StaticOnlineTimeSortFunc(vgui::SectionedListPanel *list, int itemID1, int itemID2); - virtual void ApplySchemeSettings(vgui::IScheme *pScheme); + void ApplySchemeSettings(vgui::IScheme *pScheme) override; virtual void PostApplySchemeSettings(vgui::IScheme *pScheme); @@ -96,14 +120,14 @@ class CClientTimesDisplay : public vgui::EditablePanel, public IViewPortPanel, p int m_iNumTeams; vgui::SectionedListPanel *m_pPlayerList; - int m_iSectionId; // the current section we are entering into + int m_iSectionId; // the current section we are entering into float m_fNextUpdateTime; void MoveLabelToFront(const char *textEntryName); void MoveToCenterOfScreen(); - vgui::ImageList *m_pImageList; + vgui::ImageList *m_pImageList; vgui::Panel *m_pHeader; vgui::Panel *m_pPlayerStats; vgui::Panel *m_pLeaderboards; @@ -117,27 +141,26 @@ class CClientTimesDisplay : public vgui::EditablePanel, public IViewPortPanel, p vgui::ImagePanel *m_pPlayerAvatar; vgui::ImagePanel *m_pMomentumLogo; + CUtlMap m_mapAvatarsToImageList; - CUtlMap m_mapAvatarsToImageList; - - CPanelAnimationVar(int, m_iAvatarWidth, "avatar_width", "34"); // Avatar width doesn't scale with resolution + CPanelAnimationVar(int, m_iAvatarWidth, "avatar_width", "34"); // Avatar width doesn't scale with resolution CPanelAnimationVarAliasType(int, m_iNameWidth, "name_width", "136", "proportional_int"); CPanelAnimationVarAliasType(int, m_iClassWidth, "class_width", "35", "proportional_int"); CPanelAnimationVarAliasType(int, m_iScoreWidth, "score_width", "35", "proportional_int"); CPanelAnimationVarAliasType(int, m_iDeathWidth, "death_width", "35", "proportional_int"); CPanelAnimationVarAliasType(int, m_iPingWidth, "ping_width", "23", "proportional_int"); -private: - int m_iPlayerIndexSymbol; - int m_iDesiredHeight; - IViewPort *m_pViewPort; + private: + int m_iPlayerIndexSymbol; + int m_iDesiredHeight; + IViewPort *m_pViewPort; ButtonCode_t m_nCloseKey; struct Time { float time_sec, rate; time_t date; - explicit Time(KeyValues* kv) + explicit Time(KeyValues *kv) { time_sec = Q_atof(kv->GetName()); rate = kv->GetFloat("rate", gpGlobals->interval_per_tick); @@ -150,17 +173,16 @@ class CClientTimesDisplay : public vgui::EditablePanel, public IViewPortPanel, p bool m_bLocalTimesLoaded = false; bool m_bLocalTimesNeedUpdate = false; bool m_bOnlineNeedUpdate = false; - //widths[0] == WIDTH FOR DATE - //widths[1] == WIDTH FOR RANK - //widths[2] == WIDTH FOR TIME + // widths[0] == WIDTH FOR DATE + // widths[1] == WIDTH FOR RANK + // widths[2] == WIDTH FOR TIME int m_aiColumnWidths[3]; // methods void FillScoreBoard(); void FillScoreBoard(bool pFullUpdate); void LoadLocalTimes(KeyValues *kv); - void ConvertLocalTimes(KeyValues*); + void ConvertLocalTimes(KeyValues *); }; - #endif // CLIENTSCOREBOARDDIALOG_H \ No newline at end of file diff --git a/mp/src/game/client/momentum/ui/MapSelection/BaseMapsPage.cpp b/mp/src/game/client/momentum/ui/MapSelection/BaseMapsPage.cpp index f8cd90d61a..596070224e 100644 --- a/mp/src/game/client/momentum/ui/MapSelection/BaseMapsPage.cpp +++ b/mp/src/game/client/momentum/ui/MapSelection/BaseMapsPage.cpp @@ -236,7 +236,7 @@ mapstruct_t *CBaseMapsPage::GetMap(unsigned int serverID) return NULL; // bugbug Alfred: temp Favorites/History objects won't return a good value here... } #else*/ - return NULL; + return nullptr; //#endif } @@ -251,9 +251,9 @@ void CBaseMapsPage::CreateFilters() // filter controls m_pGameModeFilter = new ComboBox(this, "GameModeFilter", 3, false);//"Game mode" - m_pGameModeFilter->AddItem("#MOM_MapSelector_All", NULL);//All - m_pGameModeFilter->AddItem("#MOM_MapSelector_SurfOnly", NULL);//Surf only - m_pGameModeFilter->AddItem("#MOM_MapSelector_BhopOnly", NULL);//Bhop only + m_pGameModeFilter->AddItem("#MOM_MapSelector_All", nullptr);//All + m_pGameModeFilter->AddItem("#MOM_MapSelector_SurfOnly", nullptr);//Surf only + m_pGameModeFilter->AddItem("#MOM_MapSelector_BhopOnly", nullptr);//Bhop only m_pGameModeFilter->AddActionSignalTarget(this); //MOM_TODO: add extra game mode filter types? @@ -263,12 +263,12 @@ void CBaseMapsPage::CreateFilters() //Difficulty filter m_pDifficultyFilter = new ComboBox(this, "DifficultyFilter", 6, false); - m_pDifficultyFilter->AddItem("#MOM_MapSelector_All", NULL); - m_pDifficultyFilter->AddItem("#MOM_MapSelector_LessThanDiff2", NULL);//"Less than Tier 2" - m_pDifficultyFilter->AddItem("#MOM_MapSelector_LessThanDiff3", NULL);//"Less than Tier 3" - m_pDifficultyFilter->AddItem("#MOM_MapSelector_LessThanDiff4", NULL);//etc - m_pDifficultyFilter->AddItem("#MOM_MapSelector_LessThanDiff5", NULL);//etc - m_pDifficultyFilter->AddItem("#MOM_MapSelector_LessThanDiff6", NULL);//MOM_TODO: Is "tier 6" difficulty the highest? + m_pDifficultyFilter->AddItem("#MOM_MapSelector_All", nullptr); + m_pDifficultyFilter->AddItem("#MOM_MapSelector_LessThanDiff2", nullptr);//"Less than Tier 2" + m_pDifficultyFilter->AddItem("#MOM_MapSelector_LessThanDiff3", nullptr);//"Less than Tier 3" + m_pDifficultyFilter->AddItem("#MOM_MapSelector_LessThanDiff4", nullptr);//etc + m_pDifficultyFilter->AddItem("#MOM_MapSelector_LessThanDiff5", nullptr);//etc + m_pDifficultyFilter->AddItem("#MOM_MapSelector_LessThanDiff6", nullptr);//MOM_TODO: Is "tier 6" difficulty the highest? m_pDifficultyFilter->AddActionSignalTarget(this); //Hide completed maps @@ -277,9 +277,9 @@ void CBaseMapsPage::CreateFilters() //Filter staged/linear m_pMapLayoutFilter = new ComboBox(this, "MapLayoutFilter", 3, false); - m_pMapLayoutFilter->AddItem("#MOM_MapSelector_All", NULL); - m_pMapLayoutFilter->AddItem("#MOM_MapSelector_StagedOnly", NULL); - m_pMapLayoutFilter->AddItem("#MOM_MapSelector_LinearOnly", NULL); + m_pMapLayoutFilter->AddItem("#MOM_MapSelector_All", nullptr); + m_pMapLayoutFilter->AddItem("#MOM_MapSelector_StagedOnly", nullptr); + m_pMapLayoutFilter->AddItem("#MOM_MapSelector_LinearOnly", nullptr); m_pMapLayoutFilter->AddActionSignalTarget(this); } diff --git a/mp/src/game/client/momentum/ui/MapSelection/LocalMaps.cpp b/mp/src/game/client/momentum/ui/MapSelection/LocalMaps.cpp index d0bc4f5a31..ab8afec1d8 100644 --- a/mp/src/game/client/momentum/ui/MapSelection/LocalMaps.cpp +++ b/mp/src/game/client/momentum/ui/MapSelection/LocalMaps.cpp @@ -58,12 +58,12 @@ bool MapHasStages(const char* szMap) char path[MAX_PATH]; char fileName[FILENAME_MAX]; Q_snprintf(fileName, FILENAME_MAX, "%s.tim", szMap); - V_ComposeFileName("maps", fileName, path, MAX_PATH); + V_ComposeFileName(MAP_FOLDER, fileName, path, MAX_PATH); if (kvMap->LoadFromFile(filesystem, path, "MOD")) { - found = (kvMap->FindKey("stage") != NULL); + found = (kvMap->FindKey("zone") != nullptr); } kvMap->deleteThis(); } diff --git a/mp/src/game/client/momentum/ui/MapSelection/MapSelectorDialog.cpp b/mp/src/game/client/momentum/ui/MapSelection/MapSelectorDialog.cpp index 3f84beeffa..bff089eb93 100644 --- a/mp/src/game/client/momentum/ui/MapSelection/MapSelectorDialog.cpp +++ b/mp/src/game/client/momentum/ui/MapSelection/MapSelectorDialog.cpp @@ -2,7 +2,7 @@ using namespace vgui; -static CMapSelectorDialog *s_InternetDlg = NULL; +static CMapSelectorDialog *s_InternetDlg = nullptr; CMapSelectorDialog &MapSelectorDialog() { @@ -25,12 +25,12 @@ void GetMostCommonQueryPorts(CUtlVector &ports) //----------------------------------------------------------------------------- // Purpose: Constructor //----------------------------------------------------------------------------- -CMapSelectorDialog::CMapSelectorDialog(vgui::VPANEL parent) : Frame(NULL, "CMapSelectorDialog")//"CServerBrowserDialog") +CMapSelectorDialog::CMapSelectorDialog(vgui::VPANEL parent) : Frame(nullptr, "CMapSelectorDialog")//"CServerBrowserDialog") { SetParent(parent); s_InternetDlg = this; - m_pSavedData = NULL; - m_pFilterData = NULL; + m_pSavedData = nullptr; + m_pFilterData = nullptr; LoadUserData(); @@ -304,7 +304,7 @@ CDialogMapInfo *CMapSelectorDialog::JoinGame(IMapList *gameList, unsigned int se //gameDialog->Connect(); // return gameDialog; - return NULL; + return nullptr; } //----------------------------------------------------------------------------- @@ -335,14 +335,14 @@ CDialogMapInfo *CMapSelectorDialog::OpenMapInfoDialog(IMapList *gameList, KeyVal //We're going to send just the map name to the CDialogMapInfo() constructor, //then to the server and populate it with leaderboard times, replays, personal bests, etc const char *pMapName = pMap->GetString("name", ""); - CDialogMapInfo *gameDialog = new CDialogMapInfo(NULL, pMapName); + CDialogMapInfo *gameDialog = new CDialogMapInfo(nullptr, pMapName); gameDialog->SetParent(GetVParent()); gameDialog->AddActionSignalTarget(this); gameDialog->Run(pMapName); int i = m_vecMapInfoDialogs.AddToTail(); m_vecMapInfoDialogs[i] = gameDialog; return gameDialog; - return NULL; + //return NULL; } //----------------------------------------------------------------------------- @@ -350,7 +350,7 @@ CDialogMapInfo *CMapSelectorDialog::OpenMapInfoDialog(IMapList *gameList, KeyVal //----------------------------------------------------------------------------- CDialogMapInfo *CMapSelectorDialog::OpenMapInfoDialog(int serverIP, uint16 connPort, uint16 queryPort) { - CDialogMapInfo *gameDialog = new CDialogMapInfo(NULL, ""); + CDialogMapInfo *gameDialog = new CDialogMapInfo(nullptr, ""); gameDialog->AddActionSignalTarget(this); gameDialog->SetParent(GetVParent()); gameDialog->Run(""); @@ -388,7 +388,7 @@ CDialogMapInfo *CMapSelectorDialog::GetDialogGameInfoForFriend(uint64 ulSteamIDF return pDlg; } } - return NULL; + return nullptr; } //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/momentum/ui/MapSelection/OnlineMaps.cpp b/mp/src/game/client/momentum/ui/MapSelection/OnlineMaps.cpp index 540da0972c..93c0c50a91 100644 --- a/mp/src/game/client/momentum/ui/MapSelection/OnlineMaps.cpp +++ b/mp/src/game/client/momentum/ui/MapSelection/OnlineMaps.cpp @@ -26,7 +26,7 @@ COnlineMaps::COnlineMaps(vgui::Panel *parent, const char *panelName) : CBaseMaps if (kv->LoadFromFile(g_pFullFileSystem, "servers/Regions.vdf", NULL)) { // iterate the list loading all the servers - for (KeyValues *srv = kv->GetFirstSubKey(); srv != NULL; srv = srv->GetNextKey()) + for (KeyValues *srv = kv->GetFirstSubKey(); srv != nullptr; srv = srv->GetNextKey()) { struct regions_s region; diff --git a/mp/src/game/client/momentum/ui/hud_comparisons.cpp b/mp/src/game/client/momentum/ui/hud_comparisons.cpp index 742845a07b..c4aa11b992 100644 --- a/mp/src/game/client/momentum/ui/hud_comparisons.cpp +++ b/mp/src/game/client/momentum/ui/hud_comparisons.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include "mom_event_listener.h" #include "mom_player_shared.h" @@ -43,9 +44,6 @@ static MAKE_TOGGLE_CONVAR(mom_comparisons_time_show_perstage, "0", FLAG_HUD_CVAR // Velocity static MAKE_TOGGLE_CONVAR(mom_comparisons_vel_show, "1", FLAG_HUD_CVAR, "Toggle showing velocity comparisons: 0 = OFF, 1 = ON"); // Overall vis -static MAKE_TOGGLE_CONVAR(mom_comparisons_vel_type, "0", FLAG_HUD_CVAR, - "Velocity comparison type: \n0 = Velocity including Z-axis (3D)\n1 = Velocity without Z axis " - "(horizontal velocity)"); // Horizontal/3D static MAKE_TOGGLE_CONVAR(mom_comparisons_vel_show_avg, "1", FLAG_HUD_CVAR, "Toggle showing average velocity. 0 = OFF, 1 = ON"); // avg vel static MAKE_TOGGLE_CONVAR(mom_comparisons_vel_show_max, "1", FLAG_HUD_CVAR, @@ -76,14 +74,17 @@ C_RunComparisons::C_RunComparisons(const char *pElementName) : CHudElement(pElementName), Panel(g_pClientMode->GetViewport(), "CHudCompare") { ListenForGameEvent("timer_state"); + ListenForGameEvent("mapfinished_panel_closed"); SetProportional(true); SetKeyBoardInputEnabled(false); // MOM_TODO: will we want keybinds? Hotkeys? SetMouseInputEnabled(false); SetHiddenBits(HIDEHUD_WEAPONSELECTION); - m_iCurrentStage = 0; + m_iCurrentZone = 0; m_bLoadedComparison = false; m_iWidestLabel = 0; m_iWidestValue = 0; + m_iCurrentEntIndex = -1; + ivgui()->AddTickSignal(GetVPanel(), 250); } C_RunComparisons::~C_RunComparisons() { UnloadComparisons(); } @@ -92,7 +93,7 @@ void C_RunComparisons::Init() { // LOCALIZE STUFF HERE LOCALIZE_TOKEN(Stage, "#MOM_Stage", stLocalized); - LOCALIZE_TOKEN(StageTime, "#MOM_Compare_Time_Stage", stageTimeLocalized); + LOCALIZE_TOKEN(StageTime, "#MOM_Compare_Time_Zone", stageTimeLocalized); LOCALIZE_TOKEN(OverallTime, "#MOM_Compare_Time_Overall", overallTimeLocalized); LOCALIZE_TOKEN(Compare, "#MOM_Compare_Against", compareLocalized); LOCALIZE_TOKEN(VelAvg, "#MOM_Compare_Velocity_Avg", velocityAvgLocalized); @@ -107,8 +108,22 @@ void C_RunComparisons::Init() bool C_RunComparisons::ShouldDraw() { - return mom_comparisons.GetBool() && m_bLoadedComparison && CHudElement::ShouldDraw() && g_MOMEventListener && - g_MOMEventListener->m_bTimerIsRunning; + C_MomentumPlayer *pPlayer = ToCMOMPlayer(C_BasePlayer::GetLocalPlayer()); + bool shouldDrawLocal = false; + if (pPlayer) + { + //MOM_TODO: Should we have a convar against letting a ghost compare? + C_MomentumReplayGhostEntity *pGhost = pPlayer->GetReplayEnt(); + C_MOMRunEntityData *runData = pGhost ? &pGhost->m_RunData : &pPlayer->m_RunData; + + if (runData) + { + shouldDrawLocal = runData->m_bTimerRunning && !runData->m_bMapFinished + //we don't want the panel to draw on linear maps (since it doesn't appear until stage transitions anyways) + && g_MOMEventListener->m_iMapZoneCount > 1; + } + } + return mom_comparisons.GetBool() && m_bLoadedComparison && CHudElement::ShouldDraw() && shouldDrawLocal; } void C_RunComparisons::Reset() @@ -117,35 +132,47 @@ void C_RunComparisons::Reset() m_iMaxWide = m_iDefaultWidth; m_iWidestLabel = 0; m_iWidestValue = 0; + m_pRunStats = nullptr; } void C_RunComparisons::FireGameEvent(IGameEvent *event) { - if (!Q_strcmp(event->GetName(), "timer_state")) // This is insuring, even though we register for only this event...? + const char *name = event->GetName(); + if (!Q_strcmp(name, "timer_state")) { - bool started = event->GetBool("is_running", false); - if (started) - { + if (event->GetInt("ent") == m_iCurrentEntIndex && event->GetBool("is_running")) LoadComparisons(); - } - else - { - UnloadComparisons(); - } + } + else if (!Q_strcmp(name, "mapfinished_panel_closed")) + { + UnloadComparisons(); } } void C_RunComparisons::LoadComparisons() { UnloadComparisons(); - // MOM_TODO: Allow replays to compare? If so we'd need interval_per_tick and run flags to be passed here. C_MomentumPlayer *pPlayer = ToCMOMPlayer(C_BasePlayer::GetLocalPlayer()); const char *szMapName = g_pGameRules ? g_pGameRules->MapName() : nullptr; if (szMapName && pPlayer) { + C_MomentumReplayGhostEntity *pGhost = pPlayer->GetReplayEnt(); + float tickRate = 0; + int runFlags = 0; + + if (pGhost) + { + tickRate = pGhost->m_flTickRate; + runFlags = pGhost->m_RunData.m_iRunFlags; + } + else + { + tickRate = gpGlobals->interval_per_tick; + runFlags = pPlayer->m_RunData.m_iRunFlags; + } + m_rcCurrentComparison = new RunCompare_t(); - m_bLoadedComparison = mom_UTIL->GetRunComparison(szMapName, gpGlobals->interval_per_tick, pPlayer->m_iRunFlags, - m_rcCurrentComparison); + m_bLoadedComparison = mom_UTIL->GetRunComparison(szMapName, tickRate, runFlags, m_rcCurrentComparison); } } @@ -159,11 +186,25 @@ void C_RunComparisons::UnloadComparisons() m_bLoadedComparison = false; } +void C_RunComparisons::OnTick() +{ + C_MomentumPlayer *pPlayer = ToCMOMPlayer(C_BasePlayer::GetLocalPlayer()); + if (pPlayer) + { + C_MomentumReplayGhostEntity *pGhost = pPlayer->GetReplayEnt(); + m_pRunStats = pGhost ? &pGhost->m_RunStats : &pPlayer->m_RunStats; + m_iCurrentEntIndex = pGhost ? pGhost->entindex() : pPlayer->entindex(); + } +} + void C_RunComparisons::OnThink() { C_MomentumPlayer *pPlayer = ToCMOMPlayer(C_BasePlayer::GetLocalPlayer()); if (pPlayer) - m_iCurrentStage = pPlayer->m_iCurrentStage; + { + C_MomentumReplayGhostEntity *pGhost = pPlayer->GetReplayEnt(); + m_iCurrentZone = pGhost ? pGhost->m_RunData.m_iCurrentZone : pPlayer->m_RunData.m_iCurrentZone; + } if (!mom_comparisons_time_show_overall.GetBool() && !mom_comparisons_time_show_perstage.GetBool()) { @@ -187,16 +228,16 @@ int C_RunComparisons::GetMaximumTall() int fontTall = surface()->GetFontTall(m_hTextFont) + 2; // font tall and padding toReturn += fontTall; // Comparing against: (run) int stageBuffer = mom_comparisons_max_stages.GetInt(); - int lowerBound = m_iCurrentStage - stageBuffer; + int lowerBound = m_iCurrentZone - stageBuffer; - for (int i = 1; i < m_iCurrentStage; i++) + for (int i = 1; i < m_iCurrentZone; i++) { // Note: Say our current stage is 5 and our buffer is 4. We don't look at stage 5, // and the lower bound becomes 1. If the check was i > lowerBound, stage 1 would be ignored, // and the panel would thus only show 3 stages (2, 3, and 4). So it must be >=. if (i >= lowerBound) { - if (i == (m_iCurrentStage - 1)) + if (i == (m_iCurrentZone - 1)) { // Add everything that the user compares. // Time @@ -256,27 +297,41 @@ void C_RunComparisons::GetDiffColor(float diff, Color *into, bool positiveIsGain // If you pass null to any of the pointer args, they will not be touched. This allows for // only obtaining the actual, only obtaining the comparison, or only obtaining the color. -void C_RunComparisons::GetComparisonString(ComparisonString_t type, int stage, char *ansiActualBufferOut, +void C_RunComparisons::GetComparisonString(ComparisonString_t type, CMomRunStats* stats, int zone, char *ansiActualBufferOut, char *ansiCompareBufferOut, Color *compareColorOut) { - int velType = mom_comparisons_vel_type.GetInt(); // Type of velocity comparison we're making (3D vs Horizontal) + Assert(stats); + if (!stats) + return; + ConVarRef velTypeVar("mom_speedometer_hvel"); + int velType = velTypeVar.GetInt(); // Type of velocity comparison we're making (3D vs Horizontal) float diff = 0.0f; // Difference between the current and the compared-to. - float act; // Actual value that the player has for this stage. + float act; // Actual value that the player has for this zone. char tempANSITimeOutput[BUFSIZETIME], tempANSITimeActual[BUFSIZETIME]; // Only used for time comparisons, ignored otherwise. char diffChar = '\0'; // The character used for showing the diff: + or - - // Calculate diffs only if we loaded a comparison + switch (type) { case TIME_OVERALL: - case STAGE_TIME: + case ZONE_TIME: // Get the time difference in seconds. - act = type == TIME_OVERALL ? g_MOMEventListener->m_flStageEnterTime[stage + 1] - : g_MOMEventListener->m_flStageTime[stage]; + act = type == TIME_OVERALL ? stats->GetZoneEnterTime(zone + 1) + : stats->GetZoneTime(zone); if (m_bLoadedComparison) - diff = act - (type == TIME_OVERALL ? m_rcCurrentComparison->overallSplits[stage] - : m_rcCurrentComparison->stageSplits[stage - 1]); + { + if (type == TIME_OVERALL) + { + if (m_rcCurrentComparison->overallSplits.IsValidIndex(zone)) + diff = act - m_rcCurrentComparison->overallSplits[zone]; + } + else + { + if (m_rcCurrentComparison->zoneSplits.IsValidIndex(zone)) + diff = act - m_rcCurrentComparison->zoneSplits[zone - 1]; + } + } // Are we losing time compared to the run? // If diff > 0, that means you're falling behind (losing time to) your PB! @@ -288,45 +343,45 @@ void C_RunComparisons::GetComparisonString(ComparisonString_t type, int stage, c break; case VELOCITY_AVERAGE: // Get the vel difference - act = g_MOMEventListener->m_flStageVelocityAvg[stage][velType]; + act = stats->GetZoneVelocityAvg(zone, velType); if (m_bLoadedComparison) diff = act - - m_rcCurrentComparison->stageAvgVels[velType][stage - 1]; //- 1 due to array indexing (0 is stage 1) + m_rcCurrentComparison->zoneAvgVels[velType][zone]; break; case VELOCITY_EXIT: - act = g_MOMEventListener->m_flStageExitSpeed[stage][velType]; + act = stats->GetZoneExitSpeed(zone, velType); if (m_bLoadedComparison) - diff = act - m_rcCurrentComparison->stageExitVels[velType][stage - 1]; + diff = act - m_rcCurrentComparison->zoneExitVels[velType][zone]; break; case VELOCITY_MAX: - act = g_MOMEventListener->m_flStageVelocityMax[stage][velType]; + act = stats->GetZoneVelocityMax(zone, velType); if (m_bLoadedComparison) - diff = act - m_rcCurrentComparison->stageMaxVels[velType][stage - 1]; + diff = act - m_rcCurrentComparison->zoneMaxVels[velType][zone]; break; case VELOCITY_ENTER: - act = g_MOMEventListener->m_flStageEnterSpeed[stage][velType]; + act = stats->GetZoneEnterSpeed(zone, velType); if (m_bLoadedComparison) - diff = act - m_rcCurrentComparison->stageEnterVels[velType][stage - 1]; + diff = act - m_rcCurrentComparison->zoneEnterVels[velType][zone]; break; - case STAGE_SYNC1: - act = g_MOMEventListener->m_flStageStrafeSyncAvg[stage]; + case ZONE_SYNC1: + act = stats->GetZoneStrafeSyncAvg(zone); if (m_bLoadedComparison) - diff = act - m_rcCurrentComparison->stageAvgSync1[stage - 1]; + diff = act - m_rcCurrentComparison->zoneAvgSync1[zone]; break; - case STAGE_SYNC2: - act = g_MOMEventListener->m_flStageStrafeSync2Avg[stage]; + case ZONE_SYNC2: + act = stats->GetZoneStrafeSync2Avg(zone); if (m_bLoadedComparison) - diff = act - m_rcCurrentComparison->stageAvgSync2[stage - 1]; + diff = act - m_rcCurrentComparison->zoneAvgSync2[zone]; break; - case STAGE_JUMPS: - act = g_MOMEventListener->m_iStageJumps[stage]; + case ZONE_JUMPS: + act = stats->GetZoneJumps(zone); if (m_bLoadedComparison) - diff = act - m_rcCurrentComparison->stageJumps[stage - 1]; + diff = act - m_rcCurrentComparison->zoneJumps[zone]; break; - case STAGE_STRAFES: - act = g_MOMEventListener->m_iStageStrafes[stage]; + case ZONE_STRAFES: + act = stats->GetZoneStrafes(zone); if (m_bLoadedComparison) - diff = act - m_rcCurrentComparison->stageStrafes[stage - 1]; + diff = act - m_rcCurrentComparison->zoneStrafes[zone]; break; default: return; @@ -335,13 +390,13 @@ void C_RunComparisons::GetComparisonString(ComparisonString_t type, int stage, c if (m_bLoadedComparison) { // Time and jump comparison are where positive is bad. - bool positiveIsLoss = (type == TIME_OVERALL || type == STAGE_TIME || type == STAGE_JUMPS); + bool positiveIsLoss = (type == TIME_OVERALL || type == ZONE_TIME || type == ZONE_JUMPS); diffChar = diff > 0.0f ? '+' : '-'; if (compareColorOut) { - if (type == STAGE_STRAFES) // Since strafes aren't really important to be above/below on + if (type == ZONE_STRAFES) // Since strafes aren't really important to be above/below on compareColorOut->SetRawColor(m_cTie.GetRawColor()); else GetDiffColor(diff, compareColorOut, !positiveIsLoss); @@ -350,14 +405,14 @@ void C_RunComparisons::GetComparisonString(ComparisonString_t type, int stage, c diff = abs(diff); } - if (type == TIME_OVERALL || type == STAGE_TIME) + if (type == TIME_OVERALL || type == ZONE_TIME) { if (ansiActualBufferOut) V_snprintf(ansiActualBufferOut, BUFSIZELOCL, "%s ", tempANSITimeActual); if (m_bLoadedComparison && ansiCompareBufferOut) V_snprintf(ansiCompareBufferOut, BUFSIZELOCL, "(%c %s)", diffChar, tempANSITimeOutput); } - else if (type == STAGE_JUMPS || type == STAGE_STRAFES) + else if (type == ZONE_JUMPS || type == ZONE_STRAFES) { if (ansiActualBufferOut) V_snprintf(ansiActualBufferOut, BUFSIZELOCL, "%i ", static_cast(act)); @@ -386,7 +441,7 @@ void C_RunComparisons::DrawComparisonString(ComparisonString_t string, int stage switch (string) { case TIME_OVERALL: - case STAGE_TIME: + case ZONE_TIME: //" Overall Time: " or " Stage Time: " localized = (string == TIME_OVERALL) ? overallTimeLocalized : stageTimeLocalized; break; @@ -402,16 +457,16 @@ void C_RunComparisons::DrawComparisonString(ComparisonString_t string, int stage case VELOCITY_EXIT: localized = velocityExitLocalized; break; - case STAGE_SYNC1: + case ZONE_SYNC1: localized = sync1Localized; break; - case STAGE_SYNC2: + case ZONE_SYNC2: localized = sync2Localized; break; - case STAGE_JUMPS: + case ZONE_JUMPS: localized = jumpsLocalized; break; - case STAGE_STRAFES: + case ZONE_STRAFES: localized = strafesLocalized; break; default: @@ -425,7 +480,7 @@ void C_RunComparisons::DrawComparisonString(ComparisonString_t string, int stage } // Obtain the actual value, comparison string, and corresponding color - GetComparisonString(string, stage, actualValueANSI, compareValueANSI, &compareColor); + GetComparisonString(string, m_pRunStats, stage, actualValueANSI, compareValueANSI, &compareColor); // Pad the compare type with a couple spaces in front. V_snprintf(compareTypeANSI, BUFSIZELOCL, " %s", localized); @@ -499,10 +554,10 @@ void C_RunComparisons::Paint() int newY = m_iDefaultYPos + (m_iDefaultTall - maxTall); SetPos(m_iDefaultXPos, newY); // Dynamic placement SetSize(m_iMaxWide, maxTall); // Dynamic sizing - // MOM_TODO: Linear maps will have checkpoints, which rid the exit velocity stat? + // MOM_TODO: Linear maps will have checkpoints, which rid the exit velocity stat, which affects maxTall // Get player current stage - int currentStage = m_iCurrentStage; + int currentStage = m_iCurrentZone; // We want to create a "buffer" of stages. The very last stage should show // full comparisons, and be the most bottom one. However, the stages before that need @@ -575,7 +630,7 @@ void C_RunComparisons::Paint() } if (mom_comparisons_time_show_perstage.GetBool()) { - DrawComparisonString(STAGE_TIME, i, Y); + DrawComparisonString(ZONE_TIME, i, Y); Y += yToIncrementBy; } @@ -612,25 +667,25 @@ void C_RunComparisons::Paint() { if (mom_comparisons_sync_show_sync1.GetBool()) { - DrawComparisonString(STAGE_SYNC1, i, Y); + DrawComparisonString(ZONE_SYNC1, i, Y); Y += yToIncrementBy; } if (mom_comparisons_sync_show_sync2.GetBool()) { - DrawComparisonString(STAGE_SYNC2, i, Y); + DrawComparisonString(ZONE_SYNC2, i, Y); Y += yToIncrementBy; } } // print jumps if (mom_comparisons_jumps_show.GetBool()) { - DrawComparisonString(STAGE_JUMPS, i, Y); + DrawComparisonString(ZONE_JUMPS, i, Y); Y += yToIncrementBy; } // print strafes if (mom_comparisons_strafe_show.GetBool()) { - DrawComparisonString(STAGE_STRAFES, i, Y); + DrawComparisonString(ZONE_STRAFES, i, Y); Y += yToIncrementBy; } } @@ -638,7 +693,7 @@ void C_RunComparisons::Paint() { // This is done here and not through DrawComparisonString because // we only need to get the time comparison string, nothing else. - ComparisonString_t timeType = mom_comparisons_time_type.GetBool() ? STAGE_TIME : TIME_OVERALL; + ComparisonString_t timeType = mom_comparisons_time_type.GetBool() ? ZONE_TIME : TIME_OVERALL; char timeComparisonString[BUFSIZELOCL]; wchar_t timeComparisonStringUnicode[BUFSIZELOCL]; @@ -649,7 +704,7 @@ void C_RunComparisons::Paint() + 2; // Padding // Get just the comparison value, no actual value needed as it clutters up the panel - GetComparisonString(timeType, i, nullptr, timeComparisonString, &comparisonColor); + GetComparisonString(timeType, m_pRunStats, i, nullptr, timeComparisonString, &comparisonColor); // See if this updates our max width. SetMaxWide(newXPos + UTIL_ComputeStringWidth(m_hTextFont, timeComparisonString) + 2); diff --git a/mp/src/game/client/momentum/ui/hud_comparisons.h b/mp/src/game/client/momentum/ui/hud_comparisons.h index b1a4acf8c7..3623240184 100644 --- a/mp/src/game/client/momentum/ui/hud_comparisons.h +++ b/mp/src/game/client/momentum/ui/hud_comparisons.h @@ -41,6 +41,7 @@ class C_RunComparisons : public CHudElement, public Panel void Reset() override; void Paint() override; bool ShouldDraw() override; + void OnTick() override; void FireGameEvent(IGameEvent *event) override; @@ -51,7 +52,7 @@ class C_RunComparisons : public CHudElement, public Panel } void UnloadComparisons(); void DrawComparisonString(ComparisonString_t, int stage, int Ypos); - void GetComparisonString(ComparisonString_t type, int stage, char *ansiActualBufferOut, char *ansiCompareBufferOut, Color *compareColorOut); + void GetComparisonString(ComparisonString_t type, CMomRunStats *pStats, int zone, char *ansiActualBufferOut, char *ansiCompareBufferOut, Color *compareColorOut); void GetDiffColor(float diff, Color *into, bool positiveIsGain); int GetMaximumTall(); void SetMaxWide(int); @@ -94,12 +95,14 @@ class C_RunComparisons : public CHudElement, public Panel int m_iDefaultWidth, m_iDefaultTall, m_iDefaultXPos, m_iDefaultYPos; int m_iMaxWide, m_iWidestLabel, m_iWidestValue; - int m_iCurrentStage; + int m_iCurrentZone, m_iCurrentEntIndex; bool m_bLoadedComparison; RunCompare_t *m_rcCurrentComparison; + CMomRunStats *m_pRunStats; }; +//Really hacky way to interface this hud element, as opposed to calling the gHUD.FindElement everywhere static C_RunComparisons *GetComparisons() { static C_RunComparisons *s_runcompare; diff --git a/mp/src/game/client/momentum/ui/hud_keypress.cpp b/mp/src/game/client/momentum/ui/hud_keypress.cpp index 1ad1cdee16..55c03b0e72 100644 --- a/mp/src/game/client/momentum/ui/hud_keypress.cpp +++ b/mp/src/game/client/momentum/ui/hud_keypress.cpp @@ -12,9 +12,14 @@ #include #include "mom_shareddefs.h" +#include "c_mom_replay_entity.h" #include "mom_player_shared.h" #include "mom_event_listener.h" +#include "tier0/memdbgon.h" + +#define KEYDRAW_MIN 0.07f + using namespace vgui; static ConVar showkeys("mom_showkeypresses", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE | FCVAR_REPLICATED, @@ -31,7 +36,7 @@ class CHudKeyPressDisplay : public CHudElement, public Panel bool ShouldDraw() override { C_MomentumPlayer *pMom = ToCMOMPlayer(C_BasePlayer::GetLocalPlayer()); - return showkeys.GetBool() && pMom && !pMom->m_bMapFinished && CHudElement::ShouldDraw(); //don't show during map finished dialog + return showkeys.GetBool() && pMom && !pMom->m_RunData.m_bMapFinished && CHudElement::ShouldDraw(); //don't show during map finished dialog } void OnThink() override; @@ -76,6 +81,8 @@ class CHudKeyPressDisplay : public CHudElement, public Panel wchar_t m_pwright[BUFSIZESHORT]; wchar_t m_pwjump[BUFSIZELOCL]; wchar_t m_pwduck[BUFSIZELOCL]; + float m_fJumpColorUntil; + float m_fDuckColorUntil; }; DECLARE_HUDELEMENT(CHudKeyPressDisplay); @@ -101,6 +108,8 @@ void CHudKeyPressDisplay::Init() Q_wcsncpy(m_pwjump, uJumpUnicode, sizeof(m_pwjump)); //use buffer-safe wcscpy so we don't crash on startup if localization file is corrupted wchar_t *uDuckUnicode = g_pVGuiLocalize->Find("#MOM_Duck"); Q_wcsncpy(m_pwduck, uDuckUnicode, sizeof(m_pwduck)); + + m_fJumpColorUntil = m_fDuckColorUntil = 0; } void CHudKeyPressDisplay::Paint() { @@ -134,13 +143,21 @@ void CHudKeyPressDisplay::Paint() //reset text font for jump/duck surface()->DrawSetTextFont(m_hWordTextFont); - if (m_nButtons & IN_JUMP) + if (m_nButtons & IN_JUMP || gpGlobals->curtime < m_fJumpColorUntil) { + if (m_nButtons & IN_JUMP) + { + m_fJumpColorUntil = gpGlobals->curtime + KEYDRAW_MIN; + } surface()->DrawSetTextPos(GetTextCenter(m_hWordTextFont, m_pwjump), jump_row_ypos); surface()->DrawPrintText(m_pwjump, wcslen(m_pwjump)); } - if (m_nButtons & IN_DUCK) + if (m_nButtons & IN_DUCK || gpGlobals->curtime < m_fDuckColorUntil) { + if (m_nButtons & IN_DUCK) + { + m_fDuckColorUntil = gpGlobals->curtime + KEYDRAW_MIN; + } surface()->DrawSetTextPos(GetTextCenter(m_hWordTextFont, m_pwduck), duck_row_ypos); surface()->DrawPrintText(m_pwduck, wcslen(m_pwduck)); } @@ -168,14 +185,33 @@ void CHudKeyPressDisplay::Paint() } void CHudKeyPressDisplay::OnThink() { - m_nButtons = ::input->GetButtonBits(1); - - if (g_MOMEventListener) - { //we should only draw the strafe/jump counters when the timer is running - m_bShouldDrawCounts = g_MOMEventListener->m_bTimerIsRunning; - m_nStrafes = g_MOMEventListener->m_iStageStrafes[0]; - m_nJumps = g_MOMEventListener->m_iStageJumps[0]; - } + CMomentumPlayer *pPlayer = ToCMOMPlayer(CBasePlayer::GetLocalPlayer()); + if (pPlayer) + { + C_MomentumReplayGhostEntity *pReplayEnt = pPlayer->GetReplayEnt(); + if (pReplayEnt) + { + m_bShouldDrawCounts = pReplayEnt->m_RunData.m_bTimerRunning; + m_nButtons = pReplayEnt->m_nReplayButtons; + m_nStrafes = pReplayEnt->m_iTotalStrafes; + m_nJumps = pReplayEnt->m_iTotalJumps; + } + else + { + m_nButtons = ::input->GetButtonBits(1); + if (g_MOMEventListener) + { + //we should only draw the strafe/jump counters when the timer is running + m_bShouldDrawCounts = pPlayer->m_RunData.m_bTimerRunning; + if (m_bShouldDrawCounts) + { + CMomRunStats *stats = &pPlayer->m_RunStats; + m_nStrafes = stats->GetZoneStrafes(0); + m_nJumps = stats->GetZoneJumps(0); + } + } + } + } } void CHudKeyPressDisplay::Reset() { diff --git a/mp/src/game/client/momentum/ui/hud_mapfinished.cpp b/mp/src/game/client/momentum/ui/hud_mapfinished.cpp index 0111cc1f8a..9095d10ed2 100644 --- a/mp/src/game/client/momentum/ui/hud_mapfinished.cpp +++ b/mp/src/game/client/momentum/ui/hud_mapfinished.cpp @@ -1,181 +1,250 @@ #include "cbase.h" -#include "hudelement.h" -#include "hud_numericdisplay.h" -#include "hud_macros.h" -#include "iclientmode.h" -#include "view.h" -#include "menu.h" -#include "time.h" - -#include -#include -#include -#include -#include -#include - -#include "vgui_helpers.h" -#include "mom_shareddefs.h" -#include "mom_player_shared.h" -#include "mom_shareddefs.h" -#include "mom_event_listener.h" -#include "util\mom_util.h" +#include "hud_mapfinished.h" #include "tier0/memdbgon.h" -using namespace vgui; +DECLARE_HUDELEMENT_DEPTH(CHudMapFinishedDialog, 70); -class CHudMapFinishedDialog : public CHudElement, public Panel +//NOTE: The "CHudMapFinishedDialog" (main panel) control settings are found in MapFinishedDialog.res +CHudMapFinishedDialog::CHudMapFinishedDialog(const char *pElementName) : +CHudElement(pElementName), BaseClass(g_pClientMode->GetViewport(), "CHudMapFinishedDialog") { - DECLARE_CLASS_SIMPLE(CHudMapFinishedDialog, Panel); + m_pRunStats = nullptr; + m_bIsGhost = false; + m_iCurrentPage = 0; + m_iMaxPageTitleWidth = 0; + + ListenForGameEvent("timer_state"); + + surface()->CreatePopup(GetVPanel(), false, false, false, false, false); + + LoadControlSettings("resource/UI/MapFinishedDialog.res"); + m_pNextZoneButton = FindControl("Next_Zone"); + m_pNextZoneButton->SetMouseInputEnabled(true); + m_pNextZoneButton->InstallMouseHandler(this); + m_pPrevZoneButton = FindControl("Prev_Zone"); + m_pPrevZoneButton->SetMouseInputEnabled(true); + m_pPrevZoneButton->InstallMouseHandler(this); + m_pPlayReplayButton = FindControl("Replay_Icon"); + m_pPlayReplayButton->SetMouseInputEnabled(true); + m_pPlayReplayButton->InstallMouseHandler(this); + m_pRepeatButton = FindControl("Repeat_Button"); + m_pRepeatButton->SetMouseInputEnabled(true); + m_pRepeatButton->InstallMouseHandler(this); + m_pClosePanelButton = FindControl("Close_Panel"); + m_pClosePanelButton->SetMouseInputEnabled(true); + m_pClosePanelButton->InstallMouseHandler(this); + m_pDetachMouseLabel = FindControl