This commit is contained in:
nashmuhandes 2016-05-17 01:23:46 +08:00
commit 19c11fa782
3 changed files with 16 additions and 10 deletions

View file

@ -187,12 +187,15 @@ bool ARaiseAlarm::TryPickup (AActor *&toucher)
}
bool ARaiseAlarm::SpecialDropAction (AActor *dropper)
{
if (dropper->target != nullptr)
{
P_NoiseAlert(dropper->target, dropper->target);
if (dropper->target->CheckLocalView(consoleplayer))
{
Printf("You Fool! You've set off the alarm.\n");
}
}
Destroy ();
return true;
}
@ -237,11 +240,14 @@ bool ACloseDoor222::TryPickup (AActor *&toucher)
bool ACloseDoor222::SpecialDropAction (AActor *dropper)
{
EV_DoDoor (DDoor::doorClose, NULL, dropper, 222, 2., 0, 0, 0);
if (dropper->target != nullptr)
{
if (dropper->target->CheckLocalView(consoleplayer))
{
Printf("You're dead! You set off the alarm.\n");
}
P_NoiseAlert(dropper->target, dropper->target);
}
Destroy ();
return true;
}

View file

@ -1141,7 +1141,7 @@ bool PIT_CheckThing(FMultiBlockThingsIterator &it, FMultiBlockThingsIterator::Ch
DVector3 oldpos = tm.thing->PosRelative(thing);
// Both actors already overlap. To prevent them from remaining stuck allow the move if it
// takes them further apart or the move does not change the position (when called from P_ChangeSector.)
if (oldpos.X == thing->X() && oldpos.Y == thing->Y())
if (tm.pos.X == tm.thing->X() && tm.pos.Y == tm.thing->Y())
{
unblocking = true;
}
@ -5488,7 +5488,7 @@ void P_FindAboveIntersectors(AActor *actor)
// not what is wanted here.
continue;
}
if (thing->Z() >= actor->Z() &&
if (thing->Z() > actor->Z() &&
thing->Z() <= actor->Top())
{ // Thing intersects above the base
intersectors.Push(thing);

View file

@ -460,6 +460,8 @@ void AActor::LinkToWorld(bool spawningmapthing, sector_t *sector)
P_CollectConnectedGroups(Sector->PortalGroup, Pos(), Top(), radius, check);
BlockNode = NULL;
FBlockNode **alink = &this->BlockNode;
for (int i = -1; i < (int)check.Size(); i++)
{
DVector3 pos = i==-1? Pos() : PosRelative(check[i] & ~FPortalGroupArray::FLAT);
@ -471,11 +473,9 @@ void AActor::LinkToWorld(bool spawningmapthing, sector_t *sector)
if (x1 >= bmapwidth || x2 < 0 || y1 >= bmapheight || y2 < 0)
{ // thing is off the map
BlockNode = NULL;
}
else
{ // [RH] Link into every block this actor touches, not just the center one
FBlockNode **alink = &this->BlockNode;
x1 = MAX(0, x1);
y1 = MAX(0, y1);
x2 = MIN(bmapwidth - 1, x2);