| 340 | } |
| 341 | |
| 342 | void Antitrigger(short const value, short const flags) |
| 343 | { |
| 344 | ItemInfo* item = &g_Level.Items[value]; |
| 345 | |
| 346 | if (item->Flags & IFLAG_KILLED) |
| 347 | return; |
| 348 | |
| 349 | if (item->ObjectNumber == ID_EARTHQUAKE) // HACK: move to earthquake control function! |
| 350 | { |
| 351 | item->ItemFlags[0] = 0; |
| 352 | item->ItemFlags[1] = 100; |
| 353 | } |
| 354 | |
| 355 | item->Flags &= ~(CODE_BITS | IFLAG_REVERSE); |
| 356 | |
| 357 | if (flags & ONESHOT) |
| 358 | item->Flags |= ATONESHOT; |
| 359 | |
| 360 | if (Objects[item->ObjectNumber].intelligent) |
| 361 | { |
| 362 | if (item->Active) |
| 363 | { |
| 364 | DisableEntityAI(value); |
| 365 | RemoveActiveItem(value, false); |
| 366 | item->Status = ITEM_INVISIBLE; |
| 367 | } |
| 368 | } |
| 369 | else |
| 370 | { |
| 371 | item->Status = ITEM_DEACTIVATED; |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | void Trigger(short const value, short const flags) |
| 376 | { |