From 5ee57514752ff6d8197040009e7f986acf2a6c2c Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 20 Feb 2020 21:09:04 +0100 Subject: [PATCH] =?UTF-8?q?Keine=20Befehle=20l=C3=B6schen,=20ist=20nicht?= =?UTF-8?q?=20n=C3=B6tig=20und=20verwirtr=20nur.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ src/kernel/unit.c | 2 +- src/laws.c | 7 ------- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 98b1e8e0a..cccbf2c32 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,5 @@ tests/data/185.dat /cutest/ /critbit/ *.mo +/CMakeSettings.json +/.vs diff --git a/src/kernel/unit.c b/src/kernel/unit.c index e9ec8e657..0e22e8d2d 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -647,7 +647,7 @@ void leave_building(unit * u) { building * b = u->building; - u->building = 0; + u->building = NULL; if (b->_owner == u) { building_update_owner(b); assert(b->_owner != u); diff --git a/src/laws.c b/src/laws.c index 97d9b774f..b00da467c 100644 --- a/src/laws.c +++ b/src/laws.c @@ -1226,13 +1226,6 @@ void do_enter(struct region *r, bool is_final_attempt) } } if (ulast != NULL) { - /* Wenn wir hier angekommen sind, war der Befehl - * erfolgreich und wir loeschen ihn, damit er im - * zweiten Versuch nicht nochmal ausgefuehrt wird. */ - *ordp = ord->next; - ord->next = NULL; - free_order(ord); - if (ulast != u) { /* put u behind ulast so it's the last unit in the building */ *uptr = u->next;