From ac334633df861a45125a19be9f379c4b55eaaa92 Mon Sep 17 00:00:00 2001 From: Harry Young Date: Mon, 12 Dec 2011 21:52:43 +0100 Subject: [PATCH] Manual revert to make sure things are level here. Signed-off-by: Harry Young --- cgame/cg_env.c | 11 +++++------ cgame/cg_lua.c | 4 ++-- cgame/cg_servercmds.c | 4 ++-- cgame/cgame.vcxproj | 2 +- game/bg_public.h | 4 ++-- game/g_fx.c | 6 ++---- game/g_trigger.c | 2 +- game/g_turrets.c | 7 ++----- game/q_shared.h | 4 ++++ 9 files changed, 21 insertions(+), 23 deletions(-) diff --git a/cgame/cg_env.c b/cgame/cg_env.c index 190801b..c3fec76 100644 --- a/cgame/cg_env.c +++ b/cgame/cg_env.c @@ -1241,13 +1241,11 @@ void CG_SmallSpark( vec3_t origin, vec3_t normal ) { vec3_t dir, direction, start, end, velocity; float scale; - float alpha; int numSparks; - int j; - int i; AngleVectors( normal, normal, NULL, NULL ); + int j; for ( j = 0; j < 3; j ++ ) normal[j] = normal[j] + (0.1f * crandom()); @@ -1255,6 +1253,7 @@ void CG_SmallSpark( vec3_t origin, vec3_t normal ) numSparks = 6 + (random() * 4.0f ); + int i; for ( i = 0; i < numSparks; i++ ) { scale = 0.1f + (random() *0.2f ); @@ -1279,7 +1278,7 @@ void CG_SmallSpark( vec3_t origin, vec3_t normal ) VectorMA( origin, 1, normal, direction ); scale = 2.0f + (random() * 3.0f ); - alpha = 0.6f + (random() * 0.4f ); + float alpha = 0.6f + (random() * 0.4f ); VectorSet( velocity, crandom() * 2, crandom() * 2, 8 + random() * 4 ); VectorMA( velocity, 5, normal, velocity ); @@ -1304,7 +1303,6 @@ void CG_FireLaser( vec3_t start, vec3_t end, vec3_t normal, vec3_t laserRGB, flo sRGB; float scale = 1.0f; int life = 0; - int t; // Orient the laser spray VectorSubtract( end, start, dir ); @@ -1349,6 +1347,7 @@ void CG_FireLaser( vec3_t start, vec3_t end, vec3_t normal, vec3_t laserRGB, flo 0.0f, 200, cgs.media.waterDropShader ); + int t; for ( t=0; t < 2; t ++ ) { VectorMA( pos, crandom() * 0.5f, right, work ); @@ -2050,7 +2049,7 @@ void CG_ShimmeryThing( vec3_t start, vec3_t end, vec3_t content ) AngleVectors( angles, NULL, dir, NULL ); // See if the effect should be tapered at the top - if ( taper == 2 ) + if ( taper = 2 ) { VectorMA( start, content[1] * 0.25f, dir, top ); } diff --git a/cgame/cg_lua.c b/cgame/cg_lua.c index 71a5c58..1281e63 100644 --- a/cgame/cg_lua.c +++ b/cgame/cg_lua.c @@ -99,8 +99,8 @@ qboolean LoadLuaFile(char *path, int num_vm) qboolean CG_LuaInit() { - /*char fxfilename[MAX_QPATH]; - fileHandle_t fxfile;*/ + char fxfilename[MAX_QPATH]; + fileHandle_t fxfile; CG_Printf("------- CG_LuaInit -------\n"); diff --git a/cgame/cg_servercmds.c b/cgame/cg_servercmds.c index bfa65af..1346d43 100644 --- a/cgame/cg_servercmds.c +++ b/cgame/cg_servercmds.c @@ -637,8 +637,8 @@ void CG_ShaderStateChanged(void) { if(!o) return; while (o && *o) { - n = (char *)strstr(o, "="); - if (n && n[0] && *n) { + n = strstr(o, "="); + if (n && *n) { strncpy(originalShader, o, n-o); originalShader[n-o] = 0; n++; diff --git a/cgame/cgame.vcxproj b/cgame/cgame.vcxproj index 0225d21..757edf8 100644 --- a/cgame/cgame.vcxproj +++ b/cgame/cgame.vcxproj @@ -48,7 +48,7 @@ AllRules.ruleset - $(IncludePath) + C:\MinGW\include;$(IncludePath) diff --git a/game/bg_public.h b/game/bg_public.h index c65c5bd..0ed5605 100644 --- a/game/bg_public.h +++ b/game/bg_public.h @@ -10,8 +10,8 @@ // because games can change separately from the main system version, we need a // second version that must match between game and cgame -#define RPGX_VERSION "2.2 Beta wc121211a" -#define RPGX_COMPILEDATE "12/12/11" +#define RPGX_VERSION "RPG-X v2.2 wc121211a" +#define RPGX_COMPILEDATE "20/05/11" #define RPGX_COMPILEDBY "GSIO01" //const char GAME_VERSION[] = strcat("RPG-X v",RPGX_VERSION); //ehem why not: diff --git a/game/g_fx.c b/game/g_fx.c index ffba7b3..a92725e 100644 --- a/game/g_fx.c +++ b/game/g_fx.c @@ -1524,8 +1524,6 @@ void plasma_link( gentity_t *ent ) //------------------------------------------ void SP_fx_plasma( gentity_t *ent ) { - int t; - if (!ent->startRGBA) { ent->startRGBA[0] = 100; @@ -1542,6 +1540,7 @@ void SP_fx_plasma( gentity_t *ent ) G_SpawnInt( "damage", "0", &ent->damage ); // Convert from range of 0-255 to 0-1 + int t; for (t=0; t < 4; t++) { ent->startRGBA[t] = ent->startRGBA[t] / 255; @@ -1891,8 +1890,6 @@ void borg_energy_beam_link( gentity_t *ent ) //------------------------------------------ void SP_fx_borg_energy_beam( gentity_t *ent ) { - int t; - G_SpawnFloat( "radius", "30", &ent->distance ); G_SpawnFloat( "speed", "100", &ent->speed ); if (!ent->startRGBA) @@ -1902,6 +1899,7 @@ void SP_fx_borg_energy_beam( gentity_t *ent ) } // Convert from range of 0-255 to 0-1 + int t; for (t=0; t < 4; t++) { ent->startRGBA[t] = ent->startRGBA[t] / 255; diff --git a/game/g_trigger.c b/game/g_trigger.c index 2addc5c..0aa61c5 100644 --- a/game/g_trigger.c +++ b/game/g_trigger.c @@ -260,7 +260,7 @@ void Use_target_push( gentity_t *self, gentity_t *other, gentity_t *activator ) } //RPG-X: J2J noclip use - if ( (activator->client->ps.pm_type != PM_NORMAL) || (activator->client->ps.pm_type != PM_NOCLIP)) { + if ( activator->client->ps.pm_type != PM_NORMAL || activator->client->ps.pm_type != PM_NOCLIP) { return; } diff --git a/game/g_turrets.c b/game/g_turrets.c index 679e875..83f98a9 100644 --- a/game/g_turrets.c +++ b/game/g_turrets.c @@ -962,14 +962,11 @@ void laser_arm_start (gentity_t *base) { vec3_t armAngles; vec3_t headAngles; - gentity_t *arm; - gentity_t *head; - base->think = 0; //We're the base, spawn the arm and head - arm = G_Spawn(); - head = G_Spawn(); + gentity_t *arm = G_Spawn(); + gentity_t *head = G_Spawn(); VectorCopy( base->s.angles, armAngles ); VectorCopy( base->s.angles, headAngles ); diff --git a/game/q_shared.h b/game/q_shared.h index 0f64215..b8578f1 100644 --- a/game/q_shared.h +++ b/game/q_shared.h @@ -1167,6 +1167,10 @@ typedef struct entityState_s { int generic1; int generic2; #endif + +#ifdef XTRA + int healthPercent; // XTRA +#endif } entityState_t; typedef enum {