summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--data/maps/map1.datbin8384008 -> 8384008 bytes
-rw-r--r--issues2
-rw-r--r--src/bullets.c1
-rw-r--r--src/zombies.c4
5 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index dd40d32..5a676d0 100644
--- a/Makefile
+++ b/Makefile
@@ -16,4 +16,4 @@ menu:
debug_client:
./build/zombies.exe -ip 127.0.0.1 -port 27015 &
- gdb --args ./build/zombies.exe -ip 172.29.64.1 -port 27015 \ No newline at end of file
+ ./build/zombies.exe -ip 172.27.192.1 -port 27015 \ No newline at end of file
diff --git a/data/maps/map1.dat b/data/maps/map1.dat
index e01822a..37ecd0e 100644
--- a/data/maps/map1.dat
+++ b/data/maps/map1.dat
Binary files differ
diff --git a/issues b/issues
index 730dd5f..05a4c0f 100644
--- a/issues
+++ b/issues
@@ -1,3 +1,3 @@
- client ping is wrong (platform_get_time is not universal)
- client crash allocator out of space
-- aim cone collides with collision free objects \ No newline at end of file
+- doors dont open on client \ No newline at end of file
diff --git a/src/bullets.c b/src/bullets.c
index 7517949..4de760d 100644
--- a/src/bullets.c
+++ b/src/bullets.c
@@ -98,6 +98,7 @@ object_type check_if_bullet_collided_with_object(bullet* b, platform_window* win
for (int i = 0; i < MAX_OBJECTS; i++) {
object o = loaded_map.objects[i];
if (!o.active) continue;
+ if (!o.collision) continue;
if (b->position.z <= o.position.z + o.size.z && b->position.z >= o.position.z) {
box obj_box = get_box_of_square((vec3f){o.position.x, o.position.y, o.position.z}, o.size);
vec2f intersect_point;
diff --git a/src/zombies.c b/src/zombies.c
index 9c38411..6c87098 100644
--- a/src/zombies.c
+++ b/src/zombies.c
@@ -316,7 +316,7 @@ static vec2f get_direction_to_next_tile(zombie o) {
}
static bool is_within_tile(zombie o, vec2f dest) {
- if (fabs(o.position.x - dest.x) < 0.05f && fabs(o.position.y - dest.y) < 0.05f) {
+ if (fabs(o.position.x - dest.x) < 0.05f && fabs(o.position.y - dest.y) < 0.1f) {
return true;
}
return false;
@@ -529,7 +529,7 @@ void draw_zombies(platform_window* window, uint32_t ystart, uint32_t yend) {
renderer->render_rectangle(zombie_pos.x + (zombie_size/2) - (bar_w/2), zombie_pos.y - bar_h, bar_w*percentage, bar_h, rgb(100,0,0));
}
- //if (global_state.server) draw_path_of_zombie(window, o);
+ if (global_state.server) draw_path_of_zombie(window, o);
}
}