forked from github/server
Fixed a null-pointer crash in randenc.
Dead code in economy removed.
This commit is contained in:
parent
e240860486
commit
dd9c6e50c2
|
@ -1001,15 +1001,6 @@ gebaeude_stuerzt_ein(region * r, building * b)
|
|||
}
|
||||
}
|
||||
|
||||
/* Falls Karawanserei, Damm oder Tunnel einstürzen, wird die schon
|
||||
* gebaute Straße zur Hälfte vernichtet */
|
||||
if (b->type == bt_find("caravan") || b->type == bt_find("dam") || b->type == bt_find("tunnel")) {
|
||||
for (d=0;d!=MAXDIRECTIONS;++d) if (rroad(r, d) > 0) {
|
||||
road = 1;
|
||||
/* vernichtung findet erst in destroy_building statt! */
|
||||
break;
|
||||
}
|
||||
}
|
||||
msg = msg_message("buildingcrash", "region building opfer road", r, b, opfer, road);
|
||||
add_message(&r->msgs, msg);
|
||||
for (u=r->units; u; u=u->next) {
|
||||
|
|
|
@ -455,6 +455,7 @@ get_allies(region * r, unit * u)
|
|||
break;
|
||||
}
|
||||
|
||||
if (newunit!=NULL) {
|
||||
u_setfaction(newunit, u->faction);
|
||||
set_racename(&newunit->attribs, get_racename(u->attribs));
|
||||
if(u->race->flags & RCF_SHAPESHIFT) {
|
||||
|
@ -469,6 +470,7 @@ get_allies(region * r, unit * u)
|
|||
|
||||
addmessage(r, u->faction, buf, MSG_EVENT, ML_IMPORTANT);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
encounter(region * r, unit * u)
|
||||
|
|
Loading…
Reference in New Issue