forked from github/server
dependencies für mapper (static libs) gefixt. dropouts mit null-partei problem (tutorial) gefixt
This commit is contained in:
parent
0ddc7b5081
commit
456af91bc2
|
@ -2371,9 +2371,6 @@ remove_empty_factions(boolean writedropouts)
|
||||||
/* monster (0) werden nicht entfernt. alive kann beim readgame
|
/* monster (0) werden nicht entfernt. alive kann beim readgame
|
||||||
* () auf 0 gesetzt werden, wenn monsters keine einheiten mehr
|
* () auf 0 gesetzt werden, wenn monsters keine einheiten mehr
|
||||||
* haben. */
|
* haben. */
|
||||||
#ifdef MAXAGE
|
|
||||||
if (f->age > MAXAGE) f->alive = 0;
|
|
||||||
#endif
|
|
||||||
if (f->alive == 0 && f->no != MONSTER_FACTION) {
|
if (f->alive == 0 && f->no != MONSTER_FACTION) {
|
||||||
ursprung * ur = f->ursprung;
|
ursprung * ur = f->ursprung;
|
||||||
while (ur && ur->id!=0) ur=ur->next;
|
while (ur && ur->id!=0) ur=ur->next;
|
||||||
|
@ -2430,7 +2427,10 @@ remove_empty_units_in_region(region *r)
|
||||||
|
|
||||||
while (*up) {
|
while (*up) {
|
||||||
unit * u = *up;
|
unit * u = *up;
|
||||||
|
faction * f = u->faction;
|
||||||
|
#ifdef MAXAGE
|
||||||
|
if (f->age > MAXAGE) set_number(u, 0);
|
||||||
|
#endif
|
||||||
if ((u->number <= 0 && u->race != new_race[RC_SPELL])
|
if ((u->number <= 0 && u->race != new_race[RC_SPELL])
|
||||||
|| (u->age <= 0 && u->race == new_race[RC_SPELL])
|
|| (u->age <= 0 && u->race == new_race[RC_SPELL])
|
||||||
|| u->number < 0) {
|
|| u->number < 0) {
|
||||||
|
|
|
@ -1550,7 +1550,12 @@ readunit(FILE * F)
|
||||||
u_setfaction(u, findfaction(n = ri(F)));
|
u_setfaction(u, findfaction(n = ri(F)));
|
||||||
if (u->faction == NULL) {
|
if (u->faction == NULL) {
|
||||||
log_error(("unit %s has faction == NULL\n", unitname(u)));
|
log_error(("unit %s has faction == NULL\n", unitname(u)));
|
||||||
|
#if 0
|
||||||
abort();
|
abort();
|
||||||
|
#else
|
||||||
|
u_setfaction(u, findfaction(MONSTER_FACTION));
|
||||||
|
set_number(u, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (playerrace(u->race)) {
|
if (playerrace(u->race)) {
|
||||||
u->faction->no_units++;
|
u->faction->no_units++;
|
||||||
|
|
|
@ -17,19 +17,24 @@ INCLUDES += \
|
||||||
-I../common \
|
-I../common \
|
||||||
-I..
|
-I..
|
||||||
|
|
||||||
|
LIBNAMES += \
|
||||||
|
e-triggers \
|
||||||
|
e-modules \
|
||||||
|
e-kernel \
|
||||||
|
e-items \
|
||||||
|
e-spells \
|
||||||
|
e-races \
|
||||||
|
e-attributes \
|
||||||
|
e-util \
|
||||||
|
e-modules
|
||||||
|
|
||||||
LIBS += \
|
LIBS += \
|
||||||
-L$(PUBLISH_DIR) \
|
-L$(PUBLISH_DIR) \
|
||||||
-le-triggers \
|
|
||||||
-le-modules \
|
|
||||||
-le-kernel \
|
|
||||||
-le-items \
|
|
||||||
-le-spells \
|
|
||||||
-le-races \
|
|
||||||
-le-attributes \
|
|
||||||
-le-util \
|
|
||||||
-le-modules \
|
|
||||||
-lm
|
-lm
|
||||||
|
|
||||||
|
LIBDEPS = $(LIBNAMES:%=../$(BUILD_DIR)/lib%.a)
|
||||||
|
LIBS += $(LIBNAMES:%=-l%)
|
||||||
|
|
||||||
ifeq ($(NCURSES), 1)
|
ifeq ($(NCURSES), 1)
|
||||||
LIBS += -lncurses
|
LIBS += -lncurses
|
||||||
else
|
else
|
||||||
|
@ -47,7 +52,7 @@ ifeq ($(CONVERT_TRIGGERS), 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# executable:
|
# executable:
|
||||||
$(BUILD_DIR)/$(BINARY):: $(BUILD_DIR) $(OBJECTS)
|
$(BUILD_DIR)/$(BINARY):: $(BUILD_DIR) $(OBJECTS) $(LIBDEPS)
|
||||||
$(LD) -o $@ $(OBJECTS) $(LDFLAGS)
|
$(LD) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||||
$(INSTALL) $@ $(PUBLISH_DIR)/
|
$(INSTALL) $@ $(PUBLISH_DIR)/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue