forked from github/server
Removed some warnings about type conversion.
This commit is contained in:
parent
76b0371100
commit
ec761909a9
|
@ -485,11 +485,11 @@ add_give(unit * u, unit * u2, int n, const resource_type * rtype, const char * c
|
|||
assert(rtype);
|
||||
add_message(&u->faction->msgs,
|
||||
msg_message("give", "unit target resource amount",
|
||||
u, u2?ucansee(u->faction, u2, &u_unknown):&u_peasants, rtype, n));
|
||||
u, u2?ucansee(u->faction, u2, u_unknown()):u_peasants(), rtype, n));
|
||||
if (u2) {
|
||||
add_message(&u2->faction->msgs,
|
||||
msg_message("give", "unit target resource amount",
|
||||
ucansee(u2->faction, u, &u_unknown), u2, rtype, n));
|
||||
ucansee(u2->faction, u, u_unknown()), u2, rtype, n));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -884,7 +884,7 @@ dogive(region * r, unit * u, strlist * S, boolean liefere, int mode)
|
|||
if (u->faction != u2->faction) {
|
||||
add_message(&u2->faction->msgs,
|
||||
msg_message("givecommand", "unit receipient",
|
||||
ucansee(u2->faction, u, &u_unknown), u2));
|
||||
ucansee(u2->faction, u, u_unknown()), u2));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -55,8 +55,25 @@
|
|||
int demonfix = 0;
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
const unit u_peasants = { NULL, NULL, NULL, NULL, NULL, 2, "die Bauern" };
|
||||
const unit u_unknown = { NULL, NULL, NULL, NULL, NULL, 1, "eine unbekannte Einheit" };
|
||||
const unit *
|
||||
u_peasants(void)
|
||||
{
|
||||
static unit peasants = { NULL, NULL, NULL, NULL, NULL, 2, NULL };
|
||||
if (peasants.name==NULL) {
|
||||
peasants.name = strdup("die Bauern");
|
||||
}
|
||||
return &peasants;
|
||||
}
|
||||
|
||||
const unit *
|
||||
u_unknown(void)
|
||||
{
|
||||
static unit unknown = { NULL, NULL, NULL, NULL, NULL, 1, NULL };
|
||||
if (unknown.name==NULL) {
|
||||
unknown.name =strdup("eine unbekannte Einheit");
|
||||
}
|
||||
return &unknown;
|
||||
}
|
||||
|
||||
#define DMAXHASH 8191
|
||||
typedef struct dead {
|
||||
|
|
|
@ -105,8 +105,8 @@ void usetcontact(struct unit * u, const struct unit * c);
|
|||
struct unit * findnewunit (const struct region * r, const struct faction *f, int alias);
|
||||
|
||||
#define upotions(u) fval(u, FL_POTIONS)
|
||||
extern const struct unit u_peasants;
|
||||
extern const struct unit u_unknown;
|
||||
extern const struct unit * u_peasants(void);
|
||||
extern const struct unit * u_unknown(void);
|
||||
|
||||
extern struct unit * udestroy;
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
<familiar race="nymph"></familiar>
|
||||
<familiar race="imp"></familiar>
|
||||
</race>
|
||||
<race name="shadow knight" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="5" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="1" ac="0" damage="1d1" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants walk nolearn noteach noblock>
|
||||
<race name="shadow knight" magres="0.000000" maxaura="0.000000" regaura="0.000000" recruitcost="5" maintenance="0" weight="1000" capacity="540" speed="1.000000" hp="1" ac="0" damage="1d1" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants nogive walk nolearn noteach noblock>
|
||||
<ai splitsize="20000" moverandom></ai>
|
||||
<attack type="1" damage="1d1"></attack>
|
||||
</race>
|
||||
|
|
Loading…
Reference in New Issue