makeconfig.sh - the shell script that generates config.h either automagically or through prompts, use it through make

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1586 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-11-26 03:02:55 +00:00
parent 0b14f65c77
commit 9355c7dda5
19 changed files with 850 additions and 362 deletions

View file

@ -383,74 +383,6 @@ void CL_ParseDelta (entity_state_t *from, entity_state_t *to, int bits, qboolean
if (morebits & U_EFFECTS16) if (morebits & U_EFFECTS16)
to->effects = (to->effects&0x00ff)|(MSG_ReadByte()<<8); to->effects = (to->effects&0x00ff)|(MSG_ReadByte()<<8);
if (to->number>=cl.maxlerpents)
{
cl.maxlerpents = to->number+16;
cl.lerpents = BZ_Realloc(cl.lerpents, sizeof(entity_state_t)*cl.maxlerpents);
}
VectorSubtract(to->origin, from->origin, move);
if (to->frame != from->frame)
{
cl.lerpents[to->number].oldframechange = cl.lerpents[to->number].framechange; //marked for hl models
cl.lerpents[to->number].framechange = cl.servertime; //marked for hl models
}
if (to->modelindex != from->modelindex || to->number != from->number || VectorLength(move)>500) //model changed... or entity changed...
{
cl.lerpents[to->number].oldframechange = cl.lerpents[to->number].framechange; //marked for hl models
cl.lerpents[to->number].framechange = cl.servertime; //marked for hl models
cl.lerpents[to->number].lerptime = -10;
cl.lerpents[to->number].lerprate = 0;
if (!new)
return;
move[0] = 1; //make sure it enters the next block.
}
if (to->frame != from->frame || move[0] || move[1] || move[2])
{
if (new) //lerp from the new position instead of old, so no lerp
{
cl.lerpents[to->number].origin[0] = to->origin[0];
cl.lerpents[to->number].origin[1] = to->origin[1];
cl.lerpents[to->number].origin[2] = to->origin[2];
cl.lerpents[to->number].angles[0] = to->angles[0];
cl.lerpents[to->number].angles[1] = to->angles[1];
cl.lerpents[to->number].angles[2] = to->angles[2];
}
else
{
cl.lerpents[to->number].origin[0] = from->origin[0];
cl.lerpents[to->number].origin[1] = from->origin[1];
cl.lerpents[to->number].origin[2] = from->origin[2];
cl.lerpents[to->number].angles[0] = from->angles[0];
cl.lerpents[to->number].angles[1] = from->angles[1];
cl.lerpents[to->number].angles[2] = from->angles[2];
}
//we have three sorts of movement.
//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.
//the real solution would be to seperate the two.
cl.lerpents[to->number].lerprate = cl.servertime-cl.lerpents[to->number].lerptime; //time per update
// Con_Printf("%f=%f-%f\n", cl.lerpents[to->number].lerprate, cl.time, cl.lerpents[to->number].lerptime);
cl.lerpents[to->number].frame = from->frame;
cl.lerpents[to->number].lerptime = cl.servertime;
if (cl.lerpents[to->number].lerprate>0.2)
cl.lerpents[to->number].lerprate=0.2;
//store this off for new ents to use.
if (new)
cl.lerpents[to->number].lerprate = newlerprate;
if (to->frame == from->frame && !new) //(h2 runs at 20fps)
newlerprate = cl.lerpents[to->number].lerprate;
}
} }
@ -514,6 +446,8 @@ void CL_ParsePacketEntities (qboolean delta)
newp = &cl.frames[newpacket].packet_entities; newp = &cl.frames[newpacket].packet_entities;
cl.frames[newpacket].invalid = false; cl.frames[newpacket].invalid = false;
newp->servertime = cl.gametime;
if (delta) if (delta)
{ {
from = MSG_ReadByte (); from = MSG_ReadByte ();
@ -944,6 +878,7 @@ void CLNQ_ParseDarkPlaces5Entities(void) //the things I do.. :o(
/*cl.servermovesequence =*/ MSG_ReadLong(); /*cl.servermovesequence =*/ MSG_ReadLong();
pack = &cl.frames[(cls.netchan.incoming_sequence)&UPDATE_MASK].packet_entities; pack = &cl.frames[(cls.netchan.incoming_sequence)&UPDATE_MASK].packet_entities;
pack->servertime = cl.gametime;
oldpack = &cl.frames[(cls.netchan.incoming_sequence-1)&UPDATE_MASK].packet_entities; oldpack = &cl.frames[(cls.netchan.incoming_sequence-1)&UPDATE_MASK].packet_entities;
from = oldpack->entities; from = oldpack->entities;
@ -988,11 +923,6 @@ void CLNQ_ParseDarkPlaces5Entities(void) //the things I do.. :o(
pack->max_entities = pack->num_entities+16; pack->max_entities = pack->num_entities+16;
pack->entities = BZ_Realloc(pack->entities, sizeof(entity_state_t)*pack->max_entities); pack->entities = BZ_Realloc(pack->entities, sizeof(entity_state_t)*pack->max_entities);
} }
if (read>=cl.maxlerpents)
{
cl.maxlerpents = read+16;
cl.lerpents = BZ_Realloc(cl.lerpents, sizeof(entity_state_t)*cl.maxlerpents);
}
to = &pack->entities[pack->num_entities]; to = &pack->entities[pack->num_entities];
pack->num_entities++; pack->num_entities++;
@ -1000,58 +930,6 @@ void CLNQ_ParseDarkPlaces5Entities(void) //the things I do.. :o(
to->number = read; to->number = read;
DP5_ParseDelta(to); DP5_ParseDelta(to);
to->flags &= ~0x80000000; to->flags &= ~0x80000000;
if (!from || to->modelindex != from->modelindex || to->number != from->number) //model changed... or entity changed...
{
cl.lerpents[to->number].lerptime = -10;
cl.lerpents[to->number].origin[0] = to->origin[0];
cl.lerpents[to->number].origin[1] = to->origin[1];
cl.lerpents[to->number].origin[2] = to->origin[2];
cl.lerpents[to->number].angles[0] = to->angles[0];
cl.lerpents[to->number].angles[1] = to->angles[1];
cl.lerpents[to->number].angles[2] = to->angles[2];
}
else if (to->frame != from->frame || to->origin[0] != from->origin[0] || to->origin[1] != from->origin[1] || to->origin[2] != from->origin[2])
{
if (from == &defaultstate) //lerp from the new position instead of old, so no lerp
{
cl.lerpents[to->number].origin[0] = to->origin[0];
cl.lerpents[to->number].origin[1] = to->origin[1];
cl.lerpents[to->number].origin[2] = to->origin[2];
cl.lerpents[to->number].angles[0] = to->angles[0];
cl.lerpents[to->number].angles[1] = to->angles[1];
cl.lerpents[to->number].angles[2] = to->angles[2];
}
else
{
cl.lerpents[to->number].origin[0] = from->origin[0];
cl.lerpents[to->number].origin[1] = from->origin[1];
cl.lerpents[to->number].origin[2] = from->origin[2];
cl.lerpents[to->number].angles[0] = from->angles[0];
cl.lerpents[to->number].angles[1] = from->angles[1];
cl.lerpents[to->number].angles[2] = from->angles[2];
}
//we have three sorts of movement.
//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.oldgametime-cl.lerpents[to->number].lerptime; //time per update
cl.lerpents[to->number].frame = from->frame;
cl.lerpents[to->number].lerptime = cl.oldgametime;
if (cl.lerpents[to->number].lerprate>0.2)
cl.lerpents[to->number].lerprate=0.2;
//store this off for new ents to use.
// if (new)
// cl.lerpents[state->number].lerptime = newlerprate;
// else
if (to->frame == from->frame)
newlerprate = cl.lerpents[to->number].lerprate;
}
} }
//the pack has all the new ones in it, now copy the old ones in that wern't removed (or changed). //the pack has all the new ones in it, now copy the old ones in that wern't removed (or changed).
@ -1171,12 +1049,6 @@ void CLNQ_ParseEntity(unsigned int bits)
state = &pack->entities[pack->num_entities++]; state = &pack->entities[pack->num_entities++];
} }
if (num>=cl.maxlerpents)
{
cl.maxlerpents = num+16;
cl.lerpents = BZ_Realloc(cl.lerpents, sizeof(entity_state_t)*cl.maxlerpents);
}
from = CL_FindOldPacketEntity(num); //this could be optimised. from = CL_FindOldPacketEntity(num); //this could be optimised.
base = &cl_baselines[num]; base = &cl_baselines[num];
@ -1250,37 +1122,6 @@ void CLNQ_ParseEntity(unsigned int bits)
state->angles[1] = cl.viewangles[pnum][1]; state->angles[1] = cl.viewangles[pnum][1];
state->angles[2] = cl.viewangles[pnum][2]; state->angles[2] = cl.viewangles[pnum][2];
} }
if (!from || state->modelindex != from->modelindex || state->number != from->number) //model changed... or entity changed...
cl.lerpents[state->number].lerprate = newlerprate;
else if (state->frame != from->frame || state->origin[0] != from->origin[0] || state->origin[1] != from->origin[1] || state->origin[2] != from->origin[2])
{
cl.lerpents[state->number].origin[0] = from->origin[0];
cl.lerpents[state->number].origin[1] = from->origin[1];
cl.lerpents[state->number].origin[2] = from->origin[2];
cl.lerpents[state->number].angles[0] = from->angles[0];
cl.lerpents[state->number].angles[1] = from->angles[1];
cl.lerpents[state->number].angles[2] = from->angles[2];
//we have three sorts of movement.
//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[state->number].lerprate = cl.gametime-cl.lerpents[state->number].lerptime; //time per update
cl.lerpents[state->number].frame = from->frame;
cl.lerpents[state->number].lerptime = cl.gametime;
if (cl.lerpents[state->number].lerprate>0.2)
cl.lerpents[state->number].lerprate=0.2;
//store this off for new ents to use.
// if (new)
// cl.lerpents[state->number].lerprate = newlerprate;
// else
if (state->frame == from->frame)
newlerprate = cl.lerpents[state->number].lerprate;
}
} }
#endif #endif
#ifdef PEXT_SETVIEW #ifdef PEXT_SETVIEW
@ -1510,6 +1351,468 @@ CL_LinkPacketEntities
=============== ===============
*/ */
void R_FlameTrail(vec3_t start, vec3_t end, float seperation); void R_FlameTrail(vec3_t start, vec3_t end, float seperation);
#define DECENTLERP
#ifdef DECENTLERP
void CL_TransitionPacketEntities(packet_entities_t *newpack, packet_entities_t *oldpack, float servertime)
{
lerpents_t *le;
entity_state_t *snew, *sold;
int i, j;
int oldpnum, newpnum;
vec3_t move;
float a1, a2;
float frac;
/*
seeing as how dropped packets cannot be filled in due to the reliable networking stuff,
We can simply detect changes and lerp towards them
*/
//we have two index-sorted lists of entities
//we figure out which ones are new,
//we don't care about old, as our caller will use the lerpents array we fill, and the entity numbers from the 'new' packet.
if (newpack->servertime == oldpack->servertime)
frac = 1; //lerp totally into the new
else
frac = (servertime-oldpack->servertime)/(newpack->servertime-oldpack->servertime);
oldpnum=0;
for (newpnum=0 ; newpnum<newpack->num_entities ; newpnum++)
{
snew = &newpack->entities[newpnum];
sold = NULL;
for ( ; oldpnum<oldpack->num_entities ; oldpnum++)
{
sold = &oldpack->entities[oldpnum];
if (sold->number >= snew->number)
{
if (sold->number > snew->number)
sold = NULL; //woo, it's a new entity.
break;
}
}
if (!sold) //I'm lazy
sold = snew;
if (snew->number >= cl.maxlerpents)
{
cl.maxlerpents = snew->number+16;
cl.lerpents = BZ_Realloc(cl.lerpents, cl.maxlerpents*sizeof(lerpents_t));
}
le = &cl.lerpents[snew->number];
VectorSubtract(snew->origin, sold->origin, move)
if (DotProduct(move, move) > 200*200 || snew->modelindex != sold->modelindex)
{
sold = snew; //teleported?
VectorClear(move);
}
for (i = 0; i < 3; i++)
{
le->origin[i] = sold->origin[i] + frac*(move[i]);
for (j = 0; j < 3; j++)
{
a1 = sold->angles[i];
a2 = snew->angles[i];
if (a1 - a2 > 180)
a1 -= 360;
if (a1 - a2 < -180)
a1 += 360;
le->angles[i] = a1 + frac * (a2 - a1);
}
}
if (snew == sold || (sold->frame != le->frame && sold->frame != snew->frame) || snew->modelindex != sold->modelindex)
{
le->oldframechange = le->framechange;
le->framechange = newpack->servertime;
le->frame = sold->frame;
}
}
}
packet_entities_t *CL_ProcessPacketEntities(float *servertime, qboolean nolerp)
{
packet_entities_t *packnew, *packold;
entity_state_t *snew, *sold;
int i;
static float oldoldtime;
//, spnum;
*servertime -= 0.1;
if (nolerp)
{ //force our emulated time to as late as we can.
//this will disable all position interpolation
*servertime = cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].packet_entities.servertime;
Con_DPrintf("No lerp\n");
}
packnew = NULL;
packold = NULL;
//choose the two packets.
//we should be picking the packet just after the server time, and the one just before
for (i = cls.netchan.incoming_sequence; i >= cls.netchan.incoming_sequence-UPDATE_MASK; i--)
{
if (cl.frames[i&UPDATE_MASK].receivedtime < 0 || cl.frames[i&UPDATE_MASK].invalid)
continue; //packetloss/choke, it's really only a problem for the oldframe, but...
if (cl.frames[i&UPDATE_MASK].packet_entities.servertime >= *servertime)
{
if (cl.frames[i&UPDATE_MASK].packet_entities.servertime)
{
if (!packnew || packnew->servertime != cl.frames[i&UPDATE_MASK].packet_entities.servertime) //if it's a duplicate, pick the latest (so just-shot rockets are still present)
packnew = &cl.frames[i&UPDATE_MASK].packet_entities;
}
}
else if (packnew)
{
if (cl.frames[i&UPDATE_MASK].packet_entities.servertime != packnew->servertime)
{ //it does actually lerp, and isn't an identical frame.
packold = &cl.frames[i&UPDATE_MASK].packet_entities;
break;
}
}
}
//Note, hacking this to return anyway still needs the lerpent array to be valid for all contained entities.
if (!packnew) //should never happen
{
Con_DPrintf("Warning: No lerp-to frame packet\n");
return NULL;
}
if (!packold) //can happem at map start, and really laggy games, but really shouldn't in a normal game
{
Con_DPrintf("Warning: No lerp-from frame packet\n");
packold = packnew;
}
CL_TransitionPacketEntities(packnew, packold, *servertime);
Con_DPrintf("%f %f %f %f %f %f\n", packnew->servertime, *servertime, packold->servertime, cl.gametime, cl.oldgametime, cl.servertime);
// if (packold->servertime < oldoldtime)
// Con_Printf("Spike screwed up\n");
// oldoldtime = packold->servertime;
return packnew;
}
void CL_LinkPacketEntities (void)
{
entity_t *ent;
packet_entities_t *pack;
entity_state_t *state;
lerpents_t *le;
float f;
model_t *model;
vec3_t old_origin;
float autorotate;
int i;
int oldpnum, newpnum;
//, spnum;
dlight_t *dl;
vec3_t angles;
int flicker;
float servertime;
CL_CalcClientTime();
servertime = cl.servertime;
pack = CL_ProcessPacketEntities(&servertime, !!cl_nolerp.value);
if (!pack)
return;
servertime = cl.servertime;
autorotate = anglemod(100*servertime);
for (newpnum=0 ; newpnum<pack->num_entities ; newpnum++)
{
state = &pack->entities[newpnum];
if (cl_numvisedicts == MAX_VISEDICTS)
{
Con_Printf("Too many visible entities\n");
break;
}
ent = &cl_visedicts[cl_numvisedicts];
#ifdef Q3SHADERS
ent->forcedshader = NULL;
#endif
le = &cl.lerpents[state->number];
if (le->framechange == le->oldframechange)
ent->lerpfrac = 0;
else
{
ent->lerpfrac = 1-(servertime - le->oldframechange) / (le->framechange - le->oldframechange);
}
VectorCopy(le->origin, ent->origin)
//bots or powerup glows. Bots always glow, powerups can be disabled
if (state->modelindex != cl_playerindex && r_powerupglow.value);
{
flicker = r_lightflicker.value?(rand()&31):0;
// spawn light flashes, even ones coming from invisible objects
if ((state->effects & (EF_BLUE | EF_RED)) == (EF_BLUE | EF_RED))
CL_NewDlight (state->number, state->origin[0], state->origin[1], state->origin[2], 200 + flicker, 0, 3);
else if (state->effects & EF_BLUE)
CL_NewDlight (state->number, state->origin[0], state->origin[1], state->origin[2], 200 + flicker, 0, 1);
else if (state->effects & EF_RED)
CL_NewDlight (state->number, state->origin[0], state->origin[1], state->origin[2], 200 + flicker, 0, 2);
else if (state->effects & EF_BRIGHTLIGHT)
CL_NewDlight (state->number, state->origin[0], state->origin[1], state->origin[2] + 16, 400 + flicker, 0, 0);
else if (state->effects & EF_DIMLIGHT)
CL_NewDlight (state->number, state->origin[0], state->origin[1], state->origin[2], 200 + flicker, 0, 0);
}
if (state->light[3])
{
CL_NewDlightRGB (state->number, state->origin[0], state->origin[1], state->origin[2], state->light[3], 0, state->light[0]/1024.0f, state->light[1]/1024.0f, state->light[2]/1024.0f);
}
// if set to invisible, skip
if (state->modelindex<1)
continue;
// create a new entity
if (cl_numvisedicts == MAX_VISEDICTS)
break; // object list is full
if (CL_FilterModelindex(state->modelindex, state->frame))
continue;
model = cl.model_precache[state->modelindex];
if (!model)
{
Con_DPrintf("Bad modelindex (%i)\n", state->modelindex);
continue;
}
cl_numvisedicts++;
#ifdef Q3SHADERS
ent->forcedshader = NULL;
#endif
ent->visframe = 0;
ent->keynum = state->number;
if (cl_r2g.value && state->modelindex == cl_rocketindex && cl_rocketindex && cl_grenadeindex)
ent->model = cl.model_precache[cl_grenadeindex];
else
ent->model = model;
ent->flags = state->flags;
if (state->effects & NQEF_ADDATIVE)
ent->flags |= Q2RF_ADDATIVE;
if (state->effects & EF_NODEPTHTEST)
ent->flags |= RF_NODEPTHTEST;
// set colormap
if (state->colormap && (state->colormap <= MAX_CLIENTS)
&& (gl_nocolors.value == -1 || (ent->model/* && state->modelindex == cl_playerindex*/)))
{
ent->colormap = cl.players[state->colormap-1].translations;
ent->scoreboard = &cl.players[state->colormap-1];
}
else
{
ent->colormap = vid.colormap;
ent->scoreboard = NULL;
}
// set skin
ent->skinnum = state->skinnum;
ent->abslight = state->abslight;
ent->drawflags = state->hexen2flags;
// set frame
ent->frame = state->frame;
ent->oldframe = le->frame;
ent->frame1time = cl.servertime - le->framechange;
ent->frame2time = cl.servertime - le->oldframechange;
// f = (sin(realtime)+1)/2;
#ifdef PEXT_SCALE
//set scale
ent->scale = state->scale/16.0;
#endif
#ifdef PEXT_TRANS
//set trans
ent->alpha = state->trans/255.0;
#endif
#ifdef PEXT_FATNESS
//set trans
ent->fatness = state->fatness/2.0;
#endif
// rotate binary objects locally
if (model && model->flags & EF_ROTATE)
{
angles[0] = 0;
angles[1] = autorotate;
angles[2] = 0;
if (cl_item_bobbing.value)
ent->origin[2] += 5+sin(cl.time*3)*5; //don't let it into the ground
}
else
{
float a1, a2;
for (i=0 ; i<3 ; i++)
{
angles[i] = le->angles[i];
}
}
VectorCopy(angles, ent->angles);
angles[0]*=-1;
AngleVectors(angles, ent->axis[0], ent->axis[1], ent->axis[2]);
VectorInverse(ent->axis[1]);
if (ent->keynum <= MAX_CLIENTS
#ifdef NQPROT
&& cls.protocol == CP_QUAKEWORLD
#endif
)
ent->keynum += MAX_EDICTS;
if (state->tagentity)
{ //ent is attached to a tag, rotate this ent accordingly.
CL_RotateAroundTag(ent, state->number, state->tagentity, state->tagindex);
}
// add automatic particle trails
if (!model || (!(model->flags&~EF_ROTATE) && model->particletrail<0 && model->particleeffect<0))
continue;
if (!cls.allow_anyparticles && !(model->flags & ~EF_ROTATE))
continue;
// scan the old entity display list for a matching
for (i=0 ; i<cl_oldnumvisedicts ; i++)
{
if (cl_oldvisedicts[i].keynum == ent->keynum)
{
VectorCopy (cl_oldvisedicts[i].origin, old_origin);
break;
}
}
if (i == cl_oldnumvisedicts)
{
P_DelinkTrailstate(&(cl.lerpents[state->number].trailstate));
P_DelinkTrailstate(&(cl.lerpents[state->number].emitstate));
continue; // not in last message
}
for (i=0 ; i<3 ; i++)
if ( abs(old_origin[i] - ent->origin[i]) > 128)
{ // no trail if too far
VectorCopy (ent->origin, old_origin);
break;
}
if (model->particletrail>=0)
{
// Con_Printf("(%f %f %f) (%f %f %f)\n", ent->origin[0], ent->origin[1], ent->origin[2], old_origin[0], old_origin[1], old_origin[2]);
/*
if (ent->origin[0] == old_origin[0] || ent->origin[1] == old_origin[1] || ent->origin[2] == old_origin[2])
{
if (ent->origin[0] == old_origin[0] && ent->origin[1] == old_origin[1] && ent->origin[2] == old_origin[2])
{
Con_Printf("Total match!!\n");
}
else
Con_Printf("impartial match!!\n");
}*/
P_ParticleTrail (old_origin, ent->origin, model->particletrail, &(le->trailstate));
}
{
extern cvar_t gl_part_flame;
if (cls.allow_anyparticles && gl_part_flame.value)
{
P_EmitEffect (ent->origin, model->particleeffect, &(le->emitstate));
}
}
//dlights are not so customisable.
if (r_rocketlight.value)
{
float rad = 0;
vec3_t dclr;
dclr[0] = 0.20;
dclr[1] = 0.10;
dclr[2] = 0;
if (model->flags & EF_ROCKET)
{
if (strncmp(model->name, "models/sflesh", 13))
{ //hmm. hexen spider gibs...
rad = 200;
dclr[2] = 0.05;
}
}
else if (model->flags & EF_FIREBALL)
{
rad = 120 - (rand() % 20);
}
else if (model->flags & EF_ACIDBALL)
{
rad = 120 - (rand() % 20);
}
else if (model->flags & EF_SPIT)
{
// as far as I can tell this effect inverses the light...
dclr[0] = -dclr[0];
dclr[0] = -dclr[1];
dclr[0] = -dclr[2];
rad = 120 - (rand() % 20);
}
if (rad)
{
dl = CL_AllocDlight (state->number);
VectorCopy (ent->origin, dl->origin);
dl->die = (float)cl.time;
if (model->flags & EF_ROCKET)
dl->origin[2] += 1; // is this even necessary
dl->radius = rad * bound(0, r_rocketlight.value, 1);
VectorCopy(dclr, dl->color);
}
}
}
}
#else
void CL_LinkPacketEntities (void) void CL_LinkPacketEntities (void)
{ {
entity_t *ent; entity_t *ent;
@ -1824,7 +2127,7 @@ void CL_LinkPacketEntities (void)
} }
} }
} }
#endif
/* /*
========================================================================= =========================================================================

View file

@ -3732,7 +3732,7 @@ void CL_ParseServerMessage (void)
i = MSG_ReadByte (); i = MSG_ReadByte ();
if (i >= MAX_CLIENTS) if (i >= MAX_CLIENTS)
Host_EndGame ("CL_ParseServerMessage: svc_updateentertime > MAX_SCOREBOARD"); Host_EndGame ("CL_ParseServerMessage: svc_updateentertime > MAX_SCOREBOARD");
cl.players[i].entertime = realtime - MSG_ReadFloat (); cl.players[i].entertime = cl.servertime - MSG_ReadFloat ();
break; break;
case svc_spawnbaseline: case svc_spawnbaseline:
@ -3804,7 +3804,7 @@ void CL_ParseServerMessage (void)
if (!cl.intermission) if (!cl.intermission)
TP_ExecTrigger ("f_mapend"); TP_ExecTrigger ("f_mapend");
cl.intermission = 1; cl.intermission = 1;
cl.completed_time = realtime; cl.completed_time = cl.servertime;
vid.recalc_refdef = true; // go to full screen vid.recalc_refdef = true; // go to full screen
for (i=0 ; i<3 ; i++) for (i=0 ; i<3 ; i++)
cl.simorg[0][i] = MSG_ReadCoord (); cl.simorg[0][i] = MSG_ReadCoord ();
@ -3819,7 +3819,7 @@ void CL_ParseServerMessage (void)
case svc_finale: case svc_finale:
cl.intermission = 2; cl.intermission = 2;
cl.completed_time = realtime; cl.completed_time = cl.servertime;
vid.recalc_refdef = true; // go to full screen vid.recalc_refdef = true; // go to full screen
SCR_CenterPrint (destsplit, MSG_ReadString ()); SCR_CenterPrint (destsplit, MSG_ReadString ());
break; break;
@ -4398,13 +4398,13 @@ void CLNQ_ParseServerMessage (void)
cl.oldgametime = cl.gametime; cl.oldgametime = cl.gametime;
cl.oldgametimemark = cl.gametimemark; cl.oldgametimemark = cl.gametimemark;
cl.gametime = MSG_ReadFloat(); cl.gametime = MSG_ReadFloat();
cl.gametimemark = realtime; cl.gametimemark = realtime;
if (nq_dp_protocol<5) if (nq_dp_protocol<5)
{ {
// cl.frames[(cls.netchan.incoming_sequence-1)&UPDATE_MASK].packet_entities = cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].packet_entities; // cl.frames[(cls.netchan.incoming_sequence-1)&UPDATE_MASK].packet_entities = cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].packet_entities;
cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].packet_entities.num_entities=0; cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].packet_entities.num_entities=0;
cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].packet_entities.servertime = cl.gametime;
} }
break; break;
@ -4502,20 +4502,20 @@ void CLNQ_ParseServerMessage (void)
if (!cl.intermission) if (!cl.intermission)
TP_ExecTrigger ("f_mapend"); TP_ExecTrigger ("f_mapend");
cl.intermission = 1; cl.intermission = 1;
cl.completed_time = cl.time; cl.completed_time = cl.servertime;
vid.recalc_refdef = true; // go to full screen vid.recalc_refdef = true; // go to full screen
break; break;
case svc_finale: case svc_finale:
cl.intermission = 2; cl.intermission = 2;
cl.completed_time = cl.time; cl.completed_time = cl.servertime;
vid.recalc_refdef = true; // go to full screen vid.recalc_refdef = true; // go to full screen
SCR_CenterPrint (0, MSG_ReadString ()); SCR_CenterPrint (0, MSG_ReadString ());
break; break;
case svc_cutscene: case svc_cutscene:
cl.intermission = 3; cl.intermission = 3;
cl.completed_time = cl.time; cl.completed_time = cl.servertime;
vid.recalc_refdef = true; // go to full screen vid.recalc_refdef = true; // go to full screen
SCR_CenterPrint (0, MSG_ReadString ()); SCR_CenterPrint (0, MSG_ReadString ());
break; break;

View file

@ -641,7 +641,7 @@ void CL_CalcClientTime(void)
{ {
float want; float want;
want = cl.oldgametime + realtime - cl.gametimemark; want = cl.oldgametime + (realtime - cl.gametimemark);
if (want>cl.servertime) if (want>cl.servertime)
cl.servertime = want; cl.servertime = want;
@ -750,11 +750,19 @@ void CL_PredictMovePNum (int pnum)
#ifdef PEXT_SETVIEW #ifdef PEXT_SETVIEW
if (cl.viewentity[pnum]) if (cl.viewentity[pnum])
{ {
entity_state_t *CL_FindOldPacketEntity(int num); if (cl.viewentity[pnum] < cl.maxlerpents)
{
// Con_Printf("Using lerped pos\n");
org = cl.lerpents[cl.viewentity[pnum]].origin;
vel = vec3_origin;
goto fixedorg;
}
Con_Printf("Not lerped\n");
/* entity_state_t *CL_FindOldPacketEntity(int num);
entity_state_t *CL_FindPacketEntity(int num); entity_state_t *CL_FindPacketEntity(int num);
entity_state_t *state; entity_state_t *state;
state = CL_FindPacketEntity (cl.viewentity[pnum]); state = CL_FindPacketEntity (cl.viewentity[pnum]);
if (state) if (state && state->number < cl.maxlerpents)
{ {
float f; float f;
extern cvar_t cl_nolerp; extern cvar_t cl_nolerp;
@ -784,7 +792,7 @@ void CL_PredictMovePNum (int pnum)
goto fixedorg; goto fixedorg;
} }
} */ }
#endif #endif
if (((cl_nopred.value && cls.demoplayback!=DPB_MVD)|| cl.fixangle)) if (((cl_nopred.value && cls.demoplayback!=DPB_MVD)|| cl.fixangle))
{ {

View file

@ -794,6 +794,7 @@ void CLQ3_SendConnectPacket(netadr_t to);
void CLQ3_SendCmd(usercmd_t *cmd); void CLQ3_SendCmd(usercmd_t *cmd);
qboolean CLQ3_Netchan_Process(void); qboolean CLQ3_Netchan_Process(void);
void CLQ3_ParseServerMessage (void); void CLQ3_ParseServerMessage (void);
struct snapshot_s;
qboolean CG_FillQ3Snapshot(int snapnum, struct snapshot_s *snapshot); qboolean CG_FillQ3Snapshot(int snapnum, struct snapshot_s *snapshot);
void CG_InsertIntoGameState(int num, char *str); void CG_InsertIntoGameState(int num, char *str);

View file

@ -1179,8 +1179,7 @@ void Sbar_SoloScoreboard (void)
Sbar_DrawPic (0, 0, sb_scorebar); Sbar_DrawPic (0, 0, sb_scorebar);
// time // time
time = cl.gametime; time = cl.servertime;
time += realtime - cl.gametimemark;
minutes = time / 60; minutes = time / 60;
seconds = time - 60*minutes; seconds = time - 60*minutes;
tens = seconds / 10; tens = seconds / 10;
@ -1203,8 +1202,7 @@ void Sbar_CoopScoreboard (void)
Sbar_DrawString (8, 12, str); Sbar_DrawString (8, 12, str);
// time // time
time = cl.gametime; time = cl.servertime;
time += realtime - cl.gametimemark;
minutes = time / 60; minutes = time / 60;
seconds = time - 60*minutes; seconds = time - 60*minutes;
tens = seconds / 10; tens = seconds / 10;
@ -2008,7 +2006,7 @@ void Sbar_DeathmatchOverlay (int start)
if (cl.intermission) if (cl.intermission)
total = cl.completed_time - s->entertime; total = cl.completed_time - s->entertime;
else else
total = realtime - s->entertime; total = cl.servertime - s->entertime;
minutes = (int)total/60; minutes = (int)total/60;
sprintf (num, "%4i", minutes); sprintf (num, "%4i", minutes);
Draw_String ( x+64 , y, num); Draw_String ( x+64 , y, num);

View file

@ -133,7 +133,9 @@ static qboolean Alsa_InitAlsa(void)
alsasharedobject = dlopen("libasound.so", RTLD_LAZY|RTLD_LOCAL); alsasharedobject = dlopen("libasound.so", RTLD_LAZY|RTLD_LOCAL);
if (!alsasharedobject) if (!alsasharedobject)
{
return false; return false;
}
psnd_pcm_open = dlsym(alsasharedobject, "snd_pcm_open"); psnd_pcm_open = dlsym(alsasharedobject, "snd_pcm_open");
@ -202,7 +204,10 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
snd_pcm_uframes_t frag_size; snd_pcm_uframes_t frag_size;
if (!Alsa_InitAlsa()) if (!Alsa_InitAlsa())
{
Con_Printf("Alsa does not appear to be installed or compatable\n");
return 2; return 2;
}
hw = alloca(psnd_pcm_hw_params_sizeof()); hw = alloca(psnd_pcm_hw_params_sizeof());
sw = alloca(psnd_pcm_sw_params_sizeof()); sw = alloca(psnd_pcm_sw_params_sizeof());
@ -221,6 +226,8 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
sc->inactive_sound = true; //linux sound devices always play sound, even when we're not the active app... sc->inactive_sound = true; //linux sound devices always play sound, even when we're not the active app...
Con_Printf("Initing ALSA sound device %s\n", pcmname);
// COMMANDLINEOPTION: Linux ALSA Sound: -sndbits <number> sets sound precision to 8 or 16 bit (email me if you want others added) // COMMANDLINEOPTION: Linux ALSA Sound: -sndbits <number> sets sound precision to 8 or 16 bit (email me if you want others added)
if ((i=COM_CheckParm("-sndbits")) != 0) if ((i=COM_CheckParm("-sndbits")) != 0)
{ {

View file

@ -156,19 +156,26 @@ sounddriver pALSA_InitCard;
sounddriver pOSS_InitCard; sounddriver pOSS_InitCard;
sounddriver pSDL_InitCard; sounddriver pSDL_InitCard;
sounddriver pWAV_InitCard; sounddriver pWAV_InitCard;
sounddriver pAHI_InitCard;
sounddriver *drivers[] = { typedef struct {
&pDSOUND_InitCard, char *name;
&pALSA_InitCard, sounddriver *ptr;
&pOSS_InitCard, } sdriver_t;
&pSDL_InitCard, sdriver_t drivers[] = {
&pWAV_InitCard, //in order of preference
NULL {"DSound", &pDSOUND_InitCard},
{"ALSA", &pALSA_InitCard},
{"OSS", &pOSS_InitCard},
{"SDL", &pSDL_InitCard},
{"WaveOut", &pWAV_InitCard},
{"AHI", &pAHI_InitCard},
{NULL, NULL}
}; };
static int SNDDMA_Init(soundcardinfo_t *sc, int *cardnum, int *drivernum) static int SNDDMA_Init(soundcardinfo_t *sc, int *cardnum, int *drivernum)
{ {
sounddriver *sd; sdriver_t *sd;
int st = 0; int st = 0;
memset(sc, 0, sizeof(*sc)); memset(sc, 0, sizeof(*sc));
@ -181,13 +188,20 @@ static int SNDDMA_Init(soundcardinfo_t *sc, int *cardnum, int *drivernum)
else else
sc->sn.speed = 11025; sc->sn.speed = 11025;
sd = drivers[*drivernum]; sd = &drivers[*drivernum];
if (!sd) if (!sd->ptr)
return 2; //no more cards. return 2; //no more cards.
if (!*sd) //driver not loaded if (!*sd->ptr) //driver not loaded
{
Con_DPrintf("Sound driver %s is not loaded\n", sd->name);
st = 2; st = 2;
}
else else
st = (**sd)(sc, *cardnum); {
Con_DPrintf("Trying to load a %s sound device\n", sd->name);
st = (**sd->ptr)(sc, *cardnum);
}
if (st == 1) //worked if (st == 1) //worked
{ {
*cardnum += 1; //use the next card next time *cardnum += 1; //use the next card next time

View file

@ -81,7 +81,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
// open the sound device, confirm capability to mmap, and get size of dma buffer // open the sound device, confirm capability to mmap, and get size of dma buffer
printf("Initing sound device %s\n", snddev); Con_Printf("Initing OSS sound device %s\n", snddev);
sc->audio_fd = open(snddev, O_RDWR | O_NONBLOCK); //try the primary device sc->audio_fd = open(snddev, O_RDWR | O_NONBLOCK); //try the primary device
if (sc->audio_fd < 0) if (sc->audio_fd < 0)

View file

@ -203,6 +203,7 @@ extern sounddriver pALSA_InitCard;
extern sounddriver pOSS_InitCard; extern sounddriver pOSS_InitCard;
extern sounddriver pSDL_InitCard; extern sounddriver pSDL_InitCard;
extern sounddriver pWAV_InitCard; extern sounddriver pWAV_InitCard;
extern sounddriver pAHI_InitCard;
struct soundcardinfo_s { //windows has one defined AFTER directsound struct soundcardinfo_s { //windows has one defined AFTER directsound
char name[256]; //a description of the card. char name[256]; //a description of the card.

View file

@ -308,11 +308,27 @@ int Sys_EnumerateFiles (char *gpath, char *match, int (*func)(char *, int, void
return true; return true;
} }
int secbase;
unsigned int Sys_Milliseconds (void)
{
struct timeval tp;
struct timezone tzp;
gettimeofday(&tp, &tzp);
if (!secbase)
{
secbase = tp.tv_sec;
return tp.tv_usec/1000;
}
return (tp.tv_sec - secbase) + tp.tv_usec/1000;
}
double Sys_DoubleTime (void) double Sys_DoubleTime (void)
{ {
struct timeval tp; struct timeval tp;
struct timezone tzp; struct timezone tzp;
static int secbase;
gettimeofday(&tp, &tzp); gettimeofday(&tp, &tzp);

View file

@ -30,6 +30,7 @@ typedef struct f_modified_s {
f_modified_t *f_modified_list; f_modified_t *f_modified_list;
qboolean care_f_modified; qboolean care_f_modified;
qboolean f_modified_particles; qboolean f_modified_particles;
qboolean f_modified_staticlights;
cvar_t allow_f_version = {"allow_f_version", "1"}; cvar_t allow_f_version = {"allow_f_version", "1"};
@ -246,6 +247,7 @@ void ValidationPrintVersion(char *f_query_string)
} }
void Validation_FilesModified (void) void Validation_FilesModified (void)
{ {
Con_Printf ("Not implemented\n", RESTRICT_RCON);
} }
void Validation_CheckIfResponse(char *text) void Validation_CheckIfResponse(char *text)
{ {
@ -443,6 +445,7 @@ void Validation_IncludeFile(char *filename, char *file, int filelen)
} }
qboolean f_modified_particles; qboolean f_modified_particles;
qboolean f_modified_staticlights;
qboolean care_f_modified; qboolean care_f_modified;
@ -477,11 +480,6 @@ qboolean care_f_modified;
#define SECURE_ANSWER_NO 'n' #define SECURE_ANSWER_NO 'n'
#define SECURE_ANSWER_ERROR 'n' #define SECURE_ANSWER_ERROR 'n'
cvar_t allow_f_version = {"allow_f_version", "1"};
cvar_t allow_f_server = {"allow_f_server", "1"};
cvar_t allow_f_modified = {"allow_f_modified", "1"};
cvar_t allow_f_skins = {"allow_f_skins", "1"};
cvar_t auth_validateclients = {"auth_validateclients", "1"};
// //
// last f_queries // last f_queries
@ -502,13 +500,7 @@ f_query_t;
f_query_t f_last_queries[F_QUERIES_REMEMBERED]; f_query_t f_last_queries[F_QUERIES_REMEMBERED];
int f_last_query_pos = 0; int f_last_query_pos = 0;
typedef struct f_modified_s {
char name[MAX_QPATH];
qboolean ismodified;
struct f_modified_s *next;
} f_modified_t;
f_modified_t *f_modified_list;
qboolean care_f_modified; qboolean care_f_modified;
qboolean f_modified_particles; qboolean f_modified_particles;

View file

@ -1514,8 +1514,11 @@ void V_RenderView (void)
if (cl.worldmodel) if (cl.worldmodel)
{ {
RSpeedMark(); RSpeedMark();
CL_AllowIndependantSendCmd(false); CL_AllowIndependantSendCmd(false);
CL_EmitEntities();
//work out which packet entities are solid //work out which packet entities are solid
CL_SetSolidEntities (); CL_SetSolidEntities ();
@ -1529,7 +1532,7 @@ void V_RenderView (void)
CL_SetUpPlayerPrediction(true); CL_SetUpPlayerPrediction(true);
// build a refresh entity list // build a refresh entity list
CL_EmitEntities (); // CL_EmitEntities ();
CL_AllowIndependantSendCmd(true); CL_AllowIndependantSendCmd(true);

View file

@ -146,7 +146,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//fix things a little... //fix things a little...
#ifdef MINGW #ifdef MINGW
#undef ZLIB
#undef AVAIL_ZLIB #undef AVAIL_ZLIB
#endif #endif
@ -154,10 +153,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define AVAIL_MP3 //suposedly anti-gpl. don't use in a distributed binary #define AVAIL_MP3 //suposedly anti-gpl. don't use in a distributed binary
#endif #endif
#ifndef ZLIB
#undef AVAIL_ZLIB //no zip/pk3 support
#endif
#ifndef _WIN32 #ifndef _WIN32
#undef QTERM #undef QTERM
#endif #endif

View file

@ -88,12 +88,12 @@ typedef struct cvar_group_s
//freestyle //freestyle
#define CVAR_POINTER 32 // q2 style. May be converted to q1 if needed. These are often specified on the command line and then converted into q1 when registered properly. #define CVAR_POINTER 32 // q2 style. May be converted to q1 if needed. These are often specified on the command line and then converted into q1 when registered properly.
#define CVAR_NOTFROMSERVER 64 #define CVAR_NOTFROMSERVER 64 // the console will ignore changes to cvars if set at from the server or any gamecode. This is to protect against security flaws - like qterm
#define CVAR_USERCREATED 128 //write a 'set' or 'seta' in front of the var name. #define CVAR_USERCREATED 128 //write a 'set' or 'seta' in front of the var name.
#define CVAR_CHEAT 256 //latch to the default, unless cheats are enabled. #define CVAR_CHEAT 256 //latch to the default, unless cheats are enabled.
#define CVAR_SEMICHEAT 512 //if strict ruleset, force to 0/blank. #define CVAR_SEMICHEAT 512 //if strict ruleset, force to 0/blank.
#define CVAR_RENDERERLATCH 1024 #define CVAR_RENDERERLATCH 1024 //requires a vid_restart to reapply.
#define CVAR_SERVEROVERRIDE 2048 // #define CVAR_SERVEROVERRIDE 2048 //the server has overridden out local value - should probably be called SERVERLATCH
#define CVAR_LASTFLAG CVAR_SERVEROVERRIDE #define CVAR_LASTFLAG CVAR_SERVEROVERRIDE

View file

@ -723,6 +723,7 @@ typedef struct entity_state_s
#define MAX_MVDPACKET_ENTITIES 196 // doesn't count nails #define MAX_MVDPACKET_ENTITIES 196 // doesn't count nails
typedef struct typedef struct
{ {
float servertime;
int num_entities; int num_entities;
int max_entities; int max_entities;
entity_state_t *entities; entity_state_t *entities;

View file

@ -1464,11 +1464,46 @@ void GL_DrawAliasMesh (mesh_t *mesh, int texnum)
#endif #endif
} }
qboolean R_CullEntityBox(entity_t *e, vec3_t modmins, vec3_t modmaxs)
{
int i;
vec3_t wmin, wmax;
float fmin, fmax;
//convert the model's bbox to the expanded maximum size of the entity, as drawn with this model.
//The result is an axial box, which we pass to R_CullBox
for (i = 0; i < 3; i++)
{
fmin = DotProduct(modmins, e->axis[i]);
fmax = DotProduct(modmaxs, e->axis[i]);
if (fmin > -16)
fmin = -16;
if (fmax < 16)
fmax = 16;
if (fmin < fmax)
{
wmin[i] = e->origin[i]+fmin;
wmax[i] = e->origin[i]+fmax;
}
else
{ //box went inside out
wmin[i] = e->origin[i]+fmax;
wmax[i] = e->origin[i]+fmin;
}
}
return R_CullBox(wmin, wmax);
}
void R_DrawGAliasModel (entity_t *e) void R_DrawGAliasModel (entity_t *e)
{ {
extern cvar_t r_drawflat; extern cvar_t r_drawflat;
model_t *clmodel; model_t *clmodel;
vec3_t mins, maxs;
vec3_t dist; vec3_t dist;
vec_t add; vec_t add;
int i; int i;
@ -1506,11 +1541,8 @@ void R_DrawGAliasModel (entity_t *e)
clmodel = e->model; clmodel = e->model;
} }
VectorAdd (e->origin, clmodel->mins, mins);
VectorAdd (e->origin, clmodel->maxs, maxs);
if (!(e->flags & Q2RF_WEAPONMODEL)) if (!(e->flags & Q2RF_WEAPONMODEL))
if (R_CullBox (mins, maxs)) if (R_CullEntityBox (e, clmodel->mins, clmodel->maxs))
return; return;
if (!(r_refdef.flags & Q2RDF_NOWORLDMODEL)) if (!(r_refdef.flags & Q2RDF_NOWORLDMODEL))

108
engine/makeconfig.sh Normal file
View file

@ -0,0 +1,108 @@
#!/bin/bash
#This is a fairly lame shell script
#It could be written so much better...
#Anyway, what it does is ask the user lots of questions and then pipes some text to a file which can be used by the engine.
#the Makefile explicitally tests for config.h, and will pass the right precompiler to gcc so that this file is actually used.
#And so we don't break in the absence of this file.
if [ $1 = y ]; then
defaulttoyes=true
echo "Checking installed libraries"
else
echo "Answer the questions to generate a config.h file"
echo "If you wish to remove the config, delete it and recompile, make will sort stuff out"
echo "Many of these questions are irrelevent if you want to build only a dedicated server, for instance"
echo "Some of them depend on others"
echo "Usage of this script is not fully supported by the FTE team, and not every combination will likly work"
echo "If using this script does produce compile errors, you can try reporting the issue preferably via irc"
fi
#clear out the config
echo "//warning: generated file." > config.h
echo "//Use 'make config' to alter this file" >> config.h
echo "//it is safe to delete this file if you want to use the default settings" >> config.h
echo "" >> config.h
query()
{
if [ $defaulttoyes = true ]; then
ans=y
else
read -n 1 -p "$1 " ans
echo ""
fi
if [ $ans = y -o $ans = Y ]; then
echo "#define $2" >> config.h
else
echo "//#define $2" >> config.h
fi
}
querylibrary()
{
if [ -f /usr/include/$3 ] ; then
query "$1" "$2"
return
fi
if [ -f /usr/local/include/$4 ] ; then
query "$1" "$2"
return
fi
echo "$1 n"
echo "//#define $2" >> config.h
}
querylibrary "Is libz (zlib) available on this system (zip support)?" AVAIL_ZLIB "zlib.h"
querylibrary "Is libvorbis (a free media library) available on this system (ogg support) ?" AVAIL_OGGVORBIS "vorbis/vorbisfile.h"
# querylibrary "Is libmad (an mp3 library) available on this system (mp3 support) ?" AVAIL_MP3
querylibrary "Is libpng available on this system (png support)?" AVAIL_PNGLIB "png.h"
querylibrary "Is libjpeg available on this system (jpeg support)?" AVAIL_JPEGLIB "jpeglib.h"
query "Do you want to enable the dds support ?" DDS
query "Do you want to enable on-server rankings?" SVRANKING
query "Do you want to enable stainmaps in software rendering?" SWSTAINS
query "Do you want to enable secondary/reverse views?" "SIDEVIEWS 4"
query "Do you want to enable quake2 sprites (sp2) ?" SP2MODELS
query "Do you want to enable quake2 models (md2) ?" MD2MODELS
query "Do you want to enable quake3arena models (md3) ?" MD3MODELS
query "Do you want to enable doom3 models (md5) ?" MD5MODELS
query "Do you want to enable 'zymotic' models (zym, used by nexuiz) ?" ZYMOTICMODELS
query "Do you want to enable basic halflife model support (mdl) ?" HALFLIFEMODELS
query "Do you want to enable network compression (huffman) ?" HUFFNETWORK
#query "Do you want to enable doom wad, map and sprite support (best to say no here) ?" DOOMWADS
query "Do you want to enable quake2 map support ?" Q2BSPS
query "Do you want to enable quake3 map support ?" Q3BSPS
query "Do you want to enable fte's heightmap support ?" TERRAIN
query "Do you want to enable the built in master server ?" SV_MASTER
query "Do you want to enable the FTE_NPCCHAT qc extention ?" SVCHAT
query "Do you want to enable the quake2 server ?" Q2SERVER
query "Do you want to enable the quake2 client ?" Q2CLIENT
query "Do you want to enable the quake3 server ?" Q3SERVER
query "Do you want to enable the quake3 client ?" Q3CLIENT
query "Do you want to enable netquake compatability ?" NQPROT
query "Do you want to allow connections via tcp (for suppose3rd party firewalls) ?" TCPCONNECT
query "Do you want to enable fish-eye views (only in software) ?" FISH
query "Do you want to enable the built in http/ftp server ?" WEBSERVER
query "Do you want to enable the built in http/ftp clients ?" WEBCLIENT
query "Do you want to enable the deluxemap generation routine ?" RUNTIMELIGHTING
query "Do you want to enable the 'qterm' (this is a major security risk) ?" QTERM
query "Do you want to enable the server browser ?" CL_MASTER
query "Do you want to enable the serial-mouse support (used in splitscreen) ?" SERIALMOUSE
query "Do you want to enable the per-pixel lighting routines ?" PPL
query "Do you want to enable the text editor ?" TEXTEDITOR
query "Do you want to enable the plugin support ?" PLUGINS
query "Do you want to enable csqc support ?" CSQC_DAT
query "Do you want to enable menu.dat support (used by nexuiz) ?" MENU_DAT
query "Do you want to enable quake3 shader support ?" Q3SHADERS
query "Do you want to enable the built in irc client (note that there is also a plugin irc client, which cooler) ?" IRCCLIENT
echo "#define R_XFLIP" >> config.h
echo "#define IN_XFLIP" >> config.h

View file

@ -1,5 +1,6 @@
QCC_OBJS=qccmain.o qcc_cmdlib.o qcc_pr_comp.o qcc_pr_lex.o comprout.o hash.o qcd_main.o QCC_OBJS=qccmain.o qcc_cmdlib.o qcc_pr_comp.o qcc_pr_lex.o comprout.o hash.o qcd_main.o
GTKGUI_OBJS=qcc_gtk.o qccguistuff.c GTKGUI_OBJS=qcc_gtk.o qccguistuff.c
LIB_OBJS=
CC=gcc -Wall -DQCCONLY CC=gcc -Wall -DQCCONLY
@ -10,6 +11,7 @@ all: qcc
BASE_CFLAGS=-ggdb BASE_CFLAGS=-ggdb
CFLAGS = CFLAGS =
lib:
win_nocyg: $(QCC_OBJS) qccgui.c qccguistuff.c win_nocyg: $(QCC_OBJS) qccgui.c qccguistuff.c
$(CC) $(BASE_CFLAGS) -o fteqcc.exe -O3 -s $(QCC_OBJS) -mno-cygwin -mwindows $(CC) $(BASE_CFLAGS) -o fteqcc.exe -O3 -s $(QCC_OBJS) -mno-cygwin -mwindows

View file

@ -399,6 +399,13 @@ reeval:
pr_xstatement = st-pr_statements; pr_xstatement = st-pr_statements;
PR_RunError (progfuncs, "assignment to read-only entity in %s", progfuncs->stringtable + pr_xfunction->s_name); PR_RunError (progfuncs, "assignment to read-only entity in %s", progfuncs->stringtable + pr_xfunction->s_name);
} }
//Whilst the next block would technically be correct, we don't use it as it breaks too many quake mods.
// if (ed->isfree)
// {
// pr_xstatement = st-pr_statements;
// PR_RunError (progfuncs, "assignment to free entitiy in %s", progfuncs->stringtable + pr_xfunction->s_name);
// }
OPC->_int = ENGINEPOINTER((((int *)edvars(ed)) + OPB->_int + progfuncs->fieldadjust)); OPC->_int = ENGINEPOINTER((((int *)edvars(ed)) + OPB->_int + progfuncs->fieldadjust));
break; break;