Fixed a null-pointer crash in randenc.

Dead code in economy removed.
This commit is contained in:
Enno Rehling 2005-10-02 07:33:21 +00:00
parent e240860486
commit dd9c6e50c2
2 changed files with 13 additions and 20 deletions

View File

@ -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) {

View File

@ -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)