Fixed the crouch-stay bug on a new round trigger, tried fixing crouching-jumping a little so you can't hover across the map

This commit is contained in:
Marco Cawthorne 2018-01-01 12:20:51 -08:00
parent d37546c131
commit f011126858
5 changed files with 10 additions and 7 deletions

View file

@ -157,8 +157,7 @@ void CSQC_CalcViewport( int s, float fWinWidth, float fWinHeight ) {
//as a general rule, you won't notice unless there's some big drawfills.
switch ( numclientseats ) {
case 3:
if (!s)
{
if ( !s ) {
case 2:
vVideoResolution = [ fWinWidth, fWinHeight * 0.5 ];
vVideoMins = [ 0, ( s & 1 ) * vVideoResolution_y ];

View file

@ -128,6 +128,10 @@ void Player_Death( int iHitBody ) {
}
}
if ( self.flags & FL_CROUCHING ) {
self.flags -= FL_CROUCHING;
self.maxspeed = Player_GetMaxSpeed( 0 );
}
Spawn_MakeSpectator();
self.classname = "player";
@ -205,11 +209,11 @@ void Player_CrouchDown( void ) {
if ( !( self.flags & FL_CROUCHING ) ) {
setsize( self, VEC_CHULL_MIN, VEC_CHULL_MAX );
setorigin( self, self.origin - '0 0 18' );
self.flags = self.flags | FL_CROUCHING;
self.view_ofs = VEC_PLAYER_CVIEWPOS;
self.velocity_z = self.velocity_z + 50;
self.maxspeed = Player_GetMaxSpeed( self.weapon );
self.iCrouchAttempt = 1;
self.iCrouchAttempt = TRUE;
return;
}
@ -228,9 +232,8 @@ void Player_CrouchUp( void ) {
if ( ( self.flags & FL_CROUCHING ) && ( Player_CrouchCheck( self ) ) ) {
setsize( self, VEC_HULL_MIN, VEC_HULL_MAX );
setorigin( self, self.origin + '0 0 18');
self.velocity_z = self.velocity_z + 16;
setorigin( self, self.origin + '0 0 18' );
self.velocity_z = self.velocity_z + 25;
self.view_ofs = VEC_PLAYER_VIEWPOS;
self.flags = ( self.flags - FL_CROUCHING );
self.iCrouchAttempt = FALSE;

View file

@ -154,6 +154,7 @@ void Spawn_RespawnClient( float fTeam ) {
self.view_ofs = VEC_PLAYER_VIEWPOS;
self.velocity = '0 0 0';
self.maxspeed = Player_GetMaxSpeed( self.weapon );
self.frame = 1; // Idle frame
self.fBombProgress = 0;

Binary file not shown.

Binary file not shown.