… | |
… | |
2321 | /* exit if it's not a player using this spell. */ |
2321 | /* exit if it's not a player using this spell. */ |
2322 | if (op->type != PLAYER) |
2322 | if (op->type != PLAYER) |
2323 | return 0; |
2323 | return 0; |
2324 | |
2324 | |
2325 | /* if player already has a golem, abort */ |
2325 | /* if player already has a golem, abort */ |
2326 | if (op->contr->ranges[range_golem] != NULL && op->contr->golem_count == op->contr->ranges[range_golem]->count) |
2326 | if (op->contr->ranges[range_golem]) |
2327 | { |
2327 | { |
2328 | control_golem (op->contr->ranges[range_golem], dir); |
2328 | control_golem (op->contr->ranges[range_golem], dir); |
2329 | return 0; |
2329 | return 0; |
2330 | } |
2330 | } |
2331 | |
2331 | |
… | |
… | |
2387 | tmp->type = GOLEM; |
2387 | tmp->type = GOLEM; |
2388 | set_owner (tmp, op); |
2388 | set_owner (tmp, op); |
2389 | set_spell_skill (op, caster, spell, tmp); |
2389 | set_spell_skill (op, caster, spell, tmp); |
2390 | op->contr->ranges[range_golem] = tmp; |
2390 | op->contr->ranges[range_golem] = tmp; |
2391 | op->contr->shoottype = range_golem; |
2391 | op->contr->shoottype = range_golem; |
2392 | op->contr->golem_count = tmp->count; |
|
|
2393 | |
2392 | |
2394 | /* Give the weapon to the golem now. A bit of a hack to check the |
2393 | /* Give the weapon to the golem now. A bit of a hack to check the |
2395 | * removed flag - it should only be set if get_split_object was |
2394 | * removed flag - it should only be set if get_split_object was |
2396 | * used above. |
2395 | * used above. |
2397 | */ |
2396 | */ |