forked from github/server
delete at_scare
delete dead code (race.attribs has no at_skillmod) delete race.attribs
This commit is contained in:
parent
67414f29eb
commit
492aba543b
|
@ -58,10 +58,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
#include <storage.h>
|
#include <storage.h>
|
||||||
|
|
||||||
attrib_type at_scare = { // monster scares peasants
|
|
||||||
"scare", NULL, NULL, NULL, a_writeint, a_readint
|
|
||||||
};
|
|
||||||
|
|
||||||
attrib_type at_unitdissolve = {
|
attrib_type at_unitdissolve = {
|
||||||
"unitdissolve", NULL, NULL, NULL, a_writechars, a_readchars
|
"unitdissolve", NULL, NULL, NULL, a_writechars, a_readchars
|
||||||
};
|
};
|
||||||
|
@ -78,7 +74,6 @@ static int read_ext(attrib * a, void *owner, gamedata *data)
|
||||||
void register_attributes(void)
|
void register_attributes(void)
|
||||||
{
|
{
|
||||||
/* Alle speicherbaren Attribute müssen hier registriert werden */
|
/* Alle speicherbaren Attribute müssen hier registriert werden */
|
||||||
at_register(&at_scare);
|
|
||||||
at_register(&at_shiptrail);
|
at_register(&at_shiptrail);
|
||||||
at_register(&at_familiar);
|
at_register(&at_familiar);
|
||||||
at_register(&at_familiarmage);
|
at_register(&at_familiarmage);
|
||||||
|
|
|
@ -23,7 +23,6 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct attrib_type;
|
struct attrib_type;
|
||||||
extern struct attrib_type at_scare;
|
|
||||||
extern void register_attributes(void);
|
extern void register_attributes(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -760,10 +760,6 @@ bool missile)
|
||||||
if (is_riding(t) && (wtype == NULL || (fval(wtype, WTF_HORSEBONUS)
|
if (is_riding(t) && (wtype == NULL || (fval(wtype, WTF_HORSEBONUS)
|
||||||
&& !fval(wtype, WTF_MISSILE)))) {
|
&& !fval(wtype, WTF_MISSILE)))) {
|
||||||
skill += CavalryBonus(tu, enemy, BONUS_SKILL);
|
skill += CavalryBonus(tu, enemy, BONUS_SKILL);
|
||||||
if (wtype)
|
|
||||||
skill =
|
|
||||||
skillmod(u_race(tu)->attribs, tu, tu->region, wtype->skill, skill,
|
|
||||||
SMF_RIDING);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t.index < tf->elvenhorses) {
|
if (t.index < tf->elvenhorses) {
|
||||||
|
|
|
@ -48,7 +48,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <storage.h>
|
#include <storage.h>
|
||||||
|
|
||||||
/* attrib includes */
|
/* attrib includes */
|
||||||
#include <attributes/attributes.h>
|
|
||||||
#include <attributes/raceprefix.h>
|
#include <attributes/raceprefix.h>
|
||||||
|
|
||||||
/* libc includes */
|
/* libc includes */
|
||||||
|
@ -298,8 +297,7 @@ int rc_armor_bonus(const race *rc)
|
||||||
|
|
||||||
int rc_scare(const struct race *rc)
|
int rc_scare(const struct race *rc)
|
||||||
{
|
{
|
||||||
attrib *a = a_find(rc->attribs, &at_scare);
|
return get_param_int(rc->parameters, "ai.scare", 0);
|
||||||
return a ? a->data.i : 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int rc_migrants_formula(const race *rc)
|
int rc_migrants_formula(const race *rc)
|
||||||
|
@ -311,11 +309,6 @@ void rc_set_param(struct race *rc, const char *key, const char *value) {
|
||||||
if (strcmp(key, "recruit_multi") == 0) {
|
if (strcmp(key, "recruit_multi") == 0) {
|
||||||
rc->recruit_multi = atof(value);
|
rc->recruit_multi = atof(value);
|
||||||
}
|
}
|
||||||
else if (strcmp(key, "ai.scare") == 0) {
|
|
||||||
attrib *a = a_new(&at_scare);
|
|
||||||
a->data.i = atoi(value);
|
|
||||||
a_add(&rc->attribs, a);
|
|
||||||
}
|
|
||||||
else if (strcmp(key, "migrants.formula") == 0) {
|
else if (strcmp(key, "migrants.formula") == 0) {
|
||||||
if (value[0] == '1') {
|
if (value[0] == '1') {
|
||||||
rc->flags |= RCF_MIGRANTS;
|
rc->flags |= RCF_MIGRANTS;
|
||||||
|
|
|
@ -154,7 +154,6 @@ extern "C" {
|
||||||
void(*init_familiar) (struct unit *);
|
void(*init_familiar) (struct unit *);
|
||||||
|
|
||||||
const struct race *familiars[MAXMAGIETYP];
|
const struct race *familiars[MAXMAGIETYP];
|
||||||
struct attrib *attribs;
|
|
||||||
struct race *next;
|
struct race *next;
|
||||||
} race;
|
} race;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue