forked from github/server
Merge pull request #78 from badgerman/bug-2052
bugfix: could not GIVE to TEMP units.
This commit is contained in:
commit
d6ce30a9a9
|
@ -518,7 +518,7 @@ void give_unit(unit * u, unit * u2, order * ord)
|
||||||
|
|
||||||
bool can_give_to(unit *u, unit *u2) {
|
bool can_give_to(unit *u, unit *u2) {
|
||||||
/* Damit Tarner nicht durch die Fehlermeldung enttarnt werden können */
|
/* Damit Tarner nicht durch die Fehlermeldung enttarnt werden können */
|
||||||
if (!u2 || u2->number == 0) {
|
if (!u2) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (u2 && !alliedunit(u2, u->faction, HELP_GIVE)
|
if (u2 && !alliedunit(u2, u->faction, HELP_GIVE)
|
||||||
|
|
|
@ -1016,9 +1016,9 @@ int read_unitid(const faction * f, const region * r)
|
||||||
|
|
||||||
int getunit(const region * r, const faction * f, unit **uresult)
|
int getunit(const region * r, const faction * f, unit **uresult)
|
||||||
{
|
{
|
||||||
|
unit *u2 = NULL;
|
||||||
int n = read_unitid(f, r);
|
int n = read_unitid(f, r);
|
||||||
int result = GET_NOTFOUND;
|
int result = GET_NOTFOUND;
|
||||||
unit *u2 = NULL;
|
|
||||||
|
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
result = GET_PEASANTS;
|
result = GET_PEASANTS;
|
||||||
|
|
Loading…
Reference in New Issue