33 ent->client->showscores = qtrue;
39 ent->client->ps.pmove.pm_type = PM_FREEZE;
40 ent->client->ps.gunindex = 0;
41 ent->client->ps.blend[3] = 0;
42 ent->client->ps.rdflags &= ~RDF_UNDERWATER;
45 ent->client->quad_framenum = 0;
46 ent->client->invincible_framenum = 0;
47 ent->client->breather_framenum = 0;
48 ent->client->enviro_framenum = 0;
49 ent->client->grenade_blew_up = qfalse;
50 ent->client->grenade_time = 0;
53 ent->s.modelindex = 0;
54 ent->s.modelindex2 = 0;
55 ent->s.modelindex3 = 0;
56 ent->s.modelindex = 0;
59 ent->solid = SOLID_NOT;
65 gi.unicast(ent, qtrue);
73 edict_t *ent, *client;
85 if (client->health <= 0)
99 for (n = 0; n < MAX_ITEMS; n++) {
101 client->client->pers.inventory[n] = 0;
115 ent =
G_Find(NULL,
FOFS(classname),
"info_player_intermission");
118 ent =
G_Find(NULL,
FOFS(classname),
"info_player_start");
120 ent =
G_Find(NULL,
FOFS(classname),
"info_player_deathmatch");
125 ent =
G_Find(ent,
FOFS(classname),
"info_player_intermission");
127 ent =
G_Find(ent,
FOFS(classname),
"info_player_intermission");
156 int sorted[MAX_CLIENTS];
157 int sortedscores[MAX_CLIENTS];
168 if (!cl_ent->inuse ||
game.
clients[i].resp.spectator)
171 for (j = 0 ; j < total ; j++) {
172 if (score > sortedscores[j])
175 for (k = total ; k > j ; k--) {
176 sorted[k] = sorted[k - 1];
177 sortedscores[k] = sortedscores[k - 1];
180 sortedscores[j] = score;
187 stringlength = strlen(
string);
193 for (i = 0 ; i < total ; i++) {
197 x = (i >= 6) ? 160 : 0;
198 y = 32 + 32 * (i % 6);
203 else if (cl_ent == killer)
209 "xv %i yv %i picn %s ", x + 32, y, tag);
211 if (stringlength + j > 1024)
213 strcpy(
string + stringlength, entry);
219 "client %i %i %i %i %i %i ",
222 if (stringlength + j > 1024)
224 strcpy(
string + stringlength, entry);
229 gi.WriteString(
string);
244 gi.unicast(ent, qtrue);
257 ent->client->showinventory = qfalse;
258 ent->client->showhelp = qfalse;
263 if (ent->client->showscores) {
264 ent->client->showscores = qfalse;
268 ent->client->showscores = qtrue;
285 if (
skill->value == 0)
287 else if (
skill->value == 1)
289 else if (
skill->value == 2)
296 "xv 32 yv 8 picn help "
297 "xv 202 yv 12 string2 \"%s\" "
298 "xv 0 yv 24 cstring2 \"%s\" "
299 "xv 0 yv 54 cstring2 \"%s\" "
300 "xv 0 yv 110 cstring2 \"%s\" "
301 "xv 50 yv 164 string2 \" kills goals secrets\" "
302 "xv 50 yv 172 string2 \"%3i/%3i %i/%i %i/%i\" ",
312 gi.WriteString(
string);
313 gi.unicast(ent, qtrue);
332 ent->client->showinventory = qfalse;
333 ent->client->showscores = qfalse;
335 if (ent->client->showhelp && (ent->client->pers.game_helpchanged ==
game.
helpchanged)) {
336 ent->client->showhelp = qfalse;
340 ent->client->showhelp = qtrue;
341 ent->client->pers.helpchanged = 0;
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;
492 if (!
g_edicts[i].inuse ||
cl->chase_target != ent)
494 memcpy(
cl->ps.stats, ent->client->ps.stats,
sizeof(
cl->ps.stats));
506 gclient_t *
cl = ent->client;
508 if (!
cl->chase_target)
511 cl->ps.stats[STAT_SPECTATOR] = 1;
514 cl->ps.stats[STAT_LAYOUTS] = 0;
516 cl->ps.stats[STAT_LAYOUTS] |= 1;
517 if (
cl->showinventory &&
cl->pers.health > 0)
518 cl->ps.stats[STAT_LAYOUTS] |= 2;
520 if (
cl->chase_target &&
cl->chase_target->inuse)
521 cl->ps.stats[STAT_CHASE] = CS_PLAYERSKINS +
524 cl->ps.stats[STAT_CHASE] = 0;