Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions code/game/bg_pmove.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ static void PM_CheckDuck (void)
}
else {
VectorSet( pm->mins, -PLAYER_WIDTH, -PLAYER_WIDTH, MINS_Z );
VectorSet( pm->maxs, PLAYER_WIDTH, PLAYER_WIDTH, 16 );
VectorSet( pm->maxs, PLAYER_WIDTH, PLAYER_WIDTH, CROUCH_MAXS_Z );
}
pm->ps->pm_flags |= PMF_DUCKED;
pm->ps->viewheight = CROUCH_VIEWHEIGHT;
Expand All @@ -1275,7 +1275,7 @@ static void PM_CheckDuck (void)

if (pm->ps->pm_type == PM_DEAD)
{
pm->maxs[2] = DEAD_HEIGHT;
pm->maxs[2] = DEAD_MAXS_Z;
pm->ps->viewheight = DEAD_VIEWHEIGHT;
return;
}
Expand All @@ -1289,7 +1289,7 @@ static void PM_CheckDuck (void)
if (pm->ps->pm_flags & PMF_DUCKED)
{
// try to stand up
pm->maxs[2] = DEFAULT_HEIGHT;
pm->maxs[2] = MAXS_Z;
pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, pm->ps->origin, pm->ps->clientNum, pm->tracemask );
if (!trace.allsolid)
pm->ps->pm_flags &= ~PMF_DUCKED;
Expand All @@ -1298,12 +1298,12 @@ static void PM_CheckDuck (void)

if (pm->ps->pm_flags & PMF_DUCKED)
{
pm->maxs[2] = CROUCH_HEIGHT;
pm->maxs[2] = CROUCH_MAXS_Z;
pm->ps->viewheight = CROUCH_VIEWHEIGHT;
}
else
{
pm->maxs[2] = DEFAULT_HEIGHT;
pm->maxs[2] = MAXS_Z;
pm->ps->viewheight = DEFAULT_VIEWHEIGHT;
}
}
Expand Down
6 changes: 3 additions & 3 deletions code/game/bg_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

#define PLAYER_WIDTH 15
#define MINS_Z -24
#define DEFAULT_HEIGHT 32
#define MAXS_Z 32
#define DEFAULT_VIEWHEIGHT 26
#define CROUCH_HEIGHT 16
#define CROUCH_MAXS_Z 16
#define CROUCH_VIEWHEIGHT 12
#define DEAD_HEIGHT -8
#define DEAD_MAXS_Z -8
#define DEAD_VIEWHEIGHT -16
#define INVUL_RADIUS 42

Expand Down
2 changes: 1 addition & 1 deletion code/game/g_combat.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int

self->s.loopSound = 0;

self->r.maxs[2] = DEAD_HEIGHT;
self->r.maxs[2] = DEAD_MAXS_Z;

// don't allow respawn until the death anim is done
// g_forcerespawn may force spawning at some later time
Expand Down