mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- Fixed: FBlockThingsIterator didn't set the current block coordinates if
they were outside the blockmap. This could cause extreme delays if an iteration started outside the valid boundaries. - added nextmap and nextsecret CCMDs. SVN r924 (trunk)
This commit is contained in:
parent
eb1e17db06
commit
48d8881065
5 changed files with 92 additions and 44 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
April 18, 2008 (Changes by Graf Zahl)
|
||||||
|
- Fixed: FBlockThingsIterator didn't set the current block coordinates if
|
||||||
|
they were outside the blockmap. This could cause extreme delays if an
|
||||||
|
iteration started outside the valid boundaries.
|
||||||
|
|
||||||
April 17, 2008
|
April 17, 2008
|
||||||
- Fixed: The music stream needs to zero the FMOD_REVERB_CHANNELPROPERTIES
|
- Fixed: The music stream needs to zero the FMOD_REVERB_CHANNELPROPERTIES
|
||||||
before sending it to Channel::getReverbProperties().
|
before sending it to Channel::getReverbProperties().
|
||||||
|
|
|
@ -841,3 +841,45 @@ CCMD(thaw)
|
||||||
Net_WriteByte (DEM_GENERICCHEAT);
|
Net_WriteByte (DEM_GENERICCHEAT);
|
||||||
Net_WriteByte (CHT_CLEARFROZENPROPS);
|
Net_WriteByte (CHT_CLEARFROZENPROPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
CCMD(nextmap)
|
||||||
|
{
|
||||||
|
char * next=NULL;
|
||||||
|
|
||||||
|
if (*level.nextmap) next = level.nextmap;
|
||||||
|
|
||||||
|
if (next != NULL && strncmp(next, "enDSeQ", 6))
|
||||||
|
{
|
||||||
|
G_InitNew(next, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Printf("no next map!\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
CCMD(nextsecret)
|
||||||
|
{
|
||||||
|
char * next=NULL;
|
||||||
|
|
||||||
|
if (*level.secretmap) next = level.secretmap;
|
||||||
|
|
||||||
|
if (next != NULL && strncmp(next, "enDSeQ", 6))
|
||||||
|
{
|
||||||
|
G_InitNew(next, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Printf("no next secret map!\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1008,8 +1008,6 @@ bool P_CheckPosition (AActor *thing, fixed_t x, fixed_t y, FCheckPosition &tm)
|
||||||
tm.x = x;
|
tm.x = x;
|
||||||
tm.y = y;
|
tm.y = y;
|
||||||
|
|
||||||
FBoundingBox box(x, y, thing->radius);
|
|
||||||
|
|
||||||
newsec = P_PointInSector (x,y);
|
newsec = P_PointInSector (x,y);
|
||||||
tm.ceilingline = thing->BlockingLine = NULL;
|
tm.ceilingline = thing->BlockingLine = NULL;
|
||||||
|
|
||||||
|
@ -1047,51 +1045,54 @@ bool P_CheckPosition (AActor *thing, fixed_t x, fixed_t y, FCheckPosition &tm)
|
||||||
}
|
}
|
||||||
|
|
||||||
tm.stepthing = NULL;
|
tm.stepthing = NULL;
|
||||||
|
FBoundingBox box(x, y, thing->radius);
|
||||||
|
|
||||||
FBlockThingsIterator it2(FBoundingBox(x, y, thing->radius));
|
|
||||||
AActor *th;
|
|
||||||
while ((th = it2.Next()))
|
|
||||||
{
|
{
|
||||||
if (!PIT_CheckThing(th, tm))
|
FBlockThingsIterator it2(box);
|
||||||
{ // [RH] If a thing can be stepped up on, we need to continue checking
|
AActor *th;
|
||||||
// other things in the blocks and see if we hit something that is
|
while ((th = it2.Next()))
|
||||||
// definitely blocking. Otherwise, we need to check the lines, or we
|
{
|
||||||
// could end up stuck inside a wall.
|
if (!PIT_CheckThing(th, tm))
|
||||||
AActor *BlockingMobj = thing->BlockingMobj;
|
{ // [RH] If a thing can be stepped up on, we need to continue checking
|
||||||
|
// other things in the blocks and see if we hit something that is
|
||||||
|
// definitely blocking. Otherwise, we need to check the lines, or we
|
||||||
|
// could end up stuck inside a wall.
|
||||||
|
AActor *BlockingMobj = thing->BlockingMobj;
|
||||||
|
|
||||||
if (BlockingMobj == NULL || (i_compatflags & COMPATF_NO_PASSMOBJ))
|
if (BlockingMobj == NULL || (i_compatflags & COMPATF_NO_PASSMOBJ))
|
||||||
{ // Thing slammed into something; don't let it move now.
|
{ // Thing slammed into something; don't let it move now.
|
||||||
thing->height = realheight;
|
thing->height = realheight;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!BlockingMobj->player && !(thing->flags & (MF_FLOAT|MF_MISSILE|MF_SKULLFLY)) &&
|
else if (!BlockingMobj->player && !(thing->flags & (MF_FLOAT|MF_MISSILE|MF_SKULLFLY)) &&
|
||||||
BlockingMobj->z+BlockingMobj->height-thing->z <= thing->MaxStepHeight)
|
BlockingMobj->z+BlockingMobj->height-thing->z <= thing->MaxStepHeight)
|
||||||
{
|
{
|
||||||
if (thingblocker == NULL ||
|
if (thingblocker == NULL ||
|
||||||
BlockingMobj->z > thingblocker->z)
|
BlockingMobj->z > thingblocker->z)
|
||||||
{
|
{
|
||||||
thingblocker = BlockingMobj;
|
thingblocker = BlockingMobj;
|
||||||
}
|
}
|
||||||
thing->BlockingMobj = NULL;
|
thing->BlockingMobj = NULL;
|
||||||
}
|
}
|
||||||
else if (thing->player &&
|
else if (thing->player &&
|
||||||
thing->z + thing->height - BlockingMobj->z <= thing->MaxStepHeight)
|
thing->z + thing->height - BlockingMobj->z <= thing->MaxStepHeight)
|
||||||
{
|
{
|
||||||
if (thingblocker)
|
if (thingblocker)
|
||||||
{ // There is something to step up on. Return this thing as
|
{ // There is something to step up on. Return this thing as
|
||||||
// the blocker so that we don't step up.
|
// the blocker so that we don't step up.
|
||||||
|
thing->height = realheight;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Nothing is blocking us, but this actor potentially could
|
||||||
|
// if there is something else to step on.
|
||||||
|
fakedblocker = BlockingMobj;
|
||||||
|
thing->BlockingMobj = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // Definitely blocking
|
||||||
thing->height = realheight;
|
thing->height = realheight;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Nothing is blocking us, but this actor potentially could
|
|
||||||
// if there is something else to step on.
|
|
||||||
fakedblocker = BlockingMobj;
|
|
||||||
thing->BlockingMobj = NULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{ // Definitely blocking
|
|
||||||
thing->height = realheight;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -804,10 +804,10 @@ FBlockThingsIterator::~FBlockThingsIterator()
|
||||||
|
|
||||||
void FBlockThingsIterator::StartBlock(int x, int y)
|
void FBlockThingsIterator::StartBlock(int x, int y)
|
||||||
{
|
{
|
||||||
|
curx = x;
|
||||||
|
cury = y;
|
||||||
if (x >= 0 && y >= 0 && x < bmapwidth && y <bmapheight)
|
if (x >= 0 && y >= 0 && x < bmapwidth && y <bmapheight)
|
||||||
{
|
{
|
||||||
curx = x;
|
|
||||||
cury = y;
|
|
||||||
block = blocklinks[y*bmapwidth + x];
|
block = blocklinks[y*bmapwidth + x];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
// SAVESIG should match SAVEVER.
|
// SAVESIG should match SAVEVER.
|
||||||
|
|
||||||
// MINSAVEVER is the minimum level snapshot version that can be loaded.
|
// MINSAVEVER is the minimum level snapshot version that can be loaded.
|
||||||
#define MINSAVEVER 894
|
#define MINSAVEVER 922
|
||||||
|
|
||||||
#if SVN_REVISION_NUMBER < MINSAVEVER
|
#if SVN_REVISION_NUMBER < MINSAVEVER
|
||||||
// Never write a savegame with a version lower than what we need
|
// Never write a savegame with a version lower than what we need
|
||||||
|
|
Loading…
Reference in a new issue