Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 111 additions & 59 deletions addons/sourcemod/gamedata/l4d_consistent_escaperoute.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,70 @@
"Games"
{
"#default"
{
"Functions"
{
"l4d_consistent_escaperoute::TerrorNavMesh::ComputeFlowDistances"
{
"signature" "TerrorNavMesh::ComputeFlowDistances"
"callconv" "thiscall"
"return" "int"
"this" "ignore"
}

// GetPlayerSpawnPosition(SurvivorCharacterType,Vector *,QAngle *,TerrorNavArea **)
"l4d_consistent_escaperoute::GetPlayerSpawnPosition"
{
"signature" "GetPlayerSpawnPosition"
"callconv" "cdecl"
"return" "bool"
"arguments"
{
"SurvivorCharacterType"
{
"type" "int"
}
"Vector *"
{
"type" "vectorptr"
}
"QAngle *"
{
"type" "vectorptr"
}
"TerrorNavArea **"
{
"type" "int"
}
}
}
}
}

"left4dead"
{
"MemPatches"
{
"skip_spawn_position_idx"
{
"signature" "GetPlayerSpawnPosition"
"linux"
{
"offset" "356h"
"verify" "\x8B\x8B\x2A\x2A\x2A\x2A\x8D\x51\x01\x39\xC2\x0F\x8D\x2A\x2A\x2A\x2A\x89\x93\x2A\x2A\x2A\x2A\x01\xD2\x01\xD2"
"patch" "\x31\xD2\xEB\x17" // xor edx, edx
// jmp next
}
"windows"
{
"offset" "1E5h"
"verify" "\xA1\x2A\x2A\x2A\x2A\x83\xC0\x01\x3B\xC5\xA3\x2A\x2A\x2A\x2A\x7C\x07\x33\xC0\xA3\x2A\x2A\x2A\x2A"
"patch" "\x31\xC0\xEB\x14" // xor eax, eax
// jmp next
}
}
}

"Offsets"
{
"CEscapeRoute::m_nMainPathAreaCount"
Expand All @@ -10,99 +73,88 @@
"windows" "7016"
}

"TerrorNavArea::m_flowToGoal"
{
"linux" "348"
"windows" "340"
}

"TerrorNavMesh::m_flMapMaxFlowDistance"
"CNavArea::m_id"
{
"windows" "1444"
"linux" "1444"
"linux" "136"
"windows" "136"
}
}

"Signatures"
{
// Search string "ERROR: BuildEscapeRoute failed. The start or end area was NULL\n"
// "CEscapeRoute::ResetPath", "CEscapeRoute::AddArea" and "CEscapeRoute::FinishPath" can be found there.
"CEscapeRoute::ResetPath"
{
"library" "server"
"linux" "@_ZN12CEscapeRoute9ResetPathEv"
"windows" "\xD9\xEE\x33\xC0\xD9\x99"
/* D9 EE 33 C0 D9 99 */
}

"CEscapeRoute::AddArea"
"TerrorNavMesh::ComputeFlowDistances"
{
"library" "server"
"linux" "@_ZN12CEscapeRoute7AddAreaEP13TerrorNavArea"
"windows" "\x55\x8B\xEC\x83\xE4\xF0\x83\xEC\x28\x56\x8B\xF1\x8B\x86\x2A\x2A\x2A\x2A\x3D"
/* 55 8B EC 83 E4 F0 83 EC 28 56 8B F1 8B 86 ? ? ? ? 3D */
"linux" "@_ZN13TerrorNavMesh20ComputeFlowDistancesEv"
"windows" "\x83\xEC\x3C\x53\x55\x56\x57\x6A\x04\x33\xFF"
/* 83 EC 3C 53 55 56 57 6A 04 33 FF */
}
"CEscapeRoute::FinishPath"

"GetPlayerSpawnPosition"
{
"library" "server"
"linux" "@_ZN12CEscapeRoute10FinishPathEv"
"windows" "\x8B\x81\x2A\x2A\x2A\x2A\x3D\x00\x02\x00\x00\x7C\x2A\x68"
/* 8B 81 ? ? ? ? 3D 00 02 00 00 7C ? 68 */
"linux" "@_Z22GetPlayerSpawnPosition21SurvivorCharacterTypeP6VectorP6QAnglePP13TerrorNavArea"
"windows" "\x83\xEC\x34\x8B\x0D\x2A\x2A\x2A\x2A\x53"
/* 83 EC 34 8B 0D ? ? ? ? 53 */
}
}
}

