I picked up a copy of Titan Quest + Titan Quest: Immortal Throne on the current Steam weekend deal, only to find that I couldn’t attempt to refresh the games list for internet games without getting a nice exception dialog.
Assertion failed!Program: ...ps\common\titan quest immortal throne\Tqit.exe
Line: 236Expression: theSocket != INVALID_SOCKET
I researched this to find that it seems to be a common issue on Vista SP1, someone had suspected that Titan Quest was creating a raw socket for some reason. That is in fact what it’s doing. Since I am not running the game in administrator mode, the socket creation fails.
Since I don’t really like the idea of running Steam and TQ:IT in administrator mode, I looked for a better fix.
It makes a call to
socket(AF_INET, SOCK_RAW, IPPROTO_ICMP) in Engine.dll. I modified Engine.dll to make it call
socket(AF_INET, SOCK_DGRAM, IPPROTO_TCP) instead. I suspect this breaks the ping display in the game list now, but it appears to run just fine now without any exceptions.
It’s a two byte fix for Engine.dll, assuming the latest version of Engine.dll for TQ:IT on Steam now (md5 of
cf00e85ff32629e4ad7859765722517b), you will want to change offset 0x164A0F to
0x01), and offset