removed separate trigger/solid links.

some q3 fixes.
q2 will autosave on map changes, like q2 normally does.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3839 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2011-06-29 18:39:11 +00:00
parent a18e83d843
commit 61e4aa96b3
54 changed files with 1346 additions and 1000 deletions

View file

@ -60,36 +60,6 @@ int autocam[MAX_SPLITS];
int selfcam=1;
void vectoangles(vec3_t vec, vec3_t ang)
{
float forward;
float yaw, pitch;
if (vec[1] == 0 && vec[0] == 0)
{
yaw = 0;
if (vec[2] > 0)
pitch = 90;
else
pitch = 270;
}
else
{
yaw = /*(int)*/ (atan2(vec[1], vec[0]) * 180 / M_PI);
if (yaw < 0)
yaw += 360;
forward = sqrt (vec[0]*vec[0] + vec[1]*vec[1]);
pitch = /*(int)*/ (atan2(vec[2], forward) * 180 / M_PI);
if (pitch < 0)
pitch += 360;
}
ang[0] = pitch;
ang[1] = yaw;
ang[2] = 0;
}
static float vlen(vec3_t v)
{
return sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);

View file

@ -32,6 +32,8 @@ extern int mod_numknown;
#define VM_FROMSHANDLE(a) (a?r_shaders+a-1:NULL)
#define VM_TOSHANDLE(a) (a?a-r_shaders+1:0)
extern model_t box_model;
typedef enum {
CG_PRINT,
CG_ERROR,
@ -560,9 +562,12 @@ static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, con
case CG_CM_POINTCONTENTS: //int trap_CM_PointContents( const vec3_t p, clipHandle_t model );
{
unsigned int pc;
model_t *mod = VM_FROMMHANDLE(arg[1]);
if (!mod)
mod = cl.worldmodel;
unsigned int modhandle = VM_LONG(arg[1]);
model_t *mod;
if (modhandle >= MAX_MODELS)
mod = &box_model;
else
mod = cl.model_precache[modhandle+1];
if (mod)
pc = cl.worldmodel->funcs.NativeContents(mod, 0, 0, NULL, VM_POINTER(arg[0]), vec3_origin, vec3_origin);
else
@ -575,12 +580,14 @@ static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, con
{
unsigned int pc;
float *p = VM_POINTER(arg[0]);
model_t *mod = VM_FROMMHANDLE(arg[1]);
unsigned int modhandle = VM_LONG(arg[1]);
float *origin = VM_POINTER(arg[2]);
float *angles = VM_POINTER(arg[3]);
if (!mod)
mod = cl.worldmodel;
model_t *mod;
if (modhandle >= MAX_MODELS)
mod = &box_model;
else
mod = cl.model_precache[modhandle+1];
if (mod)
{
@ -618,12 +625,16 @@ static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, con
float *end = VM_POINTER(arg[2]);
float *mins = VM_POINTER(arg[3]);
float *maxs = VM_POINTER(arg[4]);
model_t *mod = VM_FROMMHANDLE(arg[5]);
int brushmask = VM_LONG(arg[6]);
unsigned int modhandle = VM_LONG(arg[5]);
int brushmask = VM_LONG(arg[6]);
float *origin = VM_POINTER(arg[7]);
float *angles = VM_POINTER(arg[8]);
if (!mod)
mod = cl.worldmodel;
model_t *mod;
if (modhandle >= MAX_MODELS)
mod = &box_model;
else
mod = cl.model_precache[modhandle+1];
if (!mins)
mins = vec3_origin;
if (!maxs)
@ -673,24 +684,19 @@ static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, con
float *end = VM_POINTER(arg[2]);
float *mins = VM_POINTER(arg[3]);
float *maxs = VM_POINTER(arg[4]);
model_t *mod = VM_FROMMHANDLE(arg[5]);
unsigned int modhandle = VM_LONG(arg[5]);
int brushmask = VM_LONG(arg[6]);
if (!mod)
mod = cl.worldmodel;
model_t *mod;
if (modhandle >= MAX_MODELS)
mod = &box_model;
else
mod = cl.model_precache[modhandle+1];
if (!mins)
mins = vec3_origin;
if (!maxs)
maxs = vec3_origin;
if (mod)
{
mod->funcs.NativeTrace(mod, 0, 0, NULL, start, end, mins, maxs, brushmask, &tr);
}
else
{
memset(&tr, 0, sizeof(tr));
tr.allsolid = tr.startsolid = true;
tr.contents = 1;
}
mod->funcs.NativeTrace(mod, 0, 0, NULL, start, end, mins, maxs, brushmask, &tr);
results->allsolid = tr.allsolid;
results->contents = tr.contents;
results->fraction = tr.fraction;
@ -724,14 +730,17 @@ static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, con
break;
case CG_CM_INLINEMODEL:
VM_LONG(ret) = VM_TOMHANDLE(cl.model_precache[VM_LONG(arg[0])+1]);
if ((unsigned int)VM_LONG(arg[0]) > (cl.worldmodel?cl.worldmodel->numsubmodels:0))
Host_EndGame("cgame asked for invalid model number\n");
VM_LONG(ret) = VM_LONG(arg[0]);
break;
case CG_CM_NUMINLINEMODELS:
VM_LONG(ret) = cl.worldmodel?cl.worldmodel->numsubmodels:0;
break;
case CG_CM_TEMPBOXMODEL:
VM_LONG(ret) = VM_TOMHANDLE(CM_TempBoxModel(VM_POINTER(arg[0]), VM_POINTER(arg[1])));
CM_TempBoxModel(VM_POINTER(arg[0]), VM_POINTER(arg[1]));
VM_LONG(ret) = MAX_MODELS;
break;
case CG_R_MODELBOUNDS:

View file

@ -167,7 +167,7 @@ int demo_preparsedemo(unsigned char *buffer, int bytes)
switch(buffer[1]&dem_mask)
{
case dem_cmd:
ofs = -(sizeof(q1usercmd_t));
ofs = -(int)(sizeof(q1usercmd_t));
ofs = 0;
break;
case dem_set:

View file

@ -1356,7 +1356,7 @@ entity_t *V_AddEntity(entity_t *in)
return ent;
}
/*
void VQ2_AddLerpEntity(entity_t *in) //a convienience function
{
entity_t *ent;
@ -1384,7 +1384,7 @@ void VQ2_AddLerpEntity(entity_t *in) //a convienience function
VectorInverse(ent->axis[1]);
ent->angles[0]*=-1;
}
*/
int V_AddLight (int entsource, vec3_t org, float quant, float r, float g, float b)
{
return CL_NewDlightRGB (entsource, org, quant, -0.1, r, g, b) - cl_dlights;

View file

@ -7,15 +7,6 @@
int keycatcher;
#define MAX_TOKENLENGTH 1024
typedef struct pc_token_s
{
int type;
int subtype;
int intvalue;
float floatvalue;
char string[MAX_TOKENLENGTH];
} pc_token_t;
#define TT_STRING 1 // string
#define TT_LITERAL 2 // literal
#define TT_NUMBER 3 // number
@ -599,23 +590,11 @@ void VQ3_RenderView(const q3refdef_t *ref)
}
memcpy(cl.q2frame.areabits, ref->areamask, sizeof(cl.q2frame.areabits));
#ifdef GLQUAKE
if (qrenderer == QR_OPENGL)
{
qglDisable(GL_ALPHA_TEST);
qglDisable(GL_BLEND);
}
#endif
R_RenderView();
#ifdef GLQUAKE
if (qrenderer == QR_OPENGL)
{
GL_Set2D ();
qglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
GL_TexEnv(GL_MODULATE);
qglDisable(GL_ALPHA_TEST);
qglEnable(GL_BLEND);
}
#endif

View file

@ -2,15 +2,6 @@
#include "glquake.h"
#ifdef HLCLIENT
//make shared
#ifndef QDECL
#ifdef _MSC_VER
#define QDECL _cdecl
#else
#define QDECL
#endif
#endif
struct hlcvar_s *QDECL GHL_CVarGetPointer(char *varname);

View file

@ -1094,7 +1094,7 @@ void Cam_TrackPlayer(int pnum, char *cmdname, char *plrarg);
void Cam_Lock(int pnum, int playernum);
void CL_InitCam(void);
void vectoangles(vec3_t vec, vec3_t ang);
void QDECL vectoangles(vec3_t vec, vec3_t ang);
//
//zqtp.c

View file

@ -504,164 +504,6 @@ FRAME PARSING
=========================================================================
*/
#if 0
typedef struct
{
int modelindex;
int num; // entity number
int effects;
vec3_t origin;
vec3_t oldorigin;
vec3_t angles;
qboolean present;
} projectile_t;
#define MAX_PROJECTILES 64
projectile_t cl_projectiles[MAX_PROJECTILES];
void CLQ2_ClearProjectiles (void)
{
int i;
for (i = 0; i < MAX_PROJECTILES; i++) {
// if (cl_projectiles[i].present)
// Com_DPrintf("PROJ: %d CLEARED\n", cl_projectiles[i].num);
cl_projectiles[i].present = false;
}
}
/*
=====================
CL_ParseProjectiles
Flechettes are passed as efficient temporary entities
=====================
*/
void CLQ2_ParseProjectiles (void)
{
int i, c, j;
byte bits[8];
byte b;
projectile_t pr;
int lastempty = -1;
qboolean old = false;
c = MSG_ReadByte (&net_message);
for (i=0 ; i<c ; i++)
{
bits[0] = MSG_ReadByte (&net_message);
bits[1] = MSG_ReadByte (&net_message);
bits[2] = MSG_ReadByte (&net_message);
bits[3] = MSG_ReadByte (&net_message);
bits[4] = MSG_ReadByte (&net_message);
pr.origin[0] = ( ( bits[0] + ((bits[1]&15)<<8) ) <<1) - 4096;
pr.origin[1] = ( ( (bits[1]>>4) + (bits[2]<<4) ) <<1) - 4096;
pr.origin[2] = ( ( bits[3] + ((bits[4]&15)<<8) ) <<1) - 4096;
VectorCopy(pr.origin, pr.oldorigin);
if (bits[4] & 64)
pr.effects = EF_BLASTER;
else
pr.effects = 0;
if (bits[4] & 128) {
old = true;
bits[0] = MSG_ReadByte (&net_message);
bits[1] = MSG_ReadByte (&net_message);
bits[2] = MSG_ReadByte (&net_message);
bits[3] = MSG_ReadByte (&net_message);
bits[4] = MSG_ReadByte (&net_message);
pr.oldorigin[0] = ( ( bits[0] + ((bits[1]&15)<<8) ) <<1) - 4096;
pr.oldorigin[1] = ( ( (bits[1]>>4) + (bits[2]<<4) ) <<1) - 4096;
pr.oldorigin[2] = ( ( bits[3] + ((bits[4]&15)<<8) ) <<1) - 4096;
}
bits[0] = MSG_ReadByte (&net_message);
bits[1] = MSG_ReadByte (&net_message);
bits[2] = MSG_ReadByte (&net_message);
pr.angles[0] = 360*bits[0]/256;
pr.angles[1] = 360*bits[1]/256;
pr.modelindex = bits[2];
b = MSG_ReadByte (&net_message);
pr.num = (b & 0x7f);
if (b & 128) // extra entity number byte
pr.num |= (MSG_ReadByte (&net_message) << 7);
pr.present = true;
// find if this projectile already exists from previous frame
for (j = 0; j < MAX_PROJECTILES; j++) {
if (cl_projectiles[j].modelindex) {
if (cl_projectiles[j].num == pr.num) {
// already present, set up oldorigin for interpolation
if (!old)
VectorCopy(cl_projectiles[j].origin, pr.oldorigin);
cl_projectiles[j] = pr;
break;
}
} else
lastempty = j;
}
// not present previous frame, add it
if (j == MAX_PROJECTILES) {
if (lastempty != -1) {
cl_projectiles[lastempty] = pr;
}
}
}
}
/*
=============
CL_LinkProjectiles
=============
*/
void CLQ2_AddProjectiles (void)
{
int i, j;
projectile_t *pr;
entity_t ent;
memset (&ent, 0, sizeof(ent));
for (i=0, pr=cl_projectiles ; i < MAX_PROJECTILES ; i++, pr++)
{
// grab an entity to fill in
if (pr->modelindex < 1)
continue;
if (!pr->present) {
pr->modelindex = 0;
continue; // not present this frame (it was in the previous frame)
}
ent.model = cl.model_draw[pr->modelindex];
// interpolate origin
for (j=0 ; j<3 ; j++)
{
ent.origin[j] = ent.oldorigin[j] = pr->oldorigin[j] + cl.lerpfrac *
(pr->origin[j] - pr->oldorigin[j]);
}
if (pr->effects & EF_BLASTER)
{
if (P_ParticleTrail(pr->oldorigin, ent.origin, rt_blastertrail, NULL))
P_ParticleTrailIndex(pr->oldorigin, ent.origin, 0xe0, 1, NULL);
}
V_AddLight (pr->origin, 200, 0.2, 0.2, 0);
VectorCopy (pr->angles, ent.angles);
VQ2_AddLerpEntity (&ent);
}
}
#endif
/*
=================
CL_ParseEntityBits
@ -1333,6 +1175,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
// q2clientinfo_t *ci;
player_info_t *player;
unsigned int effects, renderfx;
float back, fwds;
// bonus items rotate at a fixed rate
autorotate = anglemod(cl.time*100);
@ -1589,8 +1432,17 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
}
//pmm
/*lerp the ent now*/
fwds = ent.framestate.g[FS_REG].lerpfrac;
back = 1 - ent.framestate.g[FS_REG].lerpfrac;
for (i = 0; i < 3; i++)
{
ent.origin[i] = ent.origin[i]*fwds + ent.oldorigin[i]*back;
}
ent.framestate.g[FS_REG].lerpfrac = back;
// add to refresh list
VQ2_AddLerpEntity (&ent);
V_AddEntity (&ent);
// color shells generate a seperate entity for the main model
@ -1640,7 +1492,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
ent.shaderRGBAf[1] = (!!(renderfx & Q2RF_SHELL_GREEN));
ent.shaderRGBAf[2] = (!!(renderfx & Q2RF_SHELL_BLUE));
ent.forcedshader = R_RegisterCustom("q2/shell", Shader_DefaultSkinShell, NULL);
VQ2_AddLerpEntity (&ent);
V_AddEntity (&ent);
}
ent.forcedshader = NULL;
@ -1694,7 +1546,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
}
*/ // pmm
VQ2_AddLerpEntity (&ent);
V_AddEntity (&ent);
//PGM - make sure these get reset.
ent.flags = 0;
@ -1704,12 +1556,12 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
if (s1->modelindex3)
{
ent.model = cl.model_precache[s1->modelindex3];
VQ2_AddLerpEntity (&ent);
V_AddEntity (&ent);
}
if (s1->modelindex4)
{
ent.model = cl.model_precache[s1->modelindex4];
VQ2_AddLerpEntity (&ent);
V_AddEntity (&ent);
}
if ( effects & Q2EF_POWERSCREEN )
@ -1719,7 +1571,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
ent.frame = 0;
ent.flags |= (Q2RF_TRANSLUCENT | Q2RF_SHELL_GREEN);
ent.alpha = 0.30;
VQ2_AddLerpEntity (&ent);
V_AddLerpEntity (&ent);
*/ }
// add automatic particle trails

View file

@ -518,6 +518,7 @@ void CLQ3_ParseGameState(void)
int c;
int index;
char *configString;
cvar_t *cl_paused;
//
// wipe the client_state_t struct
@ -607,6 +608,10 @@ void CLQ3_ParseGameState(void)
// load cgame, etc
// CL_ChangeLevel();
cl_paused = Cvar_FindVar("cl_paused");
if (cl_paused && cl_paused->ival)
Cvar_ForceSet(cl_paused, "0");
}
#define TEXTCMD_BACKUP 64
@ -716,7 +721,7 @@ qboolean CLQ3_Netchan_Process(void)
msg_readcount = readcount;
// calculate bitmask
bitmask = sequence ^ cls.challenge;
bitmask = (sequence ^ cls.challenge) & 0xff;
string = ccs.clientCommands[lastClientCommandNum & TEXTCMD_MASK];
#ifndef Q3_NOENCRYPT
@ -767,7 +772,7 @@ void CL_Netchan_Transmit( int length, const qbyte *data )
lastServerCommandNum = MSG_ReadLong();
// calculate bitmask
bitmask = lastSequence ^ serverid ^ cls.challenge;
bitmask = (lastSequence ^ serverid ^ cls.challenge) & 0xff;
string = ccs.serverCommands[lastServerCommandNum & TEXTCMD_MASK];
#ifndef Q3_NOENCRYPT

