View Single Post
devilesk
Junior Member
Join Date: May 2019
Old 09-27-2020 , 00:47   Re: [L4D & L4D2] Left 4 DHooks Direct (1.23) [27-Sep-2020]
Reply With Quote #182

There's an issue with a few functions like L4D2Direct_GetVSTankToSpawnThisRound because it's trying to look up the values by round rather than by team. For example, if you're trying to look up whether the tank will spawn in the current round by doing L4D2Direct_GetVSTankToSpawnThisRound(GameRule s_GetProp("m_bInSecondHalfOfRound")) you'll be looking up the wrong team's value if it's the first round and teams are flipped or if it's the second round and teams aren't flipped.

This is the fix I came up with for l4d2_direct which takes into account m_bInSecondHalfOfRound and m_bAreTeamsFlipped to convert the given round number argument to the correct team number to use in the lookup. https://github.com/devilesk/rl4d2l-p...95ef6b5b8db47f
devilesk is offline