server can be configured out, rtlights are a bit more responcible.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@538 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
9af4c7df7f
commit
854f5340c1
46 changed files with 454 additions and 146 deletions
|
@ -486,7 +486,9 @@ void CL_Stop_f (void)
|
||||||
{
|
{
|
||||||
if (!cls.demorecording)
|
if (!cls.demorecording)
|
||||||
{
|
{
|
||||||
|
#ifndef CLIENTONLY
|
||||||
SV_MVDStop_f();
|
SV_MVDStop_f();
|
||||||
|
#endif
|
||||||
Con_Printf ("Not recording a demo.\n");
|
Con_Printf ("Not recording a demo.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -578,7 +578,7 @@ void CL_ParsePacketEntities (qboolean delta)
|
||||||
newp->num_entities = newindex;
|
newp->num_entities = newindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NQPROT
|
|
||||||
entity_state_t *CL_FindOldPacketEntity(int num)
|
entity_state_t *CL_FindOldPacketEntity(int num)
|
||||||
{
|
{
|
||||||
int pnum;
|
int pnum;
|
||||||
|
@ -597,6 +597,7 @@ entity_state_t *CL_FindOldPacketEntity(int num)
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#ifdef NQPROT
|
||||||
// reset all entity fields (typically used if status changed)
|
// reset all entity fields (typically used if status changed)
|
||||||
#define E5_FULLUPDATE (1<<0)
|
#define E5_FULLUPDATE (1<<0)
|
||||||
// E5_ORIGIN32=0: short[3] = s->origin[0] * 8, s->origin[1] * 8, s->origin[2] * 8
|
// E5_ORIGIN32=0: short[3] = s->origin[0] * 8, s->origin[1] * 8, s->origin[2] * 8
|
||||||
|
|
|
@ -189,7 +189,9 @@ CL_Quit_f
|
||||||
*/
|
*/
|
||||||
void CL_Quit_f (void)
|
void CL_Quit_f (void)
|
||||||
{
|
{
|
||||||
|
#ifndef CLIENTONLY
|
||||||
if (!isDedicated)
|
if (!isDedicated)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
M_Menu_Quit_f ();
|
M_Menu_Quit_f ();
|
||||||
return;
|
return;
|
||||||
|
@ -558,7 +560,9 @@ void CLNQ_BeginServerConnect(void)
|
||||||
#endif
|
#endif
|
||||||
void CL_BeginServerReconnect(void)
|
void CL_BeginServerReconnect(void)
|
||||||
{
|
{
|
||||||
|
#ifndef CLIENTONLY
|
||||||
if (isDedicated)
|
if (isDedicated)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
Con_TPrintf (TLC_DEDICATEDCANNOTCONNECT);
|
Con_TPrintf (TLC_DEDICATEDCANNOTCONNECT);
|
||||||
return;
|
return;
|
||||||
|
@ -859,7 +863,9 @@ void CL_Disconnect (void)
|
||||||
#endif
|
#endif
|
||||||
CL_StopUpload();
|
CL_StopUpload();
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
if (!isDedicated)
|
if (!isDedicated)
|
||||||
|
#endif
|
||||||
SCR_EndLoadingPlaque();
|
SCR_EndLoadingPlaque();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1383,7 +1389,11 @@ void CL_Startdemos_f (void)
|
||||||
for (i=1 ; i<c+1 ; i++)
|
for (i=1 ; i<c+1 ; i++)
|
||||||
Q_strncpyz (cls.demos[i-1], Cmd_Argv(i), sizeof(cls.demos[0]));
|
Q_strncpyz (cls.demos[i-1], Cmd_Argv(i), sizeof(cls.demos[0]));
|
||||||
|
|
||||||
if (!sv.state && cls.demonum != -1 && cls.demoplayback==DPB_NONE && !media_filmtype && COM_CheckParm("-demos"))
|
if (
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
!sv.state &&
|
||||||
|
#endif
|
||||||
|
cls.demonum != -1 && cls.demoplayback==DPB_NONE && !media_filmtype && COM_CheckParm("-demos"))
|
||||||
{
|
{
|
||||||
cls.demonum = 0;
|
cls.demonum = 0;
|
||||||
CL_NextDemo ();
|
CL_NextDemo ();
|
||||||
|
@ -2482,8 +2492,10 @@ void Host_Frame (float time)
|
||||||
// process console commands
|
// process console commands
|
||||||
Cbuf_Execute ();
|
Cbuf_Execute ();
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
if (isDedicated) //someone changed it.
|
if (isDedicated) //someone changed it.
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef NQPROT
|
#ifdef NQPROT
|
||||||
NET_Poll();
|
NET_Poll();
|
||||||
|
@ -2777,7 +2789,7 @@ void Host_Shutdown(void)
|
||||||
IN_Shutdown ();
|
IN_Shutdown ();
|
||||||
if (VID_DeInit)
|
if (VID_DeInit)
|
||||||
VID_DeInit();
|
VID_DeInit();
|
||||||
#ifndef CLIENT_ONLY
|
#ifndef CLIENTONLY
|
||||||
SV_Shutdown();
|
SV_Shutdown();
|
||||||
#else
|
#else
|
||||||
NET_Shutdown ();
|
NET_Shutdown ();
|
||||||
|
@ -2786,3 +2798,9 @@ void Host_Shutdown(void)
|
||||||
Cvar_Shutdown();
|
Cvar_Shutdown();
|
||||||
Validation_FlushFileList();
|
Validation_FlushFileList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CLIENTONLY
|
||||||
|
void SV_EndRedirect (void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
|
@ -1225,8 +1225,9 @@ void CL_ParseServerData (void)
|
||||||
{
|
{
|
||||||
COM_FlushTempoaryPacks();
|
COM_FlushTempoaryPacks();
|
||||||
COM_Gamedir(str);
|
COM_Gamedir(str);
|
||||||
|
#ifndef CLIENTONLY
|
||||||
Info_SetValueForStarKey (svs.info, "*gamedir", str, MAX_SERVERINFO_STRING);
|
Info_SetValueForStarKey (svs.info, "*gamedir", str, MAX_SERVERINFO_STRING);
|
||||||
|
#endif
|
||||||
COM_FlushFSCache();
|
COM_FlushFSCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1373,6 +1373,11 @@ void SCR_ScreenShot_f (void)
|
||||||
if (Cmd_Argc() == 2)
|
if (Cmd_Argc() == 2)
|
||||||
{
|
{
|
||||||
Q_strncpyz(pcxname, Cmd_Argv(1), sizeof(pcxname));
|
Q_strncpyz(pcxname, Cmd_Argv(1), sizeof(pcxname));
|
||||||
|
if (strstr (pcxname, "..") || strchr(pcxname, ':') || *pcxname == '.' || *pcxname == '/')
|
||||||
|
{
|
||||||
|
Con_Printf("Screenshot name refused\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
COM_DefaultExtension (pcxname, scr_sshot_type.string);
|
COM_DefaultExtension (pcxname, scr_sshot_type.string);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1380,14 +1385,14 @@ void SCR_ScreenShot_f (void)
|
||||||
//
|
//
|
||||||
// find a file name to save it to
|
// find a file name to save it to
|
||||||
//
|
//
|
||||||
sprintf(pcxname,"fte00000.%s", scr_sshot_type.string);
|
sprintf(pcxname,"screenshots/fte00000.%s", scr_sshot_type.string);
|
||||||
|
|
||||||
for (i=0 ; i<=100000 ; i++)
|
for (i=0 ; i<=100000 ; i++)
|
||||||
{
|
{
|
||||||
pcxname[4] = (i%10000)/1000 + '0';
|
pcxname[16] = (i%10000)/1000 + '0';
|
||||||
pcxname[5] = (i%1000)/100 + '0';
|
pcxname[17] = (i%1000)/100 + '0';
|
||||||
pcxname[6] = (i%100)/10 + '0';
|
pcxname[18] = (i%100)/10 + '0';
|
||||||
pcxname[7] = (i%10) + '0';
|
pcxname[19] = (i%10) + '0';
|
||||||
sprintf (checkname, "%s/%s", com_gamedir, pcxname);
|
sprintf (checkname, "%s/%s", com_gamedir, pcxname);
|
||||||
if (Sys_FileTime(checkname) == -1)
|
if (Sys_FileTime(checkname) == -1)
|
||||||
break; // file doesn't exist
|
break; // file doesn't exist
|
||||||
|
|
|
@ -219,6 +219,8 @@ typedef struct dlight_s
|
||||||
float channelfade[3];
|
float channelfade[3];
|
||||||
|
|
||||||
struct shadowmesh_s *worldshadowmesh;
|
struct shadowmesh_s *worldshadowmesh;
|
||||||
|
float dist;
|
||||||
|
struct dlight_s *next;
|
||||||
} dlight_t;
|
} dlight_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -205,8 +205,10 @@ M_ToggleMenu_f
|
||||||
*/
|
*/
|
||||||
void M_ToggleMenu_f (void)
|
void M_ToggleMenu_f (void)
|
||||||
{
|
{
|
||||||
|
#ifdef MENU_DAT
|
||||||
if (MP_Toggle())
|
if (MP_Toggle())
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
m_entersound = true;
|
m_entersound = true;
|
||||||
|
|
||||||
if (key_dest == key_menu)
|
if (key_dest == key_menu)
|
||||||
|
@ -797,7 +799,9 @@ void M_Menu_Particles_f (void);
|
||||||
static qboolean internalmenusregistered;
|
static qboolean internalmenusregistered;
|
||||||
void M_Init_Internal (void)
|
void M_Init_Internal (void)
|
||||||
{
|
{
|
||||||
|
#ifdef MENU_DAT
|
||||||
MP_Shutdown();
|
MP_Shutdown();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (internalmenusregistered)
|
if (internalmenusregistered)
|
||||||
return;
|
return;
|
||||||
|
@ -972,9 +976,11 @@ void M_Draw (int uimenu)
|
||||||
Plug_Menu_Event (0, (int)(realtime*1000));
|
Plug_Menu_Event (0, (int)(realtime*1000));
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef MENU_DAT
|
||||||
case m_menu_dat:
|
case m_menu_dat:
|
||||||
MP_Draw();
|
MP_Draw();
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_entersound)
|
if (m_entersound)
|
||||||
|
@ -1025,10 +1031,11 @@ void M_Keydown (int key)
|
||||||
Plug_Menu_Event (1, key);
|
Plug_Menu_Event (1, key);
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef MENU_DAT
|
||||||
case m_menu_dat:
|
case m_menu_dat:
|
||||||
MP_Keydown(key);
|
MP_Keydown(key);
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1045,9 +1052,11 @@ void M_Keyup (int key)
|
||||||
Plug_Menu_Event (2, key);
|
Plug_Menu_Event (2, key);
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef MENU_DAT
|
||||||
case m_menu_dat:
|
case m_menu_dat:
|
||||||
MP_Keyup(key);
|
MP_Keyup(key);
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "quakedef.h"
|
#include "quakedef.h"
|
||||||
|
|
||||||
|
#ifdef MENU_DAT
|
||||||
|
|
||||||
#ifdef RGLQUAKE
|
#ifdef RGLQUAKE
|
||||||
#include "glquake.h"
|
#include "glquake.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1482,4 +1484,5 @@ qboolean MP_Toggle(void)
|
||||||
inmenuprogs--;
|
inmenuprogs--;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -160,7 +160,9 @@ extern "C" {
|
||||||
|
|
||||||
#ifndef CLIENTONLY
|
#ifndef CLIENTONLY
|
||||||
#include "progs.h"
|
#include "progs.h"
|
||||||
|
#endif
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
|
#ifndef CLIENTONLY
|
||||||
//#ifdef Q2SERVER
|
//#ifdef Q2SERVER
|
||||||
#include "q2game.h"
|
#include "q2game.h"
|
||||||
//#endif
|
//#endif
|
||||||
|
|
|
@ -1275,6 +1275,7 @@ qboolean R_ApplyRenderer (rendererstate_t *newr)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
extern model_t *loadmodel;
|
extern model_t *loadmodel;
|
||||||
|
extern int host_hunklevel;
|
||||||
|
|
||||||
if (newr->bpp == -1)
|
if (newr->bpp == -1)
|
||||||
return false;
|
return false;
|
||||||
|
@ -1319,7 +1320,9 @@ qboolean R_ApplyRenderer (rendererstate_t *newr)
|
||||||
if (qrenderer) //graphics stuff only when not dedicated
|
if (qrenderer) //graphics stuff only when not dedicated
|
||||||
{
|
{
|
||||||
qbyte *data;
|
qbyte *data;
|
||||||
|
#ifndef CLIENTONLY
|
||||||
isDedicated = false;
|
isDedicated = false;
|
||||||
|
#endif
|
||||||
v_gamma.modified = true; //force the gamma to be reset
|
v_gamma.modified = true; //force the gamma to be reset
|
||||||
|
|
||||||
Con_Printf("Setting mode %i*%i*%i*%i\n", newr->width, newr->height, newr->bpp, newr->rate);
|
Con_Printf("Setting mode %i*%i*%i*%i\n", newr->width, newr->height, newr->bpp, newr->rate);
|
||||||
|
@ -1421,6 +1424,9 @@ TRACE(("dbg: R_ApplyRenderer: screen inited\n"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENTONLY
|
||||||
|
Host_Error("Tried setting dedicated mode\n");
|
||||||
|
#else
|
||||||
TRACE(("dbg: R_ApplyRenderer: isDedicated = true\n"));
|
TRACE(("dbg: R_ApplyRenderer: isDedicated = true\n"));
|
||||||
isDedicated = true;
|
isDedicated = true;
|
||||||
if (cls.state)
|
if (cls.state)
|
||||||
|
@ -1432,6 +1438,7 @@ TRACE(("dbg: R_ApplyRenderer: isDedicated = true\n"));
|
||||||
}
|
}
|
||||||
Sys_InitTerminal();
|
Sys_InitTerminal();
|
||||||
Con_PrintToSys();
|
Con_PrintToSys();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
TRACE(("dbg: R_ApplyRenderer: initing mods\n"));
|
TRACE(("dbg: R_ApplyRenderer: initing mods\n"));
|
||||||
Mod_Init();
|
Mod_Init();
|
||||||
|
@ -1447,6 +1454,7 @@ TRACE(("dbg: R_ApplyRenderer: initing bulletein boards\n"));
|
||||||
R_PreNewMap();
|
R_PreNewMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
if (sv.worldmodel)
|
if (sv.worldmodel)
|
||||||
{
|
{
|
||||||
edict_t *ent;
|
edict_t *ent;
|
||||||
|
@ -1514,6 +1522,7 @@ TRACE(("dbg: R_ApplyRenderer: clearing world\n"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifdef PLUGINS
|
#ifdef PLUGINS
|
||||||
Plug_ResChanged();
|
Plug_ResChanged();
|
||||||
#endif
|
#endif
|
||||||
|
@ -1616,9 +1625,9 @@ void R_RestartRenderer_f (void)
|
||||||
{
|
{
|
||||||
rendererstate_t oldr;
|
rendererstate_t oldr;
|
||||||
rendererstate_t newr;
|
rendererstate_t newr;
|
||||||
|
#ifdef MENU_DAT
|
||||||
MP_Shutdown();
|
MP_Shutdown();
|
||||||
|
#endif
|
||||||
memset(&newr, 0, sizeof(newr));
|
memset(&newr, 0, sizeof(newr));
|
||||||
|
|
||||||
TRACE(("dbg: R_RestartRenderer_f\n"));
|
TRACE(("dbg: R_RestartRenderer_f\n"));
|
||||||
|
@ -1717,8 +1726,9 @@ TRACE(("dbg: R_RestartRenderer_f\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE(("dbg: R_RestartRenderer_f success\n"));
|
TRACE(("dbg: R_RestartRenderer_f success\n"));
|
||||||
|
#ifdef MENU_DAT
|
||||||
MP_Init();
|
MP_Init();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void R_SetRenderer_f (void)
|
void R_SetRenderer_f (void)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 121
|
#define _APS_NEXT_RESOURCE_VALUE 122
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1005
|
#define _APS_NEXT_CONTROL_VALUE 1005
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
|
|
@ -755,7 +755,9 @@ void Sys_SendKeyEvents (void)
|
||||||
|
|
||||||
if (!qrenderer)
|
if (!qrenderer)
|
||||||
{
|
{
|
||||||
|
#ifndef CLIENTONLY
|
||||||
SV_GetConsoleCommands ();
|
SV_GetConsoleCommands ();
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -994,6 +996,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
|
||||||
/* main window message loop */
|
/* main window message loop */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
#ifndef CLIENTONLY
|
||||||
if (isDedicated)
|
if (isDedicated)
|
||||||
{
|
{
|
||||||
NET_Sleep(100, false);
|
NET_Sleep(100, false);
|
||||||
|
@ -1006,6 +1009,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
|
||||||
SV_Frame (time);
|
SV_Frame (time);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// yield the CPU for a little while when paused, minimized, or not the focus
|
// yield the CPU for a little while when paused, minimized, or not the focus
|
||||||
if (((cl.paused && (!ActiveApp && !DDActive)) || Minimized || block_drawing) && !media_filmtype)
|
if (((cl.paused && (!ActiveApp && !DDActive)) || Minimized || block_drawing) && !media_filmtype)
|
||||||
|
|
|
@ -1230,10 +1230,10 @@ void V_RenderPlayerViews(int plnum)
|
||||||
int viewnum;
|
int viewnum;
|
||||||
SCR_VRectForPlayer(&r_refdef.vrect, plnum);
|
SCR_VRectForPlayer(&r_refdef.vrect, plnum);
|
||||||
view_message = &view_frame->playerstate[cl.playernum[plnum]];
|
view_message = &view_frame->playerstate[cl.playernum[plnum]];
|
||||||
|
#ifdef NQPROT
|
||||||
if (cls.netcon)
|
if (cls.netcon)
|
||||||
view_message->weaponframe = cl.stats[0][STAT_WEAPONFRAME];
|
view_message->weaponframe = cl.stats[0][STAT_WEAPONFRAME];
|
||||||
|
#endif
|
||||||
cl.simangles[plnum][ROLL] = 0; // FIXME @@@
|
cl.simangles[plnum][ROLL] = 0; // FIXME @@@
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -469,8 +469,10 @@ void Mod_ParseInfoFromEntityLump(char *data) //actually, this should be in the m
|
||||||
|
|
||||||
wads[0] = '\0';
|
wads[0] = '\0';
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
if (isDedicated) //don't bother
|
if (isDedicated) //don't bother
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
R_SetSky("", 0, r_origin);
|
R_SetSky("", 0, r_origin);
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ IDD_DIALOG1 DIALOGEX 0, 0, 67, 40
|
||||||
STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP |
|
STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP |
|
||||||
WS_VISIBLE
|
WS_VISIBLE
|
||||||
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
|
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
|
||||||
FONT 16, "Times New Roman"
|
FONT 16, "Times New Roman", 0, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
CTEXT "FTE QuakeWorld",IDC_STATIC,0,0,67,21,SS_CENTERIMAGE
|
CTEXT "FTE QuakeWorld",IDC_STATIC,0,0,67,21,SS_CENTERIMAGE
|
||||||
CTEXT "http://fte.quakesrc.org",IDC_STATIC,0,23,66,17,
|
CTEXT "http://fte.quakesrc.org",IDC_STATIC,0,23,66,17,
|
||||||
|
|
|
@ -67,12 +67,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#define MD3MODELS //we DO want to use quake3 alias models. This might be a minimal build, but we still want this.
|
#define MD3MODELS //we DO want to use quake3 alias models. This might be a minimal build, but we still want this.
|
||||||
|
|
||||||
|
#define CLIENTONLY
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define SIDEVIEWS 4 //enable secondary/reverse views.
|
#define SIDEVIEWS 4 //enable secondary/reverse views.
|
||||||
#define SP2MODELS //quake2 sprite models
|
#define SP2MODELS //quake2 sprite models
|
||||||
#define MD2MODELS //quake2 alias models
|
#define MD2MODELS //quake2 alias models
|
||||||
#define MD3MODELS //quake3 alias models
|
#define MD3MODELS //quake3 alias models
|
||||||
|
#define ZYMOTICMODELS //zymotic skeletal models.
|
||||||
#define HUFFNETWORK //huffman network compression
|
#define HUFFNETWORK //huffman network compression
|
||||||
#define HALFLIFEMODELS //halflife model support (experimental)
|
#define HALFLIFEMODELS //halflife model support (experimental)
|
||||||
#define DOOMWADS //doom wad/map/sprite support
|
#define DOOMWADS //doom wad/map/sprite support
|
||||||
|
@ -99,9 +102,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define R_XFLIP //allow view to be flipped horizontally
|
#define R_XFLIP //allow view to be flipped horizontally
|
||||||
#define IN_XFLIP //allow input to be flipped horizontally.
|
#define IN_XFLIP //allow input to be flipped horizontally.
|
||||||
#define TEXTEDITOR
|
#define TEXTEDITOR
|
||||||
|
#define PPL //per pixel lighting (stencil shadowing)
|
||||||
|
|
||||||
#define PLUGINS
|
#define PLUGINS
|
||||||
|
|
||||||
|
#define MENU_DAT //support for menu.dat
|
||||||
|
|
||||||
// #define VOICECHAT //experimental
|
// #define VOICECHAT //experimental
|
||||||
|
|
||||||
//these things were moved to plugins.
|
//these things were moved to plugins.
|
||||||
|
|
|
@ -964,6 +964,7 @@ void IPX_CloseSocket (int socket)
|
||||||
// sleeps msec or until net socket is ready
|
// sleeps msec or until net socket is ready
|
||||||
//stdin can sometimes be a socket. As a result,
|
//stdin can sometimes be a socket. As a result,
|
||||||
//we give the option to select it for nice console imput with timeouts.
|
//we give the option to select it for nice console imput with timeouts.
|
||||||
|
#ifndef CLIENTONLY
|
||||||
qboolean NET_Sleep(int msec, qboolean stdinissocket)
|
qboolean NET_Sleep(int msec, qboolean stdinissocket)
|
||||||
{
|
{
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
|
@ -1004,6 +1005,7 @@ qboolean NET_Sleep(int msec, qboolean stdinissocket)
|
||||||
return FD_ISSET(0, &fdset);
|
return FD_ISSET(0, &fdset);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void NET_GetLocalIP6Address (int socket)
|
void NET_GetLocalIP6Address (int socket)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "quakedef.h"
|
#include "quakedef.h"
|
||||||
|
|
||||||
|
extern float pm_stepheight;
|
||||||
|
|
||||||
movevars_t movevars;
|
movevars_t movevars;
|
||||||
playermove_t pmove;
|
playermove_t pmove;
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ qboolean Q1BSP_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num < hull->firstclipnode || num > hull->lastclipnode)
|
if (num < hull->firstclipnode || num > hull->lastclipnode)
|
||||||
SV_Error ("Q1BSP_RecursiveHullCheck: bad node number");
|
Host_Error ("Q1BSP_RecursiveHullCheck: bad node number");
|
||||||
|
|
||||||
//
|
//
|
||||||
// find the point distances
|
// find the point distances
|
||||||
|
@ -268,7 +268,7 @@ Rendering functions (Client only)
|
||||||
|
|
||||||
Server only functions
|
Server only functions
|
||||||
*/
|
*/
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
extern int fatbytes;
|
extern int fatbytes;
|
||||||
extern qbyte fatpvs[(MAX_MAP_LEAFS+1)/4];
|
extern qbyte fatpvs[(MAX_MAP_LEAFS+1)/4];
|
||||||
|
@ -386,6 +386,7 @@ void Q1BSP_FindTouchedLeafs(edict_t *ent)
|
||||||
Q1BSP_RFindTouchedLeafs (ent, sv.worldmodel->nodes);
|
Q1BSP_RFindTouchedLeafs (ent, sv.worldmodel->nodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
Server only functions
|
Server only functions
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,7 @@ typedef struct q2trace_s
|
||||||
struct edict_s *ent; // not set by CM_*() functions
|
struct edict_s *ent; // not set by CM_*() functions
|
||||||
} q2trace_t;
|
} q2trace_t;
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
#define MOVE_NORMAL 0
|
#define MOVE_NORMAL 0
|
||||||
#define MOVE_NOMONSTERS 1
|
#define MOVE_NOMONSTERS 1
|
||||||
|
@ -141,3 +142,5 @@ trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, e
|
||||||
|
|
||||||
|
|
||||||
edict_t *SV_TestPlayerPosition (edict_t *ent, vec3_t origin);
|
edict_t *SV_TestPlayerPosition (edict_t *ent, vec3_t origin);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -405,42 +405,6 @@ SOURCE=..\server\pr_cmds.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\client\pr_menu.c
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "ftequake - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
|
|
||||||
|
|
||||||
# PROP Exclude_From_Build 1
|
|
||||||
# ADD CPP /WX
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
|
|
||||||
|
|
||||||
# PROP Exclude_From_Build 1
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Q3Debug"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Q3Release"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\server\savegame.c
|
SOURCE=..\server\savegame.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -1489,6 +1453,42 @@ SOURCE=..\client\net_master.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\client\pr_menu.c
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "ftequake - Win32 Release"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
|
||||||
|
|
||||||
|
# PROP Exclude_From_Build 1
|
||||||
|
# ADD CPP /WX
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
|
||||||
|
|
||||||
|
# PROP Exclude_From_Build 1
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 Q3Debug"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "ftequake - Win32 Q3Release"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\client\r_bulleten.c
|
SOURCE=..\client\r_bulleten.c
|
||||||
|
|
||||||
!IF "$(CFG)" == "ftequake - Win32 Release"
|
!IF "$(CFG)" == "ftequake - Win32 Release"
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
#include "shader.h"
|
#include "shader.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
|
||||||
|
#ifdef ZYMOTICMODELS
|
||||||
|
#define SKELETALMODELS
|
||||||
|
#endif
|
||||||
|
|
||||||
//FIXME
|
//FIXME
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -95,8 +99,9 @@ typedef struct {
|
||||||
|
|
||||||
//frame is an index into this
|
//frame is an index into this
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
#ifdef SKELETALMODELS
|
||||||
qboolean isskeletal;
|
qboolean isskeletal;
|
||||||
|
#endif
|
||||||
int numposes;
|
int numposes;
|
||||||
float rate;
|
float rate;
|
||||||
int poseofs;
|
int poseofs;
|
||||||
|
@ -110,7 +115,7 @@ typedef struct {
|
||||||
vec3_t scale_origin;
|
vec3_t scale_origin;
|
||||||
} galiaspose_t;
|
} galiaspose_t;
|
||||||
|
|
||||||
|
#ifdef SKELETALMODELS
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int parent;
|
int parent;
|
||||||
} galiasbone_t;
|
} galiasbone_t;
|
||||||
|
@ -121,6 +126,7 @@ typedef struct {
|
||||||
int boneindex;
|
int boneindex;
|
||||||
vec4_t org;
|
vec4_t org;
|
||||||
} galisskeletaltransforms_t;
|
} galisskeletaltransforms_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
//we can't be bothered with animating skins.
|
//we can't be bothered with animating skins.
|
||||||
//We'll load up to four of them but after that you're on your own
|
//We'll load up to four of them but after that you're on your own
|
||||||
|
@ -277,6 +283,7 @@ static void R_LerpFrames(mesh_t *mesh, galiaspose_t *p1, galiaspose_t *p2, float
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SKELETALMODELS
|
||||||
static void R_BuildSkeletalMesh(mesh_t *mesh, float *plerp, float **pose, int poses, galiasbone_t *bones, int bonecount, galisskeletaltransforms_t *weights, int numweights)
|
static void R_BuildSkeletalMesh(mesh_t *mesh, float *plerp, float **pose, int poses, galiasbone_t *bones, int bonecount, galisskeletaltransforms_t *weights, int numweights)
|
||||||
{
|
{
|
||||||
float bonepose[256][12];
|
float bonepose[256][12];
|
||||||
|
@ -340,6 +347,7 @@ static void R_BuildSkeletalMesh(mesh_t *mesh, float *plerp, float **pose, int po
|
||||||
out[2] += v->org[0] * matrix[8] + v->org[1] * matrix[9] + v->org[2] * matrix[10] + v->org[3] * matrix[11];
|
out[2] += v->org[0] * matrix[8] + v->org[1] * matrix[9] + v->org[2] * matrix[10] + v->org[3] * matrix[11];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void R_GAliasAddDlights(mesh_t *mesh, vec3_t org, vec3_t angles)
|
static void R_GAliasAddDlights(mesh_t *mesh, vec3_t org, vec3_t angles)
|
||||||
{
|
{
|
||||||
|
@ -486,6 +494,7 @@ static qboolean R_GAliasBuildMesh(mesh_t *mesh, galiasinfo_t *inf, int frame1, i
|
||||||
//we don't support meshes with one pose skeletal and annother not.
|
//we don't support meshes with one pose skeletal and annother not.
|
||||||
//we don't support meshes with one group skeletal and annother not.
|
//we don't support meshes with one group skeletal and annother not.
|
||||||
|
|
||||||
|
#ifdef SKELETALMODELS
|
||||||
if (g1->isskeletal)
|
if (g1->isskeletal)
|
||||||
{
|
{
|
||||||
int l=0;
|
int l=0;
|
||||||
|
@ -531,6 +540,7 @@ static qboolean R_GAliasBuildMesh(mesh_t *mesh, galiasinfo_t *inf, int frame1, i
|
||||||
R_BuildSkeletalMesh(mesh, plerp, pose, l, (galiasbone_t *)((char*)inf+inf->ofsbones), inf->numbones, (galisskeletaltransforms_t *)((char*)inf+inf->ofstransforms), inf->numtransforms);
|
R_BuildSkeletalMesh(mesh, plerp, pose, l, (galiasbone_t *)((char*)inf+inf->ofsbones), inf->numbones, (galisskeletaltransforms_t *)((char*)inf+inf->ofstransforms), inf->numtransforms);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (g1 == g2) //lerping within group is only done if not changing group
|
if (g1 == g2) //lerping within group is only done if not changing group
|
||||||
{
|
{
|
||||||
|
@ -2846,7 +2856,7 @@ void GL_LoadQ3Model(model_t *mod, void *buffer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef ZYMOTICMODELS
|
||||||
|
|
||||||
|
|
||||||
typedef struct zymlump_s
|
typedef struct zymlump_s
|
||||||
|
@ -3101,4 +3111,6 @@ void GLMod_LoadZymoticModel(model_t *mod, void *buffer)
|
||||||
memcpy (mod->cache.data, root, hunktotal);
|
memcpy (mod->cache.data, root, hunktotal);
|
||||||
|
|
||||||
Hunk_FreeToLowMark (hunkstart);
|
Hunk_FreeToLowMark (hunkstart);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -53,9 +53,8 @@ void GL_BindType (int type, int texnum)
|
||||||
{
|
{
|
||||||
if (gl_state.currenttextures[gl_state.currenttmu] == texnum)
|
if (gl_state.currenttextures[gl_state.currenttmu] == texnum)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gl_state.currenttextures[gl_state.currenttmu] = texnum;
|
gl_state.currenttextures[gl_state.currenttmu] = texnum;
|
||||||
|
|
||||||
|
|
||||||
bindTexFunc (type, texnum);
|
bindTexFunc (type, texnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,9 @@ void Mod_LoadQ2BrushModel (model_t *mod, void *buffer);
|
||||||
void Mod_LoadHLModel (model_t *mod, void *buffer);
|
void Mod_LoadHLModel (model_t *mod, void *buffer);
|
||||||
void Mod_LoadAlias3Model (model_t *mod, void *buffer);
|
void Mod_LoadAlias3Model (model_t *mod, void *buffer);
|
||||||
void Mod_LoadGroupModel (model_t *mod, void *buffer);
|
void Mod_LoadGroupModel (model_t *mod, void *buffer);
|
||||||
|
#ifdef ZYMOTICMODELS
|
||||||
void GLMod_LoadZymoticModel(model_t *mod, void *buffer);
|
void GLMod_LoadZymoticModel(model_t *mod, void *buffer);
|
||||||
|
#endif
|
||||||
model_t *GLMod_LoadModel (model_t *mod, qboolean crash);
|
model_t *GLMod_LoadModel (model_t *mod, qboolean crash);
|
||||||
|
|
||||||
#ifdef DOOMWADS
|
#ifdef DOOMWADS
|
||||||
|
@ -659,11 +661,11 @@ couldntload:
|
||||||
case 29: //q1
|
case 29: //q1
|
||||||
GLMod_LoadBrushModel (mod, buf);
|
GLMod_LoadBrushModel (mod, buf);
|
||||||
break;
|
break;
|
||||||
|
#ifdef ZYMOTICMODELS
|
||||||
case (('O'<<24)+('M'<<16)+('Y'<<8)+'Z'):
|
case (('O'<<24)+('M'<<16)+('Y'<<8)+'Z'):
|
||||||
GLMod_LoadZymoticModel(mod, buf);
|
GLMod_LoadZymoticModel(mod, buf);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
Con_Printf("Unrecognised model format %i\n", LittleLong(*(unsigned *)buf));
|
Con_Printf("Unrecognised model format %i\n", LittleLong(*(unsigned *)buf));
|
||||||
goto couldntload;
|
goto couldntload;
|
||||||
|
@ -2586,15 +2588,18 @@ void GLMod_LoadBrushModel (model_t *mod, void *buffer)
|
||||||
Mod_ParseInfoFromEntityLump(mod_base + header->lumps[LUMP_ENTITIES].fileofs);
|
Mod_ParseInfoFromEntityLump(mod_base + header->lumps[LUMP_ENTITIES].fileofs);
|
||||||
}
|
}
|
||||||
|
|
||||||
mod->funcs.FatPVS = Q1BSP_FatPVS;
|
|
||||||
mod->funcs.EdictInFatPVS = Q1BSP_EdictInFatPVS;
|
|
||||||
mod->funcs.FindTouchedLeafs_Q1 = Q1BSP_FindTouchedLeafs;
|
|
||||||
mod->funcs.LightPointValues = GLQ1BSP_LightPointValues;
|
mod->funcs.LightPointValues = GLQ1BSP_LightPointValues;
|
||||||
mod->funcs.StainNode = Q1BSP_StainNode;
|
mod->funcs.StainNode = Q1BSP_StainNode;
|
||||||
mod->funcs.MarkLights = Q1BSP_MarkLights;
|
mod->funcs.MarkLights = Q1BSP_MarkLights;
|
||||||
|
|
||||||
mod->funcs.LeafForPoint = GLMod_LeafForPoint;
|
mod->funcs.LeafForPoint = GLMod_LeafForPoint;
|
||||||
mod->funcs.LeafPVS = GLMod_LeafnumPVS;
|
mod->funcs.LeafPVS = GLMod_LeafnumPVS;
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
mod->funcs.FindTouchedLeafs_Q1 = Q1BSP_FindTouchedLeafs;
|
||||||
|
mod->funcs.EdictInFatPVS = Q1BSP_EdictInFatPVS;
|
||||||
|
mod->funcs.FatPVS = Q1BSP_FatPVS;
|
||||||
|
#endif
|
||||||
|
|
||||||
mod->numframes = 2; // regular and alternate animation
|
mod->numframes = 2; // regular and alternate animation
|
||||||
|
|
||||||
|
|
|
@ -1555,8 +1555,9 @@ void PPL_BaseBModelTextures(entity_t *e)
|
||||||
{
|
{
|
||||||
for (k=0 ; k<MAX_DLIGHTS ; k++)
|
for (k=0 ; k<MAX_DLIGHTS ; k++)
|
||||||
{
|
{
|
||||||
if ((cl_dlights[k].die < cl.time) ||
|
if (!cl_dlights[k].radius)
|
||||||
(!cl_dlights[k].radius))
|
continue;
|
||||||
|
if (cl_dlights[k].nodynamic)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
currentmodel->funcs.MarkLights (&cl_dlights[k], 1<<k,
|
currentmodel->funcs.MarkLights (&cl_dlights[k], 1<<k,
|
||||||
|
@ -1656,6 +1657,7 @@ void PPL_BaseEntTextures(void)
|
||||||
currentmodel = cl.worldmodel;
|
currentmodel = cl.worldmodel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PPL
|
||||||
static void PPL_GenerateLightArrays(msurface_t *surf, vec3_t relativelightorigin, dlight_t *light)
|
static void PPL_GenerateLightArrays(msurface_t *surf, vec3_t relativelightorigin, dlight_t *light)
|
||||||
{
|
{
|
||||||
glpoly_t *p;
|
glpoly_t *p;
|
||||||
|
@ -1783,7 +1785,7 @@ void PPL_LightTextures(model_t *model, vec3_t modelorigin, dlight_t *light)
|
||||||
|
|
||||||
glEnableClientState(GL_COLOR_ARRAY);
|
glEnableClientState(GL_COLOR_ARRAY);
|
||||||
glColorPointer(3, GL_FLOAT, sizeof(surfvertexarray_t), varray_v->stl);
|
glColorPointer(3, GL_FLOAT, sizeof(surfvertexarray_t), varray_v->stl);
|
||||||
if (t->gl_texturenumbumpmap && gl_mtexarbable>2)
|
if (t->gl_texturenumbumpmap && gl_mtexarbable>3)
|
||||||
{
|
{
|
||||||
GL_MBind(GL_TEXTURE0_ARB, t->gl_texturenumbumpmap);
|
GL_MBind(GL_TEXTURE0_ARB, t->gl_texturenumbumpmap);
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
@ -1796,7 +1798,7 @@ void PPL_LightTextures(model_t *model, vec3_t modelorigin, dlight_t *light)
|
||||||
GL_SelectTexture(GL_TEXTURE1_ARB);
|
GL_SelectTexture(GL_TEXTURE1_ARB);
|
||||||
GL_BindType(GL_TEXTURE_CUBE_MAP_ARB, normalisationCubeMap);
|
GL_BindType(GL_TEXTURE_CUBE_MAP_ARB, normalisationCubeMap);
|
||||||
glEnable(GL_TEXTURE_CUBE_MAP_ARB);
|
glEnable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||||
GL_TexEnv(GL_COMBINE_ARB); //normalisation cubemap * normalmap
|
GL_TexEnv(GL_COMBINE_ARB); //normalisation cubemap . normalmap
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE);
|
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB);
|
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_DOT3_RGB_ARB);
|
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_DOT3_RGB_ARB);
|
||||||
|
@ -1811,12 +1813,24 @@ void PPL_LightTextures(model_t *model, vec3_t modelorigin, dlight_t *light)
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR);
|
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB);
|
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE);
|
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE);
|
||||||
|
|
||||||
|
GL_MBind(GL_TEXTURE3_ARB, t->gl_texturenum);
|
||||||
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
glTexCoordPointer(3, GL_FLOAT, sizeof(surfvertexarray_t), varray_v->stw);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL_TexEnv(GL_MODULATE);
|
if (gl_mtexarbable>3)
|
||||||
glDisable(GL_TEXTURE_2D);
|
{
|
||||||
|
GL_TexEnv(GL_MODULATE);
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
|
||||||
|
GL_SelectTexture(GL_TEXTURE2_ARB);
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
}
|
||||||
GL_SelectTexture(GL_TEXTURE1_ARB);
|
GL_SelectTexture(GL_TEXTURE1_ARB);
|
||||||
GL_TexEnv(GL_MODULATE);
|
GL_TexEnv(GL_MODULATE);
|
||||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
@ -1856,6 +1870,16 @@ void PPL_LightTextures(model_t *model, vec3_t modelorigin, dlight_t *light)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gl_mtexarbable>2)
|
||||||
|
{
|
||||||
|
GL_TexEnv(GL_MODULATE);
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
|
||||||
|
GL_SelectTexture(GL_TEXTURE2_ARB);
|
||||||
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
}
|
||||||
|
|
||||||
GL_TexEnv(GL_MODULATE);
|
GL_TexEnv(GL_MODULATE);
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
|
@ -1894,7 +1918,7 @@ void PPL_LightBModelTextures(entity_t *e, dlight_t *light)
|
||||||
|
|
||||||
glEnableClientState(GL_COLOR_ARRAY);
|
glEnableClientState(GL_COLOR_ARRAY);
|
||||||
glColorPointer(3, GL_FLOAT, sizeof(surfvertexarray_t), varray_v->stl);
|
glColorPointer(3, GL_FLOAT, sizeof(surfvertexarray_t), varray_v->stl);
|
||||||
if (t->gl_texturenumbumpmap && gl_mtexarbable>2)
|
if (t->gl_texturenumbumpmap && gl_mtexarbable>3)
|
||||||
{
|
{
|
||||||
GL_MBind(GL_TEXTURE0_ARB, t->gl_texturenumbumpmap);
|
GL_MBind(GL_TEXTURE0_ARB, t->gl_texturenumbumpmap);
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
@ -1922,9 +1946,25 @@ void PPL_LightBModelTextures(entity_t *e, dlight_t *light)
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR);
|
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB);
|
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PREVIOUS_ARB);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE);
|
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE);
|
||||||
|
|
||||||
|
GL_MBind(GL_TEXTURE3_ARB, t->gl_texturenum);
|
||||||
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
glTexCoordPointer(3, GL_FLOAT, sizeof(surfvertexarray_t), varray_v->stw);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (gl_mtexarbable>3)
|
||||||
|
{
|
||||||
|
GL_TexEnv(GL_MODULATE);
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
|
||||||
|
GL_SelectTexture(GL_TEXTURE2_ARB);
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
}
|
||||||
|
|
||||||
GL_TexEnv(GL_MODULATE);
|
GL_TexEnv(GL_MODULATE);
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
qglActiveTextureARB(GL_TEXTURE1_ARB);
|
qglActiveTextureARB(GL_TEXTURE1_ARB);
|
||||||
|
@ -1965,6 +2005,17 @@ void PPL_LightBModelTextures(entity_t *e, dlight_t *light)
|
||||||
PPL_FlushArrays();
|
PPL_FlushArrays();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gl_mtexarbable>2)
|
||||||
|
{
|
||||||
|
GL_TexEnv(GL_MODULATE);
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
|
||||||
|
GL_SelectTexture(GL_TEXTURE2_ARB);
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
}
|
||||||
|
|
||||||
GL_TexEnv(GL_MODULATE);
|
GL_TexEnv(GL_MODULATE);
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
|
qglClientActiveTextureARB(GL_TEXTURE1_ARB);
|
||||||
|
@ -2034,6 +2085,7 @@ void PPL_DrawEntLighting(dlight_t *light)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void PPL_FullBrights(model_t *model)
|
void PPL_FullBrights(model_t *model)
|
||||||
{
|
{
|
||||||
|
@ -2178,7 +2230,7 @@ void PPL_DrawEntFullBrights(void)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef PPL
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3064,6 +3116,35 @@ void PPL_UpdateNodeShadowFrames(qbyte *lvis)
|
||||||
#if 1 //DP's stolen code
|
#if 1 //DP's stolen code
|
||||||
static void GL_Scissor (int x, int y, int width, int height)
|
static void GL_Scissor (int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
|
#if 0 //visible scissors
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glPushMatrix();
|
||||||
|
glLoadIdentity();
|
||||||
|
glOrtho (0, glwidth, glheight, 0, -99999, 99999);
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
glPushMatrix();
|
||||||
|
glLoadIdentity();
|
||||||
|
// GL_Set2D();
|
||||||
|
|
||||||
|
glColor4f(1,1,1,1);
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE );
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
GL_TexEnv(GL_REPLACE);
|
||||||
|
|
||||||
|
glBegin(GL_LINE_LOOP);
|
||||||
|
glVertex2f(x, y);
|
||||||
|
glVertex2f(x+glwidth, y);
|
||||||
|
glVertex2f(x+glwidth, y+glheight);
|
||||||
|
glVertex2f(x, y+glheight);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glPopMatrix();
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
glPopMatrix();
|
||||||
|
#endif
|
||||||
qglScissor(x, glheight - (y + height),width,height);
|
qglScissor(x, glheight - (y + height),width,height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3281,9 +3362,6 @@ void PPL_AddLight(dlight_t *dl)
|
||||||
maxs[1] = dl->origin[1] + dl->radius;
|
maxs[1] = dl->origin[1] + dl->radius;
|
||||||
maxs[2] = dl->origin[2] + dl->radius;
|
maxs[2] = dl->origin[2] + dl->radius;
|
||||||
|
|
||||||
if (R_CullBox(mins, maxs))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (PPL_ScissorForBox(mins, maxs))
|
if (PPL_ScissorForBox(mins, maxs))
|
||||||
return; //was culled.
|
return; //was culled.
|
||||||
|
|
||||||
|
@ -3457,9 +3535,15 @@ void PPL_AddLight(dlight_t *dl)
|
||||||
qglDisable(GL_SCISSOR_TEST);
|
qglDisable(GL_SCISSOR_TEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
void PPL_DrawWorld (void)
|
void PPL_DrawWorld (void)
|
||||||
{
|
{
|
||||||
dlight_t *l;
|
dlight_t *l;
|
||||||
|
#if 0
|
||||||
|
dlight_t *lc, *furthestprev;
|
||||||
|
float furthest;
|
||||||
|
#endif
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
vec3_t mins, maxs;
|
vec3_t mins, maxs;
|
||||||
|
@ -3483,10 +3567,12 @@ void PPL_DrawWorld (void)
|
||||||
// if (qglGetError())
|
// if (qglGetError())
|
||||||
// Con_Printf("GL Error on entities\n");
|
// Con_Printf("GL Error on entities\n");
|
||||||
|
|
||||||
|
#ifdef PPL
|
||||||
if (r_shadows.value && glStencilFunc)
|
if (r_shadows.value && glStencilFunc)
|
||||||
{
|
{
|
||||||
if (cl.worldmodel->fromgame == fg_quake || cl.worldmodel->fromgame == fg_halflife || cl.worldmodel->fromgame == fg_quake2 /*|| cl.worldmodel->fromgame == fg_quake3*/)
|
if (cl.worldmodel->fromgame == fg_quake || cl.worldmodel->fromgame == fg_halflife || cl.worldmodel->fromgame == fg_quake2 /*|| cl.worldmodel->fromgame == fg_quake3*/)
|
||||||
{
|
{
|
||||||
|
// lc = NULL;
|
||||||
for (l = cl_dlights, i=0 ; i<MAX_DLIGHTS ; i++, l++)
|
for (l = cl_dlights, i=0 ; i<MAX_DLIGHTS ; i++, l++)
|
||||||
{
|
{
|
||||||
if (!l->radius || l->noppl)
|
if (!l->radius || l->noppl)
|
||||||
|
@ -3508,32 +3594,67 @@ void PPL_DrawWorld (void)
|
||||||
maxs[2] = l->origin[2] + l->radius;
|
maxs[2] = l->origin[2] + l->radius;
|
||||||
if (R_CullBox(mins, maxs))
|
if (R_CullBox(mins, maxs))
|
||||||
continue;
|
continue;
|
||||||
if (R_CullSphere(l->origin, l->radius))
|
// if (R_CullSphere(l->origin, l->radius*1.1))
|
||||||
continue;
|
// continue;
|
||||||
|
|
||||||
|
#if 1
|
||||||
if (!maxshadowlights--)
|
if (!maxshadowlights--)
|
||||||
break;
|
continue;
|
||||||
|
#else
|
||||||
|
VectorSubtract(l->origin, r_refdef.vieworg, mins)
|
||||||
|
l->dist = Length(mins);
|
||||||
|
VectorNormalize(mins);
|
||||||
|
l->dist*=1-sqrt(DotProduct(vpn, mins)*DotProduct(vpn, mins));
|
||||||
|
|
||||||
|
l->next = lc;
|
||||||
|
lc = l;
|
||||||
|
maxshadowlights--;
|
||||||
|
}
|
||||||
|
while (maxshadowlights<0)//ooer... we exceeded our quota... strip the furthest ones out.
|
||||||
|
{
|
||||||
|
furthest = lc->dist;
|
||||||
|
furthestprev=NULL;
|
||||||
|
for (l = lc; l->next; l = l->next)
|
||||||
|
{
|
||||||
|
if (l->next->dist > furthest)
|
||||||
|
{
|
||||||
|
furthest = l->next->dist;
|
||||||
|
furthestprev = l;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (furthestprev)
|
||||||
|
furthestprev->next = furthestprev->next->next;
|
||||||
|
else
|
||||||
|
lc = lc->next;
|
||||||
|
|
||||||
|
maxshadowlights++;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (l = lc; l; l = l->next) //we now have our quotaed list
|
||||||
|
{
|
||||||
|
#endif
|
||||||
if(!l->isstatic)
|
if(!l->isstatic)
|
||||||
{
|
{
|
||||||
l->color[0]*=2.5;
|
l->color[0]*=2.5;
|
||||||
l->color[1]*=2.5;
|
l->color[1]*=2.5;
|
||||||
l->color[2]*=2.5;
|
l->color[2]*=2.5;
|
||||||
}
|
}
|
||||||
TRACE(("dbg: calling PPL_AddLight\n"));
|
TRACE(("dbg: calling PPL_AddLight\n"));
|
||||||
PPL_AddLight(l);
|
PPL_AddLight(l);
|
||||||
if(!l->isstatic)
|
if(!l->isstatic)
|
||||||
{
|
{
|
||||||
l->color[0]/=2.5;
|
l->color[0]/=2.5;
|
||||||
l->color[1]/=2.5;
|
l->color[1]/=2.5;
|
||||||
l->color[2]/=2.5;
|
l->color[2]/=2.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
glDisableClientState(GL_COLOR_ARRAY);
|
glDisableClientState(GL_COLOR_ARRAY);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// if (qglGetError())
|
// if (qglGetError())
|
||||||
// Con_Printf("GL Error on shadow lighting\n");
|
// Con_Printf("GL Error on shadow lighting\n");
|
||||||
|
|
|
@ -149,7 +149,7 @@ qboolean R_CullBox (vec3_t mins, vec3_t maxs)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0 ; i<4 ; i++)
|
for (i=0 ; i<4 ; i++)
|
||||||
if (BoxOnPlaneSide (mins, maxs, &frustum[i]) == 2)
|
if (BOX_ON_PLANE_SIDE (mins, maxs, &frustum[i]) == 2)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ qboolean R_CullSphere (vec3_t org, float radius)
|
||||||
for (i=0 ; i<4 ; i++)
|
for (i=0 ; i<4 ; i++)
|
||||||
{
|
{
|
||||||
d = DotProduct(frustum[i].normal, org)-frustum[i].dist;
|
d = DotProduct(frustum[i].normal, org)-frustum[i].dist;
|
||||||
if (d < -radius)
|
if (d <= -radius)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -387,6 +387,9 @@ void GLR_AddDynamicLights (msurface_t *surf)
|
||||||
if ( !(surf->dlightbits & (1<<lnum) ) )
|
if ( !(surf->dlightbits & (1<<lnum) ) )
|
||||||
continue; // not lit by this light
|
continue; // not lit by this light
|
||||||
|
|
||||||
|
if (cl_dlights[lnum].nodynamic)
|
||||||
|
continue;
|
||||||
|
|
||||||
rad = cl_dlights[lnum].radius;
|
rad = cl_dlights[lnum].radius;
|
||||||
dist = DotProduct (cl_dlights[lnum].origin, surf->plane->normal) -
|
dist = DotProduct (cl_dlights[lnum].origin, surf->plane->normal) -
|
||||||
surf->plane->dist;
|
surf->plane->dist;
|
||||||
|
@ -452,6 +455,9 @@ void GLR_AddDynamicLightNorms (msurface_t *surf)
|
||||||
if ( !(surf->dlightbits & (1<<lnum) ) )
|
if ( !(surf->dlightbits & (1<<lnum) ) )
|
||||||
continue; // not lit by this light
|
continue; // not lit by this light
|
||||||
|
|
||||||
|
if (cl_dlights[lnum].nodynamic)
|
||||||
|
continue;
|
||||||
|
|
||||||
rad = cl_dlights[lnum].radius;
|
rad = cl_dlights[lnum].radius;
|
||||||
dist = DotProduct (cl_dlights[lnum].origin, surf->plane->normal) -
|
dist = DotProduct (cl_dlights[lnum].origin, surf->plane->normal) -
|
||||||
surf->plane->dist;
|
surf->plane->dist;
|
||||||
|
|
|
@ -263,12 +263,26 @@ void GLSCR_UpdateScreen (void)
|
||||||
|
|
||||||
char *GLVID_GetRGBInfo(int prepadbytes, int *truewidth, int *trueheight)
|
char *GLVID_GetRGBInfo(int prepadbytes, int *truewidth, int *trueheight)
|
||||||
{ //returns a BZ_Malloced array
|
{ //returns a BZ_Malloced array
|
||||||
|
extern qboolean gammaworks;
|
||||||
|
int i, c;
|
||||||
qbyte *ret = BZ_Malloc(prepadbytes + glwidth*glheight*3);
|
qbyte *ret = BZ_Malloc(prepadbytes + glwidth*glheight*3);
|
||||||
|
|
||||||
glReadPixels (glx, gly, glwidth, glheight, GL_RGB, GL_UNSIGNED_BYTE, ret + prepadbytes);
|
glReadPixels (glx, gly, glwidth, glheight, GL_RGB, GL_UNSIGNED_BYTE, ret + prepadbytes);
|
||||||
|
|
||||||
*truewidth = glwidth;
|
*truewidth = glwidth;
|
||||||
*trueheight = glheight;
|
*trueheight = glheight;
|
||||||
|
|
||||||
|
if (gammaworks)
|
||||||
|
{
|
||||||
|
c = prepadbytes+glwidth*glheight*3;
|
||||||
|
for (i=prepadbytes ; i<c ; i+=3)
|
||||||
|
{
|
||||||
|
extern qbyte gammatable[256];
|
||||||
|
ret[i+0] = gammatable[ret[i+0]];
|
||||||
|
ret[i+1] = gammatable[ret[i+1]];
|
||||||
|
ret[i+2] = gammatable[ret[i+2]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
static sizebuf_t *writedest;
|
static sizebuf_t *writedest;
|
||||||
static client_t *cldest;
|
static client_t *cldest;
|
||||||
static int majortype;
|
static int majortype;
|
||||||
|
@ -2153,3 +2155,4 @@ void NPP_MVDWriteByte(qbyte data, client_t *to, int broadcast) //replacement wri
|
||||||
NPP_MVDCheckFlush();
|
NPP_MVDCheckFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
//okay, so these are a quick but easy hack
|
//okay, so these are a quick but easy hack
|
||||||
int QC_RegisterFieldVar(struct progfuncs_s *progfuncs, unsigned int type, char *name, int requestedpos, int origionalofs);
|
int QC_RegisterFieldVar(struct progfuncs_s *progfuncs, unsigned int type, char *name, int requestedpos, int origionalofs);
|
||||||
void ED_Print (struct progfuncs_s *progfuncs, struct edict_s *ed);
|
void ED_Print (struct progfuncs_s *progfuncs, struct edict_s *ed);
|
||||||
|
@ -8320,3 +8322,4 @@ void PR_RegisterFields(void) //it's just easier to do it this way.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
//#ifdef _DEBUG
|
||||||
#define NEWSAVEFORMAT
|
#define NEWSAVEFORMAT
|
||||||
//#endif
|
//#endif
|
||||||
|
@ -1117,3 +1119,4 @@ void SV_Loadgame_f (void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -514,6 +514,9 @@ typedef struct {
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
int tcpsocket;
|
||||||
|
int writedest; //doesn't bother if it's not valid demo_both is safe
|
||||||
|
|
||||||
|
|
||||||
demobuf_t *dbuf;
|
demobuf_t *dbuf;
|
||||||
dbuffer_t dbuffer;
|
dbuffer_t dbuffer;
|
||||||
|
|
|
@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
qboolean sv_allow_cheats;
|
qboolean sv_allow_cheats;
|
||||||
|
|
||||||
int fp_messages=4, fp_persecond=4, fp_secondsdead=10;
|
int fp_messages=4, fp_persecond=4, fp_secondsdead=10;
|
||||||
|
@ -1583,3 +1585,5 @@ void SV_InitOperatorCommands (void)
|
||||||
|
|
||||||
cl_warncmd.value = 1;
|
cl_warncmd.value = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
void NPP_MVDWriteByte(qbyte data, client_t *to, int broadcast);
|
void NPP_MVDWriteByte(qbyte data, client_t *to, int broadcast);
|
||||||
|
|
||||||
void SV_New_f (void);
|
void SV_New_f (void);
|
||||||
|
@ -582,3 +585,4 @@ void SV_Demo_Init(void)
|
||||||
// Cmd_AddCommand("svrecord", SV_RecordDemo_f);
|
// Cmd_AddCommand("svrecord", SV_RecordDemo_f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
void SV_CleanupEnts(void);
|
void SV_CleanupEnts(void);
|
||||||
|
|
||||||
extern qboolean pr_udc_exteffect_enabled;
|
extern qboolean pr_udc_exteffect_enabled;
|
||||||
|
@ -2226,3 +2228,4 @@ void SV_CleanupEnts(void)
|
||||||
}
|
}
|
||||||
needcleanup=0;
|
needcleanup=0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
#ifndef CLIENTONLY
|
||||||
extern int total_loading_size, current_loading_size, loading_stage;
|
extern int total_loading_size, current_loading_size, loading_stage;
|
||||||
char *T_GetString(int num);
|
char *T_GetString(int num);
|
||||||
|
|
||||||
|
@ -1002,3 +1003,5 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
|
||||||
SCR_BeginLoadingPlaque();
|
SCR_BeginLoadingPlaque();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
#ifndef CLIENTONLY
|
||||||
#define Q2EDICT_NUM(i) (q2edict_t*)((char *)ge->edicts+i*ge->edict_size)
|
#define Q2EDICT_NUM(i) (q2edict_t*)((char *)ge->edicts+i*ge->edict_size)
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -3465,3 +3466,5 @@ void SV_Init (quakeparms_t *parms)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -21,6 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============
|
=============
|
||||||
SV_CheckBottom
|
SV_CheckBottom
|
||||||
|
@ -447,3 +449,4 @@ void SV_MoveToGoal (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
#ifndef CLIENTONLY
|
||||||
#include "winquake.h"
|
#include "winquake.h"
|
||||||
|
|
||||||
#define Q_strncatz strncat
|
#define Q_strncatz strncat
|
||||||
|
@ -838,7 +839,7 @@ void SV_MVDStop (int reason)
|
||||||
|
|
||||||
SV_BroadcastPrintf (PRINT_CHAT, "Server recording canceled, demo removed\n");
|
SV_BroadcastPrintf (PRINT_CHAT, "Server recording canceled, demo removed\n");
|
||||||
|
|
||||||
// Cvar_SetROM(&serverdemo, "");
|
Cvar_ForceSet(Cvar_Get("serverdemo", "", CVAR_NOSET, ""), "");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -854,22 +855,33 @@ void SV_MVDStop (int reason)
|
||||||
|
|
||||||
SV_MVDWritePackets(demo.parsecount - demo.lastwritten + 1);
|
SV_MVDWritePackets(demo.parsecount - demo.lastwritten + 1);
|
||||||
// finish up
|
// finish up
|
||||||
if (!demo.disk)
|
|
||||||
|
if (demo.file)
|
||||||
{
|
{
|
||||||
fwrite(svs.demomem, 1, demo.size - demo_size, demo.file);
|
if (!demo.disk)
|
||||||
fflush(demo.file);
|
{
|
||||||
|
fwrite(svs.demomem, 1, demo.size - demo_size, demo.file);
|
||||||
|
fflush(demo.file);
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose (demo.file);
|
||||||
|
|
||||||
|
demo.file = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UDP_CloseSocket(demo.tcpsocket);
|
||||||
|
demo.tcpsocket = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose (demo.file);
|
|
||||||
|
|
||||||
demo.file = NULL;
|
|
||||||
sv.mvdrecording = false;
|
sv.mvdrecording = false;
|
||||||
if (!reason)
|
if (!reason)
|
||||||
SV_BroadcastPrintf (PRINT_CHAT, "Server recording completed\n");
|
SV_BroadcastPrintf (PRINT_CHAT, "Server recording completed\n");
|
||||||
else
|
else
|
||||||
SV_BroadcastPrintf (PRINT_CHAT, "Server recording stoped\nMax demo size exceeded\n");
|
SV_BroadcastPrintf (PRINT_CHAT, "Server recording stoped\nMax demo size exceeded\n");
|
||||||
|
|
||||||
// Cvar_SetROM(&serverdemo, "");
|
Cvar_ForceSet(Cvar_Get("serverdemo", "", CVAR_NOSET, ""), "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -984,13 +996,17 @@ static char *SV_PrintTeams(void)
|
||||||
if (numcl == 2) // duel
|
if (numcl == 2) // duel
|
||||||
{
|
{
|
||||||
_snprintf(buf, sizeof(buf), "team1 %s\nteam2 %s\n", clients[0]->name, clients[1]->name);
|
_snprintf(buf, sizeof(buf), "team1 %s\nteam2 %s\n", clients[0]->name, clients[1]->name);
|
||||||
} else if (!teamplay.value) // ffa
|
}
|
||||||
|
else if (!teamplay.value) // ffa
|
||||||
{
|
{
|
||||||
_snprintf(buf, sizeof(buf), "players:\n");
|
_snprintf(buf, sizeof(buf), "players:\n");
|
||||||
for (i = 0; i < numcl; i++)
|
for (i = 0; i < numcl; i++)
|
||||||
_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %s\n", clients[i]->name);
|
_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %s\n", clients[i]->name);
|
||||||
} else { // teamplay
|
}
|
||||||
for (j = 0; j < numt; j++) {
|
else
|
||||||
|
{ // teamplay
|
||||||
|
for (j = 0; j < numt; j++)
|
||||||
|
{
|
||||||
_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "team %s:\n", teams[j]);
|
_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "team %s:\n", teams[j]);
|
||||||
for (i = 0; i < numcl; i++)
|
for (i = 0; i < numcl; i++)
|
||||||
if (!strcmp(Info_ValueForKey(clients[i]->userinfo, "team"), teams[j]))
|
if (!strcmp(Info_ValueForKey(clients[i]->userinfo, "team"), teams[j]))
|
||||||
|
@ -1004,13 +1020,13 @@ static char *SV_PrintTeams(void)
|
||||||
return va("%s",buf);
|
return va("%s",buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SV_MVD_Record (char *name)
|
static qboolean SV_MVD_Record (char *name, int tcpsocket)
|
||||||
{
|
{
|
||||||
sizebuf_t buf;
|
sizebuf_t buf;
|
||||||
char buf_data[MAX_QWMSGLEN];
|
char buf_data[MAX_QWMSGLEN];
|
||||||
int n, i;
|
int n, i;
|
||||||
char *s, info[MAX_INFO_STRING], path[MAX_OSPATH];
|
char *s, info[MAX_INFO_STRING], path[MAX_OSPATH];
|
||||||
|
|
||||||
client_t *player;
|
client_t *player;
|
||||||
char *gamedir;
|
char *gamedir;
|
||||||
int seq = 1;
|
int seq = 1;
|
||||||
|
@ -1022,56 +1038,66 @@ static void SV_MVD_Record (char *name)
|
||||||
demo.recorder.frames[i].entities.max_entities = MAX_MVDPACKET_ENTITIES;
|
demo.recorder.frames[i].entities.max_entities = MAX_MVDPACKET_ENTITIES;
|
||||||
demo.recorder.frames[i].entities.entities = demo_entities[i];
|
demo.recorder.frames[i].entities.entities = demo_entities[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
MVDBuffer_Init(&demo.dbuffer, demo.buffer, sizeof(demo.buffer));
|
MVDBuffer_Init(&demo.dbuffer, demo.buffer, sizeof(demo.buffer));
|
||||||
MVDSetMsgBuf(NULL, &demo.frames[0].buf);
|
MVDSetMsgBuf(NULL, &demo.frames[0].buf);
|
||||||
|
|
||||||
demo.datagram.maxsize = sizeof(demo.datagram_data);
|
demo.datagram.maxsize = sizeof(demo.datagram_data);
|
||||||
demo.datagram.data = demo.datagram_data;
|
demo.datagram.data = demo.datagram_data;
|
||||||
|
|
||||||
demo.file = fopen (name, "wb");
|
if (name)
|
||||||
if (!demo.file)
|
|
||||||
{
|
{
|
||||||
Con_Printf ("ERROR: couldn't open %s\n", name);
|
demo.file = fopen (name, "wb");
|
||||||
return;
|
if (!demo.file)
|
||||||
}
|
|
||||||
|
|
||||||
SV_InitRecord();
|
|
||||||
|
|
||||||
s = name + strlen(name);
|
|
||||||
while (*s != '/') s--;
|
|
||||||
Q_strncpyz(demo.name, s+1, sizeof(demo.name));
|
|
||||||
Q_strncpyz(demo.path, sv_demoDir.string, sizeof(demo.path));
|
|
||||||
|
|
||||||
if (!*demo.path)
|
|
||||||
Q_strncpyz(demo.path, ".", MAX_OSPATH);
|
|
||||||
|
|
||||||
SV_BroadcastPrintf (PRINT_CHAT, "Server starts recording (%s):\n%s\n", demo.disk ? "disk" : "memory", demo.name);
|
|
||||||
// Cvar_SetROM(&serverdemo, demo.name);
|
|
||||||
|
|
||||||
Q_strncpyz(path, name, MAX_OSPATH);
|
|
||||||
Q_strncpyz(path + strlen(path) - 3, "txt", MAX_OSPATH - strlen(path) + 3);
|
|
||||||
|
|
||||||
if (sv_demotxt.value)
|
|
||||||
{
|
|
||||||
FILE *f;
|
|
||||||
|
|
||||||
f = fopen (path, "w+t");
|
|
||||||
if (f != NULL)
|
|
||||||
{
|
{
|
||||||
char buf[2000];
|
Con_Printf ("ERROR: couldn't open %s\n", name);
|
||||||
date_t date;
|
return false;
|
||||||
|
|
||||||
SV_TimeOfDay(&date);
|
|
||||||
|
|
||||||
_snprintf(buf, sizeof(buf), "date %s\nmap %s\nteamplay %d\ndeathmatch %d\ntimelimit %d\n%s",date.str, sv.name, (int)teamplay.value, (int)deathmatch.value, (int)timelimit.value, SV_PrintTeams());
|
|
||||||
fwrite(buf, strlen(buf),1,f);
|
|
||||||
fflush(f);
|
|
||||||
fclose(f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SV_InitRecord();
|
||||||
|
|
||||||
|
s = name + strlen(name);
|
||||||
|
while (*s != '/') s--;
|
||||||
|
Q_strncpyz(demo.name, s+1, sizeof(demo.name));
|
||||||
|
Q_strncpyz(demo.path, sv_demoDir.string, sizeof(demo.path));
|
||||||
|
|
||||||
|
if (!*demo.path)
|
||||||
|
Q_strncpyz(demo.path, ".", MAX_OSPATH);
|
||||||
|
|
||||||
|
SV_BroadcastPrintf (PRINT_CHAT, "Server starts recording (%s):\n%s\n", demo.disk ? "disk" : "memory", demo.name);
|
||||||
|
Cvar_ForceSet(Cvar_Get("serverdemo", "", CVAR_NOSET, ""), demo.name);
|
||||||
|
|
||||||
|
Q_strncpyz(path, name, MAX_OSPATH);
|
||||||
|
Q_strncpyz(path + strlen(path) - 3, "txt", MAX_OSPATH - strlen(path) + 3);
|
||||||
|
|
||||||
|
if (sv_demotxt.value)
|
||||||
|
{
|
||||||
|
FILE *f;
|
||||||
|
|
||||||
|
f = fopen (path, "w+t");
|
||||||
|
if (f != NULL)
|
||||||
|
{
|
||||||
|
char buf[2000];
|
||||||
|
date_t date;
|
||||||
|
|
||||||
|
SV_TimeOfDay(&date);
|
||||||
|
|
||||||
|
_snprintf(buf, sizeof(buf), "date %s\nmap %s\nteamplay %d\ndeathmatch %d\ntimelimit %d\n%s",date.str, sv.name, (int)teamplay.value, (int)deathmatch.value, (int)timelimit.value, SV_PrintTeams());
|
||||||
|
fwrite(buf, strlen(buf),1,f);
|
||||||
|
fflush(f);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Sys_remove(path);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (demo.tcpsocket)
|
||||||
|
return false;
|
||||||
|
SV_BroadcastPrintf (PRINT_CHAT, "Server starts recording to network client\n");
|
||||||
|
demo.tcpsocket = tcpsocket;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
Sys_remove(path);
|
|
||||||
|
|
||||||
sv.mvdrecording = true;
|
sv.mvdrecording = true;
|
||||||
demo.pingtime = demo.time = sv.time;
|
demo.pingtime = demo.time = sv.time;
|
||||||
|
@ -1327,6 +1353,7 @@ static void SV_MVD_Record (char *name)
|
||||||
|
|
||||||
SV_WriteSetMVDMessage();
|
SV_WriteSetMVDMessage();
|
||||||
// done
|
// done
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1485,7 +1512,7 @@ void SV_MVD_Record_f (void)
|
||||||
COM_DefaultExtension(name, ".mvd");
|
COM_DefaultExtension(name, ".mvd");
|
||||||
|
|
||||||
|
|
||||||
SV_MVD_Record (name);
|
SV_MVD_Record (name, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1720,7 +1747,7 @@ void SV_MVDEasyRecord_f (void)
|
||||||
} while (f);
|
} while (f);
|
||||||
}
|
}
|
||||||
|
|
||||||
SV_MVD_Record (name2);
|
SV_MVD_Record (name2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SV_MVDList_f (void)
|
void SV_MVDList_f (void)
|
||||||
|
@ -2097,3 +2124,4 @@ void SV_MVDInit(void)
|
||||||
Cmd_AddCommand ("rmdemonum", SV_MVDRemoveNum_f);
|
Cmd_AddCommand ("rmdemonum", SV_MVDRemoveNum_f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
// sv_nchan.c, user reliable data stream writes
|
// sv_nchan.c, user reliable data stream writes
|
||||||
|
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
// check to see if client block will fit, if not, rotate buffers
|
// check to see if client block will fit, if not, rotate buffers
|
||||||
void ClientReliableCheckBlock(client_t *cl, int maxsize)
|
void ClientReliableCheckBlock(client_t *cl, int maxsize)
|
||||||
|
@ -258,3 +259,5 @@ void ClientReliableWrite_ZLib(client_t *cl, void *data, int len)
|
||||||
// return i;
|
// return i;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
// sv_phys.c
|
// sv_phys.c
|
||||||
|
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
#ifndef CLIENTONLY
|
||||||
extern nqglobalvars_t realpr_nqglobal_struct;
|
extern nqglobalvars_t realpr_nqglobal_struct;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2053,3 +2053,4 @@ void SV_SetMoveVars(void)
|
||||||
movevars.waterfriction = sv_waterfriction.value;
|
movevars.waterfriction = sv_waterfriction.value;
|
||||||
movevars.entgravity = 1.0;
|
movevars.entgravity = 1.0;
|
||||||
}
|
}
|
||||||
|
#endif
|
|
@ -1,5 +1,7 @@
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(MINGW)
|
#if defined(_WIN32) && !defined(MINGW)
|
||||||
#define inline //_inline //fix for stupid VC
|
#define inline //_inline //fix for stupid VC
|
||||||
#endif
|
#endif
|
||||||
|
@ -865,3 +867,4 @@ void Rank_Flush (void) //new game dir?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
|
@ -21,6 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
#define CHAN_AUTO 0
|
#define CHAN_AUTO 0
|
||||||
#define CHAN_WEAPON 1
|
#define CHAN_WEAPON 1
|
||||||
#define CHAN_VOICE 2
|
#define CHAN_VOICE 2
|
||||||
|
@ -1792,3 +1794,4 @@ void SV_SendMessagesToAll (void)
|
||||||
SV_SendClientMessages ();
|
SV_SendClientMessages ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -20,6 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
// sv_user.c -- server code for moving users
|
// sv_user.c -- server code for moving users
|
||||||
|
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#define Q2EDICT_NUM(i) (q2edict_t*)((char *)ge->edicts+i*ge->edict_size)
|
#define Q2EDICT_NUM(i) (q2edict_t*)((char *)ge->edicts+i*ge->edict_size)
|
||||||
#define Q2NUM_FOR_EDICT(ent) (((char *)ent - (char *)ge->edicts) / ge->edict_size)
|
#define Q2NUM_FOR_EDICT(ent) (((char *)ent - (char *)ge->edicts) / ge->edict_size)
|
||||||
|
@ -4814,3 +4817,4 @@ void SV_ClientThink (void)
|
||||||
SV_AirMove ();
|
SV_AirMove ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
|
|
||||||
#define Q2EDICT_NUM(i) (q2edict_t*)((char *)ge->edicts+i*ge->edict_size)
|
#define Q2EDICT_NUM(i) (q2edict_t*)((char *)ge->edicts+i*ge->edict_size)
|
||||||
|
|
||||||
#ifndef Q2SERVER
|
#ifndef Q2SERVER
|
||||||
|
@ -772,4 +774,4 @@ void SVQ2_Ents_Init(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "qwsvdef.h"
|
#include "qwsvdef.h"
|
||||||
|
|
||||||
|
#ifndef CLIENTONLY
|
||||||
/*
|
/*
|
||||||
|
|
||||||
entities never clip against themselves, or their owner
|
entities never clip against themselves, or their owner
|
||||||
|
@ -1888,3 +1889,4 @@ trace_t SVQ2_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue