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)
274 static bool already_called =
false;
276 if (s ==
"")
return "";
284 localcmd(
"\ncl_hook_mutator_all\n");
293 for (
string arg =
""; i < n; ++i)
298 #define X(name, translated_name, cl_hook, mut, cond) \
299 if (arg == name || (PROGNAME == "MENUQC" && (cond))) \
301 s2 = cons_mid(s2, ", ", translated_name); \
302 mut_set_active(mut); \
303 if (!already_called && PROGNAME == "CSQC" && !isdemo() && cl_hook != "") \
304 localcmd("\n", cl_hook, "\n"); \
306 X(
"Dodging" , _(
"Dodging") ,
"", MUT_DODGING ,
cvar(
"g_dodging"))
307 X(
"InstaGib" , _(
"InstaGib") ,
"cl_hook_mutator_instagib", MUT_INSTAGIB ,
cvar(
"g_instagib"))
308 X(
"New Toys" , _(
"New Toys") ,
"", MUT_NEW_TOYS ,
cvar(
"g_new_toys"))
309 X(
"NIX" , _(
"NIX") ,
"", MUT_NIX ,
cvar(
"g_nix"))
310 X(
"Rocket Flying" , _(
"Rocket Flying") ,
"", MUT_ROCKET_FLYING ,
cvar(
"g_rocket_flying"))
311 X(
"Invincible Projectiles" , _(
"Invincible Projectiles") ,
"", MUT_INVINCIBLE_PROJECTILES ,
cvar(
"g_invincible_projectiles"))
312 X(
"Low gravity" , _(
"Low gravity") ,
"", MUT_GRAVITY ,
cvar(
"sv_gravity") <
stof(
cvar_defstring(
"sv_gravity")))
313 X(
"Cloaked" , _(
"Cloaked") ,
"", MUT_CLOAKED ,
cvar(
"g_cloaked"))
314 X(
"Hook" , _(
"Hook") ,
"cl_hook_mutator_hook", MUT_GRAPPLING_HOOK ,
cvar(
"g_grappling_hook"))
315 X(
"Midair" , _(
"Midair") ,
"", MUT_MIDAIR ,
cvar(
"g_midair"))
316 X(
"Melee only Arena" , _(
"Melee only Arena") ,
"", MUT_MELEE_ONLY ,
cvar(
"g_melee_only"))
317 X(
"Vampire" , _(
"Vampire") ,
"", MUT_VAMPIRE ,
cvar(
"g_vampire"))
318 X(
"Piñata" , _(
"Piñata") ,
"", MUT_PINATA ,
cvar(
"g_pinata"))
319 X(
"Weapons stay" , _(
"Weapons stay") ,
"", MUT_WEAPON_STAY ,
cvar(
"g_weapon_stay"))
320 X(
"Blood loss" , _(
"Blood loss") ,
"", MUT_BLOODLOSS ,
cvar(
"g_bloodloss") > 0)
321 X(
"Jetpack" , _(
"Jetpack") ,
"cl_hook_mutator_jetpack", MUT_JETPACK ,
cvar(
"g_jetpack"))
322 X(
"Buffs" , _(
"Buffs") ,
"", MUT_BUFFS ,
cvar(
"g_buffs") > 0)
323 X(
"Overkill" , _(
"Overkill") ,
"cl_hook_mutator_overkill", MUT_OVERKILL ,
cvar(
"g_overkill"))
324 X(
"No powerups" , _(
"No powerups") ,
"", MUT_NO_POWERUPS ,
cvar(
"g_powerups") == 0)
325 X(
"Powerups" , _(
"Powerups") ,
"", MUT_POWERUPS ,
cvar(
"g_powerups") > 0)
326 X(
"Touch explode" , _(
"Touch explode") ,
"", MUT_TOUCHEXPLODE ,
cvar(
"g_touchexplode") > 0)
327 X(
"Wall jumping" , _(
"Wall jumping") ,
"", MUT_WALLJUMP ,
cvar(
"g_walljump"))
328 X(
"No start weapons" , _(
"No start weapons") ,
"", MUT_NO_START_WEAPONS ,
cvar_string(
"g_weaponarena") ==
"0" &&
cvar(
"g_balance_blaster_weaponstartoverride") == 0)
329 X(
"Nades" , _(
"Nades") ,
"", MUT_NADES ,
cvar(
"g_nades"))
330 X(
"Offhand blaster" , _(
"Offhand blaster") ,
"", MUT_OFFHAND_BLASTER ,
cvar(
"g_offhand_blaster"))
333 already_called =
true;
341 float lleft, i, j, wlen;
346 for (i = 0; i < len; ++i)
369 for (j = i+1; j < len; ++j)
438 pValue =
floor(pValue + 0.5);
449 valstr =
ftos(pValue);
481 m =
floor((l + r) / 2);
501 float p = (data & 0xF000) / 0x1000;
502 float q = (data & 0x0F80) / 0x80;
503 int len = (data & 0x007F);
520 float cos_p =
cos(p);
521 out.x =
cos(q) * cos_p;
522 out.y =
sin(q) * cos_p;
542 if(
ang.x < -90 &&
ang.x > +90)
543 error(
"BOGUS vectoangles");
546 p =
floor(0.5 + (
ang.x + 90) * (16 / 180)) & 15;
555 y =
floor(0.5 +
ang.y * (32 / 360)) & 31;
560 return (p * 0x1000) + (
y * 0x80) + len;
566 float f = (2 ** (1/8));
568 for(i = 0; i < 128; ++i)
574 if(
cvar(
"developer") > 0)
576 LOG_TRACE(
"Verifying vector compression table...");
577 for(i = 0x0F00; i < 0xFFFF; ++i)
581 "BROKEN vector compression: %s -> %s -> %s",
594 traceline(v0, v0 + dvx,
true, forent);
if(
trace_fraction < 1)
return 0;
595 traceline(v0, v0 + dvy,
true, forent);
if(
trace_fraction < 1)
return 0;
596 traceline(v0, v0 + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
597 traceline(v0 + dvx, v0 + dvx + dvy,
true, forent);
if(
trace_fraction < 1)
return 0;
598 traceline(v0 + dvx, v0 + dvx + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
599 traceline(v0 + dvy, v0 + dvy + dvx,
true, forent);
if(
trace_fraction < 1)
return 0;
600 traceline(v0 + dvy, v0 + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
601 traceline(v0 + dvz, v0 + dvz + dvx,
true, forent);
if(
trace_fraction < 1)
return 0;
602 traceline(v0 + dvz, v0 + dvz + dvy,
true, forent);
if(
trace_fraction < 1)
return 0;
603 traceline(v0 + dvx + dvy, v0 + dvx + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
604 traceline(v0 + dvx + dvz, v0 + dvx + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
605 traceline(v0 + dvy + dvz, v0 + dvx + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
610string fixPriorityList(
string order,
float from,
float to,
float subtract,
float complete)
617 for(i = 0; i < n; ++i)
622 if(w >= from && w <= to)
627 if(w >= from && w <= to)
636 for(w = to; w >= from; --w)
641 for(i = 0; i < n; ++i)
657 for(
float i = 0; i < n; ++i)
658 neworder =
strcat(neworder, mapfunc(
argv(i)),
" ");
667 if(i >= 0 && i < n && j >= 0 && j < n && i != j)
670 for(
float w = 0; w < n; ++w)
719 tracebox(
'1 0 0' * mi.x,
720 '0 1 0' * mi.y +
'0 0 1' * mi.z,
721 '0 1 0' * ma.y +
'0 0 1' * ma.z,
728 tracebox(
'0 1 0' * mi.y,
729 '1 0 0' * mi.x +
'0 0 1' * mi.z,
730 '1 0 0' * ma.x +
'0 0 1' * ma.z,
737 tracebox(
'0 0 1' * mi.z,
738 '1 0 0' * mi.x +
'0 1 0' * mi.y,
739 '1 0 0' * ma.x +
'0 1 0' * ma.y,
746 tracebox(
'1 0 0' * ma.x,
747 '0 1 0' * mi.y +
'0 0 1' * mi.z,
748 '0 1 0' * ma.y +
'0 0 1' * ma.z,
755 tracebox(
'0 1 0' * ma.y,
756 '1 0 0' * mi.x +
'0 0 1' * mi.z,
757 '1 0 0' * ma.x +
'0 0 1' * ma.z,
764 tracebox(
'0 0 1' * ma.z,
765 '1 0 0' * mi.x +
'0 1 0' * mi.y,
766 '1 0 0' * ma.x +
'0 1 0' * ma.y,
788 if(extend.y > extend.x)
790 mi_picmin.x -= (extend.y - extend.x) * 0.5;
791 mi_picmax.x += (extend.y - extend.x) * 0.5;
795 mi_picmin.y -= (extend.x - extend.y) * 0.5;
796 mi_picmax.y += (extend.x - extend.y) * 0.5;
812 mi_pictexcoord1_x = mi_pictexcoord0_x;
813 mi_pictexcoord1_y = mi_pictexcoord2_y;
814 mi_pictexcoord3_x = mi_pictexcoord2_x;
815 mi_pictexcoord3_y = mi_pictexcoord0_y;
821 float created_saved_value = 0;
823 if (!(tmp_cvar || tmp_value))
825 LOG_TRACE(
"Error: Invalid usage of cvar_settemp(string, string); !");
829 if(!cvar_type(tmp_cvar))
831 LOG_INFOF(
"Error: cvar %s doesn't exist!", tmp_cvar);
837 created_saved_value = -1;
841 if(created_saved_value != -1)
848 created_saved_value = 1;
854 return created_saved_value;
864 if(cvar_type(it.netname))
873 LOG_INFOF(
"Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.", it.netname);
880 if(cvar_type(e.netname))
887 print(sprintf(
"Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.", e.netname));
901 if(w(theText, theSize) <= maxWidth)
904 bool colors = (w(
"^7", theSize) == 0);
907 int len, left, right, middle;
909 right = len =
strlen(theText);
913 middle =
floor((left + right) / 2);
917 ofs = (res.x) ? res.x - res.y : 0;
920 if(w(
substring(theText, 0, middle + ofs), theSize) <= maxWidth)
925 while(left < right - 1);
937 if(w(theText) <= maxLength)
940 bool colors = (w(
"^7") == 0);
943 int len, left, right, middle;
945 right = len =
strlen(theText);
949 middle =
floor((left + right) / 2);
953 ofs = (!res.x) ? 0 : res.x - res.y;
956 if(w(
substring(theText, 0, middle + ofs)) <= maxLength)
961 while(left < right - 1);
972 for(
int i = len; i >= start; --i)
978 while (i-carets >= start &&
substring(s, i-carets, 1) ==
"^")
987 if(start == 0 && len == 1)
998 if(start == 0 && len == 4)
1080 bool take_next_char =
false;
1102 || (c >= 0x3000 && c <= 0x9fff)
1103 || (c >= 0xac00 && c <= 0xd7af)
1116 take_next_char =
true;
1138 else if (colorlen == 0)
1154 if (take_until <= 0 || take_until >=
strlen(s)) {
1159 float colorlen = tw(
"^7", theFontSize);
1174 if (take_until <= 0 || take_until >=
strlen(s)) {
1179 float colorlen = tw(
"^7");
1185 if(tw(theText, theFontSize) <= maxWidth)
1193 if(tw(theText) <= maxWidth)
1201 string subpattern, subpattern2, subpattern3, subpattern4;
1204 subpattern2 =
",teams,";
1206 subpattern2 =
",noteams,";
1208 subpattern3 =
",teamspawns,";
1210 subpattern3 =
",noteamspawns,";
1211 if(gt == MAPINFO_TYPE_RACE || gt == MAPINFO_TYPE_CTS)
1212 subpattern4 =
",race,";
1225 if(subpattern4 &&
strstrofs(
strcat(
",", pattern,
","), subpattern4, 0) >= 0)
1274 else if(solution.x > 0)
1278 ret =
normalize(eorg + solution.x * evel);
1280 else if(solution.y > 0)
1284 ret =
normalize(eorg + solution.y * evel);
1302 if(newton_style == 2)
1313 if(newton_style == 2)
1332 outspeed = solution.y;
1336 outspeed = solution.x;
1340 outspeed =
bound(spd * mi, outspeed, spd * ma);
1341 return mydir * outspeed;
1345 return myvel + spd * mydir;
1362 int rx_neg = (v.x < 0) ? 1 : 0;
1363 int ry_neg = (v.y < 0) ? 1 : 0;
1364 int rz_neg = (v.z < 0) ? 1 : 0;
1371 rx =
bound(0, rx, 255);
1376 ry =
bound(0, ry, 63);
1381 rz =
bound(0, rz, 63);
1383 ry |= ry_neg *
BIT(6) + rx_neg *
BIT(7);
1384 rz |= rz_neg *
BIT(6);
1385 return rx * 0x10000 + ry * 0x100 + rz;
1391 v.y = (f & 0xFF00) >> 8;
1394 if (v.y &
BIT(7)) { v.y &=
~BIT(7); v.x *= -1; }
1395 if (v.y &
BIT(6)) { v.y &=
~BIT(6); v.y *= -1; }
1396 if (v.z &
BIT(6)) { v.z &=
~BIT(6); v.z *= -1; }
1404 float healthdamage, armordamage, armorideal;
1405 if (
DEATH_IS(deathtype, DEATH_DROWN))
1408 healthdamage = (h - 1) / (1 - armorblock);
1409 armordamage = a + (h - 1);
1410 armorideal = healthdamage * armorblock;
1412 if(armordamage < healthdamage)
1428 if (
DEATH_IS(deathtype, DEATH_DROWN))
1432 v.y =
bound(0, damage * armorblock, a);
1433 v.x =
bound(0, damage - v.y, damage);
1456 t =
car(acl); acl =
cdr(acl);
1496 m =
"models/player/*_";
1501 return strcat(m,
".", fil);
1558 while((s =
fgets(fh)))
1579 if (s ==
"Male") s = _(
"Male");
1580 else if (s ==
"Female") s = _(
"Female");
1581 else if (s ==
"Undisclosed") s = _(
"Undisclosed");
1588 if(c ==
"description")
1590 if(c ==
"bone_upperbody")
1592 if(c ==
"bone_weapon")
1609 while((s =
fgets(fh)))
1628 if (key ==
"<KEY NOT FOUND>")
return _(
"<KEY NOT FOUND>");
1629 if (key ==
"<UNKNOWN KEYNUM>")
return _(
"<UNKNOWN KEYNUM>");
1634 case "TAB":
return _(
"TAB");
1635 case "ENTER":
return _(
"ENTER");
1636 case "ESCAPE":
return _(
"ESCAPE");
1637 case "SPACE":
return _(
"SPACE");
1639 case "BACKSPACE":
return _(
"BACKSPACE");
1640 case "UPARROW":
return _(
"UPARROW");
1641 case "DOWNARROW":
return _(
"DOWNARROW");
1642 case "LEFTARROW":
return _(
"LEFTARROW");
1643 case "RIGHTARROW":
return _(
"RIGHTARROW");
1645 case "ALT":
return _(
"ALT");
1646 case "CTRL":
return _(
"CTRL");
1647 case "SHIFT":
return _(
"SHIFT");
1649 case "INS":
return _(
"INS");
1650 case "DEL":
return _(
"DEL");
1651 case "PGDN":
return _(
"PGDN");
1652 case "PGUP":
return _(
"PGUP");
1653 case "HOME":
return _(
"HOME");
1654 case "END":
return _(
"END");
1656 case "PAUSE":
return _(
"PAUSE");
1658 case "NUMLOCK":
return _(
"NUMLOCK");
1659 case "CAPSLOCK":
return _(
"CAPSLOCK");
1660 case "SCROLLOCK":
return _(
"SCROLLOCK");
1662 case "SEMICOLON":
return _(
"SEMICOLON");
1663 case "TILDE":
return _(
"TILDE");
1664 case "BACKQUOTE":
return _(
"BACKQUOTE");
1665 case "QUOTE":
return _(
"QUOTE");
1666 case "APOSTROPHE":
return _(
"APOSTROPHE");
1667 case "BACKSLASH":
return _(
"BACKSLASH");
1675 return sprintf(_(
"F%d"),
stof(subkey));
1685 return sprintf(_(
"KP_%d"),
stof(subkey));
1690 case "INS":
return sprintf(_(
"KP_%s"), _(
"INS"));
1691 case "END":
return sprintf(_(
"KP_%s"), _(
"END"));
1692 case "DOWNARROW":
return sprintf(_(
"KP_%s"), _(
"DOWNARROW"));
1693 case "PGDN":
return sprintf(_(
"KP_%s"), _(
"PGDN"));
1694 case "LEFTARROW":
return sprintf(_(
"KP_%s"), _(
"LEFTARROW"));
1695 case "RIGHTARROW":
return sprintf(_(
"KP_%s"), _(
"RIGHTARROW"));
1696 case "HOME":
return sprintf(_(
"KP_%s"), _(
"HOME"));
1697 case "UPARROW":
return sprintf(_(
"KP_%s"), _(
"UPARROW"));
1698 case "PGUP":
return sprintf(_(
"KP_%s"), _(
"PGUP"));
1699 case "PERIOD":
return sprintf(_(
"KP_%s"), _(
"PERIOD"));
1700 case "DEL":
return sprintf(_(
"KP_%s"), _(
"DEL"));
1701 case "DIVIDE":
return sprintf(_(
"KP_%s"), _(
"DIVIDE"));
1702 case "SLASH":
return sprintf(_(
"KP_%s"), _(
"SLASH"));
1703 case "MULTIPLY":
return sprintf(_(
"KP_%s"), _(
"MULTIPLY"));
1704 case "MINUS":
return sprintf(_(
"KP_%s"), _(
"MINUS"));
1705 case "PLUS":
return sprintf(_(
"KP_%s"), _(
"PLUS"));
1706 case "ENTER":
return sprintf(_(
"KP_%s"), _(
"ENTER"));
1707 case "EQUALS":
return sprintf(_(
"KP_%s"), _(
"EQUALS"));
1708 default:
return key;
1712 if (key ==
"PRINTSCREEN")
return _(
"PRINTSCREEN");
1717 if (key ==
"MWHEELUP")
return _(
"MWHEELUP");
1718 if (key ==
"MWHEELDOWN")
return _(
"MWHEELDOWN");
1731 case "DPAD_UP":
return sprintf(_(
"X360_%s"), _(
"DPAD_UP"));
1732 case "DPAD_DOWN":
return sprintf(_(
"X360_%s"), _(
"DPAD_DOWN"));
1733 case "DPAD_LEFT":
return sprintf(_(
"X360_%s"), _(
"DPAD_LEFT"));
1734 case "DPAD_RIGHT":
return sprintf(_(
"X360_%s"), _(
"DPAD_RIGHT"));
1735 case "START":
return sprintf(_(
"X360_%s"), _(
"START"));
1736 case "BACK":
return sprintf(_(
"X360_%s"), _(
"BACK"));
1737 case "LEFT_THUMB":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB"));
1738 case "RIGHT_THUMB":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB"));
1739 case "LEFT_SHOULDER":
return sprintf(_(
"X360_%s"), _(
"LEFT_SHOULDER"));
1740 case "RIGHT_SHOULDER":
return sprintf(_(
"X360_%s"), _(
"RIGHT_SHOULDER"));
1741 case "LEFT_TRIGGER":
return sprintf(_(
"X360_%s"), _(
"LEFT_TRIGGER"));
1742 case "RIGHT_TRIGGER":
return sprintf(_(
"X360_%s"), _(
"RIGHT_TRIGGER"));
1743 case "LEFT_THUMB_UP":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_UP"));
1744 case "LEFT_THUMB_DOWN":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_DOWN"));
1745 case "LEFT_THUMB_LEFT":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_LEFT"));
1746 case "LEFT_THUMB_RIGHT":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_RIGHT"));
1747 case "RIGHT_THUMB_UP":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_UP"));
1748 case "RIGHT_THUMB_DOWN":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_DOWN"));
1749 case "RIGHT_THUMB_LEFT":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_LEFT"));
1750 case "RIGHT_THUMB_RIGHT":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_RIGHT"));
1751 default:
return key;
1760 case "UP":
return sprintf(_(
"JOY_%s"), _(
"UP"));
1761 case "DOWN":
return sprintf(_(
"JOY_%s"), _(
"DOWN"));
1762 case "LEFT":
return sprintf(_(
"JOY_%s"), _(
"LEFT"));
1763 case "RIGHT":
return sprintf(_(
"JOY_%s"), _(
"RIGHT"));
1764 default:
return key;
1769 return sprintf(_(
"MIDINOTE%d"),
stof(
substring(key, 8, -1)));
1780 d = f % 22; f =
floor(f / 22);
1781 c = f % 22; f =
floor(f / 22);
1782 b = f % 22; f =
floor(f / 22);
1803 if(a < 0 || b < 0 || c < 0 || d < 0)
1805 return ((a * 22 + b) * 22 + c) * 22 + d;
1830 LOG_INFO(
"Recursive shutdown detected! Only restoring cvars...");
1846 if(e.skeleton_bones_index == e.modelindex)
1849 float skelindex = skel_create(e.modelindex);
1850 e.skeleton_bones = skel_get_numbones(skelindex);
1851 skel_delete(skelindex);
1852 e.skeleton_bones_index = e.modelindex;
1877 entity queue_start, queue_end;
1883 if(e.FindConnectedComponent_processing)
1884 error(
"recursion or broken cleanup");
1887 queue_start = queue_end = e;
1888 queue_end.(fld) =
NULL;
1889 queue_end.FindConnectedComponent_processing = 1;
1892 for (; queue_start; queue_start = queue_start.(fld))
1896 for(t =
NULL; (t = nxt(t, queue_start,
pass)); )
1898 if(t.FindConnectedComponent_processing)
1900 if(iscon(t, queue_start,
pass))
1903 queue_end.(fld) = t;
1905 queue_end.(fld) =
NULL;
1906 queue_end.FindConnectedComponent_processing = 1;
1912 for (queue_start = e; queue_start; queue_start = queue_start.(fld))
1913 queue_start.FindConnectedComponent_processing = 0;
1922 float dur = frameduration(e.modelindex, a.x);
1923 if (dur <= 0 && b.y)
1926 dur = frameduration(e.modelindex, a.x);
1945 case 10:
return ANNCE_NUM_GAMESTART_10;
1946 case 9:
return ANNCE_NUM_GAMESTART_9;
1947 case 8:
return ANNCE_NUM_GAMESTART_8;
1948 case 7:
return ANNCE_NUM_GAMESTART_7;
1949 case 6:
return ANNCE_NUM_GAMESTART_6;
1950 case 5:
return ANNCE_NUM_GAMESTART_5;
1951 case 4:
return ANNCE_NUM_GAMESTART_4;
1952 case 3:
return ANNCE_NUM_GAMESTART_3;
1953 case 2:
return ANNCE_NUM_GAMESTART_2;
1954 case 1:
return ANNCE_NUM_GAMESTART_1;
1962 case 10:
return ANNCE_NUM_KILL_10;
1963 case 9:
return ANNCE_NUM_KILL_9;
1964 case 8:
return ANNCE_NUM_KILL_8;
1965 case 7:
return ANNCE_NUM_KILL_7;
1966 case 6:
return ANNCE_NUM_KILL_6;
1967 case 5:
return ANNCE_NUM_KILL_5;
1968 case 4:
return ANNCE_NUM_KILL_4;
1969 case 3:
return ANNCE_NUM_KILL_3;
1970 case 2:
return ANNCE_NUM_KILL_2;
1971 case 1:
return ANNCE_NUM_KILL_1;
1979 case 10:
return ANNCE_NUM_RESPAWN_10;
1980 case 9:
return ANNCE_NUM_RESPAWN_9;
1981 case 8:
return ANNCE_NUM_RESPAWN_8;
1982 case 7:
return ANNCE_NUM_RESPAWN_7;
1983 case 6:
return ANNCE_NUM_RESPAWN_6;
1984 case 5:
return ANNCE_NUM_RESPAWN_5;
1985 case 4:
return ANNCE_NUM_RESPAWN_4;
1986 case 3:
return ANNCE_NUM_RESPAWN_3;
1987 case 2:
return ANNCE_NUM_RESPAWN_2;
1988 case 1:
return ANNCE_NUM_RESPAWN_1;
1996 case 10:
return ANNCE_NUM_ROUNDSTART_10;
1997 case 9:
return ANNCE_NUM_ROUNDSTART_9;
1998 case 8:
return ANNCE_NUM_ROUNDSTART_8;
1999 case 7:
return ANNCE_NUM_ROUNDSTART_7;
2000 case 6:
return ANNCE_NUM_ROUNDSTART_6;
2001 case 5:
return ANNCE_NUM_ROUNDSTART_5;
2002 case 4:
return ANNCE_NUM_ROUNDSTART_4;
2003 case 3:
return ANNCE_NUM_ROUNDSTART_3;
2004 case 2:
return ANNCE_NUM_ROUNDSTART_2;
2005 case 1:
return ANNCE_NUM_ROUNDSTART_1;
2014 case 10:
return ANNCE_NUM_10;
2015 case 9:
return ANNCE_NUM_9;
2016 case 8:
return ANNCE_NUM_8;
2017 case 7:
return ANNCE_NUM_7;
2018 case 6:
return ANNCE_NUM_6;
2019 case 5:
return ANNCE_NUM_5;
2020 case 4:
return ANNCE_NUM_4;
2021 case 3:
return ANNCE_NUM_3;
2022 case 2:
return ANNCE_NUM_2;
2023 case 1:
return ANNCE_NUM_1;
2034 switch(nativecontents)
2071 vector org, t_forward, t_left, t_up, e_forward, e_up;
2078 t_up =
v_up * tagscale;
2080 e.origin_x =
org * t_forward;
2081 e.origin_y =
org * t_left;
2082 e.origin_z =
org * t_up;
2095 e_up.x =
v_up * t_forward;
2096 e_up.y =
v_up * t_left;
2097 e_up.z =
v_up * t_up;
2105 setattachment(e, to, tag);
2106 setorigin(e, e.origin);
2118 setattachment(e,
NULL,
"");
2119 setorigin(e, e.origin);
2126 e.punchangle = to.angles;
2127 e.view_ofs = e.origin - to.origin;
2128 e.v_angle = e.angles - to.angles;
2133void unfollow_sameorigin(
entity e)
2146 ent.punchangle = e.angles;
2147 ent.view_ofs = ent.origin - e.origin;
2148 ent.v_angle = ent.angles - e.angles;
2149 ent.aiment_classname = e.classname;
2150 ent.aiment_deadflag = e.deadflag;
2155 ent.view_ofs.x =
bound(pl.mins.x + 4, ent.view_ofs.x, pl.maxs.x - 4);
2156 ent.view_ofs.y =
bound(pl.mins.y + 4, ent.view_ofs.y, pl.maxs.y - 4);
2157 ent.view_ofs.z =
bound(pl.mins.z + 4, ent.view_ofs.z, pl.maxs.z - 4);
2182 if(ent.aiment.classname != ent.aiment_classname || ent.aiment.deadflag != ent.aiment_deadflag)
2193 bool do_colorize = (
teamplay && team_colorize);
2201 return strcat(t, strdecolorize(thename));
2282 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)
entity(entity cur, entity near, entity pass) findNextEntityNearFunction_t
float get_model_parameters_weight
float get_model_parameters_fixbone
string get_model_parameters_sex
float get_model_parameters_species
string getWrappedLine_remaining
float(entity a, entity b, entity pass) isConnectedFunction_t
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
float(string s, vector size) textLengthUpToWidth_widthFunction_t
string get_model_parameters_bone_aim[MAX_AIM_BONES]
IntrusiveList g_saved_cvars
float get_model_parameters_age
float(string s) textLengthUpToLength_lenFunction_t
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
ignore armor calculations
#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)
Returns 0 if pos is NOT in the middle or at the end of a color code otherwise it returns a vector wit...
string Team_ColorCode(int teamid)
const int WEP_FLAG_SPECIALATTACK