{#if !map} {:else} {mapName} radar {#each players as p (p.steamid)} {@const { px, py } = worldToImage(map, p.X, p.Y)} {@const playerFloor = floorForZ(map, p.Z)} {@const onDisplayed = !lowerAvailable || playerFloor === displayedFloor} {@const baseOpacity = onDisplayed ? 1 : 0.35} {@const isActive = activePlayer !== null && p.slot === activePlayer} {@const r = isActive ? 42 : 32} {@const fontSize = isActive ? 38 : 30} {@const coneLen = isActive ? 110 : 90} {@const coneHalf = isActive ? 38 : 32} {@const slotKnown = p.slot !== undefined} {@const available = !availablePlayers || (slotKnown && availablePlayers.has(p.slot as number))} {@const clickable = !!onSelect && slotKnown && available} onSelect?.(p.slot as number) : undefined} onkeydown={clickable ? (e: KeyboardEvent) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onSelect?.(p.slot as number); } } : undefined} > {p.name}{p.slot !== undefined ? ` (#${p.slot})` : ''} {#if clickable || isActive} {/if} {#if p.is_alive} {#if p.yaw !== undefined} {/if} {#if isActive} {/if} {#if p.slot !== undefined} {p.slot} {/if} {:else} {/if} {/each} {#if lowerAvailable}
{ if (v === 'upper' || v === 'lower') userFloor = v; }} variant="outline" size="sm" spacing={1} aria-label="Floor" class="bg-background/80 backdrop-blur-sm" > Upper Lower
{/if} {/if}