Removed Redundant LOS Test Box
This commit is contained in:
		
							parent
							
								
									7bb582f636
								
							
						
					
					
						commit
						6dee50a62b
					
				| @ -1,3 +0,0 @@ | ||||
| version https://git-lfs.github.com/spec/v1 | ||||
| oid sha256:16b8ace32a02155ad001cb46a64f3b5bef4c4c4ae6f13f0a6e13ac5d683c9a3c | ||||
| size 14694 | ||||
| @ -1,3 +1,3 @@ | ||||
| version https://git-lfs.github.com/spec/v1 | ||||
| oid sha256:9e3dc3ac3d7558e57253059c870b13d20e67e639f7a748c3c6a384d65ae7df7f | ||||
| oid sha256:236689015c26708fac1bf19a6077122a373dbd62804e8b0643abe62a82db39ae | ||||
| size 109712 | ||||
|  | ||||
| @ -42,18 +42,7 @@ void AVisionLink::SendOutPingPulse() | ||||
| 	NumOfPingPulsesLeftInThisCycle--; | ||||
| 	UpdatePulsesRemaining(NumOfPingPulsesLeftInThisCycle); | ||||
| 	if (NumOfPingPulsesLeftInThisCycle < 0) return; | ||||
| 
 | ||||
| 	// FActorSpawnParameters SpawnParams;
 | ||||
| 	// SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
 | ||||
| 	 | ||||
| 	// FVector SpawnLoc = PlayerCamComp->GetComponentLocation() + PlayerCamComp->GetForwardVector() * EnemyLOSTestActor->GetDefaultObject<AVisionLinkEnemyLOSTest>()->SpawnOffset;
 | ||||
| 	//
 | ||||
| 	//
 | ||||
| 	// AActor* LOSTestActor = GetWorld()->SpawnActor<AActor>(EnemyLOSTestActor, SpawnLoc, PlayerCamComp->GetComponentRotation(), SpawnParams);
 | ||||
| 	// TArray<uint32> EmptyIDArray;
 | ||||
| 	// Cast<AVisionLinkEnemyLOSTest>(LOSTestActor)->TestLOS(EmptyIDArray, this);
 | ||||
| 	 | ||||
| 	UE_LOG(LogTemp, Warning, TEXT("Ping Pulse!")); | ||||
| 	GetWorld()->GetTimerManager().SetTimer(PulseHandle, this, &AVisionLink::SendOutPingPulse, TimeInbetweenPingPulses, false); | ||||
| 	PlayPingPulseAnim(TimeInbetweenPingPulses); | ||||
| 
 | ||||
| @ -83,20 +72,15 @@ void AVisionLink::TestLOS(FTransform StartingPos, TArray<AActor*> &ActorsToIgnor | ||||
| 			FVector LT_EndPoint = StartingPos.GetLocation() + UKismetMathLibrary::GetForwardVector(LT_Rot) * LT_Distance; | ||||
| 			 | ||||
| 			if (!GetWorld()->LineTraceSingleByChannel(outHit, StartingPos.GetLocation(), LT_EndPoint, ECC_Camera, QueryParams)) continue; | ||||
| 
 | ||||
| 			// Only consider enemies which we haven't seen before
 | ||||
| 			 | ||||
| 			AActor* HitActor = outHit.GetActor(); | ||||
| 			if (!HitActor->ActorHasTag(FName("Enemy"))) continue; //|| EnemiesInLink.Contains(HitActor->GetUniqueID())) continue;
 | ||||
| 			if (!HitActor->ActorHasTag(FName("Enemy"))) continue;  | ||||
| 
 | ||||
| 			DrawDebugLine(GetWorld(), outHit.TraceStart, outHit.ImpactPoint, FColor::Blue, false, 3, 0, 3);	 | ||||
| 			ActorsToIgnore.Add(HitActor); | ||||
| 			UE_LOG(LogTemp, Warning, TEXT("I've Seen an Enemy called: %s"), *HitActor->GetName()); | ||||
| 			//Spawn in a Ping
 | ||||
| 			TestLOS(HitActor->GetTransform(), ActorsToIgnore); | ||||
| 			 | ||||
| 			 | ||||
| 			 | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -21,10 +21,10 @@ class ENDLESSVENDETTA_API AVisionLink : public AReconGadget | ||||
| 
 | ||||
| 	FTimerHandle PulseHandle; | ||||
| 
 | ||||
| 	void TestLOS(FTransform StartingPos, TArray<AActor*> &ActorsToIgnore); | ||||
| 	 | ||||
| 	void SendOutPingPulse(); | ||||
| 
 | ||||
| 	void TestLOS(FTransform StartingPos, TArray<AActor*> &ActorsToIgnore); | ||||
| 
 | ||||
| 	virtual void BeginPlay() override; | ||||
| 	 | ||||
| 	virtual void Activate() override; | ||||
| @ -50,11 +50,6 @@ protected: | ||||
| 	UPROPERTY(EditDefaultsOnly, Category = "Vision Link") | ||||
| 	float V_FOV = 25; | ||||
| 
 | ||||
| 	 | ||||
| 
 | ||||
| 	// UPROPERTY(EditDefaultsOnly, Category = "Vision Link")
 | ||||
| 	// TSubclassOf<AVisionLinkEnemyLOSTest> EnemyLOSTestActor;
 | ||||
| 
 | ||||
| 	UPROPERTY(BlueprintReadOnly, Category = "Vision Link") | ||||
| 	float CooldownLength; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user