projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
supertux/collision.[ch]pp: Use "contrain_*" rather than "min_*" and "max_*".
[supertux.git]
/
src
/
supertux
/
sector.cpp
diff --git
a/src/supertux/sector.cpp
b/src/supertux/sector.cpp
index
611f36d
..
7e8f470
100644
(file)
--- a/
src/supertux/sector.cpp
+++ b/
src/supertux/sector.cpp
@@
-907,19
+907,19
@@
void check_collisions(collision::Constraints* constraints,
if(fabsf(movement.y) > fabsf(movement.x)) {
if(ileft < SHIFT_DELTA) {
if(fabsf(movement.y) > fabsf(movement.x)) {
if(ileft < SHIFT_DELTA) {
- constraints->
m
in_right(r2.get_left());
+ constraints->
constra
in_right(r2.get_left());
return;
} else if(iright < SHIFT_DELTA) {
return;
} else if(iright < SHIFT_DELTA) {
- constraints->
max
_left(r2.get_right());
+ constraints->
constrain
_left(r2.get_right());
return;
}
} else {
// shiftout bottom/top
if(itop < SHIFT_DELTA) {
return;
}
} else {
// shiftout bottom/top
if(itop < SHIFT_DELTA) {
- constraints->
m
in_bottom(r2.get_top());
+ constraints->
constra
in_bottom(r2.get_top());
return;
} else if(ibottom < SHIFT_DELTA) {
return;
} else if(ibottom < SHIFT_DELTA) {
- constraints->
max
_top(r2.get_bottom());
+ constraints->
constrain
_top(r2.get_bottom());
return;
}
}
return;
}
}
@@
-940,18
+940,18
@@
void check_collisions(collision::Constraints* constraints,
float horiz_penetration = std::min(ileft, iright);
if(vert_penetration < horiz_penetration) {
if(itop < ibottom) {
float horiz_penetration = std::min(ileft, iright);
if(vert_penetration < horiz_penetration) {
if(itop < ibottom) {
- constraints->
m
in_bottom(r2.get_top());
+ constraints->
constra
in_bottom(r2.get_top());
constraints->hit.bottom = true;
} else {
constraints->hit.bottom = true;
} else {
- constraints->
max
_top(r2.get_bottom());
+ constraints->
constrain
_top(r2.get_bottom());
constraints->hit.top = true;
}
} else {
if(ileft < iright) {
constraints->hit.top = true;
}
} else {
if(ileft < iright) {
- constraints->
m
in_right(r2.get_left());
+ constraints->
constra
in_right(r2.get_left());
constraints->hit.right = true;
} else {
constraints->hit.right = true;
} else {
- constraints->
max
_left(r2.get_right());
+ constraints->
constrain
_left(r2.get_right());
constraints->hit.left = true;
}
}
constraints->hit.left = true;
}
}