summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Levin <risujin@fastmail.fm>2009-10-03 11:19:17 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:14:52 +0000
commit9fed6829767d39dbe05f9fa54dfcf18ae792e991 (patch)
tree4847d5803721eec733ad20943457838d281a5f88 /src
parent5e46c5258c1999af57f2589a6cead5682af6ca5d (diff)
* Removed forced crouching for Tyrant crush, Tyrants should no longer bounce off of players
* Added a new cvar, cg_hudFilesEnable, set to "1" to enable your custom HUD -- this is a temporary workaround to custom HUD incompatibility!
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_main.c4
-rw-r--r--src/game/bg_pmove.c4
-rw-r--r--src/game/bg_public.h1
-rw-r--r--src/game/g_active.c7
-rw-r--r--src/game/g_local.h4
-rw-r--r--src/game/g_weapon.c17
6 files changed, 7 insertions, 30 deletions
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index 01234d1d..0f68f488 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -179,6 +179,7 @@ vmCvar_t cg_teamChatsOnly;
vmCvar_t cg_noVoiceChats;
vmCvar_t cg_noVoiceText;
vmCvar_t cg_hudFiles;
+vmCvar_t cg_hudFilesEnable;
vmCvar_t cg_scorePlum;
vmCvar_t cg_smoothClients;
vmCvar_t pmove_fixed;
@@ -329,6 +330,7 @@ static cvarTable_t cvarTable[ ] =
{ &cg_disableScannerPlane, "cg_disableScannerPlane", "0", CVAR_ARCHIVE },
{ &cg_tutorial, "cg_tutorial", "1", CVAR_ARCHIVE },
{ &cg_hudFiles, "cg_hudFiles", "ui/hud.txt", CVAR_ARCHIVE},
+ { &cg_hudFilesEnable, "cg_hudFilesEnable", "0", CVAR_ARCHIVE},
{ &cg_painBlendUpRate, "cg_painBlendUpRate", "10.0", 0 },
{ &cg_painBlendDownRate, "cg_painBlendDownRate", "0.5", 0 },
@@ -1713,7 +1715,7 @@ void CG_LoadHudMenu( void )
trap_Cvar_VariableStringBuffer( "cg_hudFiles", buff, sizeof( buff ) );
hudSet = buff;
- if( hudSet[ 0 ] == '\0' )
+ if( !cg_hudFilesEnable.integer || hudSet[ 0 ] == '\0' )
hudSet = "ui/hud.txt";
CG_LoadMenus( hudSet );
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 1547ec1d..76ad71f3 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -3620,10 +3620,6 @@ void Pmove( pmove_t *pmove )
msec = 66;
}
- // force crouch
- if( pmove->ps->pm_flags & PMF_FORCE_CROUCH )
- pmove->cmd.upmove = -127;
-
pmove->cmd.serverTime = pmove->ps->commandTime + msec;
PmoveSingle( pmove );
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 0bceb6c6..858b0740 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -135,7 +135,6 @@ 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_FORCE_CROUCH 128 // force the player to crouch
#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
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 4d35b6a0..94a8e8c9 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -1606,13 +1606,6 @@ void ClientThink_real( gentity_t *ent )
if( !ent->client->noclip )
G_TouchTriggers( ent );
- // Tyrant crush
- pm.pmext->fallVelocity = 0;
- if( ent->client->forceCrouchTime + 500 > level.time )
- client->ps.pm_flags |= PMF_FORCE_CROUCH;
- else
- client->ps.pm_flags &= ~PMF_FORCE_CROUCH;
-
Pmove( &pm );
G_UnlaggedDetectCollisions( ent );
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 31654231..932a79c1 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -470,9 +470,7 @@ struct gclient_s
int lcannonStartTime;
- // Tyrant crush
- int forceCrouchTime;
- int lastCrushTime;
+ int lastCrushTime; // Tyrant crush
};
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 43d221c2..2f3b6fd1 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -1411,18 +1411,6 @@ void G_CrushAttack( gentity_t *ent, gentity_t *victim, float sec )
victim->client->ps.groundEntityNum == ENTITYNUM_NONE ) )
return;
- // Force target to crouch first if they can
- if( victim->client &&
- !BG_InventoryContainsUpgrade( UP_BATTLESUIT, victim->client->ps.stats ) &&
- victim->client->ps.pm_type != PM_JETPACK &&
- victim->client->pers.cmd.upmove >= 0 &&
- !( victim->client->ps.pm_flags &
- ( PMF_CROUCH_HELD | PMF_FORCE_CROUCH ) ) )
- {
- victim->client->forceCrouchTime = level.time;
- return;
- }
-
// Deal velocity based damage to target
jump = BG_FindJumpMagnitudeForClass( ent->client->ps.stats[ STAT_PCLASS ] );
damage = ( ent->client->pmext.fallVelocity + jump ) *
@@ -1430,14 +1418,15 @@ void G_CrushAttack( gentity_t *ent, gentity_t *victim, float sec )
if( damage < 0 )
damage = 0;
-
+
+ // Players also get damaged periodically
if( victim->client &&
ent->client->lastCrushTime + LEVEL4_CRUSH_REPEAT < level.time )
{
ent->client->lastCrushTime = level.time;
damage += LEVEL4_CRUSH_DAMAGE;
}
-
+
if( damage < 1 )
return;