Keine Befehle löschen, ist nicht nötig und verwirtr nur.

This commit is contained in:
Enno Rehling 2020-02-20 21:09:04 +01:00
parent 095e3d39ce
commit 5ee5751475
3 changed files with 3 additions and 8 deletions

2
.gitignore vendored
View file

@ -46,3 +46,5 @@ tests/data/185.dat
/cutest/ /cutest/
/critbit/ /critbit/
*.mo *.mo
/CMakeSettings.json
/.vs

View file

@ -647,7 +647,7 @@ void leave_building(unit * u)
{ {
building * b = u->building; building * b = u->building;
u->building = 0; u->building = NULL;
if (b->_owner == u) { if (b->_owner == u) {
building_update_owner(b); building_update_owner(b);
assert(b->_owner != u); assert(b->_owner != u);

View file

@ -1226,13 +1226,6 @@ void do_enter(struct region *r, bool is_final_attempt)
} }
} }
if (ulast != NULL) { 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) { if (ulast != u) {
/* put u behind ulast so it's the last unit in the building */ /* put u behind ulast so it's the last unit in the building */
*uptr = u->next; *uptr = u->next;