mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 15:44:24 +00:00
Merge branch 'master' into scripting
Conflicts: src/thingdef/thingdef_codeptr.cpp
This commit is contained in:
commit
8c5cc45dbe
4 changed files with 23 additions and 10 deletions
|
@ -312,8 +312,13 @@ FString level_info_t::LookupLevelName()
|
||||||
{
|
{
|
||||||
mysnprintf (checkstring, countof(checkstring), "%d: ", atoi(&MapName[5]));
|
mysnprintf (checkstring, countof(checkstring), "%d: ", atoi(&MapName[5]));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// make sure nothing is stripped.
|
||||||
|
checkstring[0] = '\0';
|
||||||
|
}
|
||||||
thename = strstr (lookedup, checkstring);
|
thename = strstr (lookedup, checkstring);
|
||||||
if (thename == NULL)
|
if (thename == NULL || thename == lookedup)
|
||||||
{
|
{
|
||||||
thename = lookedup;
|
thename = lookedup;
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,13 +309,24 @@ int FSectorTagIterator::Next()
|
||||||
ret = start;
|
ret = start;
|
||||||
start = -1;
|
start = -1;
|
||||||
}
|
}
|
||||||
else
|
else if (searchtag != 0)
|
||||||
{
|
{
|
||||||
while (start >= 0 && tagManager.allTags[start].tag != searchtag) start = tagManager.allTags[start].nexttag;
|
while (start >= 0 && tagManager.allTags[start].tag != searchtag) start = tagManager.allTags[start].nexttag;
|
||||||
if (start == -1) return -1;
|
if (start == -1) return -1;
|
||||||
ret = tagManager.allTags[start].target;
|
ret = tagManager.allTags[start].target;
|
||||||
start = tagManager.allTags[start].nexttag;
|
start = tagManager.allTags[start].nexttag;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// with the tag manager, searching for tag 0 has to be different, because it won't create entries for untagged sectors.
|
||||||
|
while (start < numsectors && tagManager.SectorHasTags(start))
|
||||||
|
{
|
||||||
|
start++;
|
||||||
|
}
|
||||||
|
if (start == numsectors) return -1;
|
||||||
|
ret = start;
|
||||||
|
start++;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public:
|
||||||
FSectorTagIterator(int tag)
|
FSectorTagIterator(int tag)
|
||||||
{
|
{
|
||||||
searchtag = tag;
|
searchtag = tag;
|
||||||
start = tagManager.TagHashFirst[((unsigned int)tag) % FTagManager::TAG_HASH_SIZE];
|
start = tag == 0 ? 0 : tagManager.TagHashFirst[((unsigned int)tag) % FTagManager::TAG_HASH_SIZE];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special constructor for actions that treat tag 0 as 'back of activation line'
|
// Special constructor for actions that treat tag 0 as 'back of activation line'
|
||||||
|
|
|
@ -6238,8 +6238,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfHigherOrLower)
|
||||||
//
|
//
|
||||||
// A_SetRipperLevel(int level)
|
// A_SetRipperLevel(int level)
|
||||||
//
|
//
|
||||||
// Sets the ripper level/requirement of the calling actor.
|
// Sets the ripper level of the calling actor.
|
||||||
// Also sets the minimum and maximum levels to rip through.
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipperLevel)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipperLevel)
|
||||||
{
|
{
|
||||||
|
@ -6253,8 +6252,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipperLevel)
|
||||||
//
|
//
|
||||||
// A_SetRipMin(int min)
|
// A_SetRipMin(int min)
|
||||||
//
|
//
|
||||||
// Sets the ripper level/requirement of the calling actor.
|
// Sets the minimum level a ripper must be in order to rip through this actor.
|
||||||
// Also sets the minimum and maximum levels to rip through.
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipMin)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipMin)
|
||||||
{
|
{
|
||||||
|
@ -6266,10 +6264,9 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipMin)
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//
|
//
|
||||||
// A_SetRipMin(int min)
|
// A_SetRipMax(int max)
|
||||||
//
|
//
|
||||||
// Sets the ripper level/requirement of the calling actor.
|
// Sets the minimum level a ripper must be in order to rip through this actor.
|
||||||
// Also sets the minimum and maximum levels to rip through.
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipMax)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipMax)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue