Bugfix Debug Lines Marked Green on Missed Traces
This commit is contained in:
		
							parent
							
								
									22c13a8c25
								
							
						
					
					
						commit
						c6cba80a07
					
				| @ -308,12 +308,12 @@ bool ARealTimeCombat::HitEnemy() const | |||||||
| 	CollisionParams.AddIgnoredActor(PlayerActor); | 	CollisionParams.AddIgnoredActor(PlayerActor); | ||||||
| 	if (GetWorld()->LineTraceSingleByChannel(HitResult, Start, End, ECC_Pawn, CollisionParams)) | 	if (GetWorld()->LineTraceSingleByChannel(HitResult, Start, End, ECC_Pawn, CollisionParams)) | ||||||
| 	{ | 	{ | ||||||
| 		DrawDebugLine(GetWorld(), Start, End, HitResult.bBlockingHit ? FColor::Green : FColor::Red, false, 5.0f, 0, 10.0f); | 		DrawDebugLine(GetWorld(), Start, End, FColor::Green, false, 5.0f, 0, 10.0f); | ||||||
| 		if (HitResult.GetActor() == EnemyActor) | 		if (HitResult.GetActor() == EnemyActor) | ||||||
| 		{ | 		{ | ||||||
| 			return true; | 			return true; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	DrawDebugLine(GetWorld(), Start, End, HitResult.bBlockingHit ? FColor::Green : FColor::Red, false, 5.0f, 0, 10.0f); | 	DrawDebugLine(GetWorld(), Start, End, FColor::Red, false, 5.0f, 0, 10.0f); | ||||||
| 	return false; | 	return false; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user