Client: Enable the damage/item notifications from Half-Life.

This commit is contained in:
Marco Cawthorne 2021-12-17 18:23:22 -08:00
parent a802c18a16
commit ae04d4c687
Signed by: eukara
GPG Key ID: C196CD8BA993248A
3 changed files with 17 additions and 1 deletions

View File

@ -33,6 +33,8 @@ init.qc
../../../valve/src/client/view.qc
../../../valve/src/client/obituary.qc
../../../valve/src/client/hud_ammonotify.qc
../../../valve/src/client/hud_dmgnotify.qc
../../../valve/src/client/hud_itemnotify.qc
../../../valve/src/client/hud.qc
hud_weaponselect.qc
../../../valve/src/client/scoreboard.qc

View File

@ -36,4 +36,5 @@ Game_Worldspawn(void)
precache_model("models/w_weaponbox.mdl");
Weapons_Init();
Player_Precache();
FX_Corpse_Init();
}

View File

@ -120,6 +120,7 @@ class player:base_player
#ifdef CLIENT
void Weapons_AmmoUpdate(entity);
void HUD_AmmoNotify_Check(player pl);
void HUD_ItemNotify_Check(player pl);
/*
=================
player::ReceiveEntity
@ -192,12 +193,24 @@ player::ReceiveEntity(float new, float fl)
mode_m249 = readbyte();
}
setorigin(this, origin);
/* these only concern the current player */
CSQC_UpdateSeat();
if (this != pSeat->m_ePlayer)
return;
/* do not notify us of updates when spawning initially */
if (fl == UPDATE_ALL)
PredictPreFrame();
if (fl & PLAYER_AMMO1 || fl & PLAYER_AMMO2 || fl & PLAYER_AMMO3) {
Weapons_AmmoUpdate(this);
HUD_AmmoNotify_Check(this);
}
setorigin(this, origin);
if (fl & PLAYER_ITEMS || fl & PLAYER_HEALTH || fl & PLAYER_ARMOR)
HUD_ItemNotify_Check(this);
}
/*