34 pos = v1 +
dir * nudge;
48 tracebox(pos, mi, ma, v2, nomonsters, forent);
66 tracebox(t, mi, ma, pos, nomonsters, forent);
72 pos = t +
dir * nudge;
75 if(stopatentity && stopentity && stopentity != ignorestopatentity)
102 tracebox_inverted(v1,
'0 0 0',
'0 0 0', v2, nomonsters, forent, stopatentity, ignorestopatentity);
118 vector vec = mindist *
'1 0 0';
127 traceline (loc, loc + vec,
true,
NULL);
149 vector v = ((ent.absmin + ent.absmax) * 0.5);
150 entity e = ent.tag_entity;
154 v += (e.absmin + e.absmax) * 0.5;
205string draw_UseSkinFor(
string pic)
210 return strcat(draw_currentSkin,
"/", pic);
214 #define PRECACHE_PIC precache_pic
215 #define SKIN_PATH hud_skin_path
218 #define PRECACHE_PIC draw_PreloadPicture
219 #define SKIN_PATH (strreplace("gfx/menu", "gfx/hud", draw_currentSkin))
224string icon_path_from_HUDskin(
string theIcon)
229 string img =
strcat(
"/", SKIN_PATH,
"/", theIcon);
230 if (PRECACHE_PIC(img) ==
"")
231 img = sprintf(
"/gfx/hud/default/%s", theIcon);
237string icon_path_from_menuskin(
string theIcon)
242 string img =
strcat(
"/", draw_currentSkin,
"/", theIcon);
244 img = sprintf(
"/gfx/menu/wickedx/%s", theIcon);
253void mut_set_active(
int mut)
256 active_mutators[1] |=
BIT(mut - 24);
258 active_mutators[0] |=
BIT(mut);
261bool mut_is_active(
int mut)
264 return (active_mutators[1] & (
BIT(mut - 24)));
266 return (active_mutators[0] &
BIT(mut));
272string build_mutator_list(
string s)
275 if (s ==
"")
return "";
289 for (
string arg =
""; i < n; ++i)
291 if (i >= 0) arg =
argv(i);
293 #define X(name, translated_name, mut, cond) \
294 if(arg == name || (!n && (cond))) { s2 = cons_mid(s2, ", ", translated_name); mut_set_active(mut); }
295 X(
"Dodging" , _(
"Dodging") , MUT_DODGING ,
cvar(
"g_dodging"))
296 X(
"InstaGib" , _(
"InstaGib") , MUT_INSTAGIB ,
cvar(
"g_instagib"))
297 X(
"New Toys" , _(
"New Toys") , MUT_NEW_TOYS ,
cvar(
"g_new_toys"))
298 X(
"NIX" , _(
"NIX") , MUT_NIX ,
cvar(
"g_nix"))
299 X(
"Rocket Flying" , _(
"Rocket Flying") , MUT_ROCKET_FLYING ,
cvar(
"g_rocket_flying"))
300 X(
"Invincible Projectiles" , _(
"Invincible Projectiles") , MUT_INVINCIBLE_PROJECTILES ,
cvar(
"g_invincible_projectiles"))
302 X(
"Cloaked" , _(
"Cloaked") , MUT_CLOAKED ,
cvar(
"g_cloaked"))
303 X(
"Hook" , _(
"Hook") , MUT_GRAPPLING_HOOK ,
cvar(
"g_grappling_hook"))
304 X(
"Midair" , _(
"Midair") , MUT_MIDAIR ,
cvar(
"g_midair"))
305 X(
"Melee only Arena" , _(
"Melee only Arena") , MUT_MELEE_ONLY ,
cvar(
"g_melee_only"))
306 X(
"Vampire" , _(
"Vampire") , MUT_VAMPIRE ,
cvar(
"g_vampire"))
307 X(
"Piñata" , _(
"Piñata") , MUT_PINATA ,
cvar(
"g_pinata"))
308 X(
"Weapons stay" , _(
"Weapons stay") , MUT_WEAPON_STAY ,
cvar(
"g_weapon_stay"))
309 X(
"Blood loss" , _(
"Blood loss") , MUT_BLOODLOSS ,
cvar(
"g_bloodloss") > 0)
310 X(
"Jetpack" , _(
"Jetpack") , MUT_JETPACK ,
cvar(
"g_jetpack"))
311 X(
"Buffs" , _(
"Buffs") , MUT_BUFFS ,
cvar(
"g_buffs") > 0)
312 X(
"Overkill" , _(
"Overkill") , MUT_OVERKILL ,
cvar(
"g_overkill"))
313 X(
"No powerups" , _(
"No powerups") , MUT_NO_POWERUPS ,
cvar(
"g_powerups") == 0)
314 X(
"Powerups" , _(
"Powerups") , MUT_POWERUPS ,
cvar(
"g_powerups") > 0)
315 X(
"Touch explode" , _(
"Touch explode") , MUT_TOUCHEXPLODE ,
cvar(
"g_touchexplode") > 0)
316 X(
"Wall jumping" , _(
"Wall jumping") , MUT_WALLJUMP ,
cvar(
"g_walljump"))
317 X(
"No start weapons" , _(
"No start weapons") , MUT_NO_START_WEAPONS ,
cvar_string(
"g_weaponarena") ==
"0" &&
cvar(
"g_balance_blaster_weaponstartoverride") == 0)
318 X(
"Nades" , _(
"Nades") , MUT_NADES ,
cvar(
"g_nades"))
319 X(
"Offhand blaster" , _(
"Offhand blaster") , MUT_OFFHAND_BLASTER ,
cvar(
"g_offhand_blaster"))
329 float lleft, i, j, wlen;
334 for (i = 0; i < len; ++i)
357 for (j = i+1; j < len; ++j)
426 pValue =
floor(pValue + 0.5);
437 valstr =
ftos(pValue);
469 m =
floor((l + r) / 2);
489 float p = (data & 0xF000) / 0x1000;
490 float q = (data & 0x0F80) / 0x80;
491 int len = (data & 0x007F);
508 float cos_p =
cos(p);
509 out.x =
cos(q) * cos_p;
510 out.y =
sin(q) * cos_p;
530 if(
ang.x < -90 &&
ang.x > +90)
531 error(
"BOGUS vectoangles");
534 p =
floor(0.5 + (
ang.x + 90) * (16 / 180)) & 15;
543 y =
floor(0.5 +
ang.y * (32 / 360)) & 31;
548 return (p * 0x1000) + (
y * 0x80) + len;
554 float f = (2 ** (1/8));
556 for(i = 0; i < 128; ++i)
562 if(
cvar(
"developer") > 0)
564 LOG_TRACE(
"Verifying vector compression table...");
565 for(i = 0x0F00; i < 0xFFFF; ++i)
569 "BROKEN vector compression: %s -> %s -> %s",
582 traceline(v0, v0 + dvx,
true, forent);
if(
trace_fraction < 1)
return 0;
583 traceline(v0, v0 + dvy,
true, forent);
if(
trace_fraction < 1)
return 0;
584 traceline(v0, v0 + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
585 traceline(v0 + dvx, v0 + dvx + dvy,
true, forent);
if(
trace_fraction < 1)
return 0;
586 traceline(v0 + dvx, v0 + dvx + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
587 traceline(v0 + dvy, v0 + dvy + dvx,
true, forent);
if(
trace_fraction < 1)
return 0;
588 traceline(v0 + dvy, v0 + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
589 traceline(v0 + dvz, v0 + dvz + dvx,
true, forent);
if(
trace_fraction < 1)
return 0;
590 traceline(v0 + dvz, v0 + dvz + dvy,
true, forent);
if(
trace_fraction < 1)
return 0;
591 traceline(v0 + dvx + dvy, v0 + dvx + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
592 traceline(v0 + dvx + dvz, v0 + dvx + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
593 traceline(v0 + dvy + dvz, v0 + dvx + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
598string fixPriorityList(
string order,
float from,
float to,
float subtract,
float complete)
605 for(i = 0; i < n; ++i)
610 if(w >= from && w <= to)
615 if(w >= from && w <= to)
624 for(w = to; w >= from; --w)
629 for(i = 0; i < n; ++i)
645 for(
float i = 0; i < n; ++i)
646 neworder =
strcat(neworder, mapfunc(
argv(i)),
" ");
655 if(i >= 0 && i < n && j >= 0 && j < n && i != j)
658 for(
float w = 0; w < n; ++w)
707 tracebox(
'1 0 0' * mi.x,
708 '0 1 0' * mi.y +
'0 0 1' * mi.z,
709 '0 1 0' * ma.y +
'0 0 1' * ma.z,
716 tracebox(
'0 1 0' * mi.y,
717 '1 0 0' * mi.x +
'0 0 1' * mi.z,
718 '1 0 0' * ma.x +
'0 0 1' * ma.z,
725 tracebox(
'0 0 1' * mi.z,
726 '1 0 0' * mi.x +
'0 1 0' * mi.y,
727 '1 0 0' * ma.x +
'0 1 0' * ma.y,
734 tracebox(
'1 0 0' * ma.x,
735 '0 1 0' * mi.y +
'0 0 1' * mi.z,
736 '0 1 0' * ma.y +
'0 0 1' * ma.z,
743 tracebox(
'0 1 0' * ma.y,
744 '1 0 0' * mi.x +
'0 0 1' * mi.z,
745 '1 0 0' * ma.x +
'0 0 1' * ma.z,
752 tracebox(
'0 0 1' * ma.z,
753 '1 0 0' * mi.x +
'0 1 0' * mi.y,
754 '1 0 0' * ma.x +
'0 1 0' * ma.y,
776 if(extend.y > extend.x)
778 mi_picmin.x -= (extend.y - extend.x) * 0.5;
779 mi_picmax.x += (extend.y - extend.x) * 0.5;
783 mi_picmin.y -= (extend.x - extend.y) * 0.5;
784 mi_picmax.y += (extend.x - extend.y) * 0.5;
800 mi_pictexcoord1_x = mi_pictexcoord0_x;
801 mi_pictexcoord1_y = mi_pictexcoord2_y;
802 mi_pictexcoord3_x = mi_pictexcoord2_x;
803 mi_pictexcoord3_y = mi_pictexcoord0_y;
809 float created_saved_value = 0;
811 if (!(tmp_cvar || tmp_value))
813 LOG_TRACE(
"Error: Invalid usage of cvar_settemp(string, string); !");
817 if(!cvar_type(tmp_cvar))
819 LOG_INFOF(
"Error: cvar %s doesn't exist!", tmp_cvar);
825 created_saved_value = -1;
829 if(created_saved_value != -1)
836 created_saved_value = 1;
842 return created_saved_value;
852 if(cvar_type(it.netname))
861 LOG_INFOF(
"Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.", it.netname);
868 if(cvar_type(e.netname))
875 print(sprintf(
"Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.", e.netname));
889 if(w(theText, theSize) <= maxWidth)
892 bool colors = (w(
"^7", theSize) == 0);
895 int len, left, right, middle;
897 right = len =
strlen(theText);
901 middle =
floor((left + right) / 2);
905 ofs = (res.x) ? res.x - res.y : 0;
908 if(w(
substring(theText, 0, middle + ofs), theSize) <= maxWidth)
913 while(left < right - 1);
925 if(w(theText) <= maxLength)
928 bool colors = (w(
"^7") == 0);
931 int len, left, right, middle;
933 right = len =
strlen(theText);
937 middle =
floor((left + right) / 2);
941 ofs = (!res.x) ? 0 : res.x - res.y;
944 if(w(
substring(theText, 0, middle + ofs)) <= maxLength)
949 while(left < right - 1);
960 for(
int i = len; i >= start; --i)
966 while (i-carets >= start &&
substring(s, i-carets, 1) ==
"^")
975 if(start == 0 && len == 1)
986 if(start == 0 && len == 4)
1068 bool take_next_char =
false;
1090 || (c >= 0x3000 && c <= 0x9fff)
1091 || (c >= 0xac00 && c <= 0xd7af)
1104 take_next_char =
true;
1126 else if (colorlen == 0)
1142 if (take_until <= 0 || take_until >=
strlen(s)) {
1147 float colorlen = tw(
"^7", theFontSize);
1162 if (take_until <= 0 || take_until >=
strlen(s)) {
1167 float colorlen = tw(
"^7");
1173 if(tw(theText, theFontSize) <= maxWidth)
1181 if(tw(theText) <= maxWidth)
1189 string subpattern, subpattern2, subpattern3, subpattern4;
1192 subpattern2 =
",teams,";
1194 subpattern2 =
",noteams,";
1196 subpattern3 =
",teamspawns,";
1198 subpattern3 =
",noteamspawns,";
1199 if(gt == MAPINFO_TYPE_RACE || gt == MAPINFO_TYPE_CTS)
1200 subpattern4 =
",race,";
1213 if(subpattern4 &&
strstrofs(
strcat(
",", pattern,
","), subpattern4, 0) >= 0)
1262 else if(solution.x > 0)
1266 ret =
normalize(eorg + solution.x * evel);
1268 else if(solution.y > 0)
1272 ret =
normalize(eorg + solution.y * evel);
1290 if(newton_style == 2)
1301 if(newton_style == 2)
1320 outspeed = solution.y;
1324 outspeed = solution.x;
1328 outspeed =
bound(spd * mi, outspeed, spd * ma);
1329 return mydir * outspeed;
1333 return myvel + spd * mydir;
1350 int rx_neg = (v.x < 0) ? 1 : 0;
1351 int ry_neg = (v.y < 0) ? 1 : 0;
1352 int rz_neg = (v.z < 0) ? 1 : 0;
1359 rx =
bound(0, rx, 255);
1364 ry =
bound(0, ry, 63);
1369 rz =
bound(0, rz, 63);
1371 ry |= ry_neg *
BIT(6) + rx_neg *
BIT(7);
1372 rz |= rz_neg *
BIT(6);
1373 return rx * 0x10000 + ry * 0x100 + rz;
1379 v.y = (f & 0xFF00) >> 8;
1382 if (v.y &
BIT(7)) { v.y &=
~BIT(7); v.x *= -1; }
1383 if (v.y &
BIT(6)) { v.y &=
~BIT(6); v.y *= -1; }
1384 if (v.z &
BIT(6)) { v.z &=
~BIT(6); v.z *= -1; }
1392 float healthdamage, armordamage, armorideal;
1393 if (
DEATH_IS(deathtype, DEATH_DROWN))
1396 healthdamage = (h - 1) / (1 - armorblock);
1397 armordamage = a + (h - 1);
1398 armorideal = healthdamage * armorblock;
1400 if(armordamage < healthdamage)
1416 if (
DEATH_IS(deathtype, DEATH_DROWN))
1420 v.y =
bound(0, damage * armorblock, a);
1421 v.x =
bound(0, damage - v.y, damage);
1444 t =
car(acl); acl =
cdr(acl);
1484 m =
"models/player/*_";
1489 return strcat(m,
".", fil);
1546 while((s =
fgets(fh)))
1567 if (s ==
"Male") s = _(
"Male");
1568 else if (s ==
"Female") s = _(
"Female");
1569 else if (s ==
"Undisclosed") s = _(
"Undisclosed");
1576 if(c ==
"description")
1578 if(c ==
"bone_upperbody")
1580 if(c ==
"bone_weapon")
1597 while((s =
fgets(fh)))
1616 if (key ==
"<KEY NOT FOUND>")
return _(
"<KEY NOT FOUND>");
1617 if (key ==
"<UNKNOWN KEYNUM>")
return _(
"<UNKNOWN KEYNUM>");
1622 case "TAB":
return _(
"TAB");
1623 case "ENTER":
return _(
"ENTER");
1624 case "ESCAPE":
return _(
"ESCAPE");
1625 case "SPACE":
return _(
"SPACE");
1627 case "BACKSPACE":
return _(
"BACKSPACE");
1628 case "UPARROW":
return _(
"UPARROW");
1629 case "DOWNARROW":
return _(
"DOWNARROW");
1630 case "LEFTARROW":
return _(
"LEFTARROW");
1631 case "RIGHTARROW":
return _(
"RIGHTARROW");
1633 case "ALT":
return _(
"ALT");
1634 case "CTRL":
return _(
"CTRL");
1635 case "SHIFT":
return _(
"SHIFT");
1637 case "INS":
return _(
"INS");
1638 case "DEL":
return _(
"DEL");
1639 case "PGDN":
return _(
"PGDN");
1640 case "PGUP":
return _(
"PGUP");
1641 case "HOME":
return _(
"HOME");
1642 case "END":
return _(
"END");
1644 case "PAUSE":
return _(
"PAUSE");
1646 case "NUMLOCK":
return _(
"NUMLOCK");
1647 case "CAPSLOCK":
return _(
"CAPSLOCK");
1648 case "SCROLLOCK":
return _(
"SCROLLOCK");
1650 case "SEMICOLON":
return _(
"SEMICOLON");
1651 case "TILDE":
return _(
"TILDE");
1652 case "BACKQUOTE":
return _(
"BACKQUOTE");
1653 case "QUOTE":
return _(
"QUOTE");
1654 case "APOSTROPHE":
return _(
"APOSTROPHE");
1655 case "BACKSLASH":
return _(
"BACKSLASH");
1663 return sprintf(_(
"F%d"),
stof(subkey));
1673 return sprintf(_(
"KP_%d"),
stof(subkey));
1678 case "INS":
return sprintf(_(
"KP_%s"), _(
"INS"));
1679 case "END":
return sprintf(_(
"KP_%s"), _(
"END"));
1680 case "DOWNARROW":
return sprintf(_(
"KP_%s"), _(
"DOWNARROW"));
1681 case "PGDN":
return sprintf(_(
"KP_%s"), _(
"PGDN"));
1682 case "LEFTARROW":
return sprintf(_(
"KP_%s"), _(
"LEFTARROW"));
1683 case "RIGHTARROW":
return sprintf(_(
"KP_%s"), _(
"RIGHTARROW"));
1684 case "HOME":
return sprintf(_(
"KP_%s"), _(
"HOME"));
1685 case "UPARROW":
return sprintf(_(
"KP_%s"), _(
"UPARROW"));
1686 case "PGUP":
return sprintf(_(
"KP_%s"), _(
"PGUP"));
1687 case "PERIOD":
return sprintf(_(
"KP_%s"), _(
"PERIOD"));
1688 case "DEL":
return sprintf(_(
"KP_%s"), _(
"DEL"));
1689 case "DIVIDE":
return sprintf(_(
"KP_%s"), _(
"DIVIDE"));
1690 case "SLASH":
return sprintf(_(
"KP_%s"), _(
"SLASH"));
1691 case "MULTIPLY":
return sprintf(_(
"KP_%s"), _(
"MULTIPLY"));
1692 case "MINUS":
return sprintf(_(
"KP_%s"), _(
"MINUS"));
1693 case "PLUS":
return sprintf(_(
"KP_%s"), _(
"PLUS"));
1694 case "ENTER":
return sprintf(_(
"KP_%s"), _(
"ENTER"));
1695 case "EQUALS":
return sprintf(_(
"KP_%s"), _(
"EQUALS"));
1696 default:
return key;
1700 if (key ==
"PRINTSCREEN")
return _(
"PRINTSCREEN");
1705 if (key ==
"MWHEELUP")
return _(
"MWHEELUP");
1706 if (key ==
"MWHEELDOWN")
return _(
"MWHEELDOWN");
1719 case "DPAD_UP":
return sprintf(_(
"X360_%s"), _(
"DPAD_UP"));
1720 case "DPAD_DOWN":
return sprintf(_(
"X360_%s"), _(
"DPAD_DOWN"));
1721 case "DPAD_LEFT":
return sprintf(_(
"X360_%s"), _(
"DPAD_LEFT"));
1722 case "DPAD_RIGHT":
return sprintf(_(
"X360_%s"), _(
"DPAD_RIGHT"));
1723 case "START":
return sprintf(_(
"X360_%s"), _(
"START"));
1724 case "BACK":
return sprintf(_(
"X360_%s"), _(
"BACK"));
1725 case "LEFT_THUMB":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB"));
1726 case "RIGHT_THUMB":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB"));
1727 case "LEFT_SHOULDER":
return sprintf(_(
"X360_%s"), _(
"LEFT_SHOULDER"));
1728 case "RIGHT_SHOULDER":
return sprintf(_(
"X360_%s"), _(
"RIGHT_SHOULDER"));
1729 case "LEFT_TRIGGER":
return sprintf(_(
"X360_%s"), _(
"LEFT_TRIGGER"));
1730 case "RIGHT_TRIGGER":
return sprintf(_(
"X360_%s"), _(
"RIGHT_TRIGGER"));
1731 case "LEFT_THUMB_UP":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_UP"));
1732 case "LEFT_THUMB_DOWN":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_DOWN"));
1733 case "LEFT_THUMB_LEFT":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_LEFT"));
1734 case "LEFT_THUMB_RIGHT":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_RIGHT"));
1735 case "RIGHT_THUMB_UP":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_UP"));
1736 case "RIGHT_THUMB_DOWN":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_DOWN"));
1737 case "RIGHT_THUMB_LEFT":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_LEFT"));
1738 case "RIGHT_THUMB_RIGHT":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_RIGHT"));
1739 default:
return key;
1748 case "UP":
return sprintf(_(
"JOY_%s"), _(
"UP"));
1749 case "DOWN":
return sprintf(_(
"JOY_%s"), _(
"DOWN"));
1750 case "LEFT":
return sprintf(_(
"JOY_%s"), _(
"LEFT"));
1751 case "RIGHT":
return sprintf(_(
"JOY_%s"), _(
"RIGHT"));
1752 default:
return key;
1757 return sprintf(_(
"MIDINOTE%d"),
stof(
substring(key, 8, -1)));
1768 d = f % 22; f =
floor(f / 22);
1769 c = f % 22; f =
floor(f / 22);
1770 b = f % 22; f =
floor(f / 22);
1791 if(a < 0 || b < 0 || c < 0 || d < 0)
1793 return ((a * 22 + b) * 22 + c) * 22 + d;
1818 LOG_INFO(
"Recursive shutdown detected! Only restoring cvars...");
1834 if(e.skeleton_bones_index == e.modelindex)
1837 float skelindex = skel_create(e.modelindex);
1838 e.skeleton_bones = skel_get_numbones(skelindex);
1839 skel_delete(skelindex);
1840 e.skeleton_bones_index = e.modelindex;
1865 entity queue_start, queue_end;
1871 if(e.FindConnectedComponent_processing)
1872 error(
"recursion or broken cleanup");
1875 queue_start = queue_end = e;
1876 queue_end.(fld) =
NULL;
1877 queue_end.FindConnectedComponent_processing = 1;
1880 for (; queue_start; queue_start = queue_start.(fld))
1884 for(t =
NULL; (t = nxt(t, queue_start,
pass)); )
1886 if(t.FindConnectedComponent_processing)
1888 if(iscon(t, queue_start,
pass))
1891 queue_end.(fld) = t;
1893 queue_end.(fld) =
NULL;
1894 queue_end.FindConnectedComponent_processing = 1;
1900 for (queue_start = e; queue_start; queue_start = queue_start.(fld))
1901 queue_start.FindConnectedComponent_processing = 0;
1910 float dur = frameduration(e.modelindex, a.x);
1911 if (dur <= 0 && b.y)
1914 dur = frameduration(e.modelindex, a.x);
1933 case 10:
return ANNCE_NUM_GAMESTART_10;
1934 case 9:
return ANNCE_NUM_GAMESTART_9;
1935 case 8:
return ANNCE_NUM_GAMESTART_8;
1936 case 7:
return ANNCE_NUM_GAMESTART_7;
1937 case 6:
return ANNCE_NUM_GAMESTART_6;
1938 case 5:
return ANNCE_NUM_GAMESTART_5;
1939 case 4:
return ANNCE_NUM_GAMESTART_4;
1940 case 3:
return ANNCE_NUM_GAMESTART_3;
1941 case 2:
return ANNCE_NUM_GAMESTART_2;
1942 case 1:
return ANNCE_NUM_GAMESTART_1;
1950 case 10:
return ANNCE_NUM_KILL_10;
1951 case 9:
return ANNCE_NUM_KILL_9;
1952 case 8:
return ANNCE_NUM_KILL_8;
1953 case 7:
return ANNCE_NUM_KILL_7;
1954 case 6:
return ANNCE_NUM_KILL_6;
1955 case 5:
return ANNCE_NUM_KILL_5;
1956 case 4:
return ANNCE_NUM_KILL_4;
1957 case 3:
return ANNCE_NUM_KILL_3;
1958 case 2:
return ANNCE_NUM_KILL_2;
1959 case 1:
return ANNCE_NUM_KILL_1;
1967 case 10:
return ANNCE_NUM_RESPAWN_10;
1968 case 9:
return ANNCE_NUM_RESPAWN_9;
1969 case 8:
return ANNCE_NUM_RESPAWN_8;
1970 case 7:
return ANNCE_NUM_RESPAWN_7;
1971 case 6:
return ANNCE_NUM_RESPAWN_6;
1972 case 5:
return ANNCE_NUM_RESPAWN_5;
1973 case 4:
return ANNCE_NUM_RESPAWN_4;
1974 case 3:
return ANNCE_NUM_RESPAWN_3;
1975 case 2:
return ANNCE_NUM_RESPAWN_2;
1976 case 1:
return ANNCE_NUM_RESPAWN_1;
1984 case 10:
return ANNCE_NUM_ROUNDSTART_10;
1985 case 9:
return ANNCE_NUM_ROUNDSTART_9;
1986 case 8:
return ANNCE_NUM_ROUNDSTART_8;
1987 case 7:
return ANNCE_NUM_ROUNDSTART_7;
1988 case 6:
return ANNCE_NUM_ROUNDSTART_6;
1989 case 5:
return ANNCE_NUM_ROUNDSTART_5;
1990 case 4:
return ANNCE_NUM_ROUNDSTART_4;
1991 case 3:
return ANNCE_NUM_ROUNDSTART_3;
1992 case 2:
return ANNCE_NUM_ROUNDSTART_2;
1993 case 1:
return ANNCE_NUM_ROUNDSTART_1;
2002 case 10:
return ANNCE_NUM_10;
2003 case 9:
return ANNCE_NUM_9;
2004 case 8:
return ANNCE_NUM_8;
2005 case 7:
return ANNCE_NUM_7;
2006 case 6:
return ANNCE_NUM_6;
2007 case 5:
return ANNCE_NUM_5;
2008 case 4:
return ANNCE_NUM_4;
2009 case 3:
return ANNCE_NUM_3;
2010 case 2:
return ANNCE_NUM_2;
2011 case 1:
return ANNCE_NUM_1;
2022 switch(nativecontents)
2059 vector org, t_forward, t_left, t_up, e_forward, e_up;
2066 t_up =
v_up * tagscale;
2068 e.origin_x =
org * t_forward;
2069 e.origin_y =
org * t_left;
2070 e.origin_z =
org * t_up;
2083 e_up.x =
v_up * t_forward;
2084 e_up.y =
v_up * t_left;
2085 e_up.z =
v_up * t_up;
2093 setattachment(e, to, tag);
2094 setorigin(e, e.origin);
2106 setattachment(e,
NULL,
"");
2107 setorigin(e, e.origin);
2114 e.punchangle = to.angles;
2115 e.view_ofs = e.origin - to.origin;
2116 e.v_angle = e.angles - to.angles;
2121void unfollow_sameorigin(
entity e)
2134 ent.punchangle = e.angles;
2135 ent.view_ofs = ent.origin - e.origin;
2136 ent.v_angle = ent.angles - e.angles;
2137 ent.aiment_classname = e.classname;
2138 ent.aiment_deadflag = e.deadflag;
2143 ent.view_ofs.x =
bound(pl.mins.x + 4, ent.view_ofs.x, pl.maxs.x - 4);
2144 ent.view_ofs.y =
bound(pl.mins.y + 4, ent.view_ofs.y, pl.maxs.y - 4);
2145 ent.view_ofs.z =
bound(pl.mins.z + 4, ent.view_ofs.z, pl.maxs.z - 4);
2170 if(ent.aiment.classname != ent.aiment_classname || ent.aiment.deadflag != ent.aiment_deadflag)
2181 bool do_colorize = (
teamplay && team_colorize);
2189 return strcat(t, strdecolorize(thename));
2270 return base + range *
sin((
time - start_time - (
M_PI / 2) * start_pos) *
freq);
#define MUTATOR_CALLHOOK(id,...)
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
const int SFL_TIME
Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!...
const int SFL_RANK
Display as a rank (with st, nd, rd, th suffix)
const int SFL_HIDE_ZERO
Don't show zero values as scores.
ERASEABLE void write_String_To_File(int fh, string str, bool alsoprint)
float CheckWireframeBox(entity forent, vector v0, vector dvx, vector dvy, vector dvz)
void SetMovetypeFollow(entity ent, entity e)
bool should_break_before(int c)
string playername(string thename, int teamid, bool team_colorize)
void FindConnectedComponent(entity e,.entity fld, findNextEntityNearFunction_t nxt, isConnectedFunction_t iscon, entity pass)
void queue_to_execute_next_frame(string s)
float isGametypeInFilter(Gametype gt, float tp, float ts, string pattern)
void execute_next_frame()
void get_mi_min_max_texcoords(float mode)
void wordwrap_cb(string s, float l, void(string) callback)
string fixPriorityList(string order, float from, float to, float subtract, float complete)
float compressShortVector(vector vec)
int Mod_Q1BSP_SuperContentsFromNativeContents(int nativecontents)
float skeleton_bones_index
void wordwrap_buffer_sprint(string s)
float tracebox_inverted(vector v1, vector mi, vector ma, vector v2, float nomonsters, entity forent, float stopatentity, entity ignorestopatentity)
float tracebox_hits_box(vector start, vector mi, vector ma, vector end, vector thmi, vector thma)
vector healtharmor_maxdamage(float h, float a, float armorblock, int deathtype)
vector decompressShortVector(int data)
void depthfirst(entity start,.entity up,.entity downleft,.entity right, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass)
vector healtharmor_applydamage(float a, float armorblock, int deathtype, float damage)
float matchacl(string acl, string str)
vector solve_shotdirection(vector myorg, vector myvel, vector eorg, vector evel, float spd, float newton_style)
Notification Announcer_PickNumber(int type, int num)
string find_last_color_code(string s)
entity _wordwrap_buffer_sprint_ent
int Mod_Q1BSP_NativeContentsFromSuperContents(int supercontents)
float lengthLogTable[128]
string textShortenToLength(string theText, float maxWidth, textLengthUpToLength_lenFunction_t tw)
float FindConnectedComponent_processing
string to_execute_next_frame
void SV_Shutdown() void CSQC_Shutdown() void m_shutdown()
ERASEABLE float blink_synced(float base, float range, float freq, float start_time, int start_pos)
int cvar_settemp_restore()
string textShortenToWidth(string theText, float maxWidth, vector theFontSize, textLengthUpToWidth_widthFunction_t tw)
float compressShotOrigin(vector v)
void get_mi_min_max(float mode)
string ScoreString(int pFlags, float pValue, int rounds_played)
vector real_origin(entity ent)
float trace_hits_box_1d(float end, float thmi, float thma)
void UnsetMovetypeFollow(entity ent)
string translate_key(string key)
string getWrappedLineLen(int maxLength, textLengthUpToLength_lenFunction_t tw)
string take_wrapped_line_until(int take_until, float colorlen)
int LostMovetypeFollow(entity ent)
string get_model_datafilename(string m, float sk, string fil)
float textLengthUpToLength(string theText, int maxLength, textLengthUpToLength_lenFunction_t w)
void wordwrap_buffer_put(string s)
float textLengthUpToWidth(string theText, float maxWidth, vector theSize, textLengthUpToWidth_widthFunction_t w)
bool should_break_after(int c)
vector get_shotvelocity(vector myvel, vector mydir, float spd, float newton_style, float mi, float ma)
float trace_hits_box(vector start, vector end, vector thmi, vector thma)
string swapInPriorityList(string order, float i, float j)
void attach_sameorigin(entity e, entity to, string tag)
float cvar_settemp(string tmp_cvar, string tmp_value)
string getWrappedLine(float maxWidth, vector theFontSize, textLengthUpToWidth_widthFunction_t tw)
ERASEABLE float cvar_or(string cv, float v)
void Skeleton_SetBones(entity e)
void detach_sameorigin(entity e)
string wordwrap(string s, float l)
void follow_sameorigin(entity e, entity to)
vector findbetterlocation(vector org, float mindist)
float get_model_parameters(string m, float sk)
string mapPriorityList(string order, string(string) mapfunc)
ERASEABLE float blink(float base, float range, float freq)
void traceline_inverted(vector v1, vector v2, float nomonsters, entity forent, float stopatentity, entity ignorestopatentity)
vector animfixfps(entity e, vector a, vector b)
float invertLengthLog(float dist)
void wordwrap_sprint(entity to, string s, float l)
vector decompressShotOrigin(int f)
float(string s) textLengthUpToLength_lenFunction_t
float get_model_parameters_weight
float get_model_parameters_fixbone
string get_model_parameters_sex
float(entity a, entity b, entity pass) isConnectedFunction_t
float get_model_parameters_species
string getWrappedLine_remaining
float get_model_parameters_bone_aimweight[MAX_AIM_BONES]
float get_model_parameters_modelskin
string get_model_parameters_name
string get_model_parameters_bone_weapon
#define TIME_ENCODED_TOSTRING(n, compact)
string get_model_parameters_description
bool get_model_parameters_hidden
string get_model_parameters_modelname
string get_model_parameters_bone_upperbody
entity(entity cur, entity near, entity pass) findNextEntityNearFunction_t
string get_model_parameters_bone_aim[MAX_AIM_BONES]
float(string s, vector size) textLengthUpToWidth_widthFunction_t
IntrusiveList g_saved_cvars
float get_model_parameters_age
string get_model_parameters_desc
const int SPECIES_ROBOT_SOLID
const int SPECIES_ROBOT_RUSTY
const int SPECIES_RESERVED
const int SPECIES_ROBOT_SHINY
ERASEABLE string count_ordinal(int interval)
const float CONTENT_SOLID
const float CONTENT_WATER
const float CONTENT_EMPTY
const float CONTENT_SLIME
const int HITTYPE_ARMORPIERCE
#define tokenizebyseparator
#define pass(name, colormin, colormax)
bool intermission_running
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
#define FOREACH_ENTITY_CLASS(class, cond, body)
string MapInfo_Type_ToString(Gametype t)
int MapInfo_Get_ByName(string pFilename, float pAllowGenerate, Gametype pGametypeToSet)
ERASEABLE vector solve_quadratic(float a, float b, float c)
ax^2 + bx + c = 0
void set_movetype(entity this, int mt)
const int MOVETYPE_FOLLOW
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1points s1 s2
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
entity Notification
always last
#define new_pure(class)
purely logical entities (not linked to the area grid)
#define REGISTRY_GET(id, i)
#define PROJECTILE_MAKETRIGGER(e)
#define STATIC_INIT(func)
during worldspawn
ERASEABLE string car(string s)
returns first word
ERASEABLE string cdr(string s)
returns all but first word
ERASEABLE vector checkColorCode(string theText, int text_len, int pos, bool check_at_the_end)
string Team_ColorCode(int teamid)
const int WEP_FLAG_SPECIALATTACK