refactor(server): fix clippy warnings from Rust 1.93
- Use #[derive(Default)] + #[default] instead of manual Default impls for FacingDirection, KnowledgeState, RelationshipState, EntityVisibility - Replace manual modulo check with .is_multiple_of() - Collapse nested if in shadowcast symmetry check Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -286,11 +286,9 @@ fn has_line_of_sight(
|
||||
|
||||
loop {
|
||||
// Check if we hit a blocking tile BEFORE reaching target
|
||||
if (x != x0 || y != y0) && (x != x1 || y != y1) {
|
||||
if is_opaque(x, y) {
|
||||
// Hit an obstacle before reaching target - blocked
|
||||
return false;
|
||||
}
|
||||
if (x != x0 || y != y0) && (x != x1 || y != y1) && is_opaque(x, y) {
|
||||
// Hit an obstacle before reaching target - blocked
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we reach the target, we can see it
|
||||
|
||||
Reference in New Issue
Block a user