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
Package registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Skydusk
SRB2
Commits
341139ea
Commit
341139ea
authored
May 23, 2024
by
Lactozilla
Browse files
Options
Downloads
Patches
Plain Diff
Scale the vertical offsets
parent
6e4eb629
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/p_maputl.c
+12
-9
12 additions, 9 deletions
src/p_maputl.c
with
12 additions
and
9 deletions
src/p_maputl.c
+
12
−
9
View file @
341139ea
...
@@ -500,8 +500,11 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
...
@@ -500,8 +500,11 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
INT32
texnum
=
R_GetTextureNum
(
side
->
midtexture
);
// make sure the texture is actually valid
INT32
texnum
=
R_GetTextureNum
(
side
->
midtexture
);
// make sure the texture is actually valid
if
(
texnum
)
{
if
(
texnum
)
{
fixed_t
scaley
=
abs
(
side
->
scaley_mid
);
fixed_t
offsetvalue
=
FixedDiv
(
side
->
rowoffset
+
side
->
offsety_mid
,
scaley
);
// Get the midtexture's height
// Get the midtexture's height
texheight
=
FixedDiv
(
textureheight
[
texnum
],
abs
(
side
->
scaley
_mid
)
);
texheight
=
FixedDiv
(
textureheight
[
texnum
],
scaley
);
// Set texbottom and textop to the Z coordinates of the texture's boundaries
// Set texbottom and textop to the Z coordinates of the texture's boundaries
#if 0
#if 0
...
@@ -509,26 +512,26 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
...
@@ -509,26 +512,26 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
// on non-solid polyobjects should NEVER happen in the future
// on non-solid polyobjects should NEVER happen in the future
if (linedef->polyobj && (linedef->polyobj->flags & POF_TESTHEIGHT)) {
if (linedef->polyobj && (linedef->polyobj->flags & POF_TESTHEIGHT)) {
if (linedef->flags & ML_WRAPMIDTEX && !side->repeatcnt) { // "infinite" repeat
if (linedef->flags & ML_WRAPMIDTEX && !side->repeatcnt) { // "infinite" repeat
texbottom = back->floorheight +
side->rowoffset + side->offsety_mid
;
texbottom = back->floorheight +
offsetvalue
;
textop = back->ceilingheight +
side->rowoffset + side->offsety_mid
;
textop = back->ceilingheight +
offsetvalue
;
} else if (linedef->flags & ML_MIDTEX) {
} else if (linedef->flags & ML_MIDTEX) {
texbottom = back->floorheight +
side->rowoffset + side->offsety_mid
;
texbottom = back->floorheight +
offsetvalue
;
textop = texbottom + texheight*(side->repeatcnt+1);
textop = texbottom + texheight*(side->repeatcnt+1);
} else {
} else {
textop = back->ceilingheight +
side->rowoffset + side->offsety_mid
;
textop = back->ceilingheight +
offsetvalue
;
texbottom = textop - texheight*(side->repeatcnt+1);
texbottom = textop - texheight*(side->repeatcnt+1);
}
}
} else
} else
#endif
#endif
{
{
if
(
linedef
->
flags
&
ML_WRAPMIDTEX
&&
!
side
->
repeatcnt
)
{
// "infinite" repeat
if
(
linedef
->
flags
&
ML_WRAPMIDTEX
&&
!
side
->
repeatcnt
)
{
// "infinite" repeat
texbottom
=
openbottom
+
side
->
rowoffset
+
side
->
offsety_mid
;
texbottom
=
openbottom
+
offsetvalue
;
textop
=
opentop
+
side
->
rowoffset
+
side
->
offsety_mid
;
textop
=
opentop
+
offsetvalue
;
}
else
if
(
linedef
->
flags
&
ML_MIDPEG
)
{
}
else
if
(
linedef
->
flags
&
ML_MIDPEG
)
{
texbottom
=
openbottom
+
side
->
rowoffset
+
side
->
offsety_mid
;
texbottom
=
openbottom
+
offsetvalue
;
textop
=
texbottom
+
texheight
*
(
side
->
repeatcnt
+
1
);
textop
=
texbottom
+
texheight
*
(
side
->
repeatcnt
+
1
);
}
else
{
}
else
{
textop
=
opentop
+
side
->
rowoffset
+
side
->
offsety_mid
;
textop
=
opentop
+
offsetvalue
;
texbottom
=
textop
-
texheight
*
(
side
->
repeatcnt
+
1
);
texbottom
=
textop
-
texheight
*
(
side
->
repeatcnt
+
1
);
}
}
}
}
...
...
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