| 231 | } |
| 232 | |
| 233 | int KeyTrigger(short itemNumber) |
| 234 | { |
| 235 | auto* item = &g_Level.Items[itemNumber]; |
| 236 | const auto& player = Lara; |
| 237 | |
| 238 | if ((item->Status != ITEM_ACTIVE || player.Control.HandStatus == HandStatus::Busy) && |
| 239 | (!KeyTriggerActive || player.Control.HandStatus != HandStatus::Busy)) |
| 240 | { |
| 241 | return -1; |
| 242 | } |
| 243 | |
| 244 | int oldkey = KeyTriggerActive; |
| 245 | |
| 246 | if (!oldkey) |
| 247 | item->Status = ITEM_DEACTIVATED; |
| 248 | |
| 249 | KeyTriggerActive = false; |
| 250 | |
| 251 | return oldkey; |
| 252 | } |
| 253 | |
| 254 | bool PickupTrigger(short itemNumber) |
| 255 | { |