Bunch of changes related to VM 0-01-xx series
This commit is contained in:
Victor Chow 2001-06-24 02:07:17 +00:00
parent ce64cb6c21
commit 942c397d3a
5 changed files with 53 additions and 12 deletions

View File

@ -115,6 +115,11 @@ static void CG_Reload_f (void) {
return;
}
//Elder: don't allow reloading until the weapon is free
//Don't cut-off here because we want to check for fast-reloads
//if (cg.snap->ps.weaponTime > 0)
//return;
//Elder: added to prevent bandaging while reloading
if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
CG_Printf("You'll get to your weapon when you are finished bandaging!\n");

View File

@ -765,6 +765,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
break;
case EV_CHANGE_WEAPON:
DEBUGNAME("EV_CHANGE_WEAPON");
//Elder: TODO: change to appropriate weapon "in" sound
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.selectSound );
//Elder: removed
//CG_rxn_zoom(0);

View File

@ -274,13 +274,14 @@ typedef struct {
int scoreFlags;
int powerUps;
int accuracy;
//Elder: no more of these
int impressiveCount;
int excellentCount;
int guantletCount;
int defendCount;
int assistCount;
int captures;
qboolean perfect;
qboolean perfect;
int team;
} score_t;

View File

@ -56,7 +56,8 @@ static void CG_ParseScores( void ) {
memset( cg.scores, 0, sizeof( cg.scores ) );
for ( i = 0 ; i < cg.numScores ; i++ ) {
//
//Elder: Leave as-is ... sent zeros by server
//CG_Printf("client: %d\n", cg.scores[i].client);
cg.scores[i].client = atoi( CG_Argv( i * 14 + 4 ) );
cg.scores[i].score = atoi( CG_Argv( i * 14 + 5 ) );
cg.scores[i].ping = atoi( CG_Argv( i * 14 + 6 ) );
@ -64,6 +65,7 @@ static void CG_ParseScores( void ) {
cg.scores[i].scoreFlags = atoi( CG_Argv( i * 14 + 8 ) );
powerups = atoi( CG_Argv( i * 14 + 9 ) );
cg.scores[i].accuracy = atoi(CG_Argv(i * 14 + 10));
//Elder: these should be zero
cg.scores[i].impressiveCount = atoi(CG_Argv(i * 14 + 11));
cg.scores[i].excellentCount = atoi(CG_Argv(i * 14 + 12));
cg.scores[i].guantletCount = atoi(CG_Argv(i * 14 + 13));

View File

@ -1596,6 +1596,11 @@ void CG_NextWeapon_f( void ) {
return;
}
//Elder: in the middle of firing, reloading or weapon-switching
if (cg.snap->ps.weaponTime > 0) {
return;
}
//Elder: added
//cg.zoomed = qfalse;
//cg.zoomLevel = 0;
@ -1643,6 +1648,11 @@ void CG_PrevWeapon_f( void ) {
return;
}
//Elder: in the middle of firing, reloading or weapon-switching
if (cg.snap->ps.weaponTime > 0) {
return;
}
//Elder: added
//cg.zoomed = qfalse;
//cg.zoomLevel = 0;
@ -2322,12 +2332,15 @@ Perform the same traces the server did to locate the
hit splashes (FIXME: ranom seed isn't synce anymore)
================
*/
static void CG_ShotgunPattern( vec3_t origin, vec3_t origin2, int otherEntNum,qboolean ism3 ) {
static void CG_ShotgunPattern( vec3_t origin, vec3_t origin2, int otherEntNum, int shotType ) {
int i;
float r, u;
vec3_t end;
vec3_t forward, right, up;
int count;
int hc_multipler;
// derive the right and up vectors from the forward vector, because
// the client won't have any other information
VectorNormalize2( origin2, forward );
@ -2335,16 +2348,34 @@ static void CG_ShotgunPattern( vec3_t origin, vec3_t origin2, int otherEntNum,qb
CrossProduct( forward, right, up );
// generate the "random" spread pattern
for ( i = 0 ; i < DEFAULT_SHOTGUN_COUNT ; i++ ) {
if (ism3)
//Elder: added
if (shotType == WP_M3)
count = DEFAULT_M3_COUNT;
else if (shotType == WP_HANDCANNON) {
count = DEFAULT_HANDCANNON_COUNT;
hc_multipler = 4;
}
else {
count = DEFAULT_HANDCANNON_COUNT;
hc_multipler = 5;
}
for ( i = 0 ; i < count ; i++ ) {
if (shotType == WP_M3)
{
r = crandom() * DEFAULT_SHOTGUN_SPREAD * 16;
u = crandom() * DEFAULT_SHOTGUN_SPREAD * 16;
r = crandom() * DEFAULT_M3_HSPREAD * 16;
u = crandom() * DEFAULT_M3_VSPREAD * 16;
//r = crandom() * DEFAULT_SHOTGUN_SPREAD * 16;
//u = crandom() * DEFAULT_SHOTGUN_SPREAD * 16;
}
else
{
r = crandom() * DEFAULT_HANDCANNON_SPREAD * 16 * 4;
u = crandom() * DEFAULT_HANDCANNON_SPREAD * 16 * 4;
r = crandom() * DEFAULT_SHOTGUN_HSPREAD * 16 * 4;
u = crandom() * DEFAULT_SHOTGUN_VSPREAD * 16 * hc_multipler;
// r = crandom() * DEFAULT_HANDCANNON_SPREAD * 16 * 4;
// u = crandom() * DEFAULT_HANDCANNON_SPREAD * 16 * 4;
} VectorMA( origin, 8192 * 16, forward, end);
VectorMA (end, r, right, end);
VectorMA (end, u, up, end);
@ -2376,15 +2407,16 @@ void CG_ShotgunFire( entityState_t *es, qboolean ism3) {
CG_SmokePuff( v, up, 32, 1, 1, 1, 0.33f, 900, cg.time, 0, LEF_PUFF_DONT_SCALE, cgs.media.shotgunSmokePuffShader );
}
}
//Elder: note param changes
if (ism3)
{
CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum,ism3);
CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum, WP_M3);
}
else
{
CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum,ism3);
CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum, WP_HANDCANNON);
es->origin2[1] += 5;
CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum,ism3);
CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum, -1 );
}
}