mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 05:41:52 +00:00
q2 fixes mostly
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@900 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
c324d0a3b8
commit
d6f910c10b
12 changed files with 226 additions and 136 deletions
|
@ -721,7 +721,7 @@ void CL_ParseTEnt (void)
|
|||
pos[0] = MSG_ReadCoord ();
|
||||
pos[1] = MSG_ReadCoord ();
|
||||
pos[2] = MSG_ReadCoord ();
|
||||
P_TeleportSplash (pos);
|
||||
P_RunParticleEffectType(pos, NULL, 1, pt_teleportsplash);
|
||||
break;
|
||||
|
||||
case TE_GUNSHOT: // bullet hitting wall
|
||||
|
@ -1269,14 +1269,14 @@ void CLQ2_ParseTEnt (void)
|
|||
{
|
||||
CL_SmokeAndFlash(pos);
|
||||
|
||||
// impact sound
|
||||
// impact sound (nope, not the same as Q1...)
|
||||
cnt = rand()&15;
|
||||
if (cnt == 1)
|
||||
Q2S_StartSound (pos, 0, 0, cl_sfx_ric1, 1, ATTN_NORM, 0);
|
||||
Q2S_StartSound (pos, 0, 0, S_PrecacheSound ("world/ric1.wav"), 1, ATTN_NORM, 0);
|
||||
else if (cnt == 2)
|
||||
Q2S_StartSound (pos, 0, 0, cl_sfx_ric2, 1, ATTN_NORM, 0);
|
||||
Q2S_StartSound (pos, 0, 0, S_PrecacheSound ("world/ric2.wav"), 1, ATTN_NORM, 0);
|
||||
else if (cnt == 3)
|
||||
Q2S_StartSound (pos, 0, 0, cl_sfx_ric3, 1, ATTN_NORM, 0);
|
||||
Q2S_StartSound (pos, 0, 0, S_PrecacheSound ("world/ric3.wav"), 1, ATTN_NORM, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -1290,7 +1290,7 @@ void CLQ2_ParseTEnt (void)
|
|||
else
|
||||
P_RunParticleEffect (pos, dir, 0xb0, 40);
|
||||
//FIXME : replace or remove this sound
|
||||
// Q2S_StartSound (pos, 0, 0, q2cl_sfx_lashit, 1, ATTN_NORM, 0);
|
||||
S_StartSound (-2, 0, S_PrecacheSound ("weapons/lashit.wav"), pos, 1, 1);
|
||||
break;
|
||||
|
||||
case Q2TE_SHOTGUN: // bullet hitting wall
|
||||
|
@ -1315,6 +1315,13 @@ void CLQ2_ParseTEnt (void)
|
|||
if (r == Q2SPLASH_SPARKS)
|
||||
{
|
||||
r = rand() & 3;
|
||||
if (r == 1)
|
||||
Q2S_StartSound (pos, 0, 0, S_PrecacheSound ("world/spark5.wav"), 1, ATTN_NORM, 0);
|
||||
else if (r == 2)
|
||||
Q2S_StartSound (pos, 0, 0, S_PrecacheSound ("world/spark6.wav"), 1, ATTN_NORM, 0);
|
||||
else
|
||||
Q2S_StartSound (pos, 0, 0, S_PrecacheSound ("world/spark7.wav"), 1, ATTN_NORM, 0);
|
||||
|
||||
// if (r == 0)
|
||||
// Q2S_StartSound (pos, 0, 0, cl_sfx_spark5, 1, ATTN_STATIC, 0);
|
||||
// else if (r == 1)
|
||||
|
@ -1336,14 +1343,17 @@ void CLQ2_ParseTEnt (void)
|
|||
case Q2TE_BLUEHYPERBLASTER:
|
||||
MSG_ReadPos (pos);
|
||||
MSG_ReadPos (dir);
|
||||
P_BlasterParticles (pos, dir);
|
||||
if (P_RunParticleEffectType(pos, dir, 1, pt_blasterparticles))
|
||||
P_RunParticleEffect (pos, dir, 0xe0, 40);
|
||||
break;
|
||||
|
||||
case Q2TE_BLASTER: // blaster hitting wall
|
||||
MSG_ReadPos (pos);
|
||||
MSG_ReadDir (dir);
|
||||
|
||||
P_BlasterParticles (pos, dir);
|
||||
if (P_RunParticleEffectType(pos, dir, 1, pt_blasterparticles))
|
||||
P_RunParticleEffect (pos, dir, 0xe0, 40);
|
||||
|
||||
R_AddStain(pos, 0, -5, -10, 20);
|
||||
|
||||
ex = CL_AllocExplosion ();
|
||||
|
@ -1364,13 +1374,15 @@ void CLQ2_ParseTEnt (void)
|
|||
else
|
||||
ex->angles[1] = 0;
|
||||
ex->angles[0]*=-1;
|
||||
|
||||
S_StartSound (-2, 0, S_PrecacheSound ("weapons/lashit.wav"), pos, 1, 1);
|
||||
break;
|
||||
|
||||
case Q2TE_RAILTRAIL: // railgun effect
|
||||
MSG_ReadPos (pos);
|
||||
MSG_ReadPos (pos2);
|
||||
CLQ2_RailTrail (pos, pos2);
|
||||
// Q2S_StartSound (pos2, 0, 0, cl_sfx_railg, 1, ATTN_NORM, 0);
|
||||
Q2S_StartSound (pos, 0, 0, S_PrecacheSound ("weapons/railgf1a.wav"), 1, ATTN_NORM, 0);
|
||||
break;
|
||||
|
||||
case Q2TE_EXPLOSION2:
|
||||
|
@ -1394,7 +1406,10 @@ void CLQ2_ParseTEnt (void)
|
|||
}
|
||||
|
||||
// sound
|
||||
S_StartSound (-2, 0, S_PrecacheSound ("weapons/rocklx1a.wav"), pos, 1, 1);
|
||||
if (type == Q2TE_GRENADE_EXPLOSION_WATER)
|
||||
S_StartSound (-2, 0, S_PrecacheSound ("weapons/xpld_wat.wav"), pos, 1, 1);
|
||||
else
|
||||
S_StartSound (-2, 0, S_PrecacheSound ("weapons/grenlx1a.wav"), pos, 1, 1);
|
||||
|
||||
// sprite
|
||||
/*
|
||||
|
@ -1459,7 +1474,9 @@ void CLQ2_ParseTEnt (void)
|
|||
case Q2TE_EXPLOSION1_NP: // PMM
|
||||
MSG_ReadPos (pos);
|
||||
|
||||
P_ParticleExplosion (pos);
|
||||
// particle effect
|
||||
if (type != Q2TE_EXPLOSION1_BIG && type != Q2TE_EXPLOSION1_NP)
|
||||
P_ParticleExplosion (pos);
|
||||
|
||||
// light
|
||||
{
|
||||
|
@ -1475,7 +1492,10 @@ void CLQ2_ParseTEnt (void)
|
|||
}
|
||||
|
||||
// sound
|
||||
S_StartSound (-2, 0, S_PrecacheSound ("weapons/rocklx1a.wav"), pos, 1, 1);
|
||||
if (type == Q2TE_ROCKET_EXPLOSION_WATER)
|
||||
S_StartSound (-2, 0, S_PrecacheSound ("weapons/xpld_wat.wav"), pos, 1, 1);
|
||||
else
|
||||
S_StartSound (-2, 0, S_PrecacheSound ("weapons/rocklx1a.wav"), pos, 1, 1);
|
||||
|
||||
// sprite
|
||||
/* if (!R_ParticleExplosionHeart(pos))
|
||||
|
@ -1783,13 +1803,17 @@ void CLQ2_ParseTEnt (void)
|
|||
// CL_Tracker_Explode (pos);
|
||||
S_StartSound (pos, 0, 0, cl_sfx_disrexp, 1, ATTN_NORM, 0);
|
||||
break;
|
||||
|
||||
*/
|
||||
case Q2TE_TELEPORT_EFFECT:
|
||||
case Q2TE_DBALL_GOAL:
|
||||
MSG_ReadPos (&net_message, pos);
|
||||
CL_TeleportParticles (pos);
|
||||
MSG_ReadPos (pos);
|
||||
if (P_RunParticleEffectType(pos, NULL, 1, pt_teleportsplash))
|
||||
P_RunParticleEffect(pos, NULL, 7, 768);
|
||||
// This effect won't match ---
|
||||
// Color should be 7+(rand()%8)
|
||||
// not 7&~7+(rand()%8)
|
||||
break;
|
||||
|
||||
/*
|
||||
case Q2TE_WIDOWBEAMOUT:
|
||||
CL_ParseWidow ();
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#include "quakedef.h"
|
||||
#include "particles.h"
|
||||
|
||||
#ifdef Q2CLIENT
|
||||
|
||||
extern cvar_t r_drawviewmodel;
|
||||
|
@ -104,13 +106,6 @@ void CLQ2_FlyEffect(q2centity_t *ent, vec3_t org){};
|
|||
void CLQ2_DiminishingTrail(vec3_t oldorg, vec3_t neworg, q2centity_t *ent, unsigned int effects){};
|
||||
void CLQ2_BlasterTrail(vec3_t oldorg, vec3_t neworg);
|
||||
void CLQ2_BlasterTrail2(vec3_t oldorg, vec3_t neworg){};
|
||||
void CLQ2_RocketTrail(vec3_t oldorg, vec3_t neworg, q2centity_t *ent)
|
||||
{
|
||||
extern int rt_rocket;
|
||||
P_ParticleTrail(oldorg, neworg, rt_rocket, &ent->trailstate);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#define MAX_Q2EDICTS 1024
|
||||
|
@ -1324,7 +1319,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
|
|||
{
|
||||
if (effects & Q2EF_ROCKET)
|
||||
{
|
||||
CLQ2_RocketTrail (cent->lerp_origin, ent.origin, cent);
|
||||
P_ParticleTrail(cent->lerp_origin, ent.origin, rt_rocket, ¢->trailstate);
|
||||
V_AddLight (ent.origin, 200, 0.2, 0.2, 0);
|
||||
}
|
||||
// PGM - Do not reorder EF_BLASTER and EF_HYPERBLASTER.
|
||||
|
@ -1340,7 +1335,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
|
|||
}
|
||||
else
|
||||
{
|
||||
CLQ2_BlasterTrail (cent->lerp_origin, ent.origin);
|
||||
P_ParticleTrail(cent->lerp_origin, ent.origin, rt_blastertrail, ¢->trailstate);
|
||||
V_AddLight (ent.origin, 200, 0.2, 0.2, 0);
|
||||
}
|
||||
//PGM
|
||||
|
@ -1354,11 +1349,11 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
|
|||
}
|
||||
else if (effects & Q2EF_GIB)
|
||||
{
|
||||
CLQ2_DiminishingTrail (cent->lerp_origin, ent.origin, cent, effects);
|
||||
P_ParticleTrail(cent->lerp_origin, ent.origin, rt_gib, ¢->trailstate);
|
||||
}
|
||||
else if (effects & Q2EF_GRENADE)
|
||||
{
|
||||
CLQ2_DiminishingTrail (cent->lerp_origin, ent.origin, cent, effects);
|
||||
P_ParticleTrail(cent->lerp_origin, ent.origin, rt_grenade, ¢->trailstate);
|
||||
}
|
||||
else if (effects & Q2EF_FLIES)
|
||||
{
|
||||
|
@ -1455,7 +1450,7 @@ void CLQ2_AddPacketEntities (q2frame_t *frame)
|
|||
{
|
||||
if (effects & Q2EF_ANIM_ALLFAST)
|
||||
{
|
||||
CLQ2_BlasterTrail (cent->lerp_origin, ent.origin);
|
||||
P_ParticleTrail(cent->lerp_origin, ent.origin, rt_blastertrail, ¢->trailstate);
|
||||
}
|
||||
V_AddLight (ent.origin, 130, 0.2, 0.1, 0.1);
|
||||
}
|
||||
|
|
|
@ -437,7 +437,7 @@ menupicture_t *MC_AddCenterPicture(menu_t *menu, int y, char *picname)
|
|||
|
||||
menupicture_t *MC_AddCursor(menu_t *menu, int x, int y)
|
||||
{
|
||||
int q1, h2, q2;
|
||||
int mgt;
|
||||
menupicture_t *n = Z_Malloc(sizeof(menupicture_t));
|
||||
n->common.type = mt_menudot;
|
||||
n->common.iszone = true;
|
||||
|
@ -448,17 +448,15 @@ menupicture_t *MC_AddCursor(menu_t *menu, int x, int y)
|
|||
menu->options = (menuoption_t *)n;
|
||||
|
||||
|
||||
q1 = COM_FDepthFile("gfx/menudot1.lmp", true);
|
||||
h2 = COM_FDepthFile("gfx/menu/menudot1.lmp", true);
|
||||
q2 = COM_FDepthFile("pics/m_cursor1.pcx", true);
|
||||
if (q2 < h2 && q2 < q1)
|
||||
mgt = M_GameType();
|
||||
if (mgt == MGT_QUAKE2)
|
||||
{ //AND QUAKE 2 WINS!!!
|
||||
menudotstyle = "m_cursor%i";
|
||||
mindot = 0;
|
||||
maxdots = 15;
|
||||
dotofs=0;
|
||||
}
|
||||
else if (h2 < q1)
|
||||
else if (mgt == MGT_HEXEN2)
|
||||
{ //AND THE WINNER IS HEXEN 2!!!
|
||||
menudotstyle = "gfx/menu/menudot%i.lmp";
|
||||
mindot = 1;
|
||||
|
@ -1276,7 +1274,6 @@ qboolean MC_Main_Key (int key, menu_t *menu) //here purly to restart demos.
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
void M_Menu_Main_f (void)
|
||||
{
|
||||
extern cvar_t m_helpismedia;
|
||||
|
@ -1284,7 +1281,7 @@ void M_Menu_Main_f (void)
|
|||
menu_t *mainm;
|
||||
mpic_t *p;
|
||||
|
||||
int q1, q2, h2;
|
||||
int mgt;
|
||||
|
||||
SCR_EndLoadingPlaque(); //just in case...
|
||||
|
||||
|
@ -1319,10 +1316,8 @@ void M_Menu_Main_f (void)
|
|||
}
|
||||
*/
|
||||
|
||||
q1 = COM_FDepthFile("gfx/mainmenu.lmp", true);
|
||||
q2 = COM_FDepthFile("pics/m_main.pcx", true);
|
||||
h2 = COM_FDepthFile("gfx/menu/title0.lmp", true);
|
||||
if (q2 < q1 && q2 < h2) //quake2 main menu.
|
||||
mgt = M_GameType();
|
||||
if (mgt == MGT_QUAKE2) //quake2 main menu.
|
||||
{
|
||||
if (Draw_SafeCachePic("pics/m_main_game"))
|
||||
{
|
||||
|
@ -1355,7 +1350,7 @@ void M_Menu_Main_f (void)
|
|||
}
|
||||
return;
|
||||
}
|
||||
else if (h2 < q1)
|
||||
else if (mgt == MGT_HEXEN2)
|
||||
{
|
||||
m_state = m_complex;
|
||||
key_dest = key_menu;
|
||||
|
|
|
@ -13,23 +13,45 @@ void M_Menu_MultiPlayer_f (void)
|
|||
menubutton_t *b;
|
||||
menu_t *menu;
|
||||
mpic_t *p;
|
||||
int mgt;
|
||||
|
||||
p = Draw_SafeCachePic("gfx/mp_menu.lmp");
|
||||
|
||||
p = NULL;
|
||||
key_dest = key_menu;
|
||||
m_state = m_complex;
|
||||
m_entersound = true;
|
||||
|
||||
mgt = M_GameType();
|
||||
|
||||
menu = M_CreateMenu(0);
|
||||
|
||||
if (p)
|
||||
if (mgt == MGT_QUAKE2)
|
||||
{
|
||||
MC_AddPicture(menu, 16, 4, "gfx/qplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "gfx/p_multi.lmp");
|
||||
MC_AddPicture(menu, 72, 32, "gfx/mp_menu.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "pics/m_banner_multiplayer");
|
||||
|
||||
menu->selecteditem = (menuoption_t*)
|
||||
MC_AddConsoleCommand (menu, 64, 40, "Join network server", "menu_slist\n");
|
||||
MC_AddConsoleCommand (menu, 64, 48, "Start network server", "menu_newmulti\n");
|
||||
MC_AddConsoleCommand (menu, 64, 56, "Player setup", "menu_setup\n");
|
||||
MC_AddConsoleCommand (menu, 64, 64, "Demos", "menu_demo\n");
|
||||
|
||||
menu->cursoritem = (menuoption_t*)MC_AddWhiteText(menu, 48, 40, NULL, false);
|
||||
return;
|
||||
}
|
||||
else if (mgt == MGT_HEXEN2)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
p = Draw_SafeCachePic("gfx/mp_menu.lmp");
|
||||
if (p)
|
||||
{
|
||||
MC_AddPicture(menu, 16, 4, "gfx/qplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "gfx/p_multi.lmp");
|
||||
MC_AddPicture(menu, 72, 32, "gfx/mp_menu.lmp");
|
||||
}
|
||||
}
|
||||
|
||||
b = MC_AddConsoleCommand(menu, 72, 32, "", "menu_slist\n");
|
||||
b = MC_AddConsoleCommand(menu, 72, 32, "", "menu_slist\n");
|
||||
menu->selecteditem = (menuoption_t*)b;
|
||||
b->common.height = 20;
|
||||
b->common.width = p?p->width:320;
|
||||
|
@ -345,6 +367,7 @@ void M_Menu_GameOptions_f (void)
|
|||
newmultimenu_t *info;
|
||||
menu_t *menu;
|
||||
int y = 40;
|
||||
int mgt;
|
||||
int players;
|
||||
|
||||
key_dest = key_menu;
|
||||
|
@ -353,10 +376,22 @@ void M_Menu_GameOptions_f (void)
|
|||
|
||||
menu = M_CreateMenu(sizeof(newmultimenu_t));
|
||||
info = menu->data;
|
||||
|
||||
MC_AddPicture(menu, 16, 4, "gfx/qplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "gfx/p_multi.lmp");
|
||||
|
||||
mgt = M_GameType();
|
||||
|
||||
if (mgt == MGT_QUAKE2)
|
||||
{
|
||||
MC_AddCenterPicture(menu, 4, "pics/m_banner_start_server");
|
||||
y += 8;
|
||||
}
|
||||
else if (mgt == MGT_HEXEN2)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
MC_AddPicture(menu, 16, 4, "gfx/qplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "gfx/p_multi.lmp");
|
||||
}
|
||||
|
||||
// MC_AddPicture(menu, 72, 32, ("gfx/mp_menu.lmp") );
|
||||
|
||||
|
@ -383,10 +418,11 @@ void M_Menu_GameOptions_f (void)
|
|||
y+=8;
|
||||
MC_AddSlider (menu, 64-7*8, y, "Extra edict support", &pr_maxedicts, 512, 2047);y+=8;
|
||||
y+=8;
|
||||
info->mapnameedit = MC_AddEdit (menu, 64, y, " map", "start");y+=16;
|
||||
info->mapnameedit = MC_AddEdit (menu, 64, y, " map", "start");y+=16;
|
||||
|
||||
|
||||
if (mgt == MGT_QUAKE2)
|
||||
info->mapnameedit = MC_AddEdit (menu, 64, y, " map", "base1");
|
||||
else
|
||||
info->mapnameedit = MC_AddEdit (menu, 64, y, " map", "start");
|
||||
y += 16;
|
||||
|
||||
menu->cursoritem = (menuoption_t*)MC_AddWhiteText(menu, 54, 32, NULL, false);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ qboolean M_Options_InvertMouse (union menuoption_s *option, chk_set_t set)
|
|||
//options menu.
|
||||
void M_Menu_Options_f (void)
|
||||
{
|
||||
int q1, q2, h2;
|
||||
int mgt;
|
||||
extern cvar_t cl_standardchat;
|
||||
#ifdef _WIN32
|
||||
extern qboolean vid_isfullscreen;
|
||||
|
@ -49,13 +49,13 @@ void M_Menu_Options_f (void)
|
|||
|
||||
menu = M_CreateMenu(0);
|
||||
|
||||
q1 = COM_FDepthFile("gfx/menudot1.lmp", true);
|
||||
h2 = COM_FDepthFile("gfx/menu/menudot1.lmp", true);
|
||||
q2 = COM_FDepthFile("pics/m_cursor1.lmp", true);
|
||||
if (q2 < h2 && q2 < q1)
|
||||
mgt = M_GameType();
|
||||
if (mgt == MGT_QUAKE2)
|
||||
{ //q2...
|
||||
MC_AddCenterPicture(menu, 4, "pics/m_banner_options");
|
||||
y += 32;
|
||||
}
|
||||
else if (h2 < q1)
|
||||
else if (mgt == MGT_HEXEN2)
|
||||
{ //h2
|
||||
MC_AddPicture(menu, 16, 0, "gfx/menu/hplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 0, "gfx/menu/title3.lmp");
|
||||
|
@ -67,10 +67,6 @@ void M_Menu_Options_f (void)
|
|||
MC_AddCenterPicture(menu, 4, "gfx/p_option.lmp");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
menu->selecteditem = (union menuoption_s *)
|
||||
MC_AddConsoleCommand(menu, 16, y, " Customize controls", "menu_keys\n"); y+=8;
|
||||
MC_AddConsoleCommand(menu, 16, y, " Go to console", "toggleconsole\nplay misc/menu2.wav\n"); y+=8;
|
||||
|
@ -229,6 +225,7 @@ void M_Menu_Audio_f (void)
|
|||
{
|
||||
int y = 32;
|
||||
menu_t *menu;
|
||||
int mgt;
|
||||
extern cvar_t nosound, precache, snd_leftisright, snd_khz, snd_eax, snd_speakers, ambient_level;
|
||||
|
||||
static const char *soundqualityoptions[] = {
|
||||
|
@ -267,16 +264,24 @@ void M_Menu_Audio_f (void)
|
|||
|
||||
menu = M_CreateMenu(0);
|
||||
|
||||
MC_AddPicture(menu, 16, 4, "gfx/qplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "gfx/p_option.lmp");
|
||||
|
||||
|
||||
|
||||
mgt = M_GameType();
|
||||
|
||||
if (mgt == MGT_QUAKE2)
|
||||
{
|
||||
MC_AddCenterPicture(menu, 4, "pics/m_banner_options");
|
||||
y += 32;
|
||||
}
|
||||
else if (mgt == MGT_HEXEN2)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
MC_AddPicture(menu, 16, 4, "gfx/qplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "gfx/p_option.lmp");
|
||||
}
|
||||
|
||||
menu->selecteditem = (union menuoption_s *)
|
||||
|
||||
|
||||
MC_AddSlider(menu, 16, y, " CD Music Volume", &bgmvolume, 0, 1);y+=8;
|
||||
MC_AddSlider(menu, 16, y, " Sound Volume", &volume, 0, 1);y+=8;
|
||||
MC_AddSlider(menu, 16, y, " Ambient Volume", &ambient_level, 0, 1);y+=8;
|
||||
|
@ -289,7 +294,6 @@ void M_Menu_Audio_f (void)
|
|||
MC_AddCvarCombo(menu, 16, y, " Sound speed", &snd_khz, soundqualityoptions, soundqualityvalues);y+=8;
|
||||
MC_AddConsoleCommand(menu, 16, y, " Restart sound", "snd_restart\n");y+=8;
|
||||
|
||||
|
||||
menu->cursoritem = (menuoption_t*)MC_AddWhiteText(menu, 200, 32, NULL, false);
|
||||
}
|
||||
|
||||
|
@ -306,6 +310,7 @@ void M_Menu_Particles_f (void)
|
|||
{
|
||||
int y = 32;
|
||||
menu_t *menu;
|
||||
int mgt;
|
||||
extern cvar_t r_bouncysparks, r_part_rain, gl_part_torch, gl_part_flame, gl_part_trifansparks;
|
||||
|
||||
static const char *r_part_rain_options[] = {
|
||||
|
@ -341,9 +346,21 @@ void M_Menu_Particles_f (void)
|
|||
|
||||
menu = M_CreateMenu(0);
|
||||
|
||||
MC_AddPicture(menu, 16, 4, "gfx/qplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "gfx/p_option.lmp");
|
||||
mgt = M_GameType();
|
||||
|
||||
if (mgt == MGT_QUAKE2)
|
||||
{
|
||||
MC_AddCenterPicture(menu, 4, "pics/m_banner_options");
|
||||
y += 32;
|
||||
}
|
||||
else if (mgt == MGT_HEXEN2)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
MC_AddPicture(menu, 16, 4, "gfx/qplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "gfx/p_option.lmp");
|
||||
}
|
||||
|
||||
menu->selecteditem = (union menuoption_s *)
|
||||
|
||||
|
@ -369,6 +386,7 @@ void M_Menu_FPS_f (void)
|
|||
{
|
||||
int y = 32;
|
||||
menu_t *menu;
|
||||
int mgt;
|
||||
#ifdef RGLQUAKE
|
||||
extern cvar_t gl_compress, gl_waterripples, gl_detail, gl_bump, r_flashblend;
|
||||
#endif
|
||||
|
@ -383,12 +401,21 @@ void M_Menu_FPS_f (void)
|
|||
|
||||
menu = M_CreateMenu(0);
|
||||
|
||||
MC_AddPicture(menu, 16, 4, "gfx/qplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "gfx/p_option.lmp");
|
||||
|
||||
|
||||
|
||||
mgt = M_GameType();
|
||||
|
||||
if (mgt == MGT_QUAKE2)
|
||||
{
|
||||
MC_AddCenterPicture(menu, 4, "pics/m_banner_options");
|
||||
y += 32;
|
||||
}
|
||||
else if (mgt == MGT_HEXEN2)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
MC_AddPicture(menu, 16, 4, "gfx/qplaque.lmp");
|
||||
MC_AddCenterPicture(menu, 4, "gfx/p_option.lmp");
|
||||
}
|
||||
|
||||
menu->selecteditem = (union menuoption_s *)
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ void M_Menu_Load_f (void)
|
|||
|
||||
void M_Menu_SinglePlayer_f (void)
|
||||
{
|
||||
int q1, q2, h2;
|
||||
int mgt;
|
||||
menubutton_t *b;
|
||||
menu_t *menu;
|
||||
mpic_t *p;
|
||||
|
@ -158,14 +158,12 @@ void M_Menu_SinglePlayer_f (void)
|
|||
m_state = m_complex;
|
||||
m_entersound = true;
|
||||
|
||||
q1 = COM_FDepthFile("gfx/sp_menu.lmp", true);
|
||||
h2 = COM_FDepthFile("gfx/menu/title2.lmp", true);
|
||||
q2 = COM_FDepthFile("pics/m_banner_game.pcx", true);
|
||||
if (q2 < h2 && q2 < q1)
|
||||
mgt = M_GameType();
|
||||
if (mgt == MGT_QUAKE2)
|
||||
{ //q2...
|
||||
menu = M_CreateMenu(0);
|
||||
|
||||
MC_AddCenterPicture(menu, 4, "m_banner_game");
|
||||
MC_AddCenterPicture(menu, 4, "pics/m_banner_game");
|
||||
|
||||
menu->selecteditem = (menuoption_t*)
|
||||
MC_AddConsoleCommand (menu, 64, 40, "Easy", "skill 0;deathmatch 0; coop 0;newgame\n");
|
||||
|
@ -174,9 +172,11 @@ void M_Menu_SinglePlayer_f (void)
|
|||
|
||||
MC_AddConsoleCommand (menu, 64, 72, "Load Game", "menu_load\n");
|
||||
MC_AddConsoleCommand (menu, 64, 80, "Save Game", "menu_save\n");
|
||||
|
||||
menu->cursoritem = (menuoption_t*)MC_AddWhiteText(menu, 48, 40, NULL, false);
|
||||
return;
|
||||
}
|
||||
else if (h2 < q1)
|
||||
else if (mgt == MGT_HEXEN2)
|
||||
{ //h2
|
||||
menu = M_CreateMenu(0);
|
||||
MC_AddPicture(menu, 16, 0, "gfx/menu/hplaque.lmp");
|
||||
|
|
|
@ -1051,5 +1051,26 @@ void M_Keyup (int key)
|
|||
}
|
||||
}
|
||||
|
||||
// Generic function to choose which game menu to draw
|
||||
int M_GameType (void)
|
||||
{
|
||||
int q1, h2, q2;
|
||||
|
||||
q1 = COM_FDepthFile("gfx/sp_menu.lmp", true);
|
||||
h2 = COM_FDepthFile("gfx/menu/title2.lmp", true);
|
||||
q2 = COM_FDepthFile("pics/m_banner_game.pcx", true);
|
||||
|
||||
if (q2 < h2 && q2 < q1)
|
||||
{ //AND QUAKE 2 WINS!!!
|
||||
return MGT_QUAKE2;
|
||||
}
|
||||
else if (h2 < q1)
|
||||
{ //AND THE WINNER IS HEXEN 2!!!
|
||||
return MGT_HEXEN2;
|
||||
}
|
||||
|
||||
//QUAKE 1 WINS BY DEFAULT!
|
||||
return MGT_QUAKE1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -363,3 +363,8 @@ qboolean MP_Toggle(void);
|
|||
void MP_Draw(void);
|
||||
void MP_Keydown(int key);
|
||||
void MP_Keyup(int key);
|
||||
|
||||
#define MGT_QUAKE1 0
|
||||
#define MGT_HEXEN2 1
|
||||
#define MGT_QUAKE2 2
|
||||
int M_GameType(void);
|
|
@ -83,6 +83,7 @@ void Master_AddMaster (char *address, int type, char *description)
|
|||
if (!NET_StringToAdr(address, &adr))
|
||||
{
|
||||
Con_Printf("Failed to resolve address \"%s\"\n", address);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
if (type == MT_SINGLEQW || type == MT_SINGLENQ || type == MT_SINGLEQ2) //single servers are added to the serverlist as well as the masters list
|
||||
|
@ -504,7 +505,7 @@ void MasterInfo_Request(master_t *mast)
|
|||
break;
|
||||
#ifdef Q2CLIENT
|
||||
case MT_MASTERQ2:
|
||||
if (COM_FDepthFile("pics/colormap.pcx", true)!=0x7fffffff) //only query this master if we expect to be able to load it's maps.
|
||||
if (COM_FDepthFile("pics/colormap.pcx", true)!=0x7fffffff)
|
||||
NET_SendPollPacket (6, "query", mast->adr);
|
||||
break;
|
||||
#endif
|
||||
|
|
|
@ -66,6 +66,8 @@ int rt_blastertrail,
|
|||
rt_railtrail,
|
||||
rt_bubbletrail,
|
||||
rt_rocket,
|
||||
rt_grenade,
|
||||
rt_gib,
|
||||
rt_lightning1,
|
||||
rt_lightning2,
|
||||
rt_lightning3;
|
||||
|
@ -809,13 +811,13 @@ void P_DefaultTrail (model_t *model)
|
|||
model->particletrail = rt_rocket;//q2 models do this without flags.
|
||||
break;
|
||||
case 2:
|
||||
model->particletrail = P_AllocateParticleType("t_grenade");
|
||||
model->particletrail = rt_grenade;
|
||||
break;
|
||||
case 3:
|
||||
model->particletrail = P_AllocateParticleType("t_altrocket");
|
||||
break;
|
||||
case 4:
|
||||
model->particletrail = P_AllocateParticleType("t_gib");
|
||||
model->particletrail = rt_gib;
|
||||
break;
|
||||
case 5:
|
||||
model->particletrail = P_AllocateParticleType("t_zomgib");
|
||||
|
@ -834,12 +836,12 @@ void P_DefaultTrail (model_t *model)
|
|||
else if (model->flags & EF_GRENADE)
|
||||
{
|
||||
if (r_grenadetrail.value)
|
||||
model->particletrail = P_AllocateParticleType("t_grenade");
|
||||
model->particletrail = rt_grenade;
|
||||
else
|
||||
model->particletrail = P_AllocateParticleType("t_null");
|
||||
}
|
||||
else if (model->flags & EF_GIB)
|
||||
model->particletrail = P_AllocateParticleType("t_gib");
|
||||
model->particletrail = rt_gib;
|
||||
else if (model->flags & EF_TRACER)
|
||||
model->particletrail = P_AllocateParticleType("t_tracer");
|
||||
else if (model->flags & EF_ZOMGIB)
|
||||
|
@ -1004,28 +1006,32 @@ void P_InitParticles (void)
|
|||
pt_gunshot = P_AllocateParticleType("te_gunshot");
|
||||
pt_lavasplash = P_AllocateParticleType("te_lavasplash");
|
||||
pt_teleportsplash = P_AllocateParticleType("te_teleportsplash");
|
||||
rt_blastertrail = P_AllocateParticleType("t_blastertrail");
|
||||
pt_superbullet = P_AllocateParticleType("te_superbullet");
|
||||
pt_bullet = P_AllocateParticleType("te_bullet");
|
||||
pt_blasterparticles = P_AllocateParticleType("te_blasterparticles");
|
||||
pt_wizspike = P_AllocateParticleType("te_wizspike");
|
||||
pt_knightspike = P_AllocateParticleType("te_knightspike");
|
||||
pt_spike = P_AllocateParticleType("te_spike");
|
||||
pt_superspike = P_AllocateParticleType("te_superspike");
|
||||
|
||||
rt_railtrail = P_AllocateParticleType("t_railtrail");
|
||||
rt_blastertrail = P_AllocateParticleType("t_blastertrail");
|
||||
rt_bubbletrail = P_AllocateParticleType("t_bubbletrail");
|
||||
rt_rocket = P_AllocateParticleType("t_rocket");
|
||||
rt_grenade = P_AllocateParticleType("t_grenade");
|
||||
rt_gib = P_AllocateParticleType("t_gib");
|
||||
|
||||
rt_lightning1 = P_AllocateParticleType("t_lightning1");
|
||||
rt_lightning2 = P_AllocateParticleType("t_lightning2");
|
||||
rt_lightning3 = P_AllocateParticleType("t_lightning3");
|
||||
|
||||
pt_superbullet = P_AllocateParticleType("te_superbullet");
|
||||
pt_bullet = P_AllocateParticleType("te_bullet");
|
||||
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");
|
||||
|
||||
pe_default = P_AllocateParticleType("pe_default");
|
||||
pe_size2 = P_AllocateParticleType("pe_size2");
|
||||
pe_size3 = P_AllocateParticleType("pe_size3");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1858,43 +1864,25 @@ void P_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
|||
{
|
||||
int ptype;
|
||||
|
||||
#if 0
|
||||
if (color == 73)
|
||||
{ //blood
|
||||
P_RunParticleEffectType(org, dir, count, pt_blood);
|
||||
return;
|
||||
}
|
||||
if (color == 225)
|
||||
{ //lightning blood //a brighter red...
|
||||
P_RunParticleEffectType(org, dir, count, pt_lightningblood);
|
||||
return;
|
||||
}
|
||||
|
||||
if (color == 0)
|
||||
{ //lightning blood
|
||||
P_RunParticleEffectType(org, dir, count, pt_gunshot);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
ptype = P_FindParticleType(va("pe_%i", color));
|
||||
if (P_RunParticleEffectType(org, dir, count, ptype))
|
||||
{
|
||||
color &= ~0x7;
|
||||
if (count > 130 && part_type[pe_size3].loaded)
|
||||
{
|
||||
part_type[pe_size3].colorindex = color & ~0x7;
|
||||
part_type[pe_size3].colorindex = color;
|
||||
part_type[pe_size3].colorrand = 8;
|
||||
P_RunParticleEffectType(org, dir, count, pe_size3);
|
||||
return;
|
||||
}
|
||||
if (count > 20 && part_type[pe_size2].loaded)
|
||||
{
|
||||
part_type[pe_size2].colorindex = color & ~0x7;
|
||||
part_type[pe_size2].colorindex = color;
|
||||
part_type[pe_size2].colorrand = 8;
|
||||
P_RunParticleEffectType(org, dir, count, pe_size2);
|
||||
return;
|
||||
}
|
||||
part_type[pe_default].colorindex = color & ~0x7;
|
||||
part_type[pe_default].colorindex = color;
|
||||
part_type[pe_default].colorrand = 8;
|
||||
P_RunParticleEffectType(org, dir, count, pe_default);
|
||||
return;
|
||||
|
@ -2041,19 +2029,10 @@ R_TeleportSplash
|
|||
|
||||
===============
|
||||
*/
|
||||
void P_TeleportSplash (vec3_t org)
|
||||
{
|
||||
P_RunParticleEffectType(org, NULL, 1, pt_teleportsplash);
|
||||
}
|
||||
|
||||
void CLQ2_BlasterTrail (vec3_t start, vec3_t end)
|
||||
{
|
||||
P_ParticleTrail(start, end, rt_blastertrail, NULL);
|
||||
}
|
||||
void P_BlasterParticles (vec3_t start, vec3_t dir)
|
||||
{
|
||||
P_RunParticleEffectType(start, dir, 1, pt_blasterparticles);
|
||||
}
|
||||
|
||||
void MakeNormalVectors (vec3_t forward, vec3_t right, vec3_t up)
|
||||
{
|
||||
|
|
|
@ -280,7 +280,6 @@ void CLQ2_FlyEffect(struct q2centity_s *ent, vec3_t org);
|
|||
void CLQ2_DiminishingTrail(vec3_t oldorg, vec3_t neworg, struct q2centity_s *ent, unsigned int effects);
|
||||
void CLQ2_BlasterTrail(vec3_t oldorg, vec3_t neworg);
|
||||
void CLQ2_BlasterTrail2(vec3_t oldorg, vec3_t neworg);
|
||||
void CLQ2_RocketTrail(vec3_t oldorg, vec3_t neworg, struct q2centity_s *ent);
|
||||
|
||||
void WritePCXfile (char *filename, qbyte *data, int width, int height, int rowbytes, qbyte *palette, qboolean upload); //data is 8bit.
|
||||
qbyte *ReadPCXFile(qbyte *buf, int length, int *width, int *height);
|
||||
|
|
|
@ -23,6 +23,17 @@ extern int pt_explosion,
|
|||
pt_superbullet,
|
||||
pe_default;
|
||||
|
||||
extern int rt_blastertrail,
|
||||
rt_railtrail,
|
||||
rt_bubbletrail,
|
||||
rt_rocket,
|
||||
rt_grenade,
|
||||
rt_gib,
|
||||
rt_lightning1,
|
||||
rt_lightning2,
|
||||
rt_lightning3;
|
||||
|
||||
/*
|
||||
extern int rt_rocket_trail,
|
||||
rt_smoke,
|
||||
rt_blood,
|
||||
|
@ -44,6 +55,7 @@ extern int rt_rocket_trail,
|
|||
rt_blastertrail,
|
||||
rt_railtrail,
|
||||
rt_bubbletrail;
|
||||
*/
|
||||
|
||||
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
|
||||
typedef struct particle_s
|
||||
|
@ -98,8 +110,10 @@ int P_AllocateParticleType(char *name);
|
|||
|
||||
void P_SkyTri(float *v1, float *v2, float *v3, struct msurface_s *surf);
|
||||
|
||||
//wierd effects
|
||||
// default particle effect
|
||||
void P_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count); //aka: the particle builtin.
|
||||
|
||||
//wierd effects
|
||||
void P_RunParticleEffect2 (vec3_t org, vec3_t dmin, vec3_t dmax, int color, int effect, int count); //these three are needed for hexen2.
|
||||
void P_RunParticleEffect3 (vec3_t org, vec3_t box, int color, int effect, int count);
|
||||
void P_RunParticleEffect4 (vec3_t org, float radius, int color, int effect, int count);
|
||||
|
@ -108,16 +122,10 @@ void P_DarkFieldParticles (float *org, qbyte colour);
|
|||
void P_EntityParticles (float *org, qbyte colour, float *radius); //nq's EF_BRIGHTFIELD
|
||||
void P_TorchEffect (vec3_t pos, int type); //particles centered around a model, called every frame for those models.
|
||||
|
||||
//functions that spawn trails (basically just pass throughs)
|
||||
void P_BlasterParticles (vec3_t org, vec3_t dir);
|
||||
|
||||
//functions that spawn point effects (basically just pass throughs)
|
||||
void P_BlobExplosion (vec3_t org); //tarbaby explosion or TF emp.
|
||||
void P_ParticleExplosion (vec3_t org); //rocket explosion (sprite is allocated seperatly :( )
|
||||
void P_LavaSplash (vec3_t org); //cthon dying, or a gas grenade.
|
||||
void P_TeleportSplash (vec3_t org); //teleporter effect.
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
float lastdist;
|
||||
|
|
Loading…
Reference in a new issue