… | |
… | |
1345 | { |
1345 | { |
1346 | op->remove (); |
1346 | op->remove (); |
1347 | |
1347 | |
1348 | if (m == &freed_map)//D TODO: remove soon |
1348 | if (m == &freed_map)//D TODO: remove soon |
1349 | {//D |
1349 | {//D |
1350 | LOG (llevError | logBacktrace, "tries to insret object on freed objects map: %s", op->debug_desc ());//D |
1350 | LOG (llevError | logBacktrace, "tries to insert object on freed objects map: %s", op->debug_desc ());//D |
1351 | }//D |
1351 | }//D |
1352 | |
1352 | |
1353 | /* Ideally, the caller figures this out. However, it complicates a lot |
1353 | /* Ideally, the caller figures this out. However, it complicates a lot |
1354 | * of areas of callers (eg, anything that uses find_free_spot would now |
1354 | * of areas of callers (eg, anything that uses find_free_spot would now |
1355 | * need extra work |
1355 | * need extra work |
… | |
… | |
2731 | object::force_add (shstr_tmp name, int duration) |
2731 | object::force_add (shstr_tmp name, int duration) |
2732 | { |
2732 | { |
2733 | if (object *force = force_find (name)) |
2733 | if (object *force = force_find (name)) |
2734 | force->destroy (); |
2734 | force->destroy (); |
2735 | |
2735 | |
2736 | object *force = get_archetype (FORCE_NAME); |
2736 | object *force = archetype::get (FORCE_NAME); |
2737 | |
2737 | |
2738 | force->slaying = name; |
2738 | force->slaying = name; |
2739 | force->force_set_timer (duration); |
2739 | force->force_set_timer (duration); |
2740 | force->flag [FLAG_APPLIED] = true; |
2740 | force->flag [FLAG_APPLIED] = true; |
2741 | |
2741 | |