summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h2
-rw-r--r--data/arena/ba_in_a_captivity_of_8-bit.map2
-rw-r--r--data/image/bal3.nic.pngbin0 -> 12584 bytes
-rw-r--r--src/base/shot.c1
-rw-r--r--src/base/shot.h1
-rw-r--r--src/client/screen.c13
-rwxr-xr-xsrc/modules/modPipe.c8
-rwxr-xr-xsrc/modules/modWall.c8
8 files changed, 24 insertions, 11 deletions
diff --git a/config.h b/config.h
index 4e2834b..e2e8e18 100644
--- a/config.h
+++ b/config.h
@@ -1 +1 @@
-#define TUXANCI_NG_VERSION "svn159"
+#define TUXANCI_NG_VERSION "svn160"
diff --git a/data/arena/ba_in_a_captivity_of_8-bit.map b/data/arena/ba_in_a_captivity_of_8-bit.map
index 4add3d9..ebaa8fe 100644
--- a/data/arena/ba_in_a_captivity_of_8-bit.map
+++ b/data/arena/ba_in_a_captivity_of_8-bit.map
@@ -8,7 +8,7 @@ loadModule file="libmodTeleport"
loadMusic file="in_a_captivity_of_8-bit.ogg" name="in_a_captivity_of_8-bit"
-loadImage file="l3.nic.png" name="nic" alpha="no"
+loadImage file="bal3.nic.png" name="nic" alpha="no"
loadImage file="l3.ihlan.png" name="ihlan" alpha="yes"
loadImage file="l3.kvader1.png" name="kvader1" alpha="yes"
loadImage file="l3.kvader2.png" name="kvader2" alpha="yes"
diff --git a/data/image/bal3.nic.png b/data/image/bal3.nic.png
new file mode 100644
index 0000000..0690ffc
--- /dev/null
+++ b/data/image/bal3.nic.png
Binary files differ
diff --git a/src/base/shot.c b/src/base/shot.c
index 5e95a8e..463796a 100644
--- a/src/base/shot.c
+++ b/src/base/shot.c
@@ -80,6 +80,7 @@ shot_t* newShot(int x,int y, int px, int py, int gun, int author_id)
}
new->isCanKillAuthor = FALSE;
+ new->del = FALSE;
switch( gun )
{
diff --git a/src/base/shot.h b/src/base/shot.h
index d279c02..189cf52 100644
--- a/src/base/shot.h
+++ b/src/base/shot.h
@@ -34,6 +34,7 @@ typedef struct shot_struct
int author_id;
bool_t isCanKillAuthor;
+ bool_t del;
#ifndef PUBLIC_SERVER
image_t *img;
diff --git a/src/client/screen.c b/src/client/screen.c
index f08d89a..1a4e862 100644
--- a/src/client/screen.c
+++ b/src/client/screen.c
@@ -138,9 +138,9 @@ void drawScreen()
assert( currentScreen != NULL );
#ifdef DEBUG_TIME_DRAW
- clock_t prev;
+ my_time_t prev;
- prev = clock();
+ prev = getMyTimeMicro();
#endif
currentScreen->fce_draw();
@@ -148,8 +148,7 @@ void drawScreen()
interfaceRefresh();
#ifdef DEBUG_TIME_DRAW
- printf("CLK_TCK = %d\n", CLOCKS_PER_SEC);
- printf("c draw time = %d\n", clock() - prev );
+ printf("c draw time = %d\n", getMyTimeMicro() - prev );
#endif
}
@@ -159,15 +158,15 @@ void eventScreen()
assert( currentScreen != NULL );
#ifdef DEBUG_TIME_EVENT
- clock_t prev;
+ my_time_t prev;
- prev = clock();
+ prev = getMyTimeMicro();
#endif
currentScreen->fce_event();
#ifdef DEBUG_TIME_EVENT
- printf("c event time = %d\n", clock() - prev );
+ printf("c event time = %d\n", getMyTimeMicro() - prev );
#endif
}
diff --git a/src/modules/modPipe.c b/src/modules/modPipe.c
index 1e6fe0a..9c5b443 100755
--- a/src/modules/modPipe.c
+++ b/src/modules/modPipe.c
@@ -373,7 +373,8 @@ static void action_eventpipe(space_t *space, pipe_t *pipe, shot_t *shot)
}
else
{
- delObjectFromSpaceWithObject(arena->spaceShot, shot, export_fce->fce_destroyShot);
+ //delObjectFromSpaceWithObject(arena->spaceShot, shot, export_fce->fce_destroyShot);
+ shot->del = TRUE;
}
}
}
@@ -381,6 +382,11 @@ static void action_eventpipe(space_t *space, pipe_t *pipe, shot_t *shot)
static void action_eventshot(space_t *space, shot_t *shot, space_t *spacePipe)
{
actionSpaceFromLocation(spacePipe, action_eventpipe, shot, shot->x, shot->y, shot->w, shot->h);
+
+ if( shot->del == TRUE )
+ {
+ delObjectFromSpaceWithObject(space, shot, export_fce->fce_destroyShot);
+ }
}
int event()
diff --git a/src/modules/modWall.c b/src/modules/modWall.c
index 8376e29..971edc1 100755
--- a/src/modules/modWall.c
+++ b/src/modules/modWall.c
@@ -286,12 +286,18 @@ static void action_eventwall(space_t *space, wall_t *wall, shot_t *shot)
return;
}
- delObjectFromSpaceWithObject(arena->spaceShot, shot, export_fce->fce_destroyShot);
+ //delObjectFromSpaceWithObject(arena->spaceShot, shot, export_fce->fce_destroyShot);
+ shot->del = TRUE;
}
static void action_eventshot(space_t *space, shot_t *shot, space_t *spaceWall)
{
actionSpaceFromLocation(spaceWall, action_eventwall, shot, shot->x, shot->y, shot->w, shot->h);
+
+ if( shot->del == TRUE )
+ {
+ delObjectFromSpaceWithObject(space, shot, export_fce->fce_destroyShot);
+ }
}
int event()