diff options
-rw-r--r-- | src/cgame/cg_event.c | 1 | ||||
-rw-r--r-- | src/game/bg_mod.h | 1 | ||||
-rw-r--r-- | src/game/g_admin.c | 2 | ||||
-rw-r--r-- | src/game/g_combat.c | 24 | ||||
-rw-r--r-- | src/game/g_csw.h | 55 | ||||
-rw-r--r-- | src/game/g_local.h | 5 | ||||
-rw-r--r-- | src/game/g_weapon.c | 5 |
7 files changed, 46 insertions, 47 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 4a86235..ac4b0e7 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -371,6 +371,7 @@ static void CG_Obituary( entityState_t *ent ) message2 = className; break; case MOD_LEVEL2_CLAW: + case MOD_LEVEL2_CLAW_UPG: message = "^5was clawed by^7"; Com_sprintf( className, 64, "^5's %s", BG_ClassConfig( PCL_ALIEN_LEVEL2 )->humanName ); diff --git a/src/game/bg_mod.h b/src/game/bg_mod.h index e6b1e53..5ab9fb2 100644 --- a/src/game/bg_mod.h +++ b/src/game/bg_mod.h @@ -39,6 +39,7 @@ MOD( MOD_LEVEL5_POUNCE, CSW_UNKNOWN ), MOD( MOD_LEVEL5_PRICKLES, CSW_LEVEL5_ALT ), MOD( MOD_LEVEL3_BOUNCEBALL, CSW_LEVEL3_ALT ), MOD( MOD_LEVEL2_CLAW, CSW_LEVEL2 ), +MOD( MOD_LEVEL2_CLAW_UPG, CSW_LEVEL2_UPG ), MOD( MOD_LEVEL2_ZAP, CSW_LEVEL2_ALT ), MOD( MOD_LEVEL5_CLAW, CSW_LEVEL5 ), MOD( MOD_LEVEL5_ZAP, CSW_UNKNOWN ), diff --git a/src/game/g_admin.c b/src/game/g_admin.c index a6f5f78..c29d67e 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -4387,7 +4387,7 @@ qboolean G_admin_stats( gentity_t *ent ) qboolean header = qfalse; const static char *cswNames[ ] = { -#define CSW(a,b,c) b +#define CSW(a,b,c,d) c #include "g_csw.h" #undef CSW }; diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 337ebf1..c79f97d 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -1433,14 +1433,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, targ->credits[ attacker->client->ps.clientNum ] += take; } - // special cases... - if( mod == MOD_LEVEL2_CLAW && damage_orig == LEVEL2_CLAW_UPG_DMG ) - G_CombatStats_Hit( attacker, targ, CSW_LEVEL2_UPG, take ); - else if( ( mod == MOD_LCANNON || mod == MOD_LCANNON_SPLASH ) && - inflictor->s.generic1 == WPM_SECONDARY ) - G_CombatStats_Hit( attacker, targ, CSW_LCANNON_ALT, take ); - else - G_CombatStats_HitMOD( attacker, targ, mod, take ); + G_CombatStats_HitMOD( attacker, targ, mod, take ); if( targ->health <= 0 ) { @@ -1790,7 +1783,14 @@ const static combatStatsWeapon_t modToCsw[ ] = const static char *cswStrings[ ] = { -#define CSW(a,b,c) #a +#define CSW(a,b,c,d) #a +#include "g_csw.h" +#undef CSW +}; + +const static int cswToMod[ ] = +{ +#define CSW(a,b,c,d) b #include "g_csw.h" #undef CSW }; @@ -1989,14 +1989,14 @@ void G_LogCombatSettings( void ) char buffer[ 4096 ], *p = buffer; static const int cswDamages[ ] = { -#define CSW(a,b,c) (c) +#define CSW(a,b,c,d) (d) #include "g_csw.h" #undef CSW }; for( i = 0; i < CSW_MAX; i++ ) { - Com_sprintf( p, 4096 - ( p - buffer ), " %s %i", cswStrings[ i ], cswDamages[ i ] ); + Com_sprintf( p, 4096 - ( p - buffer ), " %s %i", modNames[ cswToMod[ i ] ], cswDamages[ i ] ); while( *p ) p++; } @@ -2026,7 +2026,7 @@ void G_LogCombatStats( gentity_t *ent ) Com_sprintf( p, 4096 - ( p - buffer ), " %s %i,%i,%i,%i,%i,%i", - cswStrings[ i ], + modNames[ cswToMod[ i ] ], cs->fired, cs->dealt[ CSD_ENEMY ], cs->dealt[ CSD_FRIENDLY ], diff --git a/src/game/g_csw.h b/src/game/g_csw.h index e37313b..96158b7 100644 --- a/src/game/g_csw.h +++ b/src/game/g_csw.h @@ -1,32 +1,31 @@ -CSW( CSW_UNKNOWN, NULL, 0 ), +CSW( CSW_UNKNOWN, MOD_UNKNOWN, NULL, 0 ), -CSW( CSW_BLASTER, "Blaster", BLASTER_DMG ), -CSW( CSW_MACHINEGUN, "Rifle", RIFLE_DMG ), -CSW( CSW_PAINSAW, "Pain Saw", PAINSAW_DAMAGE ), -CSW( CSW_PAINSAW_ALT, "Pain Saw Blade", PAINSAW_DAMAGE2 ), -CSW( CSW_SHOTGUN, "Shotgun", SHOTGUN_DMG * SHOTGUN_PELLETS ), -CSW( CSW_LASGUN, "Las Gun", LASGUN_DAMAGE ), -CSW( CSW_MDRIVER, "Mass Driver", MDRIVER_DMG ), -CSW( CSW_CHAINGUN, "Chaingun", CHAINGUN_DMG ), -CSW( CSW_PRIFLE, "Pulse Rifle", PRIFLE_DMG ), -CSW( CSW_FLAMER, "Flame Thrower", FLAMER_DMG ), -CSW( CSW_LIGHTNING, "Lightning Gun", LIGHTNING_DAMAGE ), -CSW( CSW_LCANNON, "Lucifer Cannon", LCANNON_DAMAGE ), -CSW( CSW_LCANNON_ALT, "Lucifer Alt.", LCANNON_SECONDARY_DAMAGE ), -CSW( CSW_ROCKETL, "Rocket Launcher", ROCKETL_DAMAGE ), -CSW( CSW_GRENADE, "Grenade", GRENADE_DAMAGE ), +CSW( CSW_BLASTER, MOD_BLASTER, "Blaster", BLASTER_DMG ), +CSW( CSW_MACHINEGUN, MOD_MACHINEGUN, "Rifle", RIFLE_DMG ), +CSW( CSW_PAINSAW, MOD_PAINSAW, "Pain Saw", PAINSAW_DAMAGE ), +CSW( CSW_PAINSAW_ALT, MOD_PSAWBLADE, "Pain Saw Blade", PAINSAW_DAMAGE2 ), +CSW( CSW_SHOTGUN, MOD_SHOTGUN, "Shotgun", SHOTGUN_DMG * SHOTGUN_PELLETS ), +CSW( CSW_LASGUN, MOD_LASGUN, "Las Gun", LASGUN_DAMAGE ), +CSW( CSW_MDRIVER, MOD_MDRIVER, "Mass Driver", MDRIVER_DMG ), +CSW( CSW_CHAINGUN, MOD_CHAINGUN, "Chaingun", CHAINGUN_DMG ), +CSW( CSW_PRIFLE, MOD_PRIFLE, "Pulse Rifle", PRIFLE_DMG ), +CSW( CSW_FLAMER, MOD_FLAMER, "Flame Thrower", FLAMER_DMG ), +CSW( CSW_LIGHTNING, MOD_LIGHTNING, "Lightning Gun", LIGHTNING_DAMAGE ), +CSW( CSW_LCANNON, MOD_LCANNON, "Lucifer Cannon", LCANNON_DAMAGE ), +CSW( CSW_ROCKETL, MOD_ROCKETL, "Rocket Launcher", ROCKETL_DAMAGE ), +CSW( CSW_GRENADE, MOD_GRENADE, "Grenade", GRENADE_DAMAGE ), -CSW( CSW_ABUILDER, "Granger", ABUILDER_CLAW_DMG ), -CSW( CSW_ABUILDER_ALT, "Granger Spit", ABUILDER_BLOB_DMG ), -CSW( CSW_LEVEL1, "Basilisk", LEVEL1_CLAW_DMG ), -CSW( CSW_LEVEL2, "Marauder", LEVEL2_CLAW_DMG ), -CSW( CSW_LEVEL2_UPG, "Adv. Marauder", LEVEL2_CLAW_UPG_DMG ), -CSW( CSW_LEVEL2_ALT, "Marauder Zap", LEVEL2_AREAZAP_DMG ), -CSW( CSW_LEVEL3, "Dragoon", LEVEL3_CLAW_DMG ), -CSW( CSW_LEVEL3_ALT, "Dragoon Barb", LEVEL3_BOUNCEBALL_DMG ), -CSW( CSW_LEVEL4, "Tyrant", LEVEL4_CLAW_DMG ), -CSW( CSW_LEVEL4_ALT, "Tyrant Flames", 50 ), -CSW( CSW_LEVEL5, "Hummel", LEVEL5_CLAW_DMG ), -CSW( CSW_LEVEL5_ALT, "Hummel Prickles", LEVEL5_PRICKLES_DMG ) +CSW( CSW_ABUILDER, MOD_ABUILDER_CLAW, "Granger", ABUILDER_CLAW_DMG ), +CSW( CSW_ABUILDER_ALT, MOD_SLOWBLOB, "Granger Spit", ABUILDER_BLOB_DMG ), +CSW( CSW_LEVEL1, MOD_LEVEL1_CLAW, "Basilisk", LEVEL1_CLAW_DMG ), +CSW( CSW_LEVEL2, MOD_LEVEL2_CLAW, "Marauder", LEVEL2_CLAW_DMG ), +CSW( CSW_LEVEL2_UPG, MOD_LEVEL2_CLAW_UPG, "Adv. Marauder", LEVEL2_CLAW_UPG_DMG ), +CSW( CSW_LEVEL2_ALT, MOD_LEVEL2_ZAP, "Marauder Zap", LEVEL2_AREAZAP_DMG ), +CSW( CSW_LEVEL3, MOD_LEVEL3_CLAW, "Dragoon", LEVEL3_CLAW_DMG ), +CSW( CSW_LEVEL3_ALT, MOD_LEVEL3_BOUNCEBALL, "Dragoon Barb", LEVEL3_BOUNCEBALL_DMG ), +CSW( CSW_LEVEL4, MOD_LEVEL4_CLAW, "Tyrant", LEVEL4_CLAW_DMG ), +CSW( CSW_LEVEL4_ALT, MOD_LEVEL4_FLAMES, "Tyrant Flames", 50 ), +CSW( CSW_LEVEL5, MOD_LEVEL5_CLAW, "Hummel", LEVEL5_CLAW_DMG ), +CSW( CSW_LEVEL5_ALT, MOD_LEVEL5_BOUNCEBALL, "Hummel Prickles", LEVEL5_PRICKLES_DMG ) #define CSW_MAX_NAME_LEN 15 diff --git a/src/game/g_local.h b/src/game/g_local.h index 18ff14b..db363f8 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -320,7 +320,7 @@ typedef enum typedef enum { -#define CSW(a,b,c) a +#define CSW(a,b,c,d) a #include "g_csw.h" #undef CSW , @@ -1355,9 +1355,6 @@ extern vmCvar_t g_DretchBuildingDamage; extern vmCvar_t g_OwnTeamBPFactor; extern vmCvar_t g_EnemyTeamBPFactor; -extern vmCvar_t g_lightningDamage; -extern vmCvar_t g_lightningDifficulty; - void trap_Print( const char *fmt ); void trap_Error( const char *fmt ); int trap_Milliseconds( void ); diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index ce0fd1f..3f2e48a 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -820,7 +820,8 @@ void LCChargeFire( gentity_t *ent, qboolean secondary ) { if( secondary && ent->client->ps.stats[ STAT_MISC ] <= 0 ) { - G_CombatStats_Fire( ent, CSW_LCANNON_ALT, LCANNON_SECONDARY_DAMAGE ); + G_CombatStats_Fire( ent, CSW_LCANNON, LCANNON_SECONDARY_DAMAGE ); + fire_luciferCannon( ent, muzzle, forward, LCANNON_SECONDARY_DAMAGE, LCANNON_SECONDARY_RADIUS, LCANNON_SECONDARY_SPEED ); } @@ -2057,7 +2058,7 @@ void FireWeapon( gentity_t *ent ) break; case WP_ALEVEL2_UPG: meleeAttack( ent, LEVEL2_CLAW_U_RANGE_UPG, LEVEL2_CLAW_WIDTH, LEVEL2_CLAW_WIDTH, - LEVEL2_CLAW_UPG_DMG, MOD_LEVEL2_CLAW ); + LEVEL2_CLAW_UPG_DMG, MOD_LEVEL2_CLAW_UPG ); break; case WP_ALEVEL5: |