From f14d276c3a48fa938a27091db75c4f6453494e2c Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Fri, 29 Jul 2016 11:52:20 +1200 Subject: [PATCH] bugfix: when falling on to a trampoline from the side, player would suddenly teleport off the top of the screen. --- .defs.h.swo | Bin 0 -> 16384 bytes rc.c | 12 ++++++++++-- todo | 8 +++----- 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .defs.h.swo diff --git a/.defs.h.swo b/.defs.h.swo new file mode 100644 index 0000000000000000000000000000000000000000..c2ada4a814a136b707fa58304d0cb6432f3fdbfe GIT binary patch literal 16384 zcmeI3Ym6jS6~~K3g<=5_&=17GWtWBBc6MjFXJ-M2M|x&zrfaufbk*$a!=s}*RaaGS zYvKnINotbcR@FJT&OP_sb8p>yXSO!6TQ0DRw@nK8IYSWM+3@Wp=jMIuY8^qaty)jl z?7B|6|MF9@YFo>^ptH50)n_bgd289WwwYF4Gb8VPd0=q7KHf6ial1a=(3{S-cBD{p zn?xXqz=srp(}c-PdV-8^+;BcS>&(Rush-4a5`iQFNd%GzBoRm=kVGJfKoWr@0{@Q@ zaC@Tg6*#ueckW02^@O48G5=@9m)|#}|G?J=?_cB_2<*J?>+ka4duB-gp0B^%*Y|yg zg7@F`_1F7)@kH+?(7)sBZ}as>hV*ay`Y-zWb3PV--!CpK`}#vedS9Gek_aRbNFtC# zAc;T{fg}P+1d<3O5lAACL?DU4M=}ChLl8uG{u1rC@%#T^|NiPH1>ptoJa`oR2HX$s z04~@AmOv4F9$W}EfeXMH;JwoY;a%_wcpm%-JPCddeh9t=ZU@%^4eSCt!4_~9I1_wu znjpLnUH}h)?}4M>8{ihu2UT!2H~_u?Qa}W6o+=1$fY-sx;Bjy(D1bb;5_}G%z_~yK zZ?4BX;BVk};3@EHa4%?s7T61}02hK&!9PzCglEA6;QQbRuz(6K1?Pj4!7B*z)8JR& zD7X=HfdY1bbHK5a1>w)&W$+UCJ$Mk@3vLI8K?^9L07@BsK3I0CK)2S6H}2-blUz}q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JH+{TkZ< literal 0 HcmV?d00001 diff --git a/rc.c b/rc.c index 908a6d0..0e74c99 100644 --- a/rc.c +++ b/rc.c @@ -6880,7 +6880,7 @@ void dotileeffects(sprite_t *s) { tiletype_t *tt; int finished = B_FALSE; int state = 0; - int tilex,tiley; + int tilex,tiley,checkingx = 0, checkingy = 0; if (!s) return; @@ -6959,6 +6959,10 @@ void dotileeffects(sprite_t *s) { tt = gettileat(s->x,s->y+3,&tilex,&tiley); } + // remember the exact x/y location we're checking. + checkingx = s->x; + checkingy = s->y+3; + // CHECKS WHICH COULD APPLY TO TILES UNDER AND SLIGHTLY LEFT/RIGHT OF US while (!finished) { if (tt->id == T_RIGHT) { @@ -7051,7 +7055,7 @@ void dotileeffects(sprite_t *s) { // move player to new trampoline height tt = gettile(T_TRAMPDOWN); - xoff = s->x - (tilex*TILEW); + xoff = checkingx - (tilex*TILEW); s->y = (tiley * TILEH) + tt->lowness[xoff]; } } @@ -7063,10 +7067,14 @@ void dotileeffects(sprite_t *s) { if (state == 0) { /* check tile to our right */ tt = gettileat(s->x + s->img->w/2,s->y+3,&tilex,&tiley); + checkingx = s->x + s->img->w/2; + checkingy = s->y+3; state = 1; } else if (state == 1) { /* check tile to our left */ tt = gettileat(s->x - s->img->w/2,s->y+3,&tilex,&tiley); + checkingx = s->x - s->img->w/2; + checkingy = s->y+3; state = 2; } else { finished = B_TRUE; diff --git a/todo b/todo index 155c508..2886d4a 100644 --- a/todo +++ b/todo @@ -1,10 +1,5 @@ -- move level 86 earlier (dificulty easier than other castle levels before it) - - animate players hanging from umbrellas ? -- sometimes when falling on to a trampoline at an angle, I teleport up to the top of the screen. - - - make points worth chasing for something more than a high schore - bonus level teleport appears on next level once you reach a certain amount of points ? @@ -115,6 +110,8 @@ although the rest of the level is pretty easy. maybe move it slightly later + l 86 - earlier (dificulty easier than other castle levels before it) + - New tiles - destroyable tile - when a net hits it, it explodes into 4 pieces. don't come back. @@ -123,6 +120,7 @@ - only worth doing if i add lots of tese kind of tiles. - same if you SLAM onto it. - Tapestry (castle) + - falling icicle (regrows)