"left4dead2"
{
"MemPatches"
{
"skip_spawn_position_idx"
{
"signature" "GetPlayerSpawnPosition"
"linux"
{
"offset" "41Ch"
"verify" "\x8B\x0D\x2A\x2A\x2A\x2A\x8D\x51\x01\x39\xC2\x0F\x8D\x2A\x2A\x2A\x2A\x89\x15\x2A\x2A\x2A\x2A\xC1\xE2\x02"
"patch" "\x31\xD2\xEB\x16" // xor edx, edx
// jmp next
}
"windows"
{
"offset" "2A8h"
"verify" "\xA1\x2A\x2A\x2A\x2A\x40\xA3\x2A\x2A\x2A\x2A\x3B\xC3\x7C\x07\x33\xC0\xA3\x2A\x2A\x2A\x2A"
"patch" "\x31\xC0\xEB\x12" // xor eax, eax
// jmp next
}
}
}

"Offsets"
{
"CEscapeRoute::m_nMainPathAreaCount"
{
"linux" "7232"
"windows" "7212"
}
"TerrorNavArea::m_flowToGoal"

"CNavArea::m_id"
{
"linux" "340"
"windows" "332"
}

"TerrorNavMesh::m_flMapMaxFlowDistance"
{
"windows" "1528"
"linux" "1524"
// Compared against inside of the current_flow_distance ccommand.
"linux" "140"
"windows" "140"
}
}

"Signatures"
{
// Search string "ERROR: BuildEscapeRoute failed. No path from start to end. zeroFlowArea = #%d, endArea = #%d.\n"
// "CEscapeRoute::ResetPath", "CEscapeRoute::AddArea" and "CEscapeRoute::FinishPath" can be found there.
"CEscapeRoute::ResetPath"
{
"library" "server"
"linux" "@_ZN12CEscapeRoute9ResetPathEv"
"windows" "\x0F\x57\xC0\x33\xC0\x89\x81\x2A\x2A\x2A\x2A\x89\x81\x2A\x2A\x2A\x2A\xF3\x0F"
/* 0F 57 C0 33 C0 89 81 ? ? ? ? 89 81 ? ? ? ? F3 0F */
}

"CEscapeRoute::AddArea"
"TerrorNavMesh::ComputeFlowDistances"
{
"library" "server"
"linux" "@_ZN12CEscapeRoute7AddAreaEP13TerrorNavArea"
"windows" "\x53\x8B\xDC\x83\xEC\x08\x83\xE4\xF0\x83\xC4\x04\x55\x8B\x6B\x04\x89\x6C\x24\x04\x8B\xEC\x83\xEC\x28\x56\x8B\xF1\x8B\x86\x2A\x2A\x2A\x2A\x57\x3D\x00\x02\x00\x00\x7C"
/* 53 8B DC 83 EC 08 83 E4 F0 83 C4 04 55 8B 6B 04 89 6C 24 04 8B EC 83 EC 28 56 8B F1 8B 86 ? ? ? ? 57 3D 00 02 00 00 7C */
"linux" "@_ZN13TerrorNavMesh20ComputeFlowDistancesEv"
"windows" "\x55\x8B\xEC\x81\xEC\x88\x00\x00\x00\xA1\x2A\x2A\x2A\x2A\x53"
/* 55 8B EC 81 EC 88 00 00 00 A1 ? ? ? ? 53 */
}
"CEscapeRoute::FinishPath"

"GetPlayerSpawnPosition"
{
"library" "server"
"linux" "@_ZN12CEscapeRoute10FinishPathEv"
"windows" "\x8B\x81\x2A\x2A\x2A\x2A\x3D\x00\x02\x00\x00\x7C\x2A\x68"
/* 8B 81 ? ? ? ? 3D 00 02 00 00 7C ? 68 */
"linux" "@_Z22GetPlayerSpawnPosition21SurvivorCharacterTypeP6VectorP6QAnglePP13TerrorNavArea"
"windows" "\x55\x8B\xEC\x83\xEC\x4C\x53\x33\xDB"
/* 55 8B EC 83 EC 4C 53 33 DB */
}
}
}
Expand Down
Loading