no message

This commit is contained in:
Scott Brooks 2001-06-11 06:12:32 +00:00
parent 4c5f58c8cf
commit bb22f48f4f
15 changed files with 289 additions and 120 deletions

View file

@ -326,7 +326,8 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
// reward sounds
reward = qfalse;
if (ps->persistant[PERS_CAPTURES] != ops->persistant[PERS_CAPTURES]) {
//Blaze: Removed because it uses the persistant stats stuff
/*if (ps->persistant[PERS_CAPTURES] != ops->persistant[PERS_CAPTURES]) {
pushReward(cgs.media.captureAwardSound, cgs.media.medalCapture, ps->persistant[PERS_CAPTURES]);
reward = qtrue;
//Com_Printf("capture\n");
@ -382,7 +383,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
pushReward(cgs.media.assistSound, cgs.media.medalAssist, ps->persistant[PERS_ASSIST_COUNT]);
reward = qtrue;
//Com_Printf("assist\n");
}
}*/
// if any of the player event bits changed
if (ps->persistant[PERS_PLAYEREVENTS] != ops->persistant[PERS_PLAYEREVENTS]) {
if ((ps->persistant[PERS_PLAYEREVENTS] & PLAYEREVENT_DENIEDREWARD) !=

View file

@ -1,6 +1,6 @@
mkdir vm
cd vm
set cc=call..\compile.bat
set cc=call ..\compile.bat
%cc% ../../game/bg_misc.c
@if errorlevel 1 goto quit

View file

@ -6,34 +6,13 @@
--------------------Configuration: cgame - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP768.tmp" with contents
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP3E1.tmp" with contents
[
/nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"Debug/" /Fp"Debug/cgame.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /c
"c:\reaction\game\bg_misc.c"
"c:\reaction\game\bg_pmove.c"
"c:\reaction\game\bg_slidemove.c"
"c:\reaction\cgame\cg_consolecmds.c"
"c:\reaction\cgame\cg_draw.c"
"c:\reaction\cgame\cg_drawtools.c"
"c:\reaction\cgame\cg_effects.c"
"c:\reaction\cgame\cg_ents.c"
"c:\reaction\cgame\cg_event.c"
"c:\reaction\cgame\cg_info.c"
"c:\reaction\cgame\cg_localents.c"
"c:\reaction\cgame\cg_main.c"
"c:\reaction\cgame\cg_marks.c"
"c:\reaction\cgame\cg_players.c"
"c:\reaction\cgame\cg_playerstate.c"
"c:\reaction\cgame\cg_predict.c"
"c:\reaction\cgame\cg_scoreboard.c"
"c:\reaction\cgame\cg_servercmds.c"
"c:\reaction\cgame\cg_snapshot.c"
"c:\reaction\cgame\cg_syscalls.c"
"c:\reaction\cgame\cg_view.c"
"c:\reaction\cgame\cg_weapons.c"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP768.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP769.tmp" with contents
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP3E1.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP3E2.tmp" with contents
[
/nologo /base:"0x30000000" /subsystem:windows /dll /incremental:yes /pdb:"Debug/cgamex86.pdb" /map:"Debug/cgamex86.map" /debug /machine:I386 /def:".\cgame.def" /out:"../Debug/cgamex86.dll" /implib:"Debug/cgamex86.lib"
.\Debug\bg_misc.obj
@ -62,32 +41,11 @@ Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP769.tmp" with con
.\Debug\q_shared.obj
.\Debug\ui_shared.obj
]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP769.tmp"
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP3E2.tmp"
<h3>Output Window</h3>
Compiling...
bg_misc.c
bg_pmove.c
bg_slidemove.c
cg_consolecmds.c
cg_draw.c
cg_drawtools.c
cg_effects.c
cg_ents.c
cg_event.c
c:\reaction\cgame\cg_event.c(768) : warning C4013: 'CG_rxn_zoom' undefined; assuming extern returning int
cg_info.c
cg_localents.c
cg_main.c
cg_marks.c
cg_players.c
cg_playerstate.c
cg_predict.c
cg_scoreboard.c
cg_servercmds.c
cg_snapshot.c
cg_syscalls.c
cg_view.c
cg_weapons.c
c:\reaction\cgame\cg_playerstate.c(288) : warning C4101: 'sfx' : unreferenced local variable
Linking...
LINK : LNK6004: ../Debug/cgamex86.dll not found or not built by the last incremental link; performing full link
Creating library Debug/cgamex86.lib and object Debug/cgamex86.exp

View file

@ -720,6 +720,126 @@ static void PM_GrappleMove( void ) {
pml.groundPlane = qfalse;
}
/*
===================================
PM_LimpMove
Movement while you have leg damage
===================================
*/
static void PM_LimpMove( void)
{
int i;
vec3_t wishvel;
float fmove, smove;
vec3_t wishdir;
float wishspeed;
float scale;
usercmd_t cmd;
float accelerate;
float vel;
if (pm->framecount % (6*12) == 0)
{
PM_Friction ();
fmove = pm->cmd.forwardmove;
smove = pm->cmd.rightmove;
cmd = pm->cmd;
scale = PM_CmdScale( &cmd );
// set the movementDir so clients can rotate the legs for strafing
PM_SetMovementDir();
// project moves down to flat plane
//Blaze: ram jump test
pml.forward[2] = 0;
pml.right[2] = 0;
// project the forward and right directions onto the ground plane
//Blaze: ramp jumping test
PM_ClipVelocity (pml.forward, pml.groundTrace.plane.normal, pml.forward, OVERCLIP );
PM_ClipVelocity (pml.right, pml.groundTrace.plane.normal, pml.right, OVERCLIP );
//
//Blaze: Ramp jump test
VectorNormalize (pml.forward);
VectorNormalize (pml.right);
for ( i = 0 ; i < 3 ; i++ ) {
wishvel[i] = pml.forward[i]*fmove + pml.right[i]*smove;
}
// when going up or down slopes the wish velocity should Not be zero
// wishvel[2] = 0;
VectorCopy (wishvel, wishdir);
wishspeed = VectorNormalize(wishdir);
wishspeed *= scale;
// clamp the speed lower if ducking
if ( pm->ps->pm_flags & PMF_DUCKED ) {
if ( wishspeed > pm->ps->speed * pm_duckScale ) {
wishspeed = pm->ps->speed * pm_duckScale;
}
}
// clamp the speed lower if wading or walking on the bottom
if ( pm->waterlevel ) {
float waterScale;
waterScale = pm->waterlevel / 3.0;
waterScale = 1.0 - ( 1.0 - pm_swimScale ) * waterScale;
if ( wishspeed > pm->ps->speed * waterScale ) {
wishspeed = pm->ps->speed * waterScale;
}
}
// when a player gets hit, they temporarily lose
// full control, which allows them to be moved a bit
if ( ( pml.groundTrace.surfaceFlags & SURF_SLICK ) || pm->ps->pm_flags & PMF_TIME_KNOCKBACK ) {
accelerate = pm_airaccelerate;
} else {
accelerate = pm_accelerate;
}
PM_Accelerate (wishdir, wishspeed, accelerate);
//Com_Printf("velocity = %1.1f %1.1f %1.1f\n", pm->ps->velocity[0], pm->ps->velocity[1], pm->ps->velocity[2]);
//Com_Printf("velocity1 = %1.1f\n", VectorLength(pm->ps->velocity));
if ( ( pml.groundTrace.surfaceFlags & SURF_SLICK ) || pm->ps->pm_flags & PMF_TIME_KNOCKBACK ) {
pm->ps->velocity[2] -= pm->ps->gravity * pml.frametime;
} else {
// don't reset the z velocity for slopes
// pm->ps->velocity[2] = 0;
}
vel = VectorLength(pm->ps->velocity);
// slide along the ground plane
//Blaze: ramp jump test
PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal,
pm->ps->velocity, OVERCLIP );
// don't decrease velocity when going up or down a slope
VectorNormalize(pm->ps->velocity);
VectorScale(pm->ps->velocity, vel, pm->ps->velocity);
// don't do anything if standing still
if (!pm->ps->velocity[0] && !pm->ps->velocity[1]) {
return;
}
PM_StepSlideMove( qfalse );
//gi.sound (ent, CHAN_BODY, gi.soundindex(va("*pain100_1.wav")), 1, ATTN_NORM, 0);
pm->ps->velocity[0] = (float)((int)(pm->ps->velocity[0]*8))/8;
pm->ps->velocity[1] = (float)((int)(pm->ps->velocity[1]*8))/8;
pm->ps->velocity[2] = (float)((int)(pm->ps->velocity[2]*8))/8;
}
}
/*
===================
@ -744,6 +864,12 @@ static void PM_WalkMove( void ) {
return;
}
if ( (pm->ps->stats[STAT_RQ3] & RQ3_LEGDAMAGE) == RQ3_LEGDAMAGE)
{
PM_LimpMove();
return;
}
if ( PM_CheckJump () ) {
// jumped away
@ -754,7 +880,7 @@ static void PM_WalkMove( void ) {
}
return;
}
PM_Friction ();
fmove = pm->cmd.forwardmove;
@ -843,7 +969,7 @@ static void PM_WalkMove( void ) {
if (!pm->ps->velocity[0] && !pm->ps->velocity[1]) {
return;
}
PM_StepSlideMove( qfalse );
//Com_Printf("velocity2 = %1.1f\n", VectorLength(pm->ps->velocity));
@ -1719,7 +1845,7 @@ static void PM_Weapon( void ) {
if ( pm->ps->ammo[ pm->ps->weapon ] != -1 ) {
//Blaze: Dont remove ammo for knife
//Elder: don't remove ammo if slashing knife
if ( !(pm->ps->weapon == WP_KNIFE && pm->ps->stats[STAT_KNIFE] == RQ3_KNIFE_SLASH) ) {
if ( !(pm->ps->weapon == WP_KNIFE && (pm->ps->persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE) == RQ3_KNIFEMODE) ) {
//G_Printf("Taking away ammo\n");
pm->ps->ammo[ pm->ps->weapon ]--;
}

View file

@ -292,8 +292,11 @@ typedef enum {
STAT_UNIQUEWEAPONS,
STAT_FALLDAMAGE,
STAT_BANDAGE, //Elder: holds bandage need
STAT_KNIFE, //Elder: knife throwing -- wasteful? then later rename STAT_RQ3 or something and use bits
STAT_RQ3, //Blaze: Will hold a few flags for bandage, etc info
// STAT_KNIFE, //Elder: knife throwing -- wasteful? then later rename STAT_RQ3 or something and use bits
} statIndex_t;
//STAT_RQ3 stat info
#define RQ3_LEGDAMAGE 1 //If this bit is set, the player has leg damage
// player_state->persistant[] indexes
@ -311,13 +314,23 @@ typedef enum {
PERS_ATTACKEE_ARMOR, // health/armor of last person we attacked
PERS_KILLED, // count of the number of times you died
// player awards tracking
/* Blaze: No need for these, may re-implement later if we want in a different form
PERS_IMPRESSIVE_COUNT, // two railgun hits in a row
PERS_EXCELLENT_COUNT, // two successive kills in a short amount of time
PERS_DEFEND_COUNT, // defend awards
PERS_ASSIST_COUNT, // assist awards
PERS_GAUNTLET_FRAG_COUNT, // kills with the guantlet
PERS_CAPTURES // captures
*/
PERS_WEAPONMODES // Blaze: Holds the different weapond modes for the different guns see below for the defines to use
} persEnum_t;
//RQ3 Weapon modes - If the bit is set, then the weapon is in the more restrictive mode, as in if it's set to 1 it's semi, 3rnd burst, etc
#define RQ3_MK23MODE 1 // Pistol modes
#define RQ3_MP5MODE 2 // MP5 Modes
#define RQ3_M4MODE 4 // M4 Modes
#define RQ3_KNIFEMODE 8 // Knife Modes
#define RQ3_GRENSHORT 16 // Short range grenade
#define RQ3_GRENMED 32 // Medium range grenade, if short and medium are both 1, then it is long range
// entityState_t->eFlags
#define EF_DEAD 0x00000001 // don't draw a foe marker over players with EF_DEAD

View file

@ -863,8 +863,8 @@ void ThrowWeapon( gentity_t *ent )
usercmd_t *ucmd;
gitem_t *xr_item;
gentity_t *xr_drop;
byte i;
int amount;
// byte i;
// int amount;
int weap;
client = ent->client;
@ -1013,9 +1013,10 @@ void ClientThink_real( gentity_t *ent ) {
client->ps.gravity = g_gravity.value;
// set speed
if(client->legDamage < g_speed.value)
//Blaze: Where did this come from
/* if(client->legDamage < g_speed.value)
client->ps.speed = g_speed.value - client->legDamage;
else
else*/
client->ps.speed = g_speed.value;
#ifdef MISSIONPACK

View file

@ -91,10 +91,11 @@ void UpdateTournamentInfo( void ) {
#else
perfect = ( level.clients[playerClientNum].ps.persistant[PERS_RANK] == 0 && player->client->ps.persistant[PERS_KILLED] == 0 ) ? 1 : 0;
Com_sprintf( msg, sizeof(msg), "postgame %i %i %i %i %i %i %i %i", level.numNonSpectatorClients, playerClientNum, accuracy,
//Blaze: Removed because it uses the persistant stats stuff
/* Com_sprintf( msg, sizeof(msg), "postgame %i %i %i %i %i %i %i %i", level.numNonSpectatorClients, playerClientNum, accuracy,
player->client->ps.persistant[PERS_IMPRESSIVE_COUNT], player->client->ps.persistant[PERS_EXCELLENT_COUNT],
player->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT], player->client->ps.persistant[PERS_SCORE],
perfect );
perfect );*/
#endif
}

View file

@ -1223,7 +1223,7 @@ void ClientSpawn(gentity_t *ent) {
client->zoomed=0;
//Elder: knife reset/initialize
client->ps.stats[STAT_KNIFE] = RQ3_KNIFE_SLASH;
client->ps.persistant[PERS_WEAPONMODES] &= !RQ3_KNIFEMODE;
//Elder: reset isBandaging flag
client->isBandaging = qfalse;

View file

@ -48,8 +48,8 @@ void DeathmatchScoreboardMessage( gentity_t *ent ) {
accuracy = 0;
}
perfect = ( cl->ps.persistant[PERS_RANK] == 0 && cl->ps.persistant[PERS_KILLED] == 0 ) ? 1 : 0;
Com_sprintf (entry, sizeof(entry),
//Blaze: Removed because it uses the persistant stats stuff
/* Com_sprintf (entry, sizeof(entry),
" %i %i %i %i %i %i %i %i %i %i %i %i %i %i", level.sortedClients[i],
cl->ps.persistant[PERS_SCORE], ping, (level.time - cl->pers.enterTime)/60000,
scoreFlags, g_entities[level.sortedClients[i]].s.powerups, accuracy,
@ -60,6 +60,7 @@ void DeathmatchScoreboardMessage( gentity_t *ent ) {
cl->ps.persistant[PERS_ASSIST_COUNT],
perfect,
cl->ps.persistant[PERS_CAPTURES]);
*/
j = strlen(entry);
if (stringlength + j > 1024)
break;
@ -274,23 +275,28 @@ void Cmd_Give_f (gentity_t *ent)
*/
if (Q_stricmp(name, "excellent") == 0) {
ent->client->ps.persistant[PERS_EXCELLENT_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//ent->client->ps.persistant[PERS_EXCELLENT_COUNT]++;
return;
}
if (Q_stricmp(name, "impressive") == 0) {
ent->client->ps.persistant[PERS_IMPRESSIVE_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//ent->client->ps.persistant[PERS_IMPRESSIVE_COUNT]++;
return;
}
if (Q_stricmp(name, "gauntletaward") == 0) {
ent->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//ent->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT]++;
return;
}
if (Q_stricmp(name, "defend") == 0) {
ent->client->ps.persistant[PERS_DEFEND_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//ent->client->ps.persistant[PERS_DEFEND_COUNT]++;
return;
}
if (Q_stricmp(name, "assist") == 0) {
ent->client->ps.persistant[PERS_ASSIST_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//ent->client->ps.persistant[PERS_ASSIST_COUNT]++;
return;
}
@ -1595,7 +1601,7 @@ void Cmd_Bandage (gentity_t *ent)
//Elder: can't use events
//G_AddEvent(ent,EV_ZOOM,0);
//}
if (ent->client->bleeding)
if (ent->client->bleeding || (ent->client->ps.stats[STAT_RQ3] & RQ3_LEGDAMAGE) == RQ3_LEGDAMAGE)
{
ent->client->ps.weaponstate = WEAPON_DROPPING;
ent->client->ps.torsoAnim = ( ( ent->client->ps.torsoAnim & ANIM_TOGGLEBIT )
@ -1605,6 +1611,7 @@ void Cmd_Bandage (gentity_t *ent)
ent->client->bleedtick = 4;
//Elder: added
ent->client->isBandaging = qtrue;
ent->client->ps.stats[STAT_RQ3] &= !RQ3_LEGDAMAGE;
}
else
{
@ -1875,39 +1882,55 @@ void Cmd_Weapon(gentity_t *ent)
break;
case WP_PISTOL:
// semiauto toggle (increase accuracy)
ent->client->mk23semi = !(ent->client->mk23semi);
if (ent->client->mk23semi)
trap_SendServerCommand( ent-g_entities, va("print \"Switched to semi-automatic.\n\""));
else
if ((ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_MK23MODE) == RQ3_MK23MODE)
{
ent->client->ps.persistant[PERS_WEAPONMODES] &= !RQ3_MK23MODE;
trap_SendServerCommand( ent-g_entities, va("print \"Switched to full automatic.\n\""));
}
else
{
ent->client->ps.persistant[PERS_WEAPONMODES] |= RQ3_MK23MODE;
trap_SendServerCommand( ent-g_entities, va("print \"Switched to semi-automatic.\n\""));
}
break;
case WP_M4:
// 3rb/full auto toggle
ent->client->m4_3rb = !(ent->client->m4_3rb);
if (ent->client->m4_3rb)
trap_SendServerCommand( ent-g_entities, va("print \"Switched to 3 round burst.\n\""));
else
if ((ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_M4MODE) == RQ3_M4MODE)
{
ent->client->ps.persistant[PERS_WEAPONMODES] &= !RQ3_M4MODE;
trap_SendServerCommand( ent-g_entities, va("print \"Switched to full automatic.\n\""));
}
else
{
ent->client->ps.persistant[PERS_WEAPONMODES] |= RQ3_M4MODE;
trap_SendServerCommand( ent-g_entities, va("print \"Switched to 3 round burst.\n\""));
}
break;
case WP_MP5:
// 3rb/full auto toggle
ent->client->mp5_3rb = !(ent->client->mp5_3rb);
if (ent->client->mp5_3rb)
trap_SendServerCommand( ent-g_entities, va("print \"Switched to 3 round burst.\n\""));
else
if ((ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_MP5MODE) == RQ3_MP5MODE)
{
ent->client->ps.persistant[PERS_WEAPONMODES] &= !RQ3_MP5MODE;
trap_SendServerCommand( ent-g_entities, va("print \"Switched to full automatic.\n\""));
}
else
{
ent->client->ps.persistant[PERS_WEAPONMODES] |= RQ3_MP5MODE;
trap_SendServerCommand( ent-g_entities, va("print \"Switched to 3 round burst.\n\""));
}
break;
case WP_KNIFE:
// toggle throwing/slashing
ent->client->throwKnife = !(ent->client->throwKnife);
if (ent->client->throwKnife) {
if ((ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE) == RQ3_KNIFEMODE)
{
//Elder: added
ent->client->ps.stats[STAT_KNIFE] = RQ3_KNIFE_THROW;
ent->client->ps.persistant[PERS_WEAPONMODES] &= !RQ3_KNIFEMODE;
trap_SendServerCommand( ent-g_entities, va("print \"Switched to throwing.\n\""));
}
else {
else
{
//Elder: we're gonna use this to flag throw or slash with the knife
ent->client->ps.stats[STAT_KNIFE] = RQ3_KNIFE_SLASH;
ent->client->ps.persistant[PERS_WEAPONMODES] |= RQ3_KNIFEMODE;
trap_SendServerCommand( ent-g_entities, va("print \"Switched to slashing.\n\""));
}
break;
@ -1922,15 +1945,25 @@ void Cmd_Weapon(gentity_t *ent)
break;
case WP_GRENADE:
// short, medium, long throws
ent->client->grenRange++;
if ( ent->client->grenRange > 2 )
ent->client->grenRange = 0;
if ( ent->client->grenRange == 0 )
if (ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_GRENSHORT == RQ3_GRENSHORT && ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_GRENMED == RQ3_GRENMED)
{//Going into Short
ent->client->ps.persistant[PERS_WEAPONMODES] |= RQ3_GRENSHORT; //Set the short flag
ent->client->ps.persistant[PERS_WEAPONMODES] |= !RQ3_GRENMED; //unset the med flag
trap_SendServerCommand( ent-g_entities, va("print \"Grenade set for short range throw.\n\""));
else if (ent->client->grenRange == 1)
}
else if (ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_GRENSHORT == RQ3_GRENSHORT)
{//Going into Med
ent->client->ps.persistant[PERS_WEAPONMODES] |= !RQ3_GRENSHORT; //unset the short flag
ent->client->ps.persistant[PERS_WEAPONMODES] |= RQ3_GRENMED; //Set the med flag
trap_SendServerCommand( ent-g_entities, va("print \"Grenade set for medium range throw.\n\""));
else
}
else if (ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_GRENMED == RQ3_GRENMED)
{//Going into Long
ent->client->ps.persistant[PERS_WEAPONMODES] |= RQ3_GRENSHORT; //Set the short flag
ent->client->ps.persistant[PERS_WEAPONMODES] |= RQ3_GRENMED; //Set the med flag
trap_SendServerCommand( ent-g_entities, va("print \"Grenade set for long range throw.\n\""));
}
break;
default:
break;

View file

@ -575,7 +575,8 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
if( meansOfDeath == MOD_GAUNTLET ) {
// play humiliation on player
attacker->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//attacker->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT]++;
// add the sprite over the player's head
attacker->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
@ -583,6 +584,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
attacker->client->rewardTime = level.time + REWARD_SPRITE_TIME;
// also play humiliation on target
self->client->ps.persistant[PERS_PLAYEREVENTS] ^= PLAYEREVENT_GAUNTLETREWARD;
}
@ -590,7 +592,8 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
// if this is close enough to the last kill, give a reward sound
if ( level.time - attacker->client->lastKillTime < CARNAGE_REWARD_TIME ) {
// play excellent on player
attacker->client->ps.persistant[PERS_EXCELLENT_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//attacker->client->ps.persistant[PERS_EXCELLENT_COUNT]++;
// add the sprite over the player's head
attacker->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
@ -1252,7 +1255,8 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
damage *= 0.5;
}
*/
//Blaze: Add falling damage for limping
if ( mod == MOD_FALLING ) targ->client->ps.stats[STAT_RQ3] |= RQ3_LEGDAMAGE;
// add to the attacker's hit counter (if the target isn't a general entity like a prox mine)
if ( attacker->client && targ != attacker && targ->health > 0
&& targ->s.eType != ET_MISSILE
@ -1468,12 +1472,14 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
trap_SendServerCommand( attacker-g_entities, va("print \"You hit %s^7 in the leg.\n\"", targ->client->pers.netname));
trap_SendServerCommand( targ-g_entities, va("print \"Leg Damage.\n\""));
take *= 0.25;
targ->client->ps.stats[STAT_RQ3] |= RQ3_LEGDAMAGE;
break;
}
case (LOCATION_FOOT):
{
trap_SendServerCommand( attacker-g_entities, va("print \"You hit %s^7 in the leg.\n\"", targ->client->pers.netname));
trap_SendServerCommand( targ-g_entities, va("print \"Leg Damage.\n\""));
targ->client->ps.stats[STAT_RQ3] |= RQ3_LEGDAMAGE;
take *= 0.25;
break;
}

View file

@ -331,7 +331,7 @@ struct gclient_s {
vec3_t bleedloc_offset; // Blaze: location of bleeding (from origin)
vec3_t bleednorm;
//qboolean isBleeding; //Blaze: is client bleeding
int legDamage; //Blaze: Client has leg damage - holds number of hits too
// int legDamage; //Blaze: Client has leg damage - holds number of hits too
int bleedtick; //Blaze: Holds # of seconds till bleeding stops.
//Elder: server only needs to know for sniper spread - ARGH
@ -341,11 +341,13 @@ struct gclient_s {
// Homer: weaponstate vars for Cmd_Weapon
// make these a single bitmask? worth the effort?
int mk23semi; // pistol to semi-auto
// Moved to PERS_WEAPONMODES in bg_public.h
/* int mk23semi; // pistol to semi-auto
int mp5_3rb; // MP5 to 3rb
int m4_3rb; // M4 to 3rb
int grenRange; // range to throw grenade (short/medium/long)
int throwKnife; // knife to throwing
*/
qboolean isBandaging; //Elder: player in the process of bandaging
// end Homer

View file

@ -332,7 +332,7 @@ Fires at either the target or the current direction.
3 - tons (watch out when using this)
*/
void SP_func_breakable( gentity_t *ent ) {
int amount;
int amount=0;
int health;
int debris;
int temp;
@ -350,7 +350,7 @@ void SP_func_breakable( gentity_t *ent ) {
if (temp < 0 || temp > 3)
debris = RQ3_DEBRIS_GLASS;
else
debris = (1 << temp + 4);
debris = (1 << (temp + 4));
G_SpawnInt( "amount", "0", &temp );
if (temp < 0 || temp > 3)

View file

@ -343,7 +343,8 @@ void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker
attacker->client->pers.teamState.carrierdefense++;
targ->client->pers.teamState.lasthurtcarrier = 0;
attacker->client->ps.persistant[PERS_DEFEND_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//attacker->client->ps.persistant[PERS_DEFEND_COUNT]++;
team = attacker->client->sess.sessionTeam;
// add the sprite over the player's head
attacker->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
@ -361,7 +362,8 @@ void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker
attacker->client->pers.teamState.carrierdefense++;
targ->client->pers.teamState.lasthurtcarrier = 0;
attacker->client->ps.persistant[PERS_DEFEND_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//attacker->client->ps.persistant[PERS_DEFEND_COUNT]++;
team = attacker->client->sess.sessionTeam;
// add the sprite over the player's head
attacker->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
@ -440,7 +442,8 @@ void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker
AddScore(attacker, targ->r.currentOrigin, CTF_FLAG_DEFENSE_BONUS);
attacker->client->pers.teamState.basedefense++;
attacker->client->ps.persistant[PERS_DEFEND_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//attacker->client->ps.persistant[PERS_DEFEND_COUNT]++;
// add the sprite over the player's head
attacker->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
attacker->client->ps.eFlags |= EF_AWARD_DEFEND;
@ -461,7 +464,8 @@ void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker
AddScore(attacker, targ->r.currentOrigin, CTF_CARRIER_PROTECT_BONUS);
attacker->client->pers.teamState.carrierdefense++;
attacker->client->ps.persistant[PERS_DEFEND_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//attacker->client->ps.persistant[PERS_DEFEND_COUNT]++;
// add the sprite over the player's head
attacker->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
attacker->client->ps.eFlags |= EF_AWARD_DEFEND;
@ -739,7 +743,8 @@ int Team_TouchOurFlag( gentity_t *ent, gentity_t *other, int team ) {
other->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
other->client->ps.eFlags |= EF_AWARD_CAP;
other->client->rewardTime = level.time + REWARD_SPRITE_TIME;
other->client->ps.persistant[PERS_CAPTURES]++;
//Blaze: Removed because it uses the persistant stats stuff
//other->client->ps.persistant[PERS_CAPTURES]++;
// other gets another 10 frag bonus
AddScore(other, ent->r.currentOrigin, CTF_CAPTURE_BONUS);
@ -765,7 +770,8 @@ int Team_TouchOurFlag( gentity_t *ent, gentity_t *other, int team ) {
AddScore (player, ent->r.currentOrigin, CTF_RETURN_FLAG_ASSIST_BONUS);
other->client->pers.teamState.assists++;
player->client->ps.persistant[PERS_ASSIST_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//player->client->ps.persistant[PERS_ASSIST_COUNT]++;
// add the sprite over the player's head
player->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
player->client->ps.eFlags |= EF_AWARD_ASSIST;
@ -776,7 +782,8 @@ int Team_TouchOurFlag( gentity_t *ent, gentity_t *other, int team ) {
CTF_FRAG_CARRIER_ASSIST_TIMEOUT > level.time) {
AddScore(player, ent->r.currentOrigin, CTF_FRAG_CARRIER_ASSIST_BONUS);
other->client->pers.teamState.assists++;
player->client->ps.persistant[PERS_ASSIST_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//player->client->ps.persistant[PERS_ASSIST_COUNT]++;
// add the sprite over the player's head
player->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
player->client->ps.eFlags |= EF_AWARD_ASSIST;

View file

@ -577,7 +577,9 @@ void weapon_railgun_fire (gentity_t *ent) {
ent->client->accurateCount += hits;
if ( ent->client->accurateCount >= 2 ) {
ent->client->accurateCount -= 2;
ent->client->ps.persistant[PERS_IMPRESSIVE_COUNT]++;
//Blaze: Removed because it uses the persistant stats stuff
//ent->client->ps.persistant[PERS_IMPRESSIVE_COUNT]++;
// add the sprite over the player's head
ent->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
ent->client->ps.eFlags |= EF_AWARD_IMPRESSIVE;
@ -947,15 +949,15 @@ void Weapon_Knife_Fire(gentity_t *ent)
gentity_t *m;
// Homer: if client is supposed to be slashing, go to that function instead
if ( !ent->client->throwKnife ) {
if ( (ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_KNIFEMODE) == RQ3_KNIFEMODE ) {
//Elder: added
ent->client->ps.stats[STAT_KNIFE] = RQ3_KNIFE_SLASH;
//ent->client->ps.stats[STAT_KNIFE] = RQ3_KNIFE_SLASH;
Knife_Attack(ent,SLASH_DAMAGE);
return;
}
//Elder: added
ent->client->ps.stats[STAT_KNIFE] = RQ3_KNIFE_THROW;
// ent->client->ps.stats[STAT_KNIFE] = RQ3_KNIFE_THROW;
// extra vertical velocity
forward[2] += 0.2f;
@ -979,9 +981,15 @@ void Weapon_M4_Fire(gentity_t *ent)
{
float spread;
// Homer: increment burst if needed
if ( ent->client->m4_3rb )
if ( (ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_M4MODE) == RQ3_M4MODE )
{
ent->client->ps.stats[STAT_BURST]++;
spread = (ent->client->m4_3rb? M4_SPREAD*.7 : M4_SPREAD);
spread = M4_SPREAD * 0.7;
}
else
{
spread = M4_SPREAD;
}
Bullet_Fire( ent, RQ3Spread(ent, M4_SPREAD), M4_DAMAGE, MOD_M4);
}
@ -995,9 +1003,15 @@ void Weapon_MK23_Fire(gentity_t *ent)
{
float spread;
// Homer: increment burst if needed
if ( ent->client->mk23semi )
if ( (ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_MK23MODE) == RQ3_MK23MODE )
{
spread = PISTOL_SPREAD * 0.7;
ent->client->ps.stats[STAT_BURST]++;
spread = (ent->client->mk23semi? PISTOL_SPREAD*.7 : PISTOL_SPREAD);
}
else
{
spread = PISTOL_SPREAD;
}
Bullet_Fire( ent, RQ3Spread(ent, spread), PISTOL_DAMAGE, MOD_PISTOL);
}
@ -1024,9 +1038,16 @@ void Weapon_MP5_Fire(gentity_t *ent)
{
float spread;
// Homer: increment burst if needed
if ( ent->client->mp5_3rb )
if ( (ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_MP5MODE) == RQ3_MP5MODE )
{
spread = MP5_SPREAD * 0.7;
ent->client->ps.stats[STAT_BURST]++;
spread = (ent->client->mp5_3rb? MP5_SPREAD*.7 : MP5_SPREAD);
}
else
{
spread = MP5_SPREAD;
}
Bullet_Fire( ent, RQ3Spread(ent, MP5_SPREAD), MP5_DAMAGE, MOD_MP5);
}

View file

@ -6,13 +6,13 @@
--------------------Configuration: game - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP798.tmp" with contents
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP44F.tmp" with contents
[
/nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "BUILDING_REF_GL" /D "DEBUG" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c
"c:\reaction\game\bg_pmove.c"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP798.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP799.tmp" with contents
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP44F.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP450.tmp" with contents
[
kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:yes /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /debug /machine:I386 /def:".\game.def" /out:"..\Debug/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib"
\reactionoutput\ai_chat.obj
@ -51,7 +51,7 @@ kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows
\reactionoutput\q_shared.obj
\reactionoutput\rxn_game.obj
]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP799.tmp"
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP450.tmp"
<h3>Output Window</h3>
Compiling...
bg_pmove.c