Enhanced Hostage Behavior 1.0.0 (olds.ro)
=========================================
Makes following hostages less random: they halt at a set distance instead of
pushing you, and when one has not moved for over 2 seconds it is nudged
around what blocks it, hops across small gaps and waits at deep drops or
lava/slime.
Requirements
- AMX Mod X 1.10.0.5490 or newer (fakemeta, hamsandwich)
- Counter-Strike 1.6 hostages (ReGameDLL_CS 5.30.0.814 tested)
Install
1. Compile scripting/olds_hostai.sma and copy olds_hostai.amxx to
addons/amxmodx/plugins/.
2. Copy data/lang/olds_hostai.txt to addons/amxmodx/data/lang/.
Settings (addons/amxmodx/configs/plugins/olds_hostai.cfg, created on first run)
olds_hostai_followdist 80 distance (units) at which a hostage halts
olds_hostai_jumpgap 1 1 = hop across gaps up to 256 units deep
olds_hostai_retarget 0.5 seconds between checks of each hostage (0.1-5)
olds_hostai_enabled 1 set by amx_hostai
How it works
After each hostage think (Ham_Think post on hostage_entity) the hostage is
checked every olds_hostai_retarget seconds. Its leader is the CBaseMonster
m_hTargetEnt the game sets on +use. Line traces (EngFunc_TraceLine) look
48 units ahead towards the leader and down for ground; the nudge is a
short pev_velocity push. Dead hostages are skipped, and nothing is
scheduled, so a hostage killed mid-nudge leaves nothing behind.
The card names a ReAPI RG_CHostage_Think hook; ReAPI has no hostage hook
chain, so the same post-think point is taken with Ham_Think.
Admin (ADMIN_MAP)
amx_hostai 0|1 switch the help off (vanilla at once) or on
amx_hostai show the state and list the hostages
No downloads.