aboutsummaryrefslogtreecommitdiff
path: root/src/brothers.zig
diff options
context:
space:
mode:
authorJulien Dessaux2022-10-17 22:21:09 +0200
committerJulien Dessaux2022-10-17 22:55:51 +0200
commit873b384bc6a1c6359b5f890e90e37ce3374ec90b (patch)
treee910f86a2774ac349e8a690288890395e7cb9652 /src/brothers.zig
parentAdd an alternative button for jumping (diff)
downloadgrenade-brothers-873b384bc6a1c6359b5f890e90e37ce3374ec90b.tar.gz
grenade-brothers-873b384bc6a1c6359b5f890e90e37ce3374ec90b.tar.bz2
grenade-brothers-873b384bc6a1c6359b5f890e90e37ce3374ec90b.zip
Fixed bug when a round ends while falling, and reset gamepad state between rounds
Diffstat (limited to 'src/brothers.zig')
-rw-r--r--src/brothers.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/brothers.zig b/src/brothers.zig
index f29895e..ddd0903 100644
--- a/src/brothers.zig
+++ b/src/brothers.zig
@@ -50,6 +50,7 @@ pub const Brother = struct {
pub fn resetRound(self: *Brother) void {
self.x = utils.startingX[@enumToInt(self.side)];
self.y = 160;
+ self.vy = 0;
}
pub fn update(self: *Brother, gamepad: inputs.Gamepad) void {
if (gamepad.held.left and self.x > utils.leftLimit[@enumToInt(self.side)])