summaryrefslogtreecommitdiff
path: root/src/shyguy.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-06-02 23:32:09 +0200
committerTreeki <treeki@gmail.com>2013-06-02 23:32:09 +0200
commite33d76475bc5326d608e74421c8e3a40ae0f4e2e (patch)
tree2798b85a822f5fbe375fc1369b1fd7396647aa5c /src/shyguy.cpp
parent330d88af1b6d8415bb6bfc27a3882686f2d9555f (diff)
parentf4526064654ad2ed884e63eb633babda523d73cd (diff)
downloadkamek-e33d76475bc5326d608e74421c8e3a40ae0f4e2e.tar.gz
kamek-e33d76475bc5326d608e74421c8e3a40ae0f4e2e.zip
FUCKING CRAP MERGES
Diffstat (limited to '')
-rw-r--r--src/shyguy.cpp40
1 files changed, 25 insertions, 15 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index 32928c0..140501a 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -657,7 +657,7 @@ int daShyGuy::onCreate() {
_324 = 16.0f;
// These structs tell stupid collider what to collide with - these are from koopa troopa
- static const lineSensor_s below(-6<<12, 6<<12, 0<<12);
+ static const lineSensor_s below(-5<<12, 5<<12, 0<<12);
static const pointSensor_s above(0<<12, 12<<12);
static const lineSensor_s adjacent(6<<12, 9<<12, 6<<12);
@@ -1227,17 +1227,36 @@ bool daShyGuy::willWalkOntoSuitableGround() {
void daShyGuy::executeState_RealWalk() {
chrAnimation.setUpdateRate(1.5f);
+ // if (distance) {
+ // // What the fuck. Somehow, having this code makes the shyguy not
+ // // fall through solid-on-top platforms...
+ // bool turn = collMgr.isOnTopOfTile();
+ // if (!turn) {
+ // if (!stillFalling) {
+ // stillFalling = true;
+ // pos.x = direction ? pos.x + 1.5 : pos.x - 1.5;
+ // doStateChange(&StateID_RealTurn);
+ // }
+ // } else
+ // }
+
+
if (distance) {
- // What the fuck. Somehow, having this code makes the shyguy not
- // fall through solid-on-top platforms...
- bool turn = collMgr.isOnTopOfTile();
- if (!turn) {
+ if (collMgr.isOnTopOfTile()) {
+ stillFalling = false;
+
+ if (!willWalkOntoSuitableGround()) {
+ pos.x = direction ? pos.x + 1.5 : pos.x - 1.5;
+ doStateChange(&StateID_RealTurn);
+ }
+ }
+ else {
if (!stillFalling) {
stillFalling = true;
pos.x = direction ? pos.x + 1.5 : pos.x - 1.5;
doStateChange(&StateID_RealTurn);
}
- } else stillFalling = false;
+ }
}
bool ret = calculateTileCollisions();
@@ -1245,15 +1264,6 @@ bool daShyGuy::willWalkOntoSuitableGround() {
doStateChange(&StateID_RealTurn);
}
- if (distance) {
- if (collMgr.isOnTopOfTile()) {
- if (!willWalkOntoSuitableGround()) {
- pos.x = direction ? pos.x + 1.5 : pos.x - 1.5;
- doStateChange(&StateID_RealTurn);
- }
- }
- }
-
if(this->chrAnimation.isAnimationDone()) {
this->chrAnimation.setCurrentFrame(0.0);
}