Tags: pongo1231/rcbot2
Tags
bot_navmesh: m_isBlocked team check, avoidance obstacle penalty, clas… …s-aware JUMP cost, AVOID penalty, shortcut obstacle check, frustration memory
bot_navmesh: m_isBlocked team check, avoidance obstacle penalty, clas… …s-aware JUMP cost, AVOID penalty, shortcut obstacle check, frustration memory
advanced-obstacle-avoidance: extend steering sweep to ±150°, backward… … trace, both-blocked corner avoidance, 80u feelers, corner pivot scan
escape scan: randomize tie-breaking when all directions have equal cl… …earance
sentry: per-bot approach diversity, coordinated push, true flanking 3 features for more human-like sentry engagement: - Per-bot lateral offset (100-250u): even-index bots go right, odd go left. Uses flank axis when available, vertical approach spread otherwise. No two bots cluster at the identical approach point. - Coordinated push via teammate sensing: first bot to arrive at safety distance (>600u from sentry) counts other bots already committed to SCHED_ATTACK_SENTRY_GUN. If a teammate is already on the sentry, this bot waits (stopMoving, 8s timeout) until the other bot arrives in position. When two+ bots are ready, both release simultaneously with a "Go go go!" voice command. - True flanking via sentry-facing-perpendicular waypoint search: the sentry's current targeting enemy (getSentryEnemy) determines its facing direction. Waypoints with high perpendicular offset (>200u) from this axis and within 300-1500u of sentry are scored by (perpDist - 0.2*dist). Spy requires hidden flank (visibility table); soldier/demo/scout can flank openly. Flank is suppressed if corner-peek is available (shorter, also hidden).
hot-reload support: memory patch save/restore, clean Unload ordering
(1) CDisableCurrencyPackBotCheckPatch — save 4 original bytes in constructor,
make patchMyTouch idempotent, add restore().
(2) CPartnerTauntBotCheckPatch — save 33 original bytes in constructor,
make patchMyTouch idempotent, add restore().
(3) CMvMRobotSapBotCheckPatch — save 6 original bytes at m_func+17,
make patchMyTouch idempotent, add restore().
(4) Unload() reorder:
1. signal(SIGSEGV/ABRT, SIG_DFL) — cleanup crash handler
2. SH_REMOVE_HOOK_MEMFUNC — detach engine hooks
3. freeAllMemory — delete bot state
4. ConVar_Unregister — prevent re-registration collision
5. Restore all 4 memory patches (AFTER hooks removed)
6. delete all global patch objects
With this change, RCBot2 can be cleanly unloaded and re-loaded
during runtime (hot-reloaded) without leaving modified game memory
or stale signal handlers that crash on the next load.
3 files, 100 insertions, 17 deletions.
spy detection: cloaked body-block, on-fire silhouette, instant spy-ch…
…eck, 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.
PreviousNext