Bugfix Bounty Tracking not Working with Main Bounties Open World Checkpoint

This commit is contained in:
Rafal Swierczek 2024-02-14 15:26:39 +00:00
parent 1849db2219
commit eba19193b6
10 changed files with 30 additions and 21 deletions

View File

@ -9,19 +9,15 @@
<component name="ChangeListManager">
<list default="true" id="dfa3053d-1d51-4dad-9270-4c17e086f627" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EndlessVendetta/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/BountySystem/ApartmentBounty/SideBounties/SecuritySpecialists/CP_GoToSecurityOffice.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/BountySystem/ApartmentBounty/SideBounties/SecuritySpecialists/CP_GoToSecurityOffice.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/BountySystem/Waypoint/BP_Waypoint.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/BountySystem/Waypoint/BP_Waypoint.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/Levels/MainMenuLevel.umap" beforeDir="false" afterPath="$PROJECT_DIR$/Content/Levels/MainMenuLevel.umap" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/PauseMenu/Tabs/BountyTabs/WBP_BountiesTab.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/PauseMenu/Tabs/BountyTabs/WBP_BountiesTab.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Architecture/Floor_400x400.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" beforeDir="false" afterPath="$PROJECT_DIR$/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/BountyClass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/BountyClass.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/BountyClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/BountyClass.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/MainBountyClass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/MainBountyClass.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/MainBountyClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/MainBountyClass.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/SideBountyClass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/SideBountyClass.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/SideBountyClass.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/BountySystem/SideBountyClass.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/Characters/BountyHunterCharacter.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/BountiesTab.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/EndlessVendetta/PauseMenu/BountiesTab.h" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -146,6 +142,7 @@
<workItem from="1707658695399" duration="2851000" />
<workItem from="1707757227103" duration="2304000" />
<workItem from="1707760017966" duration="7002000" />
<workItem from="1707922132890" duration="2216000" />
</task>
<servers />
</component>

Binary file not shown.

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5015076ef46a0b0a06bef84fadb67659cdaad3127c3834256c74d4464b8646f6
size 308758
oid sha256:baf9403b33d7855cad2195c4d017e92a79de594c89dc87205e7c3c5e7fa9f6e6
size 308710

View File

@ -16,7 +16,6 @@ void ABountyClass::ActivateFirstCheckpoint()
if (BountyCheckpoints.IsEmpty() || BountyCheckpoints[0] == nullptr) return;
BountyCheckpoints[0]->Active = true;
// BountyCheckpoints[0]->CheckpointActivated();
BountyCheckpoints[0]->CompletedCheckpoint.AddDynamic(this, &ABountyClass::IncrementBountyCheckpoint);
}
@ -24,6 +23,7 @@ void ABountyClass::DeActivateFirstCheckpoint()
{
if (BountyCheckpoints.IsEmpty() || BountyCheckpoints[0] == nullptr) return;
BountyCheckpoints[0]->CompletedCheckpoint.RemoveDynamic(this, &ABountyClass::IncrementBountyCheckpoint);
BountyCheckpoints[0]->Active = false;
BountyCheckpoints[0]->DestroyWaypoint();
}

View File

@ -49,7 +49,7 @@ public:
virtual void ActivateFirstCheckpoint();
// De-Activate the First Checkpoint in Bounty Checkpoints
void DeActivateFirstCheckpoint();
virtual void DeActivateFirstCheckpoint();

View File

@ -15,11 +15,18 @@ void AMainBountyClass::IncrementBountyCheckpoint()
void AMainBountyClass::ActivateFirstCheckpoint()
{
Super::ActivateFirstCheckpoint();
if (IsValid(OpenWorldcheckpoint)) OpenWorldcheckpoint->SpawnWaypoint(MainBountyStruct.TargetName);
if (BountyCheckpoints.IsEmpty() || BountyCheckpoints[0] == nullptr) return;
BountyCheckpoints[0]->SpawnWaypoint(MainBountyStruct.TargetName);
}
void AMainBountyClass::SpawnOpenWorldCheckpoint()
void AMainBountyClass::DeActivateFirstCheckpoint()
{
Super::DeActivateFirstCheckpoint();
if (IsValid(OpenWorldcheckpoint)) OpenWorldcheckpoint->DestroyWaypoint();
}
void AMainBountyClass::SpawnOpenWorldCheckpoint()
{
if (!IsValid(OpenWorldCheckpointClass)) return;
@ -29,7 +36,7 @@ void AMainBountyClass::SpawnOpenWorldCheckpoint()
FRotator Rot = OpenWorldCheckpointClass.GetDefaultObject()->GetCheckpointSpawnTransform().GetRotation().Rotator();
OpenWorldcheckpoint = GetWorld()->SpawnActor<ACheckpointClass>(OpenWorldCheckpointClass, Loc, Rot, SpawnParameters);
OpenWorldcheckpoint->SpawnWaypoint(BountyTitle);
ActivateFirstCheckpoint();
}
void AMainBountyClass::SpawnCheckpoints()

View File

@ -91,6 +91,9 @@ public:
// Overrides to Set Title of Waypoint
void ActivateFirstCheckpoint() override;
// Overrides to Desapwn Waypoint from OpenWorld Checkpoint
void DeActivateFirstCheckpoint() override;
// ------------------- LEGACY CODE TO BE REWORKED ---------------------------------

View File

@ -28,8 +28,10 @@ class ENDLESSVENDETTA_API ABountyHunterCharacter : public AEndlessVendettaCharac
TArray<TSubclassOf<AMainBountyClass>> MainBountyClasses;
// Reference to the Currently Active Main Bounty
UPROPERTY()
AMainBountyClass* CurrentMainBounty;
UPROPERTY()
TArray<ASideBountyClass*> CurrentSideBounties;
// Index of Currently Active Main Bounty, Used for MainBountyClasses