summaryrefslogtreecommitdiff
path: root/src/gun.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-21 14:03:35 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-21 14:03:35 +0000
commit114131bf71d7d4ec48c92a7bde8183442995940f (patch)
tree84a3e5ba788d3a6bf76f5067b861fbce8b2f239b /src/gun.c
parent1e1d106a545a9cadc517de1a0ad931f1a8fcc2fa (diff)
- vypisovanie sprav do hry
- oprava chyby odhlaelenj pomocou valgrindu - zena rychlosti zbrani - drobne upravy git-svn-id: http://opensvn.csie.org/tuxanci_ng@31 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/gun.c')
-rw-r--r--src/gun.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/gun.c b/src/gun.c
index 61ece2b..0768b67 100644
--- a/src/gun.c
+++ b/src/gun.c
@@ -16,6 +16,7 @@
#include "sound.h"
#include "screen_world.h"
#include "interface.h"
+#include "term.h"
#endif
#ifdef BUBLIC_SERVER
@@ -124,13 +125,13 @@ static void addShot(tux_t *tux,int x, int y, int px, int py)
static void shotInGunSimpe(tux_t *tux)
{
- addShot(tux, 0, 0, +20, 0);
+ addShot(tux, 0, 0, +5, 0);
}
static void shotInGunDualSimpe(tux_t *tux)
{
- addShot(tux, 0, -5, +20, 0);
- addShot(tux, 0, +5, +20, 0);
+ addShot(tux, 0, -10, +6, 0);
+ addShot(tux, 0, +10, +6, 0);
}
static void shotInGunScatter(tux_t *tux)
@@ -139,7 +140,7 @@ static void shotInGunScatter(tux_t *tux)
for( i = -2 ; i <= +2 ; i++ )
{
- addShot(tux, 0, 0, +25, i);
+ addShot(tux, 0, 0, +8, i);
}
}
@@ -158,7 +159,7 @@ static void timer_addShotTimer(void *p)
gun = tux->gun;
tux->gun = GUN_SIMPLE;
- addShot(tux, 0, 0, +25, 0);
+ addShot(tux, 0, 0, +6, 0);
tux->gun = gun;
}
@@ -188,7 +189,7 @@ static void timer_addLaserTimer(void *p)
gun = tux->gun;
tux->gun = GUN_LASSER;
- addShot(tux, 0, 0, +25, 0);
+ addShot(tux, 0, 0, +10, 0);
tux->gun = gun;
}
@@ -230,6 +231,13 @@ static void putInGunMine(tux_t *tux)
if( isFreeSpace(x, y, ITEM_MINE_WIDTH, ITEM_MINE_HEIGHT) )
{
+#ifndef BUBLIC_SERVER
+ char msg[STR_SIZE];
+ playSound("put_mine", SOUND_GROUP_BASE);
+ sprintf(msg, "tux with id %d pu mine\n", tux->id);
+ appendTextInTerm(msg);
+#endif
+
addList(arena->listItem, newItem(x, y, ITEM_MINE, tux) );
tux->shot[tux->gun]--;
}
@@ -275,9 +283,6 @@ void shotInGun(tux_t *tux)
shotInGunLasser(tux);
break;
case GUN_MINE :
-#ifndef BUBLIC_SERVER
- playSound("put_mine", SOUND_GROUP_BASE);
-#endif
putInGunMine(tux);
break;
}