Find an object with the given type. Returns -1 if none found.
| 234 | |
| 235 | // Find an object with the given type. Returns -1 if none found. |
| 236 | int GetObjectID(int type) { |
| 237 | int i; |
| 238 | |
| 239 | for (i = 0; i < MAX_OBJECT_IDS; i++) |
| 240 | if (Object_info[i].type == type) |
| 241 | return i; |
| 242 | |
| 243 | return -1; |
| 244 | } |
| 245 | |
| 246 | #ifdef EDITOR |
| 247 |