diff --git a/mp/game/mod_hl2mp/resource/ClientScheme.res b/mp/game/mod_hl2mp/resource/ClientScheme.res index 5fd132b18..feb7ca5c5 100644 --- a/mp/game/mod_hl2mp/resource/ClientScheme.res +++ b/mp/game/mod_hl2mp/resource/ClientScheme.res @@ -459,15 +459,6 @@ Scheme "weight" "0" } } - "MenuTitle" - { - "1" - { - "name" "Verdana Bold" - "tall" "18" - "weight" "500" - } - } WeaponIcons { "1" @@ -499,8 +490,7 @@ Scheme "1" { "name" "HalfLife2" - "tall" "40" [!$OSX] - "tall" "41" [$OSX] + "tall" "40" "weight" "0" "antialias" "0" "additive" "1" @@ -513,12 +503,11 @@ Scheme "1" { "name" "HL2cross" - "tall" "28" [!$OSX] - "tall" "50" [$OSX] + "tall" "28" "weight" "0" "antialias" "1" "additive" "1" - "custom" "1" [!$OSX] + "custom" "1" } } HudNumbers @@ -551,8 +540,7 @@ Scheme { "1" { - "name" "HalfLife2" [!$OSX] - "name" "Helvetica Bold" [$OSX] + "name" "HalfLife2" "tall" "16" "weight" "1000" "additive" "1" @@ -575,8 +563,7 @@ Scheme { "1" { - "name" "Verdana" [!$OSX] - "name" "Helvetica Bold" [$OSX] + "name" "Verdana" "tall" "14" "weight" "1000" "antialias" "1" @@ -587,8 +574,7 @@ Scheme { "1" { - "name" "Verdana" [!$OSX] - "name" "Helvetica" [$OSX] + "name" "Verdana" "tall" "11" "weight" "0" "antialias" "1" @@ -662,10 +648,7 @@ Scheme { "1" { - "name" "Tahoma" [!$OSX] - "name" "Verdana" [$OSX] - "tall" "26" [!$OSX] - "tall" "24" [$OSX] + "name" "Tahoma" "tall" "26" "weight" "500" } @@ -674,10 +657,7 @@ Scheme { "1" { - "name" "Tahoma" [!$OSX] - "name" "Verdana Italic" [$OSX] - "tall" "26" [!$OSX] - "tall" "24" [$OSX] + "name" "Tahoma" "tall" "26" "weight" "500" "italic" "1" @@ -687,10 +667,7 @@ Scheme { "1" { - "name" "Tahoma" [!$OSX] - "name" "Verdana Bold" [$OSX] - "tall" "26" [!$OSX] - "tall" "24" [$OSX] + "name" "Tahoma" "tall" "26" "weight" "900" } @@ -699,28 +676,12 @@ Scheme { "1" { - "name" "Tahoma" [!$OSX] - "name" "Verdana Bold Italic" [$OSX] - "tall" "26" [!$OSX] - "tall" "24" [$OSX] + "name" "Tahoma" "tall" "26" "weight" "900" "italic" "1" } } - "CloseCaption_Small" - { - "1" - { - "name" "Tahoma" [!$OSX] - "name" "Verdana" [$OSX] - "tall" "16" [!$OSX] - "tall" "14" [$OSX] - "tall_hidef" "24" - "weight" "900" - "range" "0x0000 0x017F" // Basic Latin, Latin-1 Supplement, Latin Extended-A - } - } // this is the symbol font "Marlett" { @@ -814,8 +775,7 @@ Scheme // note that this scales with the screen resolution "1" { - "name" "Trebuchet MS" [!$OSX] - "name" "Helvetica" [$OSX] + "name" "Trebuchet MS" "tall" "18" "weight" "900" "antialias" "1" @@ -886,7 +846,18 @@ Scheme "weight" "0" "additive" "1" "antialias" "1" - "custom" "1" [$OSX] + } + } + //Tony; argh. the only reason this is here is for the goddamned skull icon. + "CSTypeDeath" + { + "1" + { + "name" "csd" // csd.ttf + "tall" "32" + "weight" "0" + "additive" "1" + "antialias" "1" } } // Used by scoreboard and spectator UI for names which don't map in the normal fashion @@ -920,7 +891,6 @@ Scheme "antialias" "1" } } - } //////////////////// BORDERS ////////////////////////////// @@ -1578,6 +1548,7 @@ Scheme "1" "resource/HALFLIFE2.ttf" "1" "resource/HL2MP.ttf" "2" "resource/HL2crosshairs.ttf" + "3" "resource/csd.ttf" } } diff --git a/mp/game/mod_hl2mp/resource/mod_hl2mp_english.txt b/mp/game/mod_hl2mp/resource/mod_hl2mp_english.txt index 4974d4e51..342d7bd70 100644 Binary files a/mp/game/mod_hl2mp/resource/mod_hl2mp_english.txt and b/mp/game/mod_hl2mp/resource/mod_hl2mp_english.txt differ diff --git a/mp/game/mod_hl2mp/resource/modevents.res b/mp/game/mod_hl2mp/resource/modevents.res index c1db91b7c..d93cd5a49 100644 --- a/mp/game/mod_hl2mp/resource/modevents.res +++ b/mp/game/mod_hl2mp/resource/modevents.res @@ -33,19 +33,4 @@ "attacker" "short" // user ID who killed "weapon" "string" // weapon name killed used } - - "teamplay_round_start" // round restart - { - "full_reset" "bool" // is this a full reset of the map - } - - "spec_target_updated" - { - } - - "achievement_earned" - { - "player" "byte" // entindex of the player - "achievement" "short" // achievement ID - } } diff --git a/mp/game/mod_hl2mp/resource/ui/BottomSpectator.res b/mp/game/mod_hl2mp/resource/ui/BottomSpectator.res new file mode 100644 index 000000000..5f9d3c778 --- /dev/null +++ b/mp/game/mod_hl2mp/resource/ui/BottomSpectator.res @@ -0,0 +1,105 @@ +"Resource/UI/BottomSpectator.res" +{ + "specmenu" + { + "ControlName" "Frame" + "fieldName" "specmenu" + "xpos" "0" + "ypos" "428" + "wide" "640" + "tall" "55" + "visible" "1" + "enabled" "0" + "tabPosition" "0" + } + "settingscombo" + { + "ControlName" "ComboBox" + "fieldName" "settingscombo" + "xpos" "15" + "ypos" "14" + "wide" "140" + "tall" "22" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "textAlignment" "west" + } + "playercombo" + { + "ControlName" "ComboBox" + "fieldName" "playercombo" + "xpos" "c-108" + "ypos" "14" + "wide" "216" + "tall" "22" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "textAlignment" "center" + } + "viewcombo" + { + "ControlName" "ComboBox" + "fieldName" "viewcombo" + "xpos" "r155" + "ypos" "14" + "wide" "140" + "tall" "22" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + "textAlignment" "west" + } + "specprev" + { + "ControlName" "Button" + "fieldName" "specprev" + "xpos" "c-140" + "ypos" "14" + "wide" "25" + "tall" "22" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "command" "specprev" + } + "specnext" + { + "ControlName" "Button" + "fieldName" "specnext" + "xpos" "c115" + "ypos" "14" + "wide" "25" + "tall" "22" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "textHidden" "0" + "command" "specnext" + } + +} diff --git a/mp/game/mod_hl2mp/resource/ui/Classmenu.res b/mp/game/mod_hl2mp/resource/ui/Classmenu.res new file mode 100644 index 000000000..8883366f0 --- /dev/null +++ b/mp/game/mod_hl2mp/resource/ui/Classmenu.res @@ -0,0 +1,535 @@ +"Resource/UI/ClassMenu.res" +{ + "class" + { + "ControlName" "CClassMenu" + "fieldName" "class" + "xpos" "200" + "ypos" "148" + "wide" "400" + "tall" "148" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "0" + "title" "#Frame_Untitled" + } + "frame_topGrip" + { + "ControlName" "Panel" + "fieldName" "frame_topGrip" + "xpos" "3" + "ypos" "0" + "wide" "392" + "tall" "2" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_bottomGrip" + { + "ControlName" "Panel" + "fieldName" "frame_bottomGrip" + "xpos" "3" + "ypos" "145" + "wide" "388" + "tall" "2" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_leftGrip" + { + "ControlName" "Panel" + "fieldName" "frame_leftGrip" + "xpos" "0" + "ypos" "3" + "wide" "2" + "tall" "140" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_rightGrip" + { + "ControlName" "Panel" + "fieldName" "frame_rightGrip" + "xpos" "397" + "ypos" "3" + "wide" "2" + "tall" "136" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_tlGrip" + { + "ControlName" "Panel" + "fieldName" "frame_tlGrip" + "xpos" "0" + "ypos" "0" + "wide" "3" + "tall" "3" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_trGrip" + { + "ControlName" "Panel" + "fieldName" "frame_trGrip" + "xpos" "396" + "ypos" "0" + "wide" "3" + "tall" "3" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_blGrip" + { + "ControlName" "Panel" + "fieldName" "frame_blGrip" + "xpos" "0" + "ypos" "144" + "wide" "3" + "tall" "3" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_brGrip" + { + "ControlName" "Panel" + "fieldName" "frame_brGrip" + "xpos" "392" + "ypos" "140" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_caption" + { + "ControlName" "Panel" + "fieldName" "frame_caption" + "xpos" "0" + "ypos" "0" + "wide" "395" + "tall" "10" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "frame_minimize" + { + "ControlName" "Button" + "fieldName" "frame_minimize" + "xpos" "0" + "ypos" "0" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "0" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "2" + "textinsety" "1" + "Default" "0" + } + "frame_maximize" + { + "ControlName" "Button" + "fieldName" "frame_maximize" + "xpos" "0" + "ypos" "0" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "1" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "2" + "textinsety" "1" + "Default" "0" + } + "frame_mintosystray" + { + "ControlName" "Button" + "fieldName" "frame_mintosystray" + "xpos" "0" + "ypos" "0" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "o" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "2" + "textinsety" "1" + "command" "MinimizeToSysTray" + "Default" "0" + } + "frame_close" + { + "ControlName" "Button" + "fieldName" "frame_close" + "xpos" "0" + "ypos" "0" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "r" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "2" + "textinsety" "1" + "Default" "0" + } + "frame_menu" + { + "ControlName" "FrameSystemButton" + "fieldName" "frame_menu" + "xpos" "3" + "ypos" "3" + "wide" "8" + "tall" "8" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "0" + "textinsety" "0" + "Default" "0" + } + "ClassInfo" + { + "ControlName" "EditablePanel" + "fieldName" "ClassInfo" + "xpos" "-8" + "ypos" "-8" + "wide" "340" + "tall" "116" + "autoResize" "3" + "pinCorner" "0" + "visible" "0" + "enabled" "0" + "tabPosition" "0" + } + "ClassInfoBackground" + { + "ControlName" "ImagePanel" + "fieldName" "ClassInfoBackground" + "xpos" "4" + "ypos" "248" + "wide" "500" + "tall" "148" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "fillcolor" "ClassInfoBackground" + "scaleImage" "0" + "scaleAmount" "0.000000" + "tileImage" "0" + "tileHorizontally" "0" + "tileVertically" "0" + } + "SysMenu" + { + "ControlName" "Menu" + "fieldName" "SysMenu" + "xpos" "0" + "ypos" "0" + "zpos" "1" + "wide" "0" + "tall" "0" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "0" + "tabPosition" "0" + } + "selectClass" + { + "ControlName" "Label" + "fieldName" "selectClass" + "xpos" "128" + "ypos" "8" + "wide" "140" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Please select your player class:" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Font" "Default" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "0" + "textinsety" "0" + } + "pc_class1_model" + { + "ControlName" "CModelPanel" + "fieldName" "pc_class1_model" + "xpos" "24" + "ypos" "160" + "zpos" "-5" + "wide" "60" + "tall" "124" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "pc_class2_model" + { + "ControlName" "CModelPanel" + "fieldName" "pc_class2_model" + "xpos" "136" + "ypos" "160" + "zpos" "-5" + "wide" "60" + "tall" "124" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "pc_class3_model" + { + "ControlName" "CModelPanel" + "fieldName" "pc_class3_model" + "xpos" "252" + "ypos" "160" + "zpos" "-5" + "wide" "60" + "tall" "124" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "class_1_full" + { + "ControlName" "Label" + "fieldName" "class_1_full" + "xpos" "24" + "ypos" "212" + "wide" "60" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "#SDK_ClassMenu_Full" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "1" + "Font" "ClassMenuBodyFont" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "0" + "textinsety" "0" + } + "class_3_full" + { + "ControlName" "Label" + "fieldName" "class_3_full" + "xpos" "252" + "ypos" "212" + "wide" "60" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "labelText" "#SDK_ClassMenu_Full" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "1" + "Font" "ClassMenuBodyFont" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "0" + "textinsety" "0" + } + "ButtonSupporter" + { + "ControlName" "Button" + "fieldName" "ButtonSupporter" + "xpos" "100" + "ypos" "64" + "wide" "80" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Join Supporter" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "6" + "textinsety" "0" + "command" "class 2" + "Default" "0" + } + "ButtonAssaulter" + { + "ControlName" "Button" + "fieldName" "ButtonAssaulter" + "xpos" "12" + "ypos" "64" + "wide" "80" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Join Assaulter" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "6" + "textinsety" "0" + "command" "class 1" + "Default" "0" + } + "ButtonMedic" + { + "ControlName" "Button" + "fieldName" "ButtonMedic" + "xpos" "204" + "ypos" "64" + "wide" "80" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Join Medic" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "6" + "textinsety" "0" + "command" "class 3" + "Default" "0" + } + "ButtonHeavy" + { + "ControlName" "Button" + "fieldName" "ButtonHeavy" + "xpos" "304" + "ypos" "64" + "wide" "80" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Join Heavy" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "wrap" "0" + "centerwrap" "0" + "textinsetx" "6" + "textinsety" "0" + "command" "class 4" + "Default" "0" + } + "BuildModeDialog" + { + "ControlName" "BuildModeDialog" + "fieldName" "BuildModeDialog" + "xpos" "360" + "ypos" "146" + "wide" "133" + "tall" "186" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "settitlebarvisible" "1" + "title" "#Frame_Untitled" + } +} diff --git a/mp/game/mod_hl2mp/resource/ui/MOTD.res b/mp/game/mod_hl2mp/resource/ui/MOTD.res new file mode 100644 index 000000000..13ce099ae --- /dev/null +++ b/mp/game/mod_hl2mp/resource/ui/MOTD.res @@ -0,0 +1,70 @@ +"Resource/UI/MOTD.res" +{ + "ClientMOTD" + { + "ControlName" "Frame" + "fieldName" "ClientMOTD" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "setTitleBarVisible" "0" + } + "Message" + { + "ControlName" "HTML" + "fieldName" "Message" + "xpos" "76" + "ypos" "116" + "wide" "480" + "tall" "240" + "autoResize" "3" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "ok" + { + "ControlName" "Button" + "fieldName" "ok" + "xpos" "76" + "ypos" "364" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#Cstrike_OK" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "Command" "okay" + "Default" "1" + } + "serverName" + { + "ControlName" "Label" + "fieldName" "serverName" + "xpos" "84" + "ypos" "72" + "wide" "400" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "Server Name Goes Here +++ :p" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } +} diff --git a/mp/game/mod_hl2mp/resource/ui/ScoreBoard.res b/mp/game/mod_hl2mp/resource/ui/ScoreBoard.res new file mode 100644 index 000000000..f15119835 --- /dev/null +++ b/mp/game/mod_hl2mp/resource/ui/ScoreBoard.res @@ -0,0 +1,455 @@ +"Resource/UI/ScoreBoard.res" +{ + "scores" + { + "ControlName" "CHL2MPClientScoreBoardDialog" + "fieldName" "scores" + "xpos" "c-310" + "ypos" "31" + "wide" "620" + "tall" "385" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "avatar_width" "57" + "name_width" "156" + "class_width" "20" + "score_width" "30" + "death_width" "30" + "ping_width" "30" + } + "ServerName" + { + "ControlName" "Label" + "fieldName" "ServerName" + "xpos" "3" + "ypos" "2" + "zpos" "4" + "wide" "550" + "tall" "14" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "%server%" + "textAlignment" "north-west" + "dulltext" "0" + "brighttext" "1" + } + + "VerticalLine" + { + "ControlName" "ImagePanel" + "fieldName" "VerticalLine" + "xpos" "310" + "ypos" "44" + "zpos" "2" + "wide" "1" + "tall" "320" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "fillcolor" "0 0 0 153" + "PaintBackgroundType" "0" + } + + "HorizontalLine" + { + "ControlName" "ImagePanel" + "fieldName" "HorizontalLine" + "xpos" "5" + "ypos" "25" + "zpos" "2" + "wide" "610" + "tall" "1" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "fillcolor" "0 0 0 153" + "PaintBackgroundType" "0" + } + + "PlayerListDM" + { + "ControlName" "SectionedListPanel" + "fieldName" "PlayerListDM" + "xpos" "0" + "ypos" "29" + "zpos" "20" + "wide" "310" + "tall" "335" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "autoresize" "3" + "linespacing" "20" + } + + "DM_PlayerCount" + { + "ControlName" "Label" + "fieldName" "DM_PlayerCount" + "labelText" "%dm_playercount%" + "textAlignment" "west" + "xpos" "5" + "ypos" "30" + "zpos" "4" + "wide" "268" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + + "DM_ScoreHeader" + { + "ControlName" "Label" + "fieldName" "DM_ScoreHeader" + "labelText" "#HL2MP_Scoreboard_Score" + "textAlignment" "east" + "xpos" "203" + "ypos" "12" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "font" "ScoreboardVerySmall" + "FgColor" "255 178 0 255" + } + + "DM_DeathsHeader" + { + "ControlName" "Label" + "fieldName" "DM_DeathsHeader" + "labelText" "#HL2MP_Scoreboard_Deaths" + "textAlignment" "east" + "xpos" "234" + "ypos" "12" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "font" "ScoreboardVerySmall" + "FgColor" "255 178 0 255" + } + + "DM_PingHeader" + { + "ControlName" "Label" + "fieldName" "DM_PingHeader" + "labelText" "#Scoreboard_Ping" + "textAlignment" "east" + "xpos" "263" + "ypos" "12" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "font" "ScoreboardVerySmall" + "FgColor" "255 178 0 255" + } + + "DM_Latency" + { + "ControlName" "Label" + "fieldName" "DM_Latency" + "labelText" "%dm_ping%" + "textAlignment" "east" + "xpos" "263" + "ypos" "30" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + + "Spectators" + { + "ControlName" "Label" + "fieldName" "Spectators" + "labelText" "%spectators%" + "textAlignment" "west" + "xpos" "25" + "ypos" "362" + "zpos" "4" + "wide" "500" + "tall" "20" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + + "PlayerListR" + { + "ControlName" "SectionedListPanel" + "fieldName" "PlayerListR" + "xpos" "0" + "ypos" "29" + "zpos" "20" + "wide" "310" + "tall" "335" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "autoresize" "3" + "linespacing" "20" + } + + "R_PlayerCount" + { + "ControlName" "Label" + "fieldName" "R_PlayerCount" + "labelText" "%r_teamplayercount%" + "textAlignment" "west" + "xpos" "5" + "ypos" "30" + "zpos" "4" + "wide" "268" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + + + + "R_ScoreHeader" + { + "ControlName" "Label" + "fieldName" "R_ScoreHeader" + "labelText" "#HL2MP_Scoreboard_Score" + "textAlignment" "east" + "xpos" "203" + "ypos" "12" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "font" "ScoreboardVerySmall" + "FgColor" "255 64 64 255" + } + + "R_Score" + { + "ControlName" "Label" + "fieldName" "R_Score" + "labelText" "%r_teamscore%" + "textAlignment" "east" + "xpos" "203" + "ypos" "30" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + + "R_DeathsHeader" + { + "ControlName" "Label" + "fieldName" "R_DeathsHeader" + "labelText" "#HL2MP_Scoreboard_Deaths" + "textAlignment" "east" + "xpos" "234" + "ypos" "12" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "font" "ScoreboardVerySmall" + "FgColor" "255 64 64 255" + } + + "R_PingHeader" + { + "ControlName" "Label" + "fieldName" "R_PingHeader" + "labelText" "#Scoreboard_Ping" + "textAlignment" "east" + "xpos" "263" + "ypos" "12" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "font" "ScoreboardVerySmall" + "FgColor" "255 64 64 255" + } + + "R_Latency" + { + "ControlName" "Label" + "fieldName" "R_Latency" + "labelText" "%r_teamping%" + "textAlignment" "east" + "xpos" "263" + "ypos" "30" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + + "PlayerListC" + { + "ControlName" "SectionedListPanel" + "fieldName" "PlayerListC" + "xpos" "310" + "ypos" "29" + "zpos" "20" + "wide" "310" + "tall" "335" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "autoresize" "3" + "linespacing" "20" + } + + "C_PlayerCount" + { + "ControlName" "Label" + "fieldName" "C_PlayerCount" + "labelText" "%c_teamplayercount%" + "textAlignment" "west" + "xpos" "315" + "ypos" "30" + "zpos" "4" + "wide" "268" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + + "C_ScoreHeader" + { + "ControlName" "Label" + "fieldName" "C_ScoreHeader" + "labelText" "#HL2MP_Scoreboard_Score" + "textAlignment" "east" + "xpos" "513" + "ypos" "12" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "font" "ScoreboardVerySmall" + "FgColor" "153 204 255 255" + } + + "C_Score" + { + "ControlName" "Label" + "fieldName" "C_Score" + "labelText" "%c_teamscore%" + "textAlignment" "east" + "xpos" "513" + "ypos" "30" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + + "C_DeathsHeader" + { + "ControlName" "Label" + "fieldName" "C_DeathsHeader" + "labelText" "#HL2MP_Scoreboard_Deaths" + "textAlignment" "east" + "xpos" "544" + "ypos" "12" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "font" "ScoreboardVerySmall" + "FgColor" "153 204 255 255" + } + + "C_PingHeader" + { + "ControlName" "Label" + "fieldName" "C_PingHeader" + "labelText" "#Scoreboard_Ping" + "textAlignment" "east" + "xpos" "573" + "ypos" "12" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "font" "ScoreboardVerySmall" + "FgColor" "153 204 255 255" + } + + "C_Latency" + { + "ControlName" "Label" + "fieldName" "C_Latency" + "labelText" "%c_teamping%" + "textAlignment" "east" + "xpos" "573" + "ypos" "30" + "zpos" "4" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + +} diff --git a/mp/game/mod_hl2mp/resource/ui/Spectator.res b/mp/game/mod_hl2mp/resource/ui/Spectator.res new file mode 100644 index 000000000..b944cd5ec --- /dev/null +++ b/mp/game/mod_hl2mp/resource/ui/Spectator.res @@ -0,0 +1,195 @@ +"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" "c-108" + "ypos" "441" + "wide" "216" + "tall" "26" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + "textAlignment" "center" + } + "CTScoreLabel" + { + "ControlName" "Label" + "fieldName" "CTScoreLabel" + "xpos" "r268" + "ypos" "12" + "wide" "150" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#Cstrike_Spec_CT_Score" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + } + "CTScoreValue" + { + "ControlName" "Label" + "fieldName" "CTScoreValue" + "xpos" "r112" + "ypos" "12" + "wide" "15" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + "TERScoreLabel" + { + "ControlName" "Label" + "fieldName" "TERScoreLabel" + "xpos" "r268" + "ypos" "24" + "wide" "150" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#Cstrike_Spec_Ter_Score" + "textAlignment" "east" + "dulltext" "0" + "brighttext" "0" + } + "TERScoreValue" + { + "ControlName" "Label" + "fieldName" "TERScoreValue" + "xpos" "r112" + "ypos" "24" + "wide" "15" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + "DividerBar" + { + "ControlName" "ImagePanel" + "fieldName" "DividerBar" + "xpos" "r94" + "ypos" "12" + "wide" "1" + "tall" "30" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "fillcolor" "BorderBright" + "labelText" "" + "textAlignment" "center" + } + "timerimage" + { + "ControlName" "ImagePanel" + "fieldName" "timerimage" + "xpos" "r86" + "ypos" "26" + "wide" "12" + "tall" "12" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "image" "timer" + "scaleImage" "1" + } + "timerlabel" + { + "ControlName" "Label" + "fieldName" "timerlabel" + "xpos" "r72" + "ypos" "24" + "wide" "40" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "00:00" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + "extrainfo" + { + "ControlName" "Label" + "fieldName" "extrainfo" + "xpos" "r86" + "ypos" "12" + "wide" "150" + "tall" "15" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } +} diff --git a/mp/game/mod_hl2mp/resource/ui/Teammenu.res b/mp/game/mod_hl2mp/resource/ui/Teammenu.res new file mode 100644 index 000000000..505b42d71 --- /dev/null +++ b/mp/game/mod_hl2mp/resource/ui/Teammenu.res @@ -0,0 +1,176 @@ +"Resource/UI/TeamMenu.res" +{ + "team" + { + "ControlName" "CTeamMenu" + "fieldName" "team" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "SysMenu" + { + "ControlName" "Menu" + "fieldName" "SysMenu" + "xpos" "0" + "ypos" "0" + "wide" "64" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "0" + "tabPosition" "0" + } + "MapInfoHTML" + { + "ControlName" "HTML" + "fieldName" "MapInfoHTML" + "xpos" "244" + "ypos" "116" + "wide" "316" + "tall" "286" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + } + "joinTeam" + { + "ControlName" "Label" + "fieldName" "joinTeam" + "xpos" "76" + "ypos" "22" + "wide" "450" + "tall" "48" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#TM_Join_Team" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "font" "MenuTitle" + } + "mapname" + { + "ControlName" "Label" + "fieldName" "mapname" + "xpos" "244" + "ypos" "72" + "wide" "180" + "tall" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "labelText" "" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "1" + } + "jointeam2" + { + "ControlName" "Button" + "fieldName" "jointeam2" + "xpos" "76" + "ypos" "116" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "3" + "labelText" "#TM_Join_Team_2" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "jointeam 2" + } + "jointeam3" + { + "ControlName" "Button" + "fieldName" "jointeam3" + "xpos" "76" + "ypos" "148" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "4" + "labelText" "#TM_Join_Team_3" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "jointeam 3" + } + "autojoin" + { + "ControlName" "Button" + "fieldName" "autojoin" + "xpos" "76" + "ypos" "212" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "1" + "labelText" "#TM_Auto_Join" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "jointeam 0" + "Default" "1" + } + "jointeam1" + { + "ControlName" "Button" + "fieldName" "jointeam1" + "xpos" "76" + "ypos" "244" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "2" + "labelText" "#TM_Join_Team_1" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "command" "jointeam 1" + } + "CancelButton" + { + "ControlName" "Button" + "fieldName" "CancelButton" + "xpos" "76" + "ypos" "276" + "wide" "148" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "tabPosition" "0" + "labelText" "#TM_Cancel" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "Command" "vguicancel" + } +} \ No newline at end of file diff --git a/mp/game/mod_hl2mp/resource/ui/TextWindow.res b/mp/game/mod_hl2mp/resource/ui/TextWindow.res new file mode 100644 index 000000000..a748b030f --- /dev/null +++ b/mp/game/mod_hl2mp/resource/ui/TextWindow.res @@ -0,0 +1,89 @@ +"Resource/UI/TextWindow.res" +{ + "info" + { + "ControlName" "CTextWindow" + "fieldName" "TextWindow" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "tabPosition" "0" + } + + "HTMLMessage" + { + "ControlName" "HTML" + "fieldName" "HTMLMessage" + "xpos" "76" + "ypos" "116" + "wide" "480" + "tall" "240" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + } + + "TextMessage" + { + "ControlName" "TextEntry" + "fieldName" "TextMessage" + "xpos" "76" + "ypos" "116" + "wide" "480" + "tall" "240" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "textAlignment" "northwest" + "textHidden" "0" + "editable" "0" + "maxchars" "-1" + "NumericInputOnly" "0" + } + + "MessageTitle" + { + "ControlName" "Label" + "fieldName" "MessageTitle" + "xpos" "76" + "ypos" "22" + "wide" "450" + "tall" "48" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "Message Title" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + "font" "MenuTitle" + } + + "ok" + { + "ControlName" "Button" + "fieldName" "ok" + "xpos" "76" + "ypos" "364" + "wide" "128" + "tall" "20" + "autoResize" "0" + "pinCorner" "2" + "visible" "1" + "enabled" "1" + "labelText" "#PropertyDialog_OK" + "textAlignment" "center" + "dulltext" "0" + "brighttext" "0" + "command" "okay" + "default" "1" + } +} diff --git a/mp/game/mod_hl2mp/resource/ui/diagonal.tga b/mp/game/mod_hl2mp/resource/ui/diagonal.tga new file mode 100644 index 000000000..084e90cef Binary files /dev/null and b/mp/game/mod_hl2mp/resource/ui/diagonal.tga differ diff --git a/mp/src/game/client/c_vehicle_jeep.cpp b/mp/src/game/client/c_vehicle_jeep.cpp index 9ddb32af4..3c1e020db 100644 --- a/mp/src/game/client/c_vehicle_jeep.cpp +++ b/mp/src/game/client/c_vehicle_jeep.cpp @@ -146,7 +146,9 @@ void C_PropJeep::DampenEyePosition( Vector &vecVehicleEyePos, QAngle &vecVehicle // Keep static the sideways motion. // Dampen forward/backward motion. + #ifndef Seco7_HIGH_PING_VEHICLE_FIX DampenForwardMotion( vecVehicleEyePos, vecVehicleEyeAngles, flFrameTime ); + #endif //Seco7_HIGH_PING_VEHICLE_FIX // Blend up/down motion. DampenUpMotion( vecVehicleEyePos, vecVehicleEyeAngles, flFrameTime ); diff --git a/mp/src/game/client/game_controls/baseviewport.cpp b/mp/src/game/client/game_controls/baseviewport.cpp index ad07f4c7d..eaf413275 100644 --- a/mp/src/game/client/game_controls/baseviewport.cpp +++ b/mp/src/game/client/game_controls/baseviewport.cpp @@ -42,6 +42,11 @@ #include "NavProgress.h" #include "commentary_modelviewer.h" +#ifdef Seco7_USE_PLAYERCLASSES + // Sub dialogs + # include "classmenu.h" +#endif //Seco7_USE_PLAYERCLASSES + // our definition #include "baseviewport.h" #include @@ -91,6 +96,32 @@ CON_COMMAND( hidepanel, "Hides a viewport panel " ) gViewPortInterface->ShowPanel( args[ 1 ], false ); } +#ifdef Seco7_USE_PLAYERCLASSES + CON_COMMAND( SSPlayerClassesBGChecked, "Makes sure the player class menu isn't displayed on the background maps." ) +{ + if ( !gViewPortInterface ) + return; + + if ( !engine->IsLevelMainMenuBackground() ) + { + return; + } + else + { + engine->ClientCmd( "ss_classes_default" ); + } +} + + CON_COMMAND( chooseclass, "Opens a menu for class choose" ) + { + if ( !gViewPortInterface ) + return; + + gViewPortInterface->ShowPanel( "class", true ); + } + +#endif //Seco7_USE_PLAYERCLASSES + /* global helper functions bool Helper_LoadFile( IBaseFileSystem *pFileSystem, const char *pFilename, CUtlVector &buf ) @@ -233,6 +264,9 @@ void CBaseViewport::CreateDefaultPanels( void ) AddNewPanel( CreatePanelByName( PANEL_NAV_PROGRESS ), "PANEL_NAV_PROGRESS" ); // AddNewPanel( CreatePanelByName( PANEL_TEAM ), "PANEL_TEAM" ); // AddNewPanel( CreatePanelByName( PANEL_CLASS ), "PANEL_CLASS" ); +#ifdef Seco7_USE_PLAYERCLASSES + AddNewPanel( CreatePanelByName( PANEL_CLASS ), "PANEL_CLASS" ); +#endif //Seco7_USE_PLAYERCLASSES // AddNewPanel( CreatePanelByName( PANEL_BUY ), "PANEL_BUY" ); #endif } @@ -270,6 +304,12 @@ IViewPortPanel* CBaseViewport::CreatePanelByName(const char *szPanelName) newpanel = new CMapOverview( this ); } */ +#ifdef Seco7_USE_PLAYERCLASSES + else if ( Q_strcmp(PANEL_CLASS, szPanelName) == 0 ) + { + newpanel = new CClassMenu( this ); + } +#endif //Seco7_USE_PLAYERCLASSES else if ( Q_strcmp(PANEL_TEAM, szPanelName) == 0 ) { newpanel = new CTeamMenu( this ); diff --git a/mp/src/game/client/game_controls/vguitextwindow.cpp b/mp/src/game/client/game_controls/vguitextwindow.cpp index 5b967ade9..fbe3f90a5 100644 --- a/mp/src/game/client/game_controls/vguitextwindow.cpp +++ b/mp/src/game/client/game_controls/vguitextwindow.cpp @@ -137,6 +137,7 @@ CTextWindow::~CTextWindow() void CTextWindow::Reset( void ) { +#ifndef Seco7_BG_MOTD_FIX //============================================================================= // HPE_BEGIN: // [Forrest] Replace strange hard-coded default message with hard-coded error message. @@ -153,6 +154,7 @@ void CTextWindow::Reset( void ) m_bShownURL = false; m_bUnloadOnDismissal = false; Update(); +#endif //Seco7_BG_MOTD_FIX } void CTextWindow::ShowText( const char *text ) diff --git a/mp/src/game/client/hl2/c_vehicle_airboat.cpp b/mp/src/game/client/hl2/c_vehicle_airboat.cpp index 526985d40..c28cb782f 100644 --- a/mp/src/game/client/hl2/c_vehicle_airboat.cpp +++ b/mp/src/game/client/hl2/c_vehicle_airboat.cpp @@ -359,8 +359,10 @@ void C_PropAirboat::DampenEyePosition( Vector &vecVehicleEyePos, QAngle &vecVehi // Keep static the sideways motion. // Dampen forward/backward motion. + #ifndef Seco7_HIGH_PING_VEHICLE_FIX DampenForwardMotion( vecVehicleEyePos, vecVehicleEyeAngles, flFrameTime ); - + #endif //Seco7_HIGH_PING_VEHICLE_FIX + // Blend up/down motion. DampenUpMotion( vecVehicleEyePos, vecVehicleEyeAngles, flFrameTime ); } diff --git a/mp/src/game/client/in_main.cpp b/mp/src/game/client/in_main.cpp index 1947a9065..0b0ae9676 100644 --- a/mp/src/game/client/in_main.cpp +++ b/mp/src/game/client/in_main.cpp @@ -1292,7 +1292,7 @@ void CInput::CreateMove ( int sequence_number, float input_sample_frametime, boo #endif #ifdef Seco7_MULTIPLAYER_CHAT_BUBBLES -//4WH FixMe cmd->chatbubble = g_iChatBubble; +//4WH Fix Me cmd->chatbubble = g_iChatBubble; #endif //Seco7_MULTIPLAYER_CHAT_BUBBLES pVerified->m_cmd = *cmd; diff --git a/mp/src/game/server/EnvHudHint.cpp b/mp/src/game/server/EnvHudHint.cpp index efee1ec11..d42dcc203 100644 --- a/mp/src/game/server/EnvHudHint.cpp +++ b/mp/src/game/server/EnvHudHint.cpp @@ -89,7 +89,11 @@ void CEnvHudHint::InputShowHudHint( inputdata_t &inputdata ) } else { - pPlayer = UTIL_GetLocalPlayer(); + #ifdef Seco7_Enable_Fixed_Multiplayer_AI + pPlayer = UTIL_GetNearestPlayer(GetAbsOrigin()); +#else +pPlayer = UTIL_GetLocalPlayer(); +#endif //Seco7_Enable_Fixed_Multiplayer_AI } if ( !pPlayer || !pPlayer->IsNetClient() ) @@ -126,7 +130,11 @@ void CEnvHudHint::InputHideHudHint( inputdata_t &inputdata ) } else { - pPlayer = UTIL_GetLocalPlayer(); + #ifdef Seco7_Enable_Fixed_Multiplayer_AI + pPlayer = UTIL_GetNearestPlayer(GetAbsOrigin()); +#else +pPlayer = UTIL_GetLocalPlayer(); +#endif //Seco7_Enable_Fixed_Multiplayer_AI } if ( !pPlayer || !pPlayer->IsNetClient() ) diff --git a/mp/src/game/server/EnvMessage.cpp b/mp/src/game/server/EnvMessage.cpp index b2e4629fd..5c95b1ab6 100644 --- a/mp/src/game/server/EnvMessage.cpp +++ b/mp/src/game/server/EnvMessage.cpp @@ -91,7 +91,9 @@ void CMessage::Precache( void ) //----------------------------------------------------------------------------- void CMessage::InputShowMessage( inputdata_t &inputdata ) { + #ifndef Seco7_SHOW_GAME_MESSAGES_TO_ALL CBaseEntity *pPlayer = NULL; + #endif //Seco7_SHOW_GAME_MESSAGES_TO_ALL if ( m_spawnflags & SF_MESSAGE_ALL ) { @@ -99,13 +101,21 @@ void CMessage::InputShowMessage( inputdata_t &inputdata ) } else { + #ifdef Seco7_SHOW_GAME_MESSAGES_TO_ALL + UTIL_ShowMessageAll( STRING( m_iszMessage ) ); + } + #else if ( inputdata.pActivator && inputdata.pActivator->IsPlayer() ) { pPlayer = inputdata.pActivator; } else { + #ifdef Seco7_Enable_Fixed_Multiplayer_AI + pPlayer = UTIL_GetLocalPlayer(); // just show it to the host, if there is one + #else pPlayer = (gpGlobals->maxClients > 1) ? NULL : UTIL_GetLocalPlayer(); + #endif //Seco7_Enable_Fixed_Multiplayer_AI } if ( pPlayer && pPlayer->IsPlayer() ) @@ -113,6 +123,7 @@ void CMessage::InputShowMessage( inputdata_t &inputdata ) UTIL_ShowMessage( STRING( m_iszMessage ), ToBasePlayer( pPlayer ) ); } } + #endif //Seco7_SHOW_GAME_MESSAGES_TO_ALL if ( m_sNoise != NULL_STRING ) { @@ -219,12 +230,19 @@ void CCredits::RollOutroCredits() { sv_unlockedchapters.SetValue( "15" ); +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + CRecipientFilter filter; + filter.AddAllPlayers(); + filter.MakeReliable(); + UserMessageBegin( filter, "CreditsMsg" ); +#else CBasePlayer *pPlayer = UTIL_GetLocalPlayer(); CSingleUserRecipientFilter user( pPlayer ); user.MakeReliable(); UserMessageBegin( user, "CreditsMsg" ); +#endif //Seco7_Enable_Fixed_Multiplayer_AI WRITE_BYTE( 3 ); MessageEnd(); } @@ -241,20 +259,41 @@ void CCredits::InputRollOutroCredits( inputdata_t &inputdata ) void CCredits::InputShowLogo( inputdata_t &inputdata ) { +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + CRecipientFilter filter; + filter.AddAllPlayers(); + filter.MakeReliable(); + + // Modification. Set to how old patched AI SDK had code. + //CSingleUserRecipientFilter user( pPlayer ); + //user.MakeReliable(); +#else CBasePlayer *pPlayer = UTIL_GetLocalPlayer(); CSingleUserRecipientFilter user( pPlayer ); user.MakeReliable(); +#endif //Seco7_Enable_Fixed_Multiplayer_AI + if ( m_flLogoLength ) { - UserMessageBegin( user, "LogoTimeMsg" ); +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + UserMessageBegin( filter, "LogoTimeMsg" ); +#else +UserMessageBegin( user, "LogoTimeMsg" ); +#endif //Seco7_Enable_Fixed_Multiplayer_AI + WRITE_FLOAT( m_flLogoLength ); MessageEnd(); } else { - UserMessageBegin( user, "CreditsMsg" ); +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + UserMessageBegin( filter, "CreditsMsg" ); +#else +UserMessageBegin( user, "CreditsMsg" ); +#endif //Seco7_Enable_Fixed_Multiplayer_AI + WRITE_BYTE( 1 ); MessageEnd(); } @@ -267,6 +306,14 @@ void CCredits::InputSetLogoLength( inputdata_t &inputdata ) void CCredits::InputRollCredits( inputdata_t &inputdata ) { +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + CRecipientFilter filter; + filter.AddAllPlayers(); + filter.MakeReliable(); + + UserMessageBegin( filter, "CreditsMsg" ); +WRITE_BYTE( 2 ); // Modification: Added from old patched AI SDK. +#else CBasePlayer *pPlayer = UTIL_GetLocalPlayer(); CSingleUserRecipientFilter user( pPlayer ); @@ -274,5 +321,6 @@ void CCredits::InputRollCredits( inputdata_t &inputdata ) UserMessageBegin( user, "CreditsMsg" ); WRITE_BYTE( 2 ); +#endif //Seco7_Enable_Fixed_Multiplayer_AI MessageEnd(); } diff --git a/mp/src/game/server/ai_basenpc.cpp b/mp/src/game/server/ai_basenpc.cpp index 20c907f20..2786c19e1 100644 --- a/mp/src/game/server/ai_basenpc.cpp +++ b/mp/src/game/server/ai_basenpc.cpp @@ -3153,8 +3153,8 @@ void CAI_BaseNPC::UpdateEfficiency( bool bInPVS ) } //--------------------------------- - #ifdef Seco7_Enable_Fixed_Multiplayer_AI + CBasePlayer *pPlayer = UTIL_GetNearestPlayer(GetAbsOrigin()); #else CBasePlayer *pPlayer = AI_GetSinglePlayer(); diff --git a/mp/src/game/server/ai_behavior_follow.cpp b/mp/src/game/server/ai_behavior_follow.cpp index 80765c298..eea4a52de 100644 --- a/mp/src/game/server/ai_behavior_follow.cpp +++ b/mp/src/game/server/ai_behavior_follow.cpp @@ -18,6 +18,9 @@ #include "ndebugoverlay.h" #include "ai_senses.h" +//4WH - Episodic Issues: Here we include the hl2mp gamerules so that calls to darkness mode work. +#include "hl2mp_gamerules.h" + #ifdef HL2_EPISODIC #include "info_darknessmode_lightsource.h" #endif diff --git a/mp/src/game/server/client.cpp b/mp/src/game/server/client.cpp index 399050468..57556bd22 100644 --- a/mp/src/game/server/client.cpp +++ b/mp/src/game/server/client.cpp @@ -851,10 +851,12 @@ CON_COMMAND( fov, "Change players FOV" ) //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ +#ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING void CC_Player_SetModel( const CCommand &args ) { - if ( gpGlobals->deathmatch ) - return; + //4WH + //if ( gpGlobals->deathmatch ) + //return; CBasePlayer *pPlayer = ToBasePlayer( UTIL_GetCommandClient() ); if ( pPlayer && args.ArgC() == 2) @@ -866,6 +868,7 @@ void CC_Player_SetModel( const CCommand &args ) } } static ConCommand setmodel("setmodel", CC_Player_SetModel, "Changes's player's model", FCVAR_CHEAT ); +#endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING //----------------------------------------------------------------------------- // Purpose: @@ -1056,7 +1059,7 @@ static int FindPassableSpace( CBasePlayer *pPlayer, const Vector& direction, flo return 0; } - +#ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING //------------------------------------------------------------------------------ // Noclip //------------------------------------------------------------------------------ @@ -1145,8 +1148,10 @@ void CC_God_f (void) return; } #else + #ifndef Seco7_ALLOW_VALVE_APPROVED_CHEATING if ( gpGlobals->deathmatch ) return; + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING #endif pPlayer->ToggleFlag( FL_GODMODE ); @@ -1314,8 +1319,10 @@ void CC_Notarget_f (void) if ( !pPlayer ) return; + #ifndef Seco7_ALLOW_VALVE_APPROVED_CHEATING if ( gpGlobals->deathmatch ) - return; + return; + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING pPlayer->ToggleFlag( FL_NOTARGET ); if ( !(pPlayer->GetFlags() & FL_NOTARGET ) ) @@ -1348,6 +1355,7 @@ void CC_HurtMe_f(const CCommand &args) } static ConCommand hurtme("hurtme", CC_HurtMe_f, "Hurts the player.\n\tArguments: ", FCVAR_CHEAT); +#endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING static bool IsInGroundList( CBaseEntity *ent, CBaseEntity *ground ) { diff --git a/mp/src/game/server/episodic/weapon_striderbuster.cpp b/mp/src/game/server/episodic/weapon_striderbuster.cpp index e3ab3e41b..03a451109 100644 --- a/mp/src/game/server/episodic/weapon_striderbuster.cpp +++ b/mp/src/game/server/episodic/weapon_striderbuster.cpp @@ -50,7 +50,7 @@ ConVar striderbuster_dive_force( "striderbuster_dive_force", "-200" ); // How mu ConVar striderbuster_use_particle_flare( "striderbuster_use_particle_flare", "1" ); - +#ifdef HL2_EPISODIC //4WH - Episodic Issues: Code can't compile without using an ifdef here. #define STRIDERBUSTER_FLAG_KNOCKED_OFF_STRIDER 0x00000001 // We were knocked off of a strider after the player attached me. #define SF_DONT_WEAPON_MANAGE 0x800000 @@ -1175,3 +1175,4 @@ bool StriderBuster_WasKnockedOffStrider( CBaseEntity *pEntity ) return false; } +#endif //HL2_EPISODIC //4WH \ No newline at end of file diff --git a/mp/src/game/server/game.cpp b/mp/src/game/server/game.cpp index 8cc795415..5ab01fad8 100644 --- a/mp/src/game/server/game.cpp +++ b/mp/src/game/server/game.cpp @@ -38,7 +38,7 @@ ConVar footsteps( "mp_footsteps","1", FCVAR_NOTIFY ); #ifdef CSTRIKE ConVar flashlight( "mp_flashlight","1", FCVAR_NOTIFY ); #else -ConVar flashlight( "mp_flashlight","0", FCVAR_NOTIFY ); +ConVar flashlight( "mp_flashlight","1", FCVAR_NOTIFY ); //4WH - Information: Always enable the flashlight. Was 0. #endif ConVar aimcrosshair( "mp_autocrosshair","1", FCVAR_NOTIFY ); ConVar decalfrequency( "decalfrequency","10", FCVAR_NOTIFY ); diff --git a/mp/src/game/server/gameinterface.cpp b/mp/src/game/server/gameinterface.cpp index c74571f2b..54ce21436 100644 --- a/mp/src/game/server/gameinterface.cpp +++ b/mp/src/game/server/gameinterface.cpp @@ -679,8 +679,8 @@ bool CServerGameDLL::DLLInit( CreateInterfaceFn appSystemFactory, Msg( "\n" ); } //4WH - Information: Enabling the following two lines gives invaluable information on how the mount lines should look if you need to edit the per-map gcf mount code. - //Msg ("These are the default search paths"); - //filesystem->PrintSearchPaths(); + Msg ("These are the default search paths"); + filesystem->PrintSearchPaths(); #endif //Seco7_USE_STATIC_MOUNT_CODE // cache the globals diff --git a/mp/src/game/server/hl2/ai_allymanager.cpp b/mp/src/game/server/hl2/ai_allymanager.cpp index aa5959341..ead6b1827 100644 --- a/mp/src/game/server/hl2/ai_allymanager.cpp +++ b/mp/src/game/server/hl2/ai_allymanager.cpp @@ -124,13 +124,17 @@ void CAI_AllyManager::CountAllies( int *pTotal, int *pMedics ) { (*pTotal) = (*pMedics) = 0; - if ( !AI_IsSinglePlayer() ) +#ifdef Seco7_Enable_Fixed_Multiplayer_AI +#else + if ( !AI_IsSinglePlayer() ) { // @TODO (toml 10-22-04): no MP support right now return; } const Vector & vPlayerPos = UTIL_GetLocalPlayer()->GetAbsOrigin(); + +#endif //Seco7_Enable_Fixed_Multiplayer_AI CAI_BaseNPC ** ppAIs = g_AI_Manager.AccessAIs(); int nAIs = g_AI_Manager.NumAIs(); @@ -147,14 +151,26 @@ void CAI_AllyManager::CountAllies( int *pTotal, int *pMedics ) continue; // They only count if I can use them. - if( ppAIs[i]->IRelationType( UTIL_GetLocalPlayer() ) != D_LI ) - continue; +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + if( ppAIs[i]->IRelationType( UTIL_GetNearestPlayer(ppAIs[i]->GetAbsOrigin()) ) != D_LI ) +#else +if( ppAIs[i]->IRelationType( UTIL_GetLocalPlayer() ) != D_LI ) +#endif //Seco7_Enable_Fixed_Multiplayer_AI +continue; // Skip distant NPCs +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + Vector vNearestPlayerPos = UTIL_GetNearestPlayer(ppAIs[i]->GetAbsOrigin())->GetAbsOrigin(); + if ( !ppAIs[i]->IsInPlayerSquad() && + !UTIL_FindClientInPVS( ppAIs[i]->edict() ) && + ( ( ppAIs[i]->GetAbsOrigin() - vNearestPlayerPos ).LengthSqr() > 150*12 || + fabsf( ppAIs[i]->GetAbsOrigin().z - vNearestPlayerPos.z ) > 192 ) ) +#else if ( !ppAIs[i]->IsInPlayerSquad() && !UTIL_FindClientInPVS( ppAIs[i]->edict() ) && ( ( ppAIs[i]->GetAbsOrigin() - vPlayerPos ).LengthSqr() > 150*12 || fabsf( ppAIs[i]->GetAbsOrigin().z - vPlayerPos.z ) > 192 ) ) +#endif //Seco7_Enable_Fixed_Multiplayer_AI continue; if( FClassnameIs( ppAIs[i], "npc_citizen" ) ) diff --git a/mp/src/game/server/hl2/func_tank.cpp b/mp/src/game/server/hl2/func_tank.cpp index 76ada15ae..fd3d94cce 100644 --- a/mp/src/game/server/hl2/func_tank.cpp +++ b/mp/src/game/server/hl2/func_tank.cpp @@ -77,14 +77,15 @@ BEGIN_DATADESC( CFuncTank ) DEFINE_KEYFIELD( m_iBulletDamageVsPlayer, FIELD_INTEGER, "bullet_damage_vs_player" ), DEFINE_KEYFIELD( m_iszMaster, FIELD_STRING, "master" ), -#ifdef HL2_EPISODIC +//4WH - Episodic Issues: We enable all ammo types so that we can have both the old style mounted guns (which players can use) and the new combine cannons (which players can't use, and rely on the new ammo code). +//#ifdef HL2_EPISODIC DEFINE_KEYFIELD( m_iszAmmoType, FIELD_STRING, "ammotype" ), DEFINE_FIELD( m_iAmmoType, FIELD_INTEGER ), -#else +//#else DEFINE_FIELD( m_iSmallAmmoType, FIELD_INTEGER ), DEFINE_FIELD( m_iMediumAmmoType, FIELD_INTEGER ), DEFINE_FIELD( m_iLargeAmmoType, FIELD_INTEGER ), -#endif // HL2_EPISODIC +//#endif // HL2_EPISODIC DEFINE_KEYFIELD( m_soundStartRotate, FIELD_SOUNDNAME, "rotatestartsound" ), DEFINE_KEYFIELD( m_soundStopRotate, FIELD_SOUNDNAME, "rotatestopsound" ), @@ -755,6 +756,13 @@ void CFuncTank::Spawn( void ) AddSolidFlags( FSOLID_NOT_SOLID ); } +//4WH - Information: This is code added from DutchMegas' Collaborate source mod to fix func_tank for hl2mp usage. + CDynamicProp *pProp = dynamic_cast(GetParent()); + if ( pProp ) + { + pProp->SetClientSideAnimation( false ); + } + m_hControlVolume = NULL; if ( GetParent() && GetParent()->GetBaseAnimating() ) @@ -1027,6 +1035,7 @@ bool CFuncTank::StartControl( CBaseCombatCharacter *pController ) CBasePlayer *pPlayer = static_cast( m_hController.Get() ); pPlayer->m_Local.m_iHideHUD |= HIDEHUD_WEAPONSELECTION; + pPlayer->Weapon_Switch( pPlayer->Weapon_OwnsThisType( "weapon_hands" ) );//4WH - Information: Prevents weapon sounds/effects on throwing picked up objects. } else { @@ -4289,8 +4298,8 @@ CBasePlayer *pPlayer = AI_GetSinglePlayer(); m_hBeam->SetColor( 0,0, 0 ); vecTargetPosition = pPlayer->EyePosition(); Vector vecForwardCurrent = vecToPlayer; -//4WH-FixMe Vector vecBarrelCurrentEnd = WorldBarrelPosition() + 1.0f; -//4WH-FixME BaseClass::Fire( 1, vecBarrelCurrentEnd, vecForwardCurrent, pPlayer, false ); + Vector vecBarrelCurrentEnd = WorldBarrelPosition();//4WH + 1.0f; + BaseClass::Fire( 1, vecBarrelCurrentEnd, vecForwardCurrent, pPlayer, false ); //m_flTimeBeamOn = gpGlobals->curtime + 0.2f; //m_flTimeNextSweep = gpGlobals->curtime + random->RandomInt( 2.0f, 4.0f ); //When "harrassing" make sure we have a longer random wait time before the next shot. Otherwise things get quite hairy for players! bHarass = true; diff --git a/mp/src/game/server/hl2/grenade_frag.cpp b/mp/src/game/server/hl2/grenade_frag.cpp index 1166236ea..66eff781a 100644 --- a/mp/src/game/server/hl2/grenade_frag.cpp +++ b/mp/src/game/server/hl2/grenade_frag.cpp @@ -58,6 +58,7 @@ public: bool WasPunted( void ) const { return m_punted; } // this function only used in episodic. +//4WH Fix Me-in old seco is just ifdef no &&. #if defined(HL2_EPISODIC) && 0 // FIXME: HandleInteraction() is no longer called now that base grenade derives from CBaseAnimating bool HandleInteraction(int interactionType, void *data, CBaseCombatCharacter* sourceEnt); #endif @@ -375,7 +376,7 @@ int CGrenadeFrag::OnTakeDamage( const CTakeDamageInfo &inputInfo ) return BaseClass::OnTakeDamage( inputInfo ); } - +//4WH old seco 7 ifdef no &&. #if defined(HL2_EPISODIC) && 0 // FIXME: HandleInteraction() is no longer called now that base grenade derives from CBaseAnimating extern int g_interactionBarnacleVictimGrab; ///< usually declared in ai_interactions.h but no reason to haul all of that in here. extern int g_interactionBarnacleVictimBite; diff --git a/mp/src/game/server/hl2/hl2_player.cpp b/mp/src/game/server/hl2/hl2_player.cpp index 98cd076e1..2658ef729 100644 --- a/mp/src/game/server/hl2/hl2_player.cpp +++ b/mp/src/game/server/hl2/hl2_player.cpp @@ -85,15 +85,21 @@ ConVar hl2_sprintspeed( "hl2_sprintspeed", "320" ); ConVar hl2_darkness_flashlight_factor ( "hl2_darkness_flashlight_factor", "1" ); -#ifdef HL2MP - #define HL2_WALK_SPEED 150 - #define HL2_NORM_SPEED 190 - #define HL2_SPRINT_SPEED 320 +#ifdef Seco7_USE_PLAYERCLASSES +#define HL2_WALK_SPEED CBasePlayer::GetWalkSpeed() +#define HL2_NORM_SPEED CBasePlayer::GetNormSpeed() +#define HL2_SPRINT_SPEED CBasePlayer::GetSprintSpeed() #else + #ifdef HL2MP + #define HL2_WALK_SPEED 150 + #define HL2_NORM_SPEED 190 + #define HL2_SPRINT_SPEED 320 + #else #define HL2_WALK_SPEED hl2_walkspeed.GetFloat() #define HL2_NORM_SPEED hl2_normspeed.GetFloat() #define HL2_SPRINT_SPEED hl2_sprintspeed.GetFloat() -#endif + #endif //HL2MP +#endif //Seco7_USE_PLAYERCLASSES ConVar player_showpredictedposition( "player_showpredictedposition", "0" ); ConVar player_showpredictedposition_timestep( "player_showpredictedposition_timestep", "1.0" ); @@ -3853,7 +3859,8 @@ void CLogicPlayerProxy::Activate( void ) if ( m_hPlayer == NULL ) { - m_hPlayer = AI_GetSinglePlayer(); + //4WH m_hPlayer = AI_GetSinglePlayer(); + m_hPlayer = UTIL_GetLocalPlayer(); } } diff --git a/mp/src/game/server/hl2/npc_citizen17.cpp b/mp/src/game/server/hl2/npc_citizen17.cpp index bfddf1a4a..017f0dff0 100644 --- a/mp/src/game/server/hl2/npc_citizen17.cpp +++ b/mp/src/game/server/hl2/npc_citizen17.cpp @@ -4294,10 +4294,17 @@ void CCitizenResponseSystem::ResponseThink() float flNearestDist = (CITIZEN_RESPONSE_DISTANCE * CITIZEN_RESPONSE_DISTANCE); CBaseEntity *pNearestCitizen = NULL; CBaseEntity *pCitizen = NULL; - CBasePlayer *pPlayer = UTIL_GetLocalPlayer(); +#ifndef Seco7_Enable_Fixed_Multiplayer_AI +CBasePlayer *pPlayer = UTIL_GetLocalPlayer(); +#endif //Seco7_Enable_Fixed_Multiplayer_AI + while ( (pCitizen = gEntList.FindEntityByClassname( pCitizen, "npc_citizen" ) ) != NULL) { - float flDistToPlayer = (pPlayer->WorldSpaceCenter() - pCitizen->WorldSpaceCenter()).LengthSqr(); +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + CBasePlayer *pPlayer = UTIL_GetNearestPlayer(pCitizen->GetAbsOrigin()); +#endif //Seco7_Enable_Fixed_Multiplayer_AI + + float flDistToPlayer = (pPlayer->WorldSpaceCenter() - pCitizen->WorldSpaceCenter()).LengthSqr(); if ( flDistToPlayer < flNearestDist ) { flNearestDist = flDistToPlayer; diff --git a/mp/src/game/server/hl2/npc_turret_floor.cpp b/mp/src/game/server/hl2/npc_turret_floor.cpp index e91fe6bcc..8d5daad77 100644 --- a/mp/src/game/server/hl2/npc_turret_floor.cpp +++ b/mp/src/game/server/hl2/npc_turret_floor.cpp @@ -229,8 +229,21 @@ void CNPC_FloorTurret::UpdateOnRemove( void ) void CNPC_FloorTurret::Precache( void ) { const char *pModelName = STRING( GetModelName() ); + //#ifdef Seco7_ENABLE_PORTAL_CONTENT_MOUNTING + if (IsPortalTurret()) + { + pModelName = ( pModelName && pModelName[ 0 ] != '\0' ) ? pModelName : FLOOR_TURRET_MODEL_PORTAL; + PrecacheModel( pModelName ); + } + else + { + //#else pModelName = ( pModelName && pModelName[ 0 ] != '\0' ) ? pModelName : FLOOR_TURRET_MODEL; PrecacheModel( pModelName ); + } + //#endif //Seco7_ENABLE_PORTAL_CONTENT_MOUNTING + + PrecacheModel( FLOOR_TURRET_GLOW_SPRITE ); PropBreakablePrecacheAll( MAKE_STRING( pModelName ) ); @@ -1218,16 +1231,18 @@ void CNPC_FloorTurret::AutoSearchThink( void ) SetThink( &CNPC_FloorTurret::Deploy ); if ( !m_bNoAlarmSounds ) { -//4WH - Information: + //#ifdef Seco7_ENABLE_PORTAL_CONTENT_MOUNTING if (IsPortalTurret()) { EmitSound( "NPC_FloorTurret.TalkAutosearch" ); } -else -{ - EmitSound( "NPC_FloorTurret.Alert" ); -} - } + else + { + //#else + EmitSound( "NPC_FloorTurret.Alert" ); + } + //#endif //Seco7_ENABLE_PORTAL_CONTENT_MOUNTING + } } } @@ -1403,7 +1418,7 @@ void CNPC_FloorTurret::TippedThink( void ) { //Make any last death noises and anims -//4WH - Information: +//4WH - Information:2 if (IsPortalTurret()) { EmitSound( "NPC_FloorTurret.TalkTipped" ); diff --git a/mp/src/game/server/hl2/prop_combine_ball.cpp b/mp/src/game/server/hl2/prop_combine_ball.cpp index 7190134aa..2959d5f3d 100644 --- a/mp/src/game/server/hl2/prop_combine_ball.cpp +++ b/mp/src/game/server/hl2/prop_combine_ball.cpp @@ -706,7 +706,62 @@ void CPropCombineBall::WhizSoundThink() pPhysicsObject->GetPosition( &vecPosition, NULL ); pPhysicsObject->GetVelocity( &vecVelocity, NULL ); - if ( gpGlobals->maxClients == 1 ) + //4WH + //if ( gpGlobals->maxClients == 1 ) + // Multiplayer equivelent, loops through players and decides if it should go or not, like SP. + if ( gpGlobals->maxClients > 1 ) + { + CBasePlayer *pPlayer = NULL; + + for (int i = 1;i <= gpGlobals->maxClients; i++) + { + pPlayer = UTIL_PlayerByIndex( i ); + if ( pPlayer ) + { + Vector vecDelta; + VectorSubtract( pPlayer->GetAbsOrigin(), vecPosition, vecDelta ); + VectorNormalize( vecDelta ); + if ( DotProduct( vecDelta, vecVelocity ) > 0.5f ) + { + Vector vecEndPoint; + VectorMA( vecPosition, 2.0f * TICK_INTERVAL, vecVelocity, vecEndPoint ); + float flDist = CalcDistanceToLineSegment( pPlayer->GetAbsOrigin(), vecPosition, vecEndPoint ); + if ( flDist < 200.0f ) + { + // We're basically doing what CPASAttenuationFilter does, on a per-user basis, if it passes we create the filter and send off the sound + // if it doesn't, we skip the player. + float distance, maxAudible; + Vector vecRelative; + + VectorSubtract( pPlayer->EarPosition(), vecPosition, vecRelative ); + distance = VectorLength( vecRelative ); + maxAudible = ( 2 * SOUND_NORMAL_CLIP_DIST ) / ATTN_NORM; + if ( distance <= maxAudible ) + continue; + + // Set the recipient to the player it checked against so multiple sounds don't play. + CSingleUserRecipientFilter filter( pPlayer ); + + EmitSound_t ep; + ep.m_nChannel = CHAN_STATIC; + if ( hl2_episodic.GetBool() ) + { + ep.m_pSoundName = "NPC_CombineBall_Episodic.WhizFlyby"; + } + else + { + ep.m_pSoundName = "NPC_CombineBall.WhizFlyby"; + } + ep.m_flVolume = 1.0f; + ep.m_SoundLevel = SNDLVL_NORM; + + EmitSound( filter, entindex(), ep ); + } + } + } + } + } + else { #ifdef Seco7_Enable_Fixed_Multiplayer_AI CBasePlayer *pPlayer = UTIL_GetNearestPlayer(GetAbsOrigin()); //Slightly different location due to OLD/NEW sdk code differences. Unsure if needed. diff --git a/mp/src/game/server/hl2mp/hl2mp_player.cpp b/mp/src/game/server/hl2mp/hl2mp_player.cpp index 1fc85dfc1..b0dc93506 100644 --- a/mp/src/game/server/hl2mp/hl2mp_player.cpp +++ b/mp/src/game/server/hl2mp/hl2mp_player.cpp @@ -86,6 +86,10 @@ IMPLEMENT_SERVERCLASS_ST(CHL2MP_Player, DT_HL2MP_Player) // SendPropExclude( "DT_ServerAnimationData" , "m_flCycle" ), // SendPropExclude( "DT_AnimTimeMustBeFirst" , "m_flAnimTime" ), + #ifdef Seco7_USE_PLAYERCLASSES + SendPropInt( SENDINFO( m_iClientClass)), + #endif //Seco7_USE_PLAYERCLASSES + END_SEND_TABLE() BEGIN_DATADESC( CHL2MP_Player ) @@ -98,7 +102,7 @@ const char *g_ppszRandomCitizenModels[] = "models/sdk/humans/group03/male_06_sdk.mdl", "models/sdk/humans/group03/l7h_rebel.mdl", - "models/humans/group03/male_01.mdl", + /*"models/humans/group03/male_01.mdl", "models/humans/group03/male_02.mdl", "models/humans/group03/female_01.mdl", "models/humans/group03/male_03.mdl", @@ -112,7 +116,7 @@ const char *g_ppszRandomCitizenModels[] = "models/humans/group03/male_07.mdl", "models/humans/group03/female_07.mdl", "models/humans/group03/male_08.mdl", - "models/humans/group03/male_09.mdl", + "models/humans/group03/male_09.mdl",*/ }; const char *g_ppszRandomCombineModels[] = @@ -120,10 +124,10 @@ const char *g_ppszRandomCombineModels[] = //4WH - Information: Player models are also precached here. "models/sdk/Humans/Group03/police_05.mdl", - "models/combine_soldier.mdl", + /*"models/combine_soldier.mdl", "models/combine_soldier_prisonguard.mdl", "models/combine_super_soldier.mdl", - "models/police.mdl", + "models/police.mdl",*/ }; @@ -203,6 +207,8 @@ void CHL2MP_Player::Precache( void ) void CHL2MP_Player::GiveAllItems( void ) { +#ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING + EquipSuit(); CBasePlayer::GiveAmmo( 255, "Pistol"); @@ -235,7 +241,8 @@ void CHL2MP_Player::GiveAllItems( void ) GiveNamedItem( "weapon_slam" ); GiveNamedItem( "weapon_physcannon" ); - +#endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING + } void CHL2MP_Player::GiveDefaultItems( void ) @@ -526,7 +533,11 @@ CBaseEntity *ent = NULL; RemoveEffects( EF_NODRAW ); GiveDefaultItems(); - } + #ifdef Seco7_USE_PLAYERCLASSES + StartSprinting(); + StopSprinting(); + #endif //Seco7_USE_PLAYERCLASSES +} SetNumAnimOverlays( 3 ); ResetAnimation(); @@ -555,6 +566,43 @@ CBaseEntity *ent = NULL; SetPlayerUnderwater(false); m_bReady = false; +#ifdef Seco7_ENABLE_MAP_SPECIFIC_PLAYER_MODEL_OVERRIDES + //4WH - Information: This allows map makers to override player models per-map. Note that it sets the same player model for EVERY player. + CBaseEntity *pSwitchModelEnt = NULL; + Vector SwitchModelEntOrigin = GetAbsOrigin(); + pSwitchModelEnt = gEntList.FindEntityByClassnameNearest( "info_switchmodel", SwitchModelEntOrigin, 0); + + if (pSwitchModelEnt != NULL) + { + if (pSwitchModelEnt->NameMatches("metrocop")) + { + SetModel( "models/sdk/Humans/Group03/police_05.mdl" ); + m_iPlayerSoundType = (int)PLAYER_SOUNDS_METROPOLICE; + } + else if (pSwitchModelEnt->NameMatches("male05")) + { + SetModel( "models/sdk/Humans/Group03/male_05.mdl" ); + m_iPlayerSoundType = (int)PLAYER_SOUNDS_CITIZEN; + } + else if (pSwitchModelEnt->NameMatches("male06")) + { + SetModel( "models/sdk/Humans/Group03/male_06.mdl" ); + m_iPlayerSoundType = (int)PLAYER_SOUNDS_CITIZEN; + } + else if (pSwitchModelEnt->NameMatches("l7hrebel")) + { + SetModel( "models/sdk/Humans/Group03/l7h_rebel.mdl" ); + m_iPlayerSoundType = (int)PLAYER_SOUNDS_CITIZEN; + } + else + { + Msg ("Warning! switchmodel name NOT a valid model name!"); + SetModel( "models/sdk/Humans/Group03/male_05.mdl" ); + m_iPlayerSoundType = (int)PLAYER_SOUNDS_CITIZEN; + Msg ("Fail-safe player models have been set!"); + } + } +#endif //Seco7_ENABLE_MAP_SPECIFIC_PLAYER_MODEL_OVERRIDES } void CHL2MP_Player::PickupObject( CBaseEntity *pObject, bool bLimitMassAndSize ) @@ -645,7 +693,7 @@ void CHL2MP_Player::SetPlayerTeamModel( void ) if ( modelIndex == -1 || ValidatePlayerModel( szModelName ) == false ) { - szModelName = "models/Combine_Soldier.mdl"; + szModelName = "models/sdk/humans/group03/police_05.mdl";//4WH szModelName = "models/Combine_Soldier.mdl"; m_iModelType = TEAM_COMBINE; char szReturnString[512]; @@ -746,7 +794,7 @@ void CHL2MP_Player::SetPlayerModel( void ) if ( modelIndex == -1 ) { - szModelName = "models/Combine_Soldier.mdl"; + szModelName = "models/sdk/humans/group03/police_05.mdl";//4WH szModelName = "models/Combine_Soldier.mdl"; m_iModelType = TEAM_COMBINE; char szReturnString[512]; diff --git a/mp/src/game/server/physconstraint.cpp b/mp/src/game/server/physconstraint.cpp index 3f9c9f2e8..2e77094d3 100644 --- a/mp/src/game/server/physconstraint.cpp +++ b/mp/src/game/server/physconstraint.cpp @@ -574,8 +574,18 @@ void CPhysConstraint::GetConstraintObjects( hl_constraint_info_t &info ) { Warning("Bogus constraint %s (attaches ENTITY NOT FOUND:%s to %s)\n", GetDebugName(), STRING(m_nameAttach1), STRING(m_nameAttach2)); #ifdef HL2_EPISODIC +//4WH - Information: Added in these to prevent hl2/ep1 maps from having NULL physics constraints. +if ( !Q_strnicmp( gpGlobals->mapname.ToCStr(), "ep1_", 4 ) +|| !Q_strnicmp( gpGlobals->mapname.ToCStr(), "d1_", 3 ) +|| !Q_strnicmp( gpGlobals->mapname.ToCStr(), "d2_", 3 ) +|| !Q_strnicmp( gpGlobals->mapname.ToCStr(), "d3_", 3 ) ) + { + } + else + { info.pObjects[0] = info.pObjects[1] = NULL; return; + } #endif // HL2_EPISODIC } info.pObjects[0] = g_PhysWorldObject; @@ -587,8 +597,18 @@ void CPhysConstraint::GetConstraintObjects( hl_constraint_info_t &info ) { Warning("Bogus constraint %s (attaches %s to ENTITY NOT FOUND:%s)\n", GetDebugName(), STRING(m_nameAttach1), STRING(m_nameAttach2)); #ifdef HL2_EPISODIC +//4WH - Information: Added in these to prevent hl2/ep1 maps from having NULL physics constraints. +if ( !Q_strnicmp( gpGlobals->mapname.ToCStr(), "ep1_", 4 ) +|| !Q_strnicmp( gpGlobals->mapname.ToCStr(), "d1_", 3 ) +|| !Q_strnicmp( gpGlobals->mapname.ToCStr(), "d2_", 3 ) +|| !Q_strnicmp( gpGlobals->mapname.ToCStr(), "d3_", 3 ) ) + { + } + else + { info.pObjects[0] = info.pObjects[1] = NULL; return; + } #endif // HL2_EPISODIC } info.pObjects[1] = info.pObjects[0]; diff --git a/mp/src/game/server/player.cpp b/mp/src/game/server/player.cpp index 98bd6c340..0838bf74d 100644 --- a/mp/src/game/server/player.cpp +++ b/mp/src/game/server/player.cpp @@ -6177,6 +6177,7 @@ void CBasePlayer::ImpulseCommands( ) m_nImpulse = 0; } +#ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING #ifdef HL2_EPISODIC //----------------------------------------------------------------------------- @@ -6187,7 +6188,7 @@ static void CreateJalopy( CBasePlayer *pPlayer ) // Cheat to create a jeep in front of the player Vector vecForward; AngleVectors( pPlayer->EyeAngles(), &vecForward ); - CBaseEntity *pJeep = (CBaseEntity *)CreateEntityByName( "prop_vehicle_jeep" ); + CBaseEntity *pJeep = (CBaseEntity *)CreateEntityByName( "prop_vehicle_jalopy" ); if ( pJeep ) { Vector vecOrigin = pPlayer->GetAbsOrigin() + vecForward * 256 + Vector(0,0,64); @@ -6239,7 +6240,7 @@ static void CreateJeep( CBasePlayer *pPlayer ) pJeep->SetAbsAngles( vecAngles ); pJeep->KeyValue( "model", "models/buggy.mdl" ); pJeep->KeyValue( "solid", "6" ); - pJeep->KeyValue( "targetname", "jeep" ); + pJeep->KeyValue( "targetname", "hl2buggy" ); pJeep->KeyValue( "vehiclescript", "scripts/vehicles/jeep_test.txt" ); DispatchSpawn( pJeep ); pJeep->Activate(); @@ -6298,7 +6299,7 @@ void CC_CH_CreateAirboat( void ) } static ConCommand ch_createairboat( "ch_createairboat", CC_CH_CreateAirboat, "Spawn airboat in front of the player.", FCVAR_CHEAT ); - +#endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING //========================================================= //========================================================= @@ -6309,6 +6310,10 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) { return; } + +#ifndef Seco7_ALLOW_VALVE_APPROVED_CHEATING +return; +#endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING CBaseEntity *pEntity; trace_t tr; @@ -6336,16 +6341,20 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) break; case 82: + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING // Cheat to create a jeep in front of the player CreateJeep( this ); + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING break; case 83: - // Cheat to create a airboat in front of the player + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING CreateAirboat( this ); + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING break; case 101: + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING gEvilImpulse101 = true; EquipSuit(); @@ -6384,15 +6393,19 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) } gEvilImpulse101 = false; + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING break; case 102: + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING // Gibbage!!! CGib::SpawnRandomGibs( this, 1, GIB_HUMAN ); + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING break; case 103: + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING // What the hell are you doing? pEntity = FindEntityForward( this, true ); if ( pEntity ) @@ -6401,9 +6414,11 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) if ( pNPC ) pNPC->ReportAIState(); } + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING break; case 106: + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING // Give me the classname and targetname of this entity. pEntity = FindEntityForward( this, true ); if ( pEntity ) @@ -6426,9 +6441,11 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) if ( pEntity->m_iGlobalname != NULL_STRING ) Msg( "Globalname: %s\n", STRING(pEntity->m_iGlobalname) ); } + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING break; case 107: + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING { trace_t tr; @@ -6447,6 +6464,7 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) if ( pTextureName ) Msg( "Texture: %s\n", pTextureName ); } + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING break; // @@ -6454,6 +6472,7 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) // case 108: { + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING pEntity = FindEntityForward( this, true ); if ( pEntity ) { @@ -6464,26 +6483,34 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) CAI_BaseNPC::SetDebugNPC( pNPC ); } } + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING break; } case 195:// show shortest paths for entire level to nearest node { + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING Create("node_viewer_fly", GetLocalOrigin(), GetLocalAngles()); + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING } break; case 196:// show shortest paths for entire level to nearest node { + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING Create("node_viewer_large", GetLocalOrigin(), GetLocalAngles()); + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING } break; case 197:// show shortest paths for entire level to nearest node { + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING Create("node_viewer_human", GetLocalOrigin(), GetLocalAngles()); + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING } break; case 202:// Random blood splatter { + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING Vector forward; EyeVectors( &forward ); UTIL_TraceLine ( EyePosition(), @@ -6495,15 +6522,18 @@ void CBasePlayer::CheatImpulseCommands( int iImpulse ) CBloodSplat *pBlood = CREATE_UNSAVED_ENTITY( CBloodSplat, "bloodsplat" ); pBlood->Spawn( this ); } + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING } break; case 203:// remove creature. pEntity = FindEntityForward( this, true ); if ( pEntity ) { + #ifdef Seco7_ALLOW_VALVE_APPROVED_CHEATING UTIL_Remove( pEntity ); // if ( pEntity->m_takedamage ) // pEntity->SetThink(SUB_Remove); + #endif //Seco7_ALLOW_VALVE_APPROVED_CHEATING } break; } diff --git a/mp/src/game/server/recipientfilter.cpp b/mp/src/game/server/recipientfilter.cpp index 4c32d3760..89b64a5ad 100644 --- a/mp/src/game/server/recipientfilter.cpp +++ b/mp/src/game/server/recipientfilter.cpp @@ -369,6 +369,15 @@ CTeamRecipientFilter::CTeamRecipientFilter( int team, bool isReliable ) //----------------------------------------------------------------------------- void CPASAttenuationFilter::Filter( const Vector& origin, float attenuation /*= ATTN_NORM*/ ) { + + //4WH - Information: Try as we might, this was the only fix for getting breencasts. + // Don't crop for attenuation + if ( gpGlobals->maxClients >= 1 ) + { + AddAllPlayers(); + return; + } + // Don't crop for attenuation in single player if ( gpGlobals->maxClients == 1 ) return; diff --git a/mp/src/game/server/soundscape.cpp b/mp/src/game/server/soundscape.cpp index fcf4d7425..c5a41202d 100644 --- a/mp/src/game/server/soundscape.cpp +++ b/mp/src/game/server/soundscape.cpp @@ -307,7 +307,14 @@ void CEnvSoundscape::UpdateForPlayer( ss_update_t &update ) // draw myself NDebugOverlay::Box(GetAbsOrigin(), Vector(-10,-10,-10), Vector(10,10,10), 255, 0, 255, 64, NDEBUG_PERSIST_TILL_NEXT_SERVER ); - if ( update.pPlayer ) +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + CBasePlayer *pPlayer = UTIL_GetLocalPlayer(); +#else +// Don't use GetLocalPlayer(), because that prevents multiplayer games using this for testing with a single client in the game + CBasePlayer *pPlayer = UTIL_PlayerByIndex(1); +#endif //Seco7_Enable_Fixed_Multiplayer_AI + +if ( update.pPlayer ) { audioparams_t &audio = update.pPlayer->GetAudioParams(); if ( audio.ent.Get() != this ) diff --git a/mp/src/game/shared/hl2mp/hl2mp_gamerules.cpp b/mp/src/game/shared/hl2mp/hl2mp_gamerules.cpp index 237422f82..2c162a4b0 100644 --- a/mp/src/game/shared/hl2mp/hl2mp_gamerules.cpp +++ b/mp/src/game/shared/hl2mp/hl2mp_gamerules.cpp @@ -36,6 +36,13 @@ #include "voice_gamemgr.h" #include "hl2mp_gameinterface.h" #include "hl2mp_cvars.h" + + + + +//4WH - Episodic Issues: Here we include the globalstate.h file so that darkness mode will work for GLOBAL_ON state. +#include "globalstate.h" +#include "FileSystem.h" #ifdef DEBUG #include "hl2mp_bot_temp.h" @@ -345,7 +352,7 @@ if( physcannon_mega_enabled.GetBool() == true ) else { // FIXME: Is there a better place for this? -//4WH Fix Me m_bMegaPhysgun = ( GlobalEntity_GetState("super_phys_gun") == GLOBAL_ON ); + m_bMegaPhysgun = ( GlobalEntity_GetState("super_phys_gun") == GLOBAL_ON ); } #endif //Seco7_ALLOW_SUPER_GRAVITY_GUN @@ -2414,7 +2421,7 @@ bool CHL2MPRules::IsAlyxInDarknessMode() if ( alyx_darkness_force.GetBool() ) return true; -//4WH Fix Me return ( GlobalEntity_GetState( "ep_alyx_darknessmode" ) == GLOBAL_ON ); + return ( GlobalEntity_GetState( "ep_alyx_darknessmode" ) == GLOBAL_ON ); #else return false; #endif // HL2_EPISODIC diff --git a/mp/src/game/shared/hl2mp/weapon_ar2.cpp b/mp/src/game/shared/hl2mp/weapon_ar2.cpp index bc6bec0b2..505ea6f0c 100644 --- a/mp/src/game/shared/hl2mp/weapon_ar2.cpp +++ b/mp/src/game/shared/hl2mp/weapon_ar2.cpp @@ -15,6 +15,9 @@ #include "hl2mp_player.h" #include "te_effect_dispatch.h" #include "prop_combine_ball.h" +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + #include "npc_combines.h" +#endif //Seco7_Enable_Fixed_Multiplayer_AI #endif #include "weapon_ar2.h" @@ -46,7 +49,7 @@ LINK_ENTITY_TO_CLASS( weapon_ar2, CWeaponAR2 ); PRECACHE_WEAPON_REGISTER(weapon_ar2); -#ifndef CLIENT_DLL +//#ifndef CLIENT_DLL acttable_t CWeaponAR2::m_acttable[] = { @@ -58,11 +61,86 @@ acttable_t CWeaponAR2::m_acttable[] = { ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_AR2, false }, { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_AR2, false }, { ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_AR2, false }, +#ifdef Seco7_Enable_Fixed_Multiplayer_AI +{ ACT_MP_STAND_IDLE, ACT_HL2MP_IDLE_AR2, false }, + { ACT_MP_CROUCH_IDLE, ACT_HL2MP_IDLE_CROUCH_AR2, false }, + + { ACT_MP_RUN, ACT_HL2MP_RUN_AR2, false }, + { ACT_MP_CROUCHWALK, ACT_HL2MP_WALK_CROUCH_AR2, false }, + + { ACT_MP_ATTACK_STAND_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2, false }, + { ACT_MP_ATTACK_CROUCH_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2, false }, + + { ACT_MP_RELOAD_STAND, ACT_HL2MP_GESTURE_RELOAD_AR2, false }, + { ACT_MP_RELOAD_CROUCH, ACT_HL2MP_GESTURE_RELOAD_AR2, false }, + + { ACT_MP_JUMP, ACT_HL2MP_JUMP_AR2, false }, + +//NPC Stuff. + +#ifndef CLIENT_DLL + // HL2 + { ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_AR2, true }, + + { ACT_RELOAD, ACT_RELOAD_SMG1, true }, // FIXME: hook to AR2 unique + { ACT_IDLE, ACT_IDLE_SMG1, true }, // FIXME: hook to AR2 unique + { ACT_IDLE_ANGRY, ACT_IDLE_ANGRY_SMG1, true }, // FIXME: hook to AR2 unique + + + + { ACT_WALK, ACT_WALK_RIFLE, true }, + + + +// Readiness activities (not aiming) + { ACT_IDLE_RELAXED, ACT_IDLE_SMG1_RELAXED, false },//never aims + { ACT_IDLE_STIMULATED, ACT_IDLE_SMG1_STIMULATED, false }, + { ACT_IDLE_AGITATED, ACT_IDLE_ANGRY_SMG1, false },//always aims + + + { ACT_WALK_RELAXED, ACT_WALK_RIFLE_RELAXED, false },//never aims + { ACT_WALK_STIMULATED, ACT_WALK_RIFLE_STIMULATED, false }, + { ACT_WALK_AGITATED, ACT_WALK_AIM_RIFLE, false },//always aims + + { ACT_RUN_RELAXED, ACT_RUN_RIFLE_RELAXED, false },//never aims + { ACT_RUN_STIMULATED, ACT_RUN_RIFLE_STIMULATED, false }, + { ACT_RUN_AGITATED, ACT_RUN_AIM_RIFLE, false },//always aims + +// Readiness activities (aiming) + { ACT_IDLE_AIM_RELAXED, ACT_IDLE_SMG1_RELAXED, false },//never aims + { ACT_IDLE_AIM_STIMULATED, ACT_IDLE_AIM_RIFLE_STIMULATED, false }, + { ACT_IDLE_AIM_AGITATED, ACT_IDLE_ANGRY_SMG1, false },//always aims + + { ACT_WALK_AIM_RELAXED, ACT_WALK_RIFLE_RELAXED, false },//never aims + { ACT_WALK_AIM_STIMULATED, ACT_WALK_AIM_RIFLE_STIMULATED, false }, + { ACT_WALK_AIM_AGITATED, ACT_WALK_AIM_RIFLE, false },//always aims + + { ACT_RUN_AIM_RELAXED, ACT_RUN_RIFLE_RELAXED, false },//never aims + { ACT_RUN_AIM_STIMULATED, ACT_RUN_AIM_RIFLE_STIMULATED, false }, + { ACT_RUN_AIM_AGITATED, ACT_RUN_AIM_RIFLE, false },//always aims +//End readiness activities + + { ACT_WALK_AIM, ACT_WALK_AIM_RIFLE, true }, + { ACT_WALK_CROUCH, ACT_WALK_CROUCH_RIFLE, true }, + { ACT_WALK_CROUCH_AIM, ACT_WALK_CROUCH_AIM_RIFLE, true }, + { ACT_RUN, ACT_RUN_RIFLE, true }, + { ACT_RUN_AIM, ACT_RUN_AIM_RIFLE, true }, + { ACT_RUN_CROUCH, ACT_RUN_CROUCH_RIFLE, true }, + { ACT_RUN_CROUCH_AIM, ACT_RUN_CROUCH_AIM_RIFLE, true }, + { ACT_GESTURE_RANGE_ATTACK1, ACT_GESTURE_RANGE_ATTACK_AR2, false }, + { ACT_COVER_LOW, ACT_COVER_SMG1_LOW, false }, // FIXME: hook to AR2 unique + { ACT_RANGE_AIM_LOW, ACT_RANGE_AIM_AR2_LOW, false }, + { ACT_RANGE_ATTACK1_LOW, ACT_RANGE_ATTACK_SMG1_LOW, true }, // FIXME: hook to AR2 unique + { ACT_RELOAD_LOW, ACT_RELOAD_SMG1_LOW, false }, + { ACT_GESTURE_RELOAD, ACT_GESTURE_RELOAD_SMG1, true }, +// { ACT_RANGE_ATTACK2, ACT_RANGE_ATTACK_AR2_GRENADE, true }, +#endif +#endif //Seco7_Enable_Fixed_Multiplayer_AI }; IMPLEMENT_ACTTABLE(CWeaponAR2); -#endif +//#endif CWeaponAR2::CWeaponAR2( ) { @@ -84,9 +162,144 @@ void CWeaponAR2::Precache( void ) UTIL_PrecacheOther( "prop_combine_ball" ); UTIL_PrecacheOther( "env_entity_dissolver" ); +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + PrecacheMaterial( "effects/strider_muzzle" ); +#endif //Seco7_Enable_Fixed_Multiplayer_AI #endif } +#ifdef Seco7_Enable_Fixed_Multiplayer_AI +#ifndef CLIENT_DLL +//----------------------------------------------------------------------------- +// Purpose: +// Input : *pOperator - +//----------------------------------------------------------------------------- +void CWeaponAR2::FireNPCPrimaryAttack( CBaseCombatCharacter *pOperator, bool bUseWeaponAngles ) +{ + Vector vecShootOrigin, vecShootDir; + + CAI_BaseNPC *npc = pOperator->MyNPCPointer(); + ASSERT( npc != NULL ); + + if ( bUseWeaponAngles ) + { + QAngle angShootDir; + GetAttachment( LookupAttachment( "muzzle" ), vecShootOrigin, angShootDir ); + AngleVectors( angShootDir, &vecShootDir ); + } + else + { + vecShootOrigin = pOperator->Weapon_ShootPosition(); + vecShootDir = npc->GetActualShootTrajectory( vecShootOrigin ); + } + + WeaponSoundRealtime( SINGLE_NPC ); + + CSoundEnt::InsertSound( SOUND_COMBAT|SOUND_CONTEXT_GUNFIRE, pOperator->GetAbsOrigin(), SOUNDENT_VOLUME_MACHINEGUN, 0.2, pOperator, SOUNDENT_CHANNEL_WEAPON, pOperator->GetEnemy() ); + + pOperator->FireBullets( 1, vecShootOrigin, vecShootDir, VECTOR_CONE_PRECALCULATED, MAX_TRACE_LENGTH, m_iPrimaryAmmoType, 2 ); + + // NOTENOTE: This is overriden on the client-side + // pOperator->DoMuzzleFlash(); + + m_iClip1 = m_iClip1 - 1; +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void CWeaponAR2::FireNPCSecondaryAttack( CBaseCombatCharacter *pOperator, bool bUseWeaponAngles ) +{ + WeaponSound( WPN_DOUBLE ); + + CNPC_Combine *pSoldier; + + pSoldier = dynamic_cast(GetOwner()); + + if( !pSoldier ) + return; + + // Fire! + Vector vecSrc; + Vector vecAiming; + + if ( bUseWeaponAngles ) + { + QAngle angShootDir; + GetAttachment( LookupAttachment( "muzzle" ), vecSrc, angShootDir ); + AngleVectors( angShootDir, &vecAiming ); + } + else + { + vecSrc = pSoldier->Weapon_ShootPosition( ); + vecAiming = pSoldier->GetAltFireTarget() - vecSrc; + VectorNormalize( vecAiming ); + } + + Vector impactPoint = vecSrc + ( vecAiming * MAX_TRACE_LENGTH ); + + float flAmmoRatio = 1.0f; + float flDuration = RemapValClamped( flAmmoRatio, 0.0f, 1.0f, 0.5f, sk_weapon_ar2_alt_fire_duration.GetFloat() ); + float flRadius = RemapValClamped( flAmmoRatio, 0.0f, 1.0f, 4.0f, sk_weapon_ar2_alt_fire_radius.GetFloat() ); + + // Fire the bullets + Vector vecVelocity = vecAiming * 1000.0f; + + // Fire the combine ball + CreateCombineBall( vecSrc, + vecVelocity, + flRadius, + sk_weapon_ar2_alt_fire_mass.GetFloat(), + flDuration, + pSoldier ); +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void CWeaponAR2::Operator_ForceNPCFire( CBaseCombatCharacter *pOperator, bool bSecondary ) +{ + if ( bSecondary ) + { + FireNPCSecondaryAttack( pOperator, true ); + } + else + { + // Ensure we have enough rounds in the clip + m_iClip1++; + + FireNPCPrimaryAttack( pOperator, true ); + } +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : *pEvent - +// *pOperator - +//----------------------------------------------------------------------------- +void CWeaponAR2::Operator_HandleAnimEvent( animevent_t *pEvent, CBaseCombatCharacter *pOperator ) +{ + switch( pEvent->event ) + { + case EVENT_WEAPON_AR2: + { + FireNPCPrimaryAttack( pOperator, false ); + } + break; + + case EVENT_WEAPON_AR2_ALTFIRE: + { + FireNPCSecondaryAttack( pOperator, false ); + } + break; + + default: + CBaseCombatWeapon::Operator_HandleAnimEvent( pEvent, pOperator ); + break; + } +} +#endif +#endif //Seco7_Enable_Fixed_Multiplayer_AI //----------------------------------------------------------------------------- // Purpose: Handle grenade detonate in-air (even when no ammo is left) diff --git a/mp/src/game/shared/hl2mp/weapon_ar2.h b/mp/src/game/shared/hl2mp/weapon_ar2.h index f2222038c..ef37603fd 100644 --- a/mp/src/game/shared/hl2mp/weapon_ar2.h +++ b/mp/src/game/shared/hl2mp/weapon_ar2.h @@ -74,10 +74,17 @@ protected: float m_flDelayedFire; bool m_bShotDelayed; int m_nVentPose; - -#ifndef CLIENT_DLL DECLARE_ACTTABLE(); + +#ifdef Seco7_Enable_Fixed_Multiplayer_AI +#ifndef CLIENT_DLL + int CapabilitiesGet( void ) { return bits_CAP_WEAPON_RANGE_ATTACK1; } + void Operator_HandleAnimEvent( animevent_t *pEvent, CBaseCombatCharacter *pOperator ); + void Operator_ForceNPCFire( CBaseCombatCharacter *pOperator, bool bSecondary ); + void FireNPCSecondaryAttack( CBaseCombatCharacter *pOperator, bool bUseWeaponAngles ); + void FireNPCPrimaryAttack( CBaseCombatCharacter *pOperator, bool bUseWeaponAngles ); #endif +#endif //Seco7_Enable_Fixed_Multiplayer_AI }; diff --git a/mp/src/game/shared/hl2mp/weapon_crossbow.cpp b/mp/src/game/shared/hl2mp/weapon_crossbow.cpp index 0656c2a06..4a6cdbd9b 100644 --- a/mp/src/game/shared/hl2mp/weapon_crossbow.cpp +++ b/mp/src/game/shared/hl2mp/weapon_crossbow.cpp @@ -433,9 +433,9 @@ private: void SetChargerState( ChargerState_t state ); void DoLoadEffect( void ); -#ifndef CLIENT_DLL +//4WH #ifndef CLIENT_DLL DECLARE_ACTTABLE(); -#endif +//#endif private: @@ -475,7 +475,7 @@ LINK_ENTITY_TO_CLASS( weapon_crossbow, CWeaponCrossbow ); PRECACHE_WEAPON_REGISTER( weapon_crossbow ); -#ifndef CLIENT_DLL +//4WH #ifndef CLIENT_DLL acttable_t CWeaponCrossbow::m_acttable[] = { @@ -486,11 +486,26 @@ acttable_t CWeaponCrossbow::m_acttable[] = { ACT_HL2MP_GESTURE_RANGE_ATTACK, ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, false }, { ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_CROSSBOW, false }, { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_CROSSBOW, false }, +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + { ACT_MP_STAND_IDLE, ACT_HL2MP_IDLE_CROSSBOW, false }, + { ACT_MP_CROUCH_IDLE, ACT_HL2MP_IDLE_CROUCH_CROSSBOW, false }, + + { ACT_MP_RUN, ACT_HL2MP_RUN_CROSSBOW, false }, + { ACT_MP_CROUCHWALK, ACT_HL2MP_WALK_CROUCH_CROSSBOW, false }, + + { ACT_MP_ATTACK_STAND_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, false }, + { ACT_MP_ATTACK_CROUCH_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, false }, + + { ACT_MP_RELOAD_STAND, ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, false }, + { ACT_MP_RELOAD_CROUCH, ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, false }, + + { ACT_MP_JUMP, ACT_HL2MP_JUMP_CROSSBOW, false }, +#endif //Seco7_Enable_Fixed_Multiplayer_AI }; IMPLEMENT_ACTTABLE(CWeaponCrossbow); -#endif +//#endif //----------------------------------------------------------------------------- // Purpose: Constructor diff --git a/mp/src/game/shared/hl2mp/weapon_crowbar.cpp b/mp/src/game/shared/hl2mp/weapon_crowbar.cpp index 800e1036b..d31711007 100644 --- a/mp/src/game/shared/hl2mp/weapon_crowbar.cpp +++ b/mp/src/game/shared/hl2mp/weapon_crowbar.cpp @@ -49,14 +49,33 @@ PRECACHE_WEAPON_REGISTER( weapon_crowbar ); acttable_t CWeaponCrowbar::m_acttable[] = { - { ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SLAM, true }, + { ACT_MP_STAND_IDLE, ACT_HL2MP_IDLE_MELEE, false }, + { ACT_MP_CROUCH_IDLE, ACT_HL2MP_IDLE_CROUCH_MELEE, false }, + + { ACT_MP_RUN, ACT_HL2MP_RUN_MELEE, false }, + { ACT_MP_CROUCHWALK, ACT_HL2MP_WALK_CROUCH_MELEE, false }, + + { ACT_MP_ATTACK_STAND_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE, false }, + { ACT_MP_ATTACK_CROUCH_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE, false }, + + { ACT_MP_RELOAD_STAND, ACT_HL2MP_GESTURE_RELOAD_MELEE, false }, + { ACT_MP_RELOAD_CROUCH, ACT_HL2MP_GESTURE_RELOAD_MELEE, false }, + + { ACT_MP_JUMP, ACT_HL2MP_JUMP_MELEE, false }, +#ifdef Seco7_Enable_Fixed_Multiplayer_AI { ACT_HL2MP_IDLE, ACT_HL2MP_IDLE_MELEE, false }, { ACT_HL2MP_RUN, ACT_HL2MP_RUN_MELEE, false }, { ACT_HL2MP_IDLE_CROUCH, ACT_HL2MP_IDLE_CROUCH_MELEE, false }, { ACT_HL2MP_WALK_CROUCH, ACT_HL2MP_WALK_CROUCH_MELEE, false }, { ACT_HL2MP_GESTURE_RANGE_ATTACK, ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE, false }, - { ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_MELEE, false }, + { ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_MELEE, false }, { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_MELEE, false }, + + + { ACT_MELEE_ATTACK1, ACT_MELEE_ATTACK_SWING, true }, + { ACT_IDLE, ACT_IDLE_ANGRY_MELEE, false }, + { ACT_IDLE_ANGRY, ACT_IDLE_ANGRY_MELEE, false }, +#endif //Seco7_Enable_Fixed_Multiplayer_AI }; IMPLEMENT_ACTTABLE(CWeaponCrowbar); @@ -101,6 +120,7 @@ void CWeaponCrowbar::AddViewKick( void ) #ifndef CLIENT_DLL + //----------------------------------------------------------------------------- // Animation event handlers //----------------------------------------------------------------------------- @@ -111,6 +131,23 @@ void CWeaponCrowbar::HandleAnimEventMeleeHit( animevent_t *pEvent, CBaseCombatCh Vector vecDirection; AngleVectors( GetAbsAngles(), &vecDirection ); +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + CBaseEntity *pEnemy = pOperator->MyNPCPointer() ? pOperator->MyNPCPointer()->GetEnemy() : NULL; + if ( pEnemy ) + { + Vector vecDelta; + VectorSubtract( pEnemy->WorldSpaceCenter(), pOperator->Weapon_ShootPosition(), vecDelta ); + VectorNormalize( vecDelta ); + + Vector2D vecDelta2D = vecDelta.AsVector2D(); + Vector2DNormalize( vecDelta2D ); + if ( DotProduct2D( vecDelta2D, vecDirection.AsVector2D() ) > 0.8f ) + { + vecDirection = vecDelta; + } + } +#endif //Seco7_Enable_Fixed_Multiplayer_AI + Vector vecEnd; VectorMA( pOperator->Weapon_ShootPosition(), 50, vecDirection, vecEnd ); CBaseEntity *pHurt = pOperator->CheckTraceHullAttack( pOperator->Weapon_ShootPosition(), vecEnd, diff --git a/mp/src/game/shared/hl2mp/weapon_frag.cpp b/mp/src/game/shared/hl2mp/weapon_frag.cpp index c0fba6c9b..75951a082 100644 --- a/mp/src/game/shared/hl2mp/weapon_frag.cpp +++ b/mp/src/game/shared/hl2mp/weapon_frag.cpp @@ -99,6 +99,25 @@ acttable_t CWeaponFrag::m_acttable[] = { ACT_HL2MP_GESTURE_RANGE_ATTACK, ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, false }, { ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_GRENADE, false }, { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_GRENADE, false }, + +#ifdef Seco7_Enable_Fixed_Multiplayer_AI +{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SLAM, true }, + + { ACT_MP_STAND_IDLE, ACT_HL2MP_IDLE_GRENADE, false }, + { ACT_MP_CROUCH_IDLE, ACT_HL2MP_IDLE_CROUCH_GRENADE, false }, + + { ACT_MP_RUN, ACT_HL2MP_RUN_GRENADE, false }, + { ACT_MP_CROUCHWALK, ACT_HL2MP_WALK_CROUCH_GRENADE, false }, + + { ACT_MP_ATTACK_STAND_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, false }, + { ACT_MP_ATTACK_CROUCH_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, false }, + + { ACT_MP_RELOAD_STAND, ACT_HL2MP_GESTURE_RELOAD_GRENADE, false }, + { ACT_MP_RELOAD_CROUCH, ACT_HL2MP_GESTURE_RELOAD_GRENADE, false }, + + { ACT_MP_JUMP, ACT_HL2MP_JUMP_GRENADE, false }, +#endif //Seco7_Enable_Fixed_Multiplayer_AI + }; IMPLEMENT_ACTTABLE(CWeaponFrag); diff --git a/mp/src/game/shared/hl2mp/weapon_physcannon.cpp b/mp/src/game/shared/hl2mp/weapon_physcannon.cpp index 7595916fe..23de41a23 100644 --- a/mp/src/game/shared/hl2mp/weapon_physcannon.cpp +++ b/mp/src/game/shared/hl2mp/weapon_physcannon.cpp @@ -1399,6 +1399,18 @@ acttable_t CWeaponPhysCannon::m_acttable[] = { ACT_MP_RELOAD_CROUCH, ACT_HL2MP_GESTURE_RELOAD_PHYSGUN, false }, { ACT_MP_JUMP, ACT_HL2MP_JUMP_PHYSGUN, false }, + +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + { ACT_HL2MP_IDLE, ACT_HL2MP_IDLE_PHYSGUN, false }, + { ACT_HL2MP_RUN, ACT_HL2MP_RUN_PHYSGUN, false }, + { ACT_HL2MP_IDLE_CROUCH, ACT_HL2MP_IDLE_CROUCH_PHYSGUN, false }, + { ACT_HL2MP_WALK_CROUCH, ACT_HL2MP_WALK_CROUCH_PHYSGUN, false }, + { ACT_HL2MP_GESTURE_RANGE_ATTACK, ACT_HL2MP_GESTURE_RANGE_ATTACK_PHYSGUN, false }, + { ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_PHYSGUN, false }, + { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_PHYSGUN, false }, + + { ACT_RANGE_ATTACK1, ACT_HL2MP_GESTURE_RANGE_ATTACK_PHYSGUN, false }, +#endif //#Seco7_Enable_Fixed_Multiplayer_AI }; IMPLEMENT_ACTTABLE(CWeaponPhysCannon); diff --git a/mp/src/game/shared/hl2mp/weapon_pistol.cpp b/mp/src/game/shared/hl2mp/weapon_pistol.cpp index db55fc75e..48b391fad 100644 --- a/mp/src/game/shared/hl2mp/weapon_pistol.cpp +++ b/mp/src/game/shared/hl2mp/weapon_pistol.cpp @@ -145,8 +145,22 @@ acttable_t CWeaponPistol::m_acttable[] = { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_PISTOL, false }, { ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_PISTOL, false }, #ifdef Seco7_Enable_Fixed_Multiplayer_AI - { ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_PISTOL, false }, + { ACT_MP_STAND_IDLE, ACT_HL2MP_IDLE_PISTOL, false }, + { ACT_MP_CROUCH_IDLE, ACT_HL2MP_IDLE_CROUCH_PISTOL, false }, + { ACT_MP_RUN, ACT_HL2MP_RUN_PISTOL, false }, + { ACT_MP_CROUCHWALK, ACT_HL2MP_WALK_CROUCH_PISTOL, false }, + + { ACT_MP_ATTACK_STAND_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, false }, + { ACT_MP_ATTACK_CROUCH_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, false }, + + { ACT_MP_RELOAD_STAND, ACT_HL2MP_GESTURE_RELOAD_PISTOL, false }, + { ACT_MP_RELOAD_CROUCH, ACT_HL2MP_GESTURE_RELOAD_PISTOL, false }, + + { ACT_MP_JUMP, ACT_HL2MP_JUMP_PISTOL, false }, + + + { ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_PISTOL, false }, // HL2 { ACT_IDLE, ACT_IDLE_PISTOL, true }, diff --git a/mp/src/game/shared/hl2mp/weapon_rpg.cpp b/mp/src/game/shared/hl2mp/weapon_rpg.cpp index 4d963c308..885a3c387 100644 --- a/mp/src/game/shared/hl2mp/weapon_rpg.cpp +++ b/mp/src/game/shared/hl2mp/weapon_rpg.cpp @@ -1458,6 +1458,21 @@ acttable_t CWeaponRPG::m_acttable[] = { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_RPG, false }, { ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_RPG, false }, #ifdef Seco7_Enable_Fixed_Multiplayer_AI + { ACT_MP_STAND_IDLE, ACT_HL2MP_IDLE_RPG, false }, + { ACT_MP_CROUCH_IDLE, ACT_HL2MP_IDLE_CROUCH_RPG, false }, + + { ACT_MP_RUN, ACT_HL2MP_RUN_RPG, false }, + { ACT_MP_CROUCHWALK, ACT_HL2MP_WALK_CROUCH_RPG, false }, + + { ACT_MP_ATTACK_STAND_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_RPG, false }, + { ACT_MP_ATTACK_CROUCH_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_RPG, false }, + + { ACT_MP_RELOAD_STAND, ACT_HL2MP_GESTURE_RELOAD_RPG, false }, + { ACT_MP_RELOAD_CROUCH, ACT_HL2MP_GESTURE_RELOAD_RPG, false }, + + { ACT_MP_JUMP, ACT_HL2MP_JUMP_RPG, false }, + + { ACT_IDLE_RELAXED, ACT_IDLE_RPG_RELAXED, true }, // { ACT_IDLE_STIMULATED, ACT_IDLE_ANGRY_RPG, true }, // { ACT_IDLE_AGITATED, ACT_IDLE_ANGRY_RPG, true }, // diff --git a/mp/src/game/shared/hl2mp/weapon_shotgun.cpp b/mp/src/game/shared/hl2mp/weapon_shotgun.cpp index e88e991dd..92d0fb905 100644 --- a/mp/src/game/shared/hl2mp/weapon_shotgun.cpp +++ b/mp/src/game/shared/hl2mp/weapon_shotgun.cpp @@ -138,6 +138,14 @@ acttable_t CWeaponShotgun::m_acttable[] = { ACT_MP_JUMP, ACT_HL2MP_JUMP_SHOTGUN, false }, #ifdef Seco7_Enable_Fixed_Multiplayer_AI + { ACT_HL2MP_IDLE, ACT_HL2MP_IDLE_SHOTGUN, false }, + { ACT_HL2MP_RUN, ACT_HL2MP_RUN_SHOTGUN, false }, + { ACT_HL2MP_IDLE_CROUCH, ACT_HL2MP_IDLE_CROUCH_SHOTGUN, false }, + { ACT_HL2MP_WALK_CROUCH, ACT_HL2MP_WALK_CROUCH_SHOTGUN, false }, + { ACT_HL2MP_GESTURE_RANGE_ATTACK, ACT_HL2MP_GESTURE_RANGE_ATTACK_SHOTGUN, false }, + { ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_SHOTGUN, false }, + { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_SHOTGUN, false }, + { ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SHOTGUN, false }, // HL2 diff --git a/mp/src/game/shared/hl2mp/weapon_slam.cpp b/mp/src/game/shared/hl2mp/weapon_slam.cpp index bf2f771e4..e82a971db 100644 --- a/mp/src/game/shared/hl2mp/weapon_slam.cpp +++ b/mp/src/game/shared/hl2mp/weapon_slam.cpp @@ -102,6 +102,22 @@ acttable_t CWeapon_SLAM::m_acttable[] = { ACT_HL2MP_GESTURE_RANGE_ATTACK, ACT_HL2MP_GESTURE_RANGE_ATTACK_SLAM, false }, { ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_SLAM, false }, { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_SLAM, false }, +#ifdef Seco7_Enable_Fixed_Multiplayer_AI + + { ACT_MP_STAND_IDLE, ACT_HL2MP_IDLE_SLAM, false }, + { ACT_MP_CROUCH_IDLE, ACT_HL2MP_IDLE_CROUCH_SLAM, false }, + + { ACT_MP_RUN, ACT_HL2MP_RUN_SLAM, false }, + { ACT_MP_CROUCHWALK, ACT_HL2MP_WALK_CROUCH_SLAM, false }, + + { ACT_MP_ATTACK_STAND_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_SLAM, false }, + { ACT_MP_ATTACK_CROUCH_PRIMARYFIRE, ACT_HL2MP_GESTURE_RANGE_ATTACK_SLAM, false }, + + { ACT_MP_RELOAD_STAND, ACT_HL2MP_GESTURE_RELOAD_SLAM, false }, + { ACT_MP_RELOAD_CROUCH, ACT_HL2MP_GESTURE_RELOAD_SLAM, false }, + + { ACT_MP_JUMP, ACT_HL2MP_JUMP_SLAM, false }, +#endif //Seco7_Enable_Fixed_Multiplayer_AI }; IMPLEMENT_ACTTABLE(CWeapon_SLAM); diff --git a/mp/src/game/shared/hl2mp/weapon_smg1.cpp b/mp/src/game/shared/hl2mp/weapon_smg1.cpp index d5f30294e..9896c160b 100644 --- a/mp/src/game/shared/hl2mp/weapon_smg1.cpp +++ b/mp/src/game/shared/hl2mp/weapon_smg1.cpp @@ -109,7 +109,15 @@ acttable_t CWeaponSMG1::m_acttable[] = { ACT_MP_JUMP, ACT_HL2MP_JUMP_SMG1, false }, #ifdef Seco7_Enable_Fixed_Multiplayer_AI - { ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SMG1, false }, + + { ACT_HL2MP_IDLE, ACT_HL2MP_IDLE_SMG1, false }, + { ACT_HL2MP_RUN, ACT_HL2MP_RUN_SMG1, false }, + { ACT_HL2MP_IDLE_CROUCH, ACT_HL2MP_IDLE_CROUCH_SMG1, false }, + { ACT_HL2MP_WALK_CROUCH, ACT_HL2MP_WALK_CROUCH_SMG1, false }, + { ACT_HL2MP_GESTURE_RANGE_ATTACK, ACT_HL2MP_GESTURE_RANGE_ATTACK_SMG1, false }, + { ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_SMG1, false }, + { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_SMG1, false }, + { ACT_RANGE_ATTACK1, ACT_HL2MP_GESTURE_RANGE_ATTACK_SMG1, false }, // HL2 { ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SMG1, true }, diff --git a/mp/src/game/shared/movevars_shared.cpp b/mp/src/game/shared/movevars_shared.cpp index 439af89c9..c251d0fdd 100644 --- a/mp/src/game/shared/movevars_shared.cpp +++ b/mp/src/game/shared/movevars_shared.cpp @@ -51,7 +51,11 @@ ConVar sv_specnoclip ( "sv_specnoclip", "1", FCVAR_ARCHIVE | FCVAR_NOTIFY | FCVA #if defined( CSTRIKE_DLL ) ConVar sv_maxspeed ( "sv_maxspeed", "320", FCVAR_NOTIFY | FCVAR_REPLICATED); #else -ConVar sv_maxspeed ( "sv_maxspeed", "320", FCVAR_NOTIFY | FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY); + #ifdef Seco7_USE_PLAYERCLASSES + ConVar sv_maxspeed ( "sv_maxspeed", "5500", FCVAR_NOTIFY | FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY); //4WH - Information: Max Speed setting, must be the maximum speed a player can achieve. Default is 320. + #else + ConVar sv_maxspeed ( "sv_maxspeed", "320", FCVAR_NOTIFY | FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY); + #endif //Seco7_USE_PLAYERCLASSES #endif // CSTRIKE_DLL #ifdef _XBOX @@ -96,7 +100,11 @@ ConVar sv_backspeed ( "sv_backspeed", "0.6", FCVAR_ARCHIVE | FCVAR_REPLICATED, " ConVar sv_waterdist ( "sv_waterdist","12", FCVAR_REPLICATED, "Vertical view fixup when eyes are near water plane." ); #else ConVar sv_bounce ( "sv_bounce","0", FCVAR_NOTIFY | FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "Bounce multiplier for when physically simulated objects collide with other objects." ); -ConVar sv_maxvelocity ( "sv_maxvelocity","3500", FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "Maximum speed any ballistically moving object is allowed to attain per axis." ); + #ifdef Seco7_USE_PLAYERCLASSES + ConVar sv_maxvelocity ( "sv_maxvelocity","3500", FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "Maximum speed any ballistically moving object is allowed to attain per axis." ); + #else + ConVar sv_maxvelocity ( "sv_maxvelocity","3500", FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "Maximum speed any ballistically moving object is allowed to attain per axis." ); + #endif //Seco7_USE_PLAYERCLASSES ConVar sv_stepsize ( "sv_stepsize","18", FCVAR_NOTIFY | FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY ); ConVar sv_backspeed ( "sv_backspeed", "0.6", FCVAR_ARCHIVE | FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "How much to slow down backwards motion" ); ConVar sv_waterdist ( "sv_waterdist","12", FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "Vertical view fixup when eyes are near water plane." ); diff --git a/mp/src/game/shared/multiplay_gamerules.cpp b/mp/src/game/shared/multiplay_gamerules.cpp index 45797dc72..c923bb4e2 100644 --- a/mp/src/game/shared/multiplay_gamerules.cpp +++ b/mp/src/game/shared/multiplay_gamerules.cpp @@ -1118,7 +1118,7 @@ ConVarRef suitcharger( "sk_suitcharger" ); bool CMultiplayRules::PlayFootstepSounds( CBasePlayer *pl ) { if ( footsteps.GetInt() == 0 ) - return false; + return true; //4WH - Information: Always have footstep sounds enabled (by default this is false). if ( pl->IsOnLadder() || pl->GetAbsVelocity().Length2D() > 220 ) return true; // only make step sounds in multiplayer if the player is moving fast enough diff --git a/mp/src/game/shared/seco/seco7_shareddefs.h b/mp/src/game/shared/seco/seco7_shareddefs.h index 175babd2c..562a05981 100644 --- a/mp/src/game/shared/seco/seco7_shareddefs.h +++ b/mp/src/game/shared/seco/seco7_shareddefs.h @@ -106,7 +106,7 @@ /******************************/ /* Experimental Enhancements. */ /******************************/ -//#define Seco7_ENABLE_IN_TESTING_ITEMS //Enables buggy test items again, such as the Portal gun. Make sure you have Portal installed, and the portal mounting line enabled. Currently it likes to crash but I don't think it'd take much editing to fix, it's working fine, it just needs it to remove/recreate a new portal whenever you fire again. +#define Seco7_ENABLE_IN_TESTING_ITEMS //Enables buggy test items again, such as the Portal gun. Make sure you have Portal installed, and the portal mounting line enabled. Currently it likes to crash but I don't think it'd take much editing to fix, it's working fine, it just needs it to remove/recreate a new portal whenever you fire again. /******************/ /* SDK Bug Fixes. */ diff --git a/mp/src/game/shared/seco/weapon_hands.cpp b/mp/src/game/shared/seco/weapon_hands.cpp index 153cd028e..1fd37293a 100644 --- a/mp/src/game/shared/seco/weapon_hands.cpp +++ b/mp/src/game/shared/seco/weapon_hands.cpp @@ -61,6 +61,17 @@ acttable_t CWeaponhands::m_acttable[] = { ACT_MP_JUMP, ACT_HL2MP_JUMP_PISTOL, false }, #ifdef Seco7_Enable_Fixed_Multiplayer_AI + { ACT_HL2MP_IDLE, ACT_HL2MP_IDLE_PISTOL, false }, + { ACT_HL2MP_RUN, ACT_HL2MP_RUN_PISTOL, false }, + { ACT_HL2MP_IDLE_CROUCH, ACT_HL2MP_IDLE_CROUCH_PISTOL, false }, + { ACT_HL2MP_WALK_CROUCH, ACT_HL2MP_WALK_CROUCH_PISTOL, false }, + { ACT_HL2MP_GESTURE_RANGE_ATTACK, ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, false }, + { ACT_HL2MP_GESTURE_RELOAD, ACT_HL2MP_GESTURE_RELOAD_PISTOL, false }, + { ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_PISTOL, false }, + { ACT_RANGE_ATTACK1, ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, false }, + + + { ACT_MELEE_ATTACK1, ACT_MELEE_ATTACK_SWING, true }, { ACT_IDLE, ACT_IDLE_ANGRY_MELEE, false }, { ACT_IDLE_ANGRY, ACT_IDLE_ANGRY_MELEE, false },