1 #include "cl_survival.qh"
3 #include <client/draw.qh>
4 #include <client/hud/panel/modicons.qh>
6 void HUD_Mod_Survival(vector pos, vector mySize)
8 mod_active = 1; // survival should always show the mod HUD
10 int mystatus = entcs_receiver(player_localnum).survival_status;
11 string player_text = "";
12 vector player_color = '1 1 1';
13 //string player_icon = "";
14 if(mystatus == SV_STATUS_HUNTER)
16 player_text = _("Hunter");
17 player_color = '1 0 0';
18 //player_icon = "player_red";
20 else if(mystatus == SV_STATUS_PREY)
22 player_text = _("Survivor");
23 player_color = '0 1 0';
24 //player_icon = "player_neutral";
28 // if the player has no valid status, don't draw anything
32 drawstring_aspect(pos, player_text, vec2(mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
35 REGISTER_MUTATOR(cl_sv, true);
37 MUTATOR_HOOKFUNCTION(cl_sv, ForcePlayercolors_Skip, CBC_ORDER_LAST)
39 if(!ISGAMETYPE(SURVIVAL))
42 entity player = M_ARGV(0, entity);
43 entity e = entcs_receiver(player.entnum - 1);
44 int surv_status = ((e) ? e.survival_status : 0);
45 int mystatus = entcs_receiver(player_localnum).survival_status;
47 int plcolor = SV_COLOR_PREY; // default to survivor
48 if((mystatus == SV_STATUS_HUNTER || intermission || STAT(GAME_STOPPED)) && surv_status == SV_STATUS_HUNTER)
49 plcolor = SV_COLOR_HUNTER;
51 player.colormap = 1024 + plcolor;
55 MUTATOR_HOOKFUNCTION(cl_sv, DrawScoreboard_Force)
57 // show the scoreboard when the round ends, so players can see who the hunter was
58 return STAT(GAME_STOPPED);