Fixes from playtesting #6

Merged
andras merged 8 commits from asch/review into main 2026-09-18 21:24:46 +01:00
2 changed files with 0 additions and 26 deletions
Showing only changes of commit b100a75f7d - Show all commits

No elimination text

Andras Schmelczer 2026-09-15 20:36:39 +01:00

View file

@ -3,7 +3,6 @@ import { getDisplayPosition } from './helper/pointer';
let root: HTMLElement | undefined;
let killfeed: HTMLElement | undefined;
let elimination: HTMLElement | undefined;
function ensureRoot(): { root: HTMLElement; killfeed: HTMLElement } {
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 {
hideElimination();
root?.remove();
root = undefined;
killfeed = undefined;
@ -122,7 +102,5 @@ function escapeHtml(text: string): string {
export const FeedbackHud = {
hitMarker,
killConfirmed,
showElimination,
hideElimination,
reset: resetFeedbackHud,
};

View file

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