mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
- Line_QuickPortal must check the partner line's special.
This commit is contained in:
parent
0c0ef4f938
commit
fa2228d523
3 changed files with 4 additions and 4 deletions
|
@ -151,7 +151,7 @@ struct FLevelLocals
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool ShouldDoIntermission(cluster_info_t* nextcluster, cluster_info_t* thiscluster);
|
bool ShouldDoIntermission(cluster_info_t* nextcluster, cluster_info_t* thiscluster);
|
||||||
line_t *FindPortalDestination(line_t *src, int tag);
|
line_t *FindPortalDestination(line_t *src, int tag, int matchtype = -1);
|
||||||
void BuildPortalBlockmap();
|
void BuildPortalBlockmap();
|
||||||
void UpdatePortal(FLinePortal *port);
|
void UpdatePortal(FLinePortal *port);
|
||||||
void CollectLinkedPortals();
|
void CollectLinkedPortals();
|
||||||
|
|
|
@ -124,7 +124,7 @@ void MapLoader::SpawnLinePortal(line_t* line)
|
||||||
{
|
{
|
||||||
int type = (line->special != Line_QuickPortal) ? line->args[2] : line->args[0] == 0 ? PORTT_LINKED : PORTT_VISUAL;
|
int type = (line->special != Line_QuickPortal) ? line->args[2] : line->args[0] == 0 ? PORTT_LINKED : PORTT_VISUAL;
|
||||||
int tag = (line->special == Line_QuickPortal) ? Level->tagManager.GetFirstLineID(line) : line->args[0];
|
int tag = (line->special == Line_QuickPortal) ? Level->tagManager.GetFirstLineID(line) : line->args[0];
|
||||||
dst = Level->FindPortalDestination(line, tag);
|
dst = Level->FindPortalDestination(line, tag, line->special == Line_QuickPortal? Line_QuickPortal : -1);
|
||||||
|
|
||||||
line->portalindex = Level->linePortals.Reserve(1);
|
line->portalindex = Level->linePortals.Reserve(1);
|
||||||
FLinePortal *port = &Level->linePortals.Last();
|
FLinePortal *port = &Level->linePortals.Last();
|
||||||
|
|
|
@ -175,7 +175,7 @@ void FLinePortalTraverse::AddLineIntercepts(int bx, int by)
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
line_t *FLevelLocals::FindPortalDestination(line_t *src, int tag)
|
line_t *FLevelLocals::FindPortalDestination(line_t *src, int tag, int matchtype)
|
||||||
{
|
{
|
||||||
if (tag)
|
if (tag)
|
||||||
{
|
{
|
||||||
|
@ -184,7 +184,7 @@ line_t *FLevelLocals::FindPortalDestination(line_t *src, int tag)
|
||||||
|
|
||||||
while ((lineno = it.Next()) >= 0)
|
while ((lineno = it.Next()) >= 0)
|
||||||
{
|
{
|
||||||
if (&lines[lineno] != src)
|
if (&lines[lineno] != src && (matchtype == -1 || matchtype == lines[lineno].special))
|
||||||
{
|
{
|
||||||
return &lines[lineno];
|
return &lines[lineno];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue