mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-03 09:32:45 +00:00
- WH: fixed level warping.
This commit is contained in:
parent
c31b0486a0
commit
ce87653ab3
3 changed files with 13 additions and 3 deletions
|
@ -88,12 +88,14 @@ void Job_Init()
|
|||
VMFunction* LookupFunction(const char* qname, bool validate)
|
||||
{
|
||||
size_t p = strcspn(qname, ".");
|
||||
if (p == 0) I_Error("Call to undefined function %s", qname);
|
||||
if (p == 0)
|
||||
I_Error("Call to undefined function %s", qname);
|
||||
FString clsname(qname, p);
|
||||
FString funcname = qname + p + 1;
|
||||
|
||||
auto func = PClass::FindFunction(clsname, funcname);
|
||||
if (func == nullptr) I_Error("Call to undefined function %s", qname);
|
||||
if (func == nullptr)
|
||||
I_Error("Call to undefined function %s", qname);
|
||||
if (validate)
|
||||
{
|
||||
// these conditions must be met by all functions for this interface.
|
||||
|
|
|
@ -863,7 +863,14 @@ void FMapInfoParser::ParseMapDefinition(MapRecord &info)
|
|||
|
||||
static int GetDefaultLevelNum(const char *mapname)
|
||||
{
|
||||
if ((!strnicmp (mapname, "MAP", 3) || !strnicmp(mapname, "LEV", 3)) && strlen(mapname) <= 5)
|
||||
if ((!strnicmp(mapname, "LEVEL", 5)) && strlen(mapname) <= 7)
|
||||
{
|
||||
int mapnum = atoi(mapname + 5);
|
||||
|
||||
if (mapnum >= 1 && mapnum <= 99)
|
||||
return mapnum;
|
||||
}
|
||||
else if ((!strnicmp (mapname, "MAP", 3) || !strnicmp(mapname, "LEV", 3)) && strlen(mapname) <= 5)
|
||||
{
|
||||
int mapnum = atoi (mapname + 3);
|
||||
|
||||
|
|
|
@ -91,6 +91,7 @@ static void CallCreateMapFunction(const char* qname, DObject* runner, MapRecord*
|
|||
|
||||
void CallCreateSummaryFunction(const char* qname, DObject* runner, MapRecord* map, SummaryInfo* info, MapRecord* map2)
|
||||
{
|
||||
if (qname == nullptr || *qname == 0) return; // no level summary defined.
|
||||
auto func = LookupFunction(qname);
|
||||
auto s = func->Proto->ArgumentTypes.Size();
|
||||
auto at = func->Proto->ArgumentTypes.Data();
|
||||
|
|
Loading…
Reference in a new issue