forked from github/server
disable clone-spell (quit-crash)
fix order of restart and quit command (spell-crash)
This commit is contained in:
parent
7e4db04e1b
commit
341b29c401
|
@ -3726,7 +3726,7 @@ add_proc_global(int priority, void (*process)(void), const char * name)
|
|||
while (*pproc) {
|
||||
proc = *pproc;
|
||||
if (proc->priority>priority) break;
|
||||
else if (proc->priority==priority && proc->type>=PR_GLOBAL) break;
|
||||
else if (proc->priority==priority && proc->type>PR_GLOBAL) break;
|
||||
pproc = &proc->next;
|
||||
}
|
||||
|
||||
|
@ -3748,7 +3748,7 @@ add_proc_region(int priority, void (*process)(region *), const char * name)
|
|||
while (*pproc) {
|
||||
proc = *pproc;
|
||||
if (proc->priority>priority) break;
|
||||
else if (proc->priority==priority && proc->type>=PR_REGION) break;
|
||||
else if (proc->priority==priority && proc->type>PR_REGION) break;
|
||||
pproc = &proc->next;
|
||||
}
|
||||
|
||||
|
@ -3770,7 +3770,7 @@ add_proc_unit(int priority, void (*process)(unit *), const char * name)
|
|||
while (*pproc) {
|
||||
proc = *pproc;
|
||||
if (proc->priority>priority) break;
|
||||
else if (proc->priority==priority && proc->type>=PR_UNIT) break;
|
||||
else if (proc->priority==priority && proc->type>PR_UNIT) break;
|
||||
pproc = &proc->next;
|
||||
}
|
||||
|
||||
|
|
|
@ -2540,6 +2540,9 @@ remove_empty_units_in_region(region *r)
|
|||
faction * f = u->faction;
|
||||
if (!fval(f, FFL_NOTIMEOUT) && f->age > MaxAge()) set_number(u, 0);
|
||||
}
|
||||
if (u->faction && !u->faction->alive) {
|
||||
set_number(u, 0);
|
||||
}
|
||||
if ((u->number == 0 && u->race != new_race[RC_SPELL]) || (u->age <= 0 && u->race == new_race[RC_SPELL])) {
|
||||
destroy_unit(u);
|
||||
if (u->number==0) remove_unit(u);
|
||||
|
|
|
@ -236,14 +236,17 @@ destroy_unit(unit * u)
|
|||
|
||||
/* Wir machen das erst nach dem Löschen der Items. Der Klon darf keine
|
||||
* Items haben, sonst Memory-Leak. */
|
||||
|
||||
#if 0
|
||||
/* broken. */
|
||||
clone = has_clone(u);
|
||||
if (clone && rng_int()%100 < 90) {
|
||||
attrib *a;
|
||||
int i;
|
||||
|
||||
/* TODO: Messages generieren. */
|
||||
u->region = clone->region;
|
||||
if (u->region!=clone->region) {
|
||||
move_unit(u, clone->region, NULL);
|
||||
}
|
||||
u->ship = clone->ship;
|
||||
u->building = clone->building;
|
||||
u->hp = 1;
|
||||
|
@ -262,10 +265,8 @@ destroy_unit(unit * u)
|
|||
if (a!=NULL) a_remove(&clone->attribs, a);
|
||||
fset(u, UFL_LONGACTION);
|
||||
set_number(clone, 0);
|
||||
u = clone;
|
||||
zombie = false;
|
||||
}
|
||||
|
||||
} else
|
||||
#endif
|
||||
if (zombie) {
|
||||
u_setfaction(u, findfaction(MONSTER_FACTION));
|
||||
scale_number(u, 1);
|
||||
|
|
Loading…
Reference in New Issue