Merge branch 'master' of https://git.tlimon.fr/ICAN_4JV/LegumeMix
This commit is contained in:
commit
9250630138
BIN
Content/Legumix/Ennemy/Common/Context/EQC_DistantEnemyLocations.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Common/Context/EQC_DistantEnemyLocations.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Common/Context/EQC_EQSOrigin.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Common/Context/EQC_EQSOrigin.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Common/Context/EQC_MeleeEnemyLocations.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Common/Context/EQC_MeleeEnemyLocations.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Common/Context/EQC_Player.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Common/Context/EQC_Player.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Common/EQSTester_Repositioning.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Common/EQSTester_Repositioning.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Common/EQS_Repositioning.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Common/EQS_Repositioning.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Common/Service/BTService_RamdomLocation.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Common/Service/BTService_RamdomLocation.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Context/EQC_DistantEnemyLocations.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/Context/EQC_DistantEnemyLocations.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/Context/EQC_EQSOrigin.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/Context/EQC_EQSOrigin.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/Context/EQC_MeleeEnemyLocations.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/Context/EQC_MeleeEnemyLocations.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/Context/EQC_Player.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/Context/EQC_Player.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/EQS_MeleeEnnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/EQS_MeleeEnnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/MeleeEnemy/AIC_MeleeEnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/EQS_RangeEnnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/EQS_RangeEnnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/AIC_DistantEnnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/AIC_DistantEnnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/Service/BTService_RamdomLocation.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/Service/BTService_RamdomLocation.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Levels/LVL_00.umap
(Stored with Git LFS)
BIN
Content/Legumix/Levels/LVL_00.umap
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Levels/LVL_TEST_003.umap
(Stored with Git LFS)
BIN
Content/Legumix/Levels/LVL_TEST_003.umap
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Player/BP_Play.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Player/BP_Play.uasset
(Stored with Git LFS)
Binary file not shown.
@ -32,8 +32,8 @@ void ULMItemDropComponent::TryDropItems()
|
||||
const float Percentage = static_cast<float>(Test.AmmoCount) / static_cast<float>(Test.MaxAmmo);
|
||||
const float DropChance = DropChanceAtRemainingAmmo->GetFloatValue(Percentage);
|
||||
|
||||
FString Random = FString::Printf(TEXT("Drop Chance of %f for ammo (%i / %i) %f with random at %f"), DropChance, Test.AmmoCount, Test.MaxAmmo, Percentage, Result);
|
||||
GEngine->AddOnScreenDebugMessage(INDEX_NONE, 5.f, FColor::Green, Random);
|
||||
// FString Random = FString::Printf(TEXT("Drop Chance of %f for ammo (%i / %i) %f with random at %f"), DropChance, Test.AmmoCount, Test.MaxAmmo, Percentage, Result);
|
||||
// GEngine->AddOnScreenDebugMessage(INDEX_NONE, 5.f, FColor::Green, Random);
|
||||
if (DropChance >= Result)
|
||||
{
|
||||
SpawnAmmo();
|
||||
|
@ -43,8 +43,8 @@ void ALMItemDrop::DoMovingTowardsTarget()
|
||||
|
||||
const float Duration = MoveTime / MoveDuration;
|
||||
|
||||
FString text = FString::Printf(TEXT("Time : %f / %f = %f"), MoveTime, MoveDuration, Duration);
|
||||
GEngine->AddOnScreenDebugMessage(-15, 1.f, FColor::Red, text);
|
||||
// FString text = FString::Printf(TEXT("Time : %f / %f = %f"), MoveTime, MoveDuration, Duration);
|
||||
// GEngine->AddOnScreenDebugMessage(-15, 1.f, FColor::Red, text);
|
||||
const float CurvePosition = PositionAtTime->GetFloatValue(Duration);
|
||||
const FVector NewPosition = UKismetMathLibrary::VLerp(SpawnLocation, Position, CurvePosition);
|
||||
|
||||
|
@ -28,8 +28,8 @@ void ULMGrabRange::TickComponent(float DeltaTime, enum ELevelTick TickType, FAct
|
||||
const FVector Position = GetComponentLocation();
|
||||
|
||||
const float DistanceLeft = FVector::Dist(ItemPosition, Position);
|
||||
FString text = FString::Printf(TEXT("Item %s at distance %f"), *Item->GetName(), DistanceLeft);
|
||||
GEngine->AddOnScreenDebugMessage(i, 1.f, FColor::Cyan, text);
|
||||
// FString text = FString::Printf(TEXT("Item %s at distance %f"), *Item->GetName(), DistanceLeft);
|
||||
// GEngine->AddOnScreenDebugMessage(i, 1.f, FColor::Cyan, text);
|
||||
|
||||
if (DistanceLeft <= RangeToGrab)
|
||||
{
|
||||
|
@ -37,13 +37,13 @@ float ULMHitBox::CalculateDamage_Implementation(const float Damage, const float
|
||||
{
|
||||
const float Absorption = Damage - FlatDamageAbsorption;
|
||||
const float FalloffModifier = Falloff->GetFloatValue(Distance / MaxDistance);
|
||||
UE_LOG(LogTemp, Display, TEXT("Falloff : %f"), FalloffModifier);
|
||||
// UE_LOG(LogTemp, Display, TEXT("Falloff : %f"), FalloffModifier);
|
||||
|
||||
const float FalloffDamage = Absorption * FalloffModifier;
|
||||
UE_LOG(LogTemp, Display, TEXT("Damage With Fallof: %f"), FalloffDamage)
|
||||
// UE_LOG(LogTemp, Display, TEXT("Damage With Fallof: %f"), FalloffDamage)
|
||||
|
||||
const float FinalDamage = FalloffDamage * DamageModifier;
|
||||
UE_LOG(LogTemp, Display, TEXT("Final Damages: %f"), FinalDamage)
|
||||
// UE_LOG(LogTemp, Display, TEXT("Final Damages: %f"), FinalDamage)
|
||||
|
||||
return FinalDamage;
|
||||
}
|
||||
|
@ -89,8 +89,8 @@ bool ALMPlayer::PickUpAmmo(ALMAmmo* Ammo)
|
||||
{
|
||||
if (GEngine)
|
||||
{
|
||||
const FString AmmoAmount = FString::Printf(TEXT("Quantité de munition : %i"), Ammo->GetAmmoAmount());
|
||||
GEngine->AddOnScreenDebugMessage(INDEX_NONE, 30.f, FColor::Red, AmmoAmount);
|
||||
// const FString AmmoAmount = FString::Printf(TEXT("Quantité de munition : %i"), Ammo->GetAmmoAmount());
|
||||
// GEngine->AddOnScreenDebugMessage(INDEX_NONE, 30.f, FColor::Red, AmmoAmount);
|
||||
}
|
||||
|
||||
if (WeaponManager->AddAmmoType(Ammo->GetAmmoType(), Ammo->GetAmmoAmount()))
|
||||
@ -283,11 +283,29 @@ void ALMPlayer::DoLedgeGrabCheck()
|
||||
FVector Dir = LedgeGrabOrigin->GetUpVector() * FVector(0, 0, -LedgeGrabTraceLength);
|
||||
FVector Ray = Origin + Dir;
|
||||
|
||||
EDrawDebugTrace::Type DrawDebug = bShowLedgeDebug ? EDrawDebugTrace::ForDuration : EDrawDebugTrace::None;
|
||||
|
||||
FHitResult Hit;
|
||||
const bool Results = UKismetSystemLibrary::LineTraceSingleByProfile(GetWorld(), Origin, Ray, TEXT("BlockAll"), false
|
||||
, {}, EDrawDebugTrace::None, Hit, true, FLinearColor::Red, FLinearColor::Green, 0.2f);
|
||||
, {}, DrawDebug, Hit, true, FLinearColor::Red, FLinearColor::Green, 10.f);
|
||||
if (Results)
|
||||
{
|
||||
FHitResult CapsuleCheck;
|
||||
float HalfHeight = LegumixMovementComponent->bWantsToCrouch ? LegumixMovementComponent->CrouchedHalfHeight : GetCapsuleComponent()->GetScaledCapsuleHalfHeight();
|
||||
const FVector Offset = Hit.ImpactPoint + FVector(0, 0, HalfHeight + GetCapsuleComponent()->GetScaledCapsuleRadius());
|
||||
|
||||
const bool IsObstructed = UKismetSystemLibrary::CapsuleTraceSingleByProfile(GetWorld(), Offset, Offset,
|
||||
GetCapsuleComponent()->GetScaledCapsuleRadius(),
|
||||
GetCapsuleComponent()->GetScaledCapsuleHalfHeight(), TEXT("BlockAll"), false,
|
||||
{}, DrawDebug, CapsuleCheck, true, FLinearColor::Green, FLinearColor::Red, 10.f);
|
||||
|
||||
if (IsObstructed)
|
||||
{
|
||||
return;
|
||||
// if (CapsuleCheck.ImpactPoint.Z > CapsuleCheck.Location.Z - HalfHeight)
|
||||
// return;
|
||||
}
|
||||
|
||||
FVector TeleportLocation = FVector(Hit.Location.X, Hit.Location.Y, Hit.Location.Z + GetCapsuleComponent()->GetScaledCapsuleHalfHeight());
|
||||
SetActorLocation(TeleportLocation, false, nullptr, ETeleportType::ResetPhysics);
|
||||
}
|
||||
|
@ -56,17 +56,17 @@ int ULMWeaponManager::RemoveAmmo(const EAmmoType Ammo, const int Count)
|
||||
FLMAmmoData &Data = AmmoData[Ammo];
|
||||
|
||||
int Difference = Data.AmmoCount - Count;
|
||||
UE_LOG(LogTemp, Display, TEXT("Difference: %i | Removing: %i | Storage: %i"), Difference, Count, Data.AmmoCount)
|
||||
// UE_LOG(LogTemp, Display, TEXT("Difference: %i | Removing: %i | Storage: %i"), Difference, Count, Data.AmmoCount)
|
||||
if (Difference < 0)
|
||||
{
|
||||
UE_LOG(LogTemp, Error, TEXT("%i - %i = %i"), Data.AmmoCount, Count, Data.AmmoCount - Count);
|
||||
// UE_LOG(LogTemp, Error, TEXT("%i - %i = %i"), Data.AmmoCount, Count, Data.AmmoCount - Count);
|
||||
Data.AmmoCount = FMath::Clamp(Data.AmmoCount - Count, InfiniteAmmo == 1 ? 1 : 0, Data.MaxAmmo);
|
||||
UE_LOG(LogTemp, Warning, TEXT("Difference < 0 | Munition to add: %i | Removed: %i | New Munition: %i"), Count + Difference, Count, Data.AmmoCount)
|
||||
// UE_LOG(LogTemp, Warning, TEXT("Difference < 0 | Munition to add: %i | Removed: %i | New Munition: %i"), Count + Difference, Count, Data.AmmoCount)
|
||||
return Count + Difference;
|
||||
}
|
||||
|
||||
Data.AmmoCount -= Count;
|
||||
UE_LOG(LogTemp, Warning, TEXT("New munition: %i | Removed: %i"), Data.AmmoCount, Count)
|
||||
// UE_LOG(LogTemp, Warning, TEXT("New munition: %i | Removed: %i"), Data.AmmoCount, Count)
|
||||
return Count;
|
||||
}
|
||||
|
||||
@ -110,8 +110,8 @@ void ULMWeaponManager::Initialize(USkeletalMeshComponent* Mesh)
|
||||
|
||||
bool ULMWeaponManager::AddAmmoType(EAmmoType AmmoType, int AmmoCount)
|
||||
{
|
||||
FString Debug = FString::Printf(TEXT("Adding %i ammo of type %i"), AmmoCount, AmmoType);
|
||||
GEngine->AddOnScreenDebugMessage(1, 1.f, FColor::Cyan, Debug);
|
||||
// FString Debug = FString::Printf(TEXT("Adding %i ammo of type %i"), AmmoCount, AmmoType);
|
||||
// GEngine->AddOnScreenDebugMessage(1, 1.f, FColor::Cyan, Debug);
|
||||
|
||||
if (AmmoData.Contains(AmmoType))
|
||||
{
|
||||
|
@ -217,6 +217,9 @@ private:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Legumix, meta = (AllowPrivateAccess = true, ClampMin = 0.01f))
|
||||
float CoyoteTimeLength = 0.5f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|LedgeGrab", meta = (AllowPrivateAccess = true, ClampMin = 0.f))
|
||||
bool bShowLedgeDebug = false;
|
||||
|
||||
/**
|
||||
* Actualize all parameters needed to calculate PlayerViewOcclusionPercent
|
||||
*/
|
||||
|
Reference in New Issue
Block a user