Terraria
v1.4.4.9
Terraria source code documentation
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Events
_
a
c
d
e
f
i
l
m
o
p
r
s
t
u
w
Files
File List
File Members
All
Enumerations
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
Events
Macros
Loading...
Searching...
No Matches
◆
TryAllowingSnappingToPosition()
void
Terraria.Player.TryAllowingSnappingToPosition
(
ref
bool
canSnapToPosition
,
Vector2
pos1
,
Vector2
pos2
)
inline
private
Definition at line
31186
of file
Player.cs
.
31187
{
31188
Vector2
vector
=
new
Vector2
(
width
- 2, 0f);
31189
canSnapToPosition
= Collision.CanHit(
pos1
+
vector
, 2,
height
,
pos2
, 2,
height
);
31190
if
(!
canSnapToPosition
)
31191
{
31192
canSnapToPosition
= Collision.CanHit(
pos1
+
vector
, 2,
height
,
pos2
+
vector
, 2,
height
);
31193
}
31194
if
(!
canSnapToPosition
)
31195
{
31196
canSnapToPosition
= Collision.CanHit(
pos1
, 2,
height
,
pos2
, 2,
height
);
31197
}
31198
if
(!
canSnapToPosition
)
31199
{
31200
canSnapToPosition
= Collision.CanHit(
pos1
, 2,
height
,
pos2
+
vector
, 2,
height
);
31201
}
31202
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
Terraria.Entity.width
int width
Definition
Entity.cs:26
Terraria.Entity.height
int height
Definition
Entity.cs:28
Microsoft.Xna.Framework.Vector2
Definition
Vector2.cs:12
References
Terraria.Collision.CanHit()
.
Terraria
Player
Generated by
1.10.0