View file

@ -2258,7 +2258,8 @@ void Media_RecordFilm_f (void)
BITMAPINFOHEADER bitmap_info_header;
AVISTREAMINFO stream_header;
FILE *f;
char filename[256];
char aviname[256];
char nativepath[256];
if (strlen(fourcc) == 4)
recordavi_codec_fourcc = mmioFOURCC(*(fourcc+0), *(fourcc+1), *(fourcc+2), *(fourcc+3));
@ -2271,23 +2272,24 @@ void Media_RecordFilm_f (void)
AVIFileInit();
}
snprintf(filename, sizeof(filename) - 5, "%s%s", com_quakedir, Cmd_Argv(1));
COM_StripExtension(filename, filename, sizeof(filename));
COM_DefaultExtension (filename, ".avi", sizeof(filename));
/*convert to foo.avi*/
COM_StripExtension(Cmd_Argv(1), aviname, sizeof(aviname));
COM_DefaultExtension (aviname, ".avi", sizeof(aviname));
/*find the system location of that*/
FS_NativePath(aviname, FS_ROOT, nativepath, sizeof(nativepath));
//wipe it.
f = fopen(filename, "rb");
f = fopen(nativepath, "rb");
if (f)
{
fclose(f);
unlink(filename);
unlink(nativepath);
}
hr = AVIFileOpen(&recordavi_file, filename, OF_WRITE | OF_CREATE, NULL);
hr = AVIFileOpen(&recordavi_file, nativepath, OF_WRITE | OF_CREATE, NULL);
if (FAILED(hr))
{
Con_Printf("Failed to open\n");
Con_Printf("Failed to open %s\n", nativepath);
return;
}
@ -2312,7 +2314,7 @@ void Media_RecordFilm_f (void)
hr = AVIFileCreateStream(recordavi_file, &recordavi_uncompressed_video_stream, &stream_header);
if (FAILED(hr))
{
Con_Printf("Couldn't initialise the stream\n");
Con_Printf("Couldn't initialise the stream, check codec\n");
Media_StopRecordFilm_f();
return;
}

