… | |
… | |
851 | } |
851 | } |
852 | |
852 | |
853 | /* Split objects if needed. Can't insert tmp until the |
853 | /* Split objects if needed. Can't insert tmp until the |
854 | * end of this function - otherwise it will just re-merge. |
854 | * end of this function - otherwise it will just re-merge. |
855 | */ |
855 | */ |
856 | if (armour->nrof > 1) |
856 | tmp = armour->nrof > 1 ? armour->split (armour->nrof - 1) : 0; |
857 | tmp = get_split_ob (armour, armour->nrof - 1); |
|
|
858 | else |
|
|
859 | tmp = NULL; |
|
|
860 | |
857 | |
861 | armour->magic++; |
858 | armour->magic++; |
862 | |
859 | |
863 | if (!settings.armor_speed_linear) |
860 | if (!settings.armor_speed_linear) |
864 | { |
861 | { |
… | |
… | |
3220 | |
3217 | |
3221 | /* Ok. We are now at the state where we can apply the new object. |
3218 | /* Ok. We are now at the state where we can apply the new object. |
3222 | * Note that we don't have the checks for can_use_... |
3219 | * Note that we don't have the checks for can_use_... |
3223 | * below - that is already taken care of by can_apply_object. |
3220 | * below - that is already taken care of by can_apply_object. |
3224 | */ |
3221 | */ |
3225 | if (op->nrof > 1) |
3222 | tmp = op->nrof > 1 ? op->split (op->nrof - 1) : 0; |
3226 | tmp = get_split_ob (op, op->nrof - 1); |
|
|
3227 | else |
|
|
3228 | tmp = 0; |
|
|
3229 | |
3223 | |
3230 | if (INVOKE_OBJECT (BE_READY, op, ARG_OBJECT (who)) || INVOKE_OBJECT (READY, who, ARG_OBJECT (op))) |
3224 | if (INVOKE_OBJECT (BE_READY, op, ARG_OBJECT (who)) || INVOKE_OBJECT (READY, who, ARG_OBJECT (op))) |
3231 | return RESULT_INT (0); |
3225 | return RESULT_INT (0); |
3232 | |
3226 | |
3233 | switch (op->type) |
3227 | switch (op->type) |