From cb90148a07272a89a84bcf0104d08189eb4214aa Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Mon, 29 Oct 2001 09:58:44 +0000 Subject: [PATCH] Fixing errors that caused errors/Warnings when compiling under linux. --- reaction/cgame/cg_particles.c | 6 ++++-- reaction/cgame/cg_predict.c | 4 +++- reaction/game/inv.h | 3 ++- reaction/game/q_shared.h | 7 +++++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/reaction/cgame/cg_particles.c b/reaction/cgame/cg_particles.c index c1f04de5..2f726405 100644 --- a/reaction/cgame/cg_particles.c +++ b/reaction/cgame/cg_particles.c @@ -1231,7 +1231,8 @@ void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int duratio // find the animation string for (anim=0; shaderAnimNames[anim]; anim++) { - if (!stricmp( animStr, shaderAnimNames[anim] )) +// JBravo - It was stricmp. Changed to Q_stricmp + if (!Q_stricmp( animStr, shaderAnimNames[anim] )) break; } if (!shaderAnimNames[anim]) { @@ -1811,7 +1812,8 @@ void CG_ParticleBloodCloud (centity_t *cent, vec3_t origin, vec3_t dir) } -void CG_ParticleSparks (vec3_t org, vec3_t vel, int duration, float x, float y, float speed) +// JBravo - there was "float scale" missing from the declaration here. Caused errors under linux. +void CG_ParticleSparks (vec3_t org, vec3_t vel, int duration, float x, float y, float speed, float scale) { cparticle_t *p; diff --git a/reaction/cgame/cg_predict.c b/reaction/cgame/cg_predict.c index 9681f5b5..7358ec4b 100644 --- a/reaction/cgame/cg_predict.c +++ b/reaction/cgame/cg_predict.c @@ -245,6 +245,8 @@ static void CG_TouchItem( centity_t *cent ) { gitem_t *item; //Blaze: No item prediction return; +// JBravo - Compiler warnings over unreached code. +/* if ( !cg_predictItems.integer ) { return; } @@ -297,7 +299,7 @@ static void CG_TouchItem( centity_t *cent ) { if ( !cg.predictedPlayerState.ammo[ item->giTag ] ) { cg.predictedPlayerState.ammo[ item->giTag ] = 1; } - } + } */ } diff --git a/reaction/game/inv.h b/reaction/game/inv.h index ad11d116..ab879417 100644 --- a/reaction/game/inv.h +++ b/reaction/game/inv.h @@ -207,4 +207,5 @@ #define WEAPONINDEX_NAILGUN 11 #define WEAPONINDEX_PROXLAUNCHER 12 #define WEAPONINDEX_CHAINGUN 13 -*/ \ No newline at end of file +*/ + diff --git a/reaction/game/q_shared.h b/reaction/game/q_shared.h index 785ab5a3..5565f4a8 100644 --- a/reaction/game/q_shared.h +++ b/reaction/game/q_shared.h @@ -242,7 +242,8 @@ static inline float LittleFloat (const float l) { return FloatSwap(&l); } #define BOTLIB_HARD_LINKED #endif -#if !idppc +// JBravo: this causes compile time issues under Linux +/* #if !idppc inline static short BigShort( short l) { return ShortSwap(l); } #define LittleShort inline static int BigLong(int l) { return LongSwap(l); } @@ -256,7 +257,7 @@ inline static short LittleShort(short l) { return ShortSwap(l); } inline static int LittleLong (int l) { return LongSwap(l); } #define BigFloat inline static float LittleFloat (const float *l) { return FloatSwap(l); } -#endif +#endif */ #endif @@ -601,6 +602,8 @@ typedef struct { float v[3]; } vec3struct_t; #define VectorCopy(a,b) *(vec3struct_t *)b=*(vec3struct_t *)a; +// JBravo: ID_INLINE get defined again. Error.... +#undef ID_INLINE #define ID_INLINE static #endif #endif