rikka0w0 / l4d2_mission_manager

Mission manager for L4D2, provide information about map orders for other plugins
35 stars 12 forks source link

Alternitive map changing method. #7

Closed LuxLuma closed 5 years ago

LuxLuma commented 5 years ago

Hey, since my last pull request regarding HSCRIPT https://github.com/rikka0w0/l4d2_mission_manager/pull/5

I made some improvments since HSCRIPT was not everything there was other places which still was not cleaned up this frees more vscript related issues with force mapchanging.

Instead we call the voting function to from survival which is vote map CDirector::OnChangeChapterVote()

This can be called from an easy native for mission manager L4D2_ChangeLevel(const char[] sMapName) This functions near identical to ForceChangeLevel() function, and map. Only difference is server waits for everyone to fully load before starting map, and into sequences play.

As for gamemode i'v tested in alot of them from but not all.

This has running server for long strech without restarts run much better compaired to HSCRIPT only shutting down, however there are still other problems else where regarding degraded server performance(atlest for linux don't run windows server) still steps forward!

Tested for around 6months these changes please check incase i'v still made mistakes.

Thanks for great plugin!

rikka0w0 commented 5 years ago

Hi Lux,

Thanks for your effort and contribution! I found two problems:

  1. What is the difference between sm_changelevel and sm_changelevelex? You can use ReplyToCommand instead of treating server and clients separately.
  2. Seems that you put .inc and .sp files into the gamedata folder?

Other than that, everything looks fantastic!

Did you have a look at my new voting system?

Rikka0w0

LuxLuma commented 5 years ago

Hello rikka,

Thanks glad you like it!

There was no need for 2 different commands for changing level, i'm unsure why I even do that thanks for pointing that out!

And for unused files in gamedata 🤦‍♂ must of sneaked in, in early commits sorry.

Voting yes checked it out briefly on my local test server, it's works like a charm in my gamemodes testing,

For now i'v not fully migrated to using your mapchanger I still need to make changes for my needs, e.g. map cooldowns and support for hybrid finalies Pitch Dark Mesa this will likely have to be a manual filter.

rikka0w0 commented 5 years ago

Hi Lux,

I'm going to merge your contribution to the repo!

For the manual filter, I noticed that some addon campaigns need to be treated differently, like the tanks challenge maps. I dont have a better solution for this (at least for now). Do you want to upload your manual filter implementation as well (As a separate pull request)?

Rikka0w0

LuxLuma commented 5 years ago

Hello Rikka,

No problem i'm happy you like it :)

As for the filter yes that will have to be a separate pull i'v not made it, I still need to study your code more to see where to make proper changes the code quite confusing to me and it's not high priority.

Edit: I made a post once you merge i'm post pointer to your repo. https://forums.alliedmods.net/showthread.php?t=319156