- Added submission for ACS CheckPlayerCamera ACS function.
- Removed FRadiusThingsIterator after discovering that VC++ misoptimized it in P_CheckPosition. Now FBlockThingsIterator is used with the distance check being done manually. SVN r914 (trunk)
This commit is contained in:
parent
adc9f090ef
commit
99b2fab410
9 changed files with 71 additions and 53 deletions
|
|
@ -858,39 +858,6 @@ AActor *FBlockThingsIterator::Next()
|
|||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// FRadiusThingsIterator :: Next
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
FRadiusThingsIterator::FRadiusThingsIterator(fixed_t x, fixed_t y, fixed_t radius)
|
||||
: FBlockThingsIterator(FBoundingBox(x, y, radius))
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Radius = radius;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// FRadiusThingsIterator :: Next
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
AActor *FRadiusThingsIterator::Next()
|
||||
{
|
||||
AActor *actor;
|
||||
while ((actor = FBlockThingsIterator::Next()))
|
||||
{
|
||||
fixed_t blockdist = actor->radius + Radius;
|
||||
if ( abs(actor->x - X) < blockdist && abs(actor->y - Y) < blockdist)
|
||||
return actor;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// FPathTraverse :: Intercepts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue