From d5223bcf4f482bf32f021ae2e31ab5d7b68a8ac8 Mon Sep 17 00:00:00 2001 From: Marcel Hara Date: Thu, 28 Sep 2023 22:37:31 +0100 Subject: [PATCH] Started funcionality for pistol and singlefire weapons --- .../DefaultEditorPerProjectUserSettings.ini | 196 +++++++++++++++++- EndlessVendetta/Config/DefaultEngine.ini | 8 +- .../Blueprints/BP_FirstPersonCharacter.uasset | 4 +- .../Blueprints/BP_PickUp_Rifle.uasset | 4 +- .../FirstPerson/GunMechanicWorld.uasset | 3 + .../Input/Actions/IA_HoldShoot.uasset | 3 + .../FirstPerson/Input/Actions/IA_Shoot.uasset | 3 - .../Input/Actions/IA_TapShoot.uasset | 3 + .../FirstPerson/Input/IMC_Default.uasset | 4 +- .../FirstPerson/Input/IMC_Weapons.uasset | 4 +- .../FirstPerson/Maps/GunMechanicTester.umap | 4 +- .../0/3Z/SNIBJQL2L6YHSC7MTTK1C2.uasset | 3 + .../EndlessVendetta/BaseWeaponClass.cpp | 40 +++- .../Source/EndlessVendetta/BaseWeaponClass.h | 17 +- .../EndlessVendettaCharacter.cpp | 12 ++ .../EndlessVendettaCharacter.h | 8 + .../EndlessVendetta/WeaponItemClass.cpp | 8 +- .../Source/EndlessVendetta/WeaponItemClass.h | 5 +- 18 files changed, 302 insertions(+), 27 deletions(-) create mode 100644 EndlessVendetta/Content/FirstPerson/GunMechanicWorld.uasset create mode 100644 EndlessVendetta/Content/FirstPerson/Input/Actions/IA_HoldShoot.uasset delete mode 100644 EndlessVendetta/Content/FirstPerson/Input/Actions/IA_Shoot.uasset create mode 100644 EndlessVendetta/Content/FirstPerson/Input/Actions/IA_TapShoot.uasset create mode 100644 EndlessVendetta/Content/__ExternalActors__/FirstPerson/Maps/GunMechanicTester/0/3Z/SNIBJQL2L6YHSC7MTTK1C2.uasset diff --git a/EndlessVendetta/Config/DefaultEditorPerProjectUserSettings.ini b/EndlessVendetta/Config/DefaultEditorPerProjectUserSettings.ini index 220a5519..094343ea 100644 --- a/EndlessVendetta/Config/DefaultEditorPerProjectUserSettings.ini +++ b/EndlessVendetta/Config/DefaultEditorPerProjectUserSettings.ini @@ -1,2 +1,196 @@ [ContentBrowser] -ContentBrowserTab1.SelectedPaths=/Game/FirstPerson \ No newline at end of file +ContentBrowserTab1.SelectedPaths=/Game/FirstPerson + +[/Script/UnrealEd.LevelEditorPlaySettings] +PlayFromHerePlayerStartClassName=/Script/Engine.PlayerStartPIE +GameGetsMouseControl=False +UseMouseForTouch=False +ShowMouseControlLabel=True +MouseControlLabelPosition=LabelAnchorMode_TopLeft +ViewportGetsHMDControl=False +ShouldMinimizeEditorOnVRPIE=True +bShouldMinimizeEditorOnNonVRPIE=False +bEmulateStereo=False +AutoRecompileBlueprints=True +EnableGameSound=True +SoloAudioInFirstPIEClient=False +EnablePIEEnterAndExitSounds=False +PlayInEditorSoundQualityLevel=0 +bUseNonRealtimeAudioDevice=False +bOnlyLoadVisibleLevelsInPIE=False +bPreferToStreamLevelsInPIE=False +bPromoteOutputLogWarningsDuringPIE=False +NewWindowWidth=1280 +NewWindowHeight=720 +NewWindowPosition=(X=-1,Y=-1) +CenterNewWindow=False +PIEAlwaysOnTop=False +DisableStandaloneSound=False +AdditionalLaunchParameters= +BuildGameBeforeLaunch=PlayOnBuild_Default +LaunchConfiguration=LaunchConfig_Default +PackFilesForLaunch=NoPak +bAutoCompileBlueprintsOnLaunch=True +bLaunchSeparateServer=False +PlayNetMode=PIE_Standalone +RunUnderOneProcess=True +PlayNetDedicated=False +PlayNumberOfClients=1 +PrimaryPIEClientIndex=0 +ServerPort=17777 +ClientWindowWidth=640 +AutoConnectToServer=True +RouteGamepadToSecondWindow=False +CreateAudioDeviceForEveryPlayer=False +ClientWindowHeight=480 +ServerMapNameOverride= +AdditionalServerGameOptions= +AdditionalLaunchOptions= +bShowServerDebugDrawingByDefault=True +ServerDebugDrawingColorTintStrength=0.000000 +ServerDebugDrawingColorTint=(R=0.000000,G=0.000000,B=0.000000,A=1.000000) +AdditionalServerLaunchParameters= +ServerFixedFPS=0 +NetworkEmulationSettings=(bIsNetworkEmulationEnabled=False,EmulationTarget=Server,CurrentProfile="Custom",OutPackets=(MinLatency=0,MaxLatency=0,PacketLossPercentage=0),InPackets=(MinLatency=0,MaxLatency=0,PacketLossPercentage=0)) +LastSize=(X=0,Y=0) +LastExecutedLaunchDevice=Windows@MARCELSPC +LastExecutedLaunchName=MARCELSPC +LastExecutedLaunchModeType=LaunchMode_OnDevice +LastExecutedPlayModeLocation=PlayLocation_DefaultPlayerStart +LastExecutedPlayModeType=PlayMode_InViewPort +LastExecutedPIEPreviewDevice= +-LaptopScreenResolutions=(Description="Apple MacBook Air 11",Width=1366,Height=768,AspectRatio="16:9",bCanSwapAspectRatio=true) +-LaptopScreenResolutions=(Description="Apple MacBook Air 13\"",Width=1440,Height=900,AspectRatio="16:10",bCanSwapAspectRatio=true) +-LaptopScreenResolutions=(Description="Apple MacBook Pro 13\"",Width=1280,Height=800,AspectRatio="16:10",bCanSwapAspectRatio=true) +-LaptopScreenResolutions=(Description="Apple MacBook Pro 13\" (Retina)",Width=2560,Height=1600,AspectRatio="16:10",bCanSwapAspectRatio=true) +-LaptopScreenResolutions=(Description="Apple MacBook Pro 15\"",Width=1440,Height=900,AspectRatio="16:10",bCanSwapAspectRatio=true) +-LaptopScreenResolutions=(Description="Apple MacBook Pro 15\" (Retina)",Width=2880,Height=1800,AspectRatio="16:10",bCanSwapAspectRatio=true) +-LaptopScreenResolutions=(Description="Generic 14-15.6\" Notebook",Width=1366,Height=768,AspectRatio="16:9",bCanSwapAspectRatio=true) ++LaptopScreenResolutions=(Description="Apple MacBook Air 11",Width=1366,Height=768,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="") ++LaptopScreenResolutions=(Description="Apple MacBook Air 13\"",Width=1440,Height=900,AspectRatio="16:10",bCanSwapAspectRatio=True,ProfileName="") ++LaptopScreenResolutions=(Description="Apple MacBook Pro 13\"",Width=1280,Height=800,AspectRatio="16:10",bCanSwapAspectRatio=True,ProfileName="") ++LaptopScreenResolutions=(Description="Apple MacBook Pro 13\" (Retina)",Width=2560,Height=1600,AspectRatio="16:10",bCanSwapAspectRatio=True,ProfileName="") ++LaptopScreenResolutions=(Description="Apple MacBook Pro 15\"",Width=1440,Height=900,AspectRatio="16:10",bCanSwapAspectRatio=True,ProfileName="") ++LaptopScreenResolutions=(Description="Apple MacBook Pro 15\" (Retina)",Width=2880,Height=1800,AspectRatio="16:10",bCanSwapAspectRatio=True,ProfileName="") ++LaptopScreenResolutions=(Description="Generic 14-15.6\" Notebook",Width=1366,Height=768,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="") +-MonitorScreenResolutions=(Description="19\" monitor",Width=1440,Height=900,AspectRatio="16:10",bCanSwapAspectRatio=true) +-MonitorScreenResolutions=(Description="20\" monitor",Width=1600,Height=900,AspectRatio="16:9",bCanSwapAspectRatio=true) +-MonitorScreenResolutions=(Description="22\" monitor",Width=1680,Height=1050,AspectRatio="16:10",bCanSwapAspectRatio=true) +-MonitorScreenResolutions=(Description="21.5-24\" monitor",Width=1920,Height=1080,AspectRatio="16:9",bCanSwapAspectRatio=true) +-MonitorScreenResolutions=(Description="27\" monitor",Width=2560,Height=1440,AspectRatio="16:9",bCanSwapAspectRatio=true) ++MonitorScreenResolutions=(Description="19\" monitor",Width=1440,Height=900,AspectRatio="16:10",bCanSwapAspectRatio=True,ProfileName="") ++MonitorScreenResolutions=(Description="20\" monitor",Width=1600,Height=900,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="") ++MonitorScreenResolutions=(Description="22\" monitor",Width=1680,Height=1050,AspectRatio="16:10",bCanSwapAspectRatio=True,ProfileName="") ++MonitorScreenResolutions=(Description="21.5-24\" monitor",Width=1920,Height=1080,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="") ++MonitorScreenResolutions=(Description="27\" monitor",Width=2560,Height=1440,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="") +-PhoneScreenResolutions=(Description="Apple iPhone 5S",Width=320,Height=568,AspectRatio="~16:9",bCanSwapAspectRatio=true,ProfileName="iPhone5S") +-PhoneScreenResolutions=(Description="Apple iPhone 6",Width=375,Height=667,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhone6") +-PhoneScreenResolutions=(Description="Apple iPhone 6+",Width=414,Height=736,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhone6Plus") +-PhoneScreenResolutions=(Description="Apple iPhone 6S",Width=375,Height=667,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhone6S") +-PhoneScreenResolutions=(Description="Apple iPhone 6S+",Width=414,Height=736,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhone6SPlus") +-PhoneScreenResolutions=(Description="Apple iPhone 7",Width=375,Height=667,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhone7") +-PhoneScreenResolutions=(Description="Apple iPhone 7+",Width=414,Height=736,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhone7Plus") +-PhoneScreenResolutions=(Description="Apple iPhone 8",Width=375,Height=667,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhone8") +-PhoneScreenResolutions=(Description="Apple iPhone 8+",Width=414,Height=736,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhone8Plus") +-PhoneScreenResolutions=(Description="Apple iPhone X",Width=375,Height=812,AspectRatio="19.5:9",bCanSwapAspectRatio=true,ProfileName="iPhoneX") +-PhoneScreenResolutions=(Description="Apple iPhone XS",Width=375,Height=812,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhoneXS") +-PhoneScreenResolutions=(Description="Apple iPhone XS Max",Width=414,Height=896,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhoneXSMax") +-PhoneScreenResolutions=(Description="Apple iPhone XR",Width=414,Height=896,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="iPhoneXR") +-PhoneScreenResolutions=(Description="HTC One",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="Android_High") +-PhoneScreenResolutions=(Description="Samsung Galaxy S4",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="Android_Low") +-PhoneScreenResolutions=(Description="Samsung Galaxy S6",Width=1440,Height=2560,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="Android_Mali_T7xx") +-PhoneScreenResolutions=(Description="Samsung Galaxy S7",Width=1440,Height=2560,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="Android_High") +-PhoneScreenResolutions=(Description="Samsung Galaxy S8 (Mali)",Width=1080,Height=2220,AspectRatio="18.5:9",bCanSwapAspectRatio=true,ProfileName="Android_Mali_G71") +-PhoneScreenResolutions=(Description="Samsung Galaxy S8 (Adreno)",Width=1080,Height=2220,AspectRatio="18.5:9",bCanSwapAspectRatio=true,ProfileName="Android_Adreno5xx") +-PhoneScreenResolutions=(Description="Samsung Galaxy S9 (Mali)",Width=1440,Height=2960,AspectRatio="18.5:9",bCanSwapAspectRatio=true,ProfileName="Android_High") +-PhoneScreenResolutions=(Description="Samsung Galaxy S9 (Adreno)",Width=1440,Height=2960,AspectRatio="18.5:9",bCanSwapAspectRatio=true,ProfileName="Android_High") +-PhoneScreenResolutions=(Description="Samsung Galaxy Note 9 (Mali)",Width=1440,Height=2960,AspectRatio="18.5:9",bCanSwapAspectRatio=true,ProfileName="Android_High") +-PhoneScreenResolutions=(Description="Samsung Galaxy S10 (Adreno)",Width=1440,Height=3040,AspectRatio="19:9",bCanSwapAspectRatio=true,ProfileName="Android_Adreno6xx") +-PhoneScreenResolutions=(Description="Samsung Galaxy S10 (Mali)",Width=1440,Height=3040,AspectRatio="19:9",bCanSwapAspectRatio=true,ProfileName="Android_Mali_G76") +-PhoneScreenResolutions=(Description="Samsung Galaxy S10e (Adreno)",Width=1080,Height=2280,AspectRatio="19:9",bCanSwapAspectRatio=true,ProfileName="Android_Adreno6xx") +-PhoneScreenResolutions=(Description="Samsung Galaxy S10e (Mali)",Width=1080,Height=2280,AspectRatio="19:9",bCanSwapAspectRatio=true,ProfileName="Android_Mali_G76") +-PhoneScreenResolutions=(Description="Google Pixel",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="Android_Mid") +-PhoneScreenResolutions=(Description="Google Pixel XL",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="Android_Mid") +-PhoneScreenResolutions=(Description="Google Pixel 2",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="Android_Mid") +-PhoneScreenResolutions=(Description="Google Pixel 2 XL",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="Android_Mid") +-PhoneScreenResolutions=(Description="Google Pixel 3",Width=1080,Height=2160,AspectRatio="18:9",bCanSwapAspectRatio=true,ProfileName="Android_Mid") +-PhoneScreenResolutions=(Description="Google Pixel 3 XL",Width=1440,Height=2960,AspectRatio="18.5:9",bCanSwapAspectRatio=true,ProfileName="Android_Mid") +-PhoneScreenResolutions=(Description="Razer Phone",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=true,ProfileName="Android_Mid") ++PhoneScreenResolutions=(Description="Apple iPhone 5S",Width=320,Height=568,AspectRatio="~16:9",bCanSwapAspectRatio=True,ProfileName="iPhone5S") ++PhoneScreenResolutions=(Description="Apple iPhone 6",Width=375,Height=667,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhone6") ++PhoneScreenResolutions=(Description="Apple iPhone 6+",Width=414,Height=736,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhone6Plus") ++PhoneScreenResolutions=(Description="Apple iPhone 6S",Width=375,Height=667,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhone6S") ++PhoneScreenResolutions=(Description="Apple iPhone 6S+",Width=414,Height=736,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhone6SPlus") ++PhoneScreenResolutions=(Description="Apple iPhone 7",Width=375,Height=667,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhone7") ++PhoneScreenResolutions=(Description="Apple iPhone 7+",Width=414,Height=736,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhone7Plus") ++PhoneScreenResolutions=(Description="Apple iPhone 8",Width=375,Height=667,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhone8") ++PhoneScreenResolutions=(Description="Apple iPhone 8+",Width=414,Height=736,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhone8Plus") ++PhoneScreenResolutions=(Description="Apple iPhone X",Width=375,Height=812,AspectRatio="19.5:9",bCanSwapAspectRatio=True,ProfileName="iPhoneX") ++PhoneScreenResolutions=(Description="Apple iPhone XS",Width=375,Height=812,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhoneXS") ++PhoneScreenResolutions=(Description="Apple iPhone XS Max",Width=414,Height=896,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhoneXSMax") ++PhoneScreenResolutions=(Description="Apple iPhone XR",Width=414,Height=896,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="iPhoneXR") ++PhoneScreenResolutions=(Description="HTC One",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="Android_High") ++PhoneScreenResolutions=(Description="Samsung Galaxy S4",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="Android_Low") ++PhoneScreenResolutions=(Description="Samsung Galaxy S6",Width=1440,Height=2560,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="Android_Mali_T7xx") ++PhoneScreenResolutions=(Description="Samsung Galaxy S7",Width=1440,Height=2560,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="Android_High") ++PhoneScreenResolutions=(Description="Samsung Galaxy S8 (Mali)",Width=1080,Height=2220,AspectRatio="18.5:9",bCanSwapAspectRatio=True,ProfileName="Android_Mali_G71") ++PhoneScreenResolutions=(Description="Samsung Galaxy S8 (Adreno)",Width=1080,Height=2220,AspectRatio="18.5:9",bCanSwapAspectRatio=True,ProfileName="Android_Adreno5xx") ++PhoneScreenResolutions=(Description="Samsung Galaxy S9 (Mali)",Width=1440,Height=2960,AspectRatio="18.5:9",bCanSwapAspectRatio=True,ProfileName="Android_High") ++PhoneScreenResolutions=(Description="Samsung Galaxy S9 (Adreno)",Width=1440,Height=2960,AspectRatio="18.5:9",bCanSwapAspectRatio=True,ProfileName="Android_High") ++PhoneScreenResolutions=(Description="Samsung Galaxy Note 9 (Mali)",Width=1440,Height=2960,AspectRatio="18.5:9",bCanSwapAspectRatio=True,ProfileName="Android_High") ++PhoneScreenResolutions=(Description="Samsung Galaxy S10 (Adreno)",Width=1440,Height=3040,AspectRatio="19:9",bCanSwapAspectRatio=True,ProfileName="Android_Adreno6xx") ++PhoneScreenResolutions=(Description="Samsung Galaxy S10 (Mali)",Width=1440,Height=3040,AspectRatio="19:9",bCanSwapAspectRatio=True,ProfileName="Android_Mali_G76") ++PhoneScreenResolutions=(Description="Samsung Galaxy S10e (Adreno)",Width=1080,Height=2280,AspectRatio="19:9",bCanSwapAspectRatio=True,ProfileName="Android_Adreno6xx") ++PhoneScreenResolutions=(Description="Samsung Galaxy S10e (Mali)",Width=1080,Height=2280,AspectRatio="19:9",bCanSwapAspectRatio=True,ProfileName="Android_Mali_G76") ++PhoneScreenResolutions=(Description="Google Pixel",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="Android_Mid") ++PhoneScreenResolutions=(Description="Google Pixel XL",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="Android_Mid") ++PhoneScreenResolutions=(Description="Google Pixel 2",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="Android_Mid") ++PhoneScreenResolutions=(Description="Google Pixel 2 XL",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="Android_Mid") ++PhoneScreenResolutions=(Description="Google Pixel 3",Width=1080,Height=2160,AspectRatio="18:9",bCanSwapAspectRatio=True,ProfileName="Android_Mid") ++PhoneScreenResolutions=(Description="Google Pixel 3 XL",Width=1440,Height=2960,AspectRatio="18.5:9",bCanSwapAspectRatio=True,ProfileName="Android_Mid") ++PhoneScreenResolutions=(Description="Razer Phone",Width=1080,Height=1920,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="Android_Mid") +-TabletScreenResolutions=(Description="iPad Pro 12.9-inch (3rd gen.)",Width=1024,Height=1366,AspectRatio="~3:4",bCanSwapAspectRatio=true,ProfileName="iPadPro3_129") +-TabletScreenResolutions=(Description="iPad Pro 12.9-inch (2nd gen.)",Width=1024,Height=1366,AspectRatio="~3:4",bCanSwapAspectRatio=true,ProfileName="iPadPro2_129") +-TabletScreenResolutions=(Description="iPad Pro 11-inch",Width=834,Height=1194,AspectRatio="5:7",bCanSwapAspectRatio=true,ProfileName="iPadPro11") +-TabletScreenResolutions=(Description="iPad Pro 10.5-inch",Width=834,Height=1112,AspectRatio="3:4",bCanSwapAspectRatio=true,ProfileName="iPadPro105") +-TabletScreenResolutions=(Description="iPad Pro 12.9-inch",Width=1024,Height=1366,AspectRatio="3:4",bCanSwapAspectRatio=true,ProfileName="iPadPro129") +-TabletScreenResolutions=(Description="iPad Pro 9.7-inch",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=true,ProfileName="iPadPro97") +-TabletScreenResolutions=(Description="iPad (6th gen.)",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=true,ProfileName="iPad6") +-TabletScreenResolutions=(Description="iPad (5th gen.)",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=true,ProfileName="iPad5") +-TabletScreenResolutions=(Description="iPad Air 3",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=true,ProfileName="iPadAir3") +-TabletScreenResolutions=(Description="iPad Air 2",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=true,ProfileName="iPadAir2") +-TabletScreenResolutions=(Description="iPad Mini 5",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=true,ProfileName="iPadMini5") +-TabletScreenResolutions=(Description="iPad Mini 4",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=true,ProfileName="iPadMini4") +-TabletScreenResolutions=(Description="LG G Pad X 8.0",Width=768,Height=1366,AspectRatio="9:16",bCanSwapAspectRatio=true) +-TabletScreenResolutions=(Description="Asus Zenpad 3s 10",Width=768,Height=1366,AspectRatio="9:16",bCanSwapAspectRatio=true) +-TabletScreenResolutions=(Description="Huawei MediaPad M3",Width=768,Height=1366,AspectRatio="9:16",bCanSwapAspectRatio=true) +-TabletScreenResolutions=(Description="Microsoft Surface RT",Width=768,Height=1366,AspectRatio="9:16",bCanSwapAspectRatio=true) +-TabletScreenResolutions=(Description="Microsoft Surface Pro",Width=1080,Height=1920,AspectRatio="9:16",bCanSwapAspectRatio=true) ++TabletScreenResolutions=(Description="iPad Pro 12.9-inch (3rd gen.)",Width=1024,Height=1366,AspectRatio="~3:4",bCanSwapAspectRatio=True,ProfileName="iPadPro3_129") ++TabletScreenResolutions=(Description="iPad Pro 12.9-inch (2nd gen.)",Width=1024,Height=1366,AspectRatio="~3:4",bCanSwapAspectRatio=True,ProfileName="iPadPro2_129") ++TabletScreenResolutions=(Description="iPad Pro 11-inch",Width=834,Height=1194,AspectRatio="5:7",bCanSwapAspectRatio=True,ProfileName="iPadPro11") ++TabletScreenResolutions=(Description="iPad Pro 10.5-inch",Width=834,Height=1112,AspectRatio="3:4",bCanSwapAspectRatio=True,ProfileName="iPadPro105") ++TabletScreenResolutions=(Description="iPad Pro 12.9-inch",Width=1024,Height=1366,AspectRatio="3:4",bCanSwapAspectRatio=True,ProfileName="iPadPro129") ++TabletScreenResolutions=(Description="iPad Pro 9.7-inch",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=True,ProfileName="iPadPro97") ++TabletScreenResolutions=(Description="iPad (6th gen.)",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=True,ProfileName="iPad6") ++TabletScreenResolutions=(Description="iPad (5th gen.)",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=True,ProfileName="iPad5") ++TabletScreenResolutions=(Description="iPad Air 3",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=True,ProfileName="iPadAir3") ++TabletScreenResolutions=(Description="iPad Air 2",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=True,ProfileName="iPadAir2") ++TabletScreenResolutions=(Description="iPad Mini 5",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=True,ProfileName="iPadMini5") ++TabletScreenResolutions=(Description="iPad Mini 4",Width=768,Height=1024,AspectRatio="3:4",bCanSwapAspectRatio=True,ProfileName="iPadMini4") ++TabletScreenResolutions=(Description="LG G Pad X 8.0",Width=768,Height=1366,AspectRatio="9:16",bCanSwapAspectRatio=True,ProfileName="") ++TabletScreenResolutions=(Description="Asus Zenpad 3s 10",Width=768,Height=1366,AspectRatio="9:16",bCanSwapAspectRatio=True,ProfileName="") ++TabletScreenResolutions=(Description="Huawei MediaPad M3",Width=768,Height=1366,AspectRatio="9:16",bCanSwapAspectRatio=True,ProfileName="") ++TabletScreenResolutions=(Description="Microsoft Surface RT",Width=768,Height=1366,AspectRatio="9:16",bCanSwapAspectRatio=True,ProfileName="") ++TabletScreenResolutions=(Description="Microsoft Surface Pro",Width=1080,Height=1920,AspectRatio="9:16",bCanSwapAspectRatio=True,ProfileName="") +-TelevisionScreenResolutions=(Description="720p (HDTV, Blu-ray)",Width=1280,Height=720,AspectRatio="16:9",bCanSwapAspectRatio=true) +-TelevisionScreenResolutions=(Description="1080i, 1080p (HDTV, Blu-ray)",Width=1920,Height=1080,AspectRatio="16:9",bCanSwapAspectRatio=true) +-TelevisionScreenResolutions=(Description="4K Ultra HD",Width=3840,Height=2160,AspectRatio="16:9",bCanSwapAspectRatio=true) +-TelevisionScreenResolutions=(Description="4K Digital Cinema",Width=4096,Height=2160,AspectRatio="1.90:1",bCanSwapAspectRatio=true) ++TelevisionScreenResolutions=(Description="720p (HDTV, Blu-ray)",Width=1280,Height=720,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="") ++TelevisionScreenResolutions=(Description="1080i, 1080p (HDTV, Blu-ray)",Width=1920,Height=1080,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="") ++TelevisionScreenResolutions=(Description="4K Ultra HD",Width=3840,Height=2160,AspectRatio="16:9",bCanSwapAspectRatio=True,ProfileName="") ++TelevisionScreenResolutions=(Description="4K Digital Cinema",Width=4096,Height=2160,AspectRatio="1.90:1",bCanSwapAspectRatio=True,ProfileName="") +DeviceToEmulate= +PIESafeZoneOverride=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000) + diff --git a/EndlessVendetta/Config/DefaultEngine.ini b/EndlessVendetta/Config/DefaultEngine.ini index 1c20f465..f61108f4 100644 --- a/EndlessVendetta/Config/DefaultEngine.ini +++ b/EndlessVendetta/Config/DefaultEngine.ini @@ -6,14 +6,16 @@ [/Script/EngineSettings.GameMapsSettings] EditorStartupMap=/Game/FirstPerson/Maps/GunMechanicTester.GunMechanicTester LocalMapOptions= -TransitionMap= +TransitionMap=None bUseSplitscreen=True TwoPlayerSplitscreenLayout=Horizontal ThreePlayerSplitscreenLayout=FavorTop +FourPlayerSplitscreenLayout=Grid +bOffsetPlayerGamepadIds=False GameInstanceClass=/Script/Engine.GameInstance GameDefaultMap=/Game/FirstPerson/Maps/GunMechanicTester.GunMechanicTester -ServerDefaultMap=/Engine/Maps/Entry -GlobalDefaultGameMode=/Script/EndlessVendetta.EndlessVendettaGameMode +ServerDefaultMap=/Engine/Maps/Entry.Entry +GlobalDefaultGameMode=/Game/FirstPerson/GunMechanicWorld.GunMechanicWorld_C GlobalDefaultServerGameMode=None [/Script/Engine.RendererSettings] diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset index 00b38c8d..034d9419 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46657eb5de2de0259508b2ff818d484f06f895c13f8bb3d04c6fc34ea61659a1 -size 23694 +oid sha256:7cdc8c835b9e8e0bf81e8bc89d0ea3027bae94e2174be261c132bd300f1fad51 +size 23989 diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_PickUp_Rifle.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_PickUp_Rifle.uasset index c40095d8..42fff7f9 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_PickUp_Rifle.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_PickUp_Rifle.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:91c5ce4a3278b69b5104cd1d2972be90b80fc199098202556009b1d28b52fe38 -size 32842 +oid sha256:4d156d6fe24779674a35f18f9209313b0c2096d22772400c4d10c241a2e59e9e +size 21649 diff --git a/EndlessVendetta/Content/FirstPerson/GunMechanicWorld.uasset b/EndlessVendetta/Content/FirstPerson/GunMechanicWorld.uasset new file mode 100644 index 00000000..551d8f69 --- /dev/null +++ b/EndlessVendetta/Content/FirstPerson/GunMechanicWorld.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50316ead250bb810a80831ade33e194f2de7ccb433dc172e5217540998e2854e +size 19098 diff --git a/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_HoldShoot.uasset b/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_HoldShoot.uasset new file mode 100644 index 00000000..ac52169f --- /dev/null +++ b/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_HoldShoot.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1360a5e75da75d76374ea2091191ab85eab8ae0407f660ec7e242bdb51056670 +size 1659 diff --git a/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_Shoot.uasset b/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_Shoot.uasset deleted file mode 100644 index 108736e1..00000000 --- a/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_Shoot.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e1d44dcf8506d3f89055e8f440e10943ff7f436e1bc5ec345c2a79069e2327d4 -size 1598 diff --git a/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_TapShoot.uasset b/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_TapShoot.uasset new file mode 100644 index 00000000..b951ed44 --- /dev/null +++ b/EndlessVendetta/Content/FirstPerson/Input/Actions/IA_TapShoot.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d02927e6f81929b1b6715400ce5f1a62361f239a5baad938902ae86b61ddc55 +size 1657 diff --git a/EndlessVendetta/Content/FirstPerson/Input/IMC_Default.uasset b/EndlessVendetta/Content/FirstPerson/Input/IMC_Default.uasset index c85553cd..ea55777d 100644 --- a/EndlessVendetta/Content/FirstPerson/Input/IMC_Default.uasset +++ b/EndlessVendetta/Content/FirstPerson/Input/IMC_Default.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ffa41b9939bbfe39ea2480464028578938aa1a8c0acc1edeac030ade6d1d9d76 -size 14001 +oid sha256:1006f1f08d6d5428a9c4689b38adff8ae38cb5a4b71ed3d8831ad0ef4da32363 +size 15167 diff --git a/EndlessVendetta/Content/FirstPerson/Input/IMC_Weapons.uasset b/EndlessVendetta/Content/FirstPerson/Input/IMC_Weapons.uasset index e1400043..e0d25572 100644 --- a/EndlessVendetta/Content/FirstPerson/Input/IMC_Weapons.uasset +++ b/EndlessVendetta/Content/FirstPerson/Input/IMC_Weapons.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cbc3f6b581c994996d42e89d377343eb9699442117748a71f9ead311d203992b -size 4115 +oid sha256:99664f7a2d02cd77eec769cd0a690345e80de975fcacb8a615346583218e1b15 +size 4138 diff --git a/EndlessVendetta/Content/FirstPerson/Maps/GunMechanicTester.umap b/EndlessVendetta/Content/FirstPerson/Maps/GunMechanicTester.umap index 503b25b8..9b60a76e 100644 --- a/EndlessVendetta/Content/FirstPerson/Maps/GunMechanicTester.umap +++ b/EndlessVendetta/Content/FirstPerson/Maps/GunMechanicTester.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee182b80d3a23ed532f8e4efed1b99c1c648c6076e3e6d72b75e8a511784ff06 -size 19378 +oid sha256:317895349b964df99a6a8316ea5f4664ebf4127af8e56f543893d36cc49afbfe +size 19651 diff --git a/EndlessVendetta/Content/__ExternalActors__/FirstPerson/Maps/GunMechanicTester/0/3Z/SNIBJQL2L6YHSC7MTTK1C2.uasset b/EndlessVendetta/Content/__ExternalActors__/FirstPerson/Maps/GunMechanicTester/0/3Z/SNIBJQL2L6YHSC7MTTK1C2.uasset new file mode 100644 index 00000000..4f6bab25 --- /dev/null +++ b/EndlessVendetta/Content/__ExternalActors__/FirstPerson/Maps/GunMechanicTester/0/3Z/SNIBJQL2L6YHSC7MTTK1C2.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdab805d14a7bc4f2fa61abc0106161cf2626e8857ae14089d5e4c93f9a320d6 +size 5061 diff --git a/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.cpp b/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.cpp index 3d2bf453..35d57eb1 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.cpp @@ -2,8 +2,9 @@ #include "BaseWeaponClass.h" - +#include "EndlessVendettaCharacter.h" #include "Components/CapsuleComponent.h" +#include "Kismet/GameplayStatics.h" // Sets default values @@ -18,6 +19,24 @@ void ABaseWeaponClass::BeginPlay() { Super::BeginPlay(); + // Attempt to find the player character + APlayerController* PlayerController = UGameplayStatics::GetPlayerController(this, 0); + player = Cast(PlayerController->GetCharacter()); + if (PlayerController) + { + if (player) + { + UE_LOG(LogTemp, Display, TEXT("BeginPlay: Player found.")); + } + else + { + UE_LOG(LogTemp, Error, TEXT("BeginPlay: Player not found.")); + } + } + else + { + UE_LOG(LogTemp, Error, TEXT("BeginPlay: Player controller not found.")); + } } // Called every frame @@ -26,3 +45,22 @@ void ABaseWeaponClass::Tick(float DeltaTime) Super::Tick(DeltaTime); } +void ABaseWeaponClass::TapFire() +{ + FHitResult outHit; + FVector traceStart; + FVector traceEnd; + traceStart = player->GetActorLocation(); + traceEnd = traceStart + (player->GetActorForwardVector() * 50); + UE_LOG(LogTemp, Display, TEXT("World: %s"), *GetWorld()->GetName()); + FCollisionQueryParams collisionParams; + GetWorld()->LineTraceSingleByChannel(outHit, traceStart, traceEnd, ECC_Visibility, collisionParams); + + //Debug line to see where the trace hit + DrawDebugLine(this->GetWorld(), traceStart, traceEnd, FColor::Red, true); + if (outHit.bBlockingHit) + { + UE_LOG(LogTemp, Display, TEXT("Hit something")); + } + UE_LOG(LogTemp, Display, TEXT("BOOMBOOMBIMBAMBIM")); +} diff --git a/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.h b/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.h index 32225fe0..2fc1219a 100644 --- a/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.h +++ b/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.h @@ -6,10 +6,11 @@ #include "WeaponItemClass.h" #include "BaseWeaponClass.generated.h" +class AEndlessVendettaCharacter; class UCapsuleComponent; UCLASS() -class ENDLESSVENDETTA_API ABaseWeaponClass : public AWeaponItemClass +class ENDLESSVENDETTA_API ABaseWeaponClass : public AActor { GENERATED_BODY() @@ -39,5 +40,19 @@ public: UPROPERTY(EditAnywhere) UTexture2D* WeaponImage; + + UFUNCTION(BlueprintCallable, Category = "Weapons") + void TapFire(); + + UPROPERTY(VisibleAnywhere) + ACharacter* player; + + + + + //Add HoldFire functionality after pistol is complete for holding fire for pistol and make it start spraying innacuratly. + + // UFUNCTION(BlueprintCallable, Category = "Weapons") + // void HoldFire(); }; diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp index 189f8513..62ffd896 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp @@ -73,6 +73,9 @@ void AEndlessVendettaCharacter::SetupPlayerInputComponent(class UInputComponent* //Weapon Switching EnhancedInputComponent->BindAction(EquipPrimaryWeapon, ETriggerEvent::Triggered, this, &AEndlessVendettaCharacter::EquipPrimary); EnhancedInputComponent->BindAction(EquipSecondaryWeapon, ETriggerEvent::Triggered, this, &AEndlessVendettaCharacter::EquipSecondary); + + //Weapon Shooting + EnhancedInputComponent->BindAction(TapShootAction, ETriggerEvent::Triggered, this, &AEndlessVendettaCharacter::TapFireCaller); } } @@ -130,6 +133,15 @@ void AEndlessVendettaCharacter::EquipSecondary() } } +//Calls the fire function in the baseWeaponClass +void AEndlessVendettaCharacter::TapFireCaller() +{ + if (IsValid(PrimaryWeapon) || IsValid(SecondaryWeapon)) + { + PrimaryWeaponClass.GetDefaultObject()->TapFire(); + } +} + //POTENTIAL PICKUP SYSTEM NEEDS CHANGING BUT YES //Called from Player BluePrints diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h index c5c020fc..357f0cfd 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h @@ -49,6 +49,11 @@ class AEndlessVendettaCharacter : public ACharacter UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Input, meta=(AllowPrivateAccess = "true")) class UInputAction* EquipSecondaryWeapon; + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Input, meta=(AllowPrivateAccess = "true")) + class UInputAction* TapShootAction; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Input, meta=(AllowPrivateAccess = "true")) + class UInputAction* HoldShootAction; public: AEndlessVendettaCharacter(); @@ -84,6 +89,9 @@ public: ABaseWeaponClass* SecondaryWeapon; + UFUNCTION(BlueprintCallable, Category = "Weapons") + void TapFireCaller(); + protected: /** Called for movement input */ diff --git a/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.cpp b/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.cpp index d1e399a7..32f68147 100644 --- a/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.cpp @@ -25,12 +25,10 @@ void AWeaponItemClass::Tick(float DeltaTime) } //Called from WeaponInventory actor component class -void AWeaponItemClass::Equip(ABaseWeaponClass* PickedUpWeapon) +void AWeaponItemClass::Equip() { - //get the weapons in the array from component - //whatever input is being pressed add that to the player socket - //if there is no gun simply add it to the socket - //if there is a weapon remove from socket and add the requested one + GetWorld(); + UE_LOG(LogTemp, Display, TEXT("World Player is in: %s"), GetWorld()); } //Called from WeaponInventory actor component class diff --git a/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.h b/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.h index a1ad01bf..0ab0f0a6 100644 --- a/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.h +++ b/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.h @@ -25,11 +25,10 @@ public: // Called every frame virtual void Tick(float DeltaTime) override; -private: - UFUNCTION() - void Equip(ABaseWeaponClass* PickedUpWeapon); + void Equip(); UFUNCTION() void Unequip(ABaseWeaponClass* PickedUpWeapon); + };