Skip to content

Commit

Permalink
Fix not able to exit vehicle
Browse files Browse the repository at this point in the history
  • Loading branch information
cxong committed Mar 4, 2023
1 parent 98534c9 commit cda3ea9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/cdogs/actors.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,12 @@ static bool TryMoveActor(TActor *actor, struct vec2 pos)
CASSERT(
!svec2_is_nearly_equal(actor->Pos, pos, EPSILON_POS),
"trying to move to same position");
actor->CanPickupSpecial = false;

// Don't check collisions for pilots
if (actor->vehicleUID == -1)
{
actor->hasCollided = true;
actor->CanPickupSpecial = false;

const struct vec2 oldPos = actor->Pos;
pos = GetConstrainedPos(&gMap, actor->Pos, pos, actor->thing.size);
Expand Down
1 change: 0 additions & 1 deletion src/cdogs/pickup.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ void PickupPickup(TActor *a, Pickup *p, const bool pickupAll)
// Prevent multiple pickups by marking
p->PickedUp = true;
a->PickupAll = false;
a->CanPickupSpecial = false;
}
}

Expand Down

0 comments on commit cda3ea9

Please sign in to comment.