mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-10 07:11:36 +00:00
Elder:
Bunch of changes related to VM 0-01-xx series
This commit is contained in:
parent
ce64cb6c21
commit
942c397d3a
5 changed files with 53 additions and 12 deletions
|
@ -115,6 +115,11 @@ static void CG_Reload_f (void) {
|
||||||
return;
|
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
|
//Elder: added to prevent bandaging while reloading
|
||||||
if ( (cg.snap->ps.stats[STAT_RQ3] & RQ3_BANDAGE_WORK) == RQ3_BANDAGE_WORK) {
|
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");
|
CG_Printf("You'll get to your weapon when you are finished bandaging!\n");
|
||||||
|
|
|
@ -765,6 +765,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||||
break;
|
break;
|
||||||
case EV_CHANGE_WEAPON:
|
case EV_CHANGE_WEAPON:
|
||||||
DEBUGNAME("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 );
|
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.selectSound );
|
||||||
//Elder: removed
|
//Elder: removed
|
||||||
//CG_rxn_zoom(0);
|
//CG_rxn_zoom(0);
|
||||||
|
|
|
@ -274,6 +274,7 @@ typedef struct {
|
||||||
int scoreFlags;
|
int scoreFlags;
|
||||||
int powerUps;
|
int powerUps;
|
||||||
int accuracy;
|
int accuracy;
|
||||||
|
//Elder: no more of these
|
||||||
int impressiveCount;
|
int impressiveCount;
|
||||||
int excellentCount;
|
int excellentCount;
|
||||||
int guantletCount;
|
int guantletCount;
|
||||||
|
|
|
@ -56,7 +56,8 @@ static void CG_ParseScores( void ) {
|
||||||
|
|
||||||
memset( cg.scores, 0, sizeof( cg.scores ) );
|
memset( cg.scores, 0, sizeof( cg.scores ) );
|
||||||
for ( i = 0 ; i < cg.numScores ; i++ ) {
|
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].client = atoi( CG_Argv( i * 14 + 4 ) );
|
||||||
cg.scores[i].score = atoi( CG_Argv( i * 14 + 5 ) );
|
cg.scores[i].score = atoi( CG_Argv( i * 14 + 5 ) );
|
||||||
cg.scores[i].ping = atoi( CG_Argv( i * 14 + 6 ) );
|
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 ) );
|
cg.scores[i].scoreFlags = atoi( CG_Argv( i * 14 + 8 ) );
|
||||||
powerups = atoi( CG_Argv( i * 14 + 9 ) );
|
powerups = atoi( CG_Argv( i * 14 + 9 ) );
|
||||||
cg.scores[i].accuracy = atoi(CG_Argv(i * 14 + 10));
|
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].impressiveCount = atoi(CG_Argv(i * 14 + 11));
|
||||||
cg.scores[i].excellentCount = atoi(CG_Argv(i * 14 + 12));
|
cg.scores[i].excellentCount = atoi(CG_Argv(i * 14 + 12));
|
||||||
cg.scores[i].guantletCount = atoi(CG_Argv(i * 14 + 13));
|
cg.scores[i].guantletCount = atoi(CG_Argv(i * 14 + 13));
|
||||||
|
|
|
@ -1596,6 +1596,11 @@ void CG_NextWeapon_f( void ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Elder: in the middle of firing, reloading or weapon-switching
|
||||||
|
if (cg.snap->ps.weaponTime > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Elder: added
|
//Elder: added
|
||||||
//cg.zoomed = qfalse;
|
//cg.zoomed = qfalse;
|
||||||
//cg.zoomLevel = 0;
|
//cg.zoomLevel = 0;
|
||||||
|
@ -1643,6 +1648,11 @@ void CG_PrevWeapon_f( void ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Elder: in the middle of firing, reloading or weapon-switching
|
||||||
|
if (cg.snap->ps.weaponTime > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Elder: added
|
//Elder: added
|
||||||
//cg.zoomed = qfalse;
|
//cg.zoomed = qfalse;
|
||||||
//cg.zoomLevel = 0;
|
//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)
|
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;
|
int i;
|
||||||
float r, u;
|
float r, u;
|
||||||
vec3_t end;
|
vec3_t end;
|
||||||
vec3_t forward, right, up;
|
vec3_t forward, right, up;
|
||||||
|
|
||||||
|
int count;
|
||||||
|
int hc_multipler;
|
||||||
|
|
||||||
// derive the right and up vectors from the forward vector, because
|
// derive the right and up vectors from the forward vector, because
|
||||||
// the client won't have any other information
|
// the client won't have any other information
|
||||||
VectorNormalize2( origin2, forward );
|
VectorNormalize2( origin2, forward );
|
||||||
|
@ -2335,16 +2348,34 @@ static void CG_ShotgunPattern( vec3_t origin, vec3_t origin2, int otherEntNum,qb
|
||||||
CrossProduct( forward, right, up );
|
CrossProduct( forward, right, up );
|
||||||
|
|
||||||
// generate the "random" spread pattern
|
// 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;
|
r = crandom() * DEFAULT_M3_HSPREAD * 16;
|
||||||
u = crandom() * DEFAULT_SHOTGUN_SPREAD * 16;
|
u = crandom() * DEFAULT_M3_VSPREAD * 16;
|
||||||
|
//r = crandom() * DEFAULT_SHOTGUN_SPREAD * 16;
|
||||||
|
//u = crandom() * DEFAULT_SHOTGUN_SPREAD * 16;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
r = crandom() * DEFAULT_HANDCANNON_SPREAD * 16 * 4;
|
r = crandom() * DEFAULT_SHOTGUN_HSPREAD * 16 * 4;
|
||||||
u = crandom() * DEFAULT_HANDCANNON_SPREAD * 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( origin, 8192 * 16, forward, end);
|
||||||
VectorMA (end, r, right, end);
|
VectorMA (end, r, right, end);
|
||||||
VectorMA (end, u, up, 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 );
|
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)
|
if (ism3)
|
||||||
{
|
{
|
||||||
CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum,ism3);
|
CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum, WP_M3);
|
||||||
}
|
}
|
||||||
else
|
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;
|
es->origin2[1] += 5;
|
||||||
CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum,ism3);
|
CG_ShotgunPattern( es->pos.trBase, es->origin2, es->otherEntityNum, -1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue