Skip to content

Commit 0554ceb

Browse files
committed
enhance: show enemy as opaque all the time
1 parent e7e6445 commit 0554ceb

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/client/graphics/layers/SAMRadiusLayer.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,15 @@ export class SAMRadiusLayer implements Layer {
299299
const intercepting = this.nukeRenderUtilLayer
300300
.getInterceptingPlayers()
301301
.has(a.owner.smallID());
302+
// players who are not allied
303+
const enemy =
304+
!a.owner.isMe() && !this.game.myPlayer()?.isFriendly(a.owner);
302305

303306
// Outline
304307
if (nukeMode) {
305308
if (intercepting) {
306309
ctx.strokeStyle = interceptOutlineColor.toRgbString();
307-
} else if (stressed) {
310+
} else if (stressed || enemy) {
308311
ctx.strokeStyle = outlineColor.toRgbString();
309312
} else {
310313
ctx.strokeStyle = outlineColor.alpha(0.3).toRgbString();
@@ -332,11 +335,7 @@ export class SAMRadiusLayer implements Layer {
332335
ctx.strokeStyle = lineColorFriend.alpha(0.3).toRgbString();
333336
}
334337
} else {
335-
if (intercepting || stressed) {
336-
ctx.strokeStyle = lineColorEnemy.toRgbString();
337-
} else {
338-
ctx.strokeStyle = lineColorEnemy.alpha(0.3).toRgbString();
339-
}
338+
ctx.strokeStyle = lineColorEnemy.toRgbString();
340339
}
341340
} else {
342341
if (a.owner.isMe()) {

0 commit comments

Comments
 (0)