From 2fd531436f64c745cadb7960a59770d58b14c367 Mon Sep 17 00:00:00 2001 From: kdx Date: Sun, 19 Mar 2023 04:52:04 +0000 Subject: slowdown particles as well --- src/deathpart.c | 10 +++++++--- src/deathpart.h | 2 +- src/player.c | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/deathpart.c b/src/deathpart.c index 1579066..050cc54 100644 --- a/src/deathpart.c +++ b/src/deathpart.c @@ -4,9 +4,13 @@ #include IMPL_UPDATE() { - this->vel[1] *= AIR_RESISTANCE; - this->vel[1] += GRAVITY; - entity_move(this, g); + if (this->deathpart.skip == 0) { + this->vel[1] *= AIR_RESISTANCE; + this->vel[1] += GRAVITY; + entity_move(this, g); + this->deathpart.skip = 3; + } else + this->deathpart.skip -= 1; } IMPL_END IMPL_DRAW() { diff --git a/src/deathpart.h b/src/deathpart.h index dab4dcb..e62b8ef 100644 --- a/src/deathpart.h +++ b/src/deathpart.h @@ -1,7 +1,7 @@ #pragma once typedef struct { - int _; + int skip; } DeathPart; struct Entity; diff --git a/src/player.c b/src/player.c index 3af2dfc..d8c2736 100644 --- a/src/player.c +++ b/src/player.c @@ -57,7 +57,7 @@ IMPL_UPDATE() { dy += 2; } this->type = ET_NONE; - g->queue_restart_scene = 30; + g->queue_restart_scene = 45; } if (entity_place_meeting(this, g, ET_exit) != NULL) -- cgit v1.2.3