diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-06-26 11:34:41 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-06-26 13:17:24 +0200 |
commit | e99ab52825d6b713a12a8ee19b5eaa81e78db28e (patch) | |
tree | 6e05d09962f6c6109e799082de9f62796a5b905d | |
parent | 1895729b01532be9589d3606c331cc8f9ca9a9e3 (diff) |
More Wraith changes.
-rw-r--r-- | assets/sound/player/level1/warping-old1.wav | bin | 609796 -> 0 bytes | |||
-rw-r--r-- | src/cgame/cg_draw.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_event.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 1 | ||||
-rw-r--r-- | src/cgame/cg_predict.c | 1 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 2 | ||||
-rw-r--r-- | src/game/bg_misc.c | 11 | ||||
-rw-r--r-- | src/game/bg_mod.h | 3 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 28 | ||||
-rw-r--r-- | src/game/g_active.c | 20 | ||||
-rw-r--r-- | src/game/tremulous.h | 6 |
11 files changed, 59 insertions, 19 deletions
diff --git a/assets/sound/player/level1/warping-old1.wav b/assets/sound/player/level1/warping-old1.wav Binary files differdeleted file mode 100644 index b02cda9..0000000 --- a/assets/sound/player/level1/warping-old1.wav +++ /dev/null diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 6328f42..15a5cc4 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -4143,7 +4143,7 @@ CG_DrawWarpOverlay */ static void CG_DrawWarpOverlay( void ) { - if( !( cg.predictedPlayerEntity.currentState.eFlags & EF_WARPING ) || + if( !cg.warping || cg.renderingThirdPerson ) { return; diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 4ce475e..4ce2b25 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -135,6 +135,9 @@ static void CG_Obituary( entityState_t *ent ) case MOD_SPITEFUL_ABCESS: message = "^5was raped by a Spiteful Abcess"; break; + case MOD_WARP_BLOCKED: + message = "^5warped into a wall"; + break; default: message = NULL; break; @@ -644,6 +647,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) ci = &cgs.clientinfo[ clientNum ]; if( ci->team != cg.snap->ps.stats[ STAT_TEAM ] && + cg.snap->ps.stats[ STAT_TEAM ] != TEAM_NONE && ( es->eFlags & EF_WARPING ) ) { warpingEnemyWraith = qtrue; diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 5b8f8b0..91ea3a9 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1162,6 +1162,7 @@ typedef struct float viewQuake; + qboolean warping; qboolean warpExitBlocked; } cg_t; diff --git a/src/cgame/cg_predict.c b/src/cgame/cg_predict.c index aa62e4d..7fec761 100644 --- a/src/cgame/cg_predict.c +++ b/src/cgame/cg_predict.c @@ -910,6 +910,7 @@ void CG_PredictPlayerState( void ) cg.physicsTime, cg.time, cg.predictedPlayerState.origin ); + cg.warping = !!( cg.predictedPlayerEntity.currentState.eFlags & EF_WARPING ); cg.warpExitBlocked = cg.pmext.warpExitBlocked; // fire events and other transition triggered things diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 69b8b90..12c2d21 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1132,7 +1132,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent } - if( ps && ( cent->currentState.eFlags & EF_WARPING ) ) + if( ps && cg.warping ) { trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, cgs.media.warpingSound ); diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index bd498c6..01ea756 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -2260,12 +2260,11 @@ static const classAttributes_t bg_classList[ ] = { PCL_ALIEN_LEVEL1, //int classnum; "level1", //char *classname; - "A support class able to crawl on walls and ceilings. Its melee " - "attack is most effective when combined with the ability to grab " - "and hold its victims in place. Provides a weak healing aura " - "that accelerates the healing rate of nearby aliens. It also has " - "an acid bomb that can be used to deal moderate area damage. " - "The basilisk is also resistant to flamer.", + "Has a melee attack, the ability to crawl on walls and " + "ceilings and the ability to temporarily become incorporeal " + "and pass through buildings and other players. In this state " + "the Wraith cannot be seen, heard or hurt. Provides a healing " + "aura that accelerates the healing rate of nearby aliens.", STAGE_GE_1, //int stages LEVEL1_HEALTH, //int health; 0.0f, //float fallDamage; diff --git a/src/game/bg_mod.h b/src/game/bg_mod.h index 1db77dc..eed80a2 100644 --- a/src/game/bg_mod.h +++ b/src/game/bg_mod.h @@ -64,4 +64,5 @@ MOD( MOD_SLAP, CSW_UNKNOWN ), MOD( MOD_DECONSTRUCT, CSW_UNKNOWN ), MOD( MOD_REPLACE, CSW_UNKNOWN ), MOD( MOD_NOCREEP, CSW_UNKNOWN ), -MOD( MOD_NOBP, CSW_UNKNOWN ) +MOD( MOD_NOBP, CSW_UNKNOWN ), +MOD( MOD_WARP_BLOCKED, CSW_UNKNOWN ) diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 1e1fb69..0d8bfda 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -3855,25 +3855,39 @@ void PM_WraithMechanics( void ) target = !!( pm->cmd.buttons & BUTTON_ATTACK2 ); force_exit = qfalse; - if( pm->ps->stats[ STAT_MISC ] <= 0 ) + if( pm->ps->stats[ STAT_MISC ] < 0 ) { + if( target && pm->ps->weaponTime <= 0 ) + { + PM_AddEvent( EV_NOAMMO ); + pm->ps->weaponTime += 500; + } + target = qfalse; force_exit = qtrue; -#ifdef GAME - //Com_Printf( "out of ammo\n" ); -#endif } - if( !!( pm->ps->eFlags & EF_WARPING ) == target ) + if( ( !force_exit && pm->ps->weaponTime ) || + !!( pm->ps->eFlags & EF_WARPING ) == target ) { goto done; } if( target ) { + if( pm->ps->stats[ STAT_MISC ] < LEVEL1_WARP_MIN_TIME ) + { + if( pm->ps->weaponTime <= 0 ) + { + PM_AddEvent( EV_NOAMMO ); + pm->ps->weaponTime += 500; + } + goto done; + } + pm->ps->eFlags |= EF_WARPING; PM_AddEvent( EV_WARP_ENTER ); - pm->ps->stats[ STAT_MISC ] -= LEVEL1_WARP_COST; + pm->ps->weaponTime += LEVEL1_WARP_MIN_TIME; } else { @@ -3899,6 +3913,7 @@ void PM_WraithMechanics( void ) pm->ps->eFlags &= ~EF_WARPING; PM_AddEvent( EV_WARP_EXIT ); + pm->ps->weaponTime += LEVEL1_WARP_REPEAT; } done: @@ -3907,6 +3922,7 @@ done: { pm->tracemask = MASK_SOLID; pm->ps->stats[ STAT_MISC ] -= pml.msec; + pm->cmd.buttons &= ~BUTTON_ATTACK; } else { diff --git a/src/game/g_active.c b/src/game/g_active.c index e23b0c5..f8b28f1 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -1471,7 +1471,6 @@ void ClientThink_real( gentity_t *ent ) int msec; usercmd_t *ucmd; int i; - float modifier = 1.0f; client = ent->client; @@ -1597,6 +1596,7 @@ void ClientThink_real( gentity_t *ent ) int i, num; int count, interval; vec3_t range, mins, maxs; + float modifier = 1.0f; VectorSet( range, REGEN_BOOST_RANGE, REGEN_BOOST_RANGE, REGEN_BOOST_RANGE ); @@ -1634,6 +1634,20 @@ void ClientThink_real( gentity_t *ent ) class_t class = boost->client->ps.stats[ STAT_CLASS ]; qboolean didBoost = qfalse; + if( class == PCL_ALIEN_LEVEL1 && modifier < LEVEL1_REGEN_MOD ) + { + if( boost->s.eFlags & EF_WARPING ) + { + modifier = LEVEL1_REGEN_MOD_WARPING; + } + else + { + modifier = LEVEL1_REGEN_MOD; + } + + didBoost = qtrue; + } + if( didBoost && ent->health < client->ps.stats[ STAT_MAX_HEALTH ] ) boost->client->pers.hasHealed = qtrue; } @@ -1673,7 +1687,7 @@ void ClientThink_real( gentity_t *ent ) client->lastWarpTime + LEVEL1_WARP_REGEN_DELAY <= level.time && G_Overmind( ) ) { - client->ps.stats[ STAT_MISC ] += msec * LEVEL1_WARP_REGEN_RATE * modifier; + client->ps.stats[ STAT_MISC ] += msec * LEVEL1_WARP_REGEN_RATE; if( client->ps.stats[ STAT_MISC ] > LEVEL1_WARP_TIME ) { @@ -1816,7 +1830,7 @@ void ClientThink_real( gentity_t *ent ) case WP_ALEVEL1: if( pm.pmext->warpExitedBlocked ) { - G_Damage( ent, NULL, ent, NULL, NULL, 10000, DAMAGE_NO_KNOCKBACK, MOD_CRUSH ); + G_Damage( ent, NULL, ent, NULL, NULL, 10000, DAMAGE_NO_KNOCKBACK, MOD_WARP_BLOCKED ); } else { diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 84d8a27..82e6b8e 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -140,9 +140,13 @@ TREMULOUS EDGE MOD SRC FILE #define LEVEL1_CLAW_K_SCALE 1.0f #define LEVEL1_WARP_TIME 5500 +#define LEVEL1_WARP_MIN_TIME 500 +#define LEVEL1_WARP_REPEAT 500 #define LEVEL1_WARP_REGEN_DELAY 2000 #define LEVEL1_WARP_REGEN_RATE 1 -#define LEVEL1_WARP_COST 500 + +#define LEVEL1_REGEN_MOD 2.0f +#define LEVEL1_REGEN_MOD_WARPING 3.0f //Marauder #define LEVEL2_SPEED 1.2f |