Skip to content

Commit

Permalink
remove collidewall from plcollide(physent*, vec&, bool)
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Jan 12, 2025
1 parent 14e9f10 commit 075b7d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engine/world/physics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ static bool plcollide(const physent *d, const vec &dir, const physent *o, vec &c
}
}

bool plcollide(const physent *d, const vec &dir, bool insideplayercol) // collide with player
bool plcollide(const physent *d, const vec &dir, bool insideplayercol, vec &cwall) // collide with player
{
if(d->type==physent::PhysEnt_Camera)
{
Expand All @@ -390,7 +390,7 @@ bool plcollide(const physent *d, const vec &dir, bool insideplayercol) // col
{
continue;
}
if(plcollide(d, dir, o, collidewall))
if(plcollide(d, dir, o, cwall))
{
collideplayer = o;
return true;
Expand Down Expand Up @@ -1186,7 +1186,7 @@ bool collide(const physent *d, const vec &dir, float cutoff, bool playercol, boo
bs(static_cast<int>(d->o.x+d->radius), static_cast<int>(d->o.y+d->radius), static_cast<int>(d->o.z+d->aboveeye));
bo.sub(1);
bs.add(1); // guard space for rounding errors
return rootworld.octacollide(d, dir, cutoff, bo, bs) || (playercol && plcollide(d, dir, insideplayercol)); // collide with world
return rootworld.octacollide(d, dir, cutoff, bo, bs) || (playercol && plcollide(d, dir, insideplayercol, collidewall)); // collide with world
}

void recalcdir(const physent *d, const vec &oldvel, vec &dir)
Expand Down

0 comments on commit 075b7d2

Please sign in to comment.