couple of effect changes to do with q2.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@904 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-03-18 06:14:07 +00:00
parent f23f8ba961
commit 67950ee8ac
18 changed files with 517 additions and 482 deletions

View file

@ -44,7 +44,7 @@ char cl_spectatorgroup[] = "Spectator Tracking";
// track high fragger
cvar_t cl_hightrack = {"cl_hightrack", "0" };
cvar_t cl_chasecam = {"cl_chasecam", "0"};
cvar_t cl_chasecam = {"cl_chasecam", "1"};
//cvar_t cl_camera_maxpitch = {"cl_camera_maxpitch", "10" };
//cvar_t cl_camera_maxyaw = {"cl_camera_maxyaw", "30" };

View file

@ -229,11 +229,6 @@ void CL_DecayLights (void)
if (dl->color[2] < 0)
dl->color[2] = 0;
}
#ifdef Q2CLIENT //FIXME: Why? why just q2 clients?
if (cls.q2server)
if (!dl->decay)
dl->radius = 0;
#endif
}
}
@ -1304,6 +1299,32 @@ void V_AddEntity(entity_t *in)
ent->angles[0]*=-1;
}
void V_AddLerpEntity(entity_t *in) //a convienience function
{
entity_t *ent;
float fwds, back;
int i;
if (cl_numvisedicts == MAX_VISEDICTS)
return; // object list is full
ent = &cl_visedicts[cl_numvisedicts];
cl_numvisedicts++;
*ent = *in;
fwds = ent->lerpfrac;
back = 1 - ent->lerpfrac;
for (i = 0; i < 3; i++)
{
ent->origin[i] = in->origin[i]*fwds + in->oldorigin[i]*back;
}
ent->angles[0]*=-1;
AngleVectors(ent->angles, ent->axis[0], ent->axis[1], ent->axis[2]);
VectorInverse(ent->axis[1]);
ent->angles[0]*=-1;
}
/*
===============
CL_LinkPacketEntities

View file

@ -1171,8 +1171,6 @@ void CL_SendCmd (void)
{
i = cls.netchan.outgoing_sequence & UPDATE_MASK;
cmd = &cl.frames[i].cmd[plnum];
if (cmd->buttons)
cmd->buttons |= 128;
if (cls.resendinfo)
{
@ -1255,6 +1253,9 @@ void CL_SendCmd (void)
Cam_FinishMove(plnum, cmd);
if (cls.q2server && cmd->buttons)
cmd->buttons |= 128;
for (i=0 ; i<3 ; i++)
cmd->angles[i] = ((int)(cl.viewangles[plnum][i]*65536.0/360)&65535);

View file

@ -366,6 +366,9 @@ void CL_SendConnectPacket (
fteprotextsupported &= ftepext;
if (cls.q2server)
fteprotextsupported = 0;
cls.fteprotocolextensions = fteprotextsupported;
#endif
@ -2837,25 +2840,18 @@ void Host_Init (quakeparms_t *parms)
Memory_Init (parms->membase, parms->memsize);
COM_ParsePlusSets();
Cbuf_Init ();
Cmd_Init ();
V_Init ();
COM_Init ();
#ifdef Q2BSPS
CM_Init();
#endif
Host_FixupModelNames();
NET_Init ();
NET_InitClient ();
Netchan_Init ();
Renderer_Init();
// W_LoadWadFile ("gfx.wad");
@ -2922,15 +2918,15 @@ void Host_Init (quakeparms_t *parms)
Hunk_AllocName (0, "-HOST_HUNKLEVEL-");
host_hunklevel = Hunk_LowMark ();
BZ_CheckAllSentinals();
R_SetRenderer(0);//set the renderer stuff to 'none'...
host_initialized = true;
Cmd_StuffCmds();
BZ_CheckAllSentinals();
Cbuf_Execute (); //if the server initialisation causes a problem, give it a place to abort to
BZ_CheckAllSentinals();
//assuming they didn't use any waits in thier config (fools)
//the configs should be fully loaded.
//so convert the backwards compable commandline parameters in cvar sets.
@ -2939,7 +2935,7 @@ void Host_Init (quakeparms_t *parms)
Cvar_Set(Cvar_FindVar("vid_fullscreen"), "0");
if (COM_CheckParm ("-fullscreen"))
Cvar_Set(Cvar_FindVar("vid_fullscreen"), "1");
BZ_CheckAllSentinals();
if ((i = COM_CheckParm ("-width"))) //width on it's own also sets height
{
Cvar_Set(Cvar_FindVar("vid_width"), com_argv[i+1]);

View file

@ -93,7 +93,7 @@ extern player_t *mplayers;
void CL_QueryServers(void);
int NET_CheckPollSockets(void);
void MasterInfo_Request(master_t *mast);
void MasterInfo_Request(master_t *mast, qboolean evenifwedonthavethefiles);
serverinfo_t *Master_InfoForServer (netadr_t addr);
serverinfo_t *Master_InfoForNum (int num);
int Master_TotalCount(void);

View file

@ -413,12 +413,12 @@ qboolean CL_CheckOrDownloadFile (char *filename, int nodelay)
return true;
}
qboolean CL_CheckMD2Skins (char *name)
{
md2_t *pheader;
qbyte *precache_model;
int precache_model_skin = 1;
char *str;
// checking for skins in the model
precache_model = COM_LoadMallocFile (name);
@ -443,10 +443,14 @@ qboolean CL_CheckMD2Skins (char *name)
pheader = (md2_t *)precache_model;
while (precache_model_skin - 1 < LittleLong(pheader->num_skins)) {
if (!CL_CheckOrDownloadFile((char *)precache_model +
while (precache_model_skin - 1 < LittleLong(pheader->num_skins))
{
str = (char *)precache_model +
LittleLong(pheader->ofs_skins) +
(precache_model_skin - 1)*MD2MAX_SKINNAME, false)) {
(precache_model_skin - 1)*MD2MAX_SKINNAME;
COM_CleanUpPath(str);
if (!CL_CheckOrDownloadFile(str, false))
{
precache_model_skin++;
BZ_Free(precache_model);
@ -1409,6 +1413,7 @@ void CLQ2_ParseServerData (void)
//cl.refresh_prepped = false;
}
P_NewServer();
if (R_PreNewMap)
R_PreNewMap();
@ -2829,380 +2834,15 @@ void CLQ2_ParseMuzzleFlash (void)
void CLQ2_ParseMuzzleFlash2 (void)
{
int ent;
// vec3_t origin;
int flash_number;
// dlight_t *dl;
// vec3_t forward, right;
// char soundname[64];
ent = MSG_ReadShort ();
if (ent < 1 || ent >= Q2MAX_EDICTS)
Host_EndGame ("CL_ParseMuzzleFlash2: bad entity");
flash_number = MSG_ReadByte ();
/*
// locate the origin
AngleVectors (cl_entities[ent].current.angles, forward, right, NULL);
origin[0] = cl_entities[ent].current.origin[0] + forward[0] * monster_flash_offset[flash_number][0] + right[0] * monster_flash_offset[flash_number][1];
origin[1] = cl_entities[ent].current.origin[1] + forward[1] * monster_flash_offset[flash_number][0] + right[1] * monster_flash_offset[flash_number][1];
origin[2] = cl_entities[ent].current.origin[2] + forward[2] * monster_flash_offset[flash_number][0] + right[2] * monster_flash_offset[flash_number][1] + monster_flash_offset[flash_number][2];
dl = CL_AllocDlight (ent);
VectorCopy (origin, dl->origin);
dl->radius = 200 + (rand()&31);
dl->minlight = 32;
dl->die = cl.time; // + 0.1;
switch (flash_number)
{
case Q2MZ2_INFANTRY_MACHINEGUN_1:
case Q2MZ2_INFANTRY_MACHINEGUN_2:
case Q2MZ2_INFANTRY_MACHINEGUN_3:
case Q2MZ2_INFANTRY_MACHINEGUN_4:
case Q2MZ2_INFANTRY_MACHINEGUN_5:
case Q2MZ2_INFANTRY_MACHINEGUN_6:
case Q2MZ2_INFANTRY_MACHINEGUN_7:
case Q2MZ2_INFANTRY_MACHINEGUN_8:
case Q2MZ2_INFANTRY_MACHINEGUN_9:
case Q2MZ2_INFANTRY_MACHINEGUN_10:
case Q2MZ2_INFANTRY_MACHINEGUN_11:
case Q2MZ2_INFANTRY_MACHINEGUN_12:
case Q2MZ2_INFANTRY_MACHINEGUN_13:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_ParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("infantry/infatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_SOLDIER_MACHINEGUN_1:
case Q2MZ2_SOLDIER_MACHINEGUN_2:
case Q2MZ2_SOLDIER_MACHINEGUN_3:
case Q2MZ2_SOLDIER_MACHINEGUN_4:
case Q2MZ2_SOLDIER_MACHINEGUN_5:
case Q2MZ2_SOLDIER_MACHINEGUN_6:
case Q2MZ2_SOLDIER_MACHINEGUN_7:
case Q2MZ2_SOLDIER_MACHINEGUN_8:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_ParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("soldier/solatck3.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_GUNNER_MACHINEGUN_1:
case Q2MZ2_GUNNER_MACHINEGUN_2:
case Q2MZ2_GUNNER_MACHINEGUN_3:
case Q2MZ2_GUNNER_MACHINEGUN_4:
case Q2MZ2_GUNNER_MACHINEGUN_5:
case Q2MZ2_GUNNER_MACHINEGUN_6:
case Q2MZ2_GUNNER_MACHINEGUN_7:
case Q2MZ2_GUNNER_MACHINEGUN_8:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_ParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("gunner/gunatck2.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_ACTOR_MACHINEGUN_1:
case Q2MZ2_SUPERTANK_MACHINEGUN_1:
case Q2MZ2_SUPERTANK_MACHINEGUN_2:
case Q2MZ2_SUPERTANK_MACHINEGUN_3:
case Q2MZ2_SUPERTANK_MACHINEGUN_4:
case Q2MZ2_SUPERTANK_MACHINEGUN_5:
case Q2MZ2_SUPERTANK_MACHINEGUN_6:
case Q2MZ2_TURRET_MACHINEGUN: // PGM
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_ParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("infantry/infatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_BOSS2_MACHINEGUN_L1:
case Q2MZ2_BOSS2_MACHINEGUN_L2:
case Q2MZ2_BOSS2_MACHINEGUN_L3:
case Q2MZ2_BOSS2_MACHINEGUN_L4:
case Q2MZ2_BOSS2_MACHINEGUN_L5:
case Q2MZ2_CARRIER_MACHINEGUN_L1: // PMM
case Q2MZ2_CARRIER_MACHINEGUN_L2: // PMM
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_ParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("infantry/infatck1.wav"), 1, ATTN_NONE, 0);
break;
case Q2MZ2_SOLDIER_BLASTER_1:
case Q2MZ2_SOLDIER_BLASTER_2:
case Q2MZ2_SOLDIER_BLASTER_3:
case Q2MZ2_SOLDIER_BLASTER_4:
case Q2MZ2_SOLDIER_BLASTER_5:
case Q2MZ2_SOLDIER_BLASTER_6:
case Q2MZ2_SOLDIER_BLASTER_7:
case Q2MZ2_SOLDIER_BLASTER_8:
case Q2MZ2_TURRET_BLASTER: // PGM
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("soldier/solatck2.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_FLYER_BLASTER_1:
case Q2MZ2_FLYER_BLASTER_2:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("flyer/flyatck3.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_MEDIC_BLASTER_1:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("medic/medatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_HOVER_BLASTER_1:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("hover/hovatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_FLOAT_BLASTER_1:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("floater/fltatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_SOLDIER_SHOTGUN_1:
case Q2MZ2_SOLDIER_SHOTGUN_2:
case Q2MZ2_SOLDIER_SHOTGUN_3:
case Q2MZ2_SOLDIER_SHOTGUN_4:
case Q2MZ2_SOLDIER_SHOTGUN_5:
case Q2MZ2_SOLDIER_SHOTGUN_6:
case Q2MZ2_SOLDIER_SHOTGUN_7:
case Q2MZ2_SOLDIER_SHOTGUN_8:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("soldier/solatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_TANK_BLASTER_1:
case Q2MZ2_TANK_BLASTER_2:
case Q2MZ2_TANK_BLASTER_3:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/tnkatck3.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_TANK_MACHINEGUN_1:
case Q2MZ2_TANK_MACHINEGUN_2:
case Q2MZ2_TANK_MACHINEGUN_3:
case Q2MZ2_TANK_MACHINEGUN_4:
case Q2MZ2_TANK_MACHINEGUN_5:
case Q2MZ2_TANK_MACHINEGUN_6:
case Q2MZ2_TANK_MACHINEGUN_7:
case Q2MZ2_TANK_MACHINEGUN_8:
case Q2MZ2_TANK_MACHINEGUN_9:
case Q2MZ2_TANK_MACHINEGUN_10:
case Q2MZ2_TANK_MACHINEGUN_11:
case Q2MZ2_TANK_MACHINEGUN_12:
case Q2MZ2_TANK_MACHINEGUN_13:
case Q2MZ2_TANK_MACHINEGUN_14:
case Q2MZ2_TANK_MACHINEGUN_15:
case Q2MZ2_TANK_MACHINEGUN_16:
case Q2MZ2_TANK_MACHINEGUN_17:
case Q2MZ2_TANK_MACHINEGUN_18:
case Q2MZ2_TANK_MACHINEGUN_19:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_ParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Com_sprintf(soundname, sizeof(soundname), "tank/tnkatk2%c.wav", 'a' + rand() % 5);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound(soundname), 1, ATTN_NORM, 0);
break;
case Q2MZ2_CHICK_ROCKET_1:
case Q2MZ2_TURRET_ROCKET: // PGM
dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("chick/chkatck2.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_TANK_ROCKET_1:
case Q2MZ2_TANK_ROCKET_2:
case Q2MZ2_TANK_ROCKET_3:
dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/tnkatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_SUPERTANK_ROCKET_1:
case Q2MZ2_SUPERTANK_ROCKET_2:
case Q2MZ2_SUPERTANK_ROCKET_3:
case Q2MZ2_BOSS2_ROCKET_1:
case Q2MZ2_BOSS2_ROCKET_2:
case Q2MZ2_BOSS2_ROCKET_3:
case Q2MZ2_BOSS2_ROCKET_4:
case Q2MZ2_CARRIER_ROCKET_1:
// case Q2MZ2_CARRIER_ROCKET_2:
// case Q2MZ2_CARRIER_ROCKET_3:
// case Q2MZ2_CARRIER_ROCKET_4:
dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/rocket.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_GUNNER_GRENADE_1:
case Q2MZ2_GUNNER_GRENADE_2:
case Q2MZ2_GUNNER_GRENADE_3:
case Q2MZ2_GUNNER_GRENADE_4:
dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("gunner/gunatck3.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_GLADIATOR_RAILGUN_1:
// PMM
case Q2MZ2_CARRIER_RAILGUN:
case Q2MZ2_WIDOW_RAIL:
// pmm
dl->color[0] = 0.5;dl->color[1] = 0.5;dl->color[2] = 1.0;
break;
// --- Xian's shit starts ---
case Q2MZ2_MAKRON_BFG:
dl->color[0] = 0.5;dl->color[1] = 1 ;dl->color[2] = 0.5;
//Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("makron/bfg_fire.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_MAKRON_BLASTER_1:
case Q2MZ2_MAKRON_BLASTER_2:
case Q2MZ2_MAKRON_BLASTER_3:
case Q2MZ2_MAKRON_BLASTER_4:
case Q2MZ2_MAKRON_BLASTER_5:
case Q2MZ2_MAKRON_BLASTER_6:
case Q2MZ2_MAKRON_BLASTER_7:
case Q2MZ2_MAKRON_BLASTER_8:
case Q2MZ2_MAKRON_BLASTER_9:
case Q2MZ2_MAKRON_BLASTER_10:
case Q2MZ2_MAKRON_BLASTER_11:
case Q2MZ2_MAKRON_BLASTER_12:
case Q2MZ2_MAKRON_BLASTER_13:
case Q2MZ2_MAKRON_BLASTER_14:
case Q2MZ2_MAKRON_BLASTER_15:
case Q2MZ2_MAKRON_BLASTER_16:
case Q2MZ2_MAKRON_BLASTER_17:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("makron/blaster.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_JORG_MACHINEGUN_L1:
case Q2MZ2_JORG_MACHINEGUN_L2:
case Q2MZ2_JORG_MACHINEGUN_L3:
case Q2MZ2_JORG_MACHINEGUN_L4:
case Q2MZ2_JORG_MACHINEGUN_L5:
case Q2MZ2_JORG_MACHINEGUN_L6:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_ParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("boss3/xfire.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_JORG_MACHINEGUN_R1:
case Q2MZ2_JORG_MACHINEGUN_R2:
case Q2MZ2_JORG_MACHINEGUN_R3:
case Q2MZ2_JORG_MACHINEGUN_R4:
case Q2MZ2_JORG_MACHINEGUN_R5:
case Q2MZ2_JORG_MACHINEGUN_R6:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_ParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
break;
case Q2MZ2_JORG_BFG_1:
dl->color[0] = 0.5;dl->color[1] = 1 ;dl->color[2] = 0.5;
break;
case Q2MZ2_BOSS2_MACHINEGUN_R1:
case Q2MZ2_BOSS2_MACHINEGUN_R2:
case Q2MZ2_BOSS2_MACHINEGUN_R3:
case Q2MZ2_BOSS2_MACHINEGUN_R4:
case Q2MZ2_BOSS2_MACHINEGUN_R5:
case Q2MZ2_CARRIER_MACHINEGUN_R1: // PMM
case Q2MZ2_CARRIER_MACHINEGUN_R2: // PMM
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_ParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
break;
// ======
// ROGUE
case Q2MZ2_STALKER_BLASTER:
case Q2MZ2_DAEDALUS_BLASTER:
case Q2MZ2_MEDIC_BLASTER_2:
case Q2MZ2_WIDOW_BLASTER:
case Q2MZ2_WIDOW_BLASTER_SWEEP1:
case Q2MZ2_WIDOW_BLASTER_SWEEP2:
case Q2MZ2_WIDOW_BLASTER_SWEEP3:
case Q2MZ2_WIDOW_BLASTER_SWEEP4:
case Q2MZ2_WIDOW_BLASTER_SWEEP5:
case Q2MZ2_WIDOW_BLASTER_SWEEP6:
case Q2MZ2_WIDOW_BLASTER_SWEEP7:
case Q2MZ2_WIDOW_BLASTER_SWEEP8:
case Q2MZ2_WIDOW_BLASTER_SWEEP9:
case Q2MZ2_WIDOW_BLASTER_100:
case Q2MZ2_WIDOW_BLASTER_90:
case Q2MZ2_WIDOW_BLASTER_80:
case Q2MZ2_WIDOW_BLASTER_70:
case Q2MZ2_WIDOW_BLASTER_60:
case Q2MZ2_WIDOW_BLASTER_50:
case Q2MZ2_WIDOW_BLASTER_40:
case Q2MZ2_WIDOW_BLASTER_30:
case Q2MZ2_WIDOW_BLASTER_20:
case Q2MZ2_WIDOW_BLASTER_10:
case Q2MZ2_WIDOW_BLASTER_0:
case Q2MZ2_WIDOW_BLASTER_10L:
case Q2MZ2_WIDOW_BLASTER_20L:
case Q2MZ2_WIDOW_BLASTER_30L:
case Q2MZ2_WIDOW_BLASTER_40L:
case Q2MZ2_WIDOW_BLASTER_50L:
case Q2MZ2_WIDOW_BLASTER_60L:
case Q2MZ2_WIDOW_BLASTER_70L:
case Q2MZ2_WIDOW_RUN_1:
case Q2MZ2_WIDOW_RUN_2:
case Q2MZ2_WIDOW_RUN_3:
case Q2MZ2_WIDOW_RUN_4:
case Q2MZ2_WIDOW_RUN_5:
case Q2MZ2_WIDOW_RUN_6:
case Q2MZ2_WIDOW_RUN_7:
case Q2MZ2_WIDOW_RUN_8:
dl->color[0] = 0;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("tank/tnkatck3.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_WIDOW_DISRUPTOR:
dl->color[0] = -1;dl->color[1] = -1;dl->color[2] = -1;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("weapons/disint2.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_WIDOW_PLASMABEAM:
case Q2MZ2_WIDOW2_BEAMER_1:
case Q2MZ2_WIDOW2_BEAMER_2:
case Q2MZ2_WIDOW2_BEAMER_3:
case Q2MZ2_WIDOW2_BEAMER_4:
case Q2MZ2_WIDOW2_BEAMER_5:
case Q2MZ2_WIDOW2_BEAM_SWEEP_1:
case Q2MZ2_WIDOW2_BEAM_SWEEP_2:
case Q2MZ2_WIDOW2_BEAM_SWEEP_3:
case Q2MZ2_WIDOW2_BEAM_SWEEP_4:
case Q2MZ2_WIDOW2_BEAM_SWEEP_5:
case Q2MZ2_WIDOW2_BEAM_SWEEP_6:
case Q2MZ2_WIDOW2_BEAM_SWEEP_7:
case Q2MZ2_WIDOW2_BEAM_SWEEP_8:
case Q2MZ2_WIDOW2_BEAM_SWEEP_9:
case Q2MZ2_WIDOW2_BEAM_SWEEP_10:
case Q2MZ2_WIDOW2_BEAM_SWEEP_11:
dl->radius = 300 + (rand()&100);
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
dl->die = cl.time + 200;
break;
// ROGUE
// ======
// --- Xian's shit ends ---
//hmm... he must take AGES on the loo.... :p
}
*/
CLQ2_RunMuzzleFlash2(ent, flash_number);
}
#endif
@ -3886,7 +3526,8 @@ void CLQ2_ParseServerMessage (void)
{
if (msg_badread)
{
Host_EndGame ("CL_ParseServerMessage: Bad server message");
SV_UnspawnServer();
Host_EndGame ("CLQ2_ParseServerMessage: Bad server message");
break;
}

View file

@ -38,7 +38,7 @@ extern usercmd_t independantphysics[MAX_SPLITS];
char *Get_Q2ConfigString(int i);
#ifdef Q2BSPS
void Q2_Pmove (q2pmove_t *pmove);
void VARGS Q2_Pmove (q2pmove_t *pmove);
#define Q2PMF_DUCKED 1
#define Q2PMF_JUMP_HELD 2
#define Q2PMF_ON_GROUND 4
@ -176,7 +176,7 @@ void CLQ2_ClipMoveToEntities ( vec3_t start, vec3_t mins, vec3_t maxs, vec3_t en
CL_PMTrace
================
*/
q2trace_t CLQ2_PMTrace (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
q2trace_t VARGS CLQ2_PMTrace (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
{
q2trace_t q2t;
trace_t t;
@ -201,7 +201,7 @@ q2trace_t CLQ2_PMTrace (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
return q2t;
}
int CLQ2_PMpointcontents (vec3_t point)
int VARGS CLQ2_PMpointcontents (vec3_t point)
{
int i;
entity_state_t *ent;
@ -318,7 +318,7 @@ void CLQ2_PredictMovement (void) //q2 doesn't support split clients.
if (step > 63 && step < 160 && (pm.s.pm_flags & Q2PMF_ON_GROUND) )
{
cl.predicted_step = step * 0.125;
cl.predicted_step_time = realtime - host_frametime * 500;
cl.predicted_step_time = realtime - host_frametime * 0.5;
}
cl.onground[0] = !!(pm.s.pm_flags & Q2PMF_ON_GROUND);

View file

@ -126,10 +126,11 @@ typedef struct
beam_t cl_beams[MAX_BEAMS];
#define MAX_EXPLOSIONS 8
#define MAX_EXPLOSIONS 32
typedef struct
{
vec3_t origin;
vec3_t oldorigin;
int firstframe;
int numframes;
@ -142,6 +143,7 @@ typedef struct
float lightcolor[3];
float start;
model_t *model;
int skinnum;
} explosion_t;
explosion_t cl_explosions[MAX_EXPLOSIONS];
@ -1207,21 +1209,37 @@ void CL_SmokeAndFlash(vec3_t origin)
ex = CL_AllocExplosion ();
VectorCopy (origin, ex->origin);
VectorClear(ex->angles);
// ex->type = ex_misc;
// ex->numframes = 4;
// ex->flags = Q2RF_TRANSLUCENT;
ex->start = cl.q2frame.servertime - 100;
ex->numframes = 4;
ex->flags = Q2RF_TRANSLUCENT;
ex->start = cl.time;
ex->model = Mod_ForName (q2tentmodels[q2cl_mod_smoke].modelname, false);
ex = CL_AllocExplosion ();
VectorCopy (origin, ex->origin);
VectorClear(ex->angles);
// ex->type = ex_flash;
// ex->flags = Q2RF_FULLBRIGHT;
// ex->frames = 2;
ex->start = cl.q2frame.servertime - 100;
ex->flags = Q2RF_FULLBRIGHT;
ex->numframes = 2;
ex->start = cl.time;
ex->model = Mod_ForName (q2tentmodels[q2cl_mod_flash].modelname, false);
}
void CL_Laser (vec3_t start, vec3_t end, int colors)
{
explosion_t *ex = CL_AllocExplosion();
ex->firstframe = 0;
ex->numframes = 10;
ex->alpha = 0.33f;
ex->model = (void*)0xDEAFF00D; //something not null
ex->skinnum = (colors >> ((rand() % 4)*8)) & 0xff;
VectorCopy (start, ex->origin);
VectorCopy (end, ex->oldorigin);
ex->flags = Q2RF_TRANSLUCENT | Q2RF_BEAM;
ex->start = cl.time;
}
static qbyte splash_color[] = {0x00, 0xe0, 0xb0, 0x50, 0xd0, 0xe0, 0xe8};
#define ATTN_NONE 0
@ -1297,7 +1315,7 @@ void CLQ2_ParseTEnt (void)
MSG_ReadPos (pos);
MSG_ReadDir (dir);
P_RunParticleEffect (pos, dir, 0, 20);
// CL_SmokeAndFlash(pos);
CL_SmokeAndFlash(pos);
R_AddStain(pos, -10, -10, -10, 20);
break;
@ -1563,7 +1581,7 @@ void CLQ2_ParseTEnt (void)
case Q2TE_BFG_LASER:
MSG_ReadPos (pos);
MSG_ReadPos (pos2);
// CL_ParseLaser (0xd0d1d2d3);
CL_Laser(pos, pos2, 0xd0d1d2d3);
break;
case Q2TE_BUBBLETRAIL:
@ -2049,12 +2067,18 @@ void CL_UpdateExplosions (void)
if (!ent)
return;
VectorCopy (ex->origin, ent->origin);
VectorCopy (ex->oldorigin, ent->oldorigin);
VectorCopy (ex->angles, ent->angles);
ent->skinnum = ex->skinnum;
ent->angles[0]*=-1;
AngleVectors(ent->angles, ent->axis[0], ent->axis[1], ent->axis[2]);
VectorInverse(ent->axis[1]);
ent->model = ex->model;
ent->frame = (int)f+firstframe;
ent->oldframe = of+firstframe;
ent->lerptime = 1-(f - (int)f);
ent->alpha = 1.0 - f/(numframes);
ent->flags = ex->flags;
}
}

View file

@ -871,6 +871,7 @@ void CLQ2_ParseTEnt (void);
void CLQ2_AddEntities (void);
void CLQ2_ParseBaseline (void);
void CLQ2_ParseFrame (void);
void CLQ2_RunMuzzleFlash2 (int ent, int flash_number);
void CLNQ_ParseEntity(unsigned int bits);
int CLQ2_RegisterTEntModels (void);
#endif

View file

@ -115,12 +115,386 @@ void CLQ2_BlasterTrail2(vec3_t oldorg, vec3_t neworg){};
q2centity_t cl_entities[MAX_Q2EDICTS];
entity_state_t cl_parse_entities[MAX_PARSE_ENTITIES];
void Q2S_StartSound(vec3_t origin, int entnum, int entchannel, sfx_t *sfx, float fvol, float attenuation, float timeofs);
void CL_SmokeAndFlash(vec3_t origin);
//extern struct model_s *cl_mod_powerscreen;
//PGM
int vidref_val;
//PGM
#include "q2m_flash.c"
void CLQ2_RunMuzzleFlash2 (int ent, int flash_number)
{
vec3_t origin;
dlight_t *dl;
vec3_t forward, right, up;
char soundname[64];
// locate the origin
AngleVectors (cl_entities[ent].current.angles, forward, right, up);
origin[0] = cl_entities[ent].current.origin[0] + forward[0] * monster_flash_offset[flash_number][0] + right[0] * monster_flash_offset[flash_number][1];
origin[1] = cl_entities[ent].current.origin[1] + forward[1] * monster_flash_offset[flash_number][0] + right[1] * monster_flash_offset[flash_number][1];
origin[2] = cl_entities[ent].current.origin[2] + forward[2] * monster_flash_offset[flash_number][0] + right[2] * monster_flash_offset[flash_number][1] + monster_flash_offset[flash_number][2];
dl = CL_AllocDlight (ent);
VectorCopy (origin, dl->origin);
dl->radius = 200 + (rand()&31);
// dl->minlight = 32;
dl->die = cl.time + 0.1;
switch (flash_number)
{
case Q2MZ2_INFANTRY_MACHINEGUN_1:
case Q2MZ2_INFANTRY_MACHINEGUN_2:
case Q2MZ2_INFANTRY_MACHINEGUN_3:
case Q2MZ2_INFANTRY_MACHINEGUN_4:
case Q2MZ2_INFANTRY_MACHINEGUN_5:
case Q2MZ2_INFANTRY_MACHINEGUN_6:
case Q2MZ2_INFANTRY_MACHINEGUN_7:
case Q2MZ2_INFANTRY_MACHINEGUN_8:
case Q2MZ2_INFANTRY_MACHINEGUN_9:
case Q2MZ2_INFANTRY_MACHINEGUN_10:
case Q2MZ2_INFANTRY_MACHINEGUN_11:
case Q2MZ2_INFANTRY_MACHINEGUN_12:
case Q2MZ2_INFANTRY_MACHINEGUN_13:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
P_RunParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("infantry/infatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_SOLDIER_MACHINEGUN_1:
case Q2MZ2_SOLDIER_MACHINEGUN_2:
case Q2MZ2_SOLDIER_MACHINEGUN_3:
case Q2MZ2_SOLDIER_MACHINEGUN_4:
case Q2MZ2_SOLDIER_MACHINEGUN_5:
case Q2MZ2_SOLDIER_MACHINEGUN_6:
case Q2MZ2_SOLDIER_MACHINEGUN_7:
case Q2MZ2_SOLDIER_MACHINEGUN_8:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
P_RunParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("soldier/solatck3.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_GUNNER_MACHINEGUN_1:
case Q2MZ2_GUNNER_MACHINEGUN_2:
case Q2MZ2_GUNNER_MACHINEGUN_3:
case Q2MZ2_GUNNER_MACHINEGUN_4:
case Q2MZ2_GUNNER_MACHINEGUN_5:
case Q2MZ2_GUNNER_MACHINEGUN_6:
case Q2MZ2_GUNNER_MACHINEGUN_7:
case Q2MZ2_GUNNER_MACHINEGUN_8:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
P_RunParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("gunner/gunatck2.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_ACTOR_MACHINEGUN_1:
case Q2MZ2_SUPERTANK_MACHINEGUN_1:
case Q2MZ2_SUPERTANK_MACHINEGUN_2:
case Q2MZ2_SUPERTANK_MACHINEGUN_3:
case Q2MZ2_SUPERTANK_MACHINEGUN_4:
case Q2MZ2_SUPERTANK_MACHINEGUN_5:
case Q2MZ2_SUPERTANK_MACHINEGUN_6:
case Q2MZ2_TURRET_MACHINEGUN: // PGM
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
P_RunParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("infantry/infatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_BOSS2_MACHINEGUN_L1:
case Q2MZ2_BOSS2_MACHINEGUN_L2:
case Q2MZ2_BOSS2_MACHINEGUN_L3:
case Q2MZ2_BOSS2_MACHINEGUN_L4:
case Q2MZ2_BOSS2_MACHINEGUN_L5:
case Q2MZ2_CARRIER_MACHINEGUN_L1: // PMM
case Q2MZ2_CARRIER_MACHINEGUN_L2: // PMM
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
P_RunParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("infantry/infatck1.wav"), 1, ATTN_NONE, 0);
break;
case Q2MZ2_SOLDIER_BLASTER_1:
case Q2MZ2_SOLDIER_BLASTER_2:
case Q2MZ2_SOLDIER_BLASTER_3:
case Q2MZ2_SOLDIER_BLASTER_4:
case Q2MZ2_SOLDIER_BLASTER_5:
case Q2MZ2_SOLDIER_BLASTER_6:
case Q2MZ2_SOLDIER_BLASTER_7:
case Q2MZ2_SOLDIER_BLASTER_8:
case Q2MZ2_TURRET_BLASTER: // PGM
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("soldier/solatck2.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_FLYER_BLASTER_1:
case Q2MZ2_FLYER_BLASTER_2:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("flyer/flyatck3.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_MEDIC_BLASTER_1:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("medic/medatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_HOVER_BLASTER_1:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("hover/hovatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_FLOAT_BLASTER_1:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("floater/fltatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_SOLDIER_SHOTGUN_1:
case Q2MZ2_SOLDIER_SHOTGUN_2:
case Q2MZ2_SOLDIER_SHOTGUN_3:
case Q2MZ2_SOLDIER_SHOTGUN_4:
case Q2MZ2_SOLDIER_SHOTGUN_5:
case Q2MZ2_SOLDIER_SHOTGUN_6:
case Q2MZ2_SOLDIER_SHOTGUN_7:
case Q2MZ2_SOLDIER_SHOTGUN_8:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("soldier/solatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_TANK_BLASTER_1:
case Q2MZ2_TANK_BLASTER_2:
case Q2MZ2_TANK_BLASTER_3:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("tank/tnkatck3.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_TANK_MACHINEGUN_1:
case Q2MZ2_TANK_MACHINEGUN_2:
case Q2MZ2_TANK_MACHINEGUN_3:
case Q2MZ2_TANK_MACHINEGUN_4:
case Q2MZ2_TANK_MACHINEGUN_5:
case Q2MZ2_TANK_MACHINEGUN_6:
case Q2MZ2_TANK_MACHINEGUN_7:
case Q2MZ2_TANK_MACHINEGUN_8:
case Q2MZ2_TANK_MACHINEGUN_9:
case Q2MZ2_TANK_MACHINEGUN_10:
case Q2MZ2_TANK_MACHINEGUN_11:
case Q2MZ2_TANK_MACHINEGUN_12:
case Q2MZ2_TANK_MACHINEGUN_13:
case Q2MZ2_TANK_MACHINEGUN_14:
case Q2MZ2_TANK_MACHINEGUN_15:
case Q2MZ2_TANK_MACHINEGUN_16:
case Q2MZ2_TANK_MACHINEGUN_17:
case Q2MZ2_TANK_MACHINEGUN_18:
case Q2MZ2_TANK_MACHINEGUN_19:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
P_RunParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
_snprintf(soundname, sizeof(soundname), "tank/tnkatk2%c.wav", 'a' + rand() % 5);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound(soundname), 1, ATTN_NORM, 0);
break;
case Q2MZ2_CHICK_ROCKET_1:
case Q2MZ2_TURRET_ROCKET: // PGM
dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("chick/chkatck2.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_TANK_ROCKET_1:
case Q2MZ2_TANK_ROCKET_2:
case Q2MZ2_TANK_ROCKET_3:
dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("tank/tnkatck1.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_SUPERTANK_ROCKET_1:
case Q2MZ2_SUPERTANK_ROCKET_2:
case Q2MZ2_SUPERTANK_ROCKET_3:
case Q2MZ2_BOSS2_ROCKET_1:
case Q2MZ2_BOSS2_ROCKET_2:
case Q2MZ2_BOSS2_ROCKET_3:
case Q2MZ2_BOSS2_ROCKET_4:
case Q2MZ2_CARRIER_ROCKET_1:
// case Q2MZ2_CARRIER_ROCKET_2:
// case Q2MZ2_CARRIER_ROCKET_3:
// case Q2MZ2_CARRIER_ROCKET_4:
dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0.2;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("tank/rocket.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_GUNNER_GRENADE_1:
case Q2MZ2_GUNNER_GRENADE_2:
case Q2MZ2_GUNNER_GRENADE_3:
case Q2MZ2_GUNNER_GRENADE_4:
dl->color[0] = 1;dl->color[1] = 0.5;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("gunner/gunatck3.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_GLADIATOR_RAILGUN_1:
// PMM
case Q2MZ2_CARRIER_RAILGUN:
case Q2MZ2_WIDOW_RAIL:
// pmm
dl->color[0] = 0.5;dl->color[1] = 0.5;dl->color[2] = 1.0;
break;
// --- Xian's shit starts ---
case Q2MZ2_MAKRON_BFG:
dl->color[0] = 0.5;dl->color[1] = 1 ;dl->color[2] = 0.5;
//Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_RegisterSound("makron/bfg_fire.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_MAKRON_BLASTER_1:
case Q2MZ2_MAKRON_BLASTER_2:
case Q2MZ2_MAKRON_BLASTER_3:
case Q2MZ2_MAKRON_BLASTER_4:
case Q2MZ2_MAKRON_BLASTER_5:
case Q2MZ2_MAKRON_BLASTER_6:
case Q2MZ2_MAKRON_BLASTER_7:
case Q2MZ2_MAKRON_BLASTER_8:
case Q2MZ2_MAKRON_BLASTER_9:
case Q2MZ2_MAKRON_BLASTER_10:
case Q2MZ2_MAKRON_BLASTER_11:
case Q2MZ2_MAKRON_BLASTER_12:
case Q2MZ2_MAKRON_BLASTER_13:
case Q2MZ2_MAKRON_BLASTER_14:
case Q2MZ2_MAKRON_BLASTER_15:
case Q2MZ2_MAKRON_BLASTER_16:
case Q2MZ2_MAKRON_BLASTER_17:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("makron/blaster.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_JORG_MACHINEGUN_L1:
case Q2MZ2_JORG_MACHINEGUN_L2:
case Q2MZ2_JORG_MACHINEGUN_L3:
case Q2MZ2_JORG_MACHINEGUN_L4:
case Q2MZ2_JORG_MACHINEGUN_L5:
case Q2MZ2_JORG_MACHINEGUN_L6:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
P_RunParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("boss3/xfire.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_JORG_MACHINEGUN_R1:
case Q2MZ2_JORG_MACHINEGUN_R2:
case Q2MZ2_JORG_MACHINEGUN_R3:
case Q2MZ2_JORG_MACHINEGUN_R4:
case Q2MZ2_JORG_MACHINEGUN_R5:
case Q2MZ2_JORG_MACHINEGUN_R6:
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
P_RunParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
break;
case Q2MZ2_JORG_BFG_1:
dl->color[0] = 0.5;dl->color[1] = 1 ;dl->color[2] = 0.5;
break;
case Q2MZ2_BOSS2_MACHINEGUN_R1:
case Q2MZ2_BOSS2_MACHINEGUN_R2:
case Q2MZ2_BOSS2_MACHINEGUN_R3:
case Q2MZ2_BOSS2_MACHINEGUN_R4:
case Q2MZ2_BOSS2_MACHINEGUN_R5:
case Q2MZ2_CARRIER_MACHINEGUN_R1: // PMM
case Q2MZ2_CARRIER_MACHINEGUN_R2: // PMM
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
P_RunParticleEffect (origin, vec3_origin, 0, 40);
CL_SmokeAndFlash(origin);
break;
// ======
// ROGUE
case Q2MZ2_STALKER_BLASTER:
case Q2MZ2_DAEDALUS_BLASTER:
case Q2MZ2_MEDIC_BLASTER_2:
case Q2MZ2_WIDOW_BLASTER:
case Q2MZ2_WIDOW_BLASTER_SWEEP1:
case Q2MZ2_WIDOW_BLASTER_SWEEP2:
case Q2MZ2_WIDOW_BLASTER_SWEEP3:
case Q2MZ2_WIDOW_BLASTER_SWEEP4:
case Q2MZ2_WIDOW_BLASTER_SWEEP5:
case Q2MZ2_WIDOW_BLASTER_SWEEP6:
case Q2MZ2_WIDOW_BLASTER_SWEEP7:
case Q2MZ2_WIDOW_BLASTER_SWEEP8:
case Q2MZ2_WIDOW_BLASTER_SWEEP9:
case Q2MZ2_WIDOW_BLASTER_100:
case Q2MZ2_WIDOW_BLASTER_90:
case Q2MZ2_WIDOW_BLASTER_80:
case Q2MZ2_WIDOW_BLASTER_70:
case Q2MZ2_WIDOW_BLASTER_60:
case Q2MZ2_WIDOW_BLASTER_50:
case Q2MZ2_WIDOW_BLASTER_40:
case Q2MZ2_WIDOW_BLASTER_30:
case Q2MZ2_WIDOW_BLASTER_20:
case Q2MZ2_WIDOW_BLASTER_10:
case Q2MZ2_WIDOW_BLASTER_0:
case Q2MZ2_WIDOW_BLASTER_10L:
case Q2MZ2_WIDOW_BLASTER_20L:
case Q2MZ2_WIDOW_BLASTER_30L:
case Q2MZ2_WIDOW_BLASTER_40L:
case Q2MZ2_WIDOW_BLASTER_50L:
case Q2MZ2_WIDOW_BLASTER_60L:
case Q2MZ2_WIDOW_BLASTER_70L:
case Q2MZ2_WIDOW_RUN_1:
case Q2MZ2_WIDOW_RUN_2:
case Q2MZ2_WIDOW_RUN_3:
case Q2MZ2_WIDOW_RUN_4:
case Q2MZ2_WIDOW_RUN_5:
case Q2MZ2_WIDOW_RUN_6:
case Q2MZ2_WIDOW_RUN_7:
case Q2MZ2_WIDOW_RUN_8:
dl->color[0] = 0;dl->color[1] = 1;dl->color[2] = 0;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("tank/tnkatck3.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_WIDOW_DISRUPTOR:
dl->color[0] = -1;dl->color[1] = -1;dl->color[2] = -1;
Q2S_StartSound (NULL, ent, CHAN_WEAPON, S_PrecacheSound("weapons/disint2.wav"), 1, ATTN_NORM, 0);
break;
case Q2MZ2_WIDOW_PLASMABEAM:
case Q2MZ2_WIDOW2_BEAMER_1:
case Q2MZ2_WIDOW2_BEAMER_2:
case Q2MZ2_WIDOW2_BEAMER_3:
case Q2MZ2_WIDOW2_BEAMER_4:
case Q2MZ2_WIDOW2_BEAMER_5:
case Q2MZ2_WIDOW2_BEAM_SWEEP_1:
case Q2MZ2_WIDOW2_BEAM_SWEEP_2:
case Q2MZ2_WIDOW2_BEAM_SWEEP_3:
case Q2MZ2_WIDOW2_BEAM_SWEEP_4:
case Q2MZ2_WIDOW2_BEAM_SWEEP_5:
case Q2MZ2_WIDOW2_BEAM_SWEEP_6:
case Q2MZ2_WIDOW2_BEAM_SWEEP_7:
case Q2MZ2_WIDOW2_BEAM_SWEEP_8:
case Q2MZ2_WIDOW2_BEAM_SWEEP_9:
case Q2MZ2_WIDOW2_BEAM_SWEEP_10:
case Q2MZ2_WIDOW2_BEAM_SWEEP_11:
dl->radius = 300 + (rand()&100);
dl->color[0] = 1;dl->color[1] = 1;dl->color[2] = 0;
dl->die = cl.time + 200;
break;
// ROGUE
// ======
// --- Xian's shit ends ---
//hmm... he must take AGES on the loo.... :p
}
dl->color[0] /= 5;
dl->color[1] /= 5;
dl->color[2] /= 5;
}
/*
=========================================================================
@ -280,7 +654,7 @@ void CLQ2_AddProjectiles (void)
V_AddLight (pr->origin, 200, 0.2, 0.2, 0);
VectorCopy (pr->angles, ent.angles);
V_AddEntity (&ent);
V_AddLerpEntity (&ent);
}
}
#endif
@ -974,7 +1348,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
effects = s1->effects;
renderfx = s1->renderfx;
ent.keynum = pnum;
ent.keynum = s1->number;
ent.scale = 1;
ent.alpha = 1;
@ -1026,6 +1400,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
//======
ent.oldframe = cent->prev.frame;
ent.lerptime = 1.0 - cl.lerpfrac;
ent.lerpfrac = cl.lerpfrac;
if (renderfx & (Q2RF_FRAMELERP|Q2RF_BEAM))
{ // step origin discretely, because the frames
@ -1050,6 +1425,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
ent.alpha = 0.30;
ent.skinnum = (s1->skinnum >> ((rand() % 4)*8)) & 0xff;
ent.model = NULL;
ent.lerpfrac = 1;
}
else
{
@ -1201,7 +1577,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
//pmm
// add to refresh list
V_AddEntity (&ent);
V_AddLerpEntity (&ent);
// color shells generate a seperate entity for the main model
@ -1246,7 +1622,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
ent.flags = renderfx | Q2RF_TRANSLUCENT;
ent.alpha = 0.30;
ent.fatness = 10;
V_AddEntity (&ent);
V_AddLerpEntity (&ent);
}
// ent.skin = NULL; // never use a custom skin on others
@ -1286,7 +1662,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
}
*/ // pmm
V_AddEntity (&ent);
V_AddLerpEntity (&ent);
//PGM - make sure these get reset.
ent.flags = 0;
@ -1296,12 +1672,12 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
if (s1->modelindex3)
{
ent.model = cl.model_precache[s1->modelindex3];
V_AddEntity (&ent);
V_AddLerpEntity (&ent);
}
if (s1->modelindex4)
{
ent.model = cl.model_precache[s1->modelindex4];
V_AddEntity (&ent);
V_AddLerpEntity (&ent);
}
if ( effects & Q2EF_POWERSCREEN )
@ -1311,7 +1687,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
ent.frame = 0;
ent.flags |= (Q2RF_TRANSLUCENT | Q2RF_SHELL_GREEN);
ent.alpha = 0.30;
V_AddEntity (&ent);
V_AddLerpEntity (&ent);
*/ }
// add automatic particle trails
@ -1472,6 +1848,7 @@ void CLQ2_AddViewWeapon (q2player_state_t *ps, q2player_state_t *ops)
#if 1
entity_t gun; // view model
int i;
entity_t *view;
// allow the gun to be completely removed
if (!r_drawviewmodel.value)
@ -1481,6 +1858,11 @@ void CLQ2_AddViewWeapon (q2player_state_t *ps, q2player_state_t *ops)
if (ps->fov > 90)
return;
view = &cl.viewent[0];
VectorCopy(cl.simorg[0], view->origin);
AngleVectors(cl.simangles[0], view->axis[0], view->axis[1], view->axis[2]);
VectorInverse(view->axis[1]);
memset (&gun, 0, sizeof(gun));
// if (gun_model)
@ -1498,9 +1880,9 @@ void CLQ2_AddViewWeapon (q2player_state_t *ps, q2player_state_t *ops)
// set up gun position
for (i=0 ; i<3 ; i++)
{
gun.origin[i] = cl.simorg[0][i] + ops->gunoffset[i]
gun.origin[i] = ops->gunoffset[i]
+ cl.lerpfrac * (ps->gunoffset[i] - ops->gunoffset[i]);
gun.angles[i] = r_refdef.viewangles[i] + LerpAngle (ops->gunangles[i],
gun.angles[i] = LerpAngle (ops->gunangles[i],
ps->gunangles[i], cl.lerpfrac);
}
gun.angles[0]*=-1;
@ -1522,7 +1904,7 @@ void CLQ2_AddViewWeapon (q2player_state_t *ps, q2player_state_t *ops)
gun.flags = Q2RF_MINLIGHT | Q2RF_DEPTHHACK | Q2RF_WEAPONMODEL;
gun.lerptime = 1.0 - cl.lerpfrac;
VectorCopy (gun.origin, gun.oldorigin); // don't lerp at all
V_AddEntity (&gun);
V_AddLerpEntity (&gun);
#endif
}
@ -1542,6 +1924,8 @@ void CLQ2_CalcViewValues (void)
q2frame_t *oldframe;
q2player_state_t *ps, *ops;
r_refdef.currentplayernum = 0;
// find the previous frame to interpolate from
ps = &cl.q2frame.playerstate;
i = (cl.q2frame.serverframe - 1) & Q2UPDATE_MASK;
@ -1560,9 +1944,9 @@ void CLQ2_CalcViewValues (void)
lerp = cl.lerpfrac;
// calculate the origin
if (cl.worldmodel->fromgame == fg_quake2 && (!cl_nopred.value) && !(cl.q2frame.playerstate.pmove.pm_flags & Q2PMF_NO_PREDICTION))
if (cl.worldmodel && (!cl_nopred.value) && !(cl.q2frame.playerstate.pmove.pm_flags & Q2PMF_NO_PREDICTION))
{ // use predicted values
unsigned delta;
float delta;
backlerp = 1.0 - lerp;
for (i=0 ; i<3 ; i++)
@ -1574,8 +1958,8 @@ void CLQ2_CalcViewValues (void)
// smooth out stair climbing
delta = realtime - cl.predicted_step_time;
if (delta < 100)
r_refdef.vieworg[2] -= cl.predicted_step * (100 - delta) * 0.01;
if (delta < 0.1)
r_refdef.vieworg[2] -= cl.predicted_step * (0.1 - delta)*10;
}
else
{ // just use interpolated values
@ -1587,7 +1971,7 @@ void CLQ2_CalcViewValues (void)
}
// if not running a demo or on a locked frame, add the local angle movement
if (cl.worldmodel->fromgame == fg_quake2 && cl.q2frame.playerstate.pmove.pm_type < Q2PM_DEAD )
if (cl.worldmodel && cl.q2frame.playerstate.pmove.pm_type < Q2PM_DEAD )
{ // use predicted values
for (i=0 ; i<3 ; i++)
r_refdef.viewangles[i] = cl.predicted_angles[i];

View file

@ -465,7 +465,7 @@ void Key_Console (int key)
if (key == K_DEL)
{
if (strlen(key_lines[edit_line]+key_linepos+1))
if (strlen(key_lines[edit_line]+key_linepos))
{
memmove(key_lines[edit_line]+key_linepos, key_lines[edit_line]+key_linepos+1, strlen(key_lines[edit_line]+key_linepos+1)+1);
return;

View file

@ -795,7 +795,7 @@ void M_SListKey(int key)
}
else if (slist_type == SLISTTYPE_SOURCES)
{
MasterInfo_Request(M_FindCurrentMaster());
MasterInfo_Request(M_FindCurrentMaster(), true);
}
return;

View file

@ -241,6 +241,8 @@ void NET_SendPollPacket(int len, void *data, netadr_t to)
lastpollsockIPX=0;
if (!pollsocketsIPX[lastpollsockIPX])
pollsocketsIPX[lastpollsockIPX] = IPX_OpenSocket(PORT_ANY, true);
if (!pollsocketsIPX[lastpollsockIPX])
return; //bother
ret = sendto (pollsocketsIPX[lastpollsockIPX], data, len, 0, (struct sockaddr *)&addr, sizeof(addr) );
}
else
@ -251,6 +253,8 @@ void NET_SendPollPacket(int len, void *data, netadr_t to)
lastpollsockUDP=0;
if (!pollsocketsUDP[lastpollsockUDP])
pollsocketsUDP[lastpollsockUDP] = UDP_OpenSocket(PORT_ANY, true);
if (!pollsocketsUDP[lastpollsockUDP])
return; //bother
ret = sendto (pollsocketsUDP[lastpollsockUDP], data, len, 0, (struct sockaddr *)&addr, sizeof(addr) );
}
@ -264,9 +268,9 @@ void NET_SendPollPacket(int len, void *data, netadr_t to)
return;
if (qerrno == EADDRNOTAVAIL)
Con_DPrintf("NET_SendPacket Warning: %i\n", qerrno);
Con_DPrintf("NET_SendPollPacket Warning: %i\n", qerrno);
else
Con_Printf ("NET_SendPacket ERROR: %i\n", qerrno);
Con_Printf ("NET_SendPollPacket ERROR: %i\n", qerrno);
}
}
@ -471,7 +475,7 @@ void SListOptionChanged(serverinfo_t *newserver)
//don't try sending to servers we don't support
void MasterInfo_Request(master_t *mast)
void MasterInfo_Request(master_t *mast, qboolean evenifwedonthavethefiles)
{
if (!mast)
return;
@ -505,7 +509,7 @@ void MasterInfo_Request(master_t *mast)
break;
#ifdef Q2CLIENT
case MT_MASTERQ2:
if (COM_FDepthFile("pics/colormap.pcx", true)!=0x7fffffff)
if (evenifwedonthavethefiles || COM_FDepthFile("pics/colormap.pcx", true)!=0x7fffffff) //only query this master if we expect to be able to load it's maps.
NET_SendPollPacket (6, "query", mast->adr);
break;
#endif
@ -562,7 +566,7 @@ void MasterInfo_WriteServers(void)
}
if (slist_writeserverstxt.value)
qws = fopen("server.txt", "wt");
qws = fopen("servers.txt", "wt");
else
qws = NULL;
if (qws)
@ -630,7 +634,7 @@ void MasterInfo_Begin(void)
for (mast = master; mast; mast=mast->next)
{
MasterInfo_Request(mast);
MasterInfo_Request(mast, false);
}
}

View file

@ -1032,6 +1032,12 @@ void P_InitParticles (void)
pe_default = P_AllocateParticleType("pe_default");
pe_size2 = P_AllocateParticleType("pe_size2");
pe_size3 = P_AllocateParticleType("pe_size3");
pt_spark = P_AllocateParticleType("pe_spark");
pt_plasma = P_AllocateParticleType("pe_plasma");
rt_gib = P_AllocateParticleType("t_gib");
rt_grenade = P_AllocateParticleType("t_grenade");
}
@ -1092,6 +1098,7 @@ void P_NewServer(void)
model_t *mod;
int i;
for (i = 0; i < numparticletypes; i++)
{
*part_type[i].texname = '\0';
@ -1103,6 +1110,7 @@ void P_NewServer(void)
}
for (i=0 , mod=mod_known ; i<mod_numknown ; i++, mod++)
{
mod->particleeffect = -1;
@ -1115,7 +1123,6 @@ void P_NewServer(void)
f_modified_particles = false;
//particle descriptions submitted by the server are deemed to not be cheats but game configs.
if (!stricmp(r_particlesdesc.string, "none"))
return;
else if (!stricmp(r_particlesdesc.string, "faithful") || !*r_particlesdesc.string)
@ -3368,6 +3375,9 @@ void P_DrawParticles (void)
qglEnd();
qglEnable(GL_TEXTURE_2D);
GL_TexEnv(GL_MODULATE);
qglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
qglDepthMask(1);
return;
}

View file

@ -641,7 +641,7 @@ char *particle_set_spikeset =
" blend add\n"
" areaspread 0\n"
" areaspreadvert 0\n"
"}";
"}\n";
@ -894,7 +894,7 @@ char *particle_set_highfps = //submitted by 'ShadowWalker'
" blend add\n"
" areaspread 0\n"
" areaspreadvert 0\n"
"}";
"}\n";
char *particle_set_faithful =
"r_part t_gib\n"
@ -1212,5 +1212,5 @@ char *particle_set_faithful =
" offsetspread 113\n"
" offsetspreadvert 113\n"
" spawnmode lavasplash\n"
"}";
"}\n";

View file

@ -60,7 +60,7 @@ Loads the game dll
*/
void *Sys_GetGameAPI (void *parms)
{
void *(*GetGameAPI) (void *);
void *(VARGS *GetGameAPI) (void *);
char name[MAX_OSPATH];
char *path;
char cwd[MAX_OSPATH];

View file

@ -1085,13 +1085,13 @@ void V_CalcRefdef (int pnum)
vec3_t forward, right, up;
float bob;
r_refdef.currentplayernum = pnum;
#ifdef Q2CLIENT
if (cls.q2server)
return;
#endif
r_refdef.currentplayernum = pnum;
V_DriftPitch (pnum);
// view is the weapon model (only visible from inside body)

View file

@ -2603,53 +2603,6 @@ void TP_Init (void)
TP_CVARS;
#undef TP_CVAR
Cvar_Register (&cl_parseFunChars, TEAMPLAYVARS);
Cvar_Register (&cl_parseSay, TEAMPLAYVARS);
Cvar_Register (&cl_triggers, TEAMPLAYVARS);
Cvar_Register (&tp_forceTriggers, TEAMPLAYVARS);
Cvar_Register (&tp_loadlocs, TEAMPLAYVARS);
Cvar_Register (&cl_teamskin, TEAMPLAYVARS);
Cvar_Register (&cl_enemyskin, TEAMPLAYVARS);
Cvar_Register (&tp_soundtrigger, TEAMPLAYVARS);
Cvar_Register (&tp_name_axe, TEAMPLAYVARS);
Cvar_Register (&tp_name_sg, TEAMPLAYVARS);
Cvar_Register (&tp_name_ssg, TEAMPLAYVARS);
Cvar_Register (&tp_name_ng, TEAMPLAYVARS);
Cvar_Register (&tp_name_sng, TEAMPLAYVARS);
Cvar_Register (&tp_name_gl, TEAMPLAYVARS);
Cvar_Register (&tp_name_rl, TEAMPLAYVARS);
Cvar_Register (&tp_name_lg, TEAMPLAYVARS);
Cvar_Register (&tp_name_ra, TEAMPLAYVARS);
Cvar_Register (&tp_name_ya, TEAMPLAYVARS);
Cvar_Register (&tp_name_ga, TEAMPLAYVARS);
Cvar_Register (&tp_name_quad, TEAMPLAYVARS);
Cvar_Register (&tp_name_pent, TEAMPLAYVARS);
Cvar_Register (&tp_name_ring, TEAMPLAYVARS);
Cvar_Register (&tp_name_suit, TEAMPLAYVARS);
Cvar_Register (&tp_name_shells, TEAMPLAYVARS);
Cvar_Register (&tp_name_nails, TEAMPLAYVARS);
Cvar_Register (&tp_name_rockets, TEAMPLAYVARS);
Cvar_Register (&tp_name_cells, TEAMPLAYVARS);
Cvar_Register (&tp_name_mh, TEAMPLAYVARS);
Cvar_Register (&tp_name_health, TEAMPLAYVARS);
Cvar_Register (&tp_name_backpack, TEAMPLAYVARS);
Cvar_Register (&tp_name_flag, TEAMPLAYVARS);
Cvar_Register (&tp_name_nothing, TEAMPLAYVARS);
Cvar_Register (&tp_name_someplace, TEAMPLAYVARS);
Cvar_Register (&tp_name_at, TEAMPLAYVARS);
Cvar_Register (&tp_need_ra, TEAMPLAYVARS);
Cvar_Register (&tp_need_ya, TEAMPLAYVARS);
Cvar_Register (&tp_need_ga, TEAMPLAYVARS);
Cvar_Register (&tp_need_health, TEAMPLAYVARS);
Cvar_Register (&tp_need_weapon, TEAMPLAYVARS);
Cvar_Register (&tp_need_rl, TEAMPLAYVARS);
Cvar_Register (&tp_need_rockets, TEAMPLAYVARS);
Cvar_Register (&tp_need_cells, TEAMPLAYVARS);
Cvar_Register (&tp_need_nails, TEAMPLAYVARS);
Cvar_Register (&tp_need_shells, TEAMPLAYVARS);
Cvar_Register (&cl_fakename, TEAMPLAYVARS);
Cmd_AddCommand ("loadloc", TP_LoadLocFile_f);
Cmd_AddCommand ("filter", TP_MsgFilter_f);
Cmd_AddCommand ("msg_trigger", TP_MsgTrigger_f);