View file

@ -1783,7 +1783,7 @@ qboolean M_Vid_GetMode(int num, int *w, int *h)
v++;
num--;
}
if (v)
if (*v)
{
const char *c = *v;
const char *s = strchr(c, 'x');

View file

@ -150,9 +150,9 @@ void M_Menu_SinglePlayer_f (void)
MC_AddCenterPicture(menu, 4, 24, "pics/m_banner_game");
menu->selecteditem = (menuoption_t*)
MC_AddConsoleCommand (menu, 64, 40, "Easy", "skill 0;deathmatch 0; coop 0;newgame\n");
MC_AddConsoleCommand (menu, 64, 48, "Medium", "skill 1;deathmatch 0; coop 0;newgame\n");
MC_AddConsoleCommand (menu, 64, 56, "Hard", "skill 2;deathmatch 0; coop 0;newgame\n");
MC_AddConsoleCommand (menu, 64, 40, "Easy", "closemenu; skill 0;deathmatch 0; coop 0;newgame\n");
MC_AddConsoleCommand (menu, 64, 48, "Medium", "closemenu; skill 1;deathmatch 0; coop 0;newgame\n");
MC_AddConsoleCommand (menu, 64, 56, "Hard", "closemenu; skill 2;deathmatch 0; coop 0;newgame\n");
MC_AddConsoleCommand (menu, 64, 72, "Load Game", "menu_load\n");
MC_AddConsoleCommand (menu, 64, 80, "Save Game", "menu_save\n");

View file

@ -66,7 +66,7 @@ typedef struct cparticle_s
pt_grav,
pt_slowgrav
} type;
unsigned char color;
unsigned int rgb;
struct cparticle_s *next;
} cparticle_t;
@ -76,10 +76,11 @@ typedef struct cparticle_s
static int r_numparticles;
static cparticle_t *particles, *active_particles, *free_particles;
extern qbyte default_quakepal[]; /*for ramps more than anything else*/
static int ramp1[8] = {0x6f, 0x6d, 0x6b, 0x69, 0x67, 0x65, 0x63, 0x61};
static int ramp2[8] = {0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x68, 0x66};
static int ramp3[8] = {0x6d, 0x6b, 6, 5, 4, 3};
#define qpal(q) ((default_quakepal[(q)*3+0]<<0) | (default_quakepal[(q)*3+1]<<8) | (default_quakepal[(q)*3+2]<<16))
#define BUFFERVERTS 2048*3
@ -350,7 +351,7 @@ static void PClassic_DrawParticles(void)
scale = 1 + dist * r_partscale;
usecolours.i = palette[(int)p->color];
usecolours.i = p->rgb;
if (p->type == pt_fire)
usecolours.b[3] = 255 * (6 - p->ramp) / 6;
else
@ -381,7 +382,7 @@ static void PClassic_DrawParticles(void)
if (p->ramp >= 6)
p->die = -1;
else
p->color = ramp3[(int) p->ramp];
p->rgb = qpal(ramp3[(int) p->ramp]);
p->vel[2] += grav;
break;
case pt_explode:
@ -389,7 +390,7 @@ static void PClassic_DrawParticles(void)
if (p->ramp >=8)
p->die = -1;
else
p->color = ramp1[(int) p->ramp];
p->rgb = qpal(ramp1[(int) p->ramp]);
for (i = 0; i < 3; i++)
p->vel[i] += p->vel[i] * dvel;
p->vel[2] -= grav*10;
@ -399,7 +400,7 @@ static void PClassic_DrawParticles(void)
if (p->ramp >=8)
p->die = -1;
else
p->color = ramp2[(int) p->ramp];
p->rgb = qpal(ramp2[(int) p->ramp]);
for (i = 0; i < 3; i++)
p->vel[i] -= p->vel[i] * frametime;
p->vel[2] -= grav*10;
@ -447,7 +448,7 @@ static void Classic_ParticleExplosion (vec3_t org)
active_particles = p;
p->die = cl.time + 5;
p->color = ramp1[0];
p->rgb = d_8to24rgbtable[ramp1[0]];
p->ramp = rand() & 3;
if (i & 1)
{
@ -489,7 +490,7 @@ static void Classic_BlobExplosion (vec3_t org)
if (i & 1)
{
p->type = pt_blob;
p->color = 66 + rand() % 6;
p->rgb = d_8to24rgbtable[66 + rand() % 6];
for (j = 0; j < 3; j++)
{
p->org[j] = org[j] + ((rand() % 32) - 16);
@ -499,7 +500,7 @@ static void Classic_BlobExplosion (vec3_t org)
else
{
p->type = pt_blob2;
p->color = 150 + rand() % 6;
p->rgb = d_8to24rgbtable[150 + rand() % 6];
for (j = 0; j < 3; j++)
{
p->org[j] = org[j] + ((rand() % 32) - 16);
@ -529,7 +530,7 @@ static void Classic_RunParticleEffect (vec3_t org, vec3_t dir, int color, int co
active_particles = p;
p->die = cl.time + 0.1 * (rand() % 5);
p->color = (color & ~7) + (rand() & 7);
p->rgb = d_8to24rgbtable[(color & ~7) + (rand() & 7)];
p->type = pt_grav;
for (j = 0; j < 3; j++)
{
@ -560,7 +561,7 @@ static void Classic_LavaSplash (vec3_t org)
active_particles = p;
p->die = cl.time + 2 + (rand() & 31) * 0.02;
p->color = 224 + (rand() & 7);
p->rgb = d_8to24rgbtable[224 + (rand() & 7)];
p->type = pt_grav;
dir[0] = j * 8 + (rand() & 7);
@ -600,7 +601,7 @@ static void Classic_TeleportSplash (vec3_t org)
active_particles = p;
p->die = cl.time + 0.2 + (rand() & 7) * 0.02;
p->color = 7 + (rand() & 7);
p->rgb = d_8to24rgbtable[7 + (rand() & 7)];
p->type = pt_grav;
dir[0] = j * 8;
@ -671,20 +672,20 @@ static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, ef
{
case GRENADE_TRAIL:
p->ramp = (rand() & 3) + 2;
p->color = ramp3[(int) p->ramp];
p->rgb = d_8to24rgbtable[ramp3[(int) p->ramp]];
p->type = pt_fire;
for (j = 0; j < 3; j++)
p->org[j] = point[j] + ((rand() % 6) - 3);
break;
case BLOOD_TRAIL:
p->type = pt_slowgrav;
p->color = 67 + (rand() & 3);
p->rgb = d_8to24rgbtable[67 + (rand() & 3)];
for (j = 0; j < 3; j++)
p->org[j] = point[j] + ((rand() % 6) - 3);
break;
case BIG_BLOOD_TRAIL:
p->type = pt_slowgrav;
p->color = 67 + (rand() & 3);
p->rgb = d_8to24rgbtable[67 + (rand() & 3)];
for (j = 0; j < 3; j++)
p->org[j] = point[j] + ((rand() % 6) - 3);
break;
@ -693,9 +694,9 @@ static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, ef
p->die = cl.time + 0.5;
p->type = pt_static;
if (type == TRACER1_TRAIL)
p->color = 52 + ((tracercount & 4) << 1);
p->rgb = d_8to24rgbtable[52 + ((tracercount & 4) << 1)];
else
p->color = 230 + ((tracercount & 4) << 1);
p->rgb = d_8to24rgbtable[230 + ((tracercount & 4) << 1)];
tracercount++;
@ -712,7 +713,7 @@ static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, ef
}
break;
case VOOR_TRAIL:
p->color = 9 * 16 + 8 + (rand() & 3);
p->rgb = d_8to24rgbtable[9 * 16 + 8 + (rand() & 3)];
p->type = pt_static;
p->die = cl.time + 0.3;
for (j = 0; j < 3; j++)
@ -720,7 +721,7 @@ static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, ef
break;
case ALT_ROCKET_TRAIL:
p->ramp = (rand() & 3);
p->color = ramp3[(int) p->ramp];
p->rgb = d_8to24rgbtable[ramp3[(int) p->ramp]];
p->type = pt_fire;
for (j = 0; j < 3; j++)
p->org[j] = point[j] + ((rand() % 6) - 3);
@ -728,7 +729,7 @@ static float Classic_ParticleTrail (vec3_t start, vec3_t end, float leftover, ef
case ROCKET_TRAIL:
default:
p->ramp = (rand() & 3);
p->color = ramp3[(int) p->ramp];
p->rgb = d_8to24rgbtable[ramp3[(int) p->ramp]];
p->type = pt_fire;
for (j = 0; j < 3; j++)
p->org[j] = point[j] + ((rand() % 6) - 3);

View file

@ -1897,7 +1897,10 @@ static void P_LoadParticleSet(char *name, qboolean first)
fallback->ShutdownParticles();
fallback = &pe_classic;
if (fallback)
{
fallback->InitParticles();
fallback->ClearParticles();
}
return;
}

View file

@ -839,7 +839,7 @@ void R_SetRenderer(rendererinfo_t *ri)
SCR_UpdateScreen = ri->SCR_UpdateScreen;
}
static qbyte default_quakepal[768] =
qbyte default_quakepal[768] =
{
0,0,0,15,15,15,31,31,31,47,47,47,63,63,63,75,75,75,91,91,91,107,107,107,123,123,123,139,139,139,155,155,155,171,171,171,187,187,187,203,203,203,219,219,219,235,235,235,15,11,7,23,15,11,31,23,11,39,27,15,47,35,19,55,43,23,63,47,23,75,55,27,83,59,27,91,67,31,99,75,31,107,83,31,115,87,31,123,95,35,131,103,35,143,111,35,11,11,15,19,19,27,27,27,39,39,39,51,47,47,63,55,55,75,63,63,87,71,71,103,79,79,115,91,91,127,99,99,
139,107,107,151,115,115,163,123,123,175,131,131,187,139,139,203,0,0,0,7,7,0,11,11,0,19,19,0,27,27,0,35,35,0,43,43,7,47,47,7,55,55,7,63,63,7,71,71,7,75,75,11,83,83,11,91,91,11,99,99,11,107,107,15,7,0,0,15,0,0,23,0,0,31,0,0,39,0,0,47,0,0,55,0,0,63,0,0,71,0,0,79,0,0,87,0,0,95,0,0,103,0,0,111,0,0,119,0,0,127,0,0,19,19,0,27,27,0,35,35,0,47,43,0,55,47,0,67,

View file

@ -2373,7 +2373,7 @@ void Sbar_Draw (void)
Sbar_ExecuteLayoutString(cl.q2statusbar);
if (*cl.q2layout)
{
if (cl.q2frame.playerstate.stats[Q2STAT_LAYOUTS])
if (cl.q2frame.playerstate.stats[Q2STAT_LAYOUTS] & 1)
Sbar_ExecuteLayoutString(cl.q2layout);
}
return;

View file

@ -481,7 +481,8 @@ void *Sys_GetGameAPI(void *parms)
char name[MAX_OSPATH];
char curpath[MAX_OSPATH];
char *searchpath;
const char *gamename = "gamei386.so";
const char *agamename = "gamei386.so";
const char *ggamename = "game.so";
char *result;
void *ret;

View file

@ -799,7 +799,7 @@ void pscript_property_curserver_sets(struct context *ctx, const char *val)
}
Q_strncpyz(cls.servername, val, sizeof(cls.servername));
CL_BeginServerConnect();
CL_BeginServerConnect(0);
}
void pscript_property_stream_sets(struct context *ctx, const char *val)

View file

@ -1335,7 +1335,6 @@ void V_RenderPlayerViews(int plnum)
{
extern vec3_t desired_position[MAX_SPLITS];
vec3_t dir;
extern void vectoangles(vec3_t vec, vec3_t ang);
r_refdef.vrect.y -= r_refdef.vrect.height;
vid.recalc_refdef=true;