mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2025-01-18 15:42:14 +00:00
- fixed (hopefully) railgun bug
- added medal for telefrag
This commit is contained in:
parent
97c4bd4295
commit
aa25dbacbc
12 changed files with 118 additions and 259 deletions
|
@ -582,8 +582,8 @@ typedef struct {
|
|||
} skulltrail_t;
|
||||
|
||||
|
||||
#define MAX_REWARDSTACK 10
|
||||
#define MAX_SOUNDBUFFER 20
|
||||
#define MAX_REWARDSTACK 15
|
||||
#define MAX_SOUNDBUFFER 25
|
||||
|
||||
//======================================================================
|
||||
|
||||
|
@ -662,10 +662,8 @@ typedef struct {
|
|||
|
||||
// view rendering
|
||||
refdef_t refdef;
|
||||
// Q3Rally Code Start
|
||||
refdef_t mirrorRefdef;
|
||||
refdef_t mmapRefdef; //TBB minimap rendering
|
||||
// Q3Rally Code END
|
||||
refdef_t mmapRefdef; // minimap rendering
|
||||
vec3_t refdefViewAngles; // will be converted to refdef.viewaxis
|
||||
|
||||
// zoom key
|
||||
|
@ -680,11 +678,8 @@ typedef struct {
|
|||
int scoresRequestTime;
|
||||
int numScores;
|
||||
int selectedScore;
|
||||
// Q3Rally Code Start
|
||||
// int teamScores[2];
|
||||
int teamScores[4];
|
||||
int teamTimes[4];
|
||||
// Q3Rally Code END
|
||||
score_t scores[MAX_CLIENTS];
|
||||
qboolean showScores;
|
||||
qboolean scoreBoardShowing;
|
||||
|
@ -699,11 +694,6 @@ typedef struct {
|
|||
int spectatorOffset; // current offset from start
|
||||
int spectatorPaintLen; // current offset from start
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
// skull trails
|
||||
skulltrail_t skulltrails[MAX_CLIENTS];
|
||||
#endif
|
||||
|
||||
// centerprinting
|
||||
int centerPrintTime;
|
||||
int centerPrintCharWidth;
|
||||
|
@ -711,10 +701,8 @@ typedef struct {
|
|||
char centerPrint[1024];
|
||||
int centerPrintLines;
|
||||
|
||||
// Q3Rally Code Start
|
||||
char countDownPrint[16];
|
||||
int countDownEnd;
|
||||
// Q3Rally Code END
|
||||
|
||||
// low ammo warning state
|
||||
int lowAmmoWarning; // 1 = low, 2 = empty
|
||||
|
@ -744,13 +732,6 @@ typedef struct {
|
|||
int soundTime;
|
||||
qhandle_t soundBuffer[MAX_SOUNDBUFFER];
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
// for voice chat buffer
|
||||
int voiceChatTime;
|
||||
int voiceChatBufferIn;
|
||||
int voiceChatBufferOut;
|
||||
#endif
|
||||
|
||||
// warmup countdown
|
||||
int warmup;
|
||||
int warmupCount;
|
||||
|
@ -796,22 +777,14 @@ typedef struct {
|
|||
refEntity_t testModelEntity;
|
||||
char testModelName[MAX_QPATH];
|
||||
qboolean testGun;
|
||||
|
||||
// Q3Rally Code Start
|
||||
int wrongWayTime;
|
||||
int wrongWayStartTime;
|
||||
|
||||
car_t car;
|
||||
int pDebug;
|
||||
|
||||
qboolean showHUD;
|
||||
|
||||
qboolean newSnap;
|
||||
|
||||
// int lastPhysicsCommand;
|
||||
|
||||
int currentBezierPoint;
|
||||
// Q3Rally Code END
|
||||
} cg_t;
|
||||
|
||||
|
||||
|
@ -825,17 +798,9 @@ typedef struct {
|
|||
qhandle_t charsetPropGlow;
|
||||
qhandle_t charsetPropB;
|
||||
qhandle_t whiteShader;
|
||||
// Q3Rally Code Start
|
||||
qhandle_t flameBallShader;
|
||||
qhandle_t flameExplosionShader;
|
||||
// Q3Rally Code END
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
qhandle_t redCubeModel;
|
||||
qhandle_t blueCubeModel;
|
||||
qhandle_t redCubeIcon;
|
||||
qhandle_t blueCubeIcon;
|
||||
#endif
|
||||
qhandle_t redFlagModel;
|
||||
qhandle_t blueFlagModel;
|
||||
qhandle_t greenFlagModel;
|
||||
|
@ -851,13 +816,11 @@ typedef struct {
|
|||
qhandle_t greenFlagShader[3];
|
||||
qhandle_t yellowFlagShader[3];
|
||||
qhandle_t flagShader[4];
|
||||
// Q3Rally Code Start
|
||||
qhandle_t sigilShader;
|
||||
qhandle_t redsigilShader;
|
||||
qhandle_t bluesigilShader;
|
||||
qhandle_t greensigilShader;
|
||||
qhandle_t yellowsigilShader;
|
||||
// Q3Rally Code END
|
||||
qhandle_t flagPoleModel;
|
||||
qhandle_t flagFlapModel;
|
||||
|
||||
|
@ -869,18 +832,6 @@ typedef struct {
|
|||
qhandle_t blueFlagBaseModel;
|
||||
qhandle_t neutralFlagBaseModel;
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
qhandle_t overloadBaseModel;
|
||||
qhandle_t overloadTargetModel;
|
||||
qhandle_t overloadLightsModel;
|
||||
qhandle_t overloadEnergyModel;
|
||||
|
||||
qhandle_t harvesterModel;
|
||||
qhandle_t harvesterRedSkin;
|
||||
qhandle_t harvesterBlueSkin;
|
||||
qhandle_t harvesterNeutralModel;
|
||||
#endif
|
||||
|
||||
qhandle_t armorModel;
|
||||
qhandle_t armorIcon;
|
||||
|
||||
|
@ -889,7 +840,7 @@ typedef struct {
|
|||
qhandle_t deferShader;
|
||||
|
||||
// gib explosions
|
||||
// Q3Rally Code Start - car gibs
|
||||
|
||||
qhandle_t gibFan;
|
||||
qhandle_t gibHose1;
|
||||
qhandle_t gibHose2;
|
||||
|
@ -959,8 +910,7 @@ typedef struct {
|
|||
qhandle_t debrisstone3;
|
||||
qhandle_t debrisstone4;
|
||||
qhandle_t debrisstone5;
|
||||
|
||||
// Q3Rally Code END
|
||||
|
||||
|
||||
qhandle_t smoke2;
|
||||
|
||||
|
@ -991,7 +941,6 @@ typedef struct {
|
|||
qhandle_t plasmaBallShader;
|
||||
qhandle_t waterBubbleShader;
|
||||
qhandle_t bloodTrailShader;
|
||||
// Q3Rally Code Start
|
||||
qhandle_t glass01;
|
||||
qhandle_t glass02;
|
||||
qhandle_t glass03;
|
||||
|
@ -1003,12 +952,7 @@ typedef struct {
|
|||
qhandle_t metal01;
|
||||
qhandle_t metal02;
|
||||
qhandle_t metal03;
|
||||
// Q3Rally Code END
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
qhandle_t nailPuffShader;
|
||||
qhandle_t blueProxMine;
|
||||
#endif
|
||||
|
||||
qhandle_t numberShaders[11];
|
||||
|
||||
|
@ -1020,11 +964,9 @@ typedef struct {
|
|||
qhandle_t wakeMarkShader;
|
||||
qhandle_t bloodMarkShader;
|
||||
qhandle_t bulletMarkShader;
|
||||
// Q3Rally Code Start
|
||||
qhandle_t bioMarkShader;
|
||||
qhandle_t oilMarkShader;
|
||||
qhandle_t sparkShader;
|
||||
// Q3Rally Code END
|
||||
qhandle_t burnMarkShader;
|
||||
qhandle_t holeMarkShader;
|
||||
qhandle_t energyMarkShader;
|
||||
|
@ -1036,32 +978,22 @@ typedef struct {
|
|||
qhandle_t invisShader;
|
||||
qhandle_t regenShader;
|
||||
qhandle_t battleSuitShader;
|
||||
// Q3Rally Code Start
|
||||
qhandle_t hasteShader;
|
||||
qhandle_t shieldShader;
|
||||
// Q3Rally Code END
|
||||
|
||||
|
||||
qhandle_t battleWeaponShader;
|
||||
qhandle_t hastePuffShader;
|
||||
#ifdef MISSIONPACK
|
||||
qhandle_t redKamikazeShader;
|
||||
qhandle_t blueKamikazeShader;
|
||||
#endif
|
||||
|
||||
// Q3Rally Code Start
|
||||
qhandle_t SMAsphaltShader;
|
||||
qhandle_t SMDirtShader;
|
||||
qhandle_t SMGrassShader;
|
||||
qhandle_t SMFleshShader;
|
||||
|
||||
qhandle_t checkpointArrow;
|
||||
// Q3Rally Code END
|
||||
|
||||
|
||||
// weapon effect models
|
||||
// Q3Rally Code Start
|
||||
qhandle_t fireModel;
|
||||
// Q3Rally Code END
|
||||
|
||||
qhandle_t fireModel;
|
||||
qhandle_t bulletFlashModel;
|
||||
qhandle_t ringFlashModel;
|
||||
qhandle_t dishFlashModel;
|
||||
|
@ -1081,27 +1013,6 @@ typedef struct {
|
|||
qhandle_t teleportEffectShader;
|
||||
qhandle_t dustPuffShader;
|
||||
qhandle_t snowPuffShader;
|
||||
#ifdef MISSIONPACK
|
||||
qhandle_t kamikazeEffectModel;
|
||||
qhandle_t kamikazeShockWave;
|
||||
qhandle_t kamikazeHeadModel;
|
||||
qhandle_t kamikazeHeadTrail;
|
||||
qhandle_t guardPowerupModel;
|
||||
qhandle_t scoutPowerupModel;
|
||||
qhandle_t doublerPowerupModel;
|
||||
qhandle_t ammoRegenPowerupModel;
|
||||
qhandle_t invulnerabilityImpactModel;
|
||||
qhandle_t invulnerabilityJuicedModel;
|
||||
qhandle_t medkitUsageModel;
|
||||
qhandle_t dustPuffShader;
|
||||
qhandle_t snowPuffShader;
|
||||
qhandle_t heartShader;
|
||||
qhandle_t invulnerabilityPowerupModel;
|
||||
// Q3Rally Code Start
|
||||
#endif
|
||||
|
||||
//#endif
|
||||
// Q3Rally Code END
|
||||
|
||||
|
||||
// scoreboard headers
|
||||
|
@ -1112,24 +1023,18 @@ typedef struct {
|
|||
|
||||
// medals shown during gameplay
|
||||
qhandle_t medalImpressive;
|
||||
qhandle_t medalImpressiveTelefrag;
|
||||
qhandle_t medalExcellent;
|
||||
qhandle_t medalGauntlet;
|
||||
qhandle_t medalDefend;
|
||||
qhandle_t medalAssist;
|
||||
qhandle_t medalCapture;
|
||||
|
||||
// Q3Rally Code Start
|
||||
qhandle_t headLightGlow;
|
||||
qhandle_t brakeLightGlow;
|
||||
qhandle_t reverseLightGlow;
|
||||
|
||||
qhandle_t rearviewMirrorShader;
|
||||
//TBB - minimap handling
|
||||
qhandle_t MMapShader;
|
||||
//TBB FIN
|
||||
qhandle_t turboModel;
|
||||
|
||||
// Q3Rally Code END
|
||||
|
||||
// sounds
|
||||
sfxHandle_t quadSound;
|
||||
|
@ -1137,44 +1042,17 @@ typedef struct {
|
|||
sfxHandle_t selectSound;
|
||||
sfxHandle_t useNothingSound;
|
||||
sfxHandle_t wearOffSound;
|
||||
// Q3Rally Code Start
|
||||
sfxHandle_t turboSound;
|
||||
sfxHandle_t shieldSound;
|
||||
// sfxHandle_t footsteps[FOOTSTEP_TOTAL][4];
|
||||
// Q3Rally Code END
|
||||
sfxHandle_t sfx_lghit1;
|
||||
sfxHandle_t sfx_lghit2;
|
||||
sfxHandle_t sfx_lghit3;
|
||||
sfxHandle_t sfx_ric1;
|
||||
sfxHandle_t sfx_ric2;
|
||||
sfxHandle_t sfx_ric3;
|
||||
//sfxHandle_t sfx_railg;
|
||||
sfxHandle_t sfx_rockexp;
|
||||
sfxHandle_t sfx_plasmaexp;
|
||||
sfxHandle_t sfx_flameexp;
|
||||
#ifdef MISSIONPACK
|
||||
sfxHandle_t sfx_proxexp;
|
||||
sfxHandle_t sfx_nghit;
|
||||
sfxHandle_t sfx_nghitflesh;
|
||||
sfxHandle_t sfx_nghitmetal;
|
||||
sfxHandle_t sfx_chghit;
|
||||
sfxHandle_t sfx_chghitflesh;
|
||||
sfxHandle_t sfx_chghitmetal;
|
||||
sfxHandle_t kamikazeExplodeSound;
|
||||
sfxHandle_t kamikazeImplodeSound;
|
||||
sfxHandle_t kamikazeFarSound;
|
||||
sfxHandle_t useInvulnerabilitySound;
|
||||
sfxHandle_t invulnerabilityImpactSound1;
|
||||
sfxHandle_t invulnerabilityImpactSound2;
|
||||
sfxHandle_t invulnerabilityImpactSound3;
|
||||
sfxHandle_t invulnerabilityJuicedSound;
|
||||
sfxHandle_t obeliskHitSound1;
|
||||
sfxHandle_t obeliskHitSound2;
|
||||
sfxHandle_t obeliskHitSound3;
|
||||
sfxHandle_t obeliskRespawnSound;
|
||||
sfxHandle_t winnerSound;
|
||||
sfxHandle_t loserSound;
|
||||
#endif
|
||||
sfxHandle_t gibSound;
|
||||
sfxHandle_t gibBounce1Sound;
|
||||
sfxHandle_t gibBounce2Sound;
|
||||
|
@ -1201,6 +1079,7 @@ typedef struct {
|
|||
sfxHandle_t hitSoundLowArmor;
|
||||
sfxHandle_t hitTeamSound;
|
||||
sfxHandle_t impressiveSound;
|
||||
sfxHandle_t impressiveTelefragSound;
|
||||
sfxHandle_t excellentSound;
|
||||
sfxHandle_t deniedSound;
|
||||
sfxHandle_t humiliationSound;
|
||||
|
@ -1225,10 +1104,6 @@ typedef struct {
|
|||
sfxHandle_t flightSound;
|
||||
sfxHandle_t medkitSound;
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
sfxHandle_t weaponHoverSound;
|
||||
#endif
|
||||
|
||||
// teamplay sounds
|
||||
sfxHandle_t captureAwardSound;
|
||||
sfxHandle_t redScoredSound;
|
||||
|
|
|
@ -774,23 +774,6 @@ static void CG_RegisterSounds( void ) {
|
|||
cgs.media.gibBounce2Sound = trap_S_RegisterSound( "sound/player/gibimp2.wav", qfalse );
|
||||
cgs.media.gibBounce3Sound = trap_S_RegisterSound( "sound/player/gibimp3.wav", qfalse );
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
cgs.media.useInvulnerabilitySound = trap_S_RegisterSound( "sound/items/invul_activate.wav", qfalse );
|
||||
cgs.media.invulnerabilityImpactSound1 = trap_S_RegisterSound( "sound/items/invul_impact_01.wav", qfalse );
|
||||
cgs.media.invulnerabilityImpactSound2 = trap_S_RegisterSound( "sound/items/invul_impact_02.wav", qfalse );
|
||||
cgs.media.invulnerabilityImpactSound3 = trap_S_RegisterSound( "sound/items/invul_impact_03.wav", qfalse );
|
||||
cgs.media.invulnerabilityJuicedSound = trap_S_RegisterSound( "sound/items/invul_juiced.wav", qfalse );
|
||||
cgs.media.obeliskHitSound1 = trap_S_RegisterSound( "sound/items/obelisk_hit_01.wav", qfalse );
|
||||
cgs.media.obeliskHitSound2 = trap_S_RegisterSound( "sound/items/obelisk_hit_02.wav", qfalse );
|
||||
cgs.media.obeliskHitSound3 = trap_S_RegisterSound( "sound/items/obelisk_hit_03.wav", qfalse );
|
||||
cgs.media.obeliskRespawnSound = trap_S_RegisterSound( "sound/items/obelisk_respawn.wav", qfalse );
|
||||
|
||||
cgs.media.ammoregenSound = trap_S_RegisterSound("sound/items/cl_ammoregen.wav", qfalse);
|
||||
cgs.media.doublerSound = trap_S_RegisterSound("sound/items/cl_doubler.wav", qfalse);
|
||||
cgs.media.guardSound = trap_S_RegisterSound("sound/items/cl_guard.wav", qfalse);
|
||||
cgs.media.scoutSound = trap_S_RegisterSound("sound/items/cl_scout.wav", qfalse);
|
||||
#endif
|
||||
|
||||
cgs.media.teleInSound = trap_S_RegisterSound( "sound/world/telein.wav", qfalse );
|
||||
cgs.media.teleOutSound = trap_S_RegisterSound( "sound/world/teleout.wav", qfalse );
|
||||
cgs.media.respawnSound = trap_S_RegisterSound( "sound/items/respawn1.wav", qfalse );
|
||||
|
@ -801,33 +784,19 @@ static void CG_RegisterSounds( void ) {
|
|||
cgs.media.landSound = trap_S_RegisterSound( "sound/player/land1.wav", qfalse);
|
||||
|
||||
cgs.media.hitSound = trap_S_RegisterSound( "sound/feedback/hit.wav", qfalse );
|
||||
#ifdef MISSIONPACK
|
||||
cgs.media.hitSoundHighArmor = trap_S_RegisterSound( "sound/feedback/hithi.wav", qfalse );
|
||||
cgs.media.hitSoundLowArmor = trap_S_RegisterSound( "sound/feedback/hitlo.wav", qfalse );
|
||||
#endif
|
||||
|
||||
cgs.media.impressiveSound = trap_S_RegisterSound( "sound/feedback/impressive.wav", qtrue );
|
||||
cgs.media.impressiveSound = trap_S_RegisterSound( "sound/feedback/impressive.ogg", qtrue );
|
||||
cgs.media.impressiveTelefragSound = trap_S_RegisterSound( "sound/feedback/telefragged.ogg", qtrue );
|
||||
cgs.media.excellentSound = trap_S_RegisterSound( "sound/feedback/excellent.wav", qtrue );
|
||||
cgs.media.deniedSound = trap_S_RegisterSound( "sound/feedback/denied.wav", qtrue );
|
||||
cgs.media.humiliationSound = trap_S_RegisterSound( "sound/feedback/humiliation.wav", qtrue );
|
||||
cgs.media.assistSound = trap_S_RegisterSound( "sound/feedback/assist.wav", qtrue );
|
||||
cgs.media.defendSound = trap_S_RegisterSound( "sound/feedback/defense.wav", qtrue );
|
||||
#ifdef MISSIONPACK
|
||||
cgs.media.firstImpressiveSound = trap_S_RegisterSound( "sound/feedback/first_impressive.wav", qtrue );
|
||||
cgs.media.firstExcellentSound = trap_S_RegisterSound( "sound/feedback/first_excellent.wav", qtrue );
|
||||
cgs.media.firstHumiliationSound = trap_S_RegisterSound( "sound/feedback/first_gauntlet.wav", qtrue );
|
||||
#endif
|
||||
|
||||
cgs.media.takenLeadSound = trap_S_RegisterSound( "sound/feedback/takenlead.wav", qtrue);
|
||||
cgs.media.tiedLeadSound = trap_S_RegisterSound( "sound/feedback/tiedlead.wav", qtrue);
|
||||
cgs.media.lostLeadSound = trap_S_RegisterSound( "sound/feedback/lostlead.wav", qtrue);
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
cgs.media.voteNow = trap_S_RegisterSound( "sound/feedback/vote_now.wav", qtrue);
|
||||
cgs.media.votePassed = trap_S_RegisterSound( "sound/feedback/vote_passed.wav", qtrue);
|
||||
cgs.media.voteFailed = trap_S_RegisterSound( "sound/feedback/vote_failed.wav", qtrue);
|
||||
#endif
|
||||
|
||||
cgs.media.watrInSound = trap_S_RegisterSound( "sound/player/watr_in.wav", qfalse);
|
||||
cgs.media.watrOutSound = trap_S_RegisterSound( "sound/player/watr_out.wav", qfalse);
|
||||
cgs.media.watrUnSound = trap_S_RegisterSound( "sound/player/watr_un.wav", qfalse);
|
||||
|
@ -1304,6 +1273,7 @@ static void CG_RegisterGraphics( void ) {
|
|||
#endif
|
||||
|
||||
cgs.media.medalImpressive = trap_R_RegisterShaderNoMip( "medal_impressive" );
|
||||
cgs.media.medalImpressiveTelefrag = trap_R_RegisterShaderNoMip ( "medal_telefragged" );
|
||||
cgs.media.medalExcellent = trap_R_RegisterShaderNoMip( "medal_excellent" );
|
||||
cgs.media.medalGauntlet = trap_R_RegisterShaderNoMip( "medal_gauntlet" );
|
||||
cgs.media.medalDefend = trap_R_RegisterShaderNoMip( "medal_defend" );
|
||||
|
|
|
@ -2579,6 +2579,11 @@ static void CG_PlayerSprites( centity_t *cent ) {
|
|||
CG_PlayerFloatSprite( cent, cgs.media.medalImpressive );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cent->currentState.eFlags & EF_AWARD_IMPRESSIVETELEFRAG ) {
|
||||
CG_PlayerFloatSprite( cent, cgs.media.medalImpressiveTelefrag );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cent->currentState.eFlags & EF_AWARD_EXCELLENT ) {
|
||||
CG_PlayerFloatSprite( cent, cgs.media.medalExcellent );
|
||||
|
|
|
@ -2,19 +2,15 @@
|
|||
===========================================================================
|
||||
Copyright (C) 1999-2005 Id Software, Inc.
|
||||
Copyright (C) 2002-2021 Q3Rally Team (Per Thormann - q3rally@gmail.com)
|
||||
|
||||
This file is part of q3rally source code.
|
||||
|
||||
q3rally source code is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
q3rally source code is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with q3rally; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
@ -31,7 +27,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
/*
|
||||
==============
|
||||
CG_CheckAmmo
|
||||
|
||||
If the ammo has gone low enough to generate the warning, play a sound
|
||||
==============
|
||||
*/
|
||||
|
@ -188,7 +183,6 @@ void CG_DamageFeedback( int yawByte, int pitchByte, int damage ) {
|
|||
/*
|
||||
================
|
||||
CG_Respawn
|
||||
|
||||
A respawn happened this snapshot
|
||||
================
|
||||
*/
|
||||
|
@ -370,6 +364,20 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
|
|||
reward = qtrue;
|
||||
//Com_Printf("impressive\n");
|
||||
}
|
||||
if (ps->persistant[PERS_IMPRESSIVETELEFRAG_COUNT] != ops->persistant[PERS_IMPRESSIVETELEFRAG_COUNT]) {
|
||||
#ifdef MISSIONPACK
|
||||
if (ps->persistant[PERS_IMPRESSIVETELEFRAG_COUNT] == 1) {
|
||||
sfx = cgs.media.firstImpressiveSound;
|
||||
} else {
|
||||
sfx = cgs.media.impressiveSound;
|
||||
}
|
||||
#else
|
||||
sfx = cgs.media.impressiveTelefragSound;
|
||||
#endif
|
||||
pushReward(sfx, cgs.media.medalImpressiveTelefrag, ps->persistant[PERS_IMPRESSIVETELEFRAG_COUNT]);
|
||||
reward = qtrue;
|
||||
//Com_Printf("telefrag\n");
|
||||
}
|
||||
if (ps->persistant[PERS_EXCELLENT_COUNT] != ops->persistant[PERS_EXCELLENT_COUNT]) {
|
||||
#ifdef MISSIONPACK
|
||||
if (ps->persistant[PERS_EXCELLENT_COUNT] == 1) {
|
||||
|
@ -499,7 +507,6 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
|
|||
/*
|
||||
===============
|
||||
CG_TransitionPlayerState
|
||||
|
||||
===============
|
||||
*/
|
||||
void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ) {
|
||||
|
|
|
@ -350,6 +350,7 @@ typedef enum {
|
|||
PERS_KILLED, // count of the number of times you died
|
||||
// player awards tracking
|
||||
PERS_IMPRESSIVE_COUNT, // two railgun hits in a row
|
||||
PERS_IMPRESSIVETELEFRAG_COUNT, // two telefrag 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
|
||||
|
@ -360,48 +361,31 @@ typedef enum {
|
|||
|
||||
// entityState_t->eFlags
|
||||
#define EF_DEAD 0x00000001 // don't draw a foe marker over players with EF_DEAD
|
||||
// STONELANCE - update: not using mission pack so can use this for something else?
|
||||
#define EF_SMOKE_LIGHT 0x00000002 // for light smoke
|
||||
// END
|
||||
#ifdef MISSIONPACK
|
||||
#define EF_TICKING 0x00000002 // used to make players play the prox mine ticking sound
|
||||
#endif
|
||||
#define EF_TELEPORT_BIT 0x00000004 // toggled every time the origin abruptly changes
|
||||
#define EF_AWARD_EXCELLENT 0x00000008 // draw an excellent sprite
|
||||
#define EF_PLAYER_EVENT 0x00000010
|
||||
// STONELANCE - bounce not used client side
|
||||
// #define EF_BOUNCE 0x00000010 // for missiles
|
||||
// #define EF_BOUNCE_HALF 0x00000020 // for missiles
|
||||
#define EF_SMOKE_DARK 0x00000020 // for dark smoke
|
||||
// END
|
||||
#define EF_AWARD_GAUNTLET 0x00000040 // draw a gauntlet sprite
|
||||
#define EF_SMOKE_LIGHT 0x00000002 // for light smoke
|
||||
#define EF_TELEPORT_BIT 0x00000004 // toggled every time the origin abruptly changes
|
||||
#define EF_AWARD_EXCELLENT 0x00000008 // draw an excellent sprite
|
||||
#define EF_PLAYER_EVENT 0x00000010
|
||||
#define EF_SMOKE_DARK 0x00000020 // for dark smoke
|
||||
#define EF_AWARD_GAUNTLET 0x00000040 // draw a gauntlet sprite
|
||||
#define EF_NODRAW 0x00000080 // may have an event, but no model (unspawned items)
|
||||
#define EF_FIRING 0x00000100 // for lightning gun
|
||||
// STONELANCE
|
||||
// #define EF_KAMIKAZE 0x00000200
|
||||
#define EF_BRAKE 0x00000200 // player is braking
|
||||
// mover stop not used clientside
|
||||
//#define EF_MOVER_STOP 0x00000400 // will push otherwise
|
||||
// END
|
||||
#define EF_REVERSE 0x00000400 // player is in reverse
|
||||
#define EF_AWARD_CAP 0x00000800 // draw the capture sprite
|
||||
#define EF_AWARD_CAP 0x00000800 // draw the capture sprite
|
||||
#define EF_TALK 0x00001000 // draw a talk balloon
|
||||
#define EF_CONNECTION 0x00002000 // draw a connection trouble sprite
|
||||
#define EF_CONNECTION 0x00002000 // draw a connection trouble sprite
|
||||
#define EF_VOTED 0x00004000 // already cast a vote
|
||||
#define EF_AWARD_IMPRESSIVE 0x00008000 // draw an impressive sprite
|
||||
#define EF_AWARD_DEFEND 0x00010000 // draw a defend sprite
|
||||
#define EF_AWARD_ASSIST 0x00020000 // draw a assist sprite
|
||||
#define EF_AWARD_DENIED 0x00040000 // denied
|
||||
#define EF_TEAMVOTED 0x00080000 // already cast a team vote
|
||||
// STONELANCE
|
||||
#define EF_KAMIKAZE 0x00100000
|
||||
|
||||
// not used clientside so it doesnt matter if this is > 16th bit
|
||||
#define EF_AWARD_IMPRESSIVE 0x00008000 // draw an impressive sprite
|
||||
#define EF_AWARD_IMPRESSIVETELEFRAG 0x00010000 // draw a telefragged sprite
|
||||
#define EF_AWARD_DEFEND 0x00020000 // draw a defend sprite
|
||||
#define EF_AWARD_ASSIST 0x00030000 // draw a assist sprite
|
||||
#define EF_AWARD_DENIED 0x00080000 // denied
|
||||
#define EF_TEAMVOTED 0x00100000 // already cast a team vote
|
||||
#define EF_KAMIKAZE 0x00200000
|
||||
#define EF_BOUNCE 0x00400000 // for missiles
|
||||
#define EF_BOUNCE_HALF 0x00800000 // for missiles
|
||||
#define EF_BOUNCE_NONE 0x01000000 // for mines
|
||||
#define EF_MOVER_STOP 0x02000000 // will push otherwise
|
||||
// END
|
||||
#define EF_BOUNCE_HALF 0x00800000 // for missiles
|
||||
#define EF_BOUNCE_NONE 0x01000000 // for mines
|
||||
#define EF_MOVER_STOP 0x02000000 // will push otherwise
|
||||
|
||||
// NOTE: may not have more than 16
|
||||
typedef enum {
|
||||
|
|
|
@ -110,15 +110,15 @@ void UpdateTournamentInfo( void ) {
|
|||
} else {
|
||||
perfect = 0;
|
||||
}
|
||||
Com_sprintf( msg, sizeof(msg), "postgame %i %i %i %i %i %i %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_DEFEND_COUNT],
|
||||
Com_sprintf( msg, sizeof(msg), "postgame %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i", level.numNonSpectatorClients, playerClientNum, accuracy,
|
||||
player->client->ps.persistant[PERS_IMPRESSIVE_COUNT], player->client->ps.persistant[PERS_IMPRESSIVETELEFRAG_COUNT], player->client->ps.persistant[PERS_EXCELLENT_COUNT],player->client->ps.persistant[PERS_DEFEND_COUNT],
|
||||
player->client->ps.persistant[PERS_ASSIST_COUNT], player->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT], player->client->ps.persistant[PERS_SCORE],
|
||||
perfect, score1, score2, level.time, player->client->ps.persistant[PERS_CAPTURES] );
|
||||
|
||||
#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,
|
||||
player->client->ps.persistant[PERS_IMPRESSIVE_COUNT], player->client->ps.persistant[PERS_EXCELLENT_COUNT],
|
||||
player->client->ps.persistant[PERS_IMPRESSIVE_COUNT], player->client->ps.persistant[PERS_IMPRESSIVETELEFRAG_COUNT], player->client->ps.persistant[PERS_EXCELLENT_COUNT],
|
||||
player->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT], player->client->ps.persistant[PERS_SCORE],
|
||||
perfect );
|
||||
#endif
|
||||
|
|
|
@ -98,6 +98,7 @@ void DeathmatchScoreboardMessage( gentity_t *ent ) {
|
|||
// END
|
||||
scoreFlags, g_entities[level.sortedClients[i]].s.powerups, accuracy,
|
||||
cl->ps.persistant[PERS_IMPRESSIVE_COUNT],
|
||||
cl->ps.persistant[PERS_IMPRESSIVETELEFRAG_COUNT],
|
||||
cl->ps.persistant[PERS_EXCELLENT_COUNT],
|
||||
cl->ps.persistant[PERS_GAUNTLET_FRAG_COUNT],
|
||||
cl->ps.persistant[PERS_DEFEND_COUNT],
|
||||
|
@ -371,6 +372,10 @@ void Cmd_Give_f (gentity_t *ent)
|
|||
ent->client->ps.persistant[PERS_IMPRESSIVE_COUNT]++;
|
||||
return;
|
||||
}
|
||||
if (Q_stricmp(name, "impressive telefrag") == 0) {
|
||||
ent->client->ps.persistant[PERS_IMPRESSIVETELEFRAG_COUNT]++;
|
||||
return;
|
||||
}
|
||||
if (Q_stricmp(name, "gauntletaward") == 0) {
|
||||
ent->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT]++;
|
||||
return;
|
||||
|
|
|
@ -39,7 +39,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define FRAMETIME 100 // msec
|
||||
#define EVENT_VALID_MSEC 300
|
||||
#define CARNAGE_REWARD_TIME 3000
|
||||
#define REWARD_SPRITE_TIME 2000
|
||||
#define REWARD_SPRITE_TIME 2500
|
||||
|
||||
#define INTERMISSION_DELAY_TIME 1000
|
||||
#define SP_INTERMISSION_DELAY_TIME 5000
|
||||
|
@ -353,36 +353,37 @@ struct gclient_s {
|
|||
|
||||
// sum up damage over an entire frame, so
|
||||
// shotgun blasts give a single big kick
|
||||
int damage_armor; // damage absorbed by armor
|
||||
int damage_blood; // damage taken out of health
|
||||
int damage_knockback; // impact damage
|
||||
vec3_t damage_from; // origin for vector calculation
|
||||
qboolean damage_fromWorld; // if true, don't use the damage_from vector
|
||||
int damage_armor; // damage absorbed by armor
|
||||
int damage_blood; // damage taken out of health
|
||||
int damage_knockback; // impact damage
|
||||
vec3_t damage_from; // origin for vector calculation
|
||||
qboolean damage_fromWorld; // if true, don't use the damage_from vector
|
||||
|
||||
int accurateCount; // for "impressive" reward sound
|
||||
|
||||
int accuracy_shots; // total number of shots
|
||||
int accuracy_hits; // total number of hits
|
||||
int accurateCount; // for "impressive" reward sound
|
||||
int accurateCountTelefrag; // for "telefragimpressive" reward sound
|
||||
|
||||
int accuracy_shots; // total number of shots
|
||||
int accuracy_hits; // total number of hits
|
||||
|
||||
//
|
||||
int lastkilled_client; // last client that this client killed
|
||||
int lasthurt_client; // last client that damaged this client
|
||||
int lasthurt_mod; // type of damage the client did
|
||||
int lastkilled_client; // last client that this client killed
|
||||
int lasthurt_client; // last client that damaged this client
|
||||
int lasthurt_mod; // type of damage the client did
|
||||
|
||||
// timers
|
||||
int respawnTime; // can respawn when time > this, force after g_forcerespwan
|
||||
int inactivityTime; // kick players when time > this
|
||||
qboolean inactivityWarning; // qtrue if the five seoond warning has been given
|
||||
int rewardTime; // clear the EF_AWARD_IMPRESSIVE, etc when time > this
|
||||
int respawnTime; // can respawn when time > this, force after g_forcerespwan
|
||||
int inactivityTime; // kick players when time > this
|
||||
qboolean inactivityWarning; // qtrue if the five seoond warning has been given
|
||||
int rewardTime; // clear the EF_AWARD_IMPRESSIVE, etc when time > this
|
||||
|
||||
int airOutTime;
|
||||
|
||||
int lastKillTime; // for multiple kill rewards
|
||||
int lastKillTime; // for multiple kill rewards
|
||||
|
||||
qboolean fireHeld; // used for hook
|
||||
gentity_t *hook; // grapple hook if out
|
||||
qboolean fireHeld; // used for hook
|
||||
gentity_t *hook; // grapple hook if out
|
||||
|
||||
int switchTeamTime; // time the player switched teams
|
||||
int switchTeamTime; // time the player switched teams
|
||||
|
||||
// timeResidual is used to handle events that happen every second
|
||||
// like health / armor countdowns and regeneration
|
||||
|
|
|
@ -440,7 +440,7 @@ void weapon_grenadelauncher_fire (gentity_t *ent) {
|
|||
gentity_t *m;
|
||||
|
||||
// extra vertical velocity
|
||||
forward[2] += -0.2f;
|
||||
forward[2] += 0.2f;
|
||||
VectorNormalize( forward );
|
||||
|
||||
m = fire_grenade (ent, muzzle, forward);
|
||||
|
@ -587,13 +587,6 @@ RAILGUN
|
|||
|
||||
======================================================================
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
=================
|
||||
weapon_railgun_fire
|
||||
=================
|
||||
*/
|
||||
#define MAX_RAIL_HITS 4
|
||||
void weapon_railgun_fire (gentity_t *ent) {
|
||||
vec3_t end;
|
||||
|
@ -610,7 +603,7 @@ void weapon_railgun_fire (gentity_t *ent) {
|
|||
int passent;
|
||||
gentity_t *unlinkedEntities[MAX_RAIL_HITS];
|
||||
|
||||
damage = 17 * s_quadFactor;
|
||||
damage = 17 * s_quadFactor;
|
||||
|
||||
VectorMA (muzzle, 8192, forward, end);
|
||||
|
||||
|
@ -713,15 +706,16 @@ void weapon_railgun_fire (gentity_t *ent) {
|
|||
} else {
|
||||
// check for "impressive" reward sound
|
||||
ent->client->accurateCount += hits;
|
||||
if ( ent->client->accurateCount >= 4 ) {
|
||||
ent->client->accurateCount -= 4;
|
||||
if ( ent->client->accurateCount >= 6 ) {
|
||||
ent->client->accurateCount -= 6;
|
||||
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 | EF_AWARD_IMPRESSIVETELEFRAG | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
|
||||
ent->client->ps.eFlags |= EF_AWARD_IMPRESSIVE;
|
||||
ent->client->rewardTime = level.time + REWARD_SPRITE_TIME;
|
||||
}
|
||||
ent->client->accuracy_hits++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -817,17 +811,17 @@ void weapon_telefrag_fire (gentity_t *ent,vec3_t muzzle,vec3_t forward,vec3_t ri
|
|||
if ( hits == 0 )
|
||||
{
|
||||
// complete miss
|
||||
ent->client->accurateCount = 0;
|
||||
ent->client->accurateCountTelefrag = 0;
|
||||
} else {
|
||||
// check for "impressive" reward sound
|
||||
ent->client->accurateCount += hits;
|
||||
if ( ent->client->accurateCount >= 4 )
|
||||
// check for "telefragged" reward sound
|
||||
ent->client->accurateCountTelefrag += hits;
|
||||
if ( ent->client->accurateCountTelefrag >= 2 )
|
||||
{
|
||||
ent->client->accurateCount -= 4;
|
||||
ent->client->ps.persistant[PERS_IMPRESSIVE_COUNT]++;
|
||||
ent->client->accurateCountTelefrag -= 2;
|
||||
ent->client->ps.persistant[PERS_IMPRESSIVETELEFRAG_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;
|
||||
ent->client->ps.eFlags &= ~(EF_AWARD_IMPRESSIVE | EF_AWARD_IMPRESSIVETELEFRAG | EF_AWARD_EXCELLENT | EF_AWARD_GAUNTLET | EF_AWARD_ASSIST | EF_AWARD_DEFEND | EF_AWARD_CAP );
|
||||
ent->client->ps.eFlags |= EF_AWARD_IMPRESSIVETELEFRAG;
|
||||
ent->client->rewardTime = level.time + REWARD_SPRITE_TIME;
|
||||
}
|
||||
ent->client->accuracy_hits++;
|
||||
|
|
|
@ -78,10 +78,11 @@ typedef struct {
|
|||
static postgameMenuInfo_t postgameMenuInfo;
|
||||
static char arenainfo[MAX_INFO_VALUE];
|
||||
|
||||
char *ui_medalNames[] = {"Accuracy", "Impressive", "Excellent", "Chainsaw", "Frags", "Perfect"};
|
||||
char *ui_medalNames[] = {"Accuracy", "Impressive", "Telefragged", "Excellent", "Chainsaw", "Frags", "Perfect"};
|
||||
char *ui_medalPicNames[] = {
|
||||
"menu/medals/medal_accuracy",
|
||||
"menu/medals/medal_impressive",
|
||||
"menu/medals/medal_telefragged",
|
||||
"menu/medals/medal_excellent",
|
||||
"menu/medals/medal_gauntlet",
|
||||
"menu/medals/medal_frags",
|
||||
|
@ -89,7 +90,8 @@ char *ui_medalPicNames[] = {
|
|||
};
|
||||
char *ui_medalSounds[] = {
|
||||
"sound/feedback/accuracy.wav",
|
||||
"sound/feedback/impressive_a.wav",
|
||||
"sound/feedback/impressive_a.ogg",
|
||||
"sound/feedback/telefragged.ogg",
|
||||
"sound/feedback/excellent_a.wav",
|
||||
"sound/feedback/gauntlet.wav",
|
||||
"sound/feedback/frags.wav",
|
||||
|
|
|
@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define BASETA "missionpack"
|
||||
|
||||
#ifndef PRODUCT_VERSION
|
||||
#define PRODUCT_VERSION "v0.3c_r477"
|
||||
#define PRODUCT_VERSION "v0.3c_r478"
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -887,6 +887,10 @@ q3rallycode
|
|||
[Open project files]
|
||||
0=engine\code\qcommon\q_shared.h
|
||||
1=engine\code\game\g_weapon.c
|
||||
2=engine\code\game\g_missile.c
|
||||
3=engine\code\game\g_local.h
|
||||
4=engine\code\cgame\cg_main.c
|
||||
5=engine\code\cgame\cg_playerstate.c
|
||||
[Selected Project Files]
|
||||
Main=
|
||||
Selected=engine\code\game\g_weapon.c
|
||||
|
@ -894,5 +898,17 @@ Selected=engine\code\game\g_weapon.c
|
|||
TopLine=46
|
||||
Caret=36,70
|
||||
[engine\code\game\g_weapon.c]
|
||||
TopLine=693
|
||||
Caret=35,717
|
||||
TopLine=699
|
||||
Caret=35,710
|
||||
[engine\code\game\g_missile.c]
|
||||
TopLine=1066
|
||||
Caret=1,1077
|
||||
[engine\code\game\g_local.h]
|
||||
TopLine=26
|
||||
Caret=30,42
|
||||
[engine\code\cgame\cg_main.c]
|
||||
TopLine=769
|
||||
Caret=89,775
|
||||
[engine\code\cgame\cg_playerstate.c]
|
||||
TopLine=86
|
||||
Caret=1,50
|
||||
|
|
Loading…
Reference in a new issue