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 /src/game | |
parent | 1895729b01532be9589d3606c331cc8f9ca9a9e3 (diff) |
More Wraith changes.
Diffstat (limited to 'src/game')
-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 |
5 files changed, 51 insertions, 17 deletions
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 |