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);
215 #define PRECACHE_PIC precache_pic
216 #define SKIN_PATH hud_skin_path
219 #define PRECACHE_PIC draw_PreloadPicture
220 #define SKIN_PATH (strreplace("gfx/menu", "gfx/hud", draw_currentSkin))
226string icon_path_from_HUDskin(
string theIcon)
233 img = sprintf(
"/gfx/hud/default/%s", theIcon);
244 string img =
strcat(
"/", draw_currentSkin,
"/", theIcon);
246 img = sprintf(
"/gfx/menu/wickedx/%s", theIcon);
277 static bool already_called =
false;
278 if (!already_called && !
isdemo())
279 localcmd(
"\ncl_hook_mutator_all\n");
283 for (
int i = 0; i < n; ++i)
285 #define X(name, translated_name, cl_hook, mut) \
287 s2 = cons_mid(s2, ", ", translated_name); \
288 mut_set_active(mut); \
289 if (!already_called && !isdemo() && cl_hook != "") \
290 localcmd("\n", cl_hook, "\n"); \
295 X(
"InstaGib" , _(
"InstaGib") ,
"cl_hook_mutator_instagib" ,
MUT_INSTAGIB)
309 X(
"Jetpack" , _(
"Jetpack") ,
"cl_hook_mutator_jetpack" ,
MUT_JETPACK)
310 X(
"Overkill" , _(
"Overkill") ,
"cl_hook_mutator_overkill" ,
MUT_OVERKILL)
323 already_called =
true;
331 float lleft, i, j, wlen;
336 for (i = 0; i < len; ++i)
359 for (j = i+1; j < len; ++j)
428 pValue =
floor(pValue + 0.5);
439 valstr =
ftos(pValue);
471 m =
floor((l + r) / 2);
491 float p = (data & 0xF000) / 0x1000;
492 float q = (data & 0x0F80) / 0x80;
493 int len = (data & 0x007F);
510 float cos_p =
cos(p);
511 out.x =
cos(q) * cos_p;
512 out.y =
sin(q) * cos_p;
532 if(
ang.x < -90 &&
ang.x > +90)
533 error(
"BOGUS vectoangles");
536 p =
floor(0.5 + (
ang.x + 90) * (16 / 180)) & 15;
545 y =
floor(0.5 +
ang.y * (32 / 360)) & 31;
550 return (p * 0x1000) + (
y * 0x80) + len;
556 float f = (2 ** (1/8));
558 for(i = 0; i < 128; ++i)
564 if(
cvar(
"developer") > 0)
566 LOG_TRACE(
"Verifying vector compression table...");
567 for(i = 0x0F00; i < 0xFFFF; ++i)
571 "BROKEN vector compression: %s -> %s -> %s",
584 traceline(v0, v0 + dvx,
true, forent);
if(
trace_fraction < 1)
return 0;
585 traceline(v0, v0 + dvy,
true, forent);
if(
trace_fraction < 1)
return 0;
586 traceline(v0, v0 + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
587 traceline(v0 + dvx, v0 + dvx + dvy,
true, forent);
if(
trace_fraction < 1)
return 0;
588 traceline(v0 + dvx, v0 + dvx + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
589 traceline(v0 + dvy, v0 + dvy + dvx,
true, forent);
if(
trace_fraction < 1)
return 0;
590 traceline(v0 + dvy, v0 + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
591 traceline(v0 + dvz, v0 + dvz + dvx,
true, forent);
if(
trace_fraction < 1)
return 0;
592 traceline(v0 + dvz, v0 + dvz + dvy,
true, forent);
if(
trace_fraction < 1)
return 0;
593 traceline(v0 + dvx + dvy, v0 + dvx + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
594 traceline(v0 + dvx + dvz, v0 + dvx + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
595 traceline(v0 + dvy + dvz, v0 + dvx + dvy + dvz,
true, forent);
if(
trace_fraction < 1)
return 0;
600string fixPriorityList(
string order,
float from,
float to,
float subtract,
float complete)
607 for(i = 0; i < n; ++i)
612 if(w >= from && w <= to)
617 if(w >= from && w <= to)
626 for(w = to; w >= from; --w)
631 for(i = 0; i < n; ++i)
647 for(
float i = 0; i < n; ++i)
648 neworder =
strcat(neworder, mapfunc(
argv(i)),
" ");
657 if(i >= 0 && i < n && j >= 0 && j < n && i != j)
660 for(
float w = 0; w < n; ++w)
709 tracebox(
'1 0 0' * mi.x,
710 '0 1 0' * mi.y +
'0 0 1' * mi.z,
711 '0 1 0' * ma.y +
'0 0 1' * ma.z,
718 tracebox(
'0 1 0' * mi.y,
719 '1 0 0' * mi.x +
'0 0 1' * mi.z,
720 '1 0 0' * ma.x +
'0 0 1' * ma.z,
727 tracebox(
'0 0 1' * mi.z,
728 '1 0 0' * mi.x +
'0 1 0' * mi.y,
729 '1 0 0' * ma.x +
'0 1 0' * ma.y,
736 tracebox(
'1 0 0' * ma.x,
737 '0 1 0' * mi.y +
'0 0 1' * mi.z,
738 '0 1 0' * ma.y +
'0 0 1' * ma.z,
745 tracebox(
'0 1 0' * ma.y,
746 '1 0 0' * mi.x +
'0 0 1' * mi.z,
747 '1 0 0' * ma.x +
'0 0 1' * ma.z,
754 tracebox(
'0 0 1' * ma.z,
755 '1 0 0' * mi.x +
'0 1 0' * mi.y,
756 '1 0 0' * ma.x +
'0 1 0' * ma.y,
778 if(extend.y > extend.x)
780 mi_picmin.x -= (extend.y - extend.x) * 0.5;
781 mi_picmax.x += (extend.y - extend.x) * 0.5;
785 mi_picmin.y -= (extend.x - extend.y) * 0.5;
786 mi_picmax.y += (extend.x - extend.y) * 0.5;
802 mi_pictexcoord1_x = mi_pictexcoord0_x;
803 mi_pictexcoord1_y = mi_pictexcoord2_y;
804 mi_pictexcoord3_x = mi_pictexcoord2_x;
805 mi_pictexcoord3_y = mi_pictexcoord0_y;
811 float created_saved_value = 0;
813 if (!(tmp_cvar || tmp_value))
815 LOG_TRACE(
"Error: Invalid usage of cvar_settemp(string, string); !");
819 if(!cvar_type(tmp_cvar))
821 LOG_INFOF(
"Error: cvar %s doesn't exist!", tmp_cvar);
827 created_saved_value = -1;
831 if(created_saved_value != -1)
838 created_saved_value = 1;
844 return created_saved_value;
854 if(cvar_type(it.netname))
863 LOG_INFOF(
"Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.", it.netname);
870 if(cvar_type(e.netname))
877 print(sprintf(
"Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.", e.netname));
891 if(w(theText, theSize) <= maxWidth)
894 bool colors = (w(
"^7", theSize) == 0);
897 int len, left, right, middle;
899 right = len =
strlen(theText);
903 middle =
floor((left + right) / 2);
907 ofs = (res.x) ? res.x - res.y : 0;
910 if(w(
substring(theText, 0, middle + ofs), theSize) <= maxWidth)
915 while(left < right - 1);
927 if(w(theText) <= maxLength)
930 bool colors = (w(
"^7") == 0);
933 int len, left, right, middle;
935 right = len =
strlen(theText);
939 middle =
floor((left + right) / 2);
943 ofs = (!res.x) ? 0 : res.x - res.y;
946 if(w(
substring(theText, 0, middle + ofs)) <= maxLength)
951 while(left < right - 1);
962 for(
int i = len; i >= start; --i)
968 while (i-carets >= start &&
substring(s, i-carets, 1) ==
"^")
977 if(start == 0 && len == 1)
988 if(start == 0 && len == 4)
1070 bool take_next_char =
false;
1092 || (c >= 0x3000 && c <= 0x9fff)
1093 || (c >= 0xac00 && c <= 0xd7af)
1106 take_next_char =
true;
1128 else if (colorlen == 0)
1144 if (take_until <= 0 || take_until >=
strlen(s)) {
1149 float colorlen = tw(
"^7", theFontSize);
1164 if (take_until <= 0 || take_until >=
strlen(s)) {
1169 float colorlen = tw(
"^7");
1175 if(tw(theText, theFontSize) <= maxWidth)
1183 if(tw(theText) <= maxWidth)
1191 string subpattern, subpattern2, subpattern3, subpattern4;
1194 subpattern2 =
",teams,";
1196 subpattern2 =
",noteams,";
1198 subpattern3 =
",teamspawns,";
1200 subpattern3 =
",noteamspawns,";
1201 if(gt == MAPINFO_TYPE_RACE || gt == MAPINFO_TYPE_CTS)
1202 subpattern4 =
",race,";
1215 if(subpattern4 &&
strstrofs(
strcat(
",", pattern,
","), subpattern4, 0) >= 0)
1264 else if(solution.x > 0)
1268 ret =
normalize(eorg + solution.x * evel);
1270 else if(solution.y > 0)
1274 ret =
normalize(eorg + solution.y * evel);
1292 if(newton_style == 2)
1303 if(newton_style == 2)
1322 outspeed = solution.y;
1326 outspeed = solution.x;
1330 outspeed =
bound(spd * mi, outspeed, spd * ma);
1331 return mydir * outspeed;
1335 return myvel + spd * mydir;
1352 int rx_neg = (v.x < 0) ? 1 : 0;
1353 int ry_neg = (v.y < 0) ? 1 : 0;
1354 int rz_neg = (v.z < 0) ? 1 : 0;
1361 rx =
bound(0, rx, 255);
1366 ry =
bound(0, ry, 63);
1371 rz =
bound(0, rz, 63);
1373 ry |= ry_neg *
BIT(6) + rx_neg *
BIT(7);
1374 rz |= rz_neg *
BIT(6);
1375 return rx * 0x10000 + ry * 0x100 + rz;
1381 v.y = (f & 0xFF00) >> 8;
1384 if (v.y &
BIT(7)) { v.y &=
~BIT(7); v.x *= -1; }
1385 if (v.y &
BIT(6)) { v.y &=
~BIT(6); v.y *= -1; }
1386 if (v.z &
BIT(6)) { v.z &=
~BIT(6); v.z *= -1; }
1394 float healthdamage, armordamage, armorideal;
1395 if (
DEATH_IS(deathtype, DEATH_DROWN))
1398 healthdamage = (h - 1) / (1 - armorblock);
1399 armordamage = a + (h - 1);
1400 armorideal = healthdamage * armorblock;
1402 if(armordamage < healthdamage)
1418 if (
DEATH_IS(deathtype, DEATH_DROWN))
1422 v.y =
bound(0, damage * armorblock, a);
1423 v.x =
bound(0, damage - v.y, h);
1446 t =
car(acl); acl =
cdr(acl);
1486 m =
"models/player/*_";
1491 return strcat(m,
".", fil);
1548 while((s =
fgets(fh)))
1569 if (s ==
"Male") s = _(
"Male");
1570 else if (s ==
"Female") s = _(
"Female");
1571 else if (s ==
"Undisclosed") s = _(
"Undisclosed");
1578 if(c ==
"description")
1580 if(c ==
"bone_upperbody")
1582 if(c ==
"bone_weapon")
1599 while((s =
fgets(fh)))
1618 if (key ==
"<KEY NOT FOUND>")
return _(
"<KEY NOT FOUND>");
1619 if (key ==
"<UNKNOWN KEYNUM>")
return _(
"<UNKNOWN KEYNUM>");
1624 case "TAB":
return _(
"TAB");
1625 case "ENTER":
return _(
"ENTER");
1626 case "ESCAPE":
return _(
"ESCAPE");
1627 case "SPACE":
return _(
"SPACE");
1629 case "BACKSPACE":
return _(
"BACKSPACE");
1630 case "UPARROW":
return _(
"UPARROW");
1631 case "DOWNARROW":
return _(
"DOWNARROW");
1632 case "LEFTARROW":
return _(
"LEFTARROW");
1633 case "RIGHTARROW":
return _(
"RIGHTARROW");
1635 case "ALT":
return _(
"ALT");
1636 case "CTRL":
return _(
"CTRL");
1637 case "SHIFT":
return _(
"SHIFT");
1639 case "INS":
return _(
"INS");
1640 case "DEL":
return _(
"DEL");
1641 case "PGDN":
return _(
"PGDN");
1642 case "PGUP":
return _(
"PGUP");
1643 case "HOME":
return _(
"HOME");
1644 case "END":
return _(
"END");
1646 case "PAUSE":
return _(
"PAUSE");
1648 case "NUMLOCK":
return _(
"NUMLOCK");
1649 case "CAPSLOCK":
return _(
"CAPSLOCK");
1650 case "SCROLLOCK":
return _(
"SCROLLOCK");
1652 case "SEMICOLON":
return _(
"SEMICOLON");
1653 case "TILDE":
return _(
"TILDE");
1654 case "BACKQUOTE":
return _(
"BACKQUOTE");
1655 case "QUOTE":
return _(
"QUOTE");
1656 case "APOSTROPHE":
return _(
"APOSTROPHE");
1657 case "BACKSLASH":
return _(
"BACKSLASH");
1665 return sprintf(_(
"F%d"),
stof(subkey));
1675 return sprintf(_(
"KP_%d"),
stof(subkey));
1680 case "INS":
return sprintf(_(
"KP_%s"), _(
"INS"));
1681 case "END":
return sprintf(_(
"KP_%s"), _(
"END"));
1682 case "DOWNARROW":
return sprintf(_(
"KP_%s"), _(
"DOWNARROW"));
1683 case "PGDN":
return sprintf(_(
"KP_%s"), _(
"PGDN"));
1684 case "LEFTARROW":
return sprintf(_(
"KP_%s"), _(
"LEFTARROW"));
1685 case "RIGHTARROW":
return sprintf(_(
"KP_%s"), _(
"RIGHTARROW"));
1686 case "HOME":
return sprintf(_(
"KP_%s"), _(
"HOME"));
1687 case "UPARROW":
return sprintf(_(
"KP_%s"), _(
"UPARROW"));
1688 case "PGUP":
return sprintf(_(
"KP_%s"), _(
"PGUP"));
1689 case "PERIOD":
return sprintf(_(
"KP_%s"), _(
"PERIOD"));
1690 case "DEL":
return sprintf(_(
"KP_%s"), _(
"DEL"));
1691 case "DIVIDE":
return sprintf(_(
"KP_%s"), _(
"DIVIDE"));
1692 case "SLASH":
return sprintf(_(
"KP_%s"), _(
"SLASH"));
1693 case "MULTIPLY":
return sprintf(_(
"KP_%s"), _(
"MULTIPLY"));
1694 case "MINUS":
return sprintf(_(
"KP_%s"), _(
"MINUS"));
1695 case "PLUS":
return sprintf(_(
"KP_%s"), _(
"PLUS"));
1696 case "ENTER":
return sprintf(_(
"KP_%s"), _(
"ENTER"));
1697 case "EQUALS":
return sprintf(_(
"KP_%s"), _(
"EQUALS"));
1698 default:
return key;
1702 if (key ==
"PRINTSCREEN")
return _(
"PRINTSCREEN");
1707 if (key ==
"MWHEELUP")
return _(
"MWHEELUP");
1708 if (key ==
"MWHEELDOWN")
return _(
"MWHEELDOWN");
1721 case "DPAD_UP":
return sprintf(_(
"X360_%s"), _(
"DPAD_UP"));
1722 case "DPAD_DOWN":
return sprintf(_(
"X360_%s"), _(
"DPAD_DOWN"));
1723 case "DPAD_LEFT":
return sprintf(_(
"X360_%s"), _(
"DPAD_LEFT"));
1724 case "DPAD_RIGHT":
return sprintf(_(
"X360_%s"), _(
"DPAD_RIGHT"));
1725 case "START":
return sprintf(_(
"X360_%s"), _(
"START"));
1726 case "BACK":
return sprintf(_(
"X360_%s"), _(
"BACK"));
1727 case "LEFT_THUMB":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB"));
1728 case "RIGHT_THUMB":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB"));
1729 case "LEFT_SHOULDER":
return sprintf(_(
"X360_%s"), _(
"LEFT_SHOULDER"));
1730 case "RIGHT_SHOULDER":
return sprintf(_(
"X360_%s"), _(
"RIGHT_SHOULDER"));
1731 case "LEFT_TRIGGER":
return sprintf(_(
"X360_%s"), _(
"LEFT_TRIGGER"));
1732 case "RIGHT_TRIGGER":
return sprintf(_(
"X360_%s"), _(
"RIGHT_TRIGGER"));
1733 case "LEFT_THUMB_UP":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_UP"));
1734 case "LEFT_THUMB_DOWN":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_DOWN"));
1735 case "LEFT_THUMB_LEFT":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_LEFT"));
1736 case "LEFT_THUMB_RIGHT":
return sprintf(_(
"X360_%s"), _(
"LEFT_THUMB_RIGHT"));
1737 case "RIGHT_THUMB_UP":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_UP"));
1738 case "RIGHT_THUMB_DOWN":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_DOWN"));
1739 case "RIGHT_THUMB_LEFT":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_LEFT"));
1740 case "RIGHT_THUMB_RIGHT":
return sprintf(_(
"X360_%s"), _(
"RIGHT_THUMB_RIGHT"));
1741 default:
return key;
1750 case "UP":
return sprintf(_(
"JOY_%s"), _(
"UP"));
1751 case "DOWN":
return sprintf(_(
"JOY_%s"), _(
"DOWN"));
1752 case "LEFT":
return sprintf(_(
"JOY_%s"), _(
"LEFT"));
1753 case "RIGHT":
return sprintf(_(
"JOY_%s"), _(
"RIGHT"));
1754 default:
return key;
1759 return sprintf(_(
"MIDINOTE%d"),
stof(
substring(key, 8, -1)));
1770 d = f % 22; f =
floor(f / 22);
1771 c = f % 22; f =
floor(f / 22);
1772 b = f % 22; f =
floor(f / 22);
1793 if(a < 0 || b < 0 || c < 0 || d < 0)
1795 return ((a * 22 + b) * 22 + c) * 22 + d;
1820 LOG_INFO(
"Recursive shutdown detected! Only restoring cvars...");
1836 if(e.skeleton_bones_index == e.modelindex)
1839 float skelindex = skel_create(e.modelindex);
1840 e.skeleton_bones = skel_get_numbones(skelindex);
1841 skel_delete(skelindex);
1842 e.skeleton_bones_index = e.modelindex;
1867 entity queue_start, queue_end;
1873 if(e.FindConnectedComponent_processing)
1874 error(
"recursion or broken cleanup");
1877 queue_start = queue_end = e;
1878 queue_end.(fld) =
NULL;
1879 queue_end.FindConnectedComponent_processing = 1;
1882 for (; queue_start; queue_start = queue_start.(fld))
1886 for(t =
NULL; (t = nxt(t, queue_start,
pass)); )
1888 if(t.FindConnectedComponent_processing)
1890 if(iscon(t, queue_start,
pass))
1893 queue_end.(fld) = t;
1895 queue_end.(fld) =
NULL;
1896 queue_end.FindConnectedComponent_processing = 1;
1902 for (queue_start = e; queue_start; queue_start = queue_start.(fld))
1903 queue_start.FindConnectedComponent_processing = 0;
1912 float dur = frameduration(e.modelindex, a.x);
1913 if (dur <= 0 && b.y)
1916 dur = frameduration(e.modelindex, a.x);
1935 case 10:
return ANNCE_NUM_GAMESTART_10;
1936 case 9:
return ANNCE_NUM_GAMESTART_9;
1937 case 8:
return ANNCE_NUM_GAMESTART_8;
1938 case 7:
return ANNCE_NUM_GAMESTART_7;
1939 case 6:
return ANNCE_NUM_GAMESTART_6;
1940 case 5:
return ANNCE_NUM_GAMESTART_5;
1941 case 4:
return ANNCE_NUM_GAMESTART_4;
1942 case 3:
return ANNCE_NUM_GAMESTART_3;
1943 case 2:
return ANNCE_NUM_GAMESTART_2;
1944 case 1:
return ANNCE_NUM_GAMESTART_1;
1952 case 10:
return ANNCE_NUM_KILL_10;
1953 case 9:
return ANNCE_NUM_KILL_9;
1954 case 8:
return ANNCE_NUM_KILL_8;
1955 case 7:
return ANNCE_NUM_KILL_7;
1956 case 6:
return ANNCE_NUM_KILL_6;
1957 case 5:
return ANNCE_NUM_KILL_5;
1958 case 4:
return ANNCE_NUM_KILL_4;
1959 case 3:
return ANNCE_NUM_KILL_3;
1960 case 2:
return ANNCE_NUM_KILL_2;
1961 case 1:
return ANNCE_NUM_KILL_1;
1969 case 10:
return ANNCE_NUM_RESPAWN_10;
1970 case 9:
return ANNCE_NUM_RESPAWN_9;
1971 case 8:
return ANNCE_NUM_RESPAWN_8;
1972 case 7:
return ANNCE_NUM_RESPAWN_7;
1973 case 6:
return ANNCE_NUM_RESPAWN_6;
1974 case 5:
return ANNCE_NUM_RESPAWN_5;
1975 case 4:
return ANNCE_NUM_RESPAWN_4;
1976 case 3:
return ANNCE_NUM_RESPAWN_3;
1977 case 2:
return ANNCE_NUM_RESPAWN_2;
1978 case 1:
return ANNCE_NUM_RESPAWN_1;
1986 case 10:
return ANNCE_NUM_ROUNDSTART_10;
1987 case 9:
return ANNCE_NUM_ROUNDSTART_9;
1988 case 8:
return ANNCE_NUM_ROUNDSTART_8;
1989 case 7:
return ANNCE_NUM_ROUNDSTART_7;
1990 case 6:
return ANNCE_NUM_ROUNDSTART_6;
1991 case 5:
return ANNCE_NUM_ROUNDSTART_5;
1992 case 4:
return ANNCE_NUM_ROUNDSTART_4;
1993 case 3:
return ANNCE_NUM_ROUNDSTART_3;
1994 case 2:
return ANNCE_NUM_ROUNDSTART_2;
1995 case 1:
return ANNCE_NUM_ROUNDSTART_1;
2004 case 10:
return ANNCE_NUM_10;
2005 case 9:
return ANNCE_NUM_9;
2006 case 8:
return ANNCE_NUM_8;
2007 case 7:
return ANNCE_NUM_7;
2008 case 6:
return ANNCE_NUM_6;
2009 case 5:
return ANNCE_NUM_5;
2010 case 4:
return ANNCE_NUM_4;
2011 case 3:
return ANNCE_NUM_3;
2012 case 2:
return ANNCE_NUM_2;
2013 case 1:
return ANNCE_NUM_1;
2024 switch(nativecontents)
2061 vector org, t_forward, t_left, t_up, e_forward, e_up;
2068 t_up =
v_up * tagscale;
2070 e.origin_x =
org * t_forward;
2071 e.origin_y =
org * t_left;
2072 e.origin_z =
org * t_up;
2085 e_up.x =
v_up * t_forward;
2086 e_up.y =
v_up * t_left;
2087 e_up.z =
v_up * t_up;
2095 setattachment(e, to, tag);
2096 setorigin(e, e.origin);
2108 setattachment(e,
NULL,
"");
2109 setorigin(e, e.origin);
2116 e.punchangle = to.angles;
2117 e.view_ofs = e.origin - to.origin;
2118 e.v_angle = e.angles - to.angles;
2123void unfollow_sameorigin(
entity e)
2136 ent.punchangle = e.angles;
2137 ent.view_ofs = ent.origin - e.origin;
2138 ent.v_angle = ent.angles - e.angles;
2139 ent.aiment_classname = e.classname;
2140 ent.aiment_deadflag = e.deadflag;
2145 ent.view_ofs.x =
bound(pl.mins.x + 4, ent.view_ofs.x, pl.maxs.x - 4);
2146 ent.view_ofs.y =
bound(pl.mins.y + 4, ent.view_ofs.y, pl.maxs.y - 4);
2147 ent.view_ofs.z =
bound(pl.mins.z + 4, ent.view_ofs.z, pl.maxs.z - 4);
2172 if(ent.aiment.classname != ent.aiment_classname || ent.aiment.deadflag != ent.aiment_deadflag)
2183 bool do_colorize = (
teamplay && team_colorize);
2191 return strcat(t, strdecolorize(thename));
#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)
bool mut_is_active(int mut)
void SetMovetypeFollow(entity ent, entity e)
#define X(name, translated_name, cl_hook, mut)
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)
float matchacl(string acl, string str)
vector solve_shotdirection(vector myorg, vector myvel, vector eorg, vector evel, float spd, float newton_style)
string build_mutator_list(string s)
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)
string icon_path_from_menuskin(string theIcon)
Returns icon path from the current menu skin (MENU only).
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)
vector healtharmor_applydamage(float h, float a, float armorblock, int deathtype, float damage)
void mut_set_active(int mut)
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
const int MUT_WEAPON_STAY
float get_model_parameters_weight
const int MUT_GRAPPLING_HOOK
float get_model_parameters_fixbone
string get_model_parameters_sex
const int MUT_TOUCHEXPLODE
const int MUT_INVINCIBLE_PROJECTILES
const int MUT_NO_START_WEAPONS
float get_model_parameters_species
const int MUT_ROCKET_FLYING
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]
const int MUT_NO_POWERUPS
IntrusiveList g_saved_cvars
float get_model_parameters_age
float(string s) textLengthUpToLength_lenFunction_t
const int MUT_OFFHAND_BLASTER
const int MUT_BUFFS_REPLACE_POWERUPS
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
special attack (not a true weapon); NOTE: if this flag is set then WEP_FLAG_HIDDEN must be set as wel...