diff --git a/Backup/q4sdk.sln b/Backup/q4sdk.sln new file mode 100644 index 000000000..2f4df2a3f --- /dev/null +++ b/Backup/q4sdk.sln @@ -0,0 +1,46 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "game.vcproj", "{49BEC5C6-B964-417A-851E-808886B57430}" + ProjectSection(ProjectDependencies) = postProject + {49BEC5C6-B964-417A-851E-808886B57400} = {49BEC5C6-B964-417A-851E-808886B57400} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "idLib", "idlib.vcproj", "{49BEC5C6-B964-417A-851E-808886B57400}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MPGame", "mpgame.vcproj", "{F2EF9123-B7C3-4F2F-A351-747B595BB534}" + ProjectSection(ProjectDependencies) = postProject + {49BEC5C6-B964-417A-851E-808886B57400} = {49BEC5C6-B964-417A-851E-808886B57400} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + DebugInline = DebugInline + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {49BEC5C6-B964-417A-851E-808886B57430}.Debug.ActiveCfg = Debug|Win32 + {49BEC5C6-B964-417A-851E-808886B57430}.Debug.Build.0 = Debug|Win32 + {49BEC5C6-B964-417A-851E-808886B57430}.DebugInline.ActiveCfg = DebugInline|Win32 + {49BEC5C6-B964-417A-851E-808886B57430}.DebugInline.Build.0 = DebugInline|Win32 + {49BEC5C6-B964-417A-851E-808886B57430}.Release.ActiveCfg = Release|Win32 + {49BEC5C6-B964-417A-851E-808886B57430}.Release.Build.0 = Release|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.Debug.ActiveCfg = Debug|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.Debug.Build.0 = Debug|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.DebugInline.ActiveCfg = DebugInline|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.DebugInline.Build.0 = DebugInline|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.Release.ActiveCfg = Release|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.Release.Build.0 = Release|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Debug.ActiveCfg = Debug|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Debug.Build.0 = Debug|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.DebugInline.ActiveCfg = DebugInline|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.DebugInline.Build.0 = DebugInline|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Release.ActiveCfg = Release|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md new file mode 100644 index 000000000..f411e0c6f --- /dev/null +++ b/README.md @@ -0,0 +1,116 @@ + +# Quake 4 Final Fantasy VII Remake Mod + +This mod takes some features from the game Final Fantasy VII Remake and implements them into the game Quake 4. These features include the semi-active combat system, some character/weapon abilites, and some items. + + +## Authors + +- [@Frokey17](https://www.github.com/Frokey17) + + +## How To Play + +1. Go to my git hub account which should be linked in Authors +2. Click on Q4-Project_GameMod and then click on the branch named fantasy2_mod +3. Download or extract the mod folder and implement it as a new folder into your Quake 4 file +4. Launch Quake 4 and from the main menu, select: +Mods → name of your mod folder → Load Mod + +5. Start a new game + + + +## Features + +- Weapons + - All weapons other than rochet launcher and gauntlets were changed into abilities from the game Final Fantasy VII Remake + - Blaster (regular fire / Charge) + - Changed the charged blast to a bust fire + - Tweaked damage + - Dark Matter Gun (Chi Trap) + - Projectile now stays in place instead of moving + - Tweaked damage + - Hyperblaster (Focused Shot) + - Lowered firerate + - Lowered speed of Projectile + - Tweaked damage + - Machine Gun (Maximum Furry) + - Changed from fully automatic to burst fire + - Increased spread + - Tweaked damage + - Grenade Launcher (Blade Burst) + - Now fires 5 grenandes in a large spread + - Decreased explosion radius + - Tweaked damage + - Shotgun (Point Blank) + - Decreased spread + - Tweaked damage + - Railgun (Soul Drain) + - Attacks now heal player for 20 health points + - Tweaked damage + - Lightning Gun (Ray Of Judgement) + - Changed the constent fire to a burst fire + - Tweaked damage + - Napalm Launcher (Sorcerous Storm) + - The attack now lands right at the players feat + - Attacks no longer do damage to the player + - Tweaked damage + - Nailgun (Steel Skin) + - Atacks now restore player armor to 100 + - Tweaked damage +- GUI Changes + - Added 2 new activly changing bars in hud + - One named Energy which increases and decreases depending on player variable energy + - One named Item which increases and decreases depending on player variable itemCount + - Added a new list in hud named Abilities which shows all possible abilities (weapons) and items that the player can use, can fully appear and disapear + - Added a new box in hud named Level which shows the players current level + - All of these addition and their subparts have show and hide events in hud.gui that change their visibility +- Combat System + - The combat system starts once you click L to initiate "Battle Mode". Once clicked you hud will change and you will gain the ability to activate your abilites which are linked to Q + - Shows Energy bar + - Energy is determined by the player variable energy + - Each ability has their own energy requirment and keybind which should be shown in the hud changes + - Once an ability is used your enrgy will decrease/increase accordingly and time will be put back to normal, the player will also go back to their default pistol and time will return to normal + - You can gain energy by fireing your default blaster, using certain abilites, or using certain items +- Item System + - Once in "Battle Mode" your hud will be updated to show the Items bar + - Item points is determined by the player variable itemCount + - The Items bar can hold up to 3 item points which are gained by killing an enemy + - Each item has its own item point requirment + - Once an item is used your item points will decrease accordingly and time will be put back to normal, time will aslo return to normal +- Level Up System + - Level is determined by player variable currentLevel + - XP is determined by player variable currentXP + - Once you make a new game you will start at level 1 + - You gain xp by dealing the final blow to enemies + - Once you reach a certain amount xp you will level up, level 5 being the max, and your xp will be reset to 0 + - As you level up your damage will increase for all abilities +- Commands + - Added new command "spawnteam" + - Linked to L key + - On first click, activates "Battle Mode" on click, which shows the Energy and Item bars, and allows the player to input the abilities command (Q) + - Sets player variable energy to 0 + - Spawns 2 friendly marine NPCs + - On second click, deactivates "Battle Mode" on click, which hides the Energy and Item bars, and removes the players ability to input the abilities command (Q) + - Despawns all friendly marine NPCs + - Added new command "abilities" + - Slows down game time with one click, and then sets it back to normal with another + - Linked to Q key + - Shows the Abilities list in HUD with one click, hides it with a second click + - Allows the player to input commands related to abilites (weapons) and items with one click, removes this ability with a second click + - Added new command "modHelp" + - Displays text in the game console that can help the player with small common problems + - Explains how to access the commands helpCombat, helpItem, helpLevel + - Added new command "helpCombat" + - Explains the combat system + - Explains how to get back to modHelp + - Added new command "helpItem" + - Explains the Item system + - Explains how to get back to modHelp + - Added new command "helpLevel" + - Explains the level up system + - Explains how to get back to modHelp + - Added new commands for each ability (weapon) + - Each command will give and make the player select the weapon that is linkied to the ability + - They will also slow down time diff --git a/UpgradeLog.htm b/UpgradeLog.htm new file mode 100644 index 000000000..c89eb1f93 --- /dev/null +++ b/UpgradeLog.htm @@ -0,0 +1,363 @@ + + + + Migration Report +

+ Migration Report - q4sdk

Overview

ProjectPathErrorsWarningsMessages
gamegame.vcproj0225
mpgamempgame.vcproj0225
idlibidlib.vcproj0164
Solutionq4sdk.sln012
Gamegame.vcproj000
idLibidlib.vcproj000
MPGamempgame.vcproj000

Solution and projects

game

Message
game.vcproj: + Due to the requirement that Visual C++ projects produce an embedded (by default) Windows SxS manifest, manifest files in the project are now automatically built with the Manifest Tool. You may need to change your build in order for it to work correctly. For instance, it is recommended that the dependency information contained in any manifest files be converted to "#pragma comment(linker,"<insert dependency here>")" in a header file that is included from your source code. If your project already embeds a manifest in the RT_MANIFEST resource section through a resource (.rc) file, the line may need to be commented out before the project will build correctly.
game.vcproj: + Due to a conformance change in the C++ compiler, code change may be required before your project will build without errors. Previous versions of the C++ compiler allowed specification of member function pointers by member function name (e.g. MemberFunctionName). The C++ standard requires a fully qualified name with the use of the address-of operator (e.g. &ClassName::MemberFunctionName). If your project contains forms or controls used in the Windows Forms Designer, you may have to change code in InitializeComponent because the designer generated code used the non-conformant syntax in delegate construction (used in event handlers).
game.vcproj: + This application has been updated to include settings related to the User Account Control (UAC) feature of Windows Vista. By default, when run on Windows Vista with UAC enabled, this application is marked to run with the same privileges as the process that launched it. This marking also disables the application from running with virtualization. You can change UAC related settings from the Property Pages of the project.
game.vcproj: + Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
game.vcproj: + VCConvertEngine could not convert attribute MapLines = FALSE under Tool VCLinkerTool.
game.vcproj: + VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.
game.vcproj: + Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
game.vcproj: + VCConvertEngine could not convert attribute MapLines = FALSE under Tool VCLinkerTool.
game.vcproj: + The C/C++ compiler switch /Og has been deprecated and has been removed from your project settings. It is recommended that you use /O1 or /O2 instead.
game.vcproj: + VCConvertEngine could not convert attribute GlobalOptimizations = TRUE under Tool VCCLCompilerTool.
game.vcproj: + VCConvertEngine could not convert attribute OptimizeForProcessor = 3 under Tool VCCLCompilerTool.
game.vcproj: + Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
game.vcproj: + VCConvertEngine could not convert attribute MapLines = FALSE under Tool VCLinkerTool.
game.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\DebugInline\Game.dll') does not match the Librarian's OutputFile property value '../Win32/DebugInline\Game.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/DebugInline\Game.dll') in project configuration 'DebugInline|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).
game.vcproj: + MSB8012: $(TargetName) ('Game') does not match the Linker's OutputFile property value '../Win32/DebugInline\Gamex86.dll' ('Gamex86') in project configuration 'DebugInline|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).
game.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\DebugInline\Game.dll') does not match the Linker's OutputFile property value '../Win32/DebugInline\Gamex86.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/DebugInline\Gamex86.dll') in project configuration 'DebugInline|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
game.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Debug\Game.dll') does not match the Librarian's OutputFile property value '../Win32/Debug\Game.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Debug\Game.dll') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).
game.vcproj: + MSB8012: $(TargetName) ('Game') does not match the Linker's OutputFile property value '../Win32/Debug\Gamex86.dll' ('Gamex86') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).
game.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Debug\Game.dll') does not match the Linker's OutputFile property value '../Win32/Debug\Gamex86.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Debug\Gamex86.dll') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
game.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Release\Game.dll') does not match the Librarian's OutputFile property value '../Win32/Release\Game.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Release\Game.dll') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).
game.vcproj: + MSB8012: $(TargetName) ('Game') does not match the Linker's OutputFile property value '../Win32/Release\Gamex86.dll' ('Gamex86') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).
game.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Release\Game.dll') does not match the Linker's OutputFile property value '../Win32/Release\Gamex86.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Release\Gamex86.dll') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
+ Show 5 additional messages +
game.vcproj: + Converting project file 'C:\Users\Freddy_PC\Q4-Project_GameMod\game.vcproj'.
game.vcproj: + Visual C++ now provides improved safety in its C and C++ Libraries. This includes new and improved functions, additional checking and validation, and internal design changes. These libraries are turned on by default. You may see some warnings about unsafe functions or parameters when you build your project. The warnings will generally suggest an alternative safer coding style or function. It is advised that you correct these warnings, in order to make your code more safe. Full details can be found in the documentation by searching for 'Security Enhancements in the CRT' and for 'Checked Iterators'.
game.vcproj: + The C/C++ compiler default settings have been modified to be more compliant with ISO Standard C++. Included in those changes are enforcing Standard C++ for loop scoping and supporting wchar_t as a native type. These changes may cause existing code to no longer compile without changes to the code or the compiler options with which it is built.
game.vcproj: + Web deployment to the local IIS server is no longer supported. The Web Deployment build tool has been removed from your project settings.
game.vcproj: + Done converting to new project file 'C:\Users\Freddy_PC\Q4-Project_GameMod\game.vcxproj'.
+ Hide 5 additional messages +

