1.29h merge beware of the bg_public.h problem

This commit is contained in:
Scott Brooks 2001-08-01 21:07:48 +00:00
parent 5ee3d4a0ca
commit ba6adc656a
18 changed files with 2833 additions and 467 deletions

View file

@ -4,8 +4,9 @@
// executed by a key binding
#include "cg_local.h"
#include "../ui/ui_shared.h"
#ifdef MISSIONPACK
#include "../ui/ui_shared.h"
extern menuDef_t *menuScoreboard;
#endif

View file

@ -94,6 +94,10 @@ void CG_LoadingClient( int clientNum ) {
Com_sprintf( iconName, MAX_QPATH, "models/players/%s/icon_%s.tga", model, skin );
loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName );
if ( !loadingPlayerIcons[loadingPlayerIconCount] ) {
Com_sprintf( iconName, MAX_QPATH, "models/players/characters/%s/icon_%s.tga", model, skin );
loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName );
}
if ( !loadingPlayerIcons[loadingPlayerIconCount] ) {
Com_sprintf( iconName, MAX_QPATH, "models/players/%s/icon_%s.tga", DEFAULT_MODEL, "default" );
loadingPlayerIcons[loadingPlayerIconCount] = trap_R_RegisterShaderNoMip( iconName );

View file

@ -171,6 +171,8 @@ typedef struct centity_s {
int dustTrailTime;
int miscTime;
int snapShotTime; // last time this entity was found in a snapshot
playerEntity_t pe;
int errorTime; // decay the error from this time
@ -308,7 +310,8 @@ typedef struct {
int botSkill; // 0 = not bot, 1-5 = bot
vec3_t color;
vec3_t color1;
vec3_t color2;
int score; // updated by score servercmds
int location; // location index for team mode
@ -342,6 +345,8 @@ typedef struct {
qboolean deferred;
qboolean newAnims; // true if using the new mission pack animations
qboolean fixedlegs; // true if legs yaw is always the same as torso yaw
qboolean fixedtorso; // true if torso never changes yaw
vec3_t headOffset; // move head in icon views
footstep_t footsteps;
@ -589,6 +594,11 @@ typedef struct {
int soundTime;
qhandle_t soundBuffer[MAX_SOUNDBUFFER];
// for voice chat buffer
int voiceChatTime;
int voiceChatBufferIn;
int voiceChatBufferOut;
// warmup countdown
int warmup;
int warmupCount;
@ -635,6 +645,9 @@ typedef struct {
float xyspeed;
int nextOrbitTime;
//qboolean cameraMode; // if rendering from a loaded camera
// development tool
refEntity_t testModelEntity;
char testModelName[MAX_QPATH];
@ -673,7 +686,7 @@ typedef struct {
qhandle_t redFlagShader[3];
qhandle_t blueFlagShader[3];
qhandle_t flagShader[4];
#ifdef NEW_ANIMS
qhandle_t flagPoleModel;
qhandle_t flagFlapModel;
@ -685,6 +698,7 @@ typedef struct {
qhandle_t blueFlagBaseModel;
qhandle_t neutralFlagBaseModel;
#ifdef MISSIONPACK
qhandle_t overloadBaseModel;
qhandle_t overloadTargetModel;
qhandle_t overloadLightsModel;
@ -855,6 +869,7 @@ typedef struct {
qhandle_t dustPuffShader;
qhandle_t heartShader;
#endif
qhandle_t invulnerabilityPowerupModel;
// scoreboard headers
qhandle_t scoreboardName;
@ -1246,6 +1261,11 @@ extern vmCvar_t cg_cameraMode;
extern vmCvar_t cg_smallFont;
extern vmCvar_t cg_bigFont;
extern vmCvar_t cg_noTaunt;
extern vmCvar_t cg_noProjectileTrail;
extern vmCvar_t cg_oldRail;
extern vmCvar_t cg_oldRocket;
extern vmCvar_t cg_oldPlasma;
extern vmCvar_t cg_trueLightning;
#ifdef MISSIONPACK
extern vmCvar_t cg_redTeamName;
extern vmCvar_t cg_blueTeamName;
@ -1388,7 +1408,7 @@ sfxHandle_t CG_CustomSound( int clientNum, const char *soundName );
//
void CG_BuildSolidList( void );
int CG_PointContents( const vec3_t point, int passEntityNum );
void CG_Trace( trace_t *result, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end,
void CG_Trace( trace_t *result, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end,
int skipNumber, int mask );
void CG_PredictPlayerState( void );
void CG_LoadDeferredPlayers( void );
@ -1618,7 +1638,7 @@ clipHandle_t trap_CM_TempBoxModel( const vec3_t mins, const vec3_t maxs );
int trap_CM_PointContents( const vec3_t p, clipHandle_t model );
int trap_CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles );
void trap_CM_BoxTrace( trace_t *results, const vec3_t start, const vec3_t end,
const vec3_t mins, const vec3_t maxs,
vec3_t mins, vec3_t maxs,
clipHandle_t model, int brushmask );
void trap_CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end,
const vec3_t mins, const vec3_t maxs,
@ -1668,6 +1688,7 @@ void trap_R_AddRefEntityToScene( const refEntity_t *re );
// polys are intended for simple wall marks, not really for doing
// significant construction
void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts );
void trap_R_AddPolysToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts, int numPolys );
void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b );
int trap_R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, vec3_t lightDir );
void trap_R_RenderScene( const refdef_t *fd );
@ -1730,7 +1751,7 @@ typedef enum {
SYSTEM_PRINT,
CHAT_PRINT,
TEAMCHAT_PRINT
};
} q3print_t; // bk001201 - warning: useless keyword or type name in empty declaration
int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits);
@ -1741,3 +1762,24 @@ void trap_CIN_SetExtents (int handle, int x, int y, int w, int h);
void trap_SnapVector( float *v );
qboolean trap_loadCamera(const char *name);
void trap_startCamera(int time);
qboolean trap_getCameraInfo(int time, vec3_t *origin, vec3_t *angles);
qboolean trap_GetEntityToken( char *buffer, int bufferSize );
void CG_ClearParticles (void);
void CG_AddParticles (void);
void CG_ParticleSnow (qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb, float range, int snum);
void CG_ParticleSmoke (qhandle_t pshader, centity_t *cent);
void CG_AddParticleShrapnel (localEntity_t *le);
void CG_ParticleSnowFlurry (qhandle_t pshader, centity_t *cent);
void CG_ParticleBulletDebris (vec3_t org, vec3_t vel, int duration);
void CG_ParticleSparks (vec3_t org, vec3_t vel, int duration, float x, float y, float speed);
void CG_ParticleDust (centity_t *cent, vec3_t origin, vec3_t dir);
void CG_ParticleMisc (qhandle_t pshader, vec3_t origin, int size, int duration, float alpha);
void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int duration, int sizeStart, int sizeEnd);
extern qboolean initparticles;
int CG_NewParticleArea ( int num );

View file

@ -166,9 +166,9 @@ void CG_FragmentBounceSound( localEntity_t *le, trace_t *trace ) {
int r = rand()&3;
sfxHandle_t s;
if ( r < 2 ) {
if ( r == 0 ) {
s = cgs.media.gibBounce1Sound;
} else if ( r == 2 ) {
} else if ( r == 1 ) {
s = cgs.media.gibBounce2Sound;
} else {
s = cgs.media.gibBounce3Sound;
@ -842,6 +842,7 @@ void CG_AddLocalEntities( void ) {
case LE_SCOREPLUM:
CG_AddScorePlum( le );
break;
#ifdef MISSIONPACK
case LE_KAMIKAZE:
CG_AddKamikaze( le );

View file

@ -177,6 +177,11 @@ vmCvar_t cg_timescale;
vmCvar_t cg_smallFont;
vmCvar_t cg_bigFont;
vmCvar_t cg_noTaunt;
vmCvar_t cg_noProjectileTrail;
vmCvar_t cg_oldRail;
vmCvar_t cg_oldRocket;
vmCvar_t cg_oldPlasma;
vmCvar_t cg_trueLightning;
#ifdef MISSIONPACK
vmCvar_t cg_redTeamName;
@ -199,7 +204,7 @@ typedef struct {
int cvarFlags;
} cvarTable_t;
cvarTable_t cvarTable[] = {
static cvarTable_t cvarTable[] = { // bk001129
{ &cg_ignore, "cg_ignore", "0", 0 }, // used for debugging
{ &cg_autoswitch, "cg_autoswitch", "1", CVAR_ARCHIVE },
{ &cg_drawGun, "cg_drawGun", "1", CVAR_ARCHIVE },
@ -229,7 +234,6 @@ cvarTable_t cvarTable[] = {
{ &cg_simpleItems, "cg_simpleItems", "0", CVAR_ARCHIVE },
{ &cg_addMarks, "cg_marks", "1", CVAR_ARCHIVE },
{ &cg_lagometer, "cg_lagometer", "1", CVAR_ARCHIVE },
{ &cg_railTrailTime, "cg_railTrailTime", "400", CVAR_ARCHIVE },
{ &cg_gun_x, "cg_gunX", "0", CVAR_CHEAT },
{ &cg_gun_y, "cg_gunY", "0", CVAR_CHEAT },
@ -306,6 +310,7 @@ cvarTable_t cvarTable[] = {
{ &pmove_fixed, "pmove_fixed", "0", 0},
{ &pmove_msec, "pmove_msec", "8", 0},
{ &cg_noTaunt, "cg_noTaunt", "0", CVAR_ARCHIVE},
{ &cg_noProjectileTrail, "cg_noProjectileTrail", "0", CVAR_ARCHIVE},
{ &cg_smallFont, "ui_smallFont", "0.25", CVAR_ARCHIVE},
{ &cg_bigFont, "ui_bigFont", "0.4", CVAR_ARCHIVE},
//Blaze: Reaction hand type command
@ -321,11 +326,15 @@ cvarTable_t cvarTable[] = {
{ &cg_RQ3_ssgColorA, "cg_RQ3_ssgColorA", "0.75", CVAR_ARCHIVE },
{ &cg_RQ3_impactEffects, "cg_RQ3_impactEffects", "1", CVAR_ARCHIVE },
{ &cg_RQ3_laserAssist, "cg_RQ3_laserAssist", "0", CVAR_ARCHIVE },
{ &cg_RQ3_anouncer, "cg_RQ3_announcer", "1", CVAR_ARCHIVE }
{ &cg_RQ3_anouncer, "cg_RQ3_announcer", "1", CVAR_ARCHIVE },
{ &cg_oldRail, "cg_oldRail", "1", CVAR_ARCHIVE},
{ &cg_oldRocket, "cg_oldRocket", "1", CVAR_ARCHIVE},
{ &cg_oldPlasma, "cg_oldPlasma", "1", CVAR_ARCHIVE},
{ &cg_trueLightning, "cg_trueLightning", "0.0", CVAR_ARCHIVE}
// { &cg_pmove_fixed, "cg_pmove_fixed", "0", CVAR_USERINFO | CVAR_ARCHIVE }
};
int cvarTableSize = sizeof( cvarTable ) / sizeof( cvarTable[0] );
static int cvarTableSize = sizeof( cvarTable ) / sizeof( cvarTable[0] );
/*
=================
@ -559,70 +568,70 @@ static void CG_RegisterSounds( void ) {
CG_LoadVoiceChats();
#endif
cgs.media.oneMinuteSound = trap_S_RegisterSound( "sound/feedback/1_minute.wav", qfalse );
cgs.media.fiveMinuteSound = trap_S_RegisterSound( "sound/feedback/5_minute.wav", qfalse );
cgs.media.suddenDeathSound = trap_S_RegisterSound( "sound/feedback/sudden_death.wav", qfalse );
cgs.media.oneFragSound = trap_S_RegisterSound( "sound/feedback/1_frag.wav", qfalse );
cgs.media.twoFragSound = trap_S_RegisterSound( "sound/feedback/2_frags.wav", qfalse );
cgs.media.threeFragSound = trap_S_RegisterSound( "sound/feedback/3_frags.wav", qfalse );
cgs.media.count3Sound = trap_S_RegisterSound( "sound/feedback/three.wav", qfalse );
cgs.media.count2Sound = trap_S_RegisterSound( "sound/feedback/two.wav", qfalse );
cgs.media.count1Sound = trap_S_RegisterSound( "sound/feedback/one.wav", qfalse );
cgs.media.countFightSound = trap_S_RegisterSound( "sound/feedback/fight.wav", qfalse );
cgs.media.countPrepareSound = trap_S_RegisterSound( "sound/feedback/prepare.wav", qfalse );
cgs.media.oneMinuteSound = trap_S_RegisterSound( "sound/feedback/1_minute.wav", qtrue );
cgs.media.fiveMinuteSound = trap_S_RegisterSound( "sound/feedback/5_minute.wav", qtrue );
cgs.media.suddenDeathSound = trap_S_RegisterSound( "sound/feedback/sudden_death.wav", qtrue );
cgs.media.oneFragSound = trap_S_RegisterSound( "sound/feedback/1_frag.wav", qtrue );
cgs.media.twoFragSound = trap_S_RegisterSound( "sound/feedback/2_frags.wav", qtrue );
cgs.media.threeFragSound = trap_S_RegisterSound( "sound/feedback/3_frags.wav", qtrue );
cgs.media.count3Sound = trap_S_RegisterSound( "sound/feedback/three.wav", qtrue );
cgs.media.count2Sound = trap_S_RegisterSound( "sound/feedback/two.wav", qtrue );
cgs.media.count1Sound = trap_S_RegisterSound( "sound/feedback/one.wav", qtrue );
cgs.media.countFightSound = trap_S_RegisterSound( "sound/feedback/fight.wav", qtrue );
cgs.media.countPrepareSound = trap_S_RegisterSound( "sound/feedback/prepare.wav", qtrue );
#ifdef MISSIONPACK
cgs.media.countPrepareTeamSound = trap_S_RegisterSound( "sound/feedback/prepare_team.wav", qfalse );
cgs.media.countPrepareTeamSound = trap_S_RegisterSound( "sound/feedback/prepare_team.wav", qtrue );
#endif
if ( cgs.gametype >= GT_TEAM || cg_buildScript.integer ) {
cgs.media.captureAwardSound = trap_S_RegisterSound( "sound/teamplay/flagcapture_yourteam.wav", qfalse );
cgs.media.redLeadsSound = trap_S_RegisterSound( "sound/feedback/redleads.wav", qfalse );
cgs.media.blueLeadsSound = trap_S_RegisterSound( "sound/feedback/blueleads.wav", qfalse );
cgs.media.teamsTiedSound = trap_S_RegisterSound( "sound/feedback/teamstied.wav", qfalse );
cgs.media.hitTeamSound = trap_S_RegisterSound( "sound/feedback/hit_teammate.wav", qfalse );
cgs.media.captureAwardSound = trap_S_RegisterSound( "sound/teamplay/flagcapture_yourteam.wav", qtrue );
cgs.media.redLeadsSound = trap_S_RegisterSound( "sound/feedback/redleads.wav", qtrue );
cgs.media.blueLeadsSound = trap_S_RegisterSound( "sound/feedback/blueleads.wav", qtrue );
cgs.media.teamsTiedSound = trap_S_RegisterSound( "sound/feedback/teamstied.wav", qtrue );
cgs.media.hitTeamSound = trap_S_RegisterSound( "sound/feedback/hit_teammate.wav", qtrue );
cgs.media.redScoredSound = trap_S_RegisterSound( "sound/teamplay/voc_red_scores.wav", qfalse );
cgs.media.blueScoredSound = trap_S_RegisterSound( "sound/teamplay/voc_blue_scores.wav", qfalse );
cgs.media.redScoredSound = trap_S_RegisterSound( "sound/teamplay/voc_red_scores.wav", qtrue );
cgs.media.blueScoredSound = trap_S_RegisterSound( "sound/teamplay/voc_blue_scores.wav", qtrue );
cgs.media.captureYourTeamSound = trap_S_RegisterSound( "sound/teamplay/flagcapture_yourteam.wav", qfalse );
cgs.media.captureOpponentSound = trap_S_RegisterSound( "sound/teamplay/flagcapture_opponent.wav", qfalse );
cgs.media.captureYourTeamSound = trap_S_RegisterSound( "sound/teamplay/flagcapture_yourteam.wav", qtrue );
cgs.media.captureOpponentSound = trap_S_RegisterSound( "sound/teamplay/flagcapture_opponent.wav", qtrue );
cgs.media.returnYourTeamSound = trap_S_RegisterSound( "sound/teamplay/flagreturn_yourteam.wav", qfalse );
cgs.media.returnOpponentSound = trap_S_RegisterSound( "sound/teamplay/flagreturn_opponent.wav", qfalse );
cgs.media.returnYourTeamSound = trap_S_RegisterSound( "sound/teamplay/flagreturn_yourteam.wav", qtrue );
cgs.media.returnOpponentSound = trap_S_RegisterSound( "sound/teamplay/flagreturn_opponent.wav", qtrue );
cgs.media.takenYourTeamSound = trap_S_RegisterSound( "sound/teamplay/flagtaken_yourteam.wav", qfalse );
cgs.media.takenOpponentSound = trap_S_RegisterSound( "sound/teamplay/flagtaken_opponent.wav", qfalse );
cgs.media.takenYourTeamSound = trap_S_RegisterSound( "sound/teamplay/flagtaken_yourteam.wav", qtrue );
cgs.media.takenOpponentSound = trap_S_RegisterSound( "sound/teamplay/flagtaken_opponent.wav", qtrue );
if ( cgs.gametype == GT_CTF || cg_buildScript.integer ) {
cgs.media.redFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/voc_red_returned.wav", qfalse );
cgs.media.blueFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/voc_blue_returned.wav", qfalse );
cgs.media.enemyTookYourFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_enemy_flag.wav", qfalse );
cgs.media.yourTeamTookEnemyFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_team_flag.wav", qfalse );
cgs.media.redFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/voc_red_returned.wav", qtrue );
cgs.media.blueFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/voc_blue_returned.wav", qtrue );
cgs.media.enemyTookYourFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_enemy_flag.wav", qtrue );
cgs.media.yourTeamTookEnemyFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_team_flag.wav", qtrue );
}
#ifdef MISSIONPACK
if ( cgs.gametype == GT_1FCTF || cg_buildScript.integer ) {
// FIXME: get a replacement for this sound ?
cgs.media.neutralFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/flagreturn_opponent.wav", qfalse );
cgs.media.yourTeamTookTheFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_team_1flag.wav", qfalse );
cgs.media.enemyTookTheFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_enemy_1flag.wav", qfalse );
cgs.media.neutralFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/flagreturn_opponent.wav", qtrue );
cgs.media.yourTeamTookTheFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_team_1flag.wav", qtrue );
cgs.media.enemyTookTheFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_enemy_1flag.wav", qtrue );
}
if ( cgs.gametype == GT_1FCTF || cgs.gametype == GT_CTF || cg_buildScript.integer ) {
cgs.media.youHaveFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_you_flag.wav", qfalse );
cgs.media.holyShitSound = trap_S_RegisterSound("sound/feedback/voc_holyshit.wav", qfalse);
cgs.media.youHaveFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_you_flag.wav", qtrue );
cgs.media.holyShitSound = trap_S_RegisterSound("sound/feedback/voc_holyshit.wav", qtrue);
}
if ( cgs.gametype == GT_OBELISK || cg_buildScript.integer ) {
cgs.media.yourBaseIsUnderAttackSound = trap_S_RegisterSound( "sound/teamplay/voc_base_attack.wav", qfalse );
cgs.media.yourBaseIsUnderAttackSound = trap_S_RegisterSound( "sound/teamplay/voc_base_attack.wav", qtrue );
}
#else
cgs.media.youHaveFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_you_flag.wav", qfalse );
cgs.media.holyShitSound = trap_S_RegisterSound("sound/feedback/voc_holyshit.wav", qfalse);
cgs.media.neutralFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/flagreturn_opponent.wav", qfalse );
cgs.media.yourTeamTookTheFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_team_1flag.wav", qfalse );
cgs.media.enemyTookTheFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_enemy_1flag.wav", qfalse );
cgs.media.youHaveFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_you_flag.wav", qtrue );
cgs.media.holyShitSound = trap_S_RegisterSound("sound/feedback/voc_holyshit.wav", qtrue);
cgs.media.neutralFlagReturnedSound = trap_S_RegisterSound( "sound/teamplay/flagreturn_opponent.wav", qtrue );
cgs.media.yourTeamTookTheFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_team_1flag.wav", qtrue );
cgs.media.enemyTookTheFlagSound = trap_S_RegisterSound( "sound/teamplay/voc_enemy_1flag.wav", qtrue );
#endif
}
@ -679,26 +688,26 @@ static void CG_RegisterSounds( void ) {
cgs.media.hitSoundLowArmor = trap_S_RegisterSound( "sound/feedback/hitlo.wav", qfalse );
#endif
cgs.media.impressiveSound = trap_S_RegisterSound( "sound/feedback/impressive.wav", qfalse );
cgs.media.excellentSound = trap_S_RegisterSound( "sound/feedback/excellent.wav", qfalse );
cgs.media.deniedSound = trap_S_RegisterSound( "sound/feedback/denied.wav", qfalse );
cgs.media.humiliationSound = trap_S_RegisterSound( "sound/feedback/humiliation.wav", qfalse );
cgs.media.assistSound = trap_S_RegisterSound( "sound/feedback/assist.wav", qfalse );
cgs.media.defendSound = trap_S_RegisterSound( "sound/feedback/defense.wav", qfalse );
cgs.media.impressiveSound = trap_S_RegisterSound( "sound/feedback/impressive.wav", 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", qfalse );
cgs.media.firstExcellentSound = trap_S_RegisterSound( "sound/feedback/first_excellent.wav", qfalse );
cgs.media.firstHumiliationSound = trap_S_RegisterSound( "sound/feedback/first_gauntlet.wav", qfalse );
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", qfalse);
cgs.media.tiedLeadSound = trap_S_RegisterSound( "sound/feedback/tiedlead.wav", qfalse);
cgs.media.lostLeadSound = trap_S_RegisterSound( "sound/feedback/lostlead.wav", qfalse);
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", qfalse);
cgs.media.votePassed = trap_S_RegisterSound( "sound/feedback/vote_passed.wav", qfalse);
cgs.media.voteFailed = trap_S_RegisterSound( "sound/feedback/vote_failed.wav", qfalse);
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);
@ -775,6 +784,11 @@ static void CG_RegisterSounds( void ) {
cgs.media.winnerSound = trap_S_RegisterSound( "sound/feedback/voc_youwin.wav", qfalse );
cgs.media.loserSound = trap_S_RegisterSound( "sound/feedback/voc_youlose.wav", qfalse );
cgs.media.youSuckSound = trap_S_RegisterSound( "sound/misc/yousuck.wav", qfalse );
cgs.media.wstbimplSound = trap_S_RegisterSound("sound/weapons/proxmine/wstbimpl.wav", qfalse);
cgs.media.wstbimpmSound = trap_S_RegisterSound("sound/weapons/proxmine/wstbimpm.wav", qfalse);
cgs.media.wstbimpdSound = trap_S_RegisterSound("sound/weapons/proxmine/wstbimpd.wav", qfalse);
cgs.media.wstbactvSound = trap_S_RegisterSound("sound/weapons/proxmine/wstbactv.wav", qfalse);
#endif
cgs.media.regenSound = trap_S_RegisterSound("sound/items/regen.wav", qfalse);
@ -782,11 +796,34 @@ static void CG_RegisterSounds( void ) {
cgs.media.n_healthSound = trap_S_RegisterSound("sound/items/n_health.wav", qfalse );
cgs.media.hgrenb1aSound = trap_S_RegisterSound("sound/weapons/grenade/hgrenb1a.wav", qfalse);
cgs.media.hgrenb2aSound = trap_S_RegisterSound("sound/weapons/grenade/hgrenb2a.wav", qfalse);
//Elder: removed
//cgs.media.wstbimplSound = trap_S_RegisterSound("sound/weapons/proxmine/wstbimpl.wav", qfalse);
//cgs.media.wstbimpmSound = trap_S_RegisterSound("sound/weapons/proxmine/wstbimpm.wav", qfalse);
//cgs.media.wstbimpdSound = trap_S_RegisterSound("sound/weapons/proxmine/wstbimpd.wav", qfalse);
//cgs.media.wstbactvSound = trap_S_RegisterSound("sound/weapons/proxmine/wstbactv.wav", qfalse);
#ifdef MISSIONPACK
trap_S_RegisterSound("sound/player/james/death1.wav", qfalse );
trap_S_RegisterSound("sound/player/james/death2.wav", qfalse );
trap_S_RegisterSound("sound/player/james/death3.wav", qfalse );
trap_S_RegisterSound("sound/player/james/jump1.wav", qfalse );
trap_S_RegisterSound("sound/player/james/pain25_1.wav", qfalse );
trap_S_RegisterSound("sound/player/james/pain75_1.wav", qfalse );
trap_S_RegisterSound("sound/player/james/pain100_1.wav", qfalse );
trap_S_RegisterSound("sound/player/james/falling1.wav", qfalse );
trap_S_RegisterSound("sound/player/james/gasp.wav", qfalse );
trap_S_RegisterSound("sound/player/james/drown.wav", qfalse );
trap_S_RegisterSound("sound/player/james/fall1.wav", qfalse );
trap_S_RegisterSound("sound/player/james/taunt.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/death1.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/death2.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/death3.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/jump1.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/pain25_1.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/pain75_1.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/pain100_1.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/falling1.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/gasp.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/drown.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/fall1.wav", qfalse );
trap_S_RegisterSound("sound/player/janet/taunt.wav", qfalse );
#endif
}
@ -1039,7 +1076,6 @@ static void CG_RegisterGraphics( void ) {
cgs.media.scoutPowerupModel = trap_R_RegisterModel( "models/powerups/scout_player.md3" );
cgs.media.doublerPowerupModel = trap_R_RegisterModel( "models/powerups/doubler_player.md3" );
cgs.media.ammoRegenPowerupModel = trap_R_RegisterModel( "models/powerups/ammo_player.md3" );
cgs.media.invulnerabilityPowerupModel = trap_R_RegisterModel( "models/powerups/shield/shield.md3" );
cgs.media.invulnerabilityImpactModel = trap_R_RegisterModel( "models/powerups/shield/impact.md3" );
cgs.media.invulnerabilityJuicedModel = trap_R_RegisterModel( "models/powerups/shield/juicer.md3" );
cgs.media.medkitUsageModel = trap_R_RegisterModel( "models/powerups/regen.md3" );
@ -1047,6 +1083,7 @@ static void CG_RegisterGraphics( void ) {
#endif
cgs.media.invulnerabilityPowerupModel = trap_R_RegisterModel( "models/powerups/shield/shield.md3" );
cgs.media.medalImpressive = trap_R_RegisterShaderNoMip( "medal_impressive" );
cgs.media.medalExcellent = trap_R_RegisterShaderNoMip( "medal_excellent" );
cgs.media.medalGauntlet = trap_R_RegisterShaderNoMip( "medal_gauntlet" );
@ -1131,7 +1168,29 @@ static void CG_RegisterGraphics( void ) {
cgs.media.flagShaders[0] = trap_R_RegisterShaderNoMip("ui/assets/statusbar/flag_in_base.tga");
cgs.media.flagShaders[1] = trap_R_RegisterShaderNoMip("ui/assets/statusbar/flag_capture.tga");
cgs.media.flagShaders[2] = trap_R_RegisterShaderNoMip("ui/assets/statusbar/flag_missing.tga");
trap_R_RegisterModel( "models/players/james/lower.md3" );
trap_R_RegisterModel( "models/players/james/upper.md3" );
trap_R_RegisterModel( "models/players/heads/james/james.md3" );
trap_R_RegisterModel( "models/players/janet/lower.md3" );
trap_R_RegisterModel( "models/players/janet/upper.md3" );
trap_R_RegisterModel( "models/players/heads/janet/janet.md3" );
#endif
CG_ClearParticles ();
/*
for (i=1; i<MAX_PARTICLES_AREAS; i++)
{
{
int rval;
rval = CG_NewParticleArea ( CS_PARTICLES + i);
if (!rval)
break;
}
}
*/
}
@ -1161,7 +1220,6 @@ void CG_BuildSpectatorString() {
/*
===================
CG_RegisterClients
===================
*/
static void CG_RegisterClients( void ) {
@ -1393,7 +1451,7 @@ qboolean CG_Asset_Parse(int handle) {
continue;
}
}
//return qfalse;
return qfalse; // bk001204 - why not?
}
void CG_ParseMenu(const char *menuFile) {
@ -1725,12 +1783,15 @@ static void CG_FeederSelection(float feederID, int index) {
}
}
#endif
#ifdef MISSIONPACK // bk001204 - only needed there
static float CG_Cvar_Get(const char *cvar) {
char buff[128];
memset(buff, 0, sizeof(buff));
trap_Cvar_VariableStringBuffer(cvar, buff, sizeof(buff));
return atof(buff);
}
#endif
#ifdef MISSIONPACK
void CG_Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const char *text, int cursorPos, char cursor, int limit, int style) {

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,7 @@
#ifndef MISSIONPACK // bk001204
#error This file not be used for classic Q3A.
#endif
#include "cg_local.h"
#include "../ui/ui_shared.h"
@ -148,7 +151,7 @@ static void CG_DrawPlayerArmorIcon( rectDef_t *rect, qboolean draw2D ) {
cent = &cg_entities[cg.snap->ps.clientNum];
ps = &cg.snap->ps;
if ( draw2D || !cg_draw3dIcons.integer && cg_drawIcons.integer ) {
if ( draw2D || ( !cg_draw3dIcons.integer && cg_drawIcons.integer) ) { // bk001206 - parentheses
CG_DrawPic( rect->x, rect->y + rect->h/2 + 1, rect->w, rect->h, cgs.media.armorIcon );
} else if (cg_draw3dIcons.integer) {
VectorClear( angles );
@ -185,12 +188,15 @@ static void CG_DrawPlayerArmorValue(rectDef_t *rect, float scale, vec4_t color,
}
}
#ifndef MISSIONPACK // bk001206
static float healthColors[4][4] = {
// { 0.2, 1.0, 0.2, 1.0 } , { 1.0, 0.2, 0.2, 1.0 }, {0.5, 0.5, 0.5, 1} };
{ 1, 0.69f, 0, 1.0f } , // normal
// bk0101016 - float const
{ 1.0f, 0.69f, 0.0f, 1.0f } , // normal
{ 1.0f, 0.2f, 0.2f, 1.0f }, // low health
{0.5f, 0.5f, 0.5f, 1}, // weapon firing
{ 1, 1, 1, 1 } }; // health > 100
{ 0.5f, 0.5f, 0.5f, 1.0f}, // weapon firing
{ 1.0f, 1.0f, 1.0f, 1.0f } }; // health > 100
#endif
static void CG_DrawPlayerAmmoIcon( rectDef_t *rect, qboolean draw2D ) {
centity_t *cent;
@ -201,7 +207,7 @@ static void CG_DrawPlayerAmmoIcon( rectDef_t *rect, qboolean draw2D ) {
cent = &cg_entities[cg.snap->ps.clientNum];
ps = &cg.snap->ps;
if ( draw2D || !cg_draw3dIcons.integer && cg_drawIcons.integer ) {
if ( draw2D || (!cg_draw3dIcons.integer && cg_drawIcons.integer) ) { // bk001206 - parentheses
qhandle_t icon;
icon = cg_weapons[ cg.predictedPlayerState.weapon ].ammoIcon;
if ( icon ) {
@ -783,6 +789,10 @@ static void CG_OneFlagStatus(rectDef_t *rect) {
static void CG_DrawCTFPowerUp(rectDef_t *rect) {
int value;
if (cgs.gametype < GT_CTF) {
return;
}
value = cg.snap->ps.stats[STAT_PERSISTANT_POWERUP];
if ( value ) {
CG_RegisterItemVisuals( value );
@ -1047,7 +1057,7 @@ qboolean CG_OwnerDrawVisible(int flags) {
}
if (flags & CG_SHOW_HEALTHOK) {
if (cg.snap->ps.stats[STAT_HEALTH] > 25) {
if (cg.snap->ps.stats[STAT_HEALTH] >= 25) {
return qtrue;
}
}
@ -1183,6 +1193,8 @@ static void CG_Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4
vec4_t newColor;
glyphInfo_t *glyph;
if (text) {
// TTimo: FIXME
// const unsigned char *s = text; // bk001206 - unsigned
const char *s = text;
float max = *maxX;
float useScale;
@ -1200,7 +1212,7 @@ static void CG_Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4
}
count = 0;
while (s && *s && count < len) {
glyph = &font->glyphs[*s];
glyph = &font->glyphs[(int)*s]; // TTimo: FIXME: getting nasty warnings without the cast, hopefully this doesn't break the VM build
if ( Q_IsColorString( s ) ) {
memcpy( newColor, g_color_table[ColorIndex(*(s+1))], sizeof( newColor ) );
newColor[3] = color[3];
@ -1803,17 +1815,17 @@ void CG_RunMenuScript(char **args) {
void CG_GetTeamColor(vec4_t *color) {
if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) {
(*color)[0] = 1;
(*color)[3] = .25f;
(*color)[1] = (*color)[2] = 0;
(*color)[0] = 1.0f;
(*color)[3] = 0.25f;
(*color)[1] = (*color)[2] = 0.0f;
} else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) {
(*color)[0] = (*color)[1] = 0;
(*color)[2] = 1;
(*color)[3] = .25f;
(*color)[0] = (*color)[1] = 0.0f;
(*color)[2] = 1.0f;
(*color)[3] = 0.25f;
} else {
(*color)[0] = (*color)[2] = 0;
(*color)[1] = .17f;
(*color)[3] = .25f;
(*color)[0] = (*color)[2] = 0.0f;
(*color)[1] = 0.17f;
(*color)[3] = 0.25f;
}
}

View file

@ -100,6 +100,8 @@ static qboolean CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
ci->footsteps = FOOTSTEP_NORMAL;
VectorClear( ci->headOffset );
ci->gender = GENDER_MALE;
ci->fixedlegs = qfalse;
ci->fixedtorso = qfalse;
// read optional parameters
while ( 1 ) {
@ -149,6 +151,12 @@ static qboolean CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
ci->gender = GENDER_MALE;
}
continue;
} else if ( !Q_stricmp( token, "fixedlegs" ) ) {
ci->fixedlegs = qtrue;
continue;
} else if ( !Q_stricmp( token, "fixedtorso" ) ) {
ci->fixedtorso = qtrue;
continue;
}
// if it is a number, start parsing animations
@ -164,7 +172,6 @@ static qboolean CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
token = COM_Parse( &text_p );
if ( !*token ) {
#ifdef NEW_ANIMS
if( i >= TORSO_GETFLAG && i <= TORSO_NEGATIVE ) {
animations[i].firstFrame = animations[TORSO_GESTURE].firstFrame;
animations[i].frameLerp = animations[TORSO_GESTURE].frameLerp;
@ -175,7 +182,6 @@ static qboolean CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
animations[i].flipflop = qfalse;
continue;
}
#endif
break;
}
animations[i].firstFrame = atoi( token );
@ -263,6 +269,172 @@ static qboolean CG_ParseAnimationFile( const char *filename, clientInfo_t *ci )
return qtrue;
}
/*
==========================
CG_FileExists
==========================
*/
static qboolean CG_FileExists(const char *filename) {
int len;
len = trap_FS_FOpenFile( filename, 0, FS_READ );
if (len>0) {
return qtrue;
}
return qfalse;
}
/*
==========================
CG_FindClientModelFile
==========================
*/
static qboolean CG_FindClientModelFile( char *filename, int length, clientInfo_t *ci, const char *teamName, const char *modelName, const char *skinName, const char *base, const char *ext ) {
char *team, *charactersFolder;
int i;
if ( cgs.gametype >= GT_TEAM ) {
switch ( ci->team ) {
case TEAM_BLUE: {
team = "blue";
break;
}
default: {
team = "red";
break;
}
}
}
else {
team = "default";
}
charactersFolder = "";
while(1) {
for ( i = 0; i < 2; i++ ) {
if ( i == 0 && teamName && *teamName ) {
// "models/players/characters/james/stroggs/lower_lily_red.skin"
Com_sprintf( filename, length, "models/players/%s%s/%s%s_%s_%s.%s", charactersFolder, modelName, teamName, base, skinName, team, ext );
}
else {
// "models/players/characters/james/lower_lily_red.skin"
Com_sprintf( filename, length, "models/players/%s%s/%s_%s_%s.%s", charactersFolder, modelName, base, skinName, team, ext );
}
if ( CG_FileExists( filename ) ) {
return qtrue;
}
if ( cgs.gametype >= GT_TEAM ) {
if ( i == 0 && teamName && *teamName ) {
// "models/players/characters/james/stroggs/lower_red.skin"
Com_sprintf( filename, length, "models/players/%s%s/%s%s_%s.%s", charactersFolder, modelName, teamName, base, team, ext );
}
else {
// "models/players/characters/james/lower_red.skin"
Com_sprintf( filename, length, "models/players/%s%s/%s_%s.%s", charactersFolder, modelName, base, team, ext );
}
}
else {
if ( i == 0 && teamName && *teamName ) {
// "models/players/characters/james/stroggs/lower_lily.skin"
Com_sprintf( filename, length, "models/players/%s%s/%s%s_%s.%s", charactersFolder, modelName, teamName, base, skinName, ext );
}
else {
// "models/players/characters/james/lower_lily.skin"
Com_sprintf( filename, length, "models/players/%s%s/%s_%s.%s", charactersFolder, modelName, base, skinName, ext );
}
}
if ( CG_FileExists( filename ) ) {
return qtrue;
}
if ( !teamName || !*teamName ) {
break;
}
}
// if tried the heads folder first
if ( charactersFolder[0] ) {
break;
}
charactersFolder = "characters/";
}
return qfalse;
}
/*
==========================
CG_FindClientHeadFile
==========================
*/
static qboolean CG_FindClientHeadFile( char *filename, int length, clientInfo_t *ci, const char *teamName, const char *headModelName, const char *headSkinName, const char *base, const char *ext ) {
char *team, *headsFolder;
int i;
if ( cgs.gametype >= GT_TEAM ) {
switch ( ci->team ) {
case TEAM_BLUE: {
team = "blue";
break;
}
default: {
team = "red";
break;
}
}
}
else {
team = "default";
}
if ( headModelName[0] == '*' ) {
headsFolder = "heads/";
headModelName++;
}
else {
headsFolder = "";
}
while(1) {
for ( i = 0; i < 2; i++ ) {
if ( i == 0 && teamName && *teamName ) {
Com_sprintf( filename, length, "models/players/%s%s/%s/%s%s_%s.%s", headsFolder, headModelName, headSkinName, teamName, base, team, ext );
}
else {
Com_sprintf( filename, length, "models/players/%s%s/%s/%s_%s.%s", headsFolder, headModelName, headSkinName, base, team, ext );
}
if ( CG_FileExists( filename ) ) {
return qtrue;
}
if ( cgs.gametype >= GT_TEAM ) {
if ( i == 0 && teamName && *teamName ) {
Com_sprintf( filename, length, "models/players/%s%s/%s%s_%s.%s", headsFolder, headModelName, teamName, base, team, ext );
}
else {
Com_sprintf( filename, length, "models/players/%s%s/%s_%s.%s", headsFolder, headModelName, base, team, ext );
}
}
else {
if ( i == 0 && teamName && *teamName ) {
Com_sprintf( filename, length, "models/players/%s%s/%s%s_%s.%s", headsFolder, headModelName, teamName, base, headSkinName, ext );
}
else {
Com_sprintf( filename, length, "models/players/%s%s/%s_%s.%s", headsFolder, headModelName, base, headSkinName, ext );
}
}
if ( CG_FileExists( filename ) ) {
return qtrue;
}
if ( !teamName || !*teamName ) {
break;
}
}
// if tried the heads folder first
if ( headsFolder[0] ) {
break;
}
headsFolder = "heads/";
}
return qfalse;
}
/*
==========================
CG_RegisterClientSkin
@ -270,38 +442,54 @@ CG_RegisterClientSkin
*/
static qboolean CG_RegisterClientSkin( clientInfo_t *ci, const char *teamName, const char *modelName, const char *skinName, const char *headModelName, const char *headSkinName ) {
char filename[MAX_QPATH];
/*
Com_sprintf( filename, sizeof( filename ), "models/players/%s/%slower_%s.skin", modelName, teamName, skinName );
ci->legsSkin = trap_R_RegisterSkin( filename );
if (!ci->legsSkin) {
Com_sprintf( filename, sizeof( filename ), "models/players/characters/%s/%slower_%s.skin", modelName, teamName, skinName );
ci->legsSkin = trap_R_RegisterSkin( filename );
if (!ci->legsSkin) {
Com_Printf( "Leg skin load failure: %s\n", filename );
}
}
Com_sprintf( filename, sizeof( filename ), "models/players/%s/%supper_%s.skin", modelName, teamName, skinName );
ci->torsoSkin = trap_R_RegisterSkin( filename );
if (!ci->torsoSkin) {
Com_sprintf( filename, sizeof( filename ), "models/players/characters/%s/%supper_%s.skin", modelName, teamName, skinName );
ci->torsoSkin = trap_R_RegisterSkin( filename );
if (!ci->torsoSkin) {
Com_Printf( "Torso skin load failure: %s\n", filename );
}
}
*/
if ( CG_FindClientModelFile( filename, sizeof(filename), ci, teamName, modelName, skinName, "lower", "skin" ) ) {
ci->legsSkin = trap_R_RegisterSkin( filename );
}
if (!ci->legsSkin) {
Com_Printf( "Leg skin load failure: %s\n", filename );
}
if ( CG_FindClientModelFile( filename, sizeof(filename), ci, teamName, modelName, skinName, "upper", "skin" ) ) {
ci->torsoSkin = trap_R_RegisterSkin( filename );
}
if (!ci->torsoSkin) {
Com_Printf( "Torso skin load failure: %s\n", filename );
}
if( headModelName[0] == '*' ) {
Com_sprintf( filename, sizeof( filename ), "models/players/heads/%s/head_%s.skin", &headModelName[1], headSkinName );
} else {
Com_sprintf( filename, sizeof( filename ), "models/players/%s/%shead_%s.skin", headModelName, teamName, headSkinName );
}
ci->headSkin = trap_R_RegisterSkin( filename );
// if the head skin could not be found and we didn't load from the heads folder try to load from there
if ( !ci->headSkin && headModelName[0] != '*' ) {
Com_sprintf( filename, sizeof( filename ), "models/players/heads/%s/head_%s.skin", headModelName, headSkinName );
if ( CG_FindClientHeadFile( filename, sizeof(filename), ci, teamName, headModelName, headSkinName, "head", "skin" ) ) {
ci->headSkin = trap_R_RegisterSkin( filename );
}
if (!ci->headSkin) {
Com_Printf( "Head skin load failure: %s\n", filename );
}
// if any skins failed to load
if ( !ci->legsSkin || !ci->torsoSkin || !ci->headSkin ) {
return qfalse;
}
return qtrue;
}
@ -311,10 +499,10 @@ CG_RegisterClientModelname
==========================
*/
static qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char *modelName, const char *skinName, const char *headModelName, const char *headSkinName, const char *teamName ) {
char filename[MAX_QPATH];
char filename[MAX_QPATH*2];
const char *headName;
char newTeamName[MAX_QPATH];
//Com_Printf("Got to start\n");
char newTeamName[MAX_QPATH*2];
if ( headModelName[0] == '\0' ) {
headName = modelName;
}
@ -324,16 +512,24 @@ static qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char *modelN
Com_sprintf( filename, sizeof( filename ), "models/players/%s/lower.md3", modelName );
ci->legsModel = trap_R_RegisterModel( filename );
if ( !ci->legsModel ) {
Com_sprintf( filename, sizeof( filename ), "models/players/characters/%s/lower.md3", modelName );
ci->legsModel = trap_R_RegisterModel( filename );
if ( !ci->legsModel ) {
Com_Printf( "Failed to load model file %s\n", filename );
return qfalse;
}
}
Com_sprintf( filename, sizeof( filename ), "models/players/%s/upper.md3", modelName );
ci->torsoModel = trap_R_RegisterModel( filename );
if ( !ci->torsoModel ) {
Com_sprintf( filename, sizeof( filename ), "models/players/characters/%s/upper.md3", modelName );
ci->torsoModel = trap_R_RegisterModel( filename );
if ( !ci->torsoModel ) {
Com_Printf( "Failed to load model file %s\n", filename );
return qfalse;
}
}
if( headName[0] == '*' ) {
Com_sprintf( filename, sizeof( filename ), "models/players/heads/%s/%s.md3", &headModelName[1], &headModelName[1] );
@ -351,7 +547,7 @@ static qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char *modelN
Com_Printf( "Failed to load model file %s\n", filename );
return qfalse;
}
//Com_Printf("Got this far\n");
// if any skins failed to load, return failure
if ( !CG_RegisterClientSkin( ci, teamName, modelName, skinName, headName, headSkinName ) ) {
if( teamName && *teamName) {
@ -375,30 +571,27 @@ static qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char *modelN
// load the animations
Com_sprintf( filename, sizeof( filename ), "models/players/%s/animation.cfg", modelName );
if ( !CG_ParseAnimationFile( filename, ci ) ) {
Com_sprintf( filename, sizeof( filename ), "models/players/characters/%s/animation.cfg", modelName );
if ( !CG_ParseAnimationFile( filename, ci ) ) {
Com_Printf( "Failed to load animation file %s\n", filename );
return qfalse;
}
if( headName[0] == '*' ) {
Com_sprintf( filename, sizeof( filename ), "models/players/heads/%s/icon_%s.tga", &headName[1], headSkinName );
} else {
Com_sprintf( filename, sizeof( filename ), "models/players/%s/icon_%s.tga", headName, headSkinName );
}
ci->modelIcon = trap_R_RegisterShaderNoMip( filename );
// if the model icon could not be found and we didn't load from the heads folder try to load from there
if ( !ci->modelIcon && headName[0] != '*') {
Com_sprintf( filename, sizeof( filename ), "models/players/heads/%s/icon_%s.tga", headName, headSkinName );
if ( CG_FindClientHeadFile( filename, sizeof(filename), ci, teamName, headName, headSkinName, "icon", "skin" ) ) {
ci->modelIcon = trap_R_RegisterShaderNoMip( filename );
}
else if ( CG_FindClientHeadFile( filename, sizeof(filename), ci, teamName, headName, headSkinName, "icon", "tga" ) ) {
ci->modelIcon = trap_R_RegisterShaderNoMip( filename );
}
if ( !ci->modelIcon ) {
Com_Printf( "Failed to load icon file: %s\n", filename );
return qfalse;
}
return qtrue;
}
/*
====================
CG_ColorFromString
@ -456,15 +649,19 @@ static void CG_LoadClientInfo( clientInfo_t *ci ) {
}
#endif
modelloaded = qtrue;
if ( !CG_RegisterClientModelname( ci, ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname ) ) {
if ( !CG_RegisterClientModelname( ci, ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname ) ) {
if ( cg_buildScript.integer ) {
CG_Error( "CG_RegisterClientModelname( %s, %s, %s, %s %s ) failed", ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname );
}
// fall back
// fall back to default team name
if( cgs.gametype >= GT_TEAM) {
// keep skin name
if( ci->team == TEAM_BLUE ) {
Q_strncpyz(teamname, DEFAULT_BLUETEAM_NAME, sizeof(teamname) );
} else {
Q_strncpyz(teamname, DEFAULT_REDTEAM_NAME, sizeof(teamname) );
}
if ( !CG_RegisterClientModelname( ci, DEFAULT_TEAM_MODEL, ci->skinName, DEFAULT_TEAM_HEAD, ci->skinName, teamname ) ) {
CG_Error( "DEFAULT_TEAM_MODEL / skin (%s/%s) failed to register", DEFAULT_TEAM_MODEL, ci->skinName );
}
@ -563,7 +760,8 @@ static qboolean CG_ScanForExistingClientInfo( clientInfo_t *ci ) {
&& !Q_stricmp( ci->headModelName, match->headModelName )
&& !Q_stricmp( ci->headSkinName, match->headSkinName )
&& !Q_stricmp( ci->blueTeam, match->blueTeam )
&& !Q_stricmp( ci->redTeam, match->redTeam ) ) {
&& !Q_stricmp( ci->redTeam, match->redTeam )
&& (cgs.gametype < GT_TEAM || ci->team == match->team) ) {
// this clientinfo is identical, so use it's handles
ci->deferred = qfalse;
@ -599,8 +797,9 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci ) {
}
if ( Q_stricmp( ci->skinName, match->skinName ) ||
Q_stricmp( ci->modelName, match->modelName ) ||
Q_stricmp( ci->headModelName, match->headModelName ) ||
Q_stricmp( ci->headSkinName, match->headSkinName ) ) {
// Q_stricmp( ci->headModelName, match->headModelName ) ||
// Q_stricmp( ci->headSkinName, match->headSkinName ) ||
(cgs.gametype >= GT_TEAM && ci->team != match->team) ) {
continue;
}
// just load the real info cause it uses the same models and skins
@ -615,7 +814,8 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci ) {
if ( !match->infoValid || match->deferred ) {
continue;
}
if ( Q_stricmp( ci->skinName, match->skinName ) ) {
if ( Q_stricmp( ci->skinName, match->skinName ) ||
(cgs.gametype >= GT_TEAM && ci->team != match->team) ) {
continue;
}
ci->deferred = qtrue;
@ -679,7 +879,10 @@ void CG_NewClientInfo( int clientNum ) {
// colors
v = Info_ValueForKey( configstring, "c1" );
CG_ColorFromString( v, newInfo.color );
CG_ColorFromString( v, newInfo.color1 );
v = Info_ValueForKey( configstring, "c2" );
CG_ColorFromString( v, newInfo.color2 );
// bot skill
v = Info_ValueForKey( configstring, "skill" );
@ -1223,7 +1426,8 @@ static void CG_PlayerAngles( centity_t *cent, vec3_t legs[3], vec3_t torso[3], v
static int movementOffsets[8] = { 0, 22, 45, -22, 0, 22, -45, -22 };
vec3_t velocity;
float speed;
int dir;
int dir, clientNum;
clientInfo_t *ci;
VectorCopy( cent->lerpAngles, headAngles );
headAngles[YAW] = AngleMod( headAngles[YAW] );
@ -1261,6 +1465,7 @@ static void CG_PlayerAngles( centity_t *cent, vec3_t legs[3], vec3_t torso[3], v
torsoAngles[YAW] = cent->pe.torso.yawAngle;
legsAngles[YAW] = cent->pe.legs.yawAngle;
// --------- pitch -------------
// only show a fraction of the pitch angle in the torso
@ -1272,6 +1477,15 @@ static void CG_PlayerAngles( centity_t *cent, vec3_t legs[3], vec3_t torso[3], v
CG_SwingAngles( dest, 15, 30, 0.1f, &cent->pe.torso.pitchAngle, &cent->pe.torso.pitching );
torsoAngles[PITCH] = cent->pe.torso.pitchAngle;
//
clientNum = cent->currentState.clientNum;
if ( clientNum >= 0 && clientNum < MAX_CLIENTS ) {
ci = &cgs.clientinfo[ clientNum ];
if ( ci->fixedtorso ) {
torsoAngles[PITCH] = 0.0f;
}
}
// --------- roll -------------
@ -1292,6 +1506,17 @@ static void CG_PlayerAngles( centity_t *cent, vec3_t legs[3], vec3_t torso[3], v
legsAngles[PITCH] += side;
}
//
clientNum = cent->currentState.clientNum;
if ( clientNum >= 0 && clientNum < MAX_CLIENTS ) {
ci = &cgs.clientinfo[ clientNum ];
if ( ci->fixedlegs ) {
legsAngles[YAW] = torsoAngles[YAW];
legsAngles[PITCH] = 0.0f;
legsAngles[ROLL] = 0.0f;
}
}
// pain twitch
CG_AddPainTwitch( cent, torsoAngles );
@ -1576,6 +1801,7 @@ static void CG_PlayerFlag( centity_t *cent, qhandle_t hSkin, refEntity_t *torso
}
#ifdef MISSIONPACK // bk001204
/*
===============
CG_PlayerTokens
@ -1640,6 +1866,7 @@ static void CG_PlayerTokens( centity_t *cent, int renderfx ) {
VectorCopy(trail->positions[i], origin);
}
}
#endif
/*
@ -1647,11 +1874,7 @@ static void CG_PlayerTokens( centity_t *cent, int renderfx ) {
CG_PlayerPowerups
===============
*/
#ifdef NEW_ANIMS
static void CG_PlayerPowerups( centity_t *cent, refEntity_t *torso ) {
#else
static void CG_PlayerPowerups( centity_t *cent ) {
#endif
int powerups;
clientInfo_t *ci;
@ -1838,7 +2061,7 @@ static qboolean CG_PlayerShadow( centity_t *cent, float *shadowPlane ) {
trap_CM_BoxTrace( &trace, cent->lerpOrigin, end, mins, maxs, 0, MASK_PLAYERSOLID );
// no shadow if too high
if ( trace.fraction == 1.0 ) {
if ( trace.fraction == 1.0 || trace.startsolid || trace.allsolid ) {
return qfalse;
}
@ -1851,6 +2074,9 @@ static qboolean CG_PlayerShadow( centity_t *cent, float *shadowPlane ) {
// fade the shadow out with height
alpha = 1.0 - trace.fraction;
// bk0101022 - hack / FPE - bogus planes?
//assert( DotProduct( trace.plane.normal, trace.plane.normal ) != 0.0f )
// add the mark as a temporary, so it goes directly to the renderer
// without taking a spot in the cg_marks array
CG_ImpactMark( cgs.media.shadowMarkShader, trace.endpos, trace.plane.normal,
@ -2105,11 +2331,6 @@ void CG_Player( centity_t *cent ) {
CG_PlayerAnimation( cent, &legs.oldframe, &legs.frame, &legs.backlerp,
&torso.oldframe, &torso.frame, &torso.backlerp );
#ifndef NEW_ANIMS
// add powerups floating behind the player
CG_PlayerPowerups( cent );
#endif
// add the talk baloon or disconnect icon
CG_PlayerSprites( cent );
@ -2180,7 +2401,7 @@ void CG_Player( centity_t *cent ) {
// one skull bobbing above the dead body
angle = ((cg.time / 7) & 255) * (M_PI * 2) / 255;
if (angle > M_PI * 2)
angle -= M_PI * 2;
angle -= (float)M_PI * 2;
dir[0] = sin(angle) * 20;
dir[1] = cos(angle) * 20;
angle = ((cg.time / 4) & 255) * (M_PI * 2) / 255;
@ -2231,7 +2452,7 @@ void CG_Player( centity_t *cent ) {
angle = ((cg.time / 4) & 255) * (M_PI * 2) / 255 + M_PI;
if (angle > M_PI * 2)
angle -= M_PI * 2;
angle -= (float)M_PI * 2;
dir[0] = sin(angle) * 20;
dir[1] = cos(angle) * 20;
dir[2] = cos(angle) * 20;
@ -2259,7 +2480,7 @@ void CG_Player( centity_t *cent ) {
angle = ((cg.time / 3) & 255) * (M_PI * 2) / 255 + 0.5 * M_PI;
if (angle > M_PI * 2)
angle -= M_PI * 2;
angle -= (float)M_PI * 2;
dir[0] = sin(angle) * 20;
dir[1] = cos(angle) * 20;
dir[2] = 0;
@ -2400,10 +2621,8 @@ void CG_Player( centity_t *cent ) {
//
CG_AddPlayerWeapon( &torso, NULL, cent, ci->team );
#ifdef NEW_ANIMS
// add powerups floating behind the player
CG_PlayerPowerups( cent, &torso );
#endif
}

View file

@ -122,7 +122,7 @@ static void CG_ClipMoveToEntities ( const vec3_t start, const vec3_t mins, const
CG_Trace
================
*/
void CG_Trace( trace_t *result, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end,
void CG_Trace( trace_t *result, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end,
int skipNumber, int mask ) {
trace_t t;

View file

@ -135,6 +135,20 @@ typedef enum {
CG_S_ADDREALLOOPINGSOUND,
CG_S_STOPLOOPINGSOUND,
CG_CM_TEMPCAPSULEMODEL,
CG_CM_CAPSULETRACE,
CG_CM_TRANSFORMEDCAPSULETRACE,
CG_R_ADDADDITIVELIGHTTOSCENE,
CG_GET_ENTITY_TOKEN,
CG_R_ADDPOLYSTOSCENE,
CG_R_INPVS,
/*
CG_LOADCAMERA,
CG_STARTCAMERA,
CG_GETCAMERAINFO,
*/
CG_MEMSET = 100,
CG_MEMCPY,
CG_STRNCPY,

View file

@ -5,7 +5,7 @@
// be a valid snapshot this frame
#include "cg_local.h"
#include "../ui/menudef.h"
#include "../ui/menudef.h" // bk001205 - for Q3_ui as well
typedef struct {
const char *order;
@ -26,7 +26,7 @@ static const orderTask_t validOrders[] = {
static const int numValidOrders = sizeof(validOrders) / sizeof(orderTask_t);
#ifdef MISSIONPACK // bk001204
static int CG_ValidOrder(const char *p) {
int i;
for (i = 0; i < numValidOrders; i++) {
@ -36,6 +36,7 @@ static int CG_ValidOrder(const char *p) {
}
return -1;
}
#endif
/*
=================
@ -403,8 +404,6 @@ static void CG_AddToTeamChat( const char *str ) {
cgs.teamLastChatPos = cgs.teamChatPos - chatHeight;
}
/*
===============
CG_MapRestart
@ -423,6 +422,7 @@ static void CG_MapRestart( void ) {
CG_InitLocalEntities();
CG_InitMarkPolys();
CG_ClearParticles ();
// make sure the "3 frags left" warnings play again
cg.fraglimitWarnings = 0;
@ -443,7 +443,7 @@ static void CG_MapRestart( void ) {
// play the "fight" sound if this is a restart without warmup
if ( cg.warmup == 0 /* && cgs.gametype == GT_TOURNAMENT */) {
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER );
trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER );
CG_CenterPrint( "FIGHT!", 120, GIANTCHAR_WIDTH*2 );
}
#ifdef MISSIONPACK
@ -454,6 +454,7 @@ static void CG_MapRestart( void ) {
}
}
#endif
trap_Cvar_Set("cg_thirdPerson", "0");
}
#define MAX_VOICEFILESIZE 16384
@ -621,7 +622,7 @@ int CG_HeadModelVoiceChats( char *filename ) {
len = trap_FS_FOpenFile( filename, &f, FS_READ );
if ( !f ) {
trap_Print( va( "voice chat file not found: %s\n", filename ) );
//trap_Print( va( "voice chat file not found: %s\n", filename ) );
return -1;
}
if ( len >= MAX_VOICEFILESIZE ) {
@ -681,37 +682,52 @@ CG_VoiceChatListForClient
voiceChatList_t *CG_VoiceChatListForClient( int clientNum ) {
clientInfo_t *ci;
int voiceChatNum, i, j, k, gender;
char filename[128], *headModelName;
char filename[MAX_QPATH], headModelName[MAX_QPATH];
if ( clientNum < 0 || clientNum >= MAX_CLIENTS ) {
clientNum = 0;
}
ci = &cgs.clientinfo[ clientNum ];
headModelName = ci->headModelName;
if (headModelName[0] == '*')
headModelName++;
// find the voice file for the head model the client uses
for ( i = 0; i < MAX_HEADMODELS; i++ ) {
if (!Q_stricmp(headModelVoiceChat[i].headmodel, headModelName)) {
break;
for ( k = 0; k < 2; k++ ) {
if ( k == 0 ) {
if (ci->headModelName[0] == '*') {
Com_sprintf( headModelName, sizeof(headModelName), "%s/%s", ci->headModelName+1, ci->headSkinName );
}
else {
Com_sprintf( headModelName, sizeof(headModelName), "%s/%s", ci->headModelName, ci->headSkinName );
}
}
}
if (i < MAX_HEADMODELS) {
return &voiceChatLists[headModelVoiceChat[i].voiceChatNum];
}
// find a <headmodelname>.vc file
for ( i = 0; i < MAX_HEADMODELS; i++ ) {
if (!strlen(headModelVoiceChat[i].headmodel)) {
Com_sprintf(filename, sizeof(filename), "scripts/%s.vc", headModelName);
voiceChatNum = CG_HeadModelVoiceChats(filename);
if (voiceChatNum == -1)
else {
if (ci->headModelName[0] == '*') {
Com_sprintf( headModelName, sizeof(headModelName), "%s", ci->headModelName+1 );
}
else {
Com_sprintf( headModelName, sizeof(headModelName), "%s", ci->headModelName );
}
}
// find the voice file for the head model the client uses
for ( i = 0; i < MAX_HEADMODELS; i++ ) {
if (!Q_stricmp(headModelVoiceChat[i].headmodel, headModelName)) {
break;
Com_sprintf(headModelVoiceChat[i].headmodel, sizeof ( headModelVoiceChat[i].headmodel ),
"%s", headModelName);
headModelVoiceChat[i].voiceChatNum = voiceChatNum;
}
}
if (i < MAX_HEADMODELS) {
return &voiceChatLists[headModelVoiceChat[i].voiceChatNum];
}
// find a <headmodelname>.vc file
for ( i = 0; i < MAX_HEADMODELS; i++ ) {
if (!strlen(headModelVoiceChat[i].headmodel)) {
Com_sprintf(filename, sizeof(filename), "scripts/%s.vc", headModelName);
voiceChatNum = CG_HeadModelVoiceChats(filename);
if (voiceChatNum == -1)
break;
Com_sprintf(headModelVoiceChat[i].headmodel, sizeof ( headModelVoiceChat[i].headmodel ),
"%s", headModelName);
headModelVoiceChat[i].voiceChatNum = voiceChatNum;
return &voiceChatLists[headModelVoiceChat[i].voiceChatNum];
}
}
}
gender = ci->gender;
for (k = 0; k < 2; k++) {
@ -762,8 +778,6 @@ typedef struct bufferedVoiceChat_s
} bufferedVoiceChat_t;
bufferedVoiceChat_t voiceChatBuffer[MAX_VOICECHATBUFFER];
int voiceChatBufferIn, voiceChatBufferOut;
int voiceChatTime;
/*
=================
@ -771,6 +785,7 @@ CG_PlayVoiceChat
=================
*/
void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) {
#ifdef MISSIONPACK
// if we are going into the intermission, don't start any voices
if ( cg.intermissionStarted ) {
return;
@ -778,7 +793,6 @@ void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) {
if ( !cg_noVoiceChats.integer ) {
trap_S_StartLocalSound( vchat->snd, CHAN_VOICE);
#ifdef MISSIONPACK
if (vchat->clientNum != cg.snap->ps.clientNum) {
int orderTask = CG_ValidOrder(vchat->cmd);
if (orderTask > 0) {
@ -790,13 +804,13 @@ void CG_PlayVoiceChat( bufferedVoiceChat_t *vchat ) {
// see if this was an order
CG_ShowResponseHead();
}
#endif
}
if (!vchat->voiceOnly && !cg_noVoiceText.integer) {
CG_AddToTeamChat( vchat->message );
CG_Printf( "%s\n", vchat->message );
}
voiceChatBuffer[voiceChatBufferOut].snd = 0;
voiceChatBuffer[cg.voiceChatBufferOut].snd = 0;
#endif
}
/*
@ -805,15 +819,17 @@ CG_PlayBufferedVoieChats
=====================
*/
void CG_PlayBufferedVoiceChats( void ) {
if ( voiceChatTime < cg.time ) {
if (voiceChatBufferOut != voiceChatBufferIn && voiceChatBuffer[voiceChatBufferOut].snd) {
#ifdef MISSIONPACK
if ( cg.voiceChatTime < cg.time ) {
if (cg.voiceChatBufferOut != cg.voiceChatBufferIn && voiceChatBuffer[cg.voiceChatBufferOut].snd) {
//
CG_PlayVoiceChat(&voiceChatBuffer[voiceChatBufferOut]);
CG_PlayVoiceChat(&voiceChatBuffer[cg.voiceChatBufferOut]);
//
voiceChatBufferOut = (voiceChatBufferOut + 1) % MAX_VOICECHATBUFFER;
voiceChatTime = cg.time + 1000;
cg.voiceChatBufferOut = (cg.voiceChatBufferOut + 1) % MAX_VOICECHATBUFFER;
cg.voiceChatTime = cg.time + 1000;
}
}
#endif
}
/*
@ -822,17 +838,19 @@ CG_AddBufferedVoiceChat
=====================
*/
void CG_AddBufferedVoiceChat( bufferedVoiceChat_t *vchat ) {
#ifdef MISSIONPACK
// if we are going into the intermission, don't start any voices
if ( cg.intermissionStarted ) {
return;
}
memcpy(&voiceChatBuffer[voiceChatBufferIn], vchat, sizeof(bufferedVoiceChat_t));
voiceChatBufferIn = (voiceChatBufferIn + 1) % MAX_VOICECHATBUFFER;
if (voiceChatBufferIn == voiceChatBufferOut) {
CG_PlayVoiceChat( &voiceChatBuffer[voiceChatBufferOut] );
voiceChatBufferOut++;
memcpy(&voiceChatBuffer[cg.voiceChatBufferIn], vchat, sizeof(bufferedVoiceChat_t));
cg.voiceChatBufferIn = (cg.voiceChatBufferIn + 1) % MAX_VOICECHATBUFFER;
if (cg.voiceChatBufferIn == cg.voiceChatBufferOut) {
CG_PlayVoiceChat( &voiceChatBuffer[cg.voiceChatBufferOut] );
cg.voiceChatBufferOut++;
}
#endif
}
/*
@ -841,6 +859,7 @@ CG_VoiceChatLocal
=================
*/
void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color, const char *cmd ) {
#ifdef MISSIONPACK
char *chat;
voiceChatList_t *voiceChatList;
clientInfo_t *ci;
@ -880,6 +899,7 @@ void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color,
CG_AddBufferedVoiceChat(&vchat);
}
}
#endif
}
/*
@ -888,6 +908,7 @@ CG_VoiceChat
=================
*/
void CG_VoiceChat( int mode ) {
#ifdef MISSIONPACK
const char *cmd;
int clientNum, color;
qboolean voiceOnly;
@ -906,6 +927,7 @@ void CG_VoiceChat( int mode ) {
}
CG_VoiceChatLocal( mode, voiceOnly, clientNum, color, cmd );
#endif
}
/*
@ -960,9 +982,9 @@ static void CG_ServerCommand( void ) {
cmd = CG_Argv(1); // yes, this is obviously a hack, but so is the way we hear about
// votes passing or failing
if ( !Q_stricmpn( cmd, "vote failed", 11 ) || !Q_stricmpn( cmd, "team vote failed", 16 )) {
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.voteFailed, CHAN_ANNOUNCER );
trap_S_StartLocalSound( cgs.media.voteFailed, CHAN_ANNOUNCER );
} else if ( !Q_stricmpn( cmd, "vote passed", 11 ) || !Q_stricmpn( cmd, "team vote passed", 16 ) ) {
if (cg_RQ3_anouncer.integer == 1) trap_S_StartLocalSound( cgs.media.votePassed, CHAN_ANNOUNCER );
trap_S_StartLocalSound( cgs.media.votePassed, CHAN_ANNOUNCER );
}
#endif
return;

View file

@ -13,9 +13,11 @@ CG_ResetEntity
==================
*/
static void CG_ResetEntity( centity_t *cent ) {
// if an event is set, assume it is new enough to use
// if the event had timed out, it would have been cleared
cent->previousEvent = 0;
// if the previous snapshot this entity was updated in is at least
// an event window back in time then we can reset the previous event
if ( cent->snapShotTime < cg.time - EVENT_VALID_MSEC ) {
cent->previousEvent = 0;
}
cent->trailTime = cg.snap->serverTime;
@ -138,6 +140,9 @@ static void CG_TransitionSnapshot( void ) {
for ( i = 0 ; i < cg.snap->numEntities ; i++ ) {
cent = &cg_entities[ cg.snap->entities[ i ].number ];
CG_TransitionEntity( cent );
// remember time of snapshot this entity was last updated in
cent->snapShotTime = cg.snap->serverTime;
}
cg.nextSnap = NULL;

View file

@ -82,6 +82,13 @@ equ trap_CIN_SetExtents -79
equ trap_R_RemapShader -80
equ trap_S_AddRealLoopingSound -81
equ trap_S_StopLoopingSound -82
equ trap_CM_TempCapsuleModel -83
equ trap_CM_CapsuleTrace -84
equ trap_CM_TransformedCapsuleTrace -85
equ trap_R_AddAdditiveLightToScene -86
equ trap_GetEntityToken -87
equ trap_R_AddPolysToScene -88
equ trap_R_inPVS -89
equ memset -101

View file

@ -110,6 +110,10 @@ clipHandle_t trap_CM_TempBoxModel( const vec3_t mins, const vec3_t maxs ) {
return syscall( CG_CM_TEMPBOXMODEL, mins, maxs );
}
clipHandle_t trap_CM_TempCapsuleModel( const vec3_t mins, const vec3_t maxs ) {
return syscall( CG_CM_TEMPCAPSULEMODEL, mins, maxs );
}
int trap_CM_PointContents( const vec3_t p, clipHandle_t model ) {
return syscall( CG_CM_POINTCONTENTS, p, model );
}
@ -119,11 +123,17 @@ int trap_CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const
}
void trap_CM_BoxTrace( trace_t *results, const vec3_t start, const vec3_t end,
const vec3_t mins, const vec3_t maxs,
vec3_t mins, vec3_t maxs,
clipHandle_t model, int brushmask ) {
syscall( CG_CM_BOXTRACE, results, start, end, mins, maxs, model, brushmask );
}
void trap_CM_CapsuleTrace( trace_t *results, const vec3_t start, const vec3_t end,
const vec3_t mins, const vec3_t maxs,
clipHandle_t model, int brushmask ) {
syscall( CG_CM_CAPSULETRACE, results, start, end, mins, maxs, model, brushmask );
}
void trap_CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end,
const vec3_t mins, const vec3_t maxs,
clipHandle_t model, int brushmask,
@ -131,6 +141,13 @@ void trap_CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const ve
syscall( CG_CM_TRANSFORMEDBOXTRACE, results, start, end, mins, maxs, model, brushmask, origin, angles );
}
void trap_CM_TransformedCapsuleTrace( trace_t *results, const vec3_t start, const vec3_t end,
const vec3_t mins, const vec3_t maxs,
clipHandle_t model, int brushmask,
const vec3_t origin, const vec3_t angles ) {
syscall( CG_CM_TRANSFORMEDCAPSULETRACE, results, start, end, mins, maxs, model, brushmask, origin, angles );
}
int trap_CM_MarkFragments( int numPoints, const vec3_t *points,
const vec3_t projection,
int maxPoints, vec3_t pointBuffer,
@ -214,6 +231,10 @@ void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *
syscall( CG_R_ADDPOLYTOSCENE, hShader, numVerts, verts );
}
void trap_R_AddPolysToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts, int num ) {
syscall( CG_R_ADDPOLYSTOSCENE, hShader, numVerts, verts, num );
}
int trap_R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, vec3_t lightDir ) {
return syscall( CG_R_LIGHTFORPOINT, point, ambientLight, directedLight, lightDir );
}
@ -222,6 +243,10 @@ void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g
syscall( CG_R_ADDLIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) );
}
void trap_R_AddAdditiveLightToScene( const vec3_t org, float intensity, float r, float g, float b ) {
syscall( CG_R_ADDADDITIVELIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) );
}
void trap_R_RenderScene( const refdef_t *fd ) {
syscall( CG_R_RENDERSCENE, fd );
}
@ -369,3 +394,24 @@ void trap_CIN_SetExtents (int handle, int x, int y, int w, int h) {
syscall(CG_CIN_SETEXTENTS, handle, x, y, w, h);
}
/*
qboolean trap_loadCamera( const char *name ) {
return syscall( CG_LOADCAMERA, name );
}
void trap_startCamera(int time) {
syscall(CG_STARTCAMERA, time);
}
qboolean trap_getCameraInfo( int time, vec3_t *origin, vec3_t *angles) {
return syscall( CG_GETCAMERAINFO, time, origin, angles );
}
*/
qboolean trap_GetEntityToken( char *buffer, int bufferSize ) {
return syscall( CG_GET_ENTITY_TOKEN, buffer, bufferSize );
}
qboolean trap_R_inPVS( const vec3_t p1, const vec3_t p2 ) {
return syscall( CG_R_INPVS, p1, p2 );
}

View file

@ -710,6 +710,10 @@ static void CG_DamageBlendBlob( void ) {
return;
}
//if (cg.cameraMode) {
// return;
//}
// ragePro systems can't fade blends, so don't obscure the screen
if ( cgs.glconfig.hardwareType == GLHW_RAGEPRO ) {
return;
@ -721,6 +725,7 @@ static void CG_DamageBlendBlob( void ) {
return;
}
memset( &ent, 0, sizeof( ent ) );
ent.reType = RT_SPRITE;
ent.renderfx = RF_FIRST_PERSON;
@ -759,7 +764,20 @@ static int CG_CalcViewValues( void ) {
CG_CalcVrect();
ps = &cg.predictedPlayerState;
/*
if (cg.cameraMode) {
vec3_t origin, angles;
if (trap_getCameraInfo(cg.time, &origin, &angles)) {
VectorCopy(origin, cg.refdef.vieworg);
angles[ROLL] = 0;
VectorCopy(angles, cg.refdefViewAngles);
AnglesToAxis( cg.refdefViewAngles, cg.refdef.viewaxis );
return CG_CalcFov();
} else {
cg.cameraMode = qfalse;
}
}
*/
// intermission view
if ( ps->pm_type == PM_INTERMISSION ) {
VectorCopy( ps->origin, cg.refdef.vieworg );
@ -938,6 +956,7 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo
if ( !cg.hyperspace ) {
CG_AddPacketEntities(); // adter calcViewValues, so predicted player state is correct
CG_AddMarks();
CG_AddParticles ();
CG_AddLocalEntities();
}
CG_AddViewWeapon( &cg.predictedPlayerState );

View file

@ -260,41 +260,26 @@ CG_RailTrail
==========================
*/
void CG_RailTrail( clientInfo_t *ci, vec3_t start, vec3_t end ) {
vec3_t axis[36], move, move2, next_move, vec, temp;
float len;
int i, j, skip;
localEntity_t *le;
refEntity_t *re;
//
// rings
//
le = CG_AllocLocalEntity();
re = &le->refEntity;
le->leType = LE_FADE_RGB;
le->startTime = cg.time;
le->endTime = cg.time + cg_railTrailTime.value;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
re->shaderTime = cg.time / 1000.0f;
re->reType = RT_RAIL_RINGS;
re->customShader = cgs.media.railRingsShader;
VectorCopy( start, re->origin );
VectorCopy( end, re->oldorigin );
// nudge down a bit so it isn't exactly in center
re->origin[2] -= 8;
re->oldorigin[2] -= 8;
le->color[0] = ci->color[0] * 0.75;
le->color[1] = ci->color[1] * 0.75;
le->color[2] = ci->color[2] * 0.75;
le->color[3] = 1.0f;
AxisClear( re->axis );
//
// core
//
#define RADIUS 4
#define ROTATION 1
#define SPACING 5
start[2] -= 4;
VectorCopy (start, move);
VectorSubtract (end, start, vec);
len = VectorNormalize (vec);
PerpendicularVector(temp, vec);
for (i = 0 ; i < 36; i++) {
RotatePointAroundVector(axis[i], vec, temp, i * 10);//banshee 2.4 was 10
}
le = CG_AllocLocalEntity();
re = &le->refEntity;
@ -306,20 +291,77 @@ void CG_RailTrail( clientInfo_t *ci, vec3_t start, vec3_t end ) {
re->shaderTime = cg.time / 1000.0f;
re->reType = RT_RAIL_CORE;
re->customShader = cgs.media.railCoreShader;
VectorCopy( start, re->origin );
VectorCopy( end, re->oldorigin );
// nudge down a bit so it isn't exactly in center
re->origin[2] -= 8;
re->oldorigin[2] -= 8;
re->shaderRGBA[0] = ci->color1[0] * 255;
re->shaderRGBA[1] = ci->color1[1] * 255;
re->shaderRGBA[2] = ci->color1[2] * 255;
re->shaderRGBA[3] = 255;
le->color[0] = ci->color[0] * 0.75;
le->color[1] = ci->color[1] * 0.75;
le->color[2] = ci->color[2] * 0.75;
le->color[0] = ci->color1[0] * 0.75;
le->color[1] = ci->color1[1] * 0.75;
le->color[2] = ci->color1[2] * 0.75;
le->color[3] = 1.0f;
AxisClear( re->axis );
VectorMA(move, 20, vec, move);
VectorCopy(move, next_move);
VectorScale (vec, SPACING, vec);
if (cg_oldRail.integer != 0) {
// nudge down a bit so it isn't exactly in center
re->origin[2] -= 8;
re->oldorigin[2] -= 8;
return;
}
skip = -1;
j = 18;
for (i = 0; i < len; i += SPACING) {
if (i != skip) {
skip = i + SPACING;
le = CG_AllocLocalEntity();
re = &le->refEntity;
le->leFlags = LEF_PUFF_DONT_SCALE;
le->leType = LE_MOVE_SCALE_FADE;
le->startTime = cg.time;
le->endTime = cg.time + (i>>1) + 600;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
re->shaderTime = cg.time / 1000.0f;
re->reType = RT_SPRITE;
re->radius = 1.1f;
re->customShader = cgs.media.railRingsShader;
re->shaderRGBA[0] = ci->color2[0] * 255;
re->shaderRGBA[1] = ci->color2[1] * 255;
re->shaderRGBA[2] = ci->color2[2] * 255;
re->shaderRGBA[3] = 255;
le->color[0] = ci->color2[0] * 0.75;
le->color[1] = ci->color2[1] * 0.75;
le->color[2] = ci->color2[2] * 0.75;
le->color[3] = 1.0f;
le->pos.trType = TR_LINEAR;
le->pos.trTime = cg.time;
VectorCopy( move, move2);
VectorMA(move2, RADIUS , axis[j], move2);
VectorCopy(move2, le->pos.trBase);
le->pos.trDelta[0] = axis[j][0]*6;
le->pos.trDelta[1] = axis[j][1]*6;
le->pos.trDelta[2] = axis[j][2]*6;
}
VectorAdd (move, vec, move);
j = j + ROTATION < 36 ? j + ROTATION : (j + ROTATION) % 36;
}
}
/*
@ -337,6 +379,10 @@ static void CG_RocketTrail( centity_t *ent, const weaponInfo_t *wi ) {
vec3_t up;
localEntity_t *smoke;
if ( cg_noProjectileTrail.integer ) {
return;
}
up[0] = 0;
up[1] = 0;
up[2] = 0;
@ -401,6 +447,10 @@ static void CG_NailTrail( centity_t *ent, const weaponInfo_t *wi ) {
vec3_t up;
localEntity_t *smoke;
if ( cg_noProjectileTrail.integer ) {
return;
}
up[0] = 0;
up[1] = 0;
up[2] = 0;
@ -450,6 +500,101 @@ static void CG_NailTrail( centity_t *ent, const weaponInfo_t *wi ) {
}
#endif
/*
==========================
CG_NailTrail
==========================
*/
static void CG_PlasmaTrail( centity_t *cent, const weaponInfo_t *wi ) {
localEntity_t *le;
refEntity_t *re;
entityState_t *es;
vec3_t velocity, xvelocity, origin;
vec3_t offset, xoffset;
vec3_t v[3];
int t, startTime, step;
float waterScale = 1.0f;
if ( cg_noProjectileTrail.integer || cg_oldPlasma.integer ) {
return;
}
step = 50;
es = &cent->currentState;
startTime = cent->trailTime;
t = step * ( (startTime + step) / step );
BG_EvaluateTrajectory( &es->pos, cg.time, origin );
le = CG_AllocLocalEntity();
re = &le->refEntity;
velocity[0] = 60 - 120 * crandom();
velocity[1] = 40 - 80 * crandom();
velocity[2] = 100 - 200 * crandom();
le->leType = LE_MOVE_SCALE_FADE;
le->leFlags = LEF_TUMBLE;
le->leBounceSoundType = LEBS_NONE;
le->leMarkType = LEMT_NONE;
le->startTime = cg.time;
le->endTime = le->startTime + 600;
le->pos.trType = TR_GRAVITY;
le->pos.trTime = cg.time;
AnglesToAxis( cent->lerpAngles, v );
offset[0] = 2;
offset[1] = 2;
offset[2] = 2;
xoffset[0] = offset[0] * v[0][0] + offset[1] * v[1][0] + offset[2] * v[2][0];
xoffset[1] = offset[0] * v[0][1] + offset[1] * v[1][1] + offset[2] * v[2][1];
xoffset[2] = offset[0] * v[0][2] + offset[1] * v[1][2] + offset[2] * v[2][2];
VectorAdd( origin, xoffset, re->origin );
VectorCopy( re->origin, le->pos.trBase );
if ( CG_PointContents( re->origin, -1 ) & CONTENTS_WATER ) {
waterScale = 0.10f;
}
xvelocity[0] = velocity[0] * v[0][0] + velocity[1] * v[1][0] + velocity[2] * v[2][0];
xvelocity[1] = velocity[0] * v[0][1] + velocity[1] * v[1][1] + velocity[2] * v[2][1];
xvelocity[2] = velocity[0] * v[0][2] + velocity[1] * v[1][2] + velocity[2] * v[2][2];
VectorScale( xvelocity, waterScale, le->pos.trDelta );
AxisCopy( axisDefault, re->axis );
re->shaderTime = cg.time / 1000.0f;
re->reType = RT_SPRITE;
re->radius = 0.25f;
re->customShader = cgs.media.railRingsShader;
le->bounceFactor = 0.3f;
re->shaderRGBA[0] = wi->flashDlightColor[0] * 63;
re->shaderRGBA[1] = wi->flashDlightColor[1] * 63;
re->shaderRGBA[2] = wi->flashDlightColor[2] * 63;
re->shaderRGBA[3] = 63;
le->color[0] = wi->flashDlightColor[0] * 0.2;
le->color[1] = wi->flashDlightColor[1] * 0.2;
le->color[2] = wi->flashDlightColor[2] * 0.2;
le->color[3] = 0.25f;
le->angles.trType = TR_LINEAR;
le->angles.trTime = cg.time;
le->angles.trBase[0] = rand()&31;
le->angles.trBase[1] = rand()&31;
le->angles.trBase[2] = rand()&31;
le->angles.trDelta[0] = 1;
le->angles.trDelta[1] = 0.5;
le->angles.trDelta[2] = 0;
}
/*
==========================
CG_GrappleTrail
@ -494,8 +639,7 @@ CG_GrenadeTrail
==========================
*/
static void CG_GrenadeTrail( centity_t *ent, const weaponInfo_t *wi ) {
//Elder: removed smoke trail
//CG_RocketTrail( ent, wi );
CG_RocketTrail( ent, wi );
}
@ -536,7 +680,6 @@ void CG_RegisterWeapon( int weaponNum ) {
break;
}
}
if ( !item->classname ) {
CG_Error( "Couldn't find weapon %i", weaponNum );
}
@ -598,8 +741,7 @@ void CG_RegisterWeapon( int weaponNum ) {
weaponInfo->firstModel = trap_R_RegisterModel( path );
if ( !weaponInfo->handsModel ) {
//Elder: WTF!?
weaponInfo->handsModel = trap_R_RegisterModel( "models/weapons2/mk23/mk23_hand.md3" );
weaponInfo->handsModel = trap_R_RegisterModel( "models/weapons2/shotgun/shotgun_hand.md3" );
}
//Elder: if no _1st model, point to the weaponModel... this may get funky :)
@ -1018,7 +1160,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
// refEntity_t barrel;
refEntity_t flash;
vec3_t angles;
float frac;
// float frac;
weapon_t weaponNum;
weaponInfo_t *weapon;
centity_t *nonPredictedCent;
@ -1225,9 +1367,9 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
clientInfo_t *ci;
ci = &cgs.clientinfo[ cent->currentState.clientNum ];
flash.shaderRGBA[0] = 255 * ci->color[0];
flash.shaderRGBA[1] = 255 * ci->color[1];
flash.shaderRGBA[2] = 255 * ci->color[2];
flash.shaderRGBA[0] = 255 * ci->color1[0];
flash.shaderRGBA[1] = 255 * ci->color1[1];
flash.shaderRGBA[2] = 255 * ci->color1[2];
}
*/
//Blaze: No flash
@ -1266,33 +1408,12 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
// add rail trail
//Blaze: no need for this
//CG_SpawnRailTrail( cent, flash.origin );
/*
if ( team == TEAM_RED ) {
col = 1;
}
else if ( team == TEAM_BLUE ) {
col = 2;
}
else {
col = 0;
}
// make a dlight for the flash
if ( weapon->flashDlightColor[col][0] || weapon->flashDlightColor[col][1] || weapon->flashDlightColor[col][2] ) {
trap_R_AddLightToScene( flash.origin, 300 + (rand()&31), weapon->flashDlightColor[col][0],
weapon->flashDlightColor[col][1], weapon->flashDlightColor[col][2] );
}
*/
if ( weapon->flashDlightColor[0] || weapon->flashDlightColor[1] || weapon->flashDlightColor[2] ) {
trap_R_AddLightToScene( flash.origin, 300 + (rand()&31), weapon->flashDlightColor[0],
weapon->flashDlightColor[1], weapon->flashDlightColor[2] );
}
}
//if (ps)
// CG_PositionRotatedEntityOnTag( &flash, &gun, weapon->firstModel, "tag_flash");
//else
// CG_PositionRotatedEntityOnTag( &flash, &gun, weapon->weaponModel, "tag_flash");
}
/*
@ -1322,11 +1443,13 @@ void CG_AddViewWeapon( playerState_t *ps ) {
return;
}
// no gun if in third person view
// no gun if in third person view or a camera is active
//if ( cg.renderingThirdPerson || cg.cameraMode) {
if ( cg.renderingThirdPerson ) {
return;
}
// allow the gun to be completely removed
if ( !cg_drawGun.integer ) {
//Blaze: Removed these
@ -2157,141 +2280,8 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im
duration = 600;
switch ( weapon ) {
/*
#ifdef MISSIONPACK
case WP_NAILGUN:
if( soundType == IMPACTSOUND_FLESH ) {
sfx = cgs.media.sfx_nghitflesh;
} else if( soundType == IMPACTSOUND_METAL ) {
sfx = cgs.media.sfx_nghitmetal;
} else {
sfx = cgs.media.sfx_nghit;
}
mark = cgs.media.holeMarkShader;
radius = 12;
break;
#endif
case WP_LIGHTNING:
// no explosion at LG impact, it is added with the beam
r = rand() & 3;
if ( r < 2 ) {
sfx = cgs.media.sfx_lghit2;
} else if ( r == 2 ) {
sfx = cgs.media.sfx_lghit1;
} else {
sfx = cgs.media.sfx_lghit3;
}
mark = cgs.media.holeMarkShader;
radius = 12;
break;
#ifdef MISSIONPACK
case WP_PROX_LAUNCHER:
mod = cgs.media.dishFlashModel;
shader = cgs.media.grenadeExplosionShader;
sfx = cgs.media.sfx_proxexp;
mark = cgs.media.burnMarkShader;
radius = 64;
light = 300;
isSprite = qtrue;
break;
#endif
case WP_GRENADE_LAUNCHER:
mod = cgs.media.dishFlashModel;
shader = cgs.media.grenadeExplosionShader;
sfx = cgs.media.sfx_rockexp;
mark = cgs.media.burnMarkShader;
radius = 64;
light = 300;
isSprite = qtrue;
break;
case WP_ROCKET_LAUNCHER:
mod = cgs.media.dishFlashModel;
shader = cgs.media.rocketExplosionShader;
sfx = cgs.media.sfx_rockexp;
mark = cgs.media.burnMarkShader;
radius = 64;
light = 300;
isSprite = qtrue;
duration = 1000;
lightColor[0] = 1;
lightColor[1] = 0.75;
lightColor[2] = 0.0;
// CG_BigExplode( origin );
break;
case WP_RAILGUN:
mod = cgs.media.ringFlashModel;
shader = cgs.media.railExplosionShader;
sfx = cgs.media.sfx_plasmaexp;
mark = cgs.media.energyMarkShader;
radius = 24;
break;
case WP_PLASMAGUN:
mod = cgs.media.ringFlashModel;
shader = cgs.media.plasmaExplosionShader;
sfx = cgs.media.sfx_plasmaexp;
mark = cgs.media.energyMarkShader;
radius = 16;
break;
case WP_BFG:
mod = cgs.media.dishFlashModel;
shader = cgs.media.bfgExplosionShader;
sfx = cgs.media.sfx_rockexp;
mark = cgs.media.burnMarkShader;
radius = 32;
isSprite = qtrue;
break;
case WP_SHOTGUN:
mod = cgs.media.bulletFlashModel;
shader = cgs.media.bulletExplosionShader;
mark = cgs.media.bulletMarkShader;
sfx = 0;
radius = 4;
break;
#ifdef MISSIONPACK
case WP_CHAINGUN:
mod = cgs.media.bulletFlashModel;
if( soundType == IMPACTSOUND_FLESH ) {
sfx = cgs.media.sfx_chghitflesh;
} else if( soundType == IMPACTSOUND_METAL ) {
sfx = cgs.media.sfx_chghitmetal;
} else {
sfx = cgs.media.sfx_chghit;
}
mark = cgs.media.bulletMarkShader;
r = rand() & 3;
if ( r < 2 ) {
sfx = cgs.media.sfx_ric1;
} else if ( r == 2 ) {
sfx = cgs.media.sfx_ric2;
} else {
sfx = cgs.media.sfx_ric3;
}
radius = 8;
break;
#endif
case WP_MACHINEGUN:
mod = cgs.media.bulletFlashModel;
shader = cgs.media.bulletExplosionShader;
mark = cgs.media.bulletMarkShader;
r = rand() & 3;
if ( r < 2 ) {
sfx = cgs.media.sfx_ric1;
} else if ( r == 2 ) {
sfx = cgs.media.sfx_ric2;
} else {
sfx = cgs.media.sfx_ric3;
}
radius = 8;
break;
}
*///Blaze: Reaction M4
//Blaze: Reaction M4
case WP_M4:
mod = cgs.media.bulletFlashModel;
shader = cgs.media.bulletExplosionShader;
@ -2332,9 +2322,9 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im
mark = cgs.media.bulletMarkShader;
r = rand() & 3;
if ( r < 2 ) {
if ( r == 0 ) {
sfx = cgs.media.sfx_ric1;
} else if ( r == 2 ) {
} else if ( r == 1 ) {
sfx = cgs.media.sfx_ric2;
} else {
sfx = cgs.media.sfx_ric3;
@ -2415,7 +2405,7 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im
/*
if ( weapon == WP_RAILGUN ) {
// colorize with client color
VectorCopy( cgs.clientinfo[clientNum].color, le->color );
VectorCopy( cgs.clientinfo[clientNum].color1, le->color );
}
*/
}
@ -2588,8 +2578,7 @@ static void CG_ShotgunPellet( vec3_t start, vec3_t end, int skipNum, int shellWe
CG_ShotgunPattern
Perform the same traces the server did to locate the
hit splashes (FIXME: random seed isn't synce anymore)
Elder: hopefully fixed the seed problem
hit splashes
================
*/
static void CG_ShotgunPattern( vec3_t origin, vec3_t origin2, int otherEntNum, int shotType, int seed ) {

View file

@ -25,8 +25,8 @@ CFG=cgame - Win32 Debug TA
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
# PROP Scc_ProjName ""$/MissionPack/code/cgame", NPAAAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe

View file

@ -6,37 +6,14 @@
--------------------Configuration: cgame - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP10F.tmp" with contents
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP2EA.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"
"c:\reaction\game\q_math.c"
"c:\reaction\game\q_shared.c"
"c:\reaction\ui\ui_shared.c"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP10F.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP110.tmp" with contents
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP2EA.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP2EB.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
@ -65,51 +42,18 @@ Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP110.tmp" with con
.\Debug\q_shared.obj
.\Debug\ui_shared.obj
]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP110.tmp"
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP2EB.tmp"
<h3>Output Window</h3>
Compiling...
bg_misc.c
bg_pmove.c
bg_slidemove.c
cg_consolecmds.c
cg_draw.c
c:\reaction\cgame\cg_draw.c(506) : warning C4101: 'angles' : unreferenced local variable
c:\reaction\cgame\cg_draw.c(507) : warning C4101: 'origin' : unreferenced local variable
c:\reaction\cgame\cg_draw.c(500) : warning C4101: 'color' : unreferenced local variable
cg_drawtools.c
cg_effects.c
cg_ents.c
cg_event.c
cg_info.c
cg_localents.c
cg_main.c
cg_marks.c
cg_players.c
c:\reaction\cgame\cg_players.c(1056) : error C2198: 'CG_RunLerpFrame' : too few actual parameters
c:\reaction\cgame\cg_players.c(1058) : error C2198: 'CG_RunLerpFrame' : too few actual parameters
c:\reaction\cgame\cg_players.c(1065) : error C2198: 'CG_RunLerpFrame' : too few actual parameters
c:\reaction\cgame\cg_players.c(1526) : error C2198: 'CG_RunLerpFrame' : too few actual parameters
cg_playerstate.c
c:\reaction\cgame\cg_playerstate.c(345) : warning C4101: 'sfx' : unreferenced local variable
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_weapons.c(560) : warning C4013: 'CG_ParseWeaponAnimFile' undefined; assuming extern returning int
c:\reaction\cgame\cg_weapons.c(957) : warning C4101: 'frac' : unreferenced local variable
c:\reaction\cgame\cg_weapons.c(1907) : warning C4101: 'i' : unreferenced local variable
q_math.c
q_shared.c
ui_shared.c
Error executing cl.exe.
Linking...
Creating library Debug/cgamex86.lib and object Debug/cgamex86.exp
<h3>Results</h3>
cgamex86.dll - 4 error(s), 7 warning(s)
cgamex86.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>