$$QUERY Objects b:[o:Object=IT] is a player weapon qObjIsPlayerWeapon Is this object a player weapon? Determines if the specified object is a player weapon Parameters: Object: The object to check $$END */
| 5227 | $$END |
| 5228 | */ |
| 5229 | bool qObjIsPlayerWeapon(int handle) { |
| 5230 | msafe_struct mstruct; |
| 5231 | |
| 5232 | mstruct.objhandle = handle; |
| 5233 | |
| 5234 | MSafe_GetValue(MSAFE_OBJECT_TYPE, &mstruct); |
| 5235 | |
| 5236 | if (mstruct.type == OBJ_WEAPON) { |
| 5237 | MSafe_GetValue(MSAFE_OBJECT_PARENT, &mstruct); |
| 5238 | MSafe_GetValue(MSAFE_OBJECT_TYPE, &mstruct); |
| 5239 | |
| 5240 | if (mstruct.type == OBJ_PLAYER) |
| 5241 | return 1; |
| 5242 | } |
| 5243 | |
| 5244 | return 0; |
| 5245 | } |
| 5246 | |
| 5247 | /* |
| 5248 | $$QUERY |
no outgoing calls
no test coverage detected