… | |
… | |
1488 | else if (owner->chosen_skill) |
1488 | else if (owner->chosen_skill) |
1489 | { |
1489 | { |
1490 | skop = owner->chosen_skill; |
1490 | skop = owner->chosen_skill; |
1491 | skill = skop->skill; |
1491 | skill = skop->skill; |
1492 | } |
1492 | } |
1493 | else if (QUERY_FLAG (owner, FLAG_READY_WEAPON)) |
1493 | else if (QUERY_FLAG (owner, FLAG_READY_WEAPON) && owner->current_weapon) |
1494 | skill = owner->current_weapon->skill; |
1494 | skill = owner->current_weapon->skill; |
1495 | else |
1495 | else |
1496 | { |
1496 | { |
1497 | LOG (llevError, "kill_object - unable to find skill that killed monster\n"); |
1497 | LOG (llevError, "BUG: kill_object - unable to find skill that killed monster\n" |
|
|
1498 | "op: %s\n" "hitter: %s\n" "owner: %s\n", |
|
|
1499 | owner->debug_desc (), hitter->debug_desc (), op->debug_desc ()); |
1498 | skill = 0; |
1500 | skill = 0; |
1499 | } |
1501 | } |
1500 | |
1502 | |
1501 | /* We have the skill we want to credit to - now find the object this goes |
1503 | /* We have the skill we want to credit to - now find the object this goes |
1502 | * to. Make sure skop is an actual skill, and not a skill tool! |
1504 | * to. Make sure skop is an actual skill, and not a skill tool! |