No elimination text

This commit is contained in:
Andras Schmelczer 2026-09-15 20:36:39 +01:00
commit b100a75f7d
2 changed files with 0 additions and 26 deletions

View file

@ -3,7 +3,6 @@ import { getDisplayPosition } from './helper/pointer';
let root: HTMLElement | undefined; let root: HTMLElement | undefined;
let killfeed: HTMLElement | undefined; let killfeed: HTMLElement | undefined;
let elimination: HTMLElement | undefined;
function ensureRoot(): { root: HTMLElement; killfeed: HTMLElement } { function ensureRoot(): { root: HTMLElement; killfeed: HTMLElement } {
if (!root || !killfeed) { if (!root || !killfeed) {
@ -74,27 +73,8 @@ function killConfirmed(victimName?: string, streak = 1, charge = 0) {
} }
} }
function showElimination(): void {
if (elimination) {
return;
}
const { root: r } = ensureRoot();
const el = document.createElement('div');
el.className = 'elimination';
el.innerHTML =
'<div class="elimination-title">Eliminated</div>' +
'<div class="elimination-sub">Respawning…</div>';
r.appendChild(el);
elimination = el;
}
function hideElimination(): void {
elimination?.remove();
elimination = undefined;
}
function resetFeedbackHud(): void { function resetFeedbackHud(): void {
hideElimination();
root?.remove(); root?.remove();
root = undefined; root = undefined;
killfeed = undefined; killfeed = undefined;
@ -122,7 +102,5 @@ function escapeHtml(text: string): string {
export const FeedbackHud = { export const FeedbackHud = {
hitMarker, hitMarker,
killConfirmed, killConfirmed,
showElimination,
hideElimination,
reset: resetFeedbackHud, reset: resetFeedbackHud,
}; };

View file

@ -50,7 +50,6 @@ export class GameObjectContainer extends CommandReceiver {
this.addObject(this.player); this.addObject(this.player);
localCharacterPredictor.reset(); localCharacterPredictor.reset();
this.game.resendMovement(); this.game.resendMovement();
FeedbackHud.hideElimination();
this.wasLocalPlayerAlive = true; this.wasLocalPlayerAlive = true;
}, },
@ -133,9 +132,6 @@ export class GameObjectContainer extends CommandReceiver {
const player = this.localPlayer; const player = this.localPlayer;
const alive = !!player && player.health > 0; const alive = !!player && player.health > 0;
if (this.wasLocalPlayerAlive && !alive) {
FeedbackHud.showElimination();
}
this.wasLocalPlayerAlive = alive; this.wasLocalPlayerAlive = alive;
if (player) { if (player) {