diff options
Diffstat (limited to '')
| -rw-r--r-- | CONTEXT.md | 4 | ||||
| -rw-r--r-- | src/esp.cpp | 13 |
2 files changed, 16 insertions, 1 deletions
| @@ -278,7 +278,9 @@ vocabulary / decisions. | |||
| 278 | independently of the hostile NPC ESP. | 278 | independently of the hostile NPC ESP. |
| 279 | - Detection is model-first (`models/items/...`, `models/healthvial.mdl`, | 279 | - Detection is model-first (`models/items/...`, `models/healthvial.mdl`, |
| 280 | `models/props_combine/*_charger*.mdl`, `models/w_longjump.mdl`) with class | 280 | `models/props_combine/*_charger*.mdl`, `models/w_longjump.mdl`) with class |
| 281 | fallbacks. Weapon pickups are intentionally not tagged. | 281 | fallbacks. Generic breakable wood/plastic/metal crates are tagged as |
| 282 | "Crate"; crate chunk debris is ignored. Weapon pickups are intentionally | ||
| 283 | not tagged. | ||
| 282 | 284 | ||
| 283 | ## Roadmap / TODO | 285 | ## Roadmap / TODO |
| 284 | 286 | ||
diff --git a/src/esp.cpp b/src/esp.cpp index d10a2cf..0d64c78 100644 --- a/src/esp.cpp +++ b/src/esp.cpp | |||
| @@ -1371,6 +1371,10 @@ static int classify_item(const char *model, const char *cls, char *label, | |||
| 1371 | if (!model && !cls) | 1371 | if (!model && !cls) |
| 1372 | return -1; | 1372 | return -1; |
| 1373 | 1373 | ||
| 1374 | // Breakable prop chunks are debris, not pickups. | ||
| 1375 | if (item_icontains(model, "chunk")) | ||
| 1376 | return -1; | ||
| 1377 | |||
| 1374 | if (item_icontains(model, "healthkit")) { | 1378 | if (item_icontains(model, "healthkit")) { |
| 1375 | snprintf(label, outn, "Medkit"); | 1379 | snprintf(label, outn, "Medkit"); |
| 1376 | return IK_HEALTH; | 1380 | return IK_HEALTH; |
| @@ -1408,6 +1412,11 @@ static int classify_item(const char *model, const char *cls, char *label, | |||
| 1408 | snprintf(label, outn, "Ammo crate"); | 1412 | snprintf(label, outn, "Ammo crate"); |
| 1409 | return IK_AMMO; | 1413 | return IK_AMMO; |
| 1410 | } | 1414 | } |
| 1415 | // Generic breakable crates (wood/plastic/metal) are supply caches too. | ||
| 1416 | if (item_icontains(model, "crate")) { | ||
| 1417 | snprintf(label, outn, "Crate"); | ||
| 1418 | return IK_CRATE; | ||
| 1419 | } | ||
| 1411 | if (item_icontains(model, "w_missile_closed")) { | 1420 | if (item_icontains(model, "w_missile_closed")) { |
| 1412 | snprintf(label, outn, "RPG ammo"); | 1421 | snprintf(label, outn, "RPG ammo"); |
| 1413 | return IK_AMMO; | 1422 | return IK_AMMO; |
| @@ -1447,6 +1456,10 @@ static int classify_item(const char *model, const char *cls, char *label, | |||
| 1447 | snprintf(label, outn, "Ammo"); | 1456 | snprintf(label, outn, "Ammo"); |
| 1448 | return IK_AMMO; | 1457 | return IK_AMMO; |
| 1449 | } | 1458 | } |
| 1459 | if (item_icontains(cls, "crate")) { | ||
| 1460 | snprintf(label, outn, "Crate"); | ||
| 1461 | return IK_CRATE; | ||
| 1462 | } | ||
| 1450 | if (item_icontains(cls, "item") || item_icontains(cls, "pickup")) { | 1463 | if (item_icontains(cls, "item") || item_icontains(cls, "pickup")) { |
| 1451 | snprintf(label, outn, "Item"); | 1464 | snprintf(label, outn, "Item"); |
| 1452 | return IK_OTHER; | 1465 | return IK_OTHER; |
