mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
hopefully, everything will work that little bit better.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1072 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
87b0e0aa80
commit
c2930803d4
44 changed files with 498 additions and 505 deletions
|
@ -667,7 +667,7 @@ entity_state_t *CL_FindOldPacketEntity(int num)
|
|||
packet_entities_t *pack;
|
||||
if (!cl.validsequence)
|
||||
return NULL;
|
||||
pack = &cl.frames[(cl.validsequence)&UPDATE_MASK].packet_entities;
|
||||
pack = &cl.frames[(cls.netchan.incoming_sequence-1)&UPDATE_MASK].packet_entities;
|
||||
|
||||
for (pnum=0 ; pnum<pack->num_entities ; pnum++)
|
||||
{
|
||||
|
@ -962,9 +962,9 @@ void CLNQ_ParseDarkPlaces5Entities(void) //the things I do.. :o(
|
|||
//1: stepping monsters. These have frames and tick at 10fps.
|
||||
//2: physics. Objects moving acording to gravity.
|
||||
//3: both. This is really awkward. And I'm really lazy.
|
||||
cl.lerpents[to->number].lerprate = cl.time-cl.lerpents[to->number].lerptime; //time per update
|
||||
cl.lerpents[to->number].lerprate = cl.oldgametime-cl.lerpents[to->number].lerptime; //time per update
|
||||
cl.lerpents[to->number].frame = from->frame;
|
||||
cl.lerpents[to->number].lerptime = cl.time;
|
||||
cl.lerpents[to->number].lerptime = cl.oldgametime;
|
||||
|
||||
if (cl.lerpents[to->number].lerprate>0.2)
|
||||
cl.lerpents[to->number].lerprate=0.2;
|
||||
|
@ -974,7 +974,7 @@ void CLNQ_ParseDarkPlaces5Entities(void) //the things I do.. :o(
|
|||
// cl.lerpents[state->number].lerptime = newlerprate;
|
||||
// else
|
||||
if (to->frame == from->frame)
|
||||
newlerprate = cl.time-cl.lerpents[to->number].lerptime;
|
||||
newlerprate = cl.lerpents[to->number].lerprate;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1319,8 +1319,12 @@ void CL_RotateAroundTag(entity_t *ent, int num, int tagent, int tagnum)
|
|||
void V_AddEntity(entity_t *in)
|
||||
{
|
||||
entity_t *ent;
|
||||
|
||||
if (cl_numvisedicts == MAX_VISEDICTS)
|
||||
{
|
||||
Con_Printf("Visedict list is full!\n");
|
||||
return; // object list is full
|
||||
}
|
||||
ent = &cl_visedicts[cl_numvisedicts];
|
||||
cl_numvisedicts++;
|
||||
|
||||
|
@ -1391,6 +1395,11 @@ void CL_LinkPacketEntities (void)
|
|||
{
|
||||
s1 = &pack->entities[pnum];
|
||||
|
||||
if (cl_numvisedicts == MAX_VISEDICTS)
|
||||
{
|
||||
Con_Printf("Too many visible entities\n");
|
||||
break;
|
||||
}
|
||||
ent = &cl_visedicts[cl_numvisedicts];
|
||||
#ifdef Q3SHADERS
|
||||
ent->forcedshader = NULL;
|
||||
|
@ -1398,7 +1407,7 @@ void CL_LinkPacketEntities (void)
|
|||
|
||||
//figure out the lerp factor
|
||||
if (cl.lerpents[s1->number].lerprate<=0)
|
||||
ent->lerpfrac = 1;
|
||||
ent->lerpfrac = 0;
|
||||
else
|
||||
ent->lerpfrac = 1-(cl.time-cl.lerpents[s1->number].lerptime)/cl.lerpents[s1->number].lerprate;
|
||||
if (ent->lerpfrac<0)
|
||||
|
|
|
@ -834,7 +834,7 @@ void VARGS CL_SendClientCommand(qboolean reliable, char *format, ...)
|
|||
// Con_Printf("Queing stringcmd %s\n", string);
|
||||
|
||||
#ifdef Q3CLIENT
|
||||
if (cls.q2server==2)
|
||||
if (cls.protocol == CP_QUAKE3)
|
||||
{
|
||||
CLQ3_SendClientCommand("%s", string);
|
||||
return;
|
||||
|
@ -891,6 +891,8 @@ int CL_RemoveClientCommands(char *command)
|
|||
first->next = next;
|
||||
removed++;
|
||||
}
|
||||
else
|
||||
first = first->next;
|
||||
}
|
||||
|
||||
return removed;
|
||||
|
@ -952,7 +954,8 @@ unsigned long _stdcall CL_IndepPhysicsThread(void *param)
|
|||
|
||||
sleeptime = 1000/fps;
|
||||
|
||||
Sleep(sleeptime);
|
||||
if (sleeptime)
|
||||
Sleep(sleeptime);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1024,32 +1027,6 @@ void CL_SendCmd (float frametime)
|
|||
|
||||
extern cvar_t cl_maxfps;
|
||||
|
||||
#ifdef Q3CLIENT
|
||||
if (cls.q2server==2)
|
||||
{ //guess what? q3 rules don't require network packet limiting!
|
||||
usercmd_t ncmd;
|
||||
|
||||
memset(&ncmd, 0, sizeof(ncmd));
|
||||
ncmd.msec = frametime*1000;
|
||||
|
||||
CL_BaseMove (&ncmd, 0);
|
||||
|
||||
// allow mice or other external controllers to add to the move
|
||||
IN_Move (&ncmd, 0);
|
||||
|
||||
// if we are spectator, try autocam
|
||||
if (cl.spectator)
|
||||
Cam_Track(0, &ncmd);
|
||||
|
||||
CL_FinishMove(&ncmd, (int)(frametime*1000), 0);
|
||||
|
||||
Cam_FinishMove(0, &ncmd);
|
||||
|
||||
CLQ3_SendCmd(&ncmd);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cls.demoplayback != DPB_NONE)
|
||||
{
|
||||
if (cls.demoplayback == DPB_MVD)
|
||||
|
@ -1152,10 +1129,10 @@ void CL_SendCmd (float frametime)
|
|||
independantphysics[plnum].msec = msecstouse;
|
||||
}
|
||||
|
||||
if (!CL_FilterTime(msecstouse, cl_netfps.value<=0?cl_maxfps.value:cl_netfps.value) && msecstouse<255 && cls.state == ca_active)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// if (!CL_FilterTime(msecstouse, cl_netfps.value<=0?cl_maxfps.value:cl_netfps.value) && msecstouse<255 && cls.state == ca_active)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
#ifdef NQPROT
|
||||
if (cls.protocol == CP_NETQUAKE)
|
||||
|
@ -1168,6 +1145,15 @@ void CL_SendCmd (float frametime)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef Q3CLIENT
|
||||
if (cls.protocol == CP_QUAKE3)
|
||||
{
|
||||
CLQ3_SendCmd(&independantphysics[0]);
|
||||
memset(&independantphysics[0], 0, sizeof(independantphysics[0]));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Con_Printf("sending %i msecs\n", msecstouse);
|
||||
|
||||
seq_hash = cls.netchan.outgoing_sequence;
|
||||
|
@ -1233,6 +1219,7 @@ void CL_SendCmd (float frametime)
|
|||
i = cls.netchan.outgoing_sequence & UPDATE_MASK;
|
||||
cmd = &cl.frames[i].cmd[plnum];
|
||||
*cmd = independantphysics[plnum];
|
||||
cl.frames[i].senttime = realtime;
|
||||
memset(&independantphysics[plnum], 0, sizeof(independantphysics[plnum]));
|
||||
|
||||
#ifdef Q2CLIENT
|
||||
|
|
|
@ -418,7 +418,7 @@ void CL_SendConnectPacket (
|
|||
#endif
|
||||
|
||||
#ifdef Q3CLIENT
|
||||
if (cls.q2server==2)
|
||||
if (cls.protocol == CP_QUAKE3)
|
||||
{ //q3 requires some very strange things.
|
||||
CLQ3_SendConnectPacket(adr);
|
||||
return;
|
||||
|
@ -494,7 +494,7 @@ void CL_CheckForResend (void)
|
|||
{
|
||||
#ifdef Q3CLIENT
|
||||
case GT_QUAKE3:
|
||||
cls.q2server = 2;
|
||||
cls.protocol = CP_QUAKE3;
|
||||
break;
|
||||
#endif
|
||||
#ifdef Q2CLIENT
|
||||
|
@ -602,11 +602,11 @@ void CL_BeginServerReconnect(void)
|
|||
{
|
||||
#ifndef CLIENTONLY
|
||||
if (isDedicated)
|
||||
#endif
|
||||
{
|
||||
Con_TPrintf (TLC_DEDICATEDCANNOTCONNECT);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
connect_time = 0;
|
||||
CL_CheckForResend();
|
||||
}
|
||||
|
@ -972,6 +972,7 @@ void CL_Disconnect (void)
|
|||
SCR_EndLoadingPlaque();
|
||||
|
||||
cls.protocol = CP_UNKNOWN;
|
||||
cl.servercount = 0;
|
||||
}
|
||||
|
||||
#undef serverrunning
|
||||
|
@ -1663,7 +1664,7 @@ void CL_ConnectionlessPacket (void)
|
|||
if (!strcmp(com_token, "hallengeResponse"))
|
||||
{
|
||||
#ifdef Q3CLIENT
|
||||
cls.q2server = 2;
|
||||
cls.protocol = CP_QUAKE3;
|
||||
cls.challenge = atoi(s+17);
|
||||
CL_SendConnectPacket (0, 0/*, ...*/);
|
||||
return;
|
||||
|
@ -1709,9 +1710,9 @@ void CL_ConnectionlessPacket (void)
|
|||
{
|
||||
goto client_connect;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
cls.protocol = CP_QUAKEWORLD;
|
||||
#endif
|
||||
cls.challenge = atoi(s);
|
||||
|
||||
for(;;)
|
||||
|
@ -1807,8 +1808,11 @@ void CL_ConnectionlessPacket (void)
|
|||
|
||||
if (c == 'd') //note - this conflicts with qw masters, our browser uses a different socket.
|
||||
{
|
||||
Con_Printf("Disconnect\n");
|
||||
CL_Disconnect_f();
|
||||
if (cls.demoplayback != DPB_NONE)
|
||||
{
|
||||
Con_Printf("Disconnect\n");
|
||||
CL_Disconnect_f();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1829,7 +1833,7 @@ client_connect: //fixme: make function
|
|||
Netchan_Setup (NS_CLIENT, &cls.netchan, net_from, cls.qport);
|
||||
cls.netchan.compress = compress;
|
||||
#ifdef Q3CLIENT
|
||||
if (cls.q2server < 2)
|
||||
if (cls.protocol != CP_QUAKE3)
|
||||
#endif
|
||||
CL_SendClientCommand(true, "new");
|
||||
cls.state = ca_connected;
|
||||
|
@ -1901,6 +1905,13 @@ client_connect: //fixme: make function
|
|||
Con_Print (s);
|
||||
return;
|
||||
}
|
||||
if (c == 'r')//dp's reject
|
||||
{
|
||||
s = MSG_ReadString ();
|
||||
Con_Printf("r%s\n", s);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// ping from somewhere
|
||||
if (c == A2A_PING)
|
||||
|
@ -1965,7 +1976,7 @@ void CLNQ_ConnectionlessPacket(void)
|
|||
|
||||
case CCREP_REJECT:
|
||||
s = MSG_ReadString();
|
||||
Con_Printf("Connect failed\n%s\n");
|
||||
Con_Printf("Connect failed\n%s\n", s);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -2357,6 +2368,8 @@ void CL_Init (void)
|
|||
|
||||
Cvar_Register (&host_mapname, "Scripting");
|
||||
|
||||
Cvar_Register (&cl_indepphysics, cl_controlgroup);
|
||||
|
||||
#ifdef IRCCLIENT
|
||||
Cmd_AddCommand ("irc", CL_IRC_f);
|
||||
#endif
|
||||
|
|
|
@ -373,7 +373,16 @@ void CL_FinishDownload(char *filename, char *tempname)
|
|||
Skin_FlushSkin(filename);
|
||||
}
|
||||
}
|
||||
/*
|
||||
void MapDownload(char *name, qboolean gotornot)
|
||||
{
|
||||
if (gotornot) //yay
|
||||
return;
|
||||
|
||||
|
||||
CL_EnqueDownload(filename, false, false);
|
||||
}
|
||||
*/
|
||||
/*
|
||||
===============
|
||||
CL_CheckOrDownloadFile
|
||||
|
@ -407,6 +416,15 @@ qboolean CL_CheckOrDownloadFile (char *filename, int nodelay)
|
|||
|
||||
SCR_EndLoadingPlaque(); //release console.
|
||||
|
||||
/* if (1)
|
||||
if (strncmp(filename, "maps/", 5))
|
||||
if (strcmp(filename + strlen(filename)-4, ".bsp"))
|
||||
{
|
||||
char base[MAX_QPATH];
|
||||
COM_FileBase(filename, base);
|
||||
HTTP_CL_Get(va("http://maps.quakeworld.nu/%s/download/", base), filename, MapDownload);
|
||||
}
|
||||
*/
|
||||
if (CL_EnqueDownload(filename, false, false))
|
||||
return !nodelay;
|
||||
else
|
||||
|
@ -1314,6 +1332,9 @@ void CL_ParseServerData (void)
|
|||
Con_TPrintf (TLC_LINEBREAK_NEWLEVEL);
|
||||
Con_TPrintf (TLC_PC_PS_NL, 2, str);
|
||||
|
||||
if (CL_RemoveClientCommands("new")) //mvdsv is really appaling some times.
|
||||
Con_Printf("Multiple 'new' commands?!?!? This server needs reinstalling!\n");
|
||||
|
||||
memset(cl.sound_name, 0, sizeof(cl.sound_name));
|
||||
#ifdef PEXT_PK3DOWNLOADS
|
||||
if (cls.fteprotocolextensions & PEXT_PK3DOWNLOADS) //instead of going for a soundlist, go for the pk3 list instead. The server will make us go for the soundlist after.
|
||||
|
@ -2190,7 +2211,8 @@ void CL_ParseStartSoundPacket(void)
|
|||
S_StartSound (ent, channel, cl.sound_precache[sound_num], pos, volume/255.0, attenuation);
|
||||
|
||||
|
||||
TP_CheckPickupSound(cl.sound_name[sound_num], pos);
|
||||
if (ent == cl.playernum[0]+1)
|
||||
TP_CheckPickupSound(cl.sound_name[sound_num], pos);
|
||||
}
|
||||
|
||||
#ifdef Q2CLIENT
|
||||
|
@ -2296,6 +2318,9 @@ void CLNQ_ParseStartSoundPacket(void)
|
|||
pos[i] = MSG_ReadCoord ();
|
||||
|
||||
S_StartSound (ent, channel, cl.sound_precache[sound_num], pos, volume/255.0, attenuation);
|
||||
|
||||
if (ent == cl.playernum[0]+1)
|
||||
TP_CheckPickupSound(cl.sound_name[sound_num], pos);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2632,7 +2657,7 @@ void CL_MuzzleFlash (void)
|
|||
if ((unsigned)(i) <= MAX_CLIENTS && i > 0)
|
||||
{
|
||||
// don't draw our own muzzle flash in gl if flashblending
|
||||
if (i-1 == cl.playernum[0] && r_flashblend.value)
|
||||
if (i-1 == cl.playernum[0] && r_flashblend.value && qrenderer == QR_OPENGL)
|
||||
return;
|
||||
|
||||
pl = &cl.frames[parsecountmod].playerstate[i-1];
|
||||
|
@ -2654,8 +2679,8 @@ void CL_MuzzleFlash (void)
|
|||
dl->color[1] = 0.1;
|
||||
dl->color[2] = 0.05;
|
||||
|
||||
dl->channelfade[0] = 1.5;
|
||||
dl->channelfade[1] = 0.75;
|
||||
dl->channelfade[0] = 1.5;
|
||||
dl->channelfade[1] = 0.75;
|
||||
dl->channelfade[2] = 0.375;
|
||||
}
|
||||
|
||||
|
@ -3878,6 +3903,7 @@ void CLNQ_ParseServerMessage (void)
|
|||
received_framecount = host_framecount;
|
||||
cl.last_servermessage = realtime;
|
||||
cl.oldgametime = cl.gametime;
|
||||
cl.oldgametimemark = cl.gametimemark;
|
||||
cl.gametime = MSG_ReadFloat();
|
||||
cl.gametimemark = realtime;
|
||||
if (nq_dp_protocol<5)
|
||||
|
|
|
@ -555,9 +555,20 @@ void CL_PredictMovePNum (int pnum)
|
|||
|
||||
if (cl.oldgametime)
|
||||
{
|
||||
cl.time = cl.gametime;
|
||||
if (cl.time > realtime)
|
||||
cl.time = realtime;
|
||||
float want;
|
||||
float off;
|
||||
|
||||
want = cl.oldgametime + realtime - cl.gametimemark;
|
||||
off = (want - cl.time);
|
||||
if (want>cl.time)
|
||||
cl.time = want;
|
||||
|
||||
// Con_Printf("Drifted to %f off by %f\n", cl.time, off);
|
||||
|
||||
if (cl.time > cl.gametime)
|
||||
cl.time = cl.gametime;
|
||||
if (cl.time < cl.oldgametime)
|
||||
cl.time = cl.oldgametime;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -612,6 +623,31 @@ void CL_PredictMovePNum (int pnum)
|
|||
old = CL_FindOldPacketEntity (cl.viewentity[pnum]);
|
||||
if (state)
|
||||
{
|
||||
float f;
|
||||
extern cvar_t cl_nolerp;
|
||||
|
||||
//figure out the lerp factor
|
||||
if (cl.lerpents[state->number].lerprate<=0)
|
||||
f = 1;
|
||||
else
|
||||
f = (cl.time-cl.lerpents[state->number].lerptime)/cl.lerpents[state->number].lerprate;
|
||||
if (f<0)
|
||||
f=0;
|
||||
if (f>1)
|
||||
f=1;
|
||||
|
||||
// if (cl_nolerp.value)
|
||||
// f = 1;
|
||||
|
||||
|
||||
// calculate origin
|
||||
for (i=0 ; i<3 ; i++)
|
||||
lrp[i] = cl.lerpents[state->number].origin[i] +
|
||||
f * (state->origin[i] - cl.lerpents[state->number].origin[i]);
|
||||
|
||||
org = lrp;
|
||||
|
||||
/*
|
||||
if (old)
|
||||
{
|
||||
float f = (cl.time-cl.lerpents[cl.viewentity[pnum]].lerptime)/cl.lerpents[cl.viewentity[pnum]].lerprate;
|
||||
|
@ -632,6 +668,7 @@ void CL_PredictMovePNum (int pnum)
|
|||
org = state->origin;
|
||||
Con_Printf("No old\n");
|
||||
}
|
||||
*/
|
||||
|
||||
goto fixedorg;
|
||||
}
|
||||
|
|
|
@ -760,6 +760,10 @@ void SCR_CalcRefdef (void)
|
|||
}
|
||||
|
||||
r_refdef.fov_x = scr_fov.value;
|
||||
if (r_refdef.fov_x < 10)
|
||||
r_refdef.fov_x = 10;
|
||||
else if (r_refdef.fov_x > 170)
|
||||
r_refdef.fov_x = 170;
|
||||
r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.vrect.width, r_refdef.vrect.height);
|
||||
|
||||
|
||||
|
|
|
@ -289,7 +289,8 @@ typedef struct
|
|||
CP_UNKNOWN,
|
||||
CP_QUAKEWORLD,
|
||||
CP_NETQUAKE,
|
||||
CP_QUAKE2
|
||||
CP_QUAKE2,
|
||||
CP_QUAKE3
|
||||
} protocol;
|
||||
|
||||
qboolean resendinfo;
|
||||
|
@ -452,8 +453,8 @@ typedef struct
|
|||
// is rendering at. allways <= realtime
|
||||
float gametime;
|
||||
float gametimemark;
|
||||
float oldgametime; //used as the old time to lerp cl.time from.
|
||||
//if it's 0, cl.time will casually increase.
|
||||
float oldgametime; //used as the old time to lerp cl.time from.
|
||||
float oldgametimemark; //if it's 0, cl.time will casually increase.
|
||||
|
||||
vec3_t simorg[MAX_SPLITS];
|
||||
vec3_t simvel[MAX_SPLITS];
|
||||
|
|
|
@ -911,7 +911,7 @@ void Con_DrawInput (void)
|
|||
if (key_linepos == i) //cursor is at end
|
||||
{
|
||||
x = text[1] == '/'?2:1;
|
||||
fname = Cmd_CompleteCommand(text+x, true, con_commandmatch);
|
||||
fname = Cmd_CompleteCommand(text+x, true, true, con_commandmatch);
|
||||
if (fname) //we can compleate it to:
|
||||
{
|
||||
for (p = i-x; fname[p]>' '; p++)
|
||||
|
|
|
@ -1027,7 +1027,11 @@ static void ProcessMouse(mouse_t *mouse, usercmd_t *cmd, int pnum)
|
|||
if ( (in_strafe.state[pnum] & 1) || (lookstrafe.value && (in_mlook.state[pnum] & 1) ))
|
||||
cmd->sidemove += m_side.value * mouse_x;
|
||||
else
|
||||
{
|
||||
if ((int)((cl.viewangles[pnum][PITCH]+89.99)/180) & 1)
|
||||
mouse_x *= -1;
|
||||
cl.viewangles[pnum][YAW] -= m_yaw.value * mouse_x;
|
||||
}
|
||||
|
||||
if (in_mlook.state[pnum] & 1)
|
||||
V_StopPitchDrift (pnum);
|
||||
|
|
|
@ -227,7 +227,7 @@ qboolean Cmd_IsCommand (char *line)
|
|||
command[i] = s[i];
|
||||
command[i] = 0;
|
||||
|
||||
cmd = Cmd_CompleteCommand (command, true, -1);
|
||||
cmd = Cmd_CompleteCommand (command, true, false, -1);
|
||||
if (!cmd || strcmp (cmd, command) )
|
||||
return false; // just a chat message
|
||||
return true;
|
||||
|
@ -282,7 +282,7 @@ void CompleteCommand (qboolean force)
|
|||
int x=0;
|
||||
for (i = 1; ; i++)
|
||||
{
|
||||
cmd = Cmd_CompleteCommand (s, true, i);
|
||||
cmd = Cmd_CompleteCommand (s, true, true, i);
|
||||
if (!cmd)
|
||||
break;
|
||||
if (i == 1)
|
||||
|
@ -293,13 +293,13 @@ void CompleteCommand (qboolean force)
|
|||
Con_Printf("\n");
|
||||
}
|
||||
|
||||
cmd = Cmd_CompleteCommand (s, true, 2);
|
||||
cmd = Cmd_CompleteCommand (s, true, true, 2);
|
||||
if (!cmd || force)
|
||||
{
|
||||
if (!force)
|
||||
cmd = Cmd_CompleteCommand (s, false, 1);
|
||||
cmd = Cmd_CompleteCommand (s, false, true, 1);
|
||||
else
|
||||
cmd = Cmd_CompleteCommand (s, true, con_commandmatch);
|
||||
cmd = Cmd_CompleteCommand (s, true, true, con_commandmatch);
|
||||
if (cmd)
|
||||
{
|
||||
key_lines[edit_line][1] = '/';
|
||||
|
@ -312,7 +312,7 @@ void CompleteCommand (qboolean force)
|
|||
|
||||
// if (strlen(cmd)>strlen(s))
|
||||
{
|
||||
cmd = Cmd_CompleteCommand (s, true, 0);
|
||||
cmd = Cmd_CompleteCommand (s, true, true, 0);
|
||||
if (cmd && !strcmp(s, cmd)) //also a compleate var
|
||||
{
|
||||
key_lines[edit_line][key_linepos] = ' ';
|
||||
|
@ -323,7 +323,7 @@ void CompleteCommand (qboolean force)
|
|||
return;
|
||||
}
|
||||
}
|
||||
cmd = Cmd_CompleteCommand (s, false, 0);
|
||||
cmd = Cmd_CompleteCommand (s, false, true, 0);
|
||||
if (cmd)
|
||||
{
|
||||
i = key_lines[edit_line][1] == '/'?2:1;
|
||||
|
@ -344,7 +344,7 @@ void CompleteCommand (qboolean force)
|
|||
}
|
||||
|
||||
con_commandmatch++;
|
||||
if (!Cmd_CompleteCommand(s, true, con_commandmatch))
|
||||
if (!Cmd_CompleteCommand(s, true, true, con_commandmatch))
|
||||
con_commandmatch = 1;
|
||||
}
|
||||
|
||||
|
@ -424,7 +424,7 @@ void Key_Console (int key)
|
|||
|
||||
if (key == K_SPACE && con_current->commandcompletion)
|
||||
{
|
||||
if (keydown[K_SHIFT] && Cmd_CompleteCommand(key_lines[edit_line]+1, true, con_current->commandcompletion))
|
||||
if (keydown[K_SHIFT] && Cmd_CompleteCommand(key_lines[edit_line]+1, true, true, con_current->commandcompletion))
|
||||
{
|
||||
CompleteCommand (true);
|
||||
return;
|
||||
|
|
|
@ -918,6 +918,8 @@ void MasterInfo_ProcessHTTP(char *name, qboolean success)
|
|||
return;
|
||||
|
||||
el = COM_LoadTempFile(name);
|
||||
if (!el)
|
||||
return;
|
||||
while(*el)
|
||||
{
|
||||
s = el;
|
||||
|
@ -1362,12 +1364,16 @@ int CL_ReadServerInfo(char *msg, int servertype, qboolean favorite)
|
|||
Q_strncpyz(info->map, Info_ValueForKey(msg, "map"), sizeof(info->map));
|
||||
}
|
||||
|
||||
strcpy(details.info, msg);
|
||||
msg = msg+strlen(msg)+1;
|
||||
|
||||
info->players=details.numplayers = 0;
|
||||
if (!strchr(msg, '\n'))
|
||||
info->players = atoi(Info_ValueForKey(details.info, "clients"));
|
||||
else
|
||||
{
|
||||
int clnum;
|
||||
strcpy(details.info, msg);
|
||||
msg = msg+strlen(msg)+1;
|
||||
|
||||
info->players=details.numplayers = 0;
|
||||
for (clnum=0; clnum < MAX_CLIENTS; clnum++)
|
||||
{
|
||||
nl = strchr(msg, '\n');
|
||||
|
|
|
@ -333,7 +333,67 @@ static void PF_makevectors (progfuncs_t *prinst, struct globalvars_s *pr_globals
|
|||
AngleVectors (G_VECTOR(OFS_PARM0), csqcg.forward, csqcg.right, csqcg.up);
|
||||
}
|
||||
|
||||
static void PF_R_AddEntity(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
void QuaternainToAngleMatrix(float *quat, vec3_t *mat)
|
||||
{
|
||||
float xx = quat[0] * quat[0];
|
||||
float xy = quat[0] * quat[1];
|
||||
float xz = quat[0] * quat[2];
|
||||
float xw = quat[0] * quat[3];
|
||||
float yy = quat[1] * quat[1];
|
||||
float yz = quat[1] * quat[2];
|
||||
float yw = quat[1] * quat[3];
|
||||
float zz = quat[2] * quat[2];
|
||||
float zw = quat[2] * quat[3];
|
||||
mat[0][0] = 1 - 2 * ( yy + zz );
|
||||
mat[0][1] = 2 * ( xy - zw );
|
||||
mat[0][2] = 2 * ( xz + yw );
|
||||
mat[1][0] = 2 * ( xy + zw );
|
||||
mat[1][1] = 1 - 2 * ( xx + zz );
|
||||
mat[1][2] = 2 * ( yz - xw );
|
||||
mat[2][0] = 2 * ( xz - yw );
|
||||
mat[2][1] = 2 * ( yz + xw );
|
||||
mat[2][2] = 1 - 2 * ( xx + yy );
|
||||
}
|
||||
|
||||
void quaternion_multiply(float *a, float *b, float *c)
|
||||
{
|
||||
#define x1 a[0]
|
||||
#define y1 a[1]
|
||||
#define z1 a[2]
|
||||
#define w1 a[3]
|
||||
#define x2 b[0]
|
||||
#define y2 b[1]
|
||||
#define z2 b[2]
|
||||
#define w2 b[3]
|
||||
c[0] = w1*x2 + x1*w2 + y1*z2 - z1*y2;
|
||||
c[1] = w1*y2 + y1*w2 + z1*x2 - x1*z2;
|
||||
c[2] = w1*z2 + z1*w2 + x1*y2 - y1*x2;
|
||||
c[3] = w1*w2 - x1*x2 - y1*y2 - z1*z2;
|
||||
}
|
||||
|
||||
void quaternion_rotation(float pitch, float roll, float yaw, float angle, float *quat)
|
||||
{
|
||||
float sin_a, cos_a;
|
||||
|
||||
sin_a = sin( angle / 360 );
|
||||
cos_a = cos( angle / 360 );
|
||||
quat[0] = pitch * sin_a;
|
||||
quat[1] = yaw * sin_a;
|
||||
quat[2] = roll * sin_a;
|
||||
quat[3] = cos_a;
|
||||
}
|
||||
|
||||
void EularToQuaternian(vec3_t angles, float *quat)
|
||||
{
|
||||
float x[4] = {sin(angles[2]/360), 0, 0, cos(angles[2]/360)};
|
||||
float y[4] = {0, sin(angles[1]/360), 0, cos(angles[1]/360)};
|
||||
float z[4] = {0, 0, sin(angles[0]/360), cos(angles[0]/360)};
|
||||
float t[4];
|
||||
quaternion_multiply(x, y, t);
|
||||
quaternion_multiply(t, z, quat);
|
||||
}
|
||||
|
||||
void _PF_R_AddEntity(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
csqcedict_t *in = (void*)G_EDICT(prinst, OFS_PARM0);
|
||||
entity_t ent;
|
||||
|
@ -375,6 +435,7 @@ static void PF_R_AddEntity(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
ent.angles[0] = in->v->angles[0];
|
||||
ent.angles[1] = in->v->angles[1];
|
||||
ent.angles[2] = in->v->angles[2];
|
||||
|
||||
memcpy(ent.origin, in->v->origin, sizeof(vec3_t));
|
||||
AngleVectors(ent.angles, ent.axis[0], ent.axis[1], ent.axis[2]);
|
||||
VectorInverse(ent.axis[1]);
|
||||
|
@ -384,6 +445,30 @@ static void PF_R_AddEntity(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
ent.skinnum = in->v->skin;
|
||||
|
||||
V_AddEntity(&ent);
|
||||
|
||||
/*
|
||||
{
|
||||
float a[4];
|
||||
float q[4];
|
||||
float r[4];
|
||||
EularToQuaternian(ent.angles, a);
|
||||
|
||||
QuaternainToAngleMatrix(a, ent.axis);
|
||||
ent.origin[0] += 16;
|
||||
V_AddEntity(&ent);
|
||||
|
||||
quaternion_rotation(0, 0, 1, cl.time*360, r);
|
||||
quaternion_multiply(a, r, q);
|
||||
QuaternainToAngleMatrix(q, ent.axis);
|
||||
ent.origin[0] -= 32;
|
||||
ent.angles[1] = cl.time;
|
||||
V_AddEntity(&ent);
|
||||
}
|
||||
*/
|
||||
}
|
||||
void PF_R_AddEntity(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
_PF_R_AddEntity(prinst, pr_globals);
|
||||
}
|
||||
|
||||
static void PF_R_AddDynamicLight(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
|
@ -937,11 +1022,10 @@ static void PF_cs_setsensativityscaler (progfuncs_t *prinst, struct globalvars_s
|
|||
|
||||
static void PF_cs_pointparticles (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
char *effectname = PR_GetStringOfs(prinst, OFS_PARM0);
|
||||
int effectnum = G_FLOAT(OFS_PARM0);
|
||||
float *org = G_VECTOR(OFS_PARM1);
|
||||
float *vel = G_VECTOR(OFS_PARM2);
|
||||
float count = G_FLOAT(OFS_PARM3);
|
||||
int effectnum = P_AllocateParticleType(effectname);
|
||||
|
||||
if (*prinst->callargc < 3)
|
||||
vel = vec3_origin;
|
||||
|
@ -954,7 +1038,7 @@ static void PF_cs_pointparticles (progfuncs_t *prinst, struct globalvars_s *pr_g
|
|||
static void PF_cs_particlesloaded (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
char *effectname = PR_GetStringOfs(prinst, OFS_PARM0);
|
||||
G_FLOAT(OFS_RETURN) = P_DescriptionIsLoaded(effectname);
|
||||
G_FLOAT(OFS_RETURN) = P_ParticleTypeForName(effectname);
|
||||
}
|
||||
|
||||
//get the input commands, and stuff them into some globals.
|
||||
|
@ -1172,6 +1256,26 @@ static void PF_checkextension (progfuncs_t *prinst, struct globalvars_s *pr_glob
|
|||
G_FLOAT(OFS_RETURN) = 0;
|
||||
}
|
||||
|
||||
void PF_cs_sound(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
char *sample;
|
||||
int channel;
|
||||
csqcedict_t *entity;
|
||||
int volume;
|
||||
float attenuation;
|
||||
|
||||
sfx_t *sfx;
|
||||
|
||||
entity = G_EDICT(prinst, OFS_PARM0);
|
||||
channel = G_FLOAT(OFS_PARM1);
|
||||
sample = PR_GetStringOfs(prinst, OFS_PARM2);
|
||||
volume = G_FLOAT(OFS_PARM3) * 255;
|
||||
attenuation = G_FLOAT(OFS_PARM4);
|
||||
|
||||
sfx = S_PrecacheSound(sample);
|
||||
if (sfx)
|
||||
S_StartSound(-entity->entnum, channel, sfx, entity->v->origin, volume, attenuation);
|
||||
};
|
||||
|
||||
#define PF_FixTen PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme
|
||||
|
||||
|
@ -1186,7 +1290,7 @@ static builtin_t csqc_builtins[] = {
|
|||
PF_Fixme,
|
||||
PF_Fixme, //PF_break,
|
||||
PF_random,
|
||||
PF_Fixme, //PF_sound,
|
||||
PF_cs_sound, //PF_sound,
|
||||
PF_normalize,
|
||||
//10
|
||||
PF_error,
|
||||
|
|
|
@ -1287,7 +1287,7 @@ void P_NewServer(void)
|
|||
Con_Printf("Couldn't find particle description, using spikeset\n");
|
||||
Cbuf_AddText(particle_set_spikeset, RESTRICT_SERVER);
|
||||
}
|
||||
/*#if defined(_DEBUG) && defined(WIN32) //expand the particles cfg into a C style quoted string, and copy to clipboard so I can paste it in.
|
||||
#if defined(_DEBUG) && defined(WIN32) //expand the particles cfg into a C style quoted string, and copy to clipboard so I can paste it in.
|
||||
{
|
||||
char *TL_ExpandToCString(char *in);
|
||||
extern HWND mainwindow;
|
||||
|
@ -1324,7 +1324,7 @@ void P_NewServer(void)
|
|||
SetClipboardData(CF_TEXT, hglbCopy);
|
||||
CloseClipboard();
|
||||
}
|
||||
#endif*/
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1471,7 +1471,11 @@ glEnable(GL_DEPTH_TEST);
|
|||
if (Length(vdist) > (1024+512)*frandom())
|
||||
continue;
|
||||
|
||||
VectorMA(org, 0.5, st->face->normal, org);
|
||||
if (st->face->flags & SURF_PLANEBACK)
|
||||
VectorMA(org, -0.5, st->face->plane->normal, org);
|
||||
else
|
||||
VectorMA(org, 0.5, st->face->plane->normal, org);
|
||||
|
||||
if (!(cl.worldmodel->hulls->funcs.HullPointContents(cl.worldmodel->hulls, org) & FTECONTENTS_SOLID))
|
||||
{
|
||||
if (st->face->flags & SURF_PLANEBACK)
|
||||
|
@ -1726,7 +1730,7 @@ int P_RunParticleEffectTypeString (vec3_t org, vec3_t dir, float count, char *na
|
|||
return P_RunParticleEffectType(org, dir, count, type);
|
||||
}
|
||||
|
||||
int Q1BSP_ClipDecal(vec3_t center, vec3_t normal, vec3_t tangent, float size, float **out);
|
||||
int Q1BSP_ClipDecal(vec3_t center, vec3_t normal, vec3_t tangent, vec3_t tangent2, float size, float **out);
|
||||
int P_RunParticleEffectType (vec3_t org, vec3_t dir, float count, int typenum)
|
||||
{
|
||||
part_type_t *ptype = &part_type[typenum];
|
||||
|
@ -1763,7 +1767,7 @@ int P_RunParticleEffectType (vec3_t org, vec3_t dir, float count, int typenum)
|
|||
CrossProduct(dir, vec, tangent);
|
||||
CrossProduct(dir, tangent, t2);
|
||||
|
||||
decalcount = Q1BSP_ClipDecal(org, dir, tangent, ptype->scale, &decverts);
|
||||
decalcount = Q1BSP_ClipDecal(org, dir, tangent, t2, ptype->scale, &decverts);
|
||||
while(decalcount)
|
||||
{
|
||||
if (!free_decals)
|
||||
|
@ -1781,9 +1785,8 @@ int P_RunParticleEffectType (vec3_t org, vec3_t dir, float count, int typenum)
|
|||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
VectorSubtract(d->vertex[i], org, vec);
|
||||
dist = DotProduct(vec, dir)/ptype->scale;
|
||||
d->texcoords[i][0] = ((DotProduct(vec, t2)*(1-dist))/ptype->scale)+0.5;
|
||||
d->texcoords[i][1] = ((DotProduct(vec, tangent)*(1-dist))/ptype->scale)+0.5;
|
||||
d->texcoords[i][0] = (DotProduct(vec, t2)/ptype->scale)+0.5;
|
||||
d->texcoords[i][1] = (DotProduct(vec, tangent)/ptype->scale)+0.5;
|
||||
}
|
||||
|
||||
d->die = ptype->randdie*frandom();
|
||||
|
@ -3414,7 +3417,7 @@ void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void
|
|||
{
|
||||
if (type->clippeddecals)
|
||||
{
|
||||
for ( ;; )
|
||||
/* for ( ;; )
|
||||
{
|
||||
dkill = type->clippeddecals;
|
||||
if (dkill && dkill->die < particletime)
|
||||
|
@ -3431,9 +3434,9 @@ void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void
|
|||
}
|
||||
break;
|
||||
}
|
||||
for (d=type->clippeddecals ; d ; d=d->next)
|
||||
*/ for (d=type->clippeddecals ; d ; d=d->next)
|
||||
{
|
||||
for ( ;; )
|
||||
/* for ( ;; )
|
||||
{
|
||||
dkill = d->next;
|
||||
if (dkill && dkill->die < particletime)
|
||||
|
@ -3446,7 +3449,7 @@ void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void
|
|||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ typedef struct entity_s
|
|||
{
|
||||
int keynum; // for matching entities in different frames
|
||||
vec3_t origin;
|
||||
vec3_t angles;
|
||||
vec3_t angles;
|
||||
vec3_t axis[3];
|
||||
|
||||
byte_vec4_t shaderRGBA;
|
||||
|
|
|
@ -111,6 +111,7 @@ static cvar_t vid_height = {"vid_height", "480", NULL, CVAR_ARCHIVE|CVAR_RENDERE
|
|||
static cvar_t vid_refreshrate = {"vid_displayfrequency", "0", NULL, CVAR_ARCHIVE|CVAR_RENDERERLATCH};
|
||||
|
||||
cvar_t gl_motionblur = {"gl_motionblur", "0"};
|
||||
cvar_t gl_motionblurscale = {"gl_motionblurscale", "1"};
|
||||
cvar_t gl_fontedgeclamp = {"gl_fontedgeclamp", "0"}; //gl blends. Set this to 1 to stop the outside of your conchars from being visible
|
||||
cvar_t gl_font = {"gl_font", ""};
|
||||
cvar_t gl_conback = {"gl_conback", ""};
|
||||
|
@ -287,6 +288,7 @@ void GLRenderer_Init(void)
|
|||
Cvar_Register (&gl_ztrick, GLRENDEREROPTIONS);
|
||||
|
||||
Cvar_Register (&gl_motionblur, GLRENDEREROPTIONS);
|
||||
Cvar_Register (&gl_motionblurscale, GLRENDEREROPTIONS);
|
||||
Cvar_Register (&gl_max_size, GLRENDEREROPTIONS);
|
||||
Cvar_Register (&gl_maxdist, GLRENDEREROPTIONS);
|
||||
Cvar_Register (&vid_conwidth, GLRENDEREROPTIONS);
|
||||
|
@ -1647,8 +1649,6 @@ TRACE(("dbg: R_ApplyRenderer: reloading ALL models\n"));
|
|||
UI_Reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
S_ExtraUpdate();
|
||||
}
|
||||
|
||||
loadmodel = cl.worldmodel = cl.model_precache[1];
|
||||
|
@ -1700,9 +1700,12 @@ TRACE(("dbg: R_ApplyRenderer: efrags\n"));
|
|||
break;
|
||||
}
|
||||
|
||||
TRACE(("dbg: R_ApplyRenderer: S_Restart_f\n"));
|
||||
if (!isDedicated)
|
||||
S_Restart_f();
|
||||
|
||||
TRACE(("dbg: R_ApplyRenderer: done\n"));
|
||||
|
||||
memcpy(¤trendererstate, newr, sizeof(currentrendererstate));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -554,6 +554,10 @@ void S_Init (void)
|
|||
|
||||
void S_ShutdownCard(soundcardinfo_t *sc)
|
||||
{
|
||||
#ifndef NODIRECTX
|
||||
extern int aimedforguid;
|
||||
aimedforguid = 0;
|
||||
#endif
|
||||
if (!fakedma)
|
||||
{
|
||||
SNDDMA_Shutdown(sc);
|
||||
|
|
|
@ -3248,7 +3248,7 @@ static void CL_Say (qboolean team, char *extra)
|
|||
}
|
||||
|
||||
#ifdef Q3CLIENT
|
||||
if (cls.q2server==2)
|
||||
if (cls.protocol == CP_QUAKE3)
|
||||
CLQ3_SendClientCommand("%s %s%s", team ? "say_team " : "say ", extra?extra:"", sendtext);
|
||||
else
|
||||
#endif
|
||||
|
|
|
@ -490,8 +490,11 @@ void Cmd_Exec_f (void)
|
|||
else
|
||||
Q_strncpyz(name, Cmd_Argv(1), sizeof(name));
|
||||
|
||||
f = (char *)COM_LoadMallocFile(name);
|
||||
if (!f)
|
||||
if ((f = (char *)COM_LoadMallocFile(name)))
|
||||
;
|
||||
else if ((f = (char *)COM_LoadMallocFile(va("%s.cfg", name))))
|
||||
;
|
||||
else
|
||||
{
|
||||
Con_TPrintf (TL_EXECFAILED,name);
|
||||
return;
|
||||
|
@ -1461,7 +1464,7 @@ void Cmd_CompleteCheck(char *check, match_t *match) //compare cumulative strings
|
|||
strcpy(match->result, check);
|
||||
}
|
||||
}
|
||||
char *Cmd_CompleteCommand (char *partial, qboolean fullonly, int matchnum)
|
||||
char *Cmd_CompleteCommand (char *partial, qboolean fullonly, qboolean caseinsens, int matchnum)
|
||||
{
|
||||
extern cvar_group_t *cvar_groups;
|
||||
cmd_function_t *cmd;
|
||||
|
@ -1490,18 +1493,34 @@ char *Cmd_CompleteCommand (char *partial, qboolean fullonly, int matchnum)
|
|||
|
||||
strcpy(match.result, "");
|
||||
|
||||
// check for partial match
|
||||
for (cmd=cmd_functions ; cmd ; cmd=cmd->next)
|
||||
if (!Q_strncmp (partial,cmd->name, len))
|
||||
Cmd_CompleteCheck(cmd->name, &match);
|
||||
for (a=cmd_alias ; a ; a=a->next)
|
||||
if (!Q_strncmp (partial, a->name, len))
|
||||
Cmd_CompleteCheck(a->name, &match);
|
||||
for (grp=cvar_groups ; grp ; grp=grp->next)
|
||||
for (cvar=grp->cvars ; cvar ; cvar=cvar->next)
|
||||
if (!Q_strncmp (partial,cvar->name, len))
|
||||
Cmd_CompleteCheck(cvar->name, &match);
|
||||
// check for partial match
|
||||
if (caseinsens)
|
||||
{
|
||||
for (cmd=cmd_functions ; cmd ; cmd=cmd->next)
|
||||
if (!Q_strncasecmp (partial,cmd->name, len))
|
||||
Cmd_CompleteCheck(cmd->name, &match);
|
||||
for (a=cmd_alias ; a ; a=a->next)
|
||||
if (!Q_strncasecmp (partial, a->name, len))
|
||||
Cmd_CompleteCheck(a->name, &match);
|
||||
for (grp=cvar_groups ; grp ; grp=grp->next)
|
||||
for (cvar=grp->cvars ; cvar ; cvar=cvar->next)
|
||||
if (!Q_strncasecmp (partial,cvar->name, len))
|
||||
Cmd_CompleteCheck(cvar->name, &match);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
for (cmd=cmd_functions ; cmd ; cmd=cmd->next)
|
||||
if (!Q_strncmp (partial,cmd->name, len))
|
||||
Cmd_CompleteCheck(cmd->name, &match);
|
||||
for (a=cmd_alias ; a ; a=a->next)
|
||||
if (!Q_strncmp (partial, a->name, len))
|
||||
Cmd_CompleteCheck(a->name, &match);
|
||||
for (grp=cvar_groups ; grp ; grp=grp->next)
|
||||
for (cvar=grp->cvars ; cvar ; cvar=cvar->next)
|
||||
if (!Q_strncmp (partial,cvar->name, len))
|
||||
Cmd_CompleteCheck(cvar->name, &match);
|
||||
}
|
||||
if (match.matchnum>0)
|
||||
return NULL;
|
||||
if (!*match.result)
|
||||
|
@ -1550,7 +1569,7 @@ void Cmd_ForwardToServer (void)
|
|||
return; // not really connected
|
||||
|
||||
#ifdef Q3CLIENT
|
||||
if (cls.q2server == 2)
|
||||
if (cls.protocol == CP_QUAKE3)
|
||||
{
|
||||
CLQ3_SendClientCommand("%s %s", Cmd_Argv(0), Cmd_Args());
|
||||
return;
|
||||
|
|
|
@ -83,7 +83,7 @@ qboolean Cmd_AddCommand (char *cmd_name, xcommand_t function);
|
|||
qboolean Cmd_Exists (char *cmd_name);
|
||||
// used by the cvar code to check for cvar / command name overlap
|
||||
|
||||
char *Cmd_CompleteCommand (char *partial, qboolean fullonly, int matchnum);
|
||||
char *Cmd_CompleteCommand (char *partial, qboolean fullonly, qboolean caseinsens, int matchnum);
|
||||
qboolean Cmd_IsCommand (char *line);
|
||||
// attempts to match a partial command for automatic command line completion
|
||||
// returns NULL if nothing fits
|
||||
|
|
|
@ -491,7 +491,7 @@ cvar_t *Cvar_Get(const char *name, const char *defaultvalue, int flags, const ch
|
|||
{
|
||||
//allow this to change all < cvar_latch values.
|
||||
//this allows q2 dlls to apply different flags to a cvar without destroying our important ones (like cheat).
|
||||
var->flags = (flags & (CVAR_LATCH-1)) | (var->flags & ~(CVAR_LATCH-1));
|
||||
var->flags = (var->flags & ~(CVAR_NOSET)) | (flags & (CVAR_NOSET|CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE));
|
||||
return var;
|
||||
}
|
||||
|
||||
|
|
|
@ -617,6 +617,8 @@ void CM_CreateBrush ( q2cbrush_t *brush, vec3_t *verts, q2mapsurface_t *surface
|
|||
qboolean skip[20];
|
||||
int numpatchplanes = 0;
|
||||
|
||||
int matchplane;
|
||||
|
||||
// calc absmins & absmaxs
|
||||
ClearBounds ( absmins, absmaxs );
|
||||
for (i = 0; i < 3; i++)
|
||||
|
@ -703,11 +705,22 @@ void CM_CreateBrush ( q2cbrush_t *brush, vec3_t *verts, q2mapsurface_t *surface
|
|||
|
||||
skip[i] = true;
|
||||
|
||||
if (numplanes == MAX_Q2MAP_PLANES)
|
||||
Host_Error ("CM_CreateBrush: numplanes == MAX_CM_PLANES");
|
||||
for (matchplane = 0; matchplane < numplanes; matchplane++)
|
||||
{
|
||||
if (!memcmp(&map_planes[matchplane], &patchplanes[i], sizeof(patchplanes[i])))
|
||||
{
|
||||
plane = &map_planes[matchplane];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (matchplane == numplanes)
|
||||
{
|
||||
if (numplanes == MAX_Q2MAP_PLANES)
|
||||
Host_Error ("CM_CreateBrush: numplanes == MAX_CM_PLANES");
|
||||
|
||||
plane = &map_planes[numplanes++];
|
||||
*plane = patchplanes[i];
|
||||
plane = &map_planes[numplanes++];
|
||||
*plane = patchplanes[i];
|
||||
}
|
||||
|
||||
if (numbrushsides == MAX_CM_BRUSHSIDES)
|
||||
Host_Error ("CM_CreateBrush: numbrushsides == MAX_CM_BRUSHSIDES");
|
||||
|
@ -715,10 +728,10 @@ void CM_CreateBrush ( q2cbrush_t *brush, vec3_t *verts, q2mapsurface_t *surface
|
|||
side = &map_brushsides[numbrushsides++];
|
||||
side->plane = plane;
|
||||
|
||||
// if (DotProduct(plane->normal, mainplane.normal) >= 0)
|
||||
if (DotProduct(plane->normal, mainplane.normal) >= 0)
|
||||
side->surface = surface;
|
||||
// else
|
||||
// side->surface = NULL; // don't clip against this side
|
||||
else
|
||||
side->surface = NULL; // don't clip against this side
|
||||
|
||||
brush->numsides++;
|
||||
}
|
||||
|
|
|
@ -91,7 +91,6 @@ typedef struct
|
|||
|
||||
#ifdef NQPROT
|
||||
qboolean isnqprotocol;
|
||||
struct qsocket_s *qsocket;
|
||||
#endif
|
||||
|
||||
float last_received; // for timeouts
|
||||
|
@ -140,9 +139,9 @@ typedef struct
|
|||
qboolean compress;
|
||||
|
||||
//nq servers must recieve truncated packets.
|
||||
int in_reliable_length;
|
||||
char in_reliable_buf[MAX_OVERALLMSGLEN];
|
||||
int in_reliable_start;
|
||||
int in_fragment_length;
|
||||
char in_fragment_buf[MAX_OVERALLMSGLEN];
|
||||
int in_fragment_start;
|
||||
} netchan_t;
|
||||
|
||||
extern int net_drop; // packets dropped before this one
|
||||
|
|
|
@ -180,9 +180,7 @@ called to open a channel to a remote system
|
|||
void Netchan_Setup (netsrc_t sock, netchan_t *chan, netadr_t adr, int qport)
|
||||
{
|
||||
memset (chan, 0, sizeof(*chan));
|
||||
#ifdef NQPROT
|
||||
chan->qsocket = NULL;
|
||||
#endif
|
||||
|
||||
chan->sock = sock;
|
||||
chan->remote_address = adr;
|
||||
chan->last_received = realtime;
|
||||
|
@ -302,20 +300,20 @@ qboolean NQNetChan_Process(netchan_t *chan)
|
|||
{
|
||||
chan->incoming_reliable_sequence++;
|
||||
|
||||
if (chan->in_reliable_length + net_message.cursize-8 >= sizeof(chan->in_reliable_buf))
|
||||
if (chan->in_fragment_length + net_message.cursize-8 >= sizeof(chan->in_fragment_buf))
|
||||
{
|
||||
chan->fatal_error = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(chan->in_reliable_buf + chan->in_reliable_length, net_message.data+8, net_message.cursize-8);
|
||||
chan->in_reliable_length += net_message.cursize-8;
|
||||
memcpy(chan->in_fragment_buf + chan->in_fragment_length, net_message.data+8, net_message.cursize-8);
|
||||
chan->in_fragment_length += net_message.cursize-8;
|
||||
|
||||
if (header & NETFLAG_EOM)
|
||||
{
|
||||
SZ_Clear(&net_message);
|
||||
SZ_Write(&net_message, chan->in_reliable_buf, chan->in_reliable_length);
|
||||
chan->in_reliable_length = 0;
|
||||
SZ_Write(&net_message, chan->in_fragment_buf, chan->in_fragment_length);
|
||||
chan->in_fragment_length = 0;
|
||||
MSG_BeginReading();
|
||||
return 2; //we can read it now
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ void (*pfreeaddrinfo) (struct addrinfo*);
|
|||
#endif
|
||||
|
||||
|
||||
extern cvar_t sv_public;
|
||||
extern cvar_t sv_public, sv_listen;
|
||||
|
||||
|
||||
|
||||
|
@ -1196,7 +1196,7 @@ void NET_InitServer(void)
|
|||
int p;
|
||||
port = PORT_SERVER;
|
||||
|
||||
if (sv_public.value)
|
||||
if (sv_listen.value)
|
||||
{
|
||||
p = COM_CheckParm ("-svport");
|
||||
if (p && p < com_argc)
|
||||
|
|
|
@ -606,6 +606,7 @@ enum {
|
|||
#define DPTE_BLOOD 50
|
||||
#define DPTE_SPARK 51
|
||||
#define DPTE_BLOODSHOWER 52
|
||||
#define DPTE_EXPLOSIONRGB 53
|
||||
#define DPTE_PARTICLECUBE 54
|
||||
#define DPTE_SMALLFLASH 72
|
||||
#define DPTE_CUSTOMFLASH 73
|
||||
|
|
|
@ -631,6 +631,17 @@ void Q1BSP_ClipDecalToNodes (fragmentdecal_t *dec, mnode_t *node)
|
|||
surf = cl.worldmodel->surfaces + node->firstsurface;
|
||||
for (i=0 ; i<node->numsurfaces ; i++, surf++)
|
||||
{
|
||||
|
||||
if (surf->flags & SURF_PLANEBACK)
|
||||
{
|
||||
if (DotProduct(surf->plane->normal, dec->normal) < -0.1)
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (-DotProduct(surf->plane->normal, dec->normal) < -0.1)
|
||||
continue;
|
||||
}
|
||||
Q1BSP_FragmentToMesh(dec, surf->mesh);
|
||||
}
|
||||
|
||||
|
@ -638,7 +649,7 @@ void Q1BSP_ClipDecalToNodes (fragmentdecal_t *dec, mnode_t *node)
|
|||
Q1BSP_ClipDecalToNodes (dec, node->children[1]);
|
||||
}
|
||||
|
||||
int Q1BSP_ClipDecal(vec3_t center, vec3_t normal, vec3_t tangent, float size, float **out)
|
||||
int Q1BSP_ClipDecal(vec3_t center, vec3_t normal, vec3_t tangent, vec3_t tangent2, float size, float **out)
|
||||
{ //quad marks a full, independant quad
|
||||
int p;
|
||||
fragmentdecal_t dec;
|
||||
|
@ -646,7 +657,7 @@ int Q1BSP_ClipDecal(vec3_t center, vec3_t normal, vec3_t tangent, float size, fl
|
|||
VectorCopy(center, dec.center);
|
||||
VectorCopy(normal, dec.normal);
|
||||
VectorCopy(tangent, dec.tangent1);
|
||||
CrossProduct(tangent, normal, dec.tangent2);
|
||||
VectorCopy(tangent2, dec.tangent2);
|
||||
dec.radius = size/2;
|
||||
dec.numtris = 0;
|
||||
|
||||
|
|
|
@ -360,7 +360,7 @@ LINK32=link.exe
|
|||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /G5 /ML /W3 /GX /ZI /Od /I "..\client" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs" /I "../libs/dxsdk7/include" /D "_DEBUG" /D "GLQUAKE" /D "WIN32" /D "_WINDOWS" /D "AVAIL_OGGVORBIS" /D "Q3CLIENT" /FR".\GLDebug/" /Fp".\GLDebug/qwcl.pch" /YX /Fo".\GLDebug/" /Fd".\GLDebug/" /FD /c
|
||||
# SUBTRACT BASE CPP /X
|
||||
# ADD CPP /nologo /G5 /W3 /GX /ZI /Od /I "..\client" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs" /I "../libs/dxsdk7/include" /D "_DEBUG" /D "GLQUAKE" /D "WIN32" /D "_WINDOWS" /D "AVAIL_OGGVORBIS" /D "Q3CLIENT" /D "Q3SERVER" /FR /Fp".\GLDebugQ3/qwcl.pch" /Yu"quakedef.h" /Fo".\GLDebugQ3/" /Fd".\GLDebugQ3/" /FD /c
|
||||
# ADD CPP /nologo /G5 /W3 /GX /ZI /Od /I "..\client" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs" /I "../libs/dxsdk7/include" /D "_DEBUG" /D "GLQUAKE" /D "WIN32" /D "_WINDOWS" /D "Q3CLIENT" /D "Q3SERVER" /FR /Fp".\GLDebugQ3/qwcl.pch" /Yu"quakedef.h" /Fo".\GLDebugQ3/" /Fd".\GLDebugQ3/" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||
|
@ -4920,230 +4920,6 @@ SOURCE=..\sw\vid_win2.c
|
|||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "nq"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\nqnet\net_dgrm.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"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
|
||||
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\nqnet\net_loop.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"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
|
||||
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\nqnet\net_main.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"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
|
||||
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\nqnet\net_win.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"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
|
||||
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\nqnet\net_wipx.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"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
|
||||
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\nqnet\nqnet.h
|
||||
|
||||
!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"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "common"
|
||||
|
|
|
@ -182,13 +182,7 @@ static void R_LerpFrames(mesh_t *mesh, galiaspose_t *p1, galiaspose_t *p2, float
|
|||
mesh->xyz_array = p1v;
|
||||
if (r_nolightdir.value)
|
||||
{
|
||||
for (i = 0; i < mesh->numvertexes; i++)
|
||||
{
|
||||
mesh->colors_array[i][0] = /*ambientlight[0]/2*/+shadelight[0];
|
||||
mesh->colors_array[i][1] = /*ambientlight[1]/2*/+shadelight[1];
|
||||
mesh->colors_array[i][2] = /*ambientlight[2]/2*/+shadelight[2];
|
||||
mesh->colors_array[i][3] = alpha;
|
||||
}
|
||||
mesh->colors_array = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1469,11 +1463,14 @@ void R_DrawGAliasModel (entity_t *e)
|
|||
fog = CM_FogForOrigin(currententity->origin);
|
||||
#endif
|
||||
|
||||
qglColor4f(shadelight[0], shadelight[1], shadelight[2], e->alpha);
|
||||
|
||||
memset(&mesh, 0, sizeof(mesh));
|
||||
for(; inf; ((inf->nextsurf)?(inf = (galiasinfo_t*)((char *)inf + inf->nextsurf)):(inf=NULL)))
|
||||
{
|
||||
if (R_GAliasBuildMesh(&mesh, inf, e->frame, e->oldframe, e->lerpfrac, e->alpha) && r_vertexdlights.value)
|
||||
R_GAliasAddDlights(&mesh, e->origin, e->angles);
|
||||
if (mesh.colors_array)
|
||||
R_GAliasAddDlights(&mesh, e->origin, e->angles);
|
||||
|
||||
c_alias_polys += mesh.numindexes/3;
|
||||
|
||||
|
@ -2238,12 +2235,12 @@ static void *Q1_LoadSkins (daliasskintype_t *pskintype, qboolean alpha)
|
|||
outskin->texnums=1;
|
||||
|
||||
outskin->ofstexnums = (char *)texnums - (char *)outskin;
|
||||
|
||||
/*
|
||||
#ifdef Q3SHADERS
|
||||
sprintf(skinname, "%s_%i", loadname, i);
|
||||
texnums->shader = R_RegisterSkin(skinname);
|
||||
#endif
|
||||
|
||||
*/
|
||||
|
||||
texnums->base = texture;
|
||||
texnums->fullbright = fbtexture;
|
||||
|
@ -2317,11 +2314,12 @@ static void *Q1_LoadSkins (daliasskintype_t *pskintype, qboolean alpha)
|
|||
if (t != 0) //only keep the first.
|
||||
BZ_Free(saved);
|
||||
}
|
||||
|
||||
sprintf(skinname, "%s_%i_%i", loadname, i, t);
|
||||
/*
|
||||
#ifdef Q3SHADERS
|
||||
sprintf(skinname, "%s_%i_%i", loadname, i, t);
|
||||
texnums->shader = R_RegisterSkin(skinname);
|
||||
#endif
|
||||
*/
|
||||
texnums->base = texture;
|
||||
texnums->fullbright = fbtexture;
|
||||
}
|
||||
|
|
|
@ -736,15 +736,14 @@ void R_FlushArraysMtex (void)
|
|||
return;
|
||||
}
|
||||
|
||||
GL_MBind( mtexid0, r_texNums[0] );
|
||||
qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
|
||||
|
||||
if ( numColors > 1 ) {
|
||||
qglEnableClientState( GL_COLOR_ARRAY );
|
||||
} else if ( numColors == 1 ) {
|
||||
qglColor4ubv ( colorArray[0] );
|
||||
}
|
||||
|
||||
GL_MBind( mtexid0, r_texNums[0] );
|
||||
qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
|
||||
for ( i = 1; i < r_numUnits; i++ )
|
||||
{
|
||||
GL_MBind( mtexid0 + i, r_texNums[i] );
|
||||
|
@ -1764,15 +1763,15 @@ void R_RenderMeshCombined ( meshbuffer_t *mb, shaderpass_t *pass )
|
|||
R_ModifyColor ( mb, pass );
|
||||
|
||||
GL_SelectTexture( mtexid0 );
|
||||
R_ModifyTextureCoords ( pass, 0 );
|
||||
if ( pass->blendmode == GL_REPLACE )
|
||||
GL_TexEnv( GL_REPLACE );
|
||||
else
|
||||
GL_TexEnv( GL_MODULATE );
|
||||
R_ModifyTextureCoords ( pass, 0 );
|
||||
|
||||
for ( i = 1, pass++; i < r_numUnits; i++, pass++ )
|
||||
{
|
||||
GL_SelectTexture( mtexid1 + i );
|
||||
GL_SelectTexture( mtexid0 + i );
|
||||
|
||||
if ( pass->blendmode )
|
||||
{
|
||||
|
|
|
@ -203,9 +203,6 @@ typedef struct glpoly_s
|
|||
{
|
||||
struct glpoly_s *next;
|
||||
int numverts;
|
||||
#ifdef SHADERS
|
||||
float texcenter[2]; //center of texture made by adveraging the tex coords
|
||||
#endif
|
||||
float verts[4][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2 (ldir_xyz)
|
||||
} glpoly_t;
|
||||
|
||||
|
@ -221,12 +218,14 @@ typedef struct mfog_s
|
|||
} mfog_t;
|
||||
#endif
|
||||
|
||||
#if MAX_SWDECALS
|
||||
typedef struct decal_s {
|
||||
int xpos, ypos;
|
||||
struct msurface_s *owner;
|
||||
struct decal_s *next;
|
||||
struct decal_s *prev;
|
||||
} decal_t;
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct msurface_s
|
||||
|
@ -256,9 +255,9 @@ typedef struct msurface_s
|
|||
mesh_t *mesh;
|
||||
entity_t *ownerent;
|
||||
struct msurface_s *texturechain;
|
||||
|
||||
#if 0
|
||||
vec3_t normal;
|
||||
|
||||
#endif
|
||||
mtexinfo_t *texinfo;
|
||||
|
||||
// lighting info
|
||||
|
@ -276,8 +275,9 @@ typedef struct msurface_s
|
|||
qboolean stained;
|
||||
#endif
|
||||
qbyte *samples; // [numstyles*surfsize]
|
||||
|
||||
#ifdef MAX_SWDECALS
|
||||
decal_t *decal;
|
||||
#endif
|
||||
} msurface_t;
|
||||
|
||||
typedef struct mnode_s
|
||||
|
|
|
@ -355,34 +355,6 @@ void GLR_PushDlights (void)
|
|||
continue;
|
||||
cl.worldmodel->funcs.MarkLights( l, 1<<i, cl.worldmodel->nodes );
|
||||
}
|
||||
|
||||
/*
|
||||
if (cl.worldmodel->fromgame == fg_quake3)
|
||||
{
|
||||
for (i=0 ; i<MAX_SWLIGHTS ; i++, l++)
|
||||
{
|
||||
if (l->die < cl.time || !l->radius)
|
||||
continue;
|
||||
GLR_MarkQ3Lights ( l, 1<<i, cl.worldmodel->nodes );
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (cl.worldmodel->fromgame == fg_quake2)
|
||||
{
|
||||
for (i=0 ; i<MAX_SWLIGHTS ; i++, l++)
|
||||
{
|
||||
if (l->die < cl.time || !l->radius)
|
||||
continue;
|
||||
GLR_MarkQ2Lights ( l, 1<<i, cl.worldmodel->nodes );
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (i=0 ; i<MAX_DLIGHTS ; i++, l++)
|
||||
{
|
||||
if (l->die < cl.time || !l->radius)
|
||||
continue;
|
||||
GLR_MarkLights ( l, 1<<i, cl.worldmodel->nodes );
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -125,6 +125,7 @@ cvar_t gl_contrast = {"gl_contrast", "1"};
|
|||
cvar_t gl_dither = {"gl_dither", "1"};
|
||||
cvar_t gl_maxdist = {"gl_maxdist", "8192"};
|
||||
extern cvar_t gl_motionblur;
|
||||
extern cvar_t gl_motionblurscale;
|
||||
|
||||
extern cvar_t gl_ati_truform;
|
||||
extern cvar_t gl_ati_truform_type;
|
||||
|
@ -1776,14 +1777,20 @@ void R_Mirror (void)
|
|||
|
||||
//enable stencil writing
|
||||
qglClearStencil(0);
|
||||
qglClear(GL_STENCIL_BUFFER_BIT);
|
||||
qglDisable(GL_ALPHA_TEST);
|
||||
qglEnable(GL_STENCIL_TEST);
|
||||
qglStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); //replace where it passes
|
||||
qglStencilFunc( GL_ALWAYS, 1, ~0 ); //always pass (where z passes set to 1)
|
||||
|
||||
qglColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE );
|
||||
qglColorMask( GL_FALSE, GL_TRUE, GL_FALSE, GL_FALSE );
|
||||
qglDepthMask( GL_FALSE );
|
||||
qglEnableClientState( GL_VERTEX_ARRAY );
|
||||
for (prevs = s; s; s=s->texturechain) //write the polys to the stencil buffer.
|
||||
R_RenderBrushPoly (s);
|
||||
{
|
||||
qglVertexPointer(3, GL_FLOAT, 0, s->mesh->xyz_array);
|
||||
qglDrawElements(GL_TRIANGLES, s->mesh->numindexes, GL_UNSIGNED_INT, s->mesh->indexes);
|
||||
}
|
||||
|
||||
qglColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
|
||||
qglDepthMask( GL_TRUE );
|
||||
|
@ -1820,7 +1827,7 @@ void R_Mirror (void)
|
|||
r_refdef.vieworg[1] = 575;
|
||||
r_refdef.vieworg[2] = 64;
|
||||
*/
|
||||
// AngleVectors (r_refdef.viewangles, vpn, vright, vup);
|
||||
AngleVectors (r_refdef.viewangles, vpn, vright, vup);
|
||||
|
||||
|
||||
gldepthmin = 0.5;
|
||||
|
@ -1873,6 +1880,7 @@ void R_Mirror (void)
|
|||
qglCullFace(GL_BACK);
|
||||
// cl_numvisedicts = oldvisents;
|
||||
}
|
||||
qglDisable(GL_STENCIL_TEST);
|
||||
|
||||
memcpy(r_refdef.viewangles, oldangles, sizeof(vec3_t));
|
||||
memcpy(r_refdef.vieworg, oldorg, sizeof(vec3_t));
|
||||
|
@ -2154,14 +2162,19 @@ void GLR_RenderView (void)
|
|||
if (gl_motionblur.value>=0 && gl_motionblur.value < 1)
|
||||
{
|
||||
int vwidth = 1, vheight = 1;
|
||||
float vs, vt;
|
||||
while (vwidth < glwidth)
|
||||
{
|
||||
vwidth *= 2;
|
||||
float vs, vt, cs, ct;
|
||||
|
||||
if (gl_config.arb_texture_non_power_of_two)
|
||||
{ //we can use any size, supposedly
|
||||
vwidth = glwidth;
|
||||
vheight = glheight;
|
||||
}
|
||||
while (vheight < glheight)
|
||||
{
|
||||
vheight *= 2;
|
||||
else
|
||||
{ //limit the texture size to square and use padding.
|
||||
while (vwidth < glwidth)
|
||||
vwidth *= 2;
|
||||
while (vheight < glheight)
|
||||
vheight *= 2;
|
||||
}
|
||||
|
||||
qglViewport (glx, gly, glwidth, glheight);
|
||||
|
@ -2179,22 +2192,24 @@ void GLR_RenderView (void)
|
|||
|
||||
//blend the last frame onto the scene
|
||||
//the maths is because our texture is over-sized (must be power of two)
|
||||
vs = (float)glwidth / vwidth;
|
||||
vt = (float)glheight / vheight;
|
||||
cs = vs = (float)glwidth / vwidth * 0.5;
|
||||
ct = vt = (float)glheight / vheight * 0.5;
|
||||
vs *= gl_motionblurscale.value;
|
||||
vt *= gl_motionblurscale.value;
|
||||
|
||||
qglDisable (GL_DEPTH_TEST);
|
||||
qglDisable (GL_CULL_FACE);
|
||||
qglDisable (GL_BLEND);
|
||||
qglDisable (GL_ALPHA_TEST);
|
||||
qglEnable(GL_BLEND);
|
||||
qglColor4f(1, 1, 1, gl_motionblur.value);
|
||||
qglBegin(GL_QUADS);
|
||||
qglTexCoord2f(0, 0);
|
||||
qglTexCoord2f(cs-vs, ct-vt);
|
||||
qglVertex2f(0, 0);
|
||||
qglTexCoord2f(vs, 0);
|
||||
qglTexCoord2f(cs+vs, ct-vt);
|
||||
qglVertex2f(glwidth, 0);
|
||||
qglTexCoord2f(vs, vt);
|
||||
qglTexCoord2f(cs+vs, ct+vt);
|
||||
qglVertex2f(glwidth, glheight);
|
||||
qglTexCoord2f(0, vt);
|
||||
qglTexCoord2f(cs-vs, ct+vt);
|
||||
qglVertex2f(0, glheight);
|
||||
qglEnd();
|
||||
|
||||
|
|
|
@ -2878,7 +2878,6 @@ start:
|
|||
// deal with model fragments in this leaf
|
||||
if (pleaf->efrags)
|
||||
R_StoreEfrags (&pleaf->efrags);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2918,10 +2917,10 @@ start:
|
|||
{
|
||||
surf = cl.worldmodel->surfaces + node->firstsurface;
|
||||
|
||||
if (dot < 0 -BACKFACE_EPSILON)
|
||||
side = SURF_PLANEBACK;
|
||||
else if (dot > BACKFACE_EPSILON)
|
||||
side = 0;
|
||||
// if (dot < 0 -BACKFACE_EPSILON)
|
||||
// side = SURF_PLANEBACK;
|
||||
// else if (dot > BACKFACE_EPSILON)
|
||||
// side = 0;
|
||||
{
|
||||
for ( ; c ; c--, surf++)
|
||||
{
|
||||
|
@ -3855,15 +3854,6 @@ void GL_BuildLightmaps (void)
|
|||
currentmodel = m;
|
||||
for (i=0 ; i<m->numsurfaces ; i++)
|
||||
{
|
||||
fa = &m->surfaces[i];
|
||||
VectorCopy(fa->plane->normal, fa->normal);
|
||||
if (fa->flags & SURF_PLANEBACK)
|
||||
{
|
||||
fa->normal[0]*=-1;
|
||||
fa->normal[1]*=-1;
|
||||
fa->normal[2]*=-1;
|
||||
}
|
||||
|
||||
GL_CreateSurfaceLightmap (m->surfaces + i);
|
||||
P_EmitSkyEffectTris(m, &m->surfaces[i]);
|
||||
if (m->surfaces[i].mesh) //there are some surfaces that have a display list already (the subdivided ones)
|
||||
|
|
|
@ -742,12 +742,15 @@ qboolean VID_AttachGL (rendererstate_t *info)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!stricmp(info->glrenderer, "opengl32.dll") || !stricmp(info->glrenderer, "opengl32")) //go for windows system dir if we failed with the default. Should help to avoid the 3dfx problem.
|
||||
if (!*info->glrenderer || !stricmp(info->glrenderer, "opengl32.dll") || !stricmp(info->glrenderer, "opengl32")) //go for windows system dir if we failed with the default. Should help to avoid the 3dfx problem.
|
||||
{
|
||||
char systemgl[MAX_OSPATH+1];
|
||||
GetSystemDirectory(systemgl, sizeof(systemgl)-1);
|
||||
strncat(systemgl, "\\", sizeof(systemgl)-1);
|
||||
strncat(systemgl, info->glrenderer, sizeof(systemgl)-1);
|
||||
if (*info->glrenderer)
|
||||
strncat(systemgl, info->glrenderer, sizeof(systemgl)-1);
|
||||
else
|
||||
strncat(systemgl, "opengl32.dll", sizeof(systemgl)-1);
|
||||
TRACE(("dbg: VID_AttachGL: GLInitialise (system dir specific)\n"));
|
||||
if (GLInitialise(systemgl))
|
||||
{
|
||||
|
|
|
@ -279,7 +279,10 @@ R_LoadSkys
|
|||
static char *skyname_suffix[][6] = {
|
||||
{"px", "py", "nx", "ny", "pz", "nz"},
|
||||
{"posx", "posy", "negx", "negy", "posz", "negz"},
|
||||
{"rt", "bk", "lf", "ft", "up", "dn"}
|
||||
{"rt", "bk", "lf", "ft", "up", "dn"},
|
||||
{"_px", "_py", "_nx", "_ny", "_pz", "_nz"},
|
||||
{"_posx", "_posy", "_negx", "_negy", "_posz", "_negz"},
|
||||
{"_rt", "_bk", "_lf", "_ft", "_up", "_dn"}
|
||||
};
|
||||
|
||||
static char *skyname_pattern[] = {
|
||||
|
@ -318,7 +321,11 @@ void R_LoadSkys (void)
|
|||
{
|
||||
_snprintf (name, sizeof(name), skyname_pattern[p], boxname, skyname_suffix[s][i]);
|
||||
skyboxtex[i] = Mod_LoadHiResTexture(name, NULL, false, false, true);
|
||||
if (skyboxtex[i])
|
||||
break;
|
||||
}
|
||||
if (skyboxtex[i])
|
||||
break;
|
||||
}
|
||||
if (!skyboxtex[i])
|
||||
break;
|
||||
|
@ -326,7 +333,7 @@ void R_LoadSkys (void)
|
|||
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
}
|
||||
if (boxname != defaultskybox && i < 6)
|
||||
if (boxname != defaultskybox && i < 6 && *defaultskybox)
|
||||
{
|
||||
boxname = defaultskybox;
|
||||
continue;
|
||||
|
@ -593,10 +600,10 @@ void R_DrawSkyBoxChain (msurface_t *s)
|
|||
R_DrawSkyBox (s);
|
||||
}
|
||||
|
||||
#define skygridx 32
|
||||
#define skygridx 16
|
||||
#define skygridx1 (skygridx + 1)
|
||||
#define skygridxrecip (1.0f / (skygridx))
|
||||
#define skygridy 32
|
||||
#define skygridy 16
|
||||
#define skygridy1 (skygridy + 1)
|
||||
#define skygridyrecip (1.0f / (skygridy))
|
||||
#define skysphere_numverts (skygridx1 * skygridy1)
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#ifdef RGLQUAKE
|
||||
|
||||
#include "quakedef.h"
|
||||
#include "glquake.h"
|
||||
|
||||
#ifdef DOOMWADS
|
||||
#ifdef RGLQUAKE
|
||||
#include "glquake.h"
|
||||
|
||||
#include "doommap.h"
|
||||
|
||||
|
|
|
@ -551,4 +551,13 @@ typedef void (APIENTRY * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
|
|||
typedef void (APIENTRY * PFNGLUNLOCKARRAYSEXTPROC) (void);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_EXT_texture_filter_anisotropic 1
|
||||
|
||||
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
|
||||
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -331,7 +331,7 @@ static qboolean HTTP_CL_Run(http_con_t *con)
|
|||
{ //server closed off the connection.
|
||||
if (con->chunksize)
|
||||
Con_Printf("Download was part way through chunking - must be corrupt - %s\n", con->filename);
|
||||
else if (con->bufferused != con->contentlength)
|
||||
else if (con->bufferused != con->contentlength && !con->file)
|
||||
Con_Printf("Recieved file isn't the correct length - must be corrupt - %s\n", con->filename);
|
||||
Con_Printf("Retrieved %s\n", con->filename);
|
||||
if (con->file)
|
||||
|
|
|
@ -92,6 +92,7 @@ pbool opt_stripfunctions; //if a functions is only ever called directly or by e
|
|||
pbool opt_locals_marshalling; //make the local vars of all functions occupy the same globals.
|
||||
pbool opt_logicops; //don't make conditions enter functions if the return value will be discarded due to a previous value. (C style if statements)
|
||||
pbool opt_vectorcalls; //vectors can be packed into 3 floats, which can yield lower numpr_globals, but cost two more statements per call (only works for q1 calling conventions).
|
||||
pbool opt_simplifiedifs; //if (f != 0) -> if (f). if (f == 0) -> ifnot (f)
|
||||
//bool opt_comexprremoval;
|
||||
|
||||
//these are the results of the opt_. The values are printed out when compilation is compleate, showing effectivness.
|
||||
|
@ -4860,13 +4861,17 @@ void QCC_PR_ParseStatement (void)
|
|||
|
||||
if (QCC_PR_CheckKeyword(keyword_if, "if"))
|
||||
{
|
||||
if (QCC_PR_CheckKeyword(keyword_not, "not"))
|
||||
{
|
||||
QCC_PR_Expect ("(");
|
||||
conditional = 1;
|
||||
e = QCC_PR_Expression (TOP_PRIORITY);
|
||||
conditional = 0;
|
||||
pbool negate = QCC_PR_CheckKeyword(keyword_not, "not");
|
||||
|
||||
QCC_PR_Expect ("(");
|
||||
conditional = 1;
|
||||
e = QCC_PR_Expression (TOP_PRIORITY);
|
||||
conditional = 0;
|
||||
|
||||
// negate = negate != 0;
|
||||
|
||||
if (negate)
|
||||
{
|
||||
if (e->type == type_string && flag_ifstring) //special case, as strings are now pointers, not offsets from string table
|
||||
{
|
||||
QCC_PR_ParseWarning(WARN_IFSTRING_USED, "if not(string) can result in bizzare behaviour");
|
||||
|
@ -4877,11 +4882,6 @@ void QCC_PR_ParseStatement (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
QCC_PR_Expect ("(");
|
||||
conditional = 1;
|
||||
e = QCC_PR_Expression (TOP_PRIORITY);
|
||||
conditional = 0;
|
||||
|
||||
if (e->type == type_string && flag_ifstring) //special case, as strings are now pointers, not offsets from string table
|
||||
{
|
||||
QCC_PR_ParseWarning(WARN_IFSTRING_USED, "if (string) can result in bizzare behaviour");
|
||||
|
|
|
@ -2068,7 +2068,7 @@ int QCC_PR_CheakCompConst(void)
|
|||
time_t long_time;
|
||||
time( &long_time );
|
||||
strftime( retbuf, sizeof(retbuf),
|
||||
"\"%R\"", localtime( &long_time ));
|
||||
"\"%H:%M\"", localtime( &long_time ));
|
||||
|
||||
pr_file_p = retbuf;
|
||||
QCC_PR_Lex(); //translate the macro's value
|
||||
|
|
|
@ -104,7 +104,8 @@ cvar_t allow_download_textures = {"allow_download_textures", "1"};
|
|||
cvar_t allow_download_pk3s = {"allow_download_pk3s", "1"};
|
||||
cvar_t allow_download_wads = {"allow_download_wads", "1"};
|
||||
|
||||
cvar_t sv_public = {"sv_public", "1"};
|
||||
cvar_t sv_public = {"sv_public", "0"};
|
||||
cvar_t sv_listen = {"sv_listen", "1"};
|
||||
cvar_t sv_highchars = {"sv_highchars", "1"};
|
||||
cvar_t sv_loadentfiles = {"sv_loadentfiles", "1"};
|
||||
cvar_t sv_maxrate = {"sv_maxrate", "10000"};
|
||||
|
@ -996,7 +997,7 @@ void SVC_GetChallenge (void)
|
|||
Netchan_OutOfBand(NS_SERVER, net_from, over-buf, buf);
|
||||
|
||||
|
||||
// buf = va("challenge %i", svs.challenges[i].challenge);
|
||||
// buf = va("challenge FTE%i", svs.challenges[i].challenge);
|
||||
// Netchan_OutOfBand(NS_SERVER, net_from, strlen(buf)+1, buf);
|
||||
}
|
||||
|
||||
|
@ -2028,7 +2029,10 @@ void SVNQ_ConnectionlessPacket(void)
|
|||
client_t *client;
|
||||
char *str;
|
||||
char buffer[256];
|
||||
// if (net_from.type == NA_LOOPBACK)
|
||||
if (net_from.type == NA_LOOPBACK)
|
||||
return;
|
||||
|
||||
if (sv_listen.value < 2)
|
||||
return;
|
||||
|
||||
MSG_BeginReading();
|
||||
|
@ -2068,33 +2072,7 @@ void SVNQ_ConnectionlessPacket(void)
|
|||
str = va("connect %i %i %i \"\\name\\unconnected\"", NET_PROTOCOL_VERSION, 0, SV_NewChallenge());
|
||||
Cmd_TokenizeString (str, false, false);
|
||||
|
||||
client = SVC_DirectConnect();
|
||||
|
||||
if (client)
|
||||
{
|
||||
SZ_Clear(&sb);
|
||||
MSG_WriteLong(&sb, 0);
|
||||
MSG_WriteByte(&sb, CCREP_ACCEPT);
|
||||
MSG_WriteLong(&sb, BigShort(net_local_sv_ipadr.port));
|
||||
*(int*)sb.data = BigLong(NETFLAG_CTL|sb.cursize);
|
||||
NET_SendPacket(NS_SERVER, sb.cursize, sb.data, net_from);
|
||||
|
||||
//nq supports packet truncation, so give them the full ammount
|
||||
client->netchan.message.maxsize = sizeof(client->netchan.message_buf);
|
||||
|
||||
host_client = client;
|
||||
SVNQ_New_f();
|
||||
}
|
||||
else
|
||||
{
|
||||
SZ_Clear(&sb);
|
||||
MSG_WriteLong(&sb, 0);
|
||||
MSG_WriteByte(&sb, CCREP_REJECT);
|
||||
MSG_WriteString(&sb, "Bugger ye off");
|
||||
*(int*)sb.data = BigLong(NETFLAG_CTL|sb.cursize);
|
||||
NET_SendPacket(NS_SERVER, sb.cursize, sb.data, net_from);
|
||||
|
||||
}
|
||||
SVC_DirectConnect();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2901,6 +2879,7 @@ void SV_InitLocal (void)
|
|||
Cvar_Register (&sv_resetparms, cvargroup_servercontrol);
|
||||
|
||||
Cvar_Register (&sv_public, cvargroup_servercontrol);
|
||||
Cvar_Register (&sv_listen, cvargroup_servercontrol);
|
||||
|
||||
#ifndef SERVERONLY
|
||||
if (isDedicated)
|
||||
|
@ -3145,10 +3124,13 @@ void Master_Heartbeat (void)
|
|||
NET_SendPacket (NS_SERVER, strlen(string), string, sv_masterlist[i].adr);
|
||||
break;
|
||||
case true:
|
||||
Con_Printf ("Sending heartbeat to %s\n", NET_AdrToString (sv_masterlist[i].adr));
|
||||
if (sv_listen.value>=2) //set listen to 1 to allow qw connections, 2 to allow nq connections too.
|
||||
{
|
||||
char *str = "\377\377\377\377heartbeat DarkPlaces\x0A";
|
||||
NET_SendPacket (NS_SERVER, strlen(str), str, sv_masterlist[i].adr);
|
||||
Con_Printf ("Sending heartbeat to %s\n", NET_AdrToString (sv_masterlist[i].adr));
|
||||
{
|
||||
char *str = "\377\377\377\377heartbeat DarkPlaces\x0A";
|
||||
NET_SendPacket (NS_SERVER, strlen(str), str, sv_masterlist[i].adr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -411,6 +411,8 @@ SV_AddGravity
|
|||
*/
|
||||
void SV_AddGravity (edict_t *ent, float scale)
|
||||
{
|
||||
if (!scale && progstype != PROG_QW)
|
||||
scale = 1;
|
||||
ent->v->velocity[2] -= scale * sv_gravity.value/*movevars.gravity*/ * host_frametime;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@ void D_WarpScreen (void)
|
|||
int column[MAXWIDTH+AMP2*2];
|
||||
float wratio, hratio;
|
||||
|
||||
w = r_refdef.vrect.width;
|
||||
h = r_refdef.vrect.height;
|
||||
w = WARP_WIDTH;
|
||||
h = WARP_HEIGHT;
|
||||
|
||||
wratio = w / (float)scr_vrect.width;
|
||||
hratio = h / (float)scr_vrect.height;
|
||||
|
|
|
@ -27,10 +27,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#endif
|
||||
|
||||
|
||||
//#define MAX_DECALS (1<<8)
|
||||
//#define MAX_SWDECALS (1<<8)
|
||||
|
||||
#if MAX_DECALS
|
||||
decal_t decals[MAX_DECALS];
|
||||
#if MAX_SWDECALS
|
||||
decal_t decals[MAX_SWDECALS];
|
||||
int nextdecal;
|
||||
|
||||
void SWR_AddDecal(vec3_t org);
|
||||
|
@ -213,7 +213,7 @@ void SWR_AddStain(vec3_t org, float red, float green, float blue, float radius)
|
|||
int i;
|
||||
float parms[5];
|
||||
|
||||
#if MAX_DECALS
|
||||
#if MAX_SWDECALS
|
||||
SWR_AddDecal(org);
|
||||
#endif
|
||||
|
||||
|
@ -415,7 +415,7 @@ void SWR_BuildLightmaps(void)
|
|||
#endif
|
||||
|
||||
//retrieves the next decal to be used, unlinking if needed.
|
||||
#if MAX_DECALS
|
||||
#if MAX_SWDECALS
|
||||
decal_t *R_GetFreeDecal(void)
|
||||
{
|
||||
decal_t *dec = &decals[nextdecal];
|
||||
|
@ -430,7 +430,7 @@ decal_t *R_GetFreeDecal(void)
|
|||
|
||||
dec->owner->cached_dlight = -1; //get the surface to redraw.
|
||||
}
|
||||
nextdecal = (nextdecal+1)&(MAX_DECALS-1);
|
||||
nextdecal = (nextdecal+1)&(MAX_SWDECALS-1);
|
||||
|
||||
memset(dec, 0, sizeof(decal_t));
|
||||
|
||||
|
@ -440,7 +440,7 @@ decal_t *R_GetFreeDecal(void)
|
|||
|
||||
void R_WipeDecals(void)
|
||||
{
|
||||
#if MAX_DECALS
|
||||
#if MAX_SWDECALS
|
||||
int i;
|
||||
|
||||
memset(decals, 0, sizeof(decals));
|
||||
|
@ -449,7 +449,7 @@ void R_WipeDecals(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if MAX_DECALS
|
||||
#if MAX_SWDECALS
|
||||
|
||||
static vec3_t decalorg;
|
||||
static float decalradius;
|
||||
|
@ -1077,7 +1077,7 @@ void R_DrawSurface (void)
|
|||
unsigned char *pcolumndest;
|
||||
void (*pblockdrawer)(void);
|
||||
texture_t *mt;
|
||||
#if MAX_DECALS
|
||||
#if MAX_SWDECALS
|
||||
decal_t *dec;
|
||||
#endif
|
||||
|
||||
|
@ -1154,7 +1154,7 @@ void R_DrawSurface (void)
|
|||
pcolumndest += horzblockstep;
|
||||
}
|
||||
|
||||
#if MAX_DECALS
|
||||
#if MAX_SWDECALS
|
||||
if (r_drawsurf.surf->decal && !r_drawsurf.surfmip)
|
||||
{
|
||||
if (r_pixbytes == 1 || r_pixbytes == 4)
|
||||
|
|
Loading…
Reference in a new issue