Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
ddb1a194
Commit
ddb1a194
authored
Jan 6, 2020
by
MascaraSnake
Browse files
Options
Downloads
Patches
Plain Diff
Adapt setup of vertex-based slopes to UDMF
parent
f13abd54
No related branches found
No related tags found
2 merge requests
!1075
Merge udmf-next into next
,
!643
Add UDMF linedef arguments and make slope specials use them
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/p_setup.c
+42
-0
42 additions, 0 deletions
src/p_setup.c
src/p_slopes.c
+9
-24
9 additions, 24 deletions
src/p_slopes.c
with
51 additions
and
24 deletions
src/p_setup.c
+
42
−
0
View file @
ddb1a194
...
@@ -2678,6 +2678,48 @@ static void P_ConvertBinaryMap(void)
...
@@ -2678,6 +2678,48 @@ static void P_ConvertBinaryMap(void)
lines
[
i
].
special
=
700
;
lines
[
i
].
special
=
700
;
break
;
break
;
}
}
case
704
:
//Slope front sector floor by 3 tagged vertices
case
705
:
//Slope front sector ceiling by 3 tagged vertices
case
714
:
//Slope back sector floor by 3 tagged vertices
case
715
:
//Slope back sector ceiling by 3 tagged vertices
{
if
(
lines
[
i
].
special
==
704
)
lines
[
i
].
args
[
0
]
=
0
;
else
if
(
lines
[
i
].
special
==
705
)
lines
[
i
].
args
[
0
]
=
1
;
else
if
(
lines
[
i
].
special
==
714
)
lines
[
i
].
args
[
0
]
=
2
;
else
if
(
lines
[
i
].
special
==
715
)
lines
[
i
].
args
[
0
]
=
3
;
lines
[
i
].
args
[
1
]
=
lines
[
i
].
tag
;
if
(
lines
[
i
].
flags
&
ML_EFFECT6
)
{
UINT8
side
=
lines
[
i
].
special
>=
714
;
if
(
side
==
1
&&
lines
[
i
].
sidenum
[
1
]
==
0xffff
)
CONS_Debug
(
DBG_GAMELOGIC
,
"P_ConvertBinaryMap: Line special %d (line #%s) missing 2nd side!
\n
"
,
lines
[
i
].
special
,
sizeu1
(
i
));
else
{
lines
[
i
].
args
[
2
]
=
sides
[
lines
[
i
].
sidenum
[
side
]].
textureoffset
>>
FRACBITS
;
lines
[
i
].
args
[
3
]
=
sides
[
lines
[
i
].
sidenum
[
side
]].
rowoffset
>>
FRACBITS
;
}
}
else
{
lines
[
i
].
args
[
2
]
=
lines
[
i
].
args
[
1
];
lines
[
i
].
args
[
3
]
=
lines
[
i
].
args
[
1
];
}
if
(
lines
[
i
].
flags
&
ML_NETONLY
)
lines
[
i
].
args
[
4
]
|=
SL_NOPHYSICS
;
if
(
lines
[
i
].
flags
&
ML_NONET
)
lines
[
i
].
args
[
4
]
|=
SL_DYNAMIC
;
lines
[
i
].
special
=
704
;
break
;
}
default:
default:
break
;
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/p_slopes.c
+
9
−
24
View file @
ddb1a194
...
@@ -458,44 +458,32 @@ static void line_SpawnViaVertexes(const int linenum, const boolean spawnthinker)
...
@@ -458,44 +458,32 @@ static void line_SpawnViaVertexes(const int linenum, const boolean spawnthinker)
line_t
*
line
=
lines
+
linenum
;
line_t
*
line
=
lines
+
linenum
;
side_t
*
side
;
side_t
*
side
;
pslope_t
**
slopetoset
;
pslope_t
**
slopetoset
;
UINT16
tag1
,
tag2
,
tag3
;
UINT16
tag1
=
line
->
args
[
1
];
UINT16
tag2
=
line
->
args
[
2
];
UINT16
tag3
=
line
->
args
[
3
];
UINT8
flags
=
line
->
args
[
4
];
UINT8
flags
=
0
;
switch
(
line
->
args
[
0
])
if
(
line
->
flags
&
ML_NETONLY
)
flags
|=
SL_NOPHYSICS
;
if
(
line
->
flags
&
ML_NONET
)
flags
|=
SL_DYNAMIC
;
switch
(
line
->
special
)
{
{
case
704
:
case
0
:
slopetoset
=
&
line
->
frontsector
->
f_slope
;
slopetoset
=
&
line
->
frontsector
->
f_slope
;
side
=
&
sides
[
line
->
sidenum
[
0
]];
side
=
&
sides
[
line
->
sidenum
[
0
]];
break
;
break
;
case
705
:
case
1
:
slopetoset
=
&
line
->
frontsector
->
c_slope
;
slopetoset
=
&
line
->
frontsector
->
c_slope
;
side
=
&
sides
[
line
->
sidenum
[
0
]];
side
=
&
sides
[
line
->
sidenum
[
0
]];
break
;
break
;
case
714
:
case
2
:
slopetoset
=
&
line
->
backsector
->
f_slope
;
slopetoset
=
&
line
->
backsector
->
f_slope
;
side
=
&
sides
[
line
->
sidenum
[
1
]];
side
=
&
sides
[
line
->
sidenum
[
1
]];
break
;
break
;
case
715
:
case
3
:
slopetoset
=
&
line
->
backsector
->
c_slope
;
slopetoset
=
&
line
->
backsector
->
c_slope
;
side
=
&
sides
[
line
->
sidenum
[
1
]];
side
=
&
sides
[
line
->
sidenum
[
1
]];
default:
default:
return
;
return
;
}
}
if
(
line
->
flags
&
ML_EFFECT6
)
{
tag1
=
line
->
tag
;
tag2
=
side
->
textureoffset
>>
FRACBITS
;
tag3
=
side
->
rowoffset
>>
FRACBITS
;
}
else
tag1
=
tag2
=
tag3
=
line
->
tag
;
*
slopetoset
=
MakeViaMapthings
(
tag1
,
tag2
,
tag3
,
flags
,
spawnthinker
);
*
slopetoset
=
MakeViaMapthings
(
tag1
,
tag2
,
tag3
,
flags
,
spawnthinker
);
side
->
sector
->
hasslope
=
true
;
side
->
sector
->
hasslope
=
true
;
...
@@ -561,9 +549,6 @@ void P_ResetDynamicSlopes(const boolean fromsave) {
...
@@ -561,9 +549,6 @@ void P_ResetDynamicSlopes(const boolean fromsave) {
break
;
break
;
case
704
:
case
704
:
case
705
:
case
714
:
case
715
:
line_SpawnViaVertexes
(
i
,
!
fromsave
);
line_SpawnViaVertexes
(
i
,
!
fromsave
);
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment