mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 23:33:00 +00:00
- revert the previous two commits for now - needs further optimization and testing
This commit is contained in:
parent
992141d8e3
commit
36629d2f80
2 changed files with 0 additions and 45 deletions
|
@ -155,38 +155,6 @@ bool P_CanCollideWith(AActor *tmthing, AActor *thing)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
// CanCrossLine
|
|
||||||
//
|
|
||||||
// Checks if an actor can cross a line after all checks are processed.
|
|
||||||
// If false, the line blocks them.
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
bool P_CanCrossLine(AActor *mo, line_t *line, int side, DVector3 next)
|
|
||||||
{
|
|
||||||
static unsigned VIndex = ~0u;
|
|
||||||
if (VIndex == ~0u)
|
|
||||||
{
|
|
||||||
VIndex = GetVirtualIndex(RUNTIME_CLASS(AActor), "CanCrossLine");
|
|
||||||
assert(VIndex != ~0u);
|
|
||||||
}
|
|
||||||
|
|
||||||
VMValue params[] = { mo, line, side, next.X, next.Y, next.Z, false };
|
|
||||||
VMReturn ret;
|
|
||||||
int retval;
|
|
||||||
ret.IntAt(&retval);
|
|
||||||
|
|
||||||
auto clss = mo->GetClass();
|
|
||||||
VMFunction *func = clss->Virtuals.Size() > VIndex ? clss->Virtuals[VIndex] : nullptr;
|
|
||||||
if (func != nullptr)
|
|
||||||
{
|
|
||||||
VMCall(func, params, countof(params), &ret, 1);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// FindRefPoint
|
// FindRefPoint
|
||||||
|
@ -985,13 +953,6 @@ bool PIT_CheckLine(FMultiBlockLinesIterator &mit, FMultiBlockLinesIterator::Chec
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!P_CanCrossLine(tm.thing, ld, P_PointOnLineSide(cres.Position, ld), tm.pos))
|
|
||||||
{
|
|
||||||
if (wasfit)
|
|
||||||
tm.thing->BlockingLine = ld;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// If the floor planes on both sides match we should recalculate open.bottom at the actual position we are checking
|
// If the floor planes on both sides match we should recalculate open.bottom at the actual position we are checking
|
||||||
// This is to avoid bumpy movement when crossing a linedef with the same slope on both sides.
|
// This is to avoid bumpy movement when crossing a linedef with the same slope on both sides.
|
||||||
// This should never narrow down the opening, though, only widen it.
|
// This should never narrow down the opening, though, only widen it.
|
||||||
|
|
|
@ -501,12 +501,6 @@ class Actor : Thinker native
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called by PIT_CheckLine to check if an actor can cross a line.
|
|
||||||
virtual bool CanCrossLine(Line crossing, int side, Vector3 next)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called by revival/resurrection to check if one can resurrect the other.
|
// Called by revival/resurrection to check if one can resurrect the other.
|
||||||
// "other" can be null when not passive.
|
// "other" can be null when not passive.
|
||||||
virtual bool CanResurrect(Actor other, bool passive)
|
virtual bool CanResurrect(Actor other, bool passive)
|
||||||
|
|
Loading…
Reference in a new issue