357 int power_armor_type;
363 ent->client->ps.stats[STAT_HEALTH] = ent->health;
368 if (!ent->client->ammo_index ) {
369 ent->client->ps.stats[STAT_AMMO_ICON] = 0;
370 ent->client->ps.stats[STAT_AMMO] = 0;
372 item = &
itemlist[ent->client->ammo_index];
373 ent->client->ps.stats[STAT_AMMO_ICON] =
gi.imageindex(item->
icon);
374 ent->client->ps.stats[STAT_AMMO] = ent->client->pers.inventory[ent->client->ammo_index];
381 if (power_armor_type) {
386 gi.sound(ent, CHAN_ITEM,
gi.soundindex(
"misc/power2.wav"), 1, ATTN_NORM, 0);
387 power_armor_type = 0;;
394 ent->client->ps.stats[STAT_ARMOR_ICON] =
gi.imageindex(
"i_powershield");
395 ent->client->ps.stats[STAT_ARMOR] = cells;
398 ent->client->ps.stats[STAT_ARMOR_ICON] =
gi.imageindex(item->
icon);
399 ent->client->ps.stats[STAT_ARMOR] = ent->client->pers.inventory[index];
401 ent->client->ps.stats[STAT_ARMOR_ICON] = 0;
402 ent->client->ps.stats[STAT_ARMOR] = 0;
408 if (
level.
time > ent->client->pickup_msg_time) {
409 ent->client->ps.stats[STAT_PICKUP_ICON] = 0;
410 ent->client->ps.stats[STAT_PICKUP_STRING] = 0;
417 ent->client->ps.stats[STAT_TIMER_ICON] =
gi.imageindex(
"p_quad");
418 ent->client->ps.stats[STAT_TIMER] = (ent->client->quad_framenum -
level.
framenum) / 10;
419 }
else if (ent->client->invincible_framenum >
level.
framenum) {
420 ent->client->ps.stats[STAT_TIMER_ICON] =
gi.imageindex(
"p_invulnerability");
421 ent->client->ps.stats[STAT_TIMER] = (ent->client->invincible_framenum -
level.
framenum) / 10;
423 ent->client->ps.stats[STAT_TIMER_ICON] =
gi.imageindex(
"p_envirosuit");
424 ent->client->ps.stats[STAT_TIMER] = (ent->client->enviro_framenum -
level.
framenum) / 10;
425 }
else if (ent->client->breather_framenum >
level.
framenum) {
426 ent->client->ps.stats[STAT_TIMER_ICON] =
gi.imageindex(
"p_rebreather");
427 ent->client->ps.stats[STAT_TIMER] = (ent->client->breather_framenum -
level.
framenum) / 10;
429 ent->client->ps.stats[STAT_TIMER_ICON] = 0;
430 ent->client->ps.stats[STAT_TIMER] = 0;
436 if (ent->client->pers.selected_item == -1)
437 ent->client->ps.stats[STAT_SELECTED_ICON] = 0;
439 ent->client->ps.stats[STAT_SELECTED_ICON] =
gi.imageindex(
itemlist[ent->client->pers.selected_item].
icon);
441 ent->client->ps.stats[STAT_SELECTED_ITEM] = ent->client->pers.selected_item;
446 ent->client->ps.stats[STAT_LAYOUTS] = 0;
450 || ent->client->showscores)
451 ent->client->ps.stats[STAT_LAYOUTS] |= 1;
452 if (ent->client->showinventory && ent->client->pers.health > 0)
453 ent->client->ps.stats[STAT_LAYOUTS] |= 2;
455 if (ent->client->showscores || ent->client->showhelp)
456 ent->client->ps.stats[STAT_LAYOUTS] |= 1;
457 if (ent->client->showinventory && ent->client->pers.health > 0)
458 ent->client->ps.stats[STAT_LAYOUTS] |= 2;
464 ent->client->ps.stats[STAT_FRAGS] = ent->client->resp.score;
470 ent->client->ps.stats[STAT_HELPICON] =
gi.imageindex(
"i_help");
471 else if ((ent->client->pers.hand ==
CENTER_HANDED || ent->client->ps.fov > 91)
472 && ent->client->pers.weapon)
473 ent->client->ps.stats[STAT_HELPICON] =
gi.imageindex(ent->client->pers.weapon->icon);
475 ent->client->ps.stats[STAT_HELPICON] = 0;
477 ent->client->ps.stats[STAT_SPECTATOR] = 0;