diff options
author | Tim Angus <tim@ngus.net> | 2002-09-23 04:38:55 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2002-09-23 04:38:55 +0000 |
commit | 67604720f961f7f3b30984a3b0699f7eabb828f5 (patch) | |
tree | b16bd7d6afea3a240a60beab901aabe8b2a30425 /src | |
parent | a3f567734f3df2346ba042860fa2a7988963e51c (diff) |
* Fixed build timer bug
* Crosshair per weapon
* Added dlight to flame balls - bit of a performance hit
* Tweaked flamer repeat rate
* Fixed human buildable explosion sound (FIXME: sync with anims?)
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_draw.c | 40 | ||||
-rw-r--r-- | src/cgame/cg_drawtools.c | 57 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 6 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 27 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 4 | ||||
-rw-r--r-- | src/game/bg_misc.c | 59 | ||||
-rw-r--r-- | src/game/bg_public.h | 4 | ||||
-rw-r--r-- | src/game/g_buildable.c | 28 | ||||
-rw-r--r-- | src/game/g_local.h | 2 | ||||
-rw-r--r-- | src/game/g_weapon.c | 8 | ||||
-rw-r--r-- | src/game/tremulous.h | 4 |
11 files changed, 109 insertions, 130 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index a479f3b4..cf35d086 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -1924,12 +1924,11 @@ static void CG_DrawCrosshair( void ) qhandle_t hShader; float f; float x, y; - int ca; if( !cg_drawCrosshair.integer ) return; - if( ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ) || + if( ( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR ) || ( cg.snap->ps.stats[ STAT_STATE ] & SS_INFESTING ) || ( cg.snap->ps.stats[ STAT_STATE ] & SS_HOVELING ) ) return; @@ -1937,41 +1936,20 @@ static void CG_DrawCrosshair( void ) if( cg.renderingThirdPerson ) return; - // set color based on health - if( cg_crosshairHealth.integer ) - { - vec4_t hcolor; - - CG_ColorForHealth( hcolor ); - trap_R_SetColor( hcolor ); - } - else - trap_R_SetColor( NULL ); - - w = h = cg_crosshairSize.value; - - // pulse the size of the crosshair when picking up items - f = cg.time - cg.itemPickupBlendTime; - if( f > 0 && f < ITEM_BLOB_TIME ) - { - f /= ITEM_BLOB_TIME; - w *= ( 1 + f ); - h *= ( 1 + f ); - } + w = h = BG_FindCrosshairSizeForWeapon( cg.snap->ps.weapon ); x = cg_crosshairX.integer; y = cg_crosshairY.integer; CG_AdjustFrom640( &x, &y, &w, &h ); - - ca = cg_drawCrosshair.integer; - if( ca < 0 ) - ca = 0; - hShader = cgs.media.crosshairShader[ ca % NUM_CROSSHAIRS ]; + hShader = cgs.media.crosshairShader[ cg.snap->ps.weapon ]; - trap_R_DrawStretchPic( x + cg.refdef.x + 0.5 * ( cg.refdef.width - w ), - y + cg.refdef.y + 0.5 * ( cg.refdef.height - h ), - w, h, 0, 0, 1, 1, hShader ); + if( hShader != 0 ) + { + trap_R_DrawStretchPic( x + cg.refdef.x + 0.5 * ( cg.refdef.width - w ), + y + cg.refdef.y + 0.5 * ( cg.refdef.height - h ), + w, h, 0, 0, 1, 1, hShader ); + } } diff --git a/src/cgame/cg_drawtools.c b/src/cgame/cg_drawtools.c index d5df1f42..05c06b65 100644 --- a/src/cgame/cg_drawtools.c +++ b/src/cgame/cg_drawtools.c @@ -306,60 +306,3 @@ float *CG_FadeColor( int startMsec, int totalMsec ) return color; } - - -/* -================= -CG_GetColorForHealth -================= -*/ -void CG_GetColorForHealth( int health, int armor, vec4_t hcolor ) -{ - int count; - int max; - - // calculate the total points of damage that can - // be sustained at the current health / armor level - if( health <= 0 ) - { - VectorClear( hcolor ); // black - hcolor[ 3 ] = 1; - return; - } - - count = armor; - max = health; - - if( max < count ) - count = max; - - health += count; - - // set the color based on health - hcolor[ 0 ] = 1.0; - hcolor[ 3 ] = 1.0; - - if( health >= 100 ) - hcolor[ 2 ] = 1.0; - else if( health < 66 ) - hcolor[ 2 ] = 0; - else - hcolor[ 2 ] = ( health - 66 ) / 33.0; - - if( health > 60 ) - hcolor[ 1 ] = 1.0; - else if( health < 30 ) - hcolor[ 1 ] = 0; - else - hcolor[ 1 ] = ( health - 30 ) / 30.0; -} - -/* -================= -CG_ColorForHealth -================= -*/ -void CG_ColorForHealth( vec4_t hcolor ) -{ - CG_GetColorForHealth( cg.snap->ps.stats[ STAT_HEALTH ], 0, hcolor ); -} diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 99bb91cf..25763f37 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -797,7 +797,7 @@ typedef struct qhandle_t selectShader; qhandle_t viewBloodShader; qhandle_t tracerShader; - qhandle_t crosshairShader[ NUM_CROSSHAIRS ]; + qhandle_t crosshairShader[ WP_NUM_WEAPONS ]; qhandle_t backTileShader; qhandle_t noammoShader; @@ -909,6 +909,8 @@ typedef struct sfxHandle_t alienStageTransition; sfxHandle_t humanStageTransition; + sfxHandle_t humanBuildableExpl; + qhandle_t cursor; qhandle_t selectCursor; qhandle_t sizeCursor; @@ -1045,8 +1047,6 @@ extern vmCvar_t cg_drawTeamOverlay; extern vmCvar_t cg_teamOverlayUserinfo; extern vmCvar_t cg_crosshairX; extern vmCvar_t cg_crosshairY; -extern vmCvar_t cg_crosshairSize; -extern vmCvar_t cg_crosshairHealth; extern vmCvar_t cg_drawStatus; extern vmCvar_t cg_draw2D; extern vmCvar_t cg_animSpeed; diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index e0b4936d..551a5baf 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -116,10 +116,8 @@ vmCvar_t cg_drawAmmoWarning; vmCvar_t cg_drawCrosshair; vmCvar_t cg_drawCrosshairNames; vmCvar_t cg_drawRewards; -vmCvar_t cg_crosshairSize; vmCvar_t cg_crosshairX; vmCvar_t cg_crosshairY; -vmCvar_t cg_crosshairHealth; vmCvar_t cg_draw2D; vmCvar_t cg_drawStatus; vmCvar_t cg_animSpeed; @@ -237,8 +235,6 @@ static cvarTable_t cvarTable[ ] = { &cg_drawCrosshair, "cg_drawCrosshair", "4", CVAR_ARCHIVE }, { &cg_drawCrosshairNames, "cg_drawCrosshairNames", "1", CVAR_ARCHIVE }, { &cg_drawRewards, "cg_drawRewards", "1", CVAR_ARCHIVE }, - { &cg_crosshairSize, "cg_crosshairSize", "24", CVAR_ARCHIVE }, - { &cg_crosshairHealth, "cg_crosshairHealth", "1", CVAR_ARCHIVE }, { &cg_crosshairX, "cg_crosshairX", "0", CVAR_ARCHIVE }, { &cg_crosshairY, "cg_crosshairY", "0", CVAR_ARCHIVE }, { &cg_brassTime, "cg_brassTime", "2500", CVAR_ARCHIVE }, @@ -544,18 +540,6 @@ const char *CG_Argv( int arg ) /* ================= -CG_RegisterItemSounds - -The server says this item is used on this level -================= -*/ -static void CG_RegisterItemSounds( int itemNum ) -{ -} - - -/* -================= CG_RegisterSounds called during a precache command @@ -639,6 +623,8 @@ static void CG_RegisterSounds( void ) cgs.media.jetpackDescendSound = trap_S_RegisterSound( "sound/upgrades/jetpack/low.wav", qfalse ); cgs.media.jetpackIdleSound = trap_S_RegisterSound( "sound/upgrades/jetpack/idle.wav", qfalse ); cgs.media.jetpackAscendSound = trap_S_RegisterSound( "sound/upgrades/jetpack/hi.wav", qfalse ); + + cgs.media.humanBuildableExpl = trap_S_RegisterSound( "sound/weapons/rocket/rocklx1a.wav", qfalse ); // FIXME: only needed with item cgs.media.sfx_ric1 = trap_S_RegisterSound( "sound/weapons/machinegun/ric1.wav", qfalse ); @@ -721,8 +707,13 @@ static void CG_RegisterGraphics( void ) cgs.media.tracerShader = trap_R_RegisterShader( "gfx/misc/tracer" ); cgs.media.selectShader = trap_R_RegisterShader( "gfx/2d/select" ); - for( i = 0 ; i < NUM_CROSSHAIRS ; i++ ) - cgs.media.crosshairShader[ i ] = trap_R_RegisterShader( va( "gfx/2d/crosshair%c", 'a' + i ) ); + for( i = WP_NONE + 1 ; i < WP_NUM_WEAPONS ; i++ ) + { + char *crosshair = BG_FindCrosshairForWeapon( i ); + + if( crosshair != NULL ) + cgs.media.crosshairShader[ i ] = trap_R_RegisterShader( crosshair ); + } cgs.media.backTileShader = trap_R_RegisterShader( "gfx/2d/backtile" ); cgs.media.noammoShader = trap_R_RegisterShader( "icons/noammo" ); diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index e8c6aedf..1293afbc 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -322,7 +322,9 @@ void CG_RegisterWeapon( int weaponNum ) case WP_FLAMER: weaponInfo->missileSound = trap_S_RegisterSound( "sound/weapons/flamer/fireloop.wav", qfalse ); - MAKERGB( weaponInfo->flashDlightColor, 0.25, 0.1, 0 ); + MAKERGB( weaponInfo->flashDlightColor, 0.25f, 0.1f, 0 ); + MAKERGB( weaponInfo->missileDlightColor, 0.25f, 0.1f, 0 ); + weaponInfo->missileDlight = 200; //weaponInfo->flashSound[ 0 ] = trap_S_RegisterSound( "sound/weapons/railgun/railgf1a.wav", qfalse ); /*cgs.media.flameExplShader = trap_R_RegisterShader( "rocketExplosion" );*/ break; diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index ccddcedb..2b51efbc 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -2063,6 +2063,7 @@ weaponAttributes_t bg_weapons[ ] = "Rifle", //char *weaponHumanName; { "models/weapons2/machinegun/machinegun.md3", 0, 0, 0 }, "icons/iconw_machinegun", + "gfx/2d/crosshaira", 24, RIFLE_CLIPSIZE, //int quan; RIFLE_SPAWNCLIPS, //int clips; RIFLE_MAXCLIPS, //int maxClips; @@ -2087,6 +2088,7 @@ weaponAttributes_t bg_weapons[ ] = "Flame Thrower", //char *weaponHumanName; { "models/weapons2/plasma/plasma.md3", 0, 0, 0 }, "icons/iconw_plasma", + "gfx/2d/crosshaira", 24, FLAMER_GAS, //int quan; 0, //int clips; 0, //int maxClips; @@ -2111,6 +2113,7 @@ weaponAttributes_t bg_weapons[ ] = "Chaingun", //char *weaponHumanName; { "models/weapons2/machinegun/machinegun.md3", 0, 0, 0 }, "icons/iconw_machinegun", + "gfx/2d/crosshairb", 48, CHAINGUN_BULLETS, //int quan; 0, //int clips; 0, //int maxClips; @@ -2135,6 +2138,7 @@ weaponAttributes_t bg_weapons[ ] = "Mass Driver", //char *weaponHumanName; { "models/weapons2/bfg/bfg.md3", 0, 0, 0 }, "icons/iconw_bfg", + "gfx/2d/crosshaira", 24, MDRIVER_CLIPSIZE, //int quan; MDRIVER_SPAWNCLIPS, //int clips; MDRIVER_MAXCLIPS, //int maxClips; @@ -2159,6 +2163,7 @@ weaponAttributes_t bg_weapons[ ] = "Pulse Rifle", //char *weaponHumanName; { "models/weapons2/plasma/plasma.md3", 0, 0, 0 }, "icons/iconw_plasma", + "gfx/2d/crosshaira", 24, PRIFLE_CLIPS, //int quan; PRIFLE_SPAWNCLIPS, //int clips; PRIFLE_MAXCLIPS, //int maxClips; @@ -2183,6 +2188,7 @@ weaponAttributes_t bg_weapons[ ] = "Lucifer Canon", //char *weaponHumanName; { "models/weapons2/bfg/bfg.md3", 0, 0, 0 }, "icons/iconw_bfg", + "gfx/2d/crosshaira", 24, LCANON_AMMO, //int quan; 0, //int clips; 0, //int maxClips; @@ -2207,6 +2213,7 @@ weaponAttributes_t bg_weapons[ ] = "Las Gun", //char *weaponHumanName; { "models/weapons2/grenadel/grenadel.md3", 0, 0, 0 }, "icons/iconw_plasma", + "gfx/2d/crosshaira", 24, LASGUN_AMMO, //int quan; 0, //int clips; 0, //int maxClips; @@ -2231,6 +2238,7 @@ weaponAttributes_t bg_weapons[ ] = "Pain Saw", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2255,6 +2263,7 @@ weaponAttributes_t bg_weapons[ ] = "Construction Kit", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2279,6 +2288,7 @@ weaponAttributes_t bg_weapons[ ] = "Adv Construction Kit",//char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2303,6 +2313,7 @@ weaponAttributes_t bg_weapons[ ] = "Alien build weapon", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2327,6 +2338,7 @@ weaponAttributes_t bg_weapons[ ] = "Alien build weapon2",//char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2351,6 +2363,7 @@ weaponAttributes_t bg_weapons[ ] = "Venom", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2375,6 +2388,7 @@ weaponAttributes_t bg_weapons[ ] = "Claw and pounce", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2399,6 +2413,7 @@ weaponAttributes_t bg_weapons[ ] = "Claw and pounce (upgrade)", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 3, //int quan; 0, //int clips; 0, //int maxClips; @@ -2423,6 +2438,7 @@ weaponAttributes_t bg_weapons[ ] = "Claws", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2447,6 +2463,7 @@ weaponAttributes_t bg_weapons[ ] = "Claws Upgrade", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2471,6 +2488,7 @@ weaponAttributes_t bg_weapons[ ] = "Area Zap", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2495,6 +2513,7 @@ weaponAttributes_t bg_weapons[ ] = "Directed Zap", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2519,6 +2538,7 @@ weaponAttributes_t bg_weapons[ ] = "Ground Pound", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2543,6 +2563,7 @@ weaponAttributes_t bg_weapons[ ] = "Lock Blob", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2567,6 +2588,7 @@ weaponAttributes_t bg_weapons[ ] = "Tesla Generator", //char *weaponHumanName; { "models/weapons2/gauntlet/gauntlet.md3", 0, 0, 0 }, "icons/iconw_gauntlet", + NULL, 0, 0, //int quan; 0, //int clips; 0, //int maxClips; @@ -2746,6 +2768,43 @@ char *BG_FindIconForWeapon( int weapon ) /* ============== +BG_FindCrosshairForWeapon +============== +*/ +char *BG_FindCrosshairForWeapon( int weapon ) +{ + int i; + + for( i = 0; i < bg_numWeapons; i++ ) + { + if( bg_weapons[ i ].weaponNum == weapon ) + return bg_weapons[ i ].crosshair; + } + + //wimp out + return 0; +} + +/* +============== +BG_FindCrosshairSizeForWeapon +============== +*/ +int BG_FindCrosshairSizeForWeapon( int weapon ) +{ + int i; + + for( i = 0; i < bg_numWeapons; i++ ) + { + if( bg_weapons[ i ].weaponNum == weapon ) + return bg_weapons[ i ].crosshairSize; + } + + return 24; +} + +/* +============== BG_FindAmmoForWeapon ============== */ diff --git a/src/game/bg_public.h b/src/game/bg_public.h index f445945b..76115f18 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -911,6 +911,8 @@ typedef struct char *models[ MAX_ITEM_MODELS ]; char *icon; + char *crosshair; + int crosshairSize; int quan; int clips; @@ -1033,6 +1035,8 @@ int BG_FindWeaponNumForName( char *name ); char *BG_FindHumanNameForWeapon( int weapon ); char *BG_FindModelsForWeapon( int weapon, int modelNum ); char *BG_FindIconForWeapon( int weapon ); +char *BG_FindCrosshairForWeapon( int weapon ); +int BG_FindCrosshairSizeForWeapon( int weapon ); void BG_FindAmmoForWeapon( int weapon, int *quan, int *clips, int *maxClips ); qboolean BG_FindInfinteAmmoForWeapon( int weapon ); qboolean BG_FindUsesEnergyForWeapon( int weapon ); diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index b6e2d02d..059cff1f 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2095,7 +2095,7 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin G_ValidateBuild ================= */ -void G_ValidateBuild( gentity_t *ent, buildable_t buildable ) +qboolean G_ValidateBuild( gentity_t *ent, buildable_t buildable ) { weapon_t weapon; float dist; @@ -2107,61 +2107,61 @@ void G_ValidateBuild( gentity_t *ent, buildable_t buildable ) { case IBE_NONE: G_buildItem( ent, buildable, origin, ent->s.apos.trBase ); - break; + return qtrue; case IBE_NOASSERT: G_AddPredictableEvent( ent, EV_MENU, MN_A_NOASSERT ); - break; + return qfalse; case IBE_NOHIVEMIND: G_AddPredictableEvent( ent, EV_MENU, MN_A_NOHVMND ); - break; + return qfalse; case IBE_HIVEMIND: G_AddPredictableEvent( ent, EV_MENU, MN_A_HIVEMIND ); - break; + return qfalse; case IBE_NORMAL: G_AddPredictableEvent( ent, EV_MENU, MN_A_NORMAL ); - break; + return qfalse; case IBE_REACTOR: G_AddPredictableEvent( ent, EV_MENU, MN_H_REACTOR ); - break; + return qfalse; case IBE_REPEATER: G_AddPredictableEvent( ent, EV_MENU, MN_H_REPEATER ); - break; + return qfalse; case IBE_NOROOM: if( ent->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) G_AddPredictableEvent( ent, EV_MENU, MN_H_NOROOM ); else G_AddPredictableEvent( ent, EV_MENU, MN_A_NOROOM ); - break; + return qfalse; case IBE_NOPOWER: G_AddPredictableEvent( ent, EV_MENU, MN_H_NOPOWER ); - break; + return qfalse; case IBE_NODCC: G_AddPredictableEvent( ent, EV_MENU, MN_H_NODCC ); - break; + return qfalse; case IBE_SPWNWARN: G_AddPredictableEvent( ent, EV_MENU, MN_A_SPWNWARN ); G_buildItem( ent, buildable, origin, ent->s.apos.trBase ); - break; + return qtrue; case IBE_RPLWARN: G_AddPredictableEvent( ent, EV_MENU, MN_H_RPLWARN ); G_buildItem( ent, buildable, origin, ent->s.apos.trBase ); - break; + return qtrue; case IBE_RPTWARN: G_AddPredictableEvent( ent, EV_MENU, MN_H_RPTWARN ); G_buildItem( ent, buildable, origin, ent->s.apos.trBase ); - break; + return qtrue; } } diff --git a/src/game/g_local.h b/src/game/g_local.h index ebe18d2e..d614fb28 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -547,7 +547,7 @@ typedef enum itemBuildError_t G_itemFits( gentity_t *ent, buildable_t buildable, int distance, vec3_t origin ); gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin, vec3_t angles ); -void G_ValidateBuild( gentity_t *ent, buildable_t buildable ); +qboolean G_ValidateBuild( gentity_t *ent, buildable_t buildable ); void G_setBuildableAnim( gentity_t *ent, buildableAnimNumber_t anim, qboolean force ); void G_setIdleBuildableAnim( gentity_t *ent, buildableAnimNumber_t anim ); void G_SpawnBuildable(gentity_t *ent, buildable_t buildable); diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 0837d7e2..e2d37d57 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -474,9 +474,11 @@ void buildFire( gentity_t *ent, dynMenu_t menu ) return; } - G_ValidateBuild( ent, ent->client->ps.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT ); - ent->client->ps.stats[ STAT_BUILDABLE ] = BA_NONE; - ent->client->ps.stats[ STAT_MISC ] += BG_FindBuildDelayForWeapon( ent->s.weapon ); + if( G_ValidateBuild( ent, ent->client->ps.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT ) ) + { + ent->client->ps.stats[ STAT_BUILDABLE ] = BA_NONE; + ent->client->ps.stats[ STAT_MISC ] += BG_FindBuildDelayForWeapon( ent->s.weapon ); + } return; } diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 6d25456e..3af26fb5 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -285,9 +285,9 @@ #define CHAINGUN_DMG HDM(14) #define FLAMER_GAS 400 -#define FLAMER_REPEAT 150 +#define FLAMER_REPEAT 300 #define FLAMER_PRICE 300 -#define FLAMER_DMG HDM(25) +#define FLAMER_DMG HDM(30) #define FLAMER_RADIUS 50 #define FLAMER_LIFETIME 1000.0f #define FLAMER_SPEED 200.0f |