mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-30 15:52:09 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
5e4be101f1
3 changed files with 16 additions and 10 deletions
|
@ -188,10 +188,13 @@ bool ARaiseAlarm::TryPickup (AActor *&toucher)
|
||||||
|
|
||||||
bool ARaiseAlarm::SpecialDropAction (AActor *dropper)
|
bool ARaiseAlarm::SpecialDropAction (AActor *dropper)
|
||||||
{
|
{
|
||||||
P_NoiseAlert (dropper->target, dropper->target);
|
if (dropper->target != nullptr)
|
||||||
if (dropper->target->CheckLocalView (consoleplayer))
|
|
||||||
{
|
{
|
||||||
Printf ("You Fool! You've set off the alarm.\n");
|
P_NoiseAlert(dropper->target, dropper->target);
|
||||||
|
if (dropper->target->CheckLocalView(consoleplayer))
|
||||||
|
{
|
||||||
|
Printf("You Fool! You've set off the alarm.\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Destroy ();
|
Destroy ();
|
||||||
return true;
|
return true;
|
||||||
|
@ -237,11 +240,14 @@ bool ACloseDoor222::TryPickup (AActor *&toucher)
|
||||||
bool ACloseDoor222::SpecialDropAction (AActor *dropper)
|
bool ACloseDoor222::SpecialDropAction (AActor *dropper)
|
||||||
{
|
{
|
||||||
EV_DoDoor (DDoor::doorClose, NULL, dropper, 222, 2., 0, 0, 0);
|
EV_DoDoor (DDoor::doorClose, NULL, dropper, 222, 2., 0, 0, 0);
|
||||||
if (dropper->target->CheckLocalView (consoleplayer))
|
if (dropper->target != nullptr)
|
||||||
{
|
{
|
||||||
Printf ("You're dead! You set off the alarm.\n");
|
if (dropper->target->CheckLocalView(consoleplayer))
|
||||||
|
{
|
||||||
|
Printf("You're dead! You set off the alarm.\n");
|
||||||
|
}
|
||||||
|
P_NoiseAlert(dropper->target, dropper->target);
|
||||||
}
|
}
|
||||||
P_NoiseAlert (dropper->target, dropper->target);
|
|
||||||
Destroy ();
|
Destroy ();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1140,7 +1140,7 @@ bool PIT_CheckThing(FMultiBlockThingsIterator &it, FMultiBlockThingsIterator::Ch
|
||||||
DVector3 oldpos = tm.thing->PosRelative(thing);
|
DVector3 oldpos = tm.thing->PosRelative(thing);
|
||||||
// Both actors already overlap. To prevent them from remaining stuck allow the move if it
|
// 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.)
|
// 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;
|
unblocking = true;
|
||||||
}
|
}
|
||||||
|
@ -5487,7 +5487,7 @@ void P_FindAboveIntersectors(AActor *actor)
|
||||||
// not what is wanted here.
|
// not what is wanted here.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (thing->Z() >= actor->Z() &&
|
if (thing->Z() > actor->Z() &&
|
||||||
thing->Z() <= actor->Top())
|
thing->Z() <= actor->Top())
|
||||||
{ // Thing intersects above the base
|
{ // Thing intersects above the base
|
||||||
intersectors.Push(thing);
|
intersectors.Push(thing);
|
||||||
|
|
|
@ -459,6 +459,8 @@ void AActor::LinkToWorld(bool spawningmapthing, sector_t *sector)
|
||||||
|
|
||||||
P_CollectConnectedGroups(Sector->PortalGroup, Pos(), Top(), radius, check);
|
P_CollectConnectedGroups(Sector->PortalGroup, Pos(), Top(), radius, check);
|
||||||
|
|
||||||
|
BlockNode = NULL;
|
||||||
|
FBlockNode **alink = &this->BlockNode;
|
||||||
for (int i = -1; i < (int)check.Size(); i++)
|
for (int i = -1; i < (int)check.Size(); i++)
|
||||||
{
|
{
|
||||||
DVector3 pos = i==-1? Pos() : PosRelative(check[i] & ~FPortalGroupArray::FLAT);
|
DVector3 pos = i==-1? Pos() : PosRelative(check[i] & ~FPortalGroupArray::FLAT);
|
||||||
|
@ -470,11 +472,9 @@ void AActor::LinkToWorld(bool spawningmapthing, sector_t *sector)
|
||||||
|
|
||||||
if (x1 >= bmapwidth || x2 < 0 || y1 >= bmapheight || y2 < 0)
|
if (x1 >= bmapwidth || x2 < 0 || y1 >= bmapheight || y2 < 0)
|
||||||
{ // thing is off the map
|
{ // thing is off the map
|
||||||
BlockNode = NULL;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // [RH] Link into every block this actor touches, not just the center one
|
{ // [RH] Link into every block this actor touches, not just the center one
|
||||||
FBlockNode **alink = &this->BlockNode;
|
|
||||||
x1 = MAX(0, x1);
|
x1 = MAX(0, x1);
|
||||||
y1 = MAX(0, y1);
|
y1 = MAX(0, y1);
|
||||||
x2 = MIN(bmapwidth - 1, x2);
|
x2 = MIN(bmapwidth - 1, x2);
|
||||||
|
|
Loading…
Reference in a new issue