Skip to content

Commit

Permalink
game: don't rotate corpse when "boucing" on ground
Browse files Browse the repository at this point in the history
  • Loading branch information
Aranud committed Jan 7, 2020
1 parent 994463d commit ddf636d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/game/g_items.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,13 @@ void G_BounceItem(gentity_t *ent, trace_t *trace)
if (trace->startsolid || (trace->plane.normal[2] > 0 && ent->s.pos.trDelta[2] < 40))
{
vectoangles(trace->plane.normal, ent->s.angles);
ent->s.angles[0] += 90;

// don't rotate corpse, looking too ugly
if (ent->s.eType != ET_CORPSE)
{
ent->s.angles[0] += 90;
}

if (ent->s.angles[0] > 0.0f && ent->s.angles[0] < 50.0f)
{
// align items on inclined ground
Expand Down

0 comments on commit ddf636d

Please sign in to comment.