mpgame

Message
mpgame.vcproj: + Due to the requirement that Visual C++ projects produce an embedded (by default) Windows SxS manifest, manifest files in the project are now automatically built with the Manifest Tool. You may need to change your build in order for it to work correctly. For instance, it is recommended that the dependency information contained in any manifest files be converted to "#pragma comment(linker,"<insert dependency here>")" in a header file that is included from your source code. If your project already embeds a manifest in the RT_MANIFEST resource section through a resource (.rc) file, the line may need to be commented out before the project will build correctly.
mpgame.vcproj: + Due to a conformance change in the C++ compiler, code change may be required before your project will build without errors. Previous versions of the C++ compiler allowed specification of member function pointers by member function name (e.g. MemberFunctionName). The C++ standard requires a fully qualified name with the use of the address-of operator (e.g. &ClassName::MemberFunctionName). If your project contains forms or controls used in the Windows Forms Designer, you may have to change code in InitializeComponent because the designer generated code used the non-conformant syntax in delegate construction (used in event handlers).
mpgame.vcproj: + This application has been updated to include settings related to the User Account Control (UAC) feature of Windows Vista. By default, when run on Windows Vista with UAC enabled, this application is marked to run with the same privileges as the process that launched it. This marking also disables the application from running with virtualization. You can change UAC related settings from the Property Pages of the project.
mpgame.vcproj: + Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
mpgame.vcproj: + VCConvertEngine could not convert attribute MapLines = FALSE under Tool VCLinkerTool.
mpgame.vcproj: + VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.
mpgame.vcproj: + Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
mpgame.vcproj: + VCConvertEngine could not convert attribute MapLines = FALSE under Tool VCLinkerTool.
mpgame.vcproj: + The C/C++ compiler switch /Og has been deprecated and has been removed from your project settings. It is recommended that you use /O1 or /O2 instead.
mpgame.vcproj: + VCConvertEngine could not convert attribute GlobalOptimizations = TRUE under Tool VCCLCompilerTool.
mpgame.vcproj: + VCConvertEngine could not convert attribute OptimizeForProcessor = 3 under Tool VCCLCompilerTool.
mpgame.vcproj: + Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
mpgame.vcproj: + VCConvertEngine could not convert attribute MapLines = FALSE under Tool VCLinkerTool.
mpgame.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\DebugInline\MPGame.dll') does not match the Librarian's OutputFile property value '../Win32/DebugInline\MPGame.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/DebugInline\MPGame.dll') in project configuration 'DebugInline|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).
mpgame.vcproj: + MSB8012: $(TargetName) ('MPGame') does not match the Linker's OutputFile property value '../Win32/DebugInline\MPGamex86.dll' ('MPGamex86') in project configuration 'DebugInline|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).
mpgame.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\DebugInline\MPGame.dll') does not match the Linker's OutputFile property value '../Win32/DebugInline\MPGamex86.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/DebugInline\MPGamex86.dll') in project configuration 'DebugInline|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
mpgame.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Debug\MPGame.dll') does not match the Librarian's OutputFile property value '../Win32/Debug\MPGame.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Debug\MPGame.dll') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).
mpgame.vcproj: + MSB8012: $(TargetName) ('MPGame') does not match the Linker's OutputFile property value '../Win32/Debug\MPGamex86.dll' ('MPGamex86') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).
mpgame.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Debug\MPGame.dll') does not match the Linker's OutputFile property value '../Win32/Debug\MPGamex86.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Debug\MPGamex86.dll') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
mpgame.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Release\MPGame.dll') does not match the Librarian's OutputFile property value '../Win32/Release\MPGame.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Release\MPGame.dll') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).
mpgame.vcproj: + MSB8012: $(TargetName) ('MPGame') does not match the Linker's OutputFile property value '../Win32/Release\MPGamex86.dll' ('MPGamex86') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).
mpgame.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Release\MPGame.dll') does not match the Linker's OutputFile property value '../Win32/Release\MPGamex86.dll' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Release\MPGamex86.dll') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
+ Show 5 additional messages +
mpgame.vcproj: + Converting project file 'C:\Users\Freddy_PC\Q4-Project_GameMod\mpgame.vcproj'.
mpgame.vcproj: + Visual C++ now provides improved safety in its C and C++ Libraries. This includes new and improved functions, additional checking and validation, and internal design changes. These libraries are turned on by default. You may see some warnings about unsafe functions or parameters when you build your project. The warnings will generally suggest an alternative safer coding style or function. It is advised that you correct these warnings, in order to make your code more safe. Full details can be found in the documentation by searching for 'Security Enhancements in the CRT' and for 'Checked Iterators'.
mpgame.vcproj: + The C/C++ compiler default settings have been modified to be more compliant with ISO Standard C++. Included in those changes are enforcing Standard C++ for loop scoping and supporting wchar_t as a native type. These changes may cause existing code to no longer compile without changes to the code or the compiler options with which it is built.
mpgame.vcproj: + Web deployment to the local IIS server is no longer supported. The Web Deployment build tool has been removed from your project settings.
mpgame.vcproj: + Done converting to new project file 'C:\Users\Freddy_PC\Q4-Project_GameMod\mpgame.vcxproj'.
+ Hide 5 additional messages +

idlib

Message
idlib.vcproj: + Due to the requirement that Visual C++ projects produce an embedded (by default) Windows SxS manifest, manifest files in the project are now automatically built with the Manifest Tool. You may need to change your build in order for it to work correctly. For instance, it is recommended that the dependency information contained in any manifest files be converted to "#pragma comment(linker,"<insert dependency here>")" in a header file that is included from your source code. If your project already embeds a manifest in the RT_MANIFEST resource section through a resource (.rc) file, the line may need to be commented out before the project will build correctly.
idlib.vcproj: + Due to a conformance change in the C++ compiler, code change may be required before your project will build without errors. Previous versions of the C++ compiler allowed specification of member function pointers by member function name (e.g. MemberFunctionName). The C++ standard requires a fully qualified name with the use of the address-of operator (e.g. &ClassName::MemberFunctionName). If your project contains forms or controls used in the Windows Forms Designer, you may have to change code in InitializeComponent because the designer generated code used the non-conformant syntax in delegate construction (used in event handlers).
idlib.vcproj: + This application has been updated to include settings related to the User Account Control (UAC) feature of Windows Vista. By default, when run on Windows Vista with UAC enabled, this application is marked to run with the same privileges as the process that launched it. This marking also disables the application from running with virtualization. You can change UAC related settings from the Property Pages of the project.
idlib.vcproj: + Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
idlib.vcproj: + VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.
idlib.vcproj: + Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
idlib.vcproj: + The C/C++ compiler switch /Og has been deprecated and has been removed from your project settings. It is recommended that you use /O1 or /O2 instead.
idlib.vcproj: + VCConvertEngine could not convert attribute GlobalOptimizations = TRUE under Tool VCCLCompilerTool.
idlib.vcproj: + VCConvertEngine could not convert attribute OptimizeForProcessor = 3 under Tool VCCLCompilerTool.
idlib.vcproj: + Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
idlib.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\DebugInline\idLib.lib') does not match the Librarian's OutputFile property value '../Win32/DebugInline\idLib.lib' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/DebugInline\idLib.lib') in project configuration 'DebugInline|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).
idlib.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\DebugInline\idLib.lib') does not match the Linker's OutputFile property value '../Win32/DebugInline\idLib.lib' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/DebugInline\idLib.lib') in project configuration 'DebugInline|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
idlib.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Debug\idLib.lib') does not match the Librarian's OutputFile property value '../Win32/Debug\idLib.lib' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Debug\idLib.lib') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).
idlib.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Debug\idLib.lib') does not match the Linker's OutputFile property value '../Win32/Debug\idLib.lib' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Debug\idLib.lib') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
idlib.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Release\idLib.lib') does not match the Librarian's OutputFile property value '../Win32/Release\idLib.lib' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Release\idLib.lib') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).
idlib.vcproj: + MSB8012: $(TargetPath) ('C:\Users\Freddy_PC\Win32\Release\idLib.lib') does not match the Linker's OutputFile property value '../Win32/Release\idLib.lib' ('C:\Users\Freddy_PC\Q4-Project_GameMod\../Win32/Release\idLib.lib') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
+ Show 4 additional messages +
idlib.vcproj: + Converting project file 'C:\Users\Freddy_PC\Q4-Project_GameMod\idlib.vcproj'.
idlib.vcproj: + Visual C++ now provides improved safety in its C and C++ Libraries. This includes new and improved functions, additional checking and validation, and internal design changes. These libraries are turned on by default. You may see some warnings about unsafe functions or parameters when you build your project. The warnings will generally suggest an alternative safer coding style or function. It is advised that you correct these warnings, in order to make your code more safe. Full details can be found in the documentation by searching for 'Security Enhancements in the CRT' and for 'Checked Iterators'.
idlib.vcproj: + The C/C++ compiler default settings have been modified to be more compliant with ISO Standard C++. Included in those changes are enforcing Standard C++ for loop scoping and supporting wchar_t as a native type. These changes may cause existing code to no longer compile without changes to the code or the compiler options with which it is built.
idlib.vcproj: + Done converting to new project file 'C:\Users\Freddy_PC\Q4-Project_GameMod\idlib.vcxproj'.
+ Hide 4 additional messages +

Solution

Message
q4sdk.sln: + Visual Studio needs to make non-functional changes to this project in order to enable the project to open in released versions of Visual Studio newer than Visual Studio 2010 SP1 without impacting project behavior.
+ Show 2 additional messages +
q4sdk.sln: + File successfully backed up as C:\Users\Freddy_PC\Q4-Project_GameMod\Backup\q4sdk.sln
q4sdk.sln: + Solution migrated successfully
+ Hide 2 additional messages +

Game

Message
Game logged no messages. +

idLib

Message
idLib logged no messages. +

MPGame

Message
MPGame logged no messages. +
\ No newline at end of file diff --git a/game.vcxproj b/game.vcxproj new file mode 100644 index 000000000..d85b67441 --- /dev/null +++ b/game.vcxproj @@ -0,0 +1,496 @@ + + + + + DebugInline + Win32 + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + Game + {49BEC5C6-B964-417A-851E-808886B57430} + Game + Perforce Project + + .. + MSSCCI:NXN alienbrain + Win32Proj + + + + DynamicLibrary + v143 + false + MultiByte + + + DynamicLibrary + v143 + false + MultiByte + + + DynamicLibrary + v143 + false + MultiByte + + + + + + + + + + + + + + + + <_ProjectFileVersion>17.0.36414.14 + + + ../$(Platform)/$(Configuration)\ + $(OutDir) + true + true + + + ../$(Platform)/$(Configuration)\ + $(OutDir) + true + false + + + ../$(Platform)/$(Configuration)\ + $(OutDir) + true + false + + + + Disabled + _DEBUG;_WINDOWS;GAME_DLL;Q4SDK;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebug + true + true + true + true + Use + + $(IntDir)$(ProjectName)/$(ProjectName).pch + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)x86.pdb + $(IntDir)$(ProjectName)/ + Level4 + EditAndContinue + Default + + + /FIXED:no %(AdditionalOptions) + $(IntDir)idLib.lib;%(AdditionalDependencies) + $(IntDir)$(ProjectName)x86.dll + true + .\game\game.def + true + $(IntDir)$(ProjectName)x86.pdb + false + + false + NotSet + 16000000 + 16000000 + true + 0x20000000 + MachineX86 + + + + + Disabled + OnlyExplicitInline + _DEBUG;_WINDOWS;_INLINEDEBUG;GAME_DLL;Q4SDK;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebug + true + true + true + Use + + $(IntDir)$(ProjectName)/$(ProjectName).pch + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)x86.pdb + true + $(IntDir)$(ProjectName)/ + Level4 + ProgramDatabase + Default + + + $(IntDir)idLib.lib;%(AdditionalDependencies) + $(IntDir)$(ProjectName)x86.dll + true + .\game\game.def + true + $(IntDir)$(ProjectName)x86.pdb + false + + false + NotSet + 16000000 + 16000000 + true + 0x20000000 + MachineX86 + + + true + + + + + Full + OnlyExplicitInline + true + Neither + false + NDEBUG;_WINDOWS;_FINAL;GAME_DLL;Q4SDK;%(PreprocessorDefinitions) + true + MultiThreaded + false + false + true + true + Use + + $(IntDir)$(ProjectName)/$(ProjectName).pch + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)x86.pdb + + $(IntDir)$(ProjectName)/ + Level4 + ProgramDatabase + Default + + + /MACHINE:I386 /fixed:no %(AdditionalOptions) + $(IntDir)idLib.lib;%(AdditionalDependencies) + $(IntDir)$(ProjectName)x86.dll + true + .\game\game.def + true + $(IntDir)$(ProjectName)x86.pdb + true + $(IntDir)$(ProjectName)x86.map + true + NotSet + 4194304 + true + true + true + + 0x20000000 + MachineX86 + + + + + + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {49bec5c6-b964-417a-851e-808886b57400} + false + + + + + + \ No newline at end of file diff --git a/game.vcxproj.filters b/game.vcxproj.filters new file mode 100644 index 000000000..afadf3eeb --- /dev/null +++ b/game.vcxproj.filters @@ -0,0 +1,837 @@ + + + + + {c4275561-cf2d-441c-836a-ee4b443f39de} + + + {661a26eb-4dd1-418f-b4bb-542174553ade} + + + {674e2285-b872-45c1-938c-20adbd8bd47a} + + + {565e8a7a-77ee-41f6-be75-1a936565e81c} + + + {0c76dca9-6542-452b-9ca1-f97362c31c3a} + + + {c0fc928a-20b8-49fa-a770-119c84732232} + + + {7f518b6d-94dd-4de6-87bf-49417e5a0570} + + + {e90b2a10-f8e3-4417-878d-478c67e93429} + + + {4effba46-bc7c-45ee-a587-801d07ce4c9e} + + + {653c0cfa-3d33-48b5-85a3-bdc7e2ec8a3b} + + + {4857642c-b2d1-4a40-9929-4b27b8d6d6fb} + + + {2f7e08e7-4732-495e-844b-36131939a362} + + + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\Anim + + + Game\Anim + + + Game\Anim + + + Game\Anim + + + Game\Client + + + Game\Client + + + Game\Client + + + Game\Client + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Player + + + Game\Player + + + Game\Player + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\MP + + + Game\MP + + + Game\MP + + + Game\MP + + + Game\MP + + + Game\MP\Stats + + + Game\MP\Stats + + + Game\MP\Stats + + + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\Anim + + + Game\Anim + + + Game\Client + + + Game\Client + + + Game\Client + + + Game\Client + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Player + + + Game\Player + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Weapon + + + Game\MP + + + Game\MP + + + Game\MP + + + Game\MP + + + Game\MP\Stats + + + Game\MP\Stats + + + Game\MP\Stats + + + + + + \ No newline at end of file diff --git a/game.vcxproj.user b/game.vcxproj.user new file mode 100644 index 000000000..88a550947 --- /dev/null +++ b/game.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/game/Player.cpp b/game/Player.cpp index 7f482d0fa..b49f95577 100644 --- a/game/Player.cpp +++ b/game/Player.cpp @@ -1809,6 +1809,13 @@ void idPlayer::Spawn( void ) { idStr temp; idBounds bounds; + energy = 0.0f; + maxEnergy = 100.0f; + currentXP = 0; + currentLevel = 1; + levelDM = 1.0f; + itemCount = 0; + if ( entityNumber >= MAX_CLIENTS ) { gameLocal.Error( "entityNum > MAX_CLIENTS for player. Player may only be spawned with a client." ); } @@ -4281,6 +4288,10 @@ idPlayer::PowerUpModifier float idPlayer::PowerUpModifier( int type ) { float mod = 1.0f; + if (type == PMOD_PROJECTILE_DAMAGE || type == PMOD_MELEE_DAMAGE) { + mod = levelDM; + } + if ( PowerUpActive( POWERUP_QUADDAMAGE ) ) { switch( type ) { case PMOD_PROJECTILE_DAMAGE: { diff --git a/game/Player.h b/game/Player.h index c499507be..a3f0241cd 100644 --- a/game/Player.h +++ b/game/Player.h @@ -27,6 +27,7 @@ extern const idEventDef EV_SpectatorTouch; extern const idEventDef EV_Player_SetArmor; extern const idEventDef EV_Player_SetExtraProjPassEntity; extern const idEventDef EV_Player_DamageEffect; +extern const idEventDef EV_Player_LevelTrigger; const float THIRD_PERSON_FOCUS_DISTANCE = 512.0f; const int LAND_DEFLECT_TIME = 150; @@ -413,6 +414,20 @@ class idPlayer : public idActor { bool vsMsgState; int lastPickupTime; + + //Energy System + float energy; + float maxEnergy; + + //XP System + int currentXP; + int currentLevel; + int nextLevelXP; + float levelDM; + + //Item + int itemCount; + //RAVEN BEGIN // asalmon: the eneny the player is most likely currently aiming at #ifdef _XBOX diff --git a/game/ai/AI.cpp b/game/ai/AI.cpp index 8fce0d71e..1a614553c 100644 --- a/game/ai/AI.cpp +++ b/game/ai/AI.cpp @@ -18,6 +18,8 @@ AI.cpp #include "../spawner.h" #include "AI_Tactical.h" +#include "../Player.h" + const char* aiTalkMessageString [ ] = { "None", "primary", @@ -1753,6 +1755,83 @@ void idAI::Killed( idEntity *inflictor, idEntity *attacker, int damage, const id } kv = spawnArgs.MatchPrefix( "def_drops", kv ); } + + idPlayer* player = NULL; + + if (attacker) { + if (attacker->IsType(idProjectile::GetClassType())) { + idProjectile* proj = static_cast(attacker); + player = static_cast(proj->GetOwner()); + } + else if (attacker->IsType(idPlayer::GetClassType())){ + player = static_cast(attacker); + } + } + + if (player) { + + if (player->itemCount < 3) { + player->itemCount += 1; + } + + if (player->itemCount == 0) { + player->hud->HandleNamedEvent("hideitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 1) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 2) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 3) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("showitem3"); + } + + if (player->currentLevel < 5) { + + player->currentXP += 80; + + if (player->currentXP >= (500 * player->currentLevel)) { + player->currentXP = 0; + player->currentLevel++; + + player->hud->HandleNamedEvent("showLevelUpNot"); + + if (player->currentLevel == 2) { + player->hud->HandleNamedEvent("showlevel2"); + player->hud->HandleNamedEvent("hidelevel1"); + + player->levelDM = 1.5f; + } + else if (player->currentLevel == 3) { + player->hud->HandleNamedEvent("showlevel3"); + player->hud->HandleNamedEvent("hidelevel2"); + + player->levelDM = 2.0f; + } + else if (player->currentLevel == 4) { + player->hud->HandleNamedEvent("showlevel4"); + player->hud->HandleNamedEvent("hidelevel3"); + + player->levelDM = 2.5f; + } + else if (player->currentLevel == 5) { + player->hud->HandleNamedEvent("showlevel5"); + player->hud->HandleNamedEvent("hidelevel4"); + + player->levelDM = 3.0f; + } + } + } + } } /*********************************************************************** diff --git a/game/gamesys/Class.cpp b/game/gamesys/Class.cpp index 51cae34e6..ddc796b82 100644 --- a/game/gamesys/Class.cpp +++ b/game/gamesys/Class.cpp @@ -11,7 +11,7 @@ instancing of objects. #include "../Game_local.h" #ifdef _WIN32 -#include "TypeInfo.h" +#include "TypeInfo" #else #include "NoGameTypeInfo.h" #endif diff --git a/game/gamesys/SaveGame.cpp b/game/gamesys/SaveGame.cpp index 28d501df8..080834f90 100644 --- a/game/gamesys/SaveGame.cpp +++ b/game/gamesys/SaveGame.cpp @@ -5,7 +5,7 @@ #include "../Game_local.h" #ifdef _WIN32 -#include "TypeInfo.h" +#include "TypeInfo" #else #include "NoGameTypeInfo.h" #endif diff --git a/game/gamesys/SysCmds.cpp b/game/gamesys/SysCmds.cpp index ab92878fd..dbc6bbfc4 100644 --- a/game/gamesys/SysCmds.cpp +++ b/game/gamesys/SysCmds.cpp @@ -26,11 +26,13 @@ // RAVEN END #ifdef _WIN32 -#include "TypeInfo.h" +#include "TypeInfo" #else #include "NoGameTypeInfo.h" #endif +class rvWeaponMachinegun; + /* ================== Cmd_GetFloatArg @@ -171,7 +173,7 @@ void Cmd_ListSpawnArgs_f( const idCmdArgs &args ) { for ( i = 0; i < ent->spawnArgs.GetNumKeyVals(); i++ ) { const idKeyValue *kv = ent->spawnArgs.GetKeyVal( i ); - gameLocal.Printf( "\"%s\" "S_COLOR_WHITE"\"%s\"\n", kv->GetKey().c_str(), kv->GetValue().c_str() ); + gameLocal.Printf( "\"%s\" " S_COLOR_WHITE "\"%s\"\n", kv->GetKey().c_str(), kv->GetValue().c_str() ); } } @@ -576,6 +578,603 @@ void Cmd_CenterView_f( const idCmdArgs &args ) { player->SetViewAngles( ang ); } + + + + + + +/* +================== + +Custom Mod Commands + +================== +*/ + + + + + + + + + +void KillEntitiesMod(const idCmdArgs& args, const idTypeInfo& superClass) { + idEntity* ent; + idStrList ignore; + const char* name; + int i; + + if (!gameLocal.GetLocalPlayer() ) { + return; + } + + for (i = 1; i < args.Argc(); i++) { + name = args.Argv(i); + ignore.Append(name); + } + + for (ent = gameLocal.spawnedEntities.Next(); ent != NULL; ent = ent->spawnNode.Next()) { + if (ent->IsType(superClass)) { + + idActor* actor = static_cast(ent); + + if (actor->team != AITEAM_MARINE) { + continue; + } + + for (i = 0; i < ignore.Num(); i++) { + if (ignore[i] == ent->name) { + break; + } + } + + if (i >= ignore.Num()) { + ent->PostEventMS(&EV_Remove, 0); + } + } + } +} + +idStr battleMode = "off"; + +void Cmd_BattleMode_f(const idCmdArgs& args) { + + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + + player->energy = 0.0f; + + player->hud->HandleNamedEvent("showEnergy"); + + player->hud->HandleNamedEvent("showItems"); + + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + + if (battleMode == "off") { + battleMode = "on"; + + #ifndef _MPBETA + const char* key, * value; + int i; + float yaw; + idVec3 org; + idPlayer* player; + idDict dict; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + + yaw = player->viewAngles.yaw; + + for (int j = 0; j < 2; j++) { + value = "char_marine"; + + dict.Clear(); + dict.Set("classname", value); + dict.Set("angle", va("%f", yaw + 180)); + + org = player->GetPhysics()->GetOrigin() + idAngles(0, yaw, 0).ToForward() * 80 + idVec3(0, 0, 1); + dict.Set("origin", org.ToString()); + + for (i = 2; i < args.Argc() - 1; i += 2) { + + key = args.Argv(i); + value = args.Argv(i + 1); + + dict.Set(key, value); + } + + + idEntity* newEnt = NULL; + gameLocal.SpawnEntityDef(dict, &newEnt); + + if (newEnt) { + gameLocal.Printf("spawned entity '%s'\n", newEnt->name.c_str()); + } + + yaw += 30; + } + #endif + } + else if (battleMode == "on") { + + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + + battleMode = "off"; + + KillEntitiesMod(args, idAI::GetClassType()); + + player->hud->HandleNamedEvent("hideEnergy"); + + player->hud->HandleNamedEvent("hideItems"); + } +} + +void Cmd_MaximumFurry_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->energy >= 20.0f)) { + player->GiveItem("weapon_machinegun"); + player->SelectWeapon("weapon_machinegun"); + + player->hud->HandleNamedEvent("hideAbilities"); + } +} + +void Cmd_PointBlank_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->energy >= 30.0f)) { + player->GiveItem("weapon_shotgun"); + player->SelectWeapon("weapon_shotgun"); + + player->hud->HandleNamedEvent("hideAbilities"); + } +} + +void Cmd_FocusedShot_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->energy >= 20.0f)) { + player->GiveItem("weapon_hyperblaster"); + player->SelectWeapon("weapon_hyperblaster"); + + player->hud->HandleNamedEvent("hideAbilities"); + } +} + +void Cmd_BladeBurst_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->energy >= 50.0f)) { + player->GiveItem("weapon_grenadelauncher"); + player->SelectWeapon("weapon_grenadelauncher"); + + player->hud->HandleNamedEvent("hideAbilities"); + } +} + +void Cmd_SoulDrain_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->energy >= 20.0f)) { + player->GiveItem("weapon_railgun"); + player->SelectWeapon("weapon_railgun"); + + player->hud->HandleNamedEvent("hideAbilities"); + } +} + +void Cmd_SteelSkin_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->energy >= 60.0f)) { + player->GiveItem("weapon_nailgun"); + player->SelectWeapon("weapon_nailgun"); + + player->hud->HandleNamedEvent("hideAbilities"); + } +} + +void Cmd_RayOfJudgement_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->energy >= 30.0f)) { + player->GiveItem("weapon_lightninggun"); + player->SelectWeapon("weapon_lightninggun"); + + player->hud->HandleNamedEvent("hideAbilities"); + } +} + +void Cmd_SorcerousStorm_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->energy >= 20.0f)) { + player->GiveItem("weapon_napalmgun"); + player->SelectWeapon("weapon_napalmgun"); + + player->hud->HandleNamedEvent("hideAbilities"); + } +} + +void Cmd_ChiTrap_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->energy >= 100.0f)) { + player->GiveItem("weapon_dmg"); + player->SelectWeapon("weapon_dmg"); + + player->hud->HandleNamedEvent("hideAbilities"); + } +} + +void Cmd_Potion_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->itemCount > 0)) { + player->itemCount -= 1; + + if (player->itemCount == 0) { + player->hud->HandleNamedEvent("hideitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 1) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 2) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 3) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("showitem3"); + } + + const float healAmount = 20.0f; + player->health += healAmount; + if (player->health > player->inventory.maxHealth) { + player->health = player->inventory.maxHealth; + } + + player->hud->HandleNamedEvent("hideAbilities"); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + } +} + +void Cmd_Ether_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->itemCount > 0)) { + player->itemCount -= 1; + + if (player->itemCount == 0) { + player->hud->HandleNamedEvent("hideitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 1) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 2) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 3) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("showitem3"); + } + + float currEn = player->energy += 40.0f; + if (currEn > player->maxEnergy) { + player->energy = player->maxEnergy; + } + else { + player->energy = currEn; + } + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + player->hud->HandleNamedEvent("hideAbilities"); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + } +} + +void Cmd_Elixir_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->itemCount >= 2)) { + player->itemCount -= 2; + + if (player->itemCount == 0) { + player->hud->HandleNamedEvent("hideitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 1) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 2) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 3) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("showitem3"); + } + + player->health = player->inventory.maxHealth; + player->energy = player->maxEnergy; + + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + + player->hud->HandleNamedEvent("hideAbilities"); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + } +} + +void Cmd_ArmorCore_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->itemCount >= 2)) { + player->itemCount -= 2; + + if (player->itemCount == 0) { + player->hud->HandleNamedEvent("hideitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 1) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 2) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 3) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("showitem3"); + } + + player->inventory.maxarmor = 200.0f; + player->inventory.armor = 200.0f; + + player->hud->HandleNamedEvent("hideAbilities"); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + } +} + +void Cmd_MegaPotion_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + if ((cvarSystem->GetCVarFloat("timeScale") == 0.2f) && (player->itemCount >= 2)) { + player->itemCount -= 2; + + if (player->itemCount == 0) { + player->hud->HandleNamedEvent("hideitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 1) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("hideitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 2) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("hideitem3"); + } + else if (player->itemCount == 3) { + player->hud->HandleNamedEvent("showitem1"); + player->hud->HandleNamedEvent("showitem2"); + player->hud->HandleNamedEvent("showitem3"); + } + + const float healAmount = 60.0f; + player->health += healAmount; + if (player->health > player->inventory.maxHealth) { + player->health = player->inventory.maxHealth; + } + + player->hud->HandleNamedEvent("hideAbilities"); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + } +} + +void Cmd_Abilities_f(const idCmdArgs& args) { + idPlayer* player; + + player = gameLocal.GetLocalPlayer(); + if (!player) { + return; + } + + if (battleMode == "on") { + if (cvarSystem->GetCVarFloat("timeScale") >= 1.0f) { + cvarSystem->SetCVarFloat("timeScale", 0.2f); // slows down time on first click + if (player && player->hud) { + player->hud->HandleNamedEvent("showAbilities"); + } + } + else { + cvarSystem->SetCVarFloat("timeScale", 1.0f); // puts time back to normal on second click + if (player && player->hud) { + player->hud->HandleNamedEvent("hideAbilities"); + } + } + } +} + +void Cmd_ModHelp_f(const idCmdArgs& args) { + gameLocal.Printf("Helpful Tips: \n"); + gameLocal.Printf("1. Make sure to click L before starting any combat and make sure to click it again after you finished combat \n"); + gameLocal.Printf("2. Make sure to look at the README.md to see the description of what each ability and item does \n"); + gameLocal.Printf("\n"); + gameLocal.Printf("For help with combat type helpCombat \n"); + gameLocal.Printf("For help with items type helpItem \n"); + gameLocal.Printf("For help with level up system type helpLevel \n"); +} + +void Cmd_ModHelpCombat_f(const idCmdArgs& args) { + gameLocal.Printf("The combat system starts once you click L to initiate battle mode \n"); + gameLocal.Printf("Once clicked you hud will change and you will gain the ability to activate your abilites which are linked to Q \n"); + gameLocal.Printf("Once you click Q you will see a list of abilites along with their designated keybinds, time will also be slowed down. Each ability has their own energy requirment which can be found in README.md \n"); + gameLocal.Printf("Once an ability is used your enrgy will decrease/increase accordingly and time will be put back to normal \n"); + gameLocal.Printf("You can gain energy by fireing your default blaster, using certain abilites, or using certain items \n"); + gameLocal.Printf("To go back to main help screen type modHelp \n"); +} + +void Cmd_ModHelpItem_f(const idCmdArgs& args) { + gameLocal.Printf("Once in battle mode your hud will be updated to show the items bar \n"); + gameLocal.Printf("The items bar can hold up to 3 item points which are gained by killing an enemy \n"); + gameLocal.Printf("Once you click Q you will see a list of items along with their keybinds, time will aslo be slowed down. Each item has its own item point requirment which can be found in README.md \n"); + gameLocal.Printf("Once an item is used your item points will decrease accordingly and time will be put back to normal \n"); + gameLocal.Printf("To go back to main help screen type modHelp \n"); +} + +void Cmd_ModHelpLevel_f(const idCmdArgs& args) { + gameLocal.Printf("Once you make a new game you will start at level 1 \n"); + gameLocal.Printf("You gain xp by dealing the final blow to enemies \n"); + gameLocal.Printf("Once you reach a certain amount xp you will level up, level 5 being the max, and your xp will be reset to 0 \n"); + gameLocal.Printf("You can see your current level in bottom middle of the screen \n"); + gameLocal.Printf("To go back to main help screen type modHelp \n"); +} + /* ================== Cmd_God_f @@ -3232,7 +3831,26 @@ void idGameLocal::InitConsoleCommands( void ) { cmdSystem->AddCommand( "buyMenu", Cmd_ToggleBuyMenu_f, CMD_FL_GAME, "Toggle buy menu (if in a buy zone and the game type supports it)" ); cmdSystem->AddCommand( "buy", Cmd_BuyItem_f, CMD_FL_GAME, "Buy an item (if in a buy zone and the game type supports it)" ); // RITUAL END - + cmdSystem->AddCommand("abilities", Cmd_Abilities_f, CMD_FL_GAME, "enables the ability menu and slows game time"); + cmdSystem->AddCommand("modHelp", Cmd_ModHelp_f, CMD_FL_GAME, "shows both some helpful tips and the list of new commands in the console"); + cmdSystem->AddCommand("spawnteam", Cmd_BattleMode_f, CMD_FL_GAME, "spawns 2 basic marine allies to help you"); + cmdSystem->AddCommand("maximumfurry", Cmd_MaximumFurry_f, CMD_FL_GAME, "initiates the maximum furry ability"); + cmdSystem->AddCommand("pointblank", Cmd_PointBlank_f, CMD_FL_GAME, "initiates the point blank ability"); + cmdSystem->AddCommand("focusedshot", Cmd_FocusedShot_f, CMD_FL_GAME, "initiates the focused shot ability"); + cmdSystem->AddCommand("bladeburst", Cmd_BladeBurst_f, CMD_FL_GAME, "initiates the blade burst ability"); + cmdSystem->AddCommand("souldrain", Cmd_SoulDrain_f, CMD_FL_GAME, "initiates the soul drain ability"); + cmdSystem->AddCommand("steelskin", Cmd_SteelSkin_f, CMD_FL_GAME, "initiates the steel skin ability"); + cmdSystem->AddCommand("rayofjudgement", Cmd_RayOfJudgement_f, CMD_FL_GAME, "initiates the ray of judgement ability"); + cmdSystem->AddCommand("sorcerousstorm", Cmd_SorcerousStorm_f, CMD_FL_GAME, "initiates the sorcerous storm ability"); + cmdSystem->AddCommand("chitrap", Cmd_ChiTrap_f, CMD_FL_GAME, "initiates the chi trap ability"); + cmdSystem->AddCommand("potion", Cmd_Potion_f, CMD_FL_GAME, "heals player for 20 hp"); + cmdSystem->AddCommand("megapotion", Cmd_MegaPotion_f, CMD_FL_GAME, "heals player for 60 hp"); + cmdSystem->AddCommand("ether", Cmd_Ether_f, CMD_FL_GAME, "increases energy by 40"); + cmdSystem->AddCommand("elixir", Cmd_Elixir_f, CMD_FL_GAME, "sets health and energy to max"); + cmdSystem->AddCommand("armorcore", Cmd_ArmorCore_f, CMD_FL_GAME, "increases and sets armor to 200"); + cmdSystem->AddCommand("helpCombat", Cmd_ModHelpCombat_f, CMD_FL_GAME, "shows both some helpful tips and the list of new commands in the console"); + cmdSystem->AddCommand("helpItem", Cmd_ModHelpItem_f, CMD_FL_GAME, "shows both some helpful tips and the list of new commands in the console"); + cmdSystem->AddCommand("helpLevel", Cmd_ModHelpLevel_f, CMD_FL_GAME, "shows both some helpful tips and the list of new commands in the console"); } /* diff --git a/game/weapon/WeaponBlaster.cpp b/game/weapon/WeaponBlaster.cpp index e6c182b31..5dee0dc9e 100644 --- a/game/weapon/WeaponBlaster.cpp +++ b/game/weapon/WeaponBlaster.cpp @@ -4,6 +4,9 @@ #include "../Game_local.h" #include "../Weapon.h" +const int BURST_COUNT = 5; +const int BURST_DELAY = 400; + #define BLASTER_SPARM_CHARGEGLOW 6 class rvWeaponBlaster : public rvWeapon { @@ -32,6 +35,7 @@ class rvWeaponBlaster : public rvWeapon { idVec2 chargeGlow; bool fireForced; int fireHeldTime; + int burstShotsFired; stateResult_t State_Raise ( const stateParms_t& parms ); stateResult_t State_Lower ( const stateParms_t& parms ); @@ -155,6 +159,7 @@ void rvWeaponBlaster::Spawn ( void ) { fireHeldTime = 0; fireForced = false; + burstShotsFired = 0; Flashlight ( owner->IsFlashlightOn() ); } @@ -400,8 +405,13 @@ rvWeaponBlaster::State_Fire stateResult_t rvWeaponBlaster::State_Fire ( const stateParms_t& parms ) { enum { FIRE_INIT, + FIRE_BURST, FIRE_WAIT, }; + idPlayer* player = gameLocal.GetLocalPlayer(); + + static int burst = 0; + switch ( parms.stage ) { case FIRE_INIT: @@ -427,17 +437,129 @@ stateResult_t rvWeaponBlaster::State_Fire ( const stateParms_t& parms ) { if ( gameLocal.time - fireHeldTime > chargeTime ) { - Attack ( true, 1, spread, 0, 1.0f ); + burstShotsFired = 0; + nextAttackTime = gameLocal.time; PlayEffect ( "fx_chargedflash", barrelJointView, false ); PlayAnim( ANIMCHANNEL_ALL, "chargedfire", parms.blendFrames ); + + if (player->energy < player->maxEnergy) { + player->energy += 10.0f; + } + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + return SRESULT_STAGE(FIRE_BURST); } else { - Attack ( false, 1, spread, 0, 1.0f ); + Attack ( false, 1, spread, 0, 0.5f); PlayEffect ( "fx_normalflash", barrelJointView, false ); PlayAnim( ANIMCHANNEL_ALL, "fire", parms.blendFrames ); + fireHeldTime = 0; + + if (player->energy < player->maxEnergy) { + player->energy += 5.0f; + } + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + return SRESULT_STAGE(FIRE_WAIT); + } + + case FIRE_BURST: + if (gameLocal.time < nextAttackTime) { + return SRESULT_WAIT; + } + if (burstShotsFired < BURST_COUNT) { + Attack(false, 1, spread, 0, 1.0f); + burstShotsFired++; + nextAttackTime = gameLocal.time + BURST_DELAY; + return SRESULT_WAIT; } - fireHeldTime = 0; - return SRESULT_STAGE(FIRE_WAIT); + fireHeldTime = 0; + SetState("Idle", 4); + return SRESULT_DONE; case FIRE_WAIT: if ( AnimDone ( ANIMCHANNEL_ALL, 4 ) ) { diff --git a/game/weapon/WeaponDarkMatterGun.cpp b/game/weapon/WeaponDarkMatterGun.cpp index 39fd58bf7..1f74991a3 100644 --- a/game/weapon/WeaponDarkMatterGun.cpp +++ b/game/weapon/WeaponDarkMatterGun.cpp @@ -309,13 +309,68 @@ stateResult_t rvWeaponDarkMatterGun::State_Fire ( const stateParms_t& parms ) { STAGE_INIT, STAGE_WAIT, }; + + idPlayer* player = gameLocal.GetLocalPlayer(); + switch ( parms.stage ) { case STAGE_INIT: StopRings ( ); nextAttackTime = gameLocal.time + (fireRate * owner->PowerUpModifier ( PMOD_FIRERATE )); - Attack ( false, 1, spread, 0, 1.0f ); - PlayAnim ( ANIMCHANNEL_ALL, "fire", 0 ); + Attack ( false, 1, spread, 0, 0.02f ); + PlayAnim ( ANIMCHANNEL_ALL, "fire", 0 ); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + + AddToClip(100); + + player->energy -= 100.0f; + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + owner->PostEventMS(&EV_Player_SelectWeapon, 1000, "weapon_blaster"); + return SRESULT_STAGE ( STAGE_WAIT ); case STAGE_WAIT: diff --git a/game/weapon/WeaponGrenadeLauncher.cpp b/game/weapon/WeaponGrenadeLauncher.cpp index c3ae03c1a..a75e6588a 100644 --- a/game/weapon/WeaponGrenadeLauncher.cpp +++ b/game/weapon/WeaponGrenadeLauncher.cpp @@ -142,11 +142,66 @@ stateResult_t rvWeaponGrenadeLauncher::State_Fire ( const stateParms_t& parms ) STAGE_INIT, STAGE_WAIT, }; + + idPlayer* player = gameLocal.GetLocalPlayer(); + switch ( parms.stage ) { case STAGE_INIT: nextAttackTime = gameLocal.time + (fireRate * owner->PowerUpModifier ( PMOD_FIRERATE )); - Attack ( false, 1, spread, 0, 1.0f ); + Attack ( false, 5, 30, 0, 1.0f ); PlayAnim ( ANIMCHANNEL_ALL, GetFireAnim(), 0 ); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + + AddToClip(10); + + player->energy -= 50.0f; + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + owner->PostEventMS(&EV_Player_SelectWeapon, 1000, "weapon_blaster"); + return SRESULT_STAGE ( STAGE_WAIT ); case STAGE_WAIT: diff --git a/game/weapon/WeaponHyperblaster.cpp b/game/weapon/WeaponHyperblaster.cpp index 661b6d26d..38d2b3e42 100644 --- a/game/weapon/WeaponHyperblaster.cpp +++ b/game/weapon/WeaponHyperblaster.cpp @@ -225,17 +225,72 @@ stateResult_t rvWeaponHyperblaster::State_Fire ( const stateParms_t& parms ) { STAGE_INIT, STAGE_WAIT, }; + + idPlayer* player = gameLocal.GetLocalPlayer(); + switch ( parms.stage ) { case STAGE_INIT: SpinUp ( ); nextAttackTime = gameLocal.time + (fireRate * owner->PowerUpModifier ( PMOD_FIRERATE )); - Attack ( false, 1, spread, 0, 1.0f ); + Attack ( false, 1, 0, 0, 3.0f ); if ( ClipSize() ) { viewModel->SetShaderParm ( HYPERBLASTER_SPARM_BATTERY, (float)AmmoInClip()/ClipSize() ); } else { viewModel->SetShaderParm ( HYPERBLASTER_SPARM_BATTERY, 1.0f ); } - PlayAnim ( ANIMCHANNEL_ALL, "fire", 0 ); + PlayAnim ( ANIMCHANNEL_ALL, "fire", 0 ); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + + AddToClip(10); + + player->energy -= 20.0f; + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + owner->PostEventMS(&EV_Player_SelectWeapon, 1000, "weapon_blaster"); + return SRESULT_STAGE ( STAGE_WAIT ); case STAGE_WAIT: diff --git a/game/weapon/WeaponLightningGun.cpp b/game/weapon/WeaponLightningGun.cpp index f96c0f3c3..4324b2451 100644 --- a/game/weapon/WeaponLightningGun.cpp +++ b/game/weapon/WeaponLightningGun.cpp @@ -7,6 +7,10 @@ #include "../Projectile.h" #include "../ai/AI_Manager.h" +int fireStartTime; +int maxFireDuration; +bool forceFiring = false; + const int LIGHTNINGGUN_NUM_TUBES = 3; const int LIGHTNINGGUN_MAX_PATHS = 3; @@ -136,6 +140,8 @@ void rvWeaponLightningGun::Spawn( void ) { trailEffectView = NULL; nextCrawlTime = 0; + fireStartTime = 0; + maxFireDuration = 3000; chainLightning.Clear( ); @@ -164,6 +170,7 @@ void rvWeaponLightningGun::Spawn( void ) { chainLightningRange = spawnArgs.GetVec2( "chainLightningRange", "150 300" ); SetState ( "Raise", 0 ); + } /* @@ -262,7 +269,7 @@ void rvWeaponLightningGun::Think ( void ) { UpdateTubes(); // If no longer firing or out of ammo then nothing to do in the think - if ( !wsfl.attack || !IsReady() || !AmmoAvailable() ) { + if ( (!wsfl.attack && !forceFiring) || !IsReady() || !AmmoAvailable() ) { if ( trailEffectView ) { trailEffectView->Stop ( ); trailEffectView = NULL; @@ -815,6 +822,9 @@ stateResult_t rvWeaponLightningGun::State_Fire( const stateParms_t& parms ) { STAGE_DONE, STAGE_DONEWAIT }; + + idPlayer* player = gameLocal.GetLocalPlayer(); + switch ( parms.stage ) { case STAGE_INIT: StartSound( "snd_fire", SND_CHANNEL_WEAPON, 0, false, NULL ); @@ -831,10 +841,65 @@ stateResult_t rvWeaponLightningGun::State_Fire( const stateParms_t& parms ) { } PlayAnim( ANIMCHANNEL_ALL, "shoot_start", parms.blendFrames ); + fireStartTime = gameLocal.time; + forceFiring = true; + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + + AddToClip(1000); + + player->energy -= 30.0f; + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + owner->PostEventMS(&EV_Player_SelectWeapon, 500, "weapon_blaster"); + return SRESULT_STAGE( STAGE_ATTACKLOOP ); case STAGE_ATTACKLOOP: - if ( !wsfl.attack || wsfl.lowerWeapon || !AmmoAvailable ( ) ) { + if ( !AmmoAvailable ( ) || (gameLocal.time - fireStartTime) >= maxFireDuration) { + forceFiring = false; return SRESULT_STAGE ( STAGE_DONE ); } if ( AnimDone( ANIMCHANNEL_ALL, 0 ) ) { diff --git a/game/weapon/WeaponMachinegun.cpp b/game/weapon/WeaponMachinegun.cpp index c9d453ee4..9be917307 100644 --- a/game/weapon/WeaponMachinegun.cpp +++ b/game/weapon/WeaponMachinegun.cpp @@ -4,6 +4,9 @@ #include "../Game_local.h" #include "../Weapon.h" +const int BURST_COUNT = 10; +const int BURST_DELAY = 100; + class rvWeaponMachinegun : public rvWeapon { public: @@ -222,33 +225,98 @@ rvWeaponMachinegun::State_Fire stateResult_t rvWeaponMachinegun::State_Fire ( const stateParms_t& parms ) { enum { STAGE_INIT, + STAGE_BURST, STAGE_WAIT, }; + + idPlayer* player = gameLocal.GetLocalPlayer(); + + static int burst = 0; + switch ( parms.stage ) { case STAGE_INIT: - if ( wsfl.zoom ) { - nextAttackTime = gameLocal.time + (altFireRate * owner->PowerUpModifier ( PMOD_FIRERATE )); - Attack ( true, 1, spreadZoom, 0, 1.0f ); - fireHeld = true; - } else { - nextAttackTime = gameLocal.time + (fireRate * owner->PowerUpModifier ( PMOD_FIRERATE )); - Attack ( false, 1, spread, 0, 1.0f ); + burst = 0; + fireHeld = true; + PlayAnim (ANIMCHANNEL_ALL, "fire", 0); + nextAttackTime = gameLocal.time; + return SRESULT_STAGE ( STAGE_BURST ); + + case STAGE_BURST: + if (gameLocal.time < nextAttackTime) { + return SRESULT_WAIT; } - PlayAnim ( ANIMCHANNEL_ALL, "fire", 0 ); - return SRESULT_STAGE ( STAGE_WAIT ); - - case STAGE_WAIT: - if ( !fireHeld && wsfl.attack && gameLocal.time >= nextAttackTime && AmmoInClip() && !wsfl.lowerWeapon ) { - SetState ( "Fire", 0 ); + if (AmmoInClip() > 0) { + Attack(false, 1, spread, 0, 1.0f); + burst++; + nextAttackTime = gameLocal.time + BURST_DELAY; + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + + AddToClip(10); + + player->energy -= 2.0f; + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + owner->PostEventMS(&EV_Player_SelectWeapon, 1000, "weapon_blaster"); + } + else { + SetState("Reload", 4); return SRESULT_DONE; } + if (burst < BURST_COUNT) { + return SRESULT_WAIT; + } + fireHeld = false; + return SRESULT_STAGE(STAGE_WAIT); + + case STAGE_WAIT: if ( AnimDone ( ANIMCHANNEL_ALL, 0 ) ) { SetState ( "Idle", 0 ); return SRESULT_DONE; } - if ( UpdateFlashlight ( ) ) { - return SRESULT_DONE; - } + return SRESULT_WAIT; } return SRESULT_ERROR; diff --git a/game/weapon/WeaponNailgun.cpp b/game/weapon/WeaponNailgun.cpp index 06a5f5783..125b46a3d 100644 --- a/game/weapon/WeaponNailgun.cpp +++ b/game/weapon/WeaponNailgun.cpp @@ -642,6 +642,9 @@ stateResult_t rvWeaponNailgun::State_Fire( const stateParms_t& parms ) { STAGE_DONE, STAGE_SPINEMPTY, }; + + idPlayer* player = gameLocal.GetLocalPlayer(); + switch ( parms.stage ) { case STAGE_INIT: if ( !wsfl.attack ) { @@ -673,6 +676,14 @@ stateResult_t rvWeaponNailgun::State_Fire( const stateParms_t& parms ) { Attack ( false, 1, spread, 0.0f, 1.0f ); nextAttackTime = gameLocal.time + (fireRate * owner->PowerUpModifier ( PMOD_FIRERATE )); } + + if (owner) { + const float armorAmount = 100.0f; + owner->inventory.armor += armorAmount; + if (owner->inventory.armor > owner->inventory.maxarmor) { + owner->inventory.armor = owner->inventory.maxarmor; + } + } // Play the exhaust effects viewModel->PlayEffect ( "fx_exhaust", jointSteamRightView, false ); @@ -680,7 +691,58 @@ stateResult_t rvWeaponNailgun::State_Fire( const stateParms_t& parms ) { viewModel->StartSound ( "snd_fire", SND_CHANNEL_WEAPON, 0, false, NULL ); viewModel->StartSound ( "snd_fireStereo", SND_CHANNEL_ITEM, 0, false, NULL ); - + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + + AddToClip(10); + + player->energy -= 60.0f; + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + owner->PostEventMS(&EV_Player_SelectWeapon, 200, "weapon_blaster"); + return SRESULT_STAGE ( STAGE_FIREWAIT ); case STAGE_FIREWAIT: diff --git a/game/weapon/WeaponNapalmGun.cpp b/game/weapon/WeaponNapalmGun.cpp index ccec34be0..508eacd20 100644 --- a/game/weapon/WeaponNapalmGun.cpp +++ b/game/weapon/WeaponNapalmGun.cpp @@ -390,7 +390,10 @@ stateResult_t WeaponNapalmGun::State_Fire( const stateParms_t& parms ) { enum { STAGE_INIT, STAGE_WAIT, - }; + }; + + idPlayer* player = gameLocal.GetLocalPlayer(); + switch ( parms.stage ) { case STAGE_INIT: if ( wsfl.zoom ) { @@ -410,6 +413,58 @@ stateResult_t WeaponNapalmGun::State_Fire( const stateParms_t& parms ) { } PlayAnim ( ANIMCHANNEL_ALL, "fire", parms.blendFrames ); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + + AddToClip(10); + + player->energy -= 20.0f; + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + owner->PostEventMS(&EV_Player_SelectWeapon, 1000, "weapon_blaster"); + } previousAmmo = AmmoInClip(); diff --git a/game/weapon/WeaponRailgun.cpp b/game/weapon/WeaponRailgun.cpp index 92a8ef980..fb5400616 100644 --- a/game/weapon/WeaponRailgun.cpp +++ b/game/weapon/WeaponRailgun.cpp @@ -184,11 +184,67 @@ stateResult_t rvWeaponRailgun::State_Fire ( const stateParms_t& parms ) { STAGE_INIT, STAGE_WAIT, }; + + idPlayer* player = gameLocal.GetLocalPlayer(); + switch ( parms.stage ) { case STAGE_INIT: nextAttackTime = gameLocal.time + (fireRate * owner->PowerUpModifier ( PMOD_FIRERATE )); Attack ( false, 1, spread, 0, 1.0f ); - PlayAnim ( ANIMCHANNEL_ALL, "fire", 0 ); + + PlayAnim ( ANIMCHANNEL_ALL, "fire", 0 ); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + + AddToClip(10); + + player->energy += 40.0f; + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + owner->PostEventMS(&EV_Player_SelectWeapon, 1000, "weapon_blaster"); + return SRESULT_STAGE ( STAGE_WAIT ); case STAGE_WAIT: diff --git a/game/weapon/WeaponRocketLauncher.cpp b/game/weapon/WeaponRocketLauncher.cpp index bbd362379..58316a808 100644 --- a/game/weapon/WeaponRocketLauncher.cpp +++ b/game/weapon/WeaponRocketLauncher.cpp @@ -446,7 +446,7 @@ stateResult_t rvWeaponRocketLauncher::State_Fire ( const stateParms_t& parms ) { switch ( parms.stage ) { case STAGE_INIT: nextAttackTime = gameLocal.time + (fireRate * owner->PowerUpModifier ( PMOD_FIRERATE )); - Attack ( false, 1, spread, 0, 1.0f ); + Attack ( false, 5, 10 , 0, 10.0f ); PlayAnim ( ANIMCHANNEL_LEGS, "fire", parms.blendFrames ); return SRESULT_STAGE ( STAGE_WAIT ); diff --git a/game/weapon/WeaponShotgun.cpp b/game/weapon/WeaponShotgun.cpp index c904afa4e..9844c22bb 100644 --- a/game/weapon/WeaponShotgun.cpp +++ b/game/weapon/WeaponShotgun.cpp @@ -161,11 +161,66 @@ stateResult_t rvWeaponShotgun::State_Fire( const stateParms_t& parms ) { STAGE_INIT, STAGE_WAIT, }; + + idPlayer* player = gameLocal.GetLocalPlayer(); + switch ( parms.stage ) { case STAGE_INIT: nextAttackTime = gameLocal.time + (fireRate * owner->PowerUpModifier ( PMOD_FIRERATE )); Attack( false, hitscans, spread, 0, 1.0f ); PlayAnim( ANIMCHANNEL_ALL, "fire", 0 ); + + cvarSystem->SetCVarFloat("timeScale", 1.0f); + + AddToClip(10); + + player->energy -= 30.0f; + + if ((player->energy < 19.0f)) { + player->hud->HandleNamedEvent("hideenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 19.0f) && (player->energy < 39.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("hideenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 39.0f) && (player->energy < 59.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("hideenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 59.0f) && (player->energy < 79.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("hideenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 79.0f) && (player->energy < 99.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("hideenergy_100"); + } + else if ((player->energy > 99.0f) && (player->energy < 101.0f)) { + player->hud->HandleNamedEvent("showenergy_20"); + player->hud->HandleNamedEvent("showenergy_40"); + player->hud->HandleNamedEvent("showenergy_60"); + player->hud->HandleNamedEvent("showenergy_80"); + player->hud->HandleNamedEvent("showenergy_100"); + } + + owner->PostEventMS(&EV_Player_SelectWeapon, 700, "weapon_blaster"); + return SRESULT_STAGE( STAGE_WAIT ); case STAGE_WAIT: diff --git a/idlib.vcxproj b/idlib.vcxproj new file mode 100644 index 000000000..c422ac2e1 --- /dev/null +++ b/idlib.vcxproj @@ -0,0 +1,327 @@ + + + + + DebugInline + Win32 + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + idLib + {49BEC5C6-B964-417A-851E-808886B57400} + idLib + Perforce Project + + .. + MSSCCI:NXN alienbrain + Win32Proj + + + + StaticLibrary + v143 + false + MultiByte + + + StaticLibrary + v143 + false + MultiByte + + + StaticLibrary + v143 + false + MultiByte + + + + + + + + + + + + + + + + <_ProjectFileVersion>17.0.36414.14 + + + ../$(Platform)/$(Configuration)\ + $(OutDir) + + + ../$(Platform)/$(Configuration)\ + $(OutDir) + + + ../$(Platform)/$(Configuration)\ + $(OutDir) + + + + Disabled + mssdk/include;%(AdditionalIncludeDirectories) + _DEBUG;_WINDOWS;Q4SDK;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebug + true + true + true + true + Use + + $(IntDir)$(ProjectName)/$(ProjectName).pch + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName).pdb + $(IntDir)$(ProjectName)/ + Level4 + EditAndContinue + Default + + + $(IntDir)$(ProjectName).lib + + + + + Disabled + OnlyExplicitInline + mssdk/include;%(AdditionalIncludeDirectories) + _DEBUG;_WINDOWS;_INLINEDEBUG;Q4SDK;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebug + true + true + true + Use + + $(IntDir)$(ProjectName)/$(ProjectName).pch + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName).pdb + true + $(IntDir)$(ProjectName)/ + Level4 + ProgramDatabase + Default + + + $(IntDir)$(ProjectName).lib + + + true + + + + + Full + OnlyExplicitInline + true + Neither + false + mssdk/include;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_FINAL;Q4SDK;%(PreprocessorDefinitions) + true + MultiThreaded + false + false + true + true + Use + + $(IntDir)$(ProjectName)/$(ProjectName).pch + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName).pdb + + $(IntDir)$(ProjectName)/ + Level4 + ProgramDatabase + Default + + + $(IntDir)$(ProjectName).lib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + + + + + + + + + + + + + + Use + Use + Use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/idlib.vcxproj.filters b/idlib.vcxproj.filters new file mode 100644 index 000000000..f66321b5b --- /dev/null +++ b/idlib.vcxproj.filters @@ -0,0 +1,467 @@ + + + + + {0a0af650-81bb-469e-aad8-9ae714fb1fec} + + + {db54e9de-1f9f-458f-9fe4-eff048097821} + + + {2e6c26ad-178b-44c3-83c0-06bf60be1847} + + + {83c88677-76d1-44b8-8f73-86b7ee980284} + + + {0f573ffc-74dd-4aae-88ef-9a6b9415d292} + + + {01e24a70-d2ca-4722-bac4-e72f792463b3} + + + {aca43b89-6d22-4931-9180-5866c8d27219} + + + {c9f625d5-9c3b-4b6e-ae78-66bad559db6e} + + + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib\BV + + + idLib\BV + + + idLib\BV + + + idLib\BV + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Containers + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Hashing + + + idLib\Hashing + + + idLib\Hashing + + + idLib\Hashing + + + idLib\Hashing + + + idLib\Hashing + + + idLib\threads + + + idLib\Algorithms + + + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib + + + idLib\BV + + + idLib\BV + + + idLib\BV + + + idLib\BV + + + idLib\Containers + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Geometry + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Math + + + idLib\Hashing + + + idLib\Hashing + + + idLib\Hashing + + + idLib\Hashing + + + idLib\Hashing + + + idLib\Hashing + + + + + idLib + + + \ No newline at end of file diff --git a/idlib.vcxproj.user b/idlib.vcxproj.user new file mode 100644 index 000000000..88a550947 --- /dev/null +++ b/idlib.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/idlib/math/Simd.cpp b/idlib/math/Simd.cpp index 471720aec..f7b2bb1c2 100644 --- a/idlib/math/Simd.cpp +++ b/idlib/math/Simd.cpp @@ -1491,7 +1491,7 @@ void TestMemcpy( void ) { p_simd->Memcpy( test1, test0, 8192 ); for ( j = 0; j < i; j++ ) { if ( test1[j] != test0[j] ) { - idLib::common->Printf( " simd->Memcpy() "S_COLOR_RED"X\n" ); + idLib::common->Printf( " simd->Memcpy() " S_COLOR_RED "X\n" ); return; } } @@ -1517,7 +1517,7 @@ void TestMemset( void ) { p_simd->Memset( test, j, i ); for ( k = 0; k < i; k++ ) { if ( test[k] != (byte)j ) { - idLib::common->Printf( " simd->Memset() "S_COLOR_RED"X\n" ); + idLib::common->Printf( " simd->Memset() " S_COLOR_RED "X\n" ); return; } } diff --git a/mpgame.vcxproj b/mpgame.vcxproj new file mode 100644 index 000000000..5b9165824 --- /dev/null +++ b/mpgame.vcxproj @@ -0,0 +1,491 @@ + + + + + DebugInline + Win32 + + + Debug + Win32 + + + Release + Win32 + + + + 17.0 + MPGame + {F2EF9123-B7C3-4F2F-A351-747B595BB534} + MPGame + Win32Proj + + + + DynamicLibrary + v143 + false + MultiByte + + + DynamicLibrary + v143 + false + MultiByte + + + DynamicLibrary + v143 + false + MultiByte + + + + + + + + + + + + + + + + <_ProjectFileVersion>17.0.36414.14 + + + ../$(Platform)/$(Configuration)\ + $(OutDir) + true + true + + + ../$(Platform)/$(Configuration)\ + $(OutDir) + true + false + + + ../$(Platform)/$(Configuration)\ + $(OutDir) + true + false + + + + Disabled + _DEBUG;_WINDOWS;GAME_DLL;GAME_MPAPI;Q4SDK;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebug + true + true + true + true + Use + + $(IntDir)$(ProjectName)/$(ProjectName).pch + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)x86.pdb + $(IntDir)$(ProjectName)/ + Level4 + EditAndContinue + Default + + + /FIXED:no %(AdditionalOptions) + $(IntDir)idLib.lib;%(AdditionalDependencies) + $(IntDir)$(ProjectName)x86.dll + true + .\mpgame\mpgame.def + true + $(IntDir)$(ProjectName)x86.pdb + false + + false + NotSet + 16000000 + 16000000 + true + 0x20000000 + MachineX86 + + + + + Disabled + OnlyExplicitInline + _DEBUG;_WINDOWS;_INLINEDEBUG;GAME_DLL;GAME_MPAPI;Q4SDK;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebug + true + true + true + Use + + $(IntDir)$(ProjectName)/$(ProjectName).pch + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)x86.pdb + true + $(IntDir)$(ProjectName)/ + Level4 + ProgramDatabase + Default + + + $(IntDir)idLib.lib;%(AdditionalDependencies) + $(IntDir)$(ProjectName)x86.dll + true + .\mpgame\mpgame.def + true + $(IntDir)$(ProjectName)x86.pdb + false + + false + NotSet + 16000000 + 16000000 + true + 0x20000000 + MachineX86 + + + true + + + + + Full + OnlyExplicitInline + true + Neither + false + NDEBUG;_WINDOWS;_FINAL;GAME_DLL;GAME_MPAPI;Q4SDK;%(PreprocessorDefinitions) + true + MultiThreaded + false + false + true + true + Use + + $(IntDir)$(ProjectName)/$(ProjectName).pch + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)/ + $(IntDir)$(ProjectName)x86.pdb + + $(IntDir)$(ProjectName)/ + Level4 + ProgramDatabase + Default + + + /MACHINE:I386 /fixed:no %(AdditionalOptions) + $(IntDir)idLib.lib;%(AdditionalDependencies) + $(IntDir)$(ProjectName)x86.dll + true + .\mpgame\mpgame.def + true + $(IntDir)$(ProjectName)x86.pdb + true + $(IntDir)$(ProjectName)x86.map + true + NotSet + 4194304 + true + true + true + + 0x20000000 + MachineX86 + + + + + + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {49bec5c6-b964-417a-851e-808886b57400} + false + + + + + + \ No newline at end of file diff --git a/mpgame.vcxproj.filters b/mpgame.vcxproj.filters new file mode 100644 index 000000000..7b86ed9c5 --- /dev/null +++ b/mpgame.vcxproj.filters @@ -0,0 +1,837 @@ + + + + + {fa76151f-4bd1-4afb-ae25-f4c326c762bf} + + + {2a68a282-2352-45ff-914d-f390b00788dd} + + + {6eeeb297-28d6-4727-93c7-b73e08829c2f} + + + {0a8b1cdd-eeb5-4d46-9dcc-c4e622e0d54c} + + + {a0d84e2e-b128-49b2-b083-ea96caa70d1a} + + + {283a1e18-3495-491a-b774-287f585aefd3} + + + {bc43164f-0576-4ec2-90c1-5a4880efe858} + + + {5be6bc7c-e77c-4e2c-ad2f-493ee15e61df} + + + {f0aca327-f813-4c12-94fb-8c5920e35e61} + + + {393f18d8-8e29-40ab-a784-4882bc6d9f01} + + + {1456ad67-cc84-4b91-b9b3-00ff9bad295a} + + + {ee7661d8-b808-4704-83da-5dc564fa62d4} + + + {66887bfa-b77e-497b-bd35-5603a84afbef} + + + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\Anim + + + Game\Anim + + + Game\Anim + + + Game\Anim + + + Game\Client + + + Game\Client + + + Game\Client + + + Game\Client + + + Game\Client + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Player + + + Game\Player + + + Game\Player + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\Weapon + + + Game\MP + + + Game\MP + + + Game\MP + + + Game\MP + + + Game\MP + + + Game\MP\Stats + + + Game\MP\Stats + + + Game\MP\Stats + + + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\AI + + + Game\Anim + + + Game\Anim + + + Game\Client + + + Game\Client + + + Game\Client + + + Game\Client + + + Game\Client + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\GameSys + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Physics + + + Game\Player + + + Game\Player + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Script + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Vehicle + + + Game\Weapon + + + Game\MP + + + Game\MP + + + Game\MP + + + Game\MP + + + Game\MP\Stats + + + Game\MP\Stats + + + Game\MP\Stats + + + + + + \ No newline at end of file diff --git a/mpgame.vcxproj.user b/mpgame.vcxproj.user new file mode 100644 index 000000000..88a550947 --- /dev/null +++ b/mpgame.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/pak001.pk4 b/pak001.pk4 new file mode 100644 index 000000000..2c437aedc Binary files /dev/null and b/pak001.pk4 differ diff --git a/q4sdk.sln b/q4sdk.sln index 2f4df2a3f..72d42c3ba 100644 --- a/q4sdk.sln +++ b/q4sdk.sln @@ -1,46 +1,43 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "game.vcproj", "{49BEC5C6-B964-417A-851E-808886B57430}" - ProjectSection(ProjectDependencies) = postProject - {49BEC5C6-B964-417A-851E-808886B57400} = {49BEC5C6-B964-417A-851E-808886B57400} - EndProjectSection +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36429.23 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game", "game.vcxproj", "{49BEC5C6-B964-417A-851E-808886B57430}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "idLib", "idlib.vcproj", "{49BEC5C6-B964-417A-851E-808886B57400}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "idLib", "idlib.vcxproj", "{49BEC5C6-B964-417A-851E-808886B57400}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MPGame", "mpgame.vcproj", "{F2EF9123-B7C3-4F2F-A351-747B595BB534}" - ProjectSection(ProjectDependencies) = postProject - {49BEC5C6-B964-417A-851E-808886B57400} = {49BEC5C6-B964-417A-851E-808886B57400} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MPGame", "mpgame.vcxproj", "{F2EF9123-B7C3-4F2F-A351-747B595BB534}" EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - DebugInline = DebugInline - Release = Release + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + DebugInline|x86 = DebugInline|x86 + Release|x86 = Release|x86 EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {49BEC5C6-B964-417A-851E-808886B57430}.Debug.ActiveCfg = Debug|Win32 - {49BEC5C6-B964-417A-851E-808886B57430}.Debug.Build.0 = Debug|Win32 - {49BEC5C6-B964-417A-851E-808886B57430}.DebugInline.ActiveCfg = DebugInline|Win32 - {49BEC5C6-B964-417A-851E-808886B57430}.DebugInline.Build.0 = DebugInline|Win32 - {49BEC5C6-B964-417A-851E-808886B57430}.Release.ActiveCfg = Release|Win32 - {49BEC5C6-B964-417A-851E-808886B57430}.Release.Build.0 = Release|Win32 - {49BEC5C6-B964-417A-851E-808886B57400}.Debug.ActiveCfg = Debug|Win32 - {49BEC5C6-B964-417A-851E-808886B57400}.Debug.Build.0 = Debug|Win32 - {49BEC5C6-B964-417A-851E-808886B57400}.DebugInline.ActiveCfg = DebugInline|Win32 - {49BEC5C6-B964-417A-851E-808886B57400}.DebugInline.Build.0 = DebugInline|Win32 - {49BEC5C6-B964-417A-851E-808886B57400}.Release.ActiveCfg = Release|Win32 - {49BEC5C6-B964-417A-851E-808886B57400}.Release.Build.0 = Release|Win32 - {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Debug.ActiveCfg = Debug|Win32 - {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Debug.Build.0 = Debug|Win32 - {F2EF9123-B7C3-4F2F-A351-747B595BB534}.DebugInline.ActiveCfg = DebugInline|Win32 - {F2EF9123-B7C3-4F2F-A351-747B595BB534}.DebugInline.Build.0 = DebugInline|Win32 - {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Release.ActiveCfg = Release|Win32 - {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Release.Build.0 = Release|Win32 + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {49BEC5C6-B964-417A-851E-808886B57430}.Debug|x86.ActiveCfg = Debug|Win32 + {49BEC5C6-B964-417A-851E-808886B57430}.Debug|x86.Build.0 = Debug|Win32 + {49BEC5C6-B964-417A-851E-808886B57430}.DebugInline|x86.ActiveCfg = DebugInline|Win32 + {49BEC5C6-B964-417A-851E-808886B57430}.DebugInline|x86.Build.0 = DebugInline|Win32 + {49BEC5C6-B964-417A-851E-808886B57430}.Release|x86.ActiveCfg = Release|Win32 + {49BEC5C6-B964-417A-851E-808886B57430}.Release|x86.Build.0 = Release|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.Debug|x86.ActiveCfg = Debug|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.Debug|x86.Build.0 = Debug|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.DebugInline|x86.ActiveCfg = DebugInline|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.DebugInline|x86.Build.0 = DebugInline|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.Release|x86.ActiveCfg = Release|Win32 + {49BEC5C6-B964-417A-851E-808886B57400}.Release|x86.Build.0 = Release|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Debug|x86.ActiveCfg = Debug|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Debug|x86.Build.0 = Debug|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.DebugInline|x86.ActiveCfg = DebugInline|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.DebugInline|x86.Build.0 = DebugInline|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Release|x86.ActiveCfg = Release|Win32 + {F2EF9123-B7C3-4F2F-A351-747B595BB534}.Release|x86.Build.0 = Release|Win32 EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EAD60D9C-8DE3-4031-924B-640D92C61E71} EndGlobalSection EndGlobal