| 936 | } |
| 937 | |
| 938 | staticfn boolean |
| 939 | keep_saddle_with_steedcorpse( |
| 940 | unsigned steed_mid, |
| 941 | struct obj *objchn, |
| 942 | struct obj *saddle) |
| 943 | { |
| 944 | if (!saddle) |
| 945 | return FALSE; |
| 946 | while (objchn) { |
| 947 | if (objchn->otyp == CORPSE && has_omonst(objchn)) { |
| 948 | struct monst *mtmp = OMONST(objchn); |
| 949 | |
| 950 | if (mtmp->m_id == steed_mid) { |
| 951 | /* move saddle */ |
| 952 | coordxy x, y; |
| 953 | if (get_obj_location(objchn, &x, &y, 0)) { |
| 954 | obj_extract_self(saddle); |
| 955 | place_object(saddle, x, y); |
| 956 | stackobj(saddle); |
| 957 | } |
| 958 | return TRUE; |
| 959 | } |
| 960 | } |
| 961 | if (Has_contents(objchn) |
| 962 | && keep_saddle_with_steedcorpse(steed_mid, objchn->cobj, saddle)) |
| 963 | return TRUE; |
| 964 | objchn = objchn->nobj; |
| 965 | } |
| 966 | return FALSE; |
| 967 | } |
| 968 | |
| 969 | /* monster or you go through and possibly destroy a web. |
| 970 | return TRUE if could go through. */ |
no test coverage detected