1 var float(string text, float handleColors, vector fontSize) stringwidth;
\r
6 void serverAnnouncer()
\r
8 // check for pending announcement, play it and remove it
\r
9 if(announce_snd != "")
\r
11 sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
\r
12 strunzone(announce_snd);
\r
17 void restartAnnouncer_Think() {
\r
18 float countdown_rounded, countdown;
\r
19 countdown = getstatf(STAT_GAMESTARTTIME) - time;
\r
20 countdown_rounded = floor(0.5 + countdown);
\r
21 if(countdown <= 0) {
\r
22 if (!spectatee_status) //do cprint only for players
\r
23 centerprint("^1Begin!");
\r
25 sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
\r
26 //reset maptime announcers now as well
\r
27 announcer_5min = announcer_1min = FALSE;
\r
33 if (!spectatee_status) //do cprint only for players
\r
34 centerprint(strcat("^1Game starts in ", ftos(countdown_rounded), " seconds"));
\r
36 if(countdown_rounded <= 3 && countdown_rounded >= 1) {
\r
37 sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
\r
40 self.nextthink = getstatf(STAT_GAMESTARTTIME) - (countdown - 1);
\r
45 * Plays the 1minute or 5 minutes (of maptime) remaining sound, if client wants it
\r
47 void maptimeAnnouncer() {
\r
49 timelimit = getstatf(STAT_TIMELIMIT);
\r
51 timeleft = max(0, timelimit * 60 + getstatf(STAT_GAMESTARTTIME) - time);
\r
54 float warmuptimeleft;
\r
56 warmuplimit = cvar("g_warmup_limit");
\r
57 if(warmuplimit > 0) {
\r
58 warmuptimeleft = max(0, warmuplimit + getstatf(STAT_GAMESTARTTIME) - time);
\r
63 if (cvar("cl_sound_maptime_warning") >= 2) {
\r
64 //make sure that after connect (and e.g. 4 minutes left) we will not get a wrong sound
\r
67 if(((!warmup_stage || warmuplimit == 0) && timeleft > 300) || (warmup_stage && warmuplimit > 0 && warmuptimeleft > 300))
\r
68 announcer_5min = FALSE;
\r
70 else if (((!warmup_stage || warmuplimit == 0) && timelimit > 0 && timeleft < 300 && timeleft > 299) || (warmup_stage && warmuplimit > 0 && warmuptimeleft < 300 && warmuptimeleft > 299))
\r
71 //if we're in warmup mode, check whether there's a warmup timelimit
\r
72 if not (warmuplimit == -1 && warmup_stage) {
\r
73 announcer_5min = TRUE;
\r
74 //dprint("i will play the sound, I promise!\n");
\r
75 sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
\r
80 if (cvar("cl_sound_maptime_warning") == 1 || cvar("cl_sound_maptime_warning") == 3) {
\r
83 if(((!warmup_stage || warmuplimit == 0) && timeleft > 60) || (warmup_stage && warmuplimit > 0 && warmuptimeleft > 60))
\r
84 announcer_1min = FALSE;
\r
86 else if (((!warmup_stage || warmuplimit == 0) && timelimit > 0 && timeleft < 60) || (warmup_stage && warmuplimit > 0 && warmuptimeleft < 60))
\r
87 //if we're in warmup mode, check whether there's a warmup timelimit
\r
88 if not (warmuplimit == -1 && warmup_stage) {
\r
89 announcer_1min = TRUE;
\r
90 sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
\r
96 * Announce carried items (e.g. flags in CTF).
\r
99 float blueflag_prev;
\r
100 void carrierAnnouncer() {
\r
101 float stat_items, redflag, blueflag;
\r
105 if not(cvar("cl_notify_carried_items"))
\r
108 stat_items = getstati(STAT_ITEMS);
\r
110 redflag = (stat_items/IT_RED_FLAG_TAKEN) & 3;
\r
111 blueflag = (stat_items/IT_BLUE_FLAG_TAKEN) & 3;
\r
113 if (redflag == 3 && redflag != redflag_prev) {
\r
114 item = "^1RED^7 flag";
\r
115 pickup = (redflag_prev == 2);
\r
118 if (blueflag == 3 && blueflag != blueflag_prev) {
\r
119 item = "^4BLUE^7 flag";
\r
120 pickup = (blueflag_prev == 2);
\r
126 if (cvar("cl_notify_carried_items") & 2)
\r
127 centerprint(strcat("You picked up the ", item, "!"));
\r
130 if (cvar("cl_notify_carried_items") & 1)
\r
131 centerprint(strcat("You got the ", item, "!"));
\r
135 blueflag_prev = blueflag;
\r
136 redflag_prev = redflag;
\r
140 * Add all future announcer sounds precaches here.
\r
141 * TODO: announcer queues
\r
143 void Announcer_Precache () {
\r
144 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/1minuteremains.wav"));
\r
145 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/5minutesremain.wav"));
\r
147 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/airshot.wav"));
\r
148 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/03kills.wav"));
\r
149 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/05kills.wav"));
\r
150 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/10kills.wav"));
\r
151 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/15kills.wav"));
\r
152 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/20kills.wav"));
\r
153 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/25kills.wav"));
\r
154 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/30kills.wav"));
\r
155 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/botlike.wav"));
\r
156 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/yoda.wav"));
\r
157 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/amazing.wav"));
\r
158 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/awesome.wav"));
\r
159 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/headshot.wav"));
\r
160 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/impressive.wav"));
\r
162 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/prepareforbattle.wav"));
\r
163 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/begin.wav"));
\r
164 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/timeoutcalled.wav"));
\r
165 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/1fragleft.wav"));
\r
166 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/2fragsleft.wav"));
\r
167 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/3fragsleft.wav"));
\r
168 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/terminated.wav"));
\r
170 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/1.wav"));
\r
171 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/2.wav"));
\r
172 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/3.wav"));
\r
173 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/4.wav"));
\r
174 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/5.wav"));
\r
175 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/6.wav"));
\r
176 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/7.wav"));
\r
177 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/8.wav"));
\r
178 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/9.wav"));
\r
179 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/10.wav"));
\r
181 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/lastsecond.wav"));
\r
182 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/narrowly.wav"));
\r
184 precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/health_low.wav"));
\r
193 for(e = prev.sort_next; e; prev = e, e = e.sort_next)
\r
195 if(prev != e.sort_prev)
\r
196 error(strcat("sort list chain error\nplease submit the output of 'prvm_edicts client' to the developers"));
\r
200 for(e = prev.sort_next; e; prev = e, e = e.sort_next)
\r
202 if(prev != e.sort_prev)
\r
203 error(strcat("sort list chain error\nplease submit the output of 'prvm_edicts client' to the developers"));
\r
208 float RegisterPlayer(entity player)
\r
212 for(pl = players.sort_next; pl; pl = pl.sort_next)
\r
214 error("Player already registered!");
\r
215 player.sort_next = players.sort_next;
\r
216 player.sort_prev = players;
\r
217 if(players.sort_next)
\r
218 players.sort_next.sort_prev = player;
\r
219 players.sort_next = player;
\r
224 void RemovePlayer(entity player)
\r
229 for(pl = players.sort_next; pl && pl != player; pl = pl.sort_next)
\r
234 error("Trying to remove a player which is not in the playerlist!");
\r
237 parent.sort_next = player.sort_next;
\r
238 if(player.sort_next)
\r
239 player.sort_next.sort_prev = parent;
\r
243 void MoveToLast(entity e)
\r
246 other = e.sort_next;
\r
249 SORT_SWAP(other, e);
\r
250 other = e.sort_next;
\r
255 float RegisterTeam(entity Team)
\r
259 for(tm = teams.sort_next; tm; tm = tm.sort_next)
\r
261 error("Team already registered!");
\r
262 Team.sort_next = teams.sort_next;
\r
263 Team.sort_prev = teams;
\r
264 if(teams.sort_next)
\r
265 teams.sort_next.sort_prev = Team;
\r
266 teams.sort_next = Team;
\r
271 void RemoveTeam(entity Team)
\r
276 for(tm = teams.sort_next; tm && tm != Team; tm = tm.sort_next)
\r
281 print("Trying to remove a team which is not in the teamlist!");
\r
284 parent.sort_next = Team.sort_next;
\r
286 Team.sort_next.sort_prev = parent;
\r
290 entity GetTeam(float Team, float add)
\r
294 num = (Team == COLOR_SPECTATOR) ? 16 : Team;
\r
296 return teamslots[num];
\r
301 teamslots[num] = tm;
\r
306 void CSQC_CheckEngine()
\r
308 sbar_font = FONT_USER+1;
\r
309 sbar_bigfont = FONT_USER+2;
\r
312 vector Sbar_GetFontsize(string cvarname)
\r
315 v = stov(cvar_string(cvarname));
\r
324 float Sbar_GetWidth(float teamcolumnwidth)
\r
327 f = cvar("sbar_width");
\r
332 if(f > vid_conwidth - 2 * teamcolumnwidth)
\r
333 f = vid_conwidth - 2 * teamcolumnwidth;
\r
337 float PreviewExists(string name)
\r
342 if(cvar("cl_readpicture_force"))
\r
345 file = strcat(name, ".tga");
\r
346 f = fopen(file, FILE_READ);
\r
352 file = strcat(name, ".png");
\r
353 f = fopen(file, FILE_READ);
\r
359 file = strcat(name, ".jpg");
\r
360 f = fopen(file, FILE_READ);
\r
366 file = strcat(name, ".pcx");
\r
367 f = fopen(file, FILE_READ);
\r
376 vector rotate(vector v, float a)
\r
379 // FTEQCC SUCKS AGAIN
\r
380 w_x = v_x * cos(a) + v_y * sin(a);
\r
381 w_y = -1 * v_x * sin(a) + v_y * cos(a);
\r
385 float ColorTranslateMode;
\r
387 string ColorTranslateRGB(string s)
\r
389 if(ColorTranslateMode & 1)
\r
390 return strdecolorize(s);
\r
395 string Team_ColorCode(float teamid)
\r
397 if (teamid == COLOR_TEAM1)
\r
399 else if (teamid == COLOR_TEAM2)
\r
401 else if (teamid == COLOR_TEAM3)
\r
403 else if (teamid == COLOR_TEAM4)
\r
409 // decolorizes and team colors the player name when needed
\r
410 string playername(string thename, float teamid)
\r
415 t = Team_ColorCode(teamid);
\r
416 return strcat(t, strdecolorize(thename));
\r
419 return strdecolorize(thename);
\r
422 float cvar_or(string cv, float v)
\r
425 s = cvar_string(cv);
\r
432 vector project_3d_to_2d(vector vec)
\r
434 vec = cs_project(vec);
\r
435 if(cs_project_is_b0rked > 0)
\r
437 vec_x *= vid_conwidth / vid_width;
\r
438 vec_y *= vid_conheight / vid_height;
\r
443 void dummyfunction(float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8)
\r
447 float expandingbox_sizefactor_from_fadelerp(float fadelerp)
\r
449 return 1.2 / (1.2 - fadelerp);
\r
452 vector expandingbox_resize_centered_box_offset(float sz, vector boxsize, float boxxsizefactor)
\r
454 boxsize_x *= boxxsizefactor; // easier interface for text
\r
455 return boxsize * (0.5 * (1 - sz));
\r
458 void drawborderlines(float thickness, vector pos, vector dim, vector color, float alpha, float drawflag)
\r
462 // left and right lines
\r
463 pos_x -= thickness;
\r
464 line_dim_x = thickness;
\r
465 line_dim_y = dim_y;
\r
466 drawfill(pos, line_dim, color, alpha, drawflag);
\r
467 drawfill(pos + (dim_x + thickness) * '1 0 0', line_dim, color, alpha, drawflag);
\r
469 // upper and lower lines
\r
470 pos_y -= thickness;
\r
471 line_dim_x = dim_x + thickness * 2; // make upper and lower lines longer
\r
472 line_dim_y = thickness;
\r
473 drawfill(pos, line_dim, color, alpha, drawflag);
\r
474 drawfill(pos + (dim_y + thickness) * '0 1 0', line_dim, color, alpha, drawflag);
\r
477 void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, float alpha, float drawflag)
\r
479 vector current_pos, end_pos, new_size, ratio;
\r
480 end_pos = pos + area;
\r
482 current_pos_y = pos_y;
\r
483 while (current_pos_y < end_pos_y)
\r
485 current_pos_x = pos_x;
\r
486 while (current_pos_x < end_pos_x)
\r
488 new_size_x = min(sz_x, end_pos_x - current_pos_x);
\r
489 new_size_y = min(sz_y, end_pos_y - current_pos_y);
\r
490 ratio_x = new_size_x / sz_x;
\r
491 ratio_y = new_size_y / sz_y;
\r
492 drawsubpic(current_pos, new_size, pic, '0 0 0', ratio, color, alpha, drawflag);
\r
493 current_pos_x += sz_x;
\r
495 current_pos_y += sz_y;
\r
499 void drawpic_expanding(vector position, string pic, vector scale, vector rgb, float alpha, float flag, float fadelerp)
\r
502 sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
\r
504 drawpic(position + expandingbox_resize_centered_box_offset(sz, scale, 1), pic, scale * sz, rgb, alpha * (1 - fadelerp), flag);
\r
507 void drawpic_expanding_two(vector position, string pic, vector scale, vector rgb, float alpha, float flag, float fadelerp)
\r
509 drawpic_expanding(position, pic, scale, rgb, alpha, flag, fadelerp);
\r
510 drawpic(position, pic, scale, rgb, alpha * fadelerp, flag);
\r
513 vector drawfontscale;
\r
514 void drawstring_expanding(vector position, string text, vector scale, vector rgb, float alpha, float flag, float fadelerp)
\r
517 sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
\r
519 if(cvar("menu_font_size_snapping_fix"))
\r
520 drawfontscale = sz * '1 1 0';
\r
522 drawfontscale = '1 1 0';
\r
523 dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
\r
524 drawstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, FALSE, scale * (sz / drawfontscale_x)) / (scale_x * sz)), text, scale * (sz / drawfontscale_x), rgb, alpha * (1 - fadelerp), flag);
\r
525 // width parameter:
\r
526 // (scale_x * sz / drawfontscale_x) * drawfontscale_x * SIZE1 / (scale_x * sz)
\r
529 if(cvar("menu_font_size_snapping_fix"))
\r
530 drawfontscale = '1 1 0';
\r
533 void drawcolorcodedstring_expanding(vector position, string text, vector scale, float alpha, float flag, float fadelerp)
\r
536 sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
\r
538 if(cvar("menu_font_size_snapping_fix"))
\r
539 drawfontscale = sz * '1 1 0';
\r
541 drawfontscale = '1 1 0';
\r
542 dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
\r
543 drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, TRUE, scale * (sz / drawfontscale_x)) / (scale_x * sz)), text, scale * (sz / drawfontscale_x), alpha * (1 - fadelerp), flag);
\r
545 if(cvar("menu_font_size_snapping_fix"))
\r
546 drawfontscale = '1 1 0';
\r
549 // this draws the triangles of a model DIRECTLY. Don't expect high performance, really...
\r
550 void PolyDrawModel(entity e)
\r
556 for(i_s = 0; ; ++i_s)
\r
558 tex = getsurfacetexture(e, i_s);
\r
560 break; // this is beyond the last one
\r
561 n_t = getsurfacenumtriangles(e, i_s);
\r
562 for(i_t = 0; i_t < n_t; ++i_t)
\r
564 tri = getsurfacetriangle(e, i_s, i_t);
\r
565 R_BeginPolygon(tex, 0);
\r
566 R_PolygonVertex(getsurfacepoint(e, i_s, tri_x), getsurfacepointattribute(e, i_s, tri_x, SPA_TEXCOORDS0), '1 1 1', 1);
\r
567 R_PolygonVertex(getsurfacepoint(e, i_s, tri_y), getsurfacepointattribute(e, i_s, tri_y, SPA_TEXCOORDS0), '1 1 1', 1);
\r
568 R_PolygonVertex(getsurfacepoint(e, i_s, tri_z), getsurfacepointattribute(e, i_s, tri_z, SPA_TEXCOORDS0), '1 1 1', 1);
\r
574 void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vector rgb, float a, float drawflag)
\r
577 vector ringsize, v, t;
\r
578 ringsize = radius * '1 1 0';
\r
580 x = cos(f * 2 * M_PI);
\r
581 y = sin(f * 2 * M_PI);
\r
582 q = fabs(x) + fabs(y);
\r
588 // draw full rectangle
\r
589 R_BeginPolygon(pic, drawflag);
\r
590 v = centre; t = '0.5 0.5 0';
\r
591 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
\r
592 R_PolygonVertex(v, t, rgb, a);
\r
594 v = centre; t = '0.5 0.5 0';
\r
595 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
\r
596 R_PolygonVertex(v, t, rgb, a);
\r
598 v = centre; t = '0.5 0.5 0';
\r
599 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
\r
600 R_PolygonVertex(v, t, rgb, a);
\r
602 v = centre; t = '0.5 0.5 0';
\r
603 v_y -= 0.5 * ringsize_y; t -= '0.5 -0.5 0';
\r
604 R_PolygonVertex(v, t, rgb, a);
\r
610 R_BeginPolygon(pic, drawflag);
\r
611 v = centre; t = '0.5 0.5 0';
\r
612 R_PolygonVertex(v, t, rgb, a);
\r
614 v = centre; t = '0.5 0.5 0';
\r
615 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
\r
616 R_PolygonVertex(v, t, rgb, a);
\r
621 // draw upper and first triangle
\r
622 R_BeginPolygon(pic, drawflag);
\r
623 v = centre; t = '0.5 0.5 0';
\r
624 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
\r
625 R_PolygonVertex(v, t, rgb, a);
\r
627 v = centre; t = '0.5 0.5 0';
\r
628 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
\r
629 R_PolygonVertex(v, t, rgb, a);
\r
631 v = centre; t = '0.5 0.5 0';
\r
632 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
\r
633 R_PolygonVertex(v, t, rgb, a);
\r
635 R_BeginPolygon(pic, drawflag);
\r
636 v = centre; t = '0.5 0.5 0';
\r
637 R_PolygonVertex(v, t, rgb, a);
\r
639 v = centre; t = '0.5 0.5 0';
\r
640 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
\r
641 R_PolygonVertex(v, t, rgb, a);
\r
643 v = centre; t = '0.5 0.5 0';
\r
644 v_y -= 0.5 * ringsize_y; t -= '0.5 -0.5 0';
\r
645 R_PolygonVertex(v, t, rgb, a);
\r
653 // draw upper triangle
\r
654 R_BeginPolygon(pic, drawflag);
\r
655 v = centre; t = '0.5 0.5 0';
\r
656 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
\r
657 R_PolygonVertex(v, t, rgb, a);
\r
659 v = centre; t = '0.5 0.5 0';
\r
660 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
\r
661 R_PolygonVertex(v, t, rgb, a);
\r
663 v = centre; t = '0.5 0.5 0';
\r
664 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
\r
665 R_PolygonVertex(v, t, rgb, a);
\r
671 R_BeginPolygon(pic, drawflag);
\r
672 v = centre; t = '0.5 0.5 0';
\r
673 R_PolygonVertex(v, t, rgb, a);
\r
675 v = centre; t = '0.5 0.5 0';
\r
676 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
\r
677 R_PolygonVertex(v, t, rgb, a);
\r
682 // draw first triangle
\r
683 R_BeginPolygon(pic, drawflag);
\r
684 v = centre; t = '0.5 0.5 0';
\r
685 R_PolygonVertex(v, t, rgb, a);
\r
687 v = centre; t = '0.5 0.5 0';
\r
688 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
\r
689 R_PolygonVertex(v, t, rgb, a);
\r
691 v = centre; t = '0.5 0.5 0';
\r
692 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
\r
693 R_PolygonVertex(v, t, rgb, a);
\r
704 R_BeginPolygon(pic, drawflag);
\r
705 v = centre; t = '0.5 0.5 0';
\r
706 R_PolygonVertex(v, t, rgb, a);
\r
708 v = centre; t = '0.5 0.5 0';
\r
709 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
\r
710 R_PolygonVertex(v, t, rgb, a);
\r
716 v = centre; t = '0.5 0.5 0';
\r
717 v_x += x * 0.5 * ringsize_x; t += x * '0.5 0.5 0';
\r
718 v_y += y * 0.5 * ringsize_y; t += y * '0.5 -0.5 0';
\r
719 R_PolygonVertex(v, t, rgb, a);
\r
724 const vector GETPLAYERORIGIN_ERROR = '1123581321 2357111317 3141592653'; // way out of bounds for anything on the map
\r
725 vector getplayerorigin(float pl)
\r
730 s = getplayerkey(pl, "TEMPHACK_origin");
\r
734 e = entcs_receiver[pl];
\r
738 return GETPLAYERORIGIN_ERROR;
\r