Browse Source

Small server fixes

The last two fixes that I needed to make the server run without error
messages for a longer time.
Petschge 7 years ago
parent
commit
f05b180114
2 changed files with 2 additions and 1 deletions
  1. 1
    0
      server/route.c
  2. 1
    1
      settings.mak

+ 1
- 0
server/route.c View File

@@ -26,6 +26,7 @@ waypoint_t* go_around(const vector_t A, const vector_t B, const entity_t* C, dou
26 26
 	double d = vector_dist(X, C->pos);
27 27
 	if(d < 1e-10) {
28 28
 		ERROR("A = (%f, %f), B = (%f, %f), C = (%f, %f), X ? (%f, %f), r = %f, d = %f\n", A.x, A.y, B.x, B.y, C->pos.x, C->pos.y, X.x, X.y, r, d);
29
+		d = 0.1;
29 30
 	}
30 31
 	vector_t W;
31 32
 	W.v = C->pos.v + (X.v - C->pos.v) * (v2d) {1.01, 1.01} * (v2d) {C->radius,  C->radius} / (v2d) {d+0.1, d+0.1};

+ 1
- 1
settings.mak View File

@@ -4,7 +4,7 @@ LUA_PKG = $(shell pkg-config --list-all | grep lua | head -n 1 | cut -d" " -f 1)
4 4
 
5 5
 # General compilation-related defines
6 6
 CC = gcc
7
-CFLAGS = -Wall -g3 -O2 -march=native -mtune=native -pipe `pkg-config $(LUA_PKG) --cflags` -std=gnu99
7
+CFLAGS = -Wall -g3 -O2 -march=native -mtune=native -pipe `pkg-config $(LUA_PKG) --cflags` -std=gnu99 -rdynamic
8 8
 LDFLAGS = -lm -lrt `pkg-config $(LUA_PKG) --libs` -Wl,-O1  -lssl -lcrypto -Wl,--as-needed
9 9
 
10 10
 # Debug builds get this define set, so the DEBUG() macro does something