Ignore player collision if the actor is already nonsolid

This fixes #277 where the vehicle could get stuck due to the actor being solid afterwards
This commit is contained in:
smallmodel 2024-04-21 20:33:31 +02:00
parent 5ee7cb16bb
commit 19c68aa25d
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -3625,7 +3625,9 @@ void Actor::SafeSetOrigin(vec3_t newOrigin)
if (!m_bNoPlayerCollision) {
Player *p = (Player *)G_GetEntity(0);
if (p && IsTouching(p)) {
// Solidity check added in 2.30
// If the Actor is already nonsolid the player won't get stuck
if (p && IsTouching(p) && getSolidType() != SOLID_NOT) {
Com_Printf("(entnum %d, radnum %d) is going not solid to not get stuck in the player\n", entnum, radnum);
m_bNoPlayerCollision = true;
setSolidType(SOLID_NOT);