| 1047 | } |
| 1048 | |
| 1049 | int dfGetPlayer(int objhandle) { |
| 1050 | msafe_struct mstruct; |
| 1051 | mstruct.objhandle = objhandle; |
| 1052 | MSafe_GetValue(MSAFE_OBJECT_TYPE, &mstruct); |
| 1053 | |
| 1054 | if (mstruct.type == OBJ_WEAPON) { |
| 1055 | MSafe_GetValue(MSAFE_OBJECT_PARENT, &mstruct); |
| 1056 | MSafe_GetValue(MSAFE_OBJECT_TYPE, &mstruct); |
| 1057 | |
| 1058 | if (mstruct.type == OBJ_PLAYER || mstruct.type == OBJ_OBSERVER || mstruct.type == OBJ_GHOST) { |
| 1059 | return mstruct.objhandle; |
| 1060 | } else { |
| 1061 | mprintf(0, "---------------------NOT A PLAYER OR PLAYER WEAPON!!!!!!!!!-------------\n"); |
| 1062 | return objhandle; |
| 1063 | } |
| 1064 | |
| 1065 | } else if (mstruct.type == OBJ_PLAYER || mstruct.type == OBJ_OBSERVER || mstruct.type == OBJ_GHOST) { |
| 1066 | return objhandle; |
| 1067 | } else { |
| 1068 | mprintf(0, "---------------------NOT A PLAYER OR PLAYER WEAPON!!!!!!!!!-------------\n"); |
| 1069 | } |
| 1070 | |
| 1071 | return objhandle; |
| 1072 | } |
| 1073 | |
| 1074 | // |
| 1075 | // D3 actions |
no outgoing calls
no test coverage detected