From a8bec57e7a9be7b1fa36ef8be618db4e46cbd599 Mon Sep 17 00:00:00 2001 From: oroborus Date: Tue, 15 Apr 2008 19:28:48 +0000 Subject: - oprava chyby #0007 #0006 #0005 - nova zbran bombball - client dostava svoju vlastnu poziciu od servera kazdych 5000 ms git-svn-id: http://opensvn.csie.org/tuxanci_ng@45 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/gun.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/gun.c') diff --git a/src/gun.c b/src/gun.c index b46b995..a055440 100644 --- a/src/gun.c +++ b/src/gun.c @@ -96,7 +96,11 @@ static void addShot(tux_t *tux,int x, int y, int px, int py) return; } - if( tux->gun == GUN_LASSER ) + if( tux->gun == GUN_BOMBBALL ) + { + gun = GUN_BOMBBALL; + } + else if( tux->gun == GUN_LASSER ) { gun = GUN_LASSER; } @@ -269,6 +273,11 @@ static void putInGunMine(tux_t *tux) } } +static void shotInGunBombball(tux_t *tux) +{ + addShot(tux, 0, 0, +10, 0); +} + void shotInGun(tux_t *tux) { if( tux->bonus != BONUS_SHOT && tux->gun != GUN_MINE ) @@ -308,6 +317,9 @@ void shotInGun(tux_t *tux) #endif shotInGunLasser(tux); break; + case GUN_BOMBBALL : + shotInGunBombball(tux); + break; case GUN_MINE : putInGunMine(tux); break; -- cgit v1.2.3