menu_action = menu_sub_null;
for(i = 0; i < 255; ++i)
- if(getplayerkey(i, "viewentity") == "")
+ if(getplayerkeyvalue(i, "viewentity") == "")
break;
maxclients = i;
case COLOR_TEAM4:
break;
default:
- if(GetTeam(Team, false) == NULL)
+ if(GetTeam(Team, false) == world)
{
print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
Team = COLOR_SPECTATOR;
case 0:
break;
default:
- if(GetTeam(Team, false) == NULL)
+ if(GetTeam(Team, false) == world)
{
print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
Team = COLOR_SPECTATOR;
print(ColorTranslateRGB(strMessage));
}
-// CSQC_Parse_CenterPrint : Provides the centerprint string in the first parameter that the server provided.
+// CSQC_Parse_CenterPrint : Provides the centerprint_hud string in the first parameter that the server provided.
void CSQC_Parse_CenterPrint(string strMessage)
{
- centerprint(strMessage);
+ centerprint_hud(strMessage);
}
string notranslate_fogcmd1 = "\nfog ";
wcross_scale *= 1 - autocvar__menu_alpha;
wcross_alpha *= 1 - autocvar__menu_alpha;
- wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
+ wcross_size = draw_getimagesize(wcross_name) * wcross_scale;
if(wcross_scale >= 0.001 && wcross_alpha >= 0.001)
{
if(time < wcross_name_changedonetime && wcross_name != wcross_name_goal_prev_prev && wcross_name_goal_prev_prev)
{
f = (wcross_name_changedonetime - time) / (wcross_name_changedonetime - wcross_name_changestarttime);
- wcross_size = drawgetimagesize(wcross_name_goal_prev_prev) * wcross_scale;
+ wcross_size = draw_getimagesize(wcross_name_goal_prev_prev) * wcross_scale;
CROSSHAIR_DRAW(wcross_resolution_goal_prev_prev, wcross_name_goal_prev_prev, wcross_alpha * f * wcross_name_alpha_goal_prev_prev);
f = 1 - f;
}
}
wcross_name_alpha_goal_prev = f;
- wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
+ wcross_size = draw_getimagesize(wcross_name) * wcross_scale;
CROSSHAIR_DRAW(wcross_resolution, wcross_name, wcross_alpha * f);
if(autocvar_crosshair_dot)
{
if (pickup) {
if (autocvar_cl_notify_carried_items & 2)
- centerprint(sprintf(_("You picked up the %s!"), item));
+ centerprint_hud(sprintf(_("You picked up the %s!"), item));
}
else {
if (autocvar_cl_notify_carried_items & 1)
- centerprint(sprintf(_("You got the %s!"), item));
+ centerprint_hud(sprintf(_("You got the %s!"), item));
}
}
void drawline(float width, vector pos1, vector pos2, vector rgb, float alpha, float flags) = #315;
float iscachedpic(string name) = #316;
string precache_pic(string name, ...) = #317;
-vector drawgetimagesize(string pic) = #318;
+vector draw_getimagesize(string pic) = #318;
void freepic(string name) = #319;
float drawcharacter(vector position, float character, vector scale, vector rgb, float alpha, float flag) = #320;
float drawstring(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #321;
float (float framenum) getinputstate = #345;
void (entity e) runstandardplayerphysics = #347;
-string (float playernum, string key) getplayerkey = #348;
+string (float playernum, string key) getplayerkeyvalue = #348;
void (string cmdname) registercmd = #352;
vector () getmousepos = #344;
-#define NULL world
+#define world world
// Mask Constants (set .drawmask on entities; use R_AddEntities to add all entities based on mask)
const float MASK_ENGINE = 1;
const float BUTTON_15 = 131072;
const float BUTTON_16 = 262144;
-const float DRAWFLAG_NORMAL = 0;
-const float DRAWFLAG_ADDITIVE = 1;
-const float DRAWFLAG_MODULATE = 2;
-const float DRAWFLAG_2XMODULATE = 3;
-const float DRAWFLAG_SCREEN = 4;
-const float DRAWFLAG_MIPMAP = 0x100; // only for R_BeginPolygon
-
#define SOLID_NOT 0 // no interaction with other objects
#define SOLID_TRIGGER 1 // touch on edge, but not blocking
#define SOLID_BBOX 2 // touch on edge, block
ps = '0 200 0';
po = '0 8 0';
- color = getplayerkey(player_localentnum-1, "topcolor");
+ color = getplayerkeyvalue(player_localentnum-1, "topcolor");
if(getstati(STAT_CTF_STATE) == CTF_STATE_COMMANDER) {
drawstring(ps, _("----- Order Menu -----"), '8 8 0', '1 1 0', 1, 0); ps += po;
drawcolorcodedstring(ps, _("1) ^3previous page"), '8 8 0', 1, 0); ps += po;
drawcolorcodedstring(ps, _("2) ^3next page"), '8 8 0', 1, 0); ps += po;
for((n = 2), (p = i = 0); i < maxclients && n > 0; ++i) {
- frags = getplayerkey(i, "frags");
+ frags = getplayerkeyvalue(i, "frags");
if(!frags || (i+1) == player_localentnum)
continue;
- if(frags == "-666" || getplayerkey(i, "topcolor") != color) // FIXME use GetPlayerTeam
+ if(frags == "-666" || getplayerkeyvalue(i, "topcolor") != color) // FIXME use GetPlayerTeam
continue;
++p;
if(p > (8*order_page))
chose = stof(chr2str(nPrimary));
//str2chr
if(arg == "1") {
- color = getplayerkey(player_localentnum-1, "topcolor");
+ color = getplayerkeyvalue(player_localentnum-1, "topcolor");
++order_page;
for(p = i = 0; i < maxclients; ++i) {
- frags = getplayerkey(i, "frags");
+ frags = getplayerkeyvalue(i, "frags");
if(!frags || (i+1) == player_localentnum)
continue;
- if(frags == "-666" || getplayerkey(i, "topcolor") != color) // FIXME use GetPlayerTeam
+ if(frags == "-666" || getplayerkeyvalue(i, "topcolor") != color) // FIXME use GetPlayerTeam
continue;
++p;
}
if(p <= (8*order_page)) // no ppl on page
order_page = 0;
} else if(arg == "2") {
- color = getplayerkey(player_localentnum-1, "topcolor");
+ color = getplayerkeyvalue(player_localentnum-1, "topcolor");
--order_page;
if(order_page < 0) {
for(p = i = 0; i < maxclients; ++i) {
- frags = getplayerkey(i, "frags");
+ frags = getplayerkeyvalue(i, "frags");
if(!frags || (i+1) == player_localentnum)
continue;
- if(frags == "-666" || getplayerkey(i, "topcolor") != color) // FIXME use GetPlayerTeam
+ if(frags == "-666" || getplayerkeyvalue(i, "topcolor") != color) // FIXME use GetPlayerTeam
continue;
++p;
}
if(chose == 0)
chose = 10;
n = 2;
- color = getplayerkey(player_localentnum-1, "topcolor");
+ color = getplayerkeyvalue(player_localentnum-1, "topcolor");
for(p = i = 0; i < maxclients && n > 0; ++i) {
- frags = getplayerkey(i, "frags");
+ frags = getplayerkeyvalue(i, "frags");
if(!frags || (i+1) == player_localentnum)
continue;
- if(frags == "-666" || getplayerkey(i, "topcolor") != color) // FIXME use GetPlayerTeam
+ if(frags == "-666" || getplayerkeyvalue(i, "topcolor") != color) // FIXME use GetPlayerTeam
continue;
++p;
if(p > (8*order_page))
}
}
for(i = weapon_cnt; i < WEP_MAXCOUNT; ++i)
- weaponorder[i] = NULL;
+ weaponorder[i] = world;
heapsort(weapon_cnt, weaponorder_swap, weaponorder_cmp, world);
weaponorder_cmp_str = string_null;
gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
if(msg == MSG_SUICIDE) {
if (type == DEATH_TEAMCHANGE) {
- centerprint(sprintf(_("You are now on: %s"), s1));
+ centerprint_hud(sprintf(_("You are now on: %s"), s1));
} else if (type == DEATH_AUTOTEAMCHANGE) {
- centerprint(sprintf(_("You have been moved into a different team to improve team balance\nYou are now on: %s"), s1));
+ centerprint_hud(sprintf(_("You have been moved into a different team to improve team balance\nYou are now on: %s"), s1));
} else if (type == DEATH_CAMP) {
if(gentle)
- centerprint(_("^1Reconsider your tactics, camper!"));
+ centerprint_hud(_("^1Reconsider your tactics, camper!"));
else
- centerprint(_("^1Die camper!"));
+ centerprint_hud(_("^1Die camper!"));
} else if (type == DEATH_NOAMMO) {
if(gentle)
- centerprint(_("^1You are reinserted into the game for running out of ammo..."));
+ centerprint_hud(_("^1You are reinserted into the game for running out of ammo..."));
else
- centerprint(_("^1You were killed for running out of ammo..."));
+ centerprint_hud(_("^1You were killed for running out of ammo..."));
} else if (type == DEATH_ROT) {
if(gentle)
- centerprint(_("^1You need to preserve your health"));
+ centerprint_hud(_("^1You need to preserve your health"));
else
- centerprint(_("^1You grew too old without taking your medicine"));
+ centerprint_hud(_("^1You grew too old without taking your medicine"));
} else if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
if(gentle)
- centerprint(_("^1Don't go against team mates!"));
+ centerprint_hud(_("^1Don't go against team mates!"));
else
- centerprint(_("^1Don't shoot your team mates!"));
+ centerprint_hud(_("^1Don't shoot your team mates!"));
} else if (type == DEATH_QUIET) {
// do nothing
} else { // generic message
if(gentle)
- centerprint(_("^1You need to be more careful!"));
+ centerprint_hud(_("^1You need to be more careful!"));
else
- centerprint(_("^1You killed your own dumb self!"));
+ centerprint_hud(_("^1You killed your own dumb self!"));
}
} else if(msg == MSG_KILL) {
if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
if(gentle) {
- centerprint(sprintf(_("^1Moron! You went against ^7%s^1, a team mate!"), s1));
+ centerprint_hud(sprintf(_("^1Moron! You went against ^7%s^1, a team mate!"), s1));
} else {
- centerprint(sprintf(_("^1Moron! You fragged ^7%s^1, a team mate!"), s1));
+ centerprint_hud(sprintf(_("^1Moron! You fragged ^7%s^1, a team mate!"), s1));
}
} else if (type == KILL_FIRST_BLOOD) {
if(gentle) {
- centerprint(_("^1First score"));
+ centerprint_hud(_("^1First score"));
} else {
- centerprint(_("^1First blood"));
+ centerprint_hud(_("^1First blood"));
}
} else if (type == KILL_FIRST_VICTIM) {
if(gentle) {
- centerprint(_("^1First casualty"));
+ centerprint_hud(_("^1First casualty"));
} else {
- centerprint(_("^1First victim"));
+ centerprint_hud(_("^1First victim"));
}
} else if (type == KILL_TYPEFRAG) { // s2 contains "advanced kill messages" such as ping, handicap...
if(gentle) {
- centerprint(strcat(sprintf(_("^1You scored against ^7%s^1 who was typing!"), s1), s2));
+ centerprint_hud(strcat(sprintf(_("^1You scored against ^7%s^1 who was typing!"), s1), s2));
} else {
- centerprint(strcat(sprintf(_("^1You typefragged ^7%s"), s1), s2));
+ centerprint_hud(strcat(sprintf(_("^1You typefragged ^7%s"), s1), s2));
}
} else if (type == KILL_TYPEFRAGGED) {
if(gentle) {
- centerprint(strcat(sprintf(_("^1You were scored against by ^7%s^1 while you were typing!"), s1), s2));
+ centerprint_hud(strcat(sprintf(_("^1You were scored against by ^7%s^1 while you were typing!"), s1), s2));
} else {
- centerprint(strcat(sprintf(_("^1You were typefragged by ^7%s"), s1), s2));
+ centerprint_hud(strcat(sprintf(_("^1You were typefragged by ^7%s"), s1), s2));
}
} else if (type == KILL_FRAG) {
if(gentle) {
- centerprint(strcat(sprintf(_("^4You scored against ^7%s"), s1), s2));
+ centerprint_hud(strcat(sprintf(_("^4You scored against ^7%s"), s1), s2));
} else {
- centerprint(strcat(sprintf(_("^4You fragged ^7%s"), s1), s2));
+ centerprint_hud(strcat(sprintf(_("^4You fragged ^7%s"), s1), s2));
}
} else { // generic message
if(gentle) {
- centerprint(strcat(sprintf(_("^1You were scored against by ^7%s"), s1), s2));
+ centerprint_hud(strcat(sprintf(_("^1You were scored against by ^7%s"), s1), s2));
} else {
- centerprint(strcat(sprintf(_("^1You were fragged by ^7%s"), s1), s2));
+ centerprint_hud(strcat(sprintf(_("^1You were fragged by ^7%s"), s1), s2));
}
}
} else if(msg == MSG_KILL_ACTION) {
// TODO: invent more centerprints here?
- centerprint(_("^1Watch your step!"));
+ centerprint_hud(_("^1Watch your step!"));
}
}
c2 = rotate('1 0 0' * mi_min_x + '0 1 0' * mi_max_y, teamradar_angle * DEG2RAD);
c3 = rotate('1 0 0' * mi_max_x + '0 1 0' * mi_min_y, teamradar_angle * DEG2RAD);
span = '0 0 0';
- span_x = max4(c0_x, c1_x, c2_x, c3_x) - min4(c0_x, c1_x, c2_x, c3_x);
- span_y = max4(c0_y, c1_y, c2_y, c3_y) - min4(c0_y, c1_y, c2_y, c3_y);
+ span_x = max(c0_x, c1_x, c2_x, c3_x) - min(c0_x, c1_x, c2_x, c3_x);
+ span_y = max(c0_y, c1_y, c2_y, c3_y) - min(c0_y, c1_y, c2_y, c3_y);
// max-min distance must fit the radar in x=x, y=y
bigsize = min(
centerprint_countdown_num[j] = countdown_num;
}
-void centerprint(string strMessage)
+void centerprint_hud(string strMessage)
{
centerprint_generic(0, strMessage, autocvar_hud_panel_centerprint_time, 0);
}
else if (r > 0.8)
centerprint_generic(0, sprintf("^1Multiline message at time %s that\n^1lasts longer than normal", seconds_tostring(time)), 20, 0);
else
- centerprint(sprintf("Message at time %s", seconds_tostring(time)));
+ centerprint_hud(sprintf("Message at time %s", seconds_tostring(time)));
hud_configure_cp_generation_time = time + 1 + random()*4;
}
}
continue;
}
- // fade the centerprint in/out
+ // fade the centerprint_hud in/out
if (centerprint_time[j] < 0 || centerprint_expire_time[j] - autocvar_hud_panel_centerprint_fade_out > time)
a = bound(0, (time - (centerprint_expire_time[j] - centerprint_time[j])) / max(0.0001, autocvar_hud_panel_centerprint_fade_in), 1);
else if (centerprint_expire_time[j] > time)
vector color;
float hud_dock_color_team = autocvar_hud_dock_color_team;
if((teamplay) && hud_dock_color_team) {
- f = stof(getplayerkey(current_player - 1, "colors"));
+ f = stof(getplayerkeyvalue(current_player - 1, "colors"));
color = colormapPaletteColor(mod(f, 16), 1) * hud_dock_color_team;
}
else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && hud_dock_color_team) {
{
string hud_dock_color = autocvar_hud_dock_color;
if(hud_dock_color == "shirt") {
- f = stof(getplayerkey(current_player - 1, "colors"));
+ f = stof(getplayerkeyvalue(current_player - 1, "colors"));
color = colormapPaletteColor(floor(f / 16), 0);
}
else if(hud_dock_color == "pants") {
- f = stof(getplayerkey(current_player - 1, "colors"));
+ f = stof(getplayerkeyvalue(current_player - 1, "colors"));
color = colormapPaletteColor(mod(f, 16), 1);
}
else
// Get value for panel_bg_color: if "" fetch default, else use panel_bg_color. Convert pants, shirt or teamcolor into a vector.
#define HUD_Panel_GetColor()\
if((teamplay) && panel_bg_color_team) {\
- panel_bg_color = colormapPaletteColor(mod(stof(getplayerkey(current_player - 1, "colors")), 16), 1) * panel_bg_color_team;\
+ panel_bg_color = colormapPaletteColor(mod(stof(getplayerkeyvalue(current_player - 1, "colors")), 16), 1) * panel_bg_color_team;\
} else if (autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && panel_bg_color_team) {\
panel_bg_color = '1 0 0' * panel_bg_color_team;\
} else {\
panel_bg_color = autocvar_hud_panel_bg_color;\
} else {\
if(panel_bg_color_str == "shirt") {\
- panel_bg_color = colormapPaletteColor(floor(stof(getplayerkey(current_player - 1, "colors")) / 16), 0);\
+ panel_bg_color = colormapPaletteColor(floor(stof(getplayerkeyvalue(current_player - 1, "colors")) / 16), 0);\
} else if(panel_bg_color_str == "pants") {\
- panel_bg_color = colormapPaletteColor(mod(stof(getplayerkey(current_player - 1, "colors")), 16), 1);\
+ panel_bg_color = colormapPaletteColor(mod(stof(getplayerkeyvalue(current_player - 1, "colors")), 16), 1);\
} else {\
panel_bg_color = stov(panel_bg_color_str);\
}\
// allow console bind to work
string con_keys;
float keys;
- con_keys = findkeysforcommand("toggleconsole");
+ con_keys = findkeysforcommand("toggleconsole", 0);
keys = tokenize(con_keys); // findkeysforcommand returns data for this
float hit_con_bind, i;
float camera_roll;
vector camera_direction;
-void centerprint(string strMessage);
+void centerprint_hud(string strMessage);
void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
#define ALPHA_MIN_VISIBLE 0.003
else
mv_maps_mask = ReadShort();
- // Assume mv_pk3list is NULL, there should only be 1 mapvote per round
- mv_pk3list = NULL; // I'm still paranoid!
+ // Assume mv_pk3list is world, there should only be 1 mapvote per round
+ mv_pk3list = world; // I'm still paranoid!
for(i = 0, power = 1; i < mv_num_maps; ++i, power *= 2)
{
if(teamslots[num])
return teamslots[num];
if not(add)
- return NULL;
+ return world;
tm = spawn();
tm.team = Team;
teamslots[num] = tm;
var string _drawpic_picpath;
#define drawpic_aspect(pos,pic,mySize,color,alpha,drawflag)\
do {\
- _drawpic_imgsize = drawgetimagesize(pic);\
+ _drawpic_imgsize = draw_getimagesize(pic);\
_drawpic_imgaspect = _drawpic_imgsize_x/_drawpic_imgsize_y;\
_drawpic_sz = mySize;\
if(_drawpic_sz_x/_drawpic_sz_y > _drawpic_imgaspect) {\
string s;
entity e;
- s = getplayerkey(pl, "TEMPHACK_origin");
+ s = getplayerkeyvalue(pl, "TEMPHACK_origin");
if(s != "")
return stov(s);
-#ifdef USE_FTE
-#pragma target FTE
-#endif
-
-#define CSQC 1
../../csprogs.dat
+
+sys-pre.qh
+../dpdefs/csprogsdefs.qc
+sys-post.qh
+
pre.qh
../common/util-pre.qh
Defs.qc
-csqc_constants.qc
../dpdefs/keycodes.qc
../common/constants.qh
-csqc_builtins.qc
../warpzonelib/anglestransform.qh
../warpzonelib/mathlib.qh
case SP_PING:
if not(pl.gotscores)
return "\xEE\x82\x8D\xEE\x82\x8D\xEE\x82\x8D"; // >>> sign
- //str = getplayerkey(pl.sv_entnum, "ping");
+ //str = getplayerkeyvalue(pl.sv_entnum, "ping");
f = pl.ping;
if(f == 0)
return _("N/A");
}
else if(!teamplay)
{
- f = stof(getplayerkey(pl.sv_entnum, "colors"));
+ f = stof(getplayerkeyvalue(pl.sv_entnum, "colors"));
{
hud_field_icon0 = "gfx/scoreboard/playercolor_base";
hud_field_icon1 = "gfx/scoreboard/playercolor_shirt";
if(hud_field_icon0 != "")
{
- sz = drawgetimagesize(hud_field_icon0);
+ sz = draw_getimagesize(hud_field_icon0);
f = sz_x / sz_y;
if(hud_fixscoreboardcolumnwidth_iconlen < f)
hud_fixscoreboardcolumnwidth_iconlen = f;
if(hud_field_icon1 != "")
{
- sz = drawgetimagesize(hud_field_icon1);
+ sz = draw_getimagesize(hud_field_icon1);
f = sz_x / sz_y;
if(hud_fixscoreboardcolumnwidth_iconlen < f)
hud_fixscoreboardcolumnwidth_iconlen = f;
if(hud_field_icon2 != "")
{
- sz = drawgetimagesize(hud_field_icon2);
+ sz = draw_getimagesize(hud_field_icon2);
f = sz_x / sz_y;
if(hud_fixscoreboardcolumnwidth_iconlen < f)
hud_fixscoreboardcolumnwidth_iconlen = f;
pos_y += sb_heading_fontsize_y + hud_fontsize_y * 0.25;
// Draw the scoreboard
- vector bg_size = drawgetimagesize("gfx/scoreboard/scoreboard_bg") * autocvar_scoreboard_bg_scale;
+ vector bg_size = draw_getimagesize("gfx/scoreboard/scoreboard_bg") * autocvar_scoreboard_bg_scale;
if(teamplay)
{
{
entity sort;
sort = spawn();
- sort.sort_next = NULL;
+ sort.sort_next = world;
sort.chain = sort;
return sort;
}
entity sort;
sort = spawn();
sort.sort_cmp = cmp;
- sort.sort_next = NULL;
+ sort.sort_next = world;
sort.chain = sort;
return sort;
}
float Sort_HasNext(entity sort)
{
- return (sort.chain.sort_next != NULL);
+ return (sort.chain.sort_next != world);
}
entity Sort_Next(entity sort)
next = spawn();
sort.chain.sort_next = next;
next.sort_prev = sort.chain;
- next.sort_next = NULL;
+ next.sort_next = world;
}
sort.chain = next;
return next;
if(!teamplay)
return 0;
else
- return stof(getplayerkey(i, "colors")) & 15;
+ return stof(getplayerkeyvalue(i, "colors")) & 15;
}
float GetPlayerColor(float i)
{
if not(playerslots[i].gotscores) // unconnected
return COLOR_SPECTATOR;
- else if(stof(getplayerkey(i, "frags")) == FRAGS_SPECTATOR)
+ else if(stof(getplayerkeyvalue(i, "frags")) == FRAGS_SPECTATOR)
return COLOR_SPECTATOR;
else
return GetPlayerColorForce(i);
string GetPlayerName(float i)
{
- return ColorTranslateRGB(getplayerkey(i, "name"));
+ return ColorTranslateRGB(getplayerkeyvalue(i, "name"));
}
vector GetTeamRGB(float color)
float vlen_maxnorm2d(vector v)
{
- return max4(v_x, v_y, -v_x, -v_y);
+ return max(v_x, v_y, -v_x, -v_y);
}
float vlen_minnorm2d(vector v)
{
vector loc, psize;
- psize = self.axh_scale * drawgetimagesize(self.axh_image);
+ psize = self.axh_scale * draw_getimagesize(self.axh_image);
loc = project_3d_to_2d(self.origin) - 0.5 * psize;
if not (loc_z < 0 || loc_x < 0 || loc_y < 0 || loc_x > vid_conwidth || loc_y > vid_conheight)
{
// Fetch health & ammo stats
HUD_GETSTATS
- picsize = drawgetimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
hudloc_y = vid_conheight - picsize_y;
hudloc_x = vid_conwidth * 0.5 - picsize_x * 0.5;
vh_health *= 0.01;
reload2 *= 0.01;
- pic2size = drawgetimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
+ pic2size = draw_getimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
picloc = picsize * 0.5 - pic2size * 0.5;
if(vh_health < 0.25)
drawpic(hudloc + picloc, spider_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
drawpic(hudloc + picloc, hud_sh, pic2size, '1 1 1', shield, DRAWFLAG_NORMAL);
// Health bar
- picsize = drawgetimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale;
picloc = '69 69 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - vh_health)), 0, vid_conwidth, vid_conheight);
drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
- picsize = drawgetimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale;
picloc = '37 65 0' * autocvar_cl_vehicles_hudscale;
if(vh_health < 0.25)
{
}
}
// Shield bar
- picsize = drawgetimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
picloc = '69 140 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - shield)), 0, vid_conwidth, vid_conheight);
drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
picloc = '40 136 0' * autocvar_cl_vehicles_hudscale;
- picsize = drawgetimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale;
if(shield < 0.25)
{
if(alarm2time < time)
// Minigun bar
- picsize = drawgetimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x, picloc_y, picsize_x * ammo1, vid_conheight);
drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
- picsize = drawgetimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale;
picloc = '664 60 0' * autocvar_cl_vehicles_hudscale;
if(ammo1 < 0.2)
drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
// Rocket ammo bar
- picsize = drawgetimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
ammo1 = picsize_x / 8;
picloc = '450 140 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x, hudloc_y + picloc_y, picsize_x * reload2, vid_conheight);
drawresetcliparea();
// .. and icons
- pic2size = 0.35 * drawgetimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
+ pic2size = 0.35 * draw_getimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
picloc_x -= pic2size_x;
picloc_y += pic2size_y * 2.25;
if(ammo2 == 9)
drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, ((i >= ammo2) ? '1 1 1' : '0 0 0'), 0.75, DRAWFLAG_NORMAL);
}
}
- pic2size = drawgetimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
+ pic2size = draw_getimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
picloc = '664 130 0' * autocvar_cl_vehicles_hudscale;
if(ammo2 == 9)
drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
HUD_DrawScoreboard();
else
{
- picsize = drawgetimagesize(spider_xhair);
+ picsize = draw_getimagesize(spider_xhair);
picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
// Fetch health & ammo stats
HUD_GETSTATS
- picsize = drawgetimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
hudloc_y = vid_conheight - picsize_y;
hudloc_x = vid_conwidth * 0.5 - picsize_x * 0.5;
reload1 = reload2 * 0.01;
//reload2 *= 0.01;
- pic2size = drawgetimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
+ pic2size = draw_getimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
picloc = picsize * 0.5 - pic2size * 0.5;
if(vh_health < 0.25)
drawpic(hudloc + picloc, raptor_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
drawpic(hudloc + picloc, hud_sh, pic2size, '1 1 1', shield, DRAWFLAG_NORMAL);
// Health bar
- picsize = drawgetimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale;
picloc = '69 69 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - vh_health)), 0, vid_conwidth, vid_conheight);
drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
- picsize = drawgetimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale;
picloc = '37 65 0' * autocvar_cl_vehicles_hudscale;
if(vh_health < 0.25)
{
}
// Shield bar
- picsize = drawgetimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
picloc = '69 140 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - shield)), 0, vid_conwidth, vid_conheight);
drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
picloc = '40 136 0' * autocvar_cl_vehicles_hudscale;
- picsize = drawgetimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale;
if(shield < 0.25)
{
if(alarm2time < time)
}
// Gun bar
- picsize = drawgetimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x, picloc_y, picsize_x * energy, vid_conheight);
drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
- picsize = drawgetimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale;
picloc = '664 60 0' * autocvar_cl_vehicles_hudscale;
if(energy < 0.2)
drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
// Bomb bar
- picsize = drawgetimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
picloc = '450 140 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x, hudloc_y + picloc_y, picsize_x * reload1, vid_conheight);
drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
- pic2size = drawgetimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
+ pic2size = draw_getimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
picloc = '664 130 0' * autocvar_cl_vehicles_hudscale;
if(reload1 != 1)
drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
where = project_3d_to_2d(trace_endpos);
setorigin(dropmark, trace_endpos);
- picsize = drawgetimagesize(raptor_drop) * 0.2;
+ picsize = draw_getimagesize(raptor_drop) * 0.2;
if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)
{
if(dropmark.cnt > time)
{
where = project_3d_to_2d(dropmark.origin);
- picsize = drawgetimagesize(raptor_drop) * 0.25;
+ picsize = draw_getimagesize(raptor_drop) * 0.25;
if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)
{
HUD_DrawScoreboard();
else
{
- picsize = drawgetimagesize(raptor_xhair);
+ picsize = draw_getimagesize(raptor_xhair);
picsize_x *= 0.5;
picsize_y *= 0.5;
// Fetch health & ammo stats
HUD_GETSTATS
- picsize = drawgetimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
hudloc_y = vid_conheight - picsize_y;
hudloc_x = vid_conwidth * 0.5 - picsize_x * 0.5;
energy *= 0.01;
reload1 *= 0.01;
- pic2size = drawgetimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
+ pic2size = draw_getimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
picloc = picsize * 0.5 - pic2size * 0.5;
if(vh_health < 0.25)
drawpic(hudloc + picloc, waki_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
drawpic(hudloc + picloc, hud_sh, pic2size, '1 1 1', shield, DRAWFLAG_NORMAL);
// Health bar
- picsize = drawgetimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale;
picloc = '69 69 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - vh_health)), 0, vid_conwidth, vid_conheight);
drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
- picsize = drawgetimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale;
picloc = '37 65 0' * autocvar_cl_vehicles_hudscale;
if(vh_health < 0.25)
{
// Shield bar
- picsize = drawgetimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
picloc = '69 140 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - shield)), 0, vid_conwidth, vid_conheight);
drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
picloc = '40 136 0' * autocvar_cl_vehicles_hudscale;
- picsize = drawgetimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale;
if(shield < 0.25)
{
if(alarm2time < time)
}
// Gun bar
- picsize = drawgetimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x, picloc_y, picsize_x * energy, vid_conheight);
drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
- picsize = drawgetimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale;
picloc = '664 60 0' * autocvar_cl_vehicles_hudscale;
if(energy < 0.2)
drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
// Bomb bar
- picsize = drawgetimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
+ picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
picloc = '450 140 0' * autocvar_cl_vehicles_hudscale;
drawsetcliparea(hudloc_x + picloc_x, hudloc_y + picloc_y, picsize_x * reload1, vid_conheight);
drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
drawresetcliparea();
// .. and icon
- pic2size = drawgetimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
+ pic2size = draw_getimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
picloc = '664 130 0' * autocvar_cl_vehicles_hudscale;
if(reload1 != 1)
drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
HUD_DrawScoreboard();
else
{
- picsize = drawgetimagesize(waki_xhair);
+ picsize = draw_getimagesize(waki_xhair);
picsize_x *= 0.5;
picsize_y *= 0.5;