summaryrefslogtreecommitdiff
path: root/src/base/tux.c
diff options
context:
space:
mode:
authorDusan Durech <dusan@debian.debian>2009-04-03 15:44:24 +0200
committerDusan Durech <dusan@debian.debian>2009-04-03 15:44:24 +0200
commitea026936031185a44ffe9e6a6ebe385aaed86e9d (patch)
tree636c03110be963d86614bf5c921049041a7f9feb /src/base/tux.c
parent43a0c9e57cfdf03ce9e12dd64ce3825337dfb75b (diff)
-tux begin game with random gun, fix bug with offset lasser on client
Diffstat (limited to 'src/base/tux.c')
-rw-r--r--src/base/tux.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/base/tux.c b/src/base/tux.c
index 5bb2305..a7e330f 100644
--- a/src/base/tux.c
+++ b/src/base/tux.c
@@ -68,6 +68,11 @@ void initTux()
isTuxInit = TRUE;
}
+int getRandomGun()
+{
+ return random() % (GUN_BOMBBALL+1);
+}
+
tux_t *newTux()
{
int x, y;
@@ -86,7 +91,7 @@ tux_t *newTux()
setTuxProportion(new, x, y);
new->position = TUX_DOWN;
- new->gun = GUN_SIMPLE;
+ new->gun = getRandomGun();
new->shot[new->gun] = GUN_MAX_SHOT;
sprintf(new->name, "no_name_id_%d", new->id);