summaryrefslogtreecommitdiff
path: root/test-client/visual.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-20 14:49:12 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-23 19:24:14 +0200
commit870b572f3edf33825d1b74010baae935d3439d95 (patch)
tree25b79cc6a7ac1eca6b62c3c6e0ad6c27d9d6204e /test-client/visual.ts
parent96dd53c9ea8fe124a699de3b04069102a6002128 (diff)
downloadhurrycurry-870b572f3edf33825d1b74010baae935d3439d95.tar
hurrycurry-870b572f3edf33825d1b74010baae935d3439d95.tar.bz2
hurrycurry-870b572f3edf33825d1b74010baae935d3439d95.tar.zst
no hats for customerss
Diffstat (limited to 'test-client/visual.ts')
-rw-r--r--test-client/visual.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/test-client/visual.ts b/test-client/visual.ts
index 4bbfac6c..37ae732d 100644
--- a/test-client/visual.ts
+++ b/test-client/visual.ts
@@ -133,10 +133,12 @@ function draw_character(character: number) {
ctx.arc(0, 0, PLAYER_SIZE, 0, Math.PI * 2)
ctx.fill()
- ctx.fillStyle = `hsl(${character}rad, 80%, 10%)`
- ctx.beginPath()
- ctx.arc(0, -0.2, PLAYER_SIZE, 0, Math.PI * 2)
- ctx.fill()
+ if (character > 0) {
+ ctx.fillStyle = `hsl(${character}rad, 80%, 10%)`
+ ctx.beginPath()
+ ctx.arc(0, -0.2, PLAYER_SIZE, 0, Math.PI * 2)
+ ctx.fill()
+ }
ctx.fillStyle = `hsl(${character}rad, 80%, 70%)`
ctx.beginPath()