- Fixed: Polyobjects are serialized before players, which means that a call
to PO_MovePolyobj() from P_SerializePolyobjs() for a crushing polyobject that touches a player actor will not have a valid actor->player->mo chain for P_DamageMobj and crash if it happens to touch the player. Since the polyobject was presumably in a good spot when the game was saved, we can just skip this step entirely and let it take care of itself the next time it moves (by which time, the players will be valid). - Fixed: When transitioning from fullscreen to windowed mode with D3DFB, the window kept the WS_EX_TOPMOST style. - Slight correctness fix: When in fullscreen, the window should have WS_POPUP style. - Added a NULL target check to P_SpawnMissileXYZ(), A_DemonAttack1(), A_DemonAttack2_1(), and A_DemonAttack2_2(). SVN r384 (trunk)
This commit is contained in:
parent
93b18c3bfa
commit
48bb782b19
8 changed files with 77 additions and 41 deletions
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||
|
||||
bool PO_MovePolyobj (int num, int x, int y);
|
||||
bool PO_RotatePolyobj (int num, angle_t angle);
|
||||
void PO_Init (void);
|
||||
|
||||
|
|
@ -757,12 +756,9 @@ static void UpdateSegBBox (seg_t *seg)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool PO_MovePolyobj (int num, int x, int y)
|
||||
bool PO_MovePolyobj (int num, int x, int y, bool force)
|
||||
{
|
||||
int count;
|
||||
seg_t **segList;
|
||||
polyobj_t *po;
|
||||
bool blocked;
|
||||
|
||||
if (!(po = GetPolyobj (num)))
|
||||
{
|
||||
|
|
@ -772,21 +768,25 @@ bool PO_MovePolyobj (int num, int x, int y)
|
|||
UnLinkPolyobj (po);
|
||||
DoMovePolyobj (po, x, y);
|
||||
|
||||
segList = po->segs;
|
||||
blocked = false;
|
||||
for (count = po->numsegs; count; count--, segList++)
|
||||
if (!force)
|
||||
{
|
||||
if (CheckMobjBlocking(*segList, po))
|
||||
seg_t **segList = po->segs;
|
||||
bool blocked = false;
|
||||
|
||||
for (int count = po->numsegs; count; count--, segList++)
|
||||
{
|
||||
blocked = true;
|
||||
break;
|
||||
if (CheckMobjBlocking(*segList, po))
|
||||
{
|
||||
blocked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (blocked)
|
||||
{
|
||||
DoMovePolyobj (po, -x, -y);
|
||||
LinkPolyobj(po);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (blocked)
|
||||
{
|
||||
DoMovePolyobj (po, -x, -y);
|
||||
LinkPolyobj(po);
|
||||
return false;
|
||||
}
|
||||
po->startSpot[0] += x;
|
||||
po->startSpot[1] += y;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue