SirPlease / L4D2-Competitive-Rework

Just refreshing and optimizing the core files a bit, eh?
GNU General Public License v3.0
242 stars 131 forks source link

Incorrect survivor spawn positions on intro maps #229

Closed Derpduck closed 3 years ago

Derpduck commented 3 years ago

Due to the plugin that skips intro cutscenes, survivors positions are never set correctly when the round starts.

https://github.com/SirPlease/L4D2-Competitive-Rework/blob/master/addons/sourcemod/scripting/readyup.sp#L937 This function that warps survivors to saferoom when the round starts will use the navmesh to determine where survivors start. On most maps this is fine, but certain maps like c7m1 the saferoom area is very large and has the potential for survivors to fall into a kill trigger when the round starts.

When a cutscene ends it sets the survivors positions by calling the following output on the info_director entity:

"OnTrigger" "director,ForceSurvivorPositions,,0,-1"

It might be worth trying to fire this output in the ReturnTeamToSaferoom function, should it hopefully return survivors to the correct positions.

The issue on c7m1 might also be caused by the wrong survivors being used, as the positions are defined by the L4D1 survivor names instead of the L4D2 names due to the passifice addon.

SirPlease commented 3 years ago

Fairly certain this is a non-issue, due to Velocity being set to 0.

Derpduck commented 3 years ago

Was that added in after this? https://www.twitch.tv/qeotabro/clip/OilyBlindingPorcupineThisIsSparta

Still, players could also walk off the edge accidently.

SirPlease commented 3 years ago

That's the clip that triggered the fix, yes. ( #155 ) From my brief testing it appears the issue lies within the passifice method we're currently using, so other campaigns are fine from what I can tell.