Skip to content

Conversation

@CompileRider
Copy link
Contributor

@CompileRider CompileRider commented Jan 6, 2026

Add visual range indicator to KillAura module showing attack range:

  • Circle around player indicating attack range
  • Color changes based on target state (idle/active)
  • Multiple color modes: Static, Rainbow, Distance-based
  • Pulse and fade animations
  • Optional circles for WallRange, ScanRange, OpponentRange

Fully synced with KillAura settings:

  • Uses KillAura Range and WallRange values
  • Respects IgnoreOpenInventory setting
  • Hides when player is dead/spectator

Example: Enable KillAura → RangeIndicator, and a circle appears
around you showing your attack range. Green when targeting, red when idle.

Useful for: PvP spacing, visualizing attack range, timing engagements.

Demo

test_compressed.mp4

Configuration

Option Description
ColorMode Static, Rainbow, or Distance-based coloring
IdleColor Color when no target (default: red)
ActiveColor Color when targeting (default: green)
PulseAnimation Circle expands/contracts smoothly
FadeAnimation Smooth color transition on state change
ShowWallRange Display wall attack range circle
ShowScanRange Display detection range circle
ShowOpponentRange Display enemy attack range

Adds a circle around the player showing the KillAura attack range:
- Idle color (red) when no target in range
- Active color (green) when targeting an enemy
- Optional outline and wall range circle
- Synced with KillAura Range and WallRange settings
@CompileRider CompileRider changed the title [WIP] feat(killaura): RangeIndicator - indicador visual de rango [WIP] feat(killaura): add RangeIndicator visual feedback Jan 6, 2026
- Add color modes: Static, Rainbow, Distance-based
- Add pulse animation with configurable speed/intensity
- Add fade animation for smooth state transitions
- Add opponent range visualization
- Add wall range circle option
- Add conditions: hide when dead/spectator/in vehicle
- Sync with KillAura Range and WallRange settings
Add visual range indicator to KillAura module showing attack range:
- Circle around player indicating attack range
- Color changes based on target state (idle/active)
- Multiple color modes: Static, Rainbow, Distance-based
- Pulse and fade animations
- Optional circles for WallRange, ScanRange, OpponentRange

Fully synced with KillAura settings:
- Uses KillAura Range and WallRange values
- Respects IgnoreOpenInventory setting
- Hides when player is dead/spectator

Useful for PvP to visualize attack range and spacing.
@CompileRider CompileRider changed the title [WIP] feat(killaura): add RangeIndicator visual feedback feat(killaura): add RangeIndicator visual feedback Jan 6, 2026
Address review feedback from MukjepScarlet
- Use startBatch/commitBatch for render optimization
- Replace multiple if-returns with takeUnless
- Extract drawRangeCircle helper to reduce duplication
- Use scope functions (run, also) for cleaner code
- Simplify getColor with when expression
@1zun4
Copy link
Member

1zun4 commented Jan 8, 2026

Looks fine to me. I must say, I would not use it myself, but I remember that this was a thing in many clients. Is this typically used?

- Add missing renderEnvironmentForWorld import
- Simplify renderHandler by inlining render call
- Fix BracesOnIfStatements detekt errors
- Reduce cognitive complexity of render() by extracting helper functions
- Merge showXXX booleans into color alpha (alpha 0 = hidden)
- Simplify render logic by inlining helper functions
- Remove redundant abs() check in updateColorFactor
- Use canRender() instead of separate visibility checks
- Extract calculatePulse() and renderCircles() to reduce cognitive complexity
- Add braces to all if/else branches
- Extract renderIndicator() to reduce render() cognitive complexity
- Refactor canRender() to single expression (avoids BracesOnIfStatements)
- Add LivingEntity import
- Use short type name instead of fully qualified
}

private fun WorldRenderEnvironment.drawRangeCircle(radius: Float, color: Color4b, outlineAlpha: Int = 255) {
drawGradientCircle(radius, 0f, color, color.with(a = 0))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color4b.TRANSPARENT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants