diff options
author | Tim Angus <tim@ngus.net> | 2004-01-12 04:53:29 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2004-01-12 04:53:29 +0000 |
commit | 8a60a08eb78f047f35305cecb195e160035bdce6 (patch) | |
tree | 7f541e0742ec8c22b28468b4b30924114adb4943 | |
parent | 5b4909a3e494eb8c677e3ae65818469fa9c22e3c (diff) |
* Poison now does 30 damage max
* Crosshair names (re)implemented
* Mofo attack anims randomised
* Mofo charge anim triggered
* Switched the order of the spawn menus
* Stamina no longer interferes with the jet pack
-rw-r--r-- | src/cgame/cg_draw.c | 289 | ||||
-rw-r--r-- | src/game/bg_misc.c | 60 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 35 | ||||
-rw-r--r-- | src/game/bg_public.h | 1 | ||||
-rw-r--r-- | src/game/g_active.c | 38 | ||||
-rw-r--r-- | src/game/g_buildable.c | 2 | ||||
-rw-r--r-- | src/game/g_cmds.c | 12 | ||||
-rw-r--r-- | src/game/g_combat.c | 6 | ||||
-rw-r--r-- | src/game/g_local.h | 2 | ||||
-rw-r--r-- | src/game/g_main.c | 8 | ||||
-rw-r--r-- | src/game/g_missile.c | 2 | ||||
-rw-r--r-- | src/game/g_weapon.c | 6 | ||||
-rw-r--r-- | src/game/tremulous.h | 34 | ||||
-rw-r--r-- | src/ui/ui_main.c | 36 |
14 files changed, 314 insertions, 217 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 36e49f6f..e7a8efac 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -1901,7 +1901,9 @@ static void CG_DrawLagometer( rectDef_t *rect, qhandle_t shader ) if( !cg_lagometer.integer ) { - CG_DrawDisconnect( ); + if( cg.snap->ps.pm_type != PM_INTERMISSION ) + CG_DrawDisconnect( ); + return; } @@ -2124,6 +2126,147 @@ void CG_DrawWeaponIcon( rectDef_t *rect, vec4_t color ) } + +/* +================================================================================ + +CROSSHAIR + +================================================================================ +*/ + + +/* +================= +CG_DrawCrosshair +================= +*/ +static void CG_DrawCrosshair( void ) +{ + float w, h; + qhandle_t hShader; + float f; + float x, y; + weaponInfo_t *wi; + + if( !cg_drawCrosshair.integer ) + return; + + 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; + + if( cg.renderingThirdPerson ) + return; + + wi = &cg_weapons[ cg.snap->ps.weapon ]; + + w = h = wi->crossHairSize; + + x = cg_crosshairX.integer; + y = cg_crosshairY.integer; + CG_AdjustFrom640( &x, &y, &w, &h ); + + hShader = wi->crossHair; + + 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 ); + } +} + + + +/* +================= +CG_ScanForCrosshairEntity +================= +*/ +static void CG_ScanForCrosshairEntity( void ) +{ + trace_t trace; + vec3_t start, end; + int content; + pTeam_t team; + + VectorCopy( cg.refdef.vieworg, start ); + VectorMA( start, 131072, cg.refdef.viewaxis[ 0 ], end ); + + CG_Trace( &trace, start, vec3_origin, vec3_origin, end, + cg.snap->ps.clientNum, CONTENTS_SOLID|CONTENTS_BODY ); + + if( trace.entityNum >= MAX_CLIENTS ) + return; + + // if the player is in fog, don't show it + content = trap_CM_PointContents( trace.endpos, 0 ); + if( content & CONTENTS_FOG ) + return; + + team = cgs.clientinfo[ trace.entityNum ].team; + + if( cg.snap->ps.persistant[ PERS_TEAM ] != TEAM_SPECTATOR ) + { + //only display team names of those on the same team as this player + if( team != cg.snap->ps.stats[ STAT_PTEAM ] ) + return; + } + + // update the fade timer + cg.crosshairClientNum = trace.entityNum; + cg.crosshairClientTime = cg.time; +} + + +/* +===================== +CG_DrawCrosshairNames +===================== +*/ +static void CG_DrawCrosshairNames( rectDef_t *rect, float scale, int textStyle ) +{ + float *color; + char *name; + float w, x; + + if( !cg_drawCrosshair.integer ) + return; + + if( !cg_drawCrosshairNames.integer ) + return; + + if( cg.renderingThirdPerson ) + return; + + // scan the known entities to see if the crosshair is sighted on one + CG_ScanForCrosshairEntity( ); + + // draw the name of the player being looked at + color = CG_FadeColor( cg.crosshairClientTime, 1000 ); + if( !color ) + { + trap_R_SetColor( NULL ); + return; + } + + name = cgs.clientinfo[ cg.crosshairClientNum ].name; + w = CG_Text_Width( name, scale, 0 ); + x = rect->x + rect->w / 2; + CG_Text_Paint( x - w / 2, rect->y + rect->h, scale, color, name, 0, 0, textStyle ); + trap_R_SetColor( NULL ); +} + + +/* +=============== +CG_OwnerDraw + +Draw an owner drawn item +=============== +*/ void CG_OwnerDraw( float x, float y, float w, float h, float text_x, float text_y, int ownerDraw, int ownerDrawFlags, int align, float special, float scale, vec4_t color, @@ -2237,6 +2380,9 @@ void CG_OwnerDraw( float x, float y, float w, float h, float text_x, case CG_SPECTATORS: CG_DrawTeamSpectators( &rect, scale, color, shader ); break; + case CG_PLAYER_CROSSHAIRNAMES: + CG_DrawCrosshairNames( &rect, scale, textStyle ); + break; //loading screen case CG_LOAD_LEVELSHOT: @@ -2560,129 +2706,6 @@ static void CG_DrawCenterString( void ) -/* -================================================================================ - -CROSSHAIR - -================================================================================ -*/ - - -/* -================= -CG_DrawCrosshair -================= -*/ -static void CG_DrawCrosshair( void ) -{ - float w, h; - qhandle_t hShader; - float f; - float x, y; - weaponInfo_t *wi; - - if( !cg_drawCrosshair.integer ) - return; - - 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; - - if( cg.renderingThirdPerson ) - return; - - wi = &cg_weapons[ cg.snap->ps.weapon ]; - - w = h = wi->crossHairSize; - - x = cg_crosshairX.integer; - y = cg_crosshairY.integer; - CG_AdjustFrom640( &x, &y, &w, &h ); - - hShader = wi->crossHair; - - 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 ); - } -} - - - -/* -================= -CG_ScanForCrosshairEntity -================= -*/ -static void CG_ScanForCrosshairEntity( void ) -{ - trace_t trace; - vec3_t start, end; - int content; - - VectorCopy( cg.refdef.vieworg, start ); - VectorMA( start, 131072, cg.refdef.viewaxis[ 0 ], end ); - - CG_Trace( &trace, start, vec3_origin, vec3_origin, end, - cg.snap->ps.clientNum, CONTENTS_SOLID|CONTENTS_BODY ); - - if( trace.entityNum >= MAX_CLIENTS ) - return; - - // if the player is in fog, don't show it - content = trap_CM_PointContents( trace.endpos, 0 ); - if( content & CONTENTS_FOG ) - return; - - // update the fade timer - cg.crosshairClientNum = trace.entityNum; - cg.crosshairClientTime = cg.time; -} - - -/* -===================== -CG_DrawCrosshairNames -===================== -*/ -static void CG_DrawCrosshairNames( void ) -{ - float *color; - char *name; - float w; - - if( !cg_drawCrosshair.integer ) - return; - - if( !cg_drawCrosshairNames.integer ) - return; - - if( cg.renderingThirdPerson ) - return; - - // scan the known entities to see if the crosshair is sighted on one - CG_ScanForCrosshairEntity( ); - - // draw the name of the player being looked at - color = CG_FadeColor( cg.crosshairClientTime, 1000 ); - if( !color ) - { - trap_R_SetColor( NULL ); - return; - } - - name = cgs.clientinfo[ cg.crosshairClientNum ].name; - color[ 3 ] *= 0.5f; - w = CG_Text_Width( name, 0.3f, 0 ); - CG_Text_Paint( 320 - w / 2, 190, 0.3f, color, name, 0, 0, ITEM_TEXTSTYLE_SHADOWED ); - - trap_R_SetColor( NULL ); -} - //============================================================================== @@ -2813,6 +2836,9 @@ CG_DrawIntermission */ static void CG_DrawIntermission( void ) { + if( cg_drawStatus.integer ) + Menu_Paint( Menus_FindByName( "default_hud" ), qtrue ); + cg.scoreFadeTime = cg.time; cg.scoreBoardShowing = CG_DrawScoreboard( ); } @@ -2861,16 +2887,13 @@ static void CG_Draw2D( void ) menu = Menus_FindByName( BG_FindHudNameForClass( cg.predictedPlayerState.stats[ STAT_PCLASS ] ) ); if( !( cg.snap->ps.stats[ STAT_STATE ] & SS_INFESTING ) && - !( cg.snap->ps.stats[ STAT_STATE ] & SS_HOVELING ) && menu ) + !( cg.snap->ps.stats[ STAT_STATE ] & SS_HOVELING ) && menu && + ( cg.snap->ps.stats[ STAT_HEALTH ] > 0 ) ) { - // don't draw any status if dead or the scoreboard is being explicitly shown - if( !cg.showScores && cg.snap->ps.stats[ STAT_HEALTH ] > 0 ) - { - if( cg_drawStatus.integer ) - Menu_Paint( menu, qtrue ); - - CG_DrawCrosshair( ); - } + if( cg_drawStatus.integer ) + Menu_Paint( menu, qtrue ); + + CG_DrawCrosshair( ); } else if( cg_drawStatus.integer ) Menu_Paint( defaultMenu, qtrue ); diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index b793a38b..69ff92e5 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -42,7 +42,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; - 10000, //int buildTime; + ASPAWN_BT, //int buildTime; qfalse, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -76,7 +76,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; - 10000, //int buildTime; + BARRICADE_BT, //int buildTime; qfalse, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -100,7 +100,7 @@ buildableAttributes_t bg_buildableList[ ] = TR_GRAVITY, //trType_t traj; 0.0, //float bounce; BOOSTER_BP, //int buildPoints; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S2 )|( 1 << S3 ), //int stages BOOSTER_HEALTH, //int health; BOOSTER_REGEN, //int regenRate; BOOSTER_SPLASHDAMAGE, //int splashDamage; @@ -110,7 +110,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; - 10000, //int buildTime; + BOOSTER_BT, //int buildTime; qfalse, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -144,7 +144,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 500, //int nextthink; - 10000, //int buildTime; + ACIDTUBE_BT, //int buildTime; qfalse, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -168,7 +168,7 @@ buildableAttributes_t bg_buildableList[ ] = TR_GRAVITY, //trType_t traj; 0.0, //float bounce; HIVE_BP, //int buildPoints; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S3 ), //int stages HIVE_HEALTH, //int health; HIVE_REGEN, //int regenRate; HIVE_SPLASHDAMAGE, //int splashDamage; @@ -178,7 +178,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 500, //int nextthink; - 10000, //int buildTime; + HIVE_BT, //int buildTime; qfalse, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -202,7 +202,7 @@ buildableAttributes_t bg_buildableList[ ] = TR_GRAVITY, //trType_t traj; 0.0, //float bounce; TRAPPER_BP, //int buildPoints; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S2 )|( 1 << S3 ), //int stages TRAPPER_HEALTH, //int health; TRAPPER_REGEN, //int regenRate; TRAPPER_SPLASHDAMAGE, //int splashDamage; @@ -212,7 +212,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; - 10000, //int buildTime; + TRAPPER_BT, //int buildTime; qfalse, //qboolean usable; TRAPPER_RANGE, //int turretRange; TRAPPER_REPEAT, //int turretFireSpeed; @@ -246,7 +246,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; OVERMIND_ATTACK_REPEAT,//int nextthink; - 10000, //int buildTime; + OVERMIND_BT, //int buildTime; qfalse, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -270,7 +270,7 @@ buildableAttributes_t bg_buildableList[ ] = TR_GRAVITY, //trType_t traj; 0.0, //float bounce; HOVEL_BP, //int buildPoints; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S3 ), //int stages HOVEL_HEALTH, //int health; HOVEL_REGEN, //int regenRate; HOVEL_SPLASHDAMAGE, //int splashDamage; @@ -280,7 +280,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 150, //int nextthink; - 10000, //int buildTime; + HOVEL_BT, //int buildTime; qtrue, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -314,7 +314,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_HBUILD )|( 1 << WP_HBUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; - 10000, //int buildTime; + HSPAWN_BT, //int buildTime; qfalse, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -348,7 +348,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_HBUILD )|( 1 << WP_HBUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; - 10000, //int buildTime; + MEDISTAT_BT, //int buildTime; qfalse, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -384,7 +384,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_HBUILD )|( 1 << WP_HBUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 50, //int nextthink; - 10000, //int buildTime; + MGTURRET_BT, //int buildTime; qfalse, //qboolean usable; MGTURRET_RANGE, //int turretRange; MGTURRET_REPEAT, //int turretFireSpeed; @@ -418,7 +418,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_HBUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 150, //int nextthink; - 10000, //int buildTime; + TESLAGEN_BT, //int buildTime; qfalse, //qboolean usable; TESLAGEN_RANGE, //int turretRange; TESLAGEN_REPEAT, //int turretFireSpeed; @@ -442,7 +442,7 @@ buildableAttributes_t bg_buildableList[ ] = TR_GRAVITY, //trType_t traj; 0.0, //float bounce; DC_BP, //int buildPoints; - ( 1 << S3 ), //int stages + ( 1 << S2 )|( 1 << S3 ), //int stages DC_HEALTH, //int health; 0, //int regenRate; DC_SPLASHDAMAGE, //int splashDamage; @@ -452,7 +452,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_HBUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; - 10000, //int buildTime; + DC_BT, //int buildTime; qfalse, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -486,7 +486,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_HBUILD )|( 1 << WP_HBUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; - 10000, //int buildTime; + ARMOURY_BT, //int buildTime; qtrue, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -520,7 +520,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_HBUILD )|( 1 << WP_HBUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; -1, //int nextthink; - 10000, //int buildTime; + REACTOR_BT, //int buildTime; qtrue, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -554,7 +554,7 @@ buildableAttributes_t bg_buildableList[ ] = ( 1 << WP_HBUILD )|( 1 << WP_HBUILD2 ), //weapon_t buildWeapon; BANIM_IDLE1, //int idleAnim; 100, //int nextthink; - 10000, //int buildTime; + REPEATER_BT, //int buildTime; qtrue, //qboolean usable; 0, //int turretRange; 0, //int turretFireSpeed; @@ -1452,7 +1452,7 @@ classAttributes_t bg_classList[ ] = 80, //int fov; 0.001f, //float bob; 2.0f, //float bobCycle; - 350, //int steptime; + 200, //int steptime; ABUILDER_SPEED, //float speed; 10.0f, //float acceleration; 1.0f, //float airAcceleration; @@ -1581,7 +1581,7 @@ classAttributes_t bg_classList[ ] = "blue", //char *skinname; 1.0f, //float shadowScale; "alien_general_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S2 )|( 1 << S3 ), //int stages { -20, -20, -20 }, //vec3_t mins; { 20, 20, 20 }, //vec3_t maxs; { 20, 20, 20 }, //vec3_t crouchmaxs; @@ -1655,7 +1655,7 @@ classAttributes_t bg_classList[ ] = "red", //char *skinname; 1.0f, //float shadowScale; "alien_general_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S2 )|( 1 << S3 ), //int stages { -24, -24, -24 }, //vec3_t mins; { 24, 24, 24 }, //vec3_t maxs; { 24, 24, 24 }, //vec3_t crouchmaxs; @@ -1729,7 +1729,7 @@ classAttributes_t bg_classList[ ] = "default", //char *skinname; 1.0f, //float shadowScale; "alien_general_hud", //char *hudname; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S3 ), //int stages { -32, -32, -21 }, //vec3_t mins; { 32, 32, 21 }, //vec3_t maxs; { 32, 32, 21 }, //vec3_t crouchmaxs; @@ -2872,7 +2872,7 @@ weaponAttributes_t bg_weapons[ ] = { WP_FLAMER, //int weaponNum; FLAMER_PRICE, //int price; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S2 )|( 1 << S3 ), //int stages SLOT_WEAPON, //int slots; "flamer", //char *weaponName; "Flame Thrower", //char *weaponHumanName; @@ -2938,7 +2938,7 @@ weaponAttributes_t bg_weapons[ ] = { WP_PULSE_RIFLE, //int weaponNum; PRIFLE_PRICE, //int price; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S2 )|( 1 << S3 ), //int stages SLOT_WEAPON, //int slots; "prifle", //char *weaponName; "Pulse Rifle", //char *weaponHumanName; @@ -2960,7 +2960,7 @@ weaponAttributes_t bg_weapons[ ] = { WP_LUCIFER_CANNON, //int weaponNum; LCANNON_PRICE, //int price; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S3 ), //int stages SLOT_WEAPON, //int slots; "lcannon", //char *weaponName; "Lucifer Cannon", //char *weaponHumanName; @@ -3786,7 +3786,7 @@ upgradeAttributes_t bg_upgrades[ ] = { UP_JETPACK, //int upgradeNum; JETPACK_PRICE, //int price; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S2 )|( 1 << S3 ), //int stages SLOT_BACKPACK, //int slots; "jetpack", //char *upgradeName; "Jet Pack", //char *upgradeHumanName; @@ -3796,7 +3796,7 @@ upgradeAttributes_t bg_upgrades[ ] = { UP_BATTLESUIT, //int upgradeNum; BSUIT_PRICE, //int price; - ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages + ( 1 << S2 )|( 1 << S3 ), //int stages SLOT_HEAD|SLOT_TORSO|SLOT_ARMS|SLOT_LEGS|SLOT_BACKPACK, //int slots; "bsuit", //char *upgradeName; "Battlesuit", //char *upgradeHumanName; diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index d7007733..7f1799b5 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -643,7 +643,7 @@ static qboolean PM_CheckJump( void ) if( BG_ClassHasAbility( pm->ps->stats[ STAT_PCLASS ], SCA_WALLJUMPER ) ) return PM_CheckWallJump( ); - //can't jump and pounce charge at the same time + //can't jump and pounce at the same time if( ( pm->ps->weapon == WP_DRAGOON || pm->ps->weapon == WP_DRAGOON_UPG ) && pm->ps->stats[ STAT_MISC ] > 0 ) @@ -2409,7 +2409,10 @@ static void PM_Footsteps( void ) if( pm->xyspeed > 160 ) { bobmove = 0.4f; // faster speeds bob faster - if( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) + + if( pm->ps->pm_flags & PMF_CHARGE ) + PM_ContinueLegsAnim( NSPA_CHARGE ); + else if( pm->ps->pm_flags & PMF_BACKWARDS_RUN ) { if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) ) PM_ContinueLegsAnim( LEGS_BACK ); @@ -2895,12 +2898,28 @@ static void PM_Weapon( void ) PM_StartTorsoAnim( TORSO_ATTACK ); else { - if( attack1 ) - PM_ForceLegsAnim( NSPA_ATTACK1 ); - else if( attack2 ) - PM_ForceLegsAnim( NSPA_ATTACK2 ); - else if( attack3 ) - PM_ForceLegsAnim( NSPA_ATTACK3 ); + if( pm->ps->weapon == WP_BIGMOFO ) + { + //hack to get random attack animations + //FIXME: does pm->ps->weaponTime cycle enough? + int num = abs( pm->ps->weaponTime ) % 3; + + if( num == 0 ) + PM_ForceLegsAnim( NSPA_ATTACK1 ); + else if( num == 1 ) + PM_ForceLegsAnim( NSPA_ATTACK2 ); + else if( num == 2 ) + PM_ForceLegsAnim( NSPA_ATTACK3 ); + } + else + { + if( attack1 ) + PM_ForceLegsAnim( NSPA_ATTACK1 ); + else if( attack2 ) + PM_ForceLegsAnim( NSPA_ATTACK2 ); + else if( attack3 ) + PM_ForceLegsAnim( NSPA_ATTACK3 ); + } pm->ps->torsoTimer = TIMER_ATTACK; } diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 07a2862b..09f01060 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -668,6 +668,7 @@ typedef enum NSPA_WALK, NSPA_RUN, NSPA_RUNBACK, + NSPA_CHARGE, NSPA_RUNLEFT, NSPA_WALKLEFT, diff --git a/src/game/g_active.c b/src/game/g_active.c index 4eb271b2..61e78365 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -432,6 +432,9 @@ void ClientTimerActions( gentity_t *ent, int msec ) if( aForward <= 64 ) client->ps.stats[ STAT_STATE ] &= ~SS_SPEEDBOOST; + if( BG_gotItem( UP_JETPACK, client->ps.stats ) && BG_activated( UP_JETPACK, client->ps.stats ) ) + client->ps.stats[ STAT_STATE ] &= ~SS_SPEEDBOOST; + if( ( client->ps.stats[ STAT_STATE ] & SS_SPEEDBOOST ) && ucmd->upmove >= 0 ) { //subtract stamina @@ -461,14 +464,6 @@ void ClientTimerActions( gentity_t *ent, int msec ) client->ps.stats[ STAT_STAMINA ] = MAX_STAMINA; } - //client is poisoned - if( client->ps.stats[ STAT_STATE ] & SS_POISONED ) - { - int damage = ( level.time - client->lastPoisonTime ) / 1000; - - G_Damage( ent, client->lastPoisonClient, client->lastPoisonClient, NULL, NULL, damage, 0, MOD_POISON ); - } - //client is charging up for a pounce if( client->ps.weapon == WP_DRAGOON || client->ps.weapon == WP_DRAGOON_UPG ) { @@ -576,11 +571,32 @@ void ClientTimerActions( gentity_t *ent, int msec ) { client->time1000 -= 1000; - //client is poisoned + //client is hydra poisoned if( client->ps.stats[ STAT_STATE ] & SS_POISONCLOUDED ) G_Damage( ent, client->lastPoisonCloudedClient, client->lastPoisonCloudedClient, NULL, NULL, HYDRA_PCLOUD_DMG, 0, MOD_HYDRA_PCLOUD ); + //client is poisoned + if( client->ps.stats[ STAT_STATE ] & SS_POISONED ) + { + int i; + int seconds = ( ( level.time - client->lastPoisonTime ) / 1000 ) + 1; + int damage = ALIEN_POISON_DMG, damage2; + + for( i = 0; i < seconds; i++ ) + { + if( i == seconds - 1 ) + damage2 = damage; + + damage *= ALIEN_POISON_DIVIDER; + } + + damage = damage2 - damage; + + G_Damage( ent, client->lastPoisonClient, client->lastPoisonClient, NULL, NULL, + damage, 0, MOD_POISON ); + } + //replenish alien health if( client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) { @@ -923,6 +939,10 @@ void ClientThink_real( gentity_t *ent ) client->lastPoisonCloudedTime + HYDRA_PCLOUD_TIME < level.time ) client->ps.stats[ STAT_STATE ] &= ~SS_POISONCLOUDED; + if( client->ps.stats[ STAT_STATE ] & SS_POISONED && + client->lastPoisonTime + ALIEN_POISON_TIME < level.time ) + client->ps.stats[ STAT_STATE ] &= ~SS_POISONED; + client->ps.gravity = g_gravity.value; if( BG_gotItem( UP_ANTITOXIN, client->ps.stats ) && diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index b3af71e4..26a9bdbb 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -524,7 +524,7 @@ void ASpawn_Pain( gentity_t *self, gentity_t *attacker, int damage ) ================ AOvermind_Think -think function for Alien Acid Tube +Think function for Alien Overmind ================ */ void AOvermind_Think( gentity_t *self ) diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 684b2526..e5c130e9 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1619,6 +1619,10 @@ Cmd_Boost_f */ void Cmd_Boost_f( gentity_t *ent ) { + if( BG_gotItem( UP_JETPACK, ent->client->ps.stats ) && + BG_activated( UP_JETPACK, ent->client->ps.stats ) ) + return; + if( ( ent->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) && ( ent->client->ps.stats[ STAT_STAMINA ] > 0 ) ) ent->client->ps.stats[ STAT_STATE ] |= SS_SPEEDBOOST; @@ -1634,10 +1638,14 @@ void Cmd_Test_f( gentity_t *ent ) if( !CheatsOk( ent ) ) return; - ent->client->ps.stats[ STAT_STATE ] |= SS_POISONCLOUDED; +/* ent->client->ps.stats[ STAT_STATE ] |= SS_POISONCLOUDED; ent->client->lastPoisonCloudedTime = level.time; ent->client->lastPoisonCloudedClient = ent; - trap_SendServerCommand( ent->client->ps.clientNum, "poisoncloud" ); + trap_SendServerCommand( ent->client->ps.clientNum, "poisoncloud" );*/ + + ent->client->ps.stats[ STAT_STATE ] |= SS_POISONED; + ent->client->lastPoisonTime = level.time; + ent->client->lastPoisonClient = ent; } /* diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 847b0606..ad247227 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -620,6 +620,9 @@ static float G_CalcDamageModifier( vec3_t point, gentity_t *targ, gentity_t *att float modifier = 1.0f; int i, j; + if( point == NULL ) + return 1.0f; + clientHeight = targ->r.maxs[ 2 ] - targ->r.mins[ 2 ]; if( targ->client->ps.stats[ STAT_STATE ] & SS_WALLCLIMBING ) @@ -974,7 +977,8 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, //if boosted poison every attack if( attacker->client && attacker->client->ps.stats[ STAT_STATE ] & SS_BOOSTED ) { - if( !( targ->client->ps.stats[ STAT_STATE ] & SS_POISONED ) ) + if( !( targ->client->ps.stats[ STAT_STATE ] & SS_POISONED ) && + !BG_gotItem( UP_BATTLESUIT, targ->client->ps.stats ) ) { targ->client->ps.stats[ STAT_STATE ] |= SS_POISONED; targ->client->lastPoisonTime = level.time; diff --git a/src/game/g_local.h b/src/game/g_local.h index 66b0bd33..ba1ff47d 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -546,7 +546,7 @@ void G_Physics( gentity_t *ent, int msec ); // #define M_ROOT3 1.732050808f -#define MAX_ALIEN_BBOX 15 +#define MAX_ALIEN_BBOX 20 typedef enum { diff --git a/src/game/g_main.c b/src/game/g_main.c index 23677497..a5e60315 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -159,12 +159,12 @@ static cvarTable_t gameCvarTable[ ] = { &g_alienBuildPoints, "g_alienBuildPoints", "1000", 0, 0, qfalse }, { &g_humanStage, "g_humanStage", "0", 0, 0, qfalse }, { &g_humanMaxStage, "g_humanMaxStage", "2", 0, 0, qfalse }, - { &g_humanStage2Threshold, "g_humanStage2Threshold", "50", 0, 0, qfalse }, - { &g_humanStage3Threshold, "g_humanStage3Threshold", "100", 0, 0, qfalse }, + { &g_humanStage2Threshold, "g_humanStage2Threshold", "25", 0, 0, qfalse }, + { &g_humanStage3Threshold, "g_humanStage3Threshold", "50", 0, 0, qfalse }, { &g_alienStage, "g_alienStage", "0", 0, 0, qfalse }, { &g_alienMaxStage, "g_alienMaxStage", "2", 0, 0, qfalse }, - { &g_alienStage2Threshold, "g_alienStage2Threshold", "50", 0, 0, qfalse }, - { &g_alienStage3Threshold, "g_alienStage3Threshold", "100", 0, 0, qfalse }, + { &g_alienStage2Threshold, "g_alienStage2Threshold", "25", 0, 0, qfalse }, + { &g_alienStage3Threshold, "g_alienStage3Threshold", "50", 0, 0, qfalse }, { &g_debugMapRotation, "g_debugMapRotation", "0", 0, 0, qfalse }, { &g_currentMapRotation, "g_currentMapRotation", "-1", 0, 0, qfalse }, // -1 = NOT_ROTATING diff --git a/src/game/g_missile.c b/src/game/g_missile.c index cb72502d..ca316818 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -732,7 +732,7 @@ gentity_t *fire_bounceBall( gentity_t *self, vec3_t start, vec3_t dir ) VectorScale( dir, DRAGOON_BOUNCEBALL_SPEED, bolt->s.pos.trDelta ); SnapVector( bolt->s.pos.trDelta ); // save net bandwidth VectorCopy( start, bolt->r.currentOrigin ); - bolt->s.eFlags |= EF_BOUNCE; + /*bolt->s.eFlags |= EF_BOUNCE;*/ return bolt; } diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index b5094a50..c6a8759e 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -767,6 +767,12 @@ void poisonCloud( gentity_t *ent ) if( humanPlayer->client && humanPlayer->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) { + if( BG_gotItem( UP_LIGHTARMOUR, humanPlayer->client->ps.stats ) ) + continue; + + if( BG_gotItem( UP_BATTLESUIT, humanPlayer->client->ps.stats ) ) + continue; + if( !( humanPlayer->client->ps.stats[ STAT_STATE ] & SS_POISONCLOUDED ) ) { humanPlayer->client->ps.stats[ STAT_STATE ] |= SS_POISONCLOUDED; diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 27d9f01b..7a38cad5 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -159,6 +159,7 @@ * ALIEN buildables * * _BP - build points required for this buildable + * _BT - build time required for this buildable * _REGEN - the amount of health per second regained * _SPLASHDAMGE - the amount of damage caused by this buildable when melting * _SPLASHRADIUS - the radius around which it does this damage @@ -177,6 +178,7 @@ #define CREEP_ARMOUR_MODIFIER 0.75f #define ASPAWN_BP 100 +#define ASPAWN_BT 10000 #define ASPAWN_HEALTH ABHM(500) #define ASPAWN_REGEN 10 #define ASPAWN_SPLASHDAMAGE 50 @@ -185,6 +187,7 @@ #define ASPAWN_VALUE 150 #define BARRICADE_BP 80 +#define BARRICADE_BT 10000 #define BARRICADE_HEALTH ABHM(250) #define BARRICADE_REGEN 15 #define BARRICADE_SPLASHDAMAGE 50 @@ -192,6 +195,7 @@ #define BARRICADE_CREEPSIZE 120 #define BOOSTER_BP 120 +#define BOOSTER_BT 10000 #define BOOSTER_HEALTH ABHM(200) #define BOOSTER_REGEN 10 #define BOOSTER_SPLASHDAMAGE 50 @@ -200,15 +204,17 @@ #define BOOSTER_INTERVAL 30000 //time in msec between uses (per player) #define ACIDTUBE_BP 50 +#define ACIDTUBE_BT 10000 #define ACIDTUBE_HEALTH ABHM(100) #define ACIDTUBE_REGEN 10 -#define ACIDTUBE_SPLASHDAMAGE 30 -#define ACIDTUBE_SPLASHRADIUS 200 +#define ACIDTUBE_SPLASHDAMAGE 40 +#define ACIDTUBE_SPLASHRADIUS 300 #define ACIDTUBE_CREEPSIZE 120 -#define ACIDTUBE_RANGE 200.0f +#define ACIDTUBE_RANGE 300.0f #define ACIDTUBE_REPEAT 3000 #define HIVE_BP 50 +#define HIVE_BT 10000 #define HIVE_HEALTH ABHM(100) #define HIVE_REGEN 10 #define HIVE_SPLASHDAMAGE 30 @@ -221,6 +227,7 @@ #define HIVE_DIR_CHANGE_PERIOD 500 #define TRAPPER_BP 150 +#define TRAPPER_BT 5000 #define TRAPPER_HEALTH ABHM(80) #define TRAPPER_REGEN 8 #define TRAPPER_SPLASHDAMAGE 15 @@ -232,6 +239,7 @@ #define LOCKBLOB_DOT 0.85f // max angle = acos( LOCKBLOB_DOT ) #define OVERMIND_BP 0 +#define OVERMIND_BT 20000 #define OVERMIND_HEALTH ABHM(1000) #define OVERMIND_REGEN 15 #define OVERMIND_SPLASHDAMAGE 100 @@ -242,6 +250,7 @@ #define OVERMIND_VALUE 300 #define HOVEL_BP 80 +#define HOVEL_BT 10000 #define HOVEL_HEALTH ABHM(750) #define HOVEL_REGEN 20 #define HOVEL_SPLASHDAMAGE 20 @@ -261,6 +270,9 @@ #define ALIENSTAGE2_HLTH_MODIFIER 1.2f #define ALIENSTAGE3_HLTH_MODIFIER 1.5f +#define ALIEN_POISON_TIME 10000 +#define ALIEN_POISON_DMG 30 +#define ALIEN_POISON_DIVIDER (1.0f/1.32f) //about 1.0/(time`th root of damage) /* @@ -347,7 +359,7 @@ #define LASGUN_AMMO 300 #define LASGUN_REPEAT 150 #define LASGUN_RELOAD 2000 -#define LASGUN_DAMAGE HDM(10) +#define LASGUN_DAMAGE HDM(15) #define PAINSAW_PRICE 100 #define PAINSAW_REPEAT 75 @@ -398,6 +410,7 @@ * HUMAN buildables * * _BP - build points required for this buildable + * _BT - build time required for this buildable * _SPLASHDAMGE - the amount of damage caused by this buildable when it blows up * _SPLASHRADIUS - the radius around which it does this damage * @@ -415,18 +428,21 @@ #define HUMAN_DETONATION_DELAY 5000 #define HSPAWN_BP 100 +#define HSPAWN_BT 10000 #define HSPAWN_HEALTH HBHM(500) #define HSPAWN_SPLASHDAMAGE 50 #define HSPAWN_SPLASHRADIUS 100 #define HSPAWN_VALUE 1 #define MEDISTAT_BP 80 +#define MEDISTAT_BT 10000 #define MEDISTAT_HEALTH HBHM(200) #define MEDISTAT_SPLASHDAMAGE 50 #define MEDISTAT_SPLASHRADIUS 100 #define MAX_MEDISTAT_CLIENTS 1 #define MGTURRET_BP 80 +#define MGTURRET_BT 10000 #define MGTURRET_HEALTH HBHM(100) #define MGTURRET_SPLASHDAMAGE 50 #define MGTURRET_SPLASHRADIUS 100 @@ -441,6 +457,7 @@ #define MGTURRET_DCC_ACCURACYTOLERANCE MGTURRET_DCC_ANGULARSPEED / 1.5f #define TESLAGEN_BP 100 +#define TESLAGEN_BT 15000 #define TESLAGEN_HEALTH HBHM(200) #define TESLAGEN_SPLASHDAMAGE 50 #define TESLAGEN_SPLASHRADIUS 100 @@ -449,33 +466,32 @@ #define TESLAGEN_DMG HDM(50) #define DC_BP 80 +#define DC_BT 10000 #define DC_HEALTH HBHM(150) #define DC_SPLASHDAMAGE 50 #define DC_SPLASHRADIUS 100 #define ARMOURY_BP 100 +#define ARMOURY_BT 10000 #define ARMOURY_HEALTH HBHM(175) #define ARMOURY_SPLASHDAMAGE 50 #define ARMOURY_SPLASHRADIUS 100 #define REACTOR_BP 0 +#define REACTOR_BT 20000 #define REACTOR_HEALTH HBHM(1000) #define REACTOR_SPLASHDAMAGE 200 #define REACTOR_SPLASHRADIUS 300 #define REACTOR_VALUE 2 #define REPEATER_BP 100 +#define REPEATER_BT 10000 #define REPEATER_HEALTH HBHM(200) #define REPEATER_SPLASHDAMAGE 50 #define REPEATER_SPLASHRADIUS 100 #define ENERGY_REFIL_TIME 1000 //1/2 second between every clip refil -#define FLOATMINE_BP 50 -#define FLOATMINE_HEALTH HBHM(10) -#define FLOATMINE_SPLASHDAMAGE 250 -#define FLOATMINE_SPLASHRADIUS 500 - /* * HUMAN misc */ diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 5a98d881..15b43c67 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -3343,24 +3343,24 @@ static void UI_LoadTremAlienClasses( void ) uiInfo.tremAlienClassCount = 2; + uiInfo.tremAlienClassList[ 0 ].text = + String_Alloc( BG_FindHumanNameForClassNum( PCL_A_O_BASE ) ); + uiInfo.tremAlienClassList[ 0 ].cmd = + String_Alloc( va( "cmd class %s", BG_FindNameForClassNum( PCL_A_O_BASE ) ) ); + uiInfo.tremAlienClassList[ 0 ].infopane = + UI_FindInfoPaneByName( va( "%sclass", BG_FindNameForClassNum( PCL_A_O_BASE ) ) ); + if( BG_FindStagesForClass( PCL_A_B_LEV1, UI_GetCurrentAlienStage( ) ) ) bClass = PCL_A_B_LEV1; else bClass = PCL_A_B_BASE; - - uiInfo.tremAlienClassList[ 0 ].text = - String_Alloc( BG_FindHumanNameForClassNum( bClass ) ); - uiInfo.tremAlienClassList[ 0 ].cmd = - String_Alloc( va( "cmd class %s", BG_FindNameForClassNum( bClass ) ) ); - uiInfo.tremAlienClassList[ 0 ].infopane = - UI_FindInfoPaneByName( va( "%sclass", BG_FindNameForClassNum( bClass ) ) ); uiInfo.tremAlienClassList[ 1 ].text = - String_Alloc( BG_FindHumanNameForClassNum( PCL_A_O_BASE ) ); + String_Alloc( BG_FindHumanNameForClassNum( bClass ) ); uiInfo.tremAlienClassList[ 1 ].cmd = - String_Alloc( va( "cmd class %s", BG_FindNameForClassNum( PCL_A_O_BASE ) ) ); + String_Alloc( va( "cmd class %s", BG_FindNameForClassNum( bClass ) ) ); uiInfo.tremAlienClassList[ 1 ].infopane = - UI_FindInfoPaneByName( va( "%sclass", BG_FindNameForClassNum( PCL_A_O_BASE ) ) ); + UI_FindInfoPaneByName( va( "%sclass", BG_FindNameForClassNum( bClass ) ) ); } /* @@ -3371,20 +3371,20 @@ UI_LoadTremHumanItems static void UI_LoadTremHumanItems( void ) { uiInfo.tremHumanItemCount = 2; - + uiInfo.tremHumanItemList[ 0 ].text = - String_Alloc( BG_FindHumanNameForWeapon( WP_HBUILD ) ); + String_Alloc( BG_FindHumanNameForWeapon( WP_MACHINEGUN ) ); uiInfo.tremHumanItemList[ 0 ].cmd = - String_Alloc( va( "cmd class %s", BG_FindNameForWeapon( WP_HBUILD ) ) ); + String_Alloc( va( "cmd class %s", BG_FindNameForWeapon( WP_MACHINEGUN ) ) ); uiInfo.tremHumanItemList[ 0 ].infopane = - UI_FindInfoPaneByName( va( "%sitem", BG_FindNameForWeapon( WP_HBUILD ) ) ); - + UI_FindInfoPaneByName( va( "%sitem", BG_FindNameForWeapon( WP_MACHINEGUN ) ) ); + uiInfo.tremHumanItemList[ 1 ].text = - String_Alloc( BG_FindHumanNameForWeapon( WP_MACHINEGUN ) ); + String_Alloc( BG_FindHumanNameForWeapon( WP_HBUILD ) ); uiInfo.tremHumanItemList[ 1 ].cmd = - String_Alloc( va( "cmd class %s", BG_FindNameForWeapon( WP_MACHINEGUN ) ) ); + String_Alloc( va( "cmd class %s", BG_FindNameForWeapon( WP_HBUILD ) ) ); uiInfo.tremHumanItemList[ 1 ].infopane = - UI_FindInfoPaneByName( va( "%sitem", BG_FindNameForWeapon( WP_MACHINEGUN ) ) ); + UI_FindInfoPaneByName( va( "%sitem", BG_FindNameForWeapon( WP_HBUILD ) ) ); } /* |