projects
/
hackover2013-badge-firmware.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81be30f
)
Bessere Tötungsabfrage bei Sprung auf Gegner.
author
Wintermute
<wintermute@hannover.ccc.de>
Thu, 17 Oct 2013 19:04:17 +0000
(21:04 +0200)
committer
Wintermute
<wintermute@hannover.ccc.de>
Thu, 17 Oct 2013 19:04:17 +0000
(21:04 +0200)
badge/jumpnrun/enemies.c
patch
|
blob
|
history
diff --git
a/badge/jumpnrun/enemies.c
b/badge/jumpnrun/enemies.c
index
f5560dc
..
3e2c4db
100644
(file)
--- a/
badge/jumpnrun/enemies.c
+++ b/
badge/jumpnrun/enemies.c
@@
-164,7
+164,9
@@
void enemy_collision_player_jumpable(jumpnrun_enemy *self,
rectangle rect_self = enemy_hitbox(self);
if(rectangle_intersect(&rect_self, &state->player.current_box)) {
- if(fixed_point_gt(state->player.inertia.y, FIXED_POINT(0, 0))) {
+ if(fixed_point_lt(rectangle_top(&state->player.current_box), rectangle_top(&rect_self)) &&
+ fixed_point_gt(state->player.inertia.y, FIXED_POINT(0, 0)))
+ {
self->flags &= ~JUMPNRUN_ENEMY_SPAWNED;
player_inertia_mod->y = FIXED_POINT(0, -250);
state->player.jumpable_frames = 12;
This page took
0.023993 seconds
and
4
git commands to generate.