Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
UltimateZoneBuilder
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
UltimateZoneBuilder
Commits
399e527b
Commit
399e527b
authored
5 years ago
by
Xabis
Committed by
jewalky
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Support for RenderRadius (PR#297 by Xabis)
parent
a8ef8d52
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Source/Core/Config/ThingTypeInfo.cs
+6
-0
6 additions, 0 deletions
Source/Core/Config/ThingTypeInfo.cs
Source/Core/Map/Thing.cs
+4
-0
4 additions, 0 deletions
Source/Core/Map/Thing.cs
Source/Core/VisualModes/VisualBlockMap.cs
+2
-2
2 additions, 2 deletions
Source/Core/VisualModes/VisualBlockMap.cs
with
12 additions
and
2 deletions
Source/Core/Config/ThingTypeInfo.cs
+
6
−
0
View file @
399e527b
...
...
@@ -71,6 +71,7 @@ namespace CodeImp.DoomBuilder.Config
private
bool
bright
;
//mxd
private
bool
arrow
;
private
float
radius
;
private
float
renderradius
;
private
float
height
;
private
int
distancechecksq
;
//mxd. Contains squared value or int.MaxValue when not set
private
bool
hangs
;
...
...
@@ -120,6 +121,7 @@ namespace CodeImp.DoomBuilder.Config
public
bool
Bright
{
get
{
return
bright
;
}
}
//mxd
public
bool
Arrow
{
get
{
return
arrow
;
}
}
public
float
Radius
{
get
{
return
radius
;
}
}
public
float
RenderRadius
{
get
{
return
renderradius
;
}
}
public
float
Height
{
get
{
return
height
;
}
}
public
int
DistanceCheckSq
{
get
{
return
distancechecksq
;
}
}
//mxd
public
bool
Hangs
{
get
{
return
hangs
;
}
}
...
...
@@ -177,6 +179,7 @@ namespace CodeImp.DoomBuilder.Config
this
.
bright
=
false
;
//mxd
this
.
arrow
=
true
;
this
.
radius
=
10f
;
this
.
renderradius
=
10f
;
this
.
height
=
20f
;
this
.
distancechecksq
=
int
.
MaxValue
;
//mxd
this
.
hangs
=
false
;
...
...
@@ -552,6 +555,9 @@ namespace CodeImp.DoomBuilder.Config
// Size
if
(
actor
.
HasPropertyWithValue
(
"radius"
))
radius
=
actor
.
GetPropertyValueInt
(
"radius"
,
0
);
if
(
actor
.
HasPropertyWithValue
(
"height"
))
height
=
actor
.
GetPropertyValueInt
(
"height"
,
0
);
if
(
actor
.
HasPropertyWithValue
(
"renderradius"
))
renderradius
=
actor
.
GetPropertyValueInt
(
"renderradius"
,
0
);
if
(
renderradius
==
0
)
renderradius
=
radius
;
//mxd. DistanceCheck. The value is CVAR. Also we'll need squared value
if
(
actor
.
HasPropertyWithValue
(
"distancecheck"
))
...
...
This diff is collapsed.
Click to expand it.
Source/Core/Map/Thing.cs
+
4
−
0
View file @
399e527b
...
...
@@ -80,6 +80,7 @@ namespace CodeImp.DoomBuilder.Map
// Configuration
private
float
size
;
private
float
rendersize
;
private
float
height
;
//mxd
private
PixelColor
color
;
private
bool
fixedsize
;
...
...
@@ -106,6 +107,7 @@ namespace CodeImp.DoomBuilder.Map
public
int
Action
{
get
{
return
action
;
}
set
{
BeforePropsChange
();
action
=
value
;
}
}
public
int
[]
Args
{
get
{
return
args
;
}
}
public
float
Size
{
get
{
return
size
;
}
}
public
float
RenderSize
{
get
{
return
rendersize
;
}
}
public
float
Height
{
get
{
return
height
;
}
}
//mxd
public
PixelColor
Color
{
get
{
return
color
;
}
}
public
bool
FixedSize
{
get
{
return
fixedsize
;
}
}
...
...
@@ -242,6 +244,7 @@ namespace CodeImp.DoomBuilder.Map
t
.
action
=
action
;
t
.
args
=
(
int
[])
args
.
Clone
();
t
.
size
=
size
;
t
.
rendersize
=
rendersize
;
t
.
height
=
height
;
//mxd
t
.
color
=
color
;
t
.
directional
=
directional
;
...
...
@@ -532,6 +535,7 @@ namespace CodeImp.DoomBuilder.Map
dynamiclighttype
=
ti
.
DynamicLightType
;
//General.ErrorLogger.Add(ErrorType.Warning, string.Format("thing dynamiclighttype is {0}; class is {1}", dynamiclighttype, ti.Actor.ClassName));
size
=
ti
.
Radius
;
rendersize
=
ti
.
RenderRadius
;
height
=
ti
.
Height
;
//mxd
fixedsize
=
ti
.
FixedSize
;
spritescale
=
ti
.
SpriteScale
;
//mxd
...
...
This diff is collapsed.
Click to expand it.
Source/Core/VisualModes/VisualBlockMap.cs
+
2
−
2
View file @
399e527b
...
...
@@ -266,8 +266,8 @@ namespace CodeImp.DoomBuilder.VisualModes
public
void
AddThing
(
Thing
t
)
{
//mxd
Point
p1
=
GetBlockCoordinates
(
new
Vector2D
(
t
.
Position
.
x
-
t
.
Size
,
t
.
Position
.
y
-
t
.
Size
));
Point
p2
=
GetBlockCoordinates
(
new
Vector2D
(
t
.
Position
.
x
+
t
.
Size
,
t
.
Position
.
y
+
t
.
Size
));
Point
p1
=
GetBlockCoordinates
(
new
Vector2D
(
t
.
Position
.
x
-
t
.
Render
Size
,
t
.
Position
.
y
-
t
.
Render
Size
));
Point
p2
=
GetBlockCoordinates
(
new
Vector2D
(
t
.
Position
.
x
+
t
.
Render
Size
,
t
.
Position
.
y
+
t
.
Render
Size
));
for
(
int
x
=
p1
.
X
;
x
<=
p2
.
X
;
x
++)
{
for
(
int
y
=
p1
.
Y
;
y
<=
p2
.
Y
;
y
++)
...
...
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