summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/bg_pmove.c11
-rw-r--r--src/game/bg_public.h3
-rw-r--r--src/game/g_active.c22
-rw-r--r--src/game/tremulous.h2
4 files changed, 30 insertions, 8 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 25746f9b..ed39a1a3 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -400,7 +400,7 @@ static float PM_CmdScale( usercmd_t *cmd )
modifier *= PCLOUD_ARMOUR_MODIFIER;
else
modifier *= PCLOUD_MODIFIER;
- }
+ }
}
if( pm->ps->weapon == WP_ALEVEL4 && pm->ps->pm_flags & PMF_CHARGE )
@@ -2141,7 +2141,8 @@ static void PM_GroundTrace( void )
pm->ps->stats[ STAT_STATE ] &= ~SS_WALLCLIMBING;
}
- if( pm->ps->pm_type == PM_DEAD || pm->ps->pm_time )
+ if( pm->ps->pm_type == PM_DEAD ||
+ ( pm->ps->pm_time && ( pm->ps->pm_flags & PMF_TIME_KNOCKOFF ) ) )
pm->ps->stats[ STAT_STATE ] &= ~SS_WALLCLIMBING;
if( pm->ps->stats[ STAT_STATE ] & SS_WALLCLIMBING )
@@ -3285,6 +3286,12 @@ static void PM_DropTimers( void )
{
if( pml.msec >= pm->ps->pm_time )
{
+ // If this is a toggle wallwalker that got knocked off,
+ // turn their wallwalk back on
+ if( ( pm->ps->pm_flags & PMF_TIME_KNOCKOFF ) &&
+ ( pm->ps->persistant[ PERS_STATE ] & PS_WALLCLIMBINGTOGGLE ) )
+ pm->ps->stats[ STAT_STATE ] |= SS_WALLCLIMBING;
+
pm->ps->pm_flags &= ~PMF_ALL_TIMES;
pm->ps->pm_time = 0;
}
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index a5d6680c..3c753092 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -136,6 +136,7 @@ typedef enum
#define PMF_BACKWARDS_RUN 16 // coast down to backwards run
#define PMF_TIME_LAND 32 // pm_time is time before rejump
#define PMF_TIME_KNOCKBACK 64 // pm_time is an air-accelerate only time
+#define PMF_TIME_KNOCKOFF 128 // pm_time is no-wallwalk time
#define PMF_TIME_WATERJUMP 256 // pm_time is waterjump
#define PMF_RESPAWNED 512 // clear after attack and jump buttons come up
#define PMF_USE_ITEM_HELD 1024
@@ -147,7 +148,7 @@ typedef enum
#define PMF_WEAPON_SWITCH 65536 // force a weapon switch
-#define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK|PMF_TIME_WALLJUMP)
+#define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK|PMF_TIME_KNOCKOFF|PMF_TIME_WALLJUMP)
typedef struct
{
diff --git a/src/game/g_active.c b/src/game/g_active.c
index f641d7ca..47fd446c 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -198,7 +198,7 @@ ClientShove
*/
static int GetClientMass( gentity_t *ent )
{
- int entMass = 100;
+ int entMass = 75;
if( ent->client->pers.teamSelection == PTE_ALIENS )
entMass = BG_FindHealthForClass( ent->client->pers.classSelection );
@@ -223,19 +223,28 @@ static void ClientShove( gentity_t *ent, gentity_t *victim )
!ent->client->pers.cmd.upmove )
return;
- // Shove is scaled by relative mass
+ // Cannot push enemy players unless they are walking on the player
+ if( !OnSameTeam( ent, victim ) &&
+ victim->client->ps.groundEntityNum != ent - g_entities )
+ return;
+
+ // Shove force is scaled by relative mass
entMass = GetClientMass( ent );
vicMass = GetClientMass( victim );
if( vicMass <= 0 || entMass <= 0 )
return;
+ force = g_shove.value * entMass / vicMass;
+ if( force < 0 )
+ force = 0;
+ if( force > 150 )
+ force = 150;
// Give the victim some shove velocity
VectorSubtract( victim->r.currentOrigin, ent->r.currentOrigin, dir );
VectorNormalizeFast( dir );
- force = g_shove.value * entMass / vicMass;
VectorScale( dir, force, push );
VectorAdd( victim->client->ps.velocity, push, victim->client->ps.velocity );
-
+
// Set the pmove timer so that the other client can't cancel
// out the movement immediately
if( !victim->client->ps.pm_time )
@@ -249,6 +258,11 @@ static void ClientShove( gentity_t *ent, gentity_t *victim )
time = 200;
victim->client->ps.pm_time = time;
victim->client->ps.pm_flags |= PMF_TIME_KNOCKBACK;
+
+ // Knock victim off if they are wallwalking on us
+ if( ( victim->client->ps.groundEntityNum == ent - g_entities ) &&
+ ( victim->client->ps.stats[ STAT_STATE ] & SS_WALLCLIMBING ) )
+ victim->client->ps.pm_flags |= PMF_TIME_KNOCKOFF;
}
}
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index a0f0908a..9dfd7b9a 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -52,7 +52,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define LEVEL0_BITE_DMG ADM(48)
#define LEVEL0_BITE_RANGE 64.0f
#define LEVEL0_BITE_WIDTH 6.0f
-#define LEVEL0_BITE_REPEAT 500
+#define LEVEL0_BITE_REPEAT 1000
#define LEVEL0_BITE_K_SCALE 1.0f
#define LEVEL1_CLAW_DMG ADM(32)