Commit 0c8dc37
committed
spy detection: cloaked body-block, on-fire silhouette, instant spy-check, area suspicion, death decay
(1) Invisible spy melee check: when bot is stuck (m_fStuckTime>0) with
no visible enemy, swing melee every 1s to decloak invisible C&D
spies body-blocking doorways. Previously, cloaked spies were
completely invisible to stuck detection (isVisible() gate).
(2) On-fire disguised spy: remove teammate-attack prerequisite from
the flame-silhouette detection branch. A disguised spy on fire is
now detected purely by their visible fire effect, matching human
players who see the flame silhouette and immediately know it's a spy.
(3) Instant spy-check: set m_fLastSeeSpyTime to (now - 5s) in foundSpy()
giving a 5s head start to the search radius. The fPossibleDistance
calculation starts with a meaningful baseline instead of zero,
enabling spy-check tasks to fire immediately when a spy is KNOWN.
(4) Area suspicion: m_fSpyAreaSuspicion timer (5-10s) set when a spy
is discovered. Adds +800u to the spy-check search radius. Also
spreads via TF_VC_SPY voice command (3-6s timer). Nearby bots
enter heightened alert state after hearing a spy callout.
(5) Death awareness decay: on death, all spy awareness decays one level
(KNOWN->SUSPECTED, SUSPECTED->NONE). Combined with m_pPrevSpy
already being cleared for spy-killers, this gives spies a genuine
advantage from eliminating their spotters — the respawned bot has
reduced certainty about who was a spy.
New members: m_fInvisSpyCheckTime, m_fSpyAreaSuspicion (CBotFortress).
3 files, 48 insertions, 3 deletions.1 parent fb5dd76 commit 0c8dc37
2 files changed
Lines changed: 47 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
1968 | 1969 | | |
1969 | 1970 | | |
1970 | 1971 | | |
1971 | | - | |
| 1972 | + | |
1972 | 1973 | | |
1973 | 1974 | | |
1974 | 1975 | | |
| |||
1980 | 1981 | | |
1981 | 1982 | | |
1982 | 1983 | | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
1983 | 1987 | | |
1984 | 1988 | | |
1985 | 1989 | | |
| |||
2121 | 2125 | | |
2122 | 2126 | | |
2123 | 2127 | | |
| 2128 | + | |
| 2129 | + | |
2124 | 2130 | | |
2125 | 2131 | | |
2126 | 2132 | | |
| |||
2775 | 2781 | | |
2776 | 2782 | | |
2777 | 2783 | | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
2778 | 2793 | | |
2779 | 2794 | | |
2780 | 2795 | | |
| |||
5234 | 5249 | | |
5235 | 5250 | | |
5236 | 5251 | | |
| 5252 | + | |
| 5253 | + | |
| 5254 | + | |
| 5255 | + | |
5237 | 5256 | | |
5238 | 5257 | | |
5239 | 5258 | | |
| |||
6719 | 6738 | | |
6720 | 6739 | | |
6721 | 6740 | | |
| 6741 | + | |
6722 | 6742 | | |
| 6743 | + | |
| 6744 | + | |
| 6745 | + | |
| 6746 | + | |
| 6747 | + | |
| 6748 | + | |
| 6749 | + | |
| 6750 | + | |
| 6751 | + | |
| 6752 | + | |
| 6753 | + | |
| 6754 | + | |
| 6755 | + | |
| 6756 | + | |
| 6757 | + | |
| 6758 | + | |
| 6759 | + | |
6723 | 6760 | | |
6724 | 6761 | | |
6725 | 6762 | | |
| |||
14034 | 14071 | | |
14035 | 14072 | | |
14036 | 14073 | | |
14037 | | - | |
14038 | | - | |
| 14074 | + | |
| 14075 | + | |
14039 | 14076 | | |
14040 | 14077 | | |
14041 | 14078 | | |
| |||
14486 | 14523 | | |
14487 | 14524 | | |
14488 | 14525 | | |
| 14526 | + | |
| 14527 | + | |
14489 | 14528 | | |
14490 | 14529 | | |
14491 | 14530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
915 | 920 | | |
916 | 921 | | |
917 | 922 | | |
| |||
0 commit comments