]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/client/View.qc
Committed my CSQC stuff, let's see:
[divverent/nexuiz.git] / data / qcsrc / client / View.qc
1 //include "main.qh"\r
2 \r
3 void CSQC_UpdateView(void)\r
4 {\r
5         // ALWAYS Clear Current Scene First\r
6         R_ClearScene();\r
7 \r
8         // Assign Standard Viewflags\r
9         // Draw the World (and sky)\r
10         R_SetView(VF_DRAWWORLD, 1);\r
11         // Draw the Crosshair\r
12         R_SetView(VF_DRAWCROSSHAIR, 1);\r
13         // Draw the Engine Status Bar (the default Quake HUD)\r
14         R_SetView(VF_DRAWENGINESBAR, 1);\r
15 \r
16         // Set the console size vars\r
17         vid_conwidth = cvar("vid_conwidth");\r
18         vid_conheight = cvar("vid_conheight");\r
19 \r
20         // Update the mouse position\r
21         /*\r
22         mousepos_x = vid_conwidth;\r
23         mousepos_y = vid_conheight;\r
24         mousepos = mousepos*0.5 + getmousepos();\r
25         */\r
26 \r
27         // Update the camera\r
28         //UpdateCamera();\r
29         /*self.origin_z += getstati(STAT_VIEWHEIGHT);\r
30         R_SetView(VF_ORIGIN, self.origin);\r
31         self.origin_z -= getstati(STAT_VIEWHEIGHT);\r
32         R_SetView(VF_ANGLES, input_angles);*/\r
33         \r
34         // Setup Entities to be Rendered (include all base types; normal, engine and viewmodels)\r
35         R_AddEntities(MASK_NORMAL | MASK_ENGINE | MASK_ENGINEVIEWMODELS);\r
36 \r
37         /* Sample for 3D polygon rendering, do it before R_RenderScene!\r
38            R_BeginPolygon("gfx/ctf_ic_atk.tga", 0);\r
39            R_PolygonVertex('-5000 -5000 5200', '0 0', '1 1 1', 1);\r
40            R_PolygonVertex(' 5000 -5000 5200', '1 0', '1 1 1', 1);\r
41            R_PolygonVertex(' 5000  5000 -5200', '1 1', '1 1 1', 1);\r
42            R_PolygonVertex('-5000  5000 -5200', '0 1', '1 1 1', 1);\r
43            R_EndPolygon();\r
44         */\r
45         \r
46         // Render the Scene\r
47         R_RenderScene();\r
48 \r
49         // Draw the mouse cursor\r
50         // NOTE: drawpic must happen after R_RenderScene for some reason\r
51         //drawpic(getmousepos(), "gfx/cursor.tga", '11 14 0', '1 1 1', 1, 0);\r
52         //drawstring('50 50', ftos(game), '10 10 0', '1 1 1', 1, 0);\r
53         //self = edict_num(player_localnum);\r
54         //drawstring('0 0', vtos(pmove_org), '8 8 0', '1 1 1', 1, 0);\r
55         //drawstring('0 8', strcat("ORG: ", vtos(self.origin), " state: ", ftos(self.ctf_state), " HP: ", ftos(self.health)), '8 8 0', '1 1 1', 1, 0);\r
56         // as long as the ctf part isn't in, this is useless\r
57         if(menu_visible)\r
58                 menu_show();\r
59         \r
60         /*if(gametype == GAME_CTF)\r
61         {\r
62                 ctf_view();\r
63         } else */\r
64         if(gametype == GAME_ONSLAUGHT)\r
65         {\r
66                 //drawstring('0 0', minimapname, '8 8 0', '1 1 1', 1, 0);\r
67                 drawsetcliparea(0,0,800,600);\r
68                 ons_view();\r
69                 drawresetcliparea();\r
70         }\r
71 }\r