[L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
1 Attachment(s)
Hi, This plugin fixes level changing from degrading server performance with a native to use in your map changing plugins
This plugin does near nothing on it's own it's for dev's to include in their mission managers. However there is a command "sm_changelevel" This requires Admin_Root or from server console function same as sm_map. Tech stuff
Spoiler
Native PHP Code:
Thanks: SirPlease for testing. Silvers throwing ideas. A1m` testing and reporting issue. Maybe this method will get merged into sourcemod for l4d2 only? Installation:
|
Re: [L4D2] Proper Changelevel
Hello, using this method solves the problem of CPU increase over time? Or is it focused on something else?
Sorry if the question seems to be very obvious but I was testing it and I can't understand :( |
Re: [L4D2] Proper Changelevel
Oh hey, you finally released it here. Nice! :D
|
Re: [L4D2] Proper Changelevel
Quote:
Quote:
|
Re: [L4D2] Proper Changelevel
Unzip failed.
|
Re: [L4D2] Proper Changelevel
Quote:
|
Re: [L4D2] Proper Changelevel
ok.
tks~ |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [1/11/2019]
Update 1.2.0
Included resetting scores for gamemodes that require it, that persist across levelchanges. thanks A1m` https://github.com/LuxLuma/Left-4-fi...8163eddf4dd8fd |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [1/11/2019]
One issue i have with plugin that it doesnt reset the survivors when it changes map like normal changelevel does. Like, if i was playing Passing Francis, then load into new map, im still Francis instead of the being one of the l4d2 survivors...
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [1/11/2019]
That's normal, game saves and restores your character when using game's voting functions.
Since no one really uses voting stuff on modded servers was never noticed. If you vote for start new campaign will have same effect as using my plugin since both voting function have similar code paths, other than campaign accepts the "name" from the mission file and my plugin accepts bsp names. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [1/11/2019]
very long card change
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
update 1.2.1
Added optional arg to changelevel native for score reset, requested by sir This change to the native is backcompat so already compiled binaries will function as default clearing scores on change. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
hi, Lux!
Your previous github samples contains "scripted_mode_shutdown" code when "CDirector::OnChangeChapterVote" fail. Code:
if (!L4D2_ChangeLevel(sMap)) |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Nope, that's only in the mission manager fork incase someone don't install the alt level changing method.
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Is there some significant difference between shutdown scripts method and "CDirector::OnChangeChapterVote" ?
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Yes that's why this plugin exists, don't really remember fully think MapScript something like that and does nothing to global table.
Why are you interested in the old ShutDownScriptedMode();? |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
I think adding to my MapChanger, so I instering in most simple method.
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Also, I curious about this part:
Quote:
In such case, can I guess the problem can persists in L4D1, maybe some identification markers can prove that? -- P.S. On my other addons server, it's often I faced with problem when I can't change map using ForceChangeLevel(). I see loading window of the next campaign, and after loading finishes, I see not map of this campaign but the map of other compaign set by default on server. So, I also curious, is there better method, maybe "CDirector::OnChangeChapterVote" or I should try ServerCommand("changelevel %s", sMap), dunno is ForceChangeLevel() just an alias to changelevel... maybe you know. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
not really sure about l4d1, it has no vscript engine why ShutDownScriptedMode() is pointless, it's still kinda pointless in l4d2 since it don't do everything the alt method of changing level does.
You can try calling that "CDirector::OnChangeChapterVote()"in l4d1 see if it fixes the issue. And ServerCommand("changelevel %s", sMap) is just the same as ForceChangeLevel() calls changelevel cmd, like every other level changing method including mine, it is called one way or another. As for the other issues with the game, the talker system leaks, filling up some table or something with lots of concepts i think, after a while it can take whole game frames to process a response, this is persistent across levels i have unable to understand how to fix the problem. EDIT: This is why alot of l4d actions don't happen when forcing a map change without voting, e.g. intro sequence don't play these seem to be legacy cmds from counter strike maybe |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Thank you for explanation. I will try.
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Just share my experiments in L4D1.
Using Quote:
Also, in rare cases I found all clients spawned in the wrong location (usually, blocked under the map). So, I refused that idea. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Using the custom changelevel command of late causes my server to respawn all survivors dead on map reset/fail (or just spawn nick/bill or some other strange variant, but all players spawn dead permanently with no way to spawn in) for some reason.
Is this plugin still being managed past the TLS update and such? It was useful for avoiding some of the inherent L4D2 bugs on mapchange but this seems to be a pretty severe issue when using it. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
Your post about your problems in the link below could be related so i'v no idea https://forums.alliedmods.net/showthread.php?t=329838 This plugin still functions as it should post TLS if it did not then it will just crash or ingame voting system would have the same problem you discribe. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Xada, I'm using it integrated in my MapChanger plugin, and constantly on my L4D2 server.
No issues since TLS, especially as one you described. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
After all survivors wipe out, and server prepares to restart the round, no any survivor bots respawn, they are just dead :(, we have to restart map or change map I don't think it is "Proper Changelevel's" problem, I can surely say it is fu?king the last stand team problem, they messed up something. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Not sure if this is related, but I have also found that since the TLS update, I'm having intermittent problems with changing level. Sometimes random players, myself included, will get "stuck" during the change level and will never finish loading...have to disconnect and reconnect. This never happened before TLS, and I can't figure out what the cause is. However, one thing I noticed that is different... before when changing levels the players would spawn in frozen until the cut scene (which you cannot see) is finished, then the players can move again normally. Since TLS, it seems to hold the loading screen until everyone spawns/preloads, then shows everyone the full cut scene. I wonder if Silvers plugin "First Map - Skip Intro Cutscenes" would help (or hurt). If it makes a difference, I have "sv_forcepreload 1" set on the server, and using "Improved ACS" with the included "Proper Changelevel" plugin.
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
Loading screen holds at 100% for ~ 20 seconds (or more). When I finally spawn, I see that half of players displayed with a message: "Player XX becomes idle" and they got disconnected soon. Dunno about the reason. Maybe something related to download tables. However, that never happens when non-finale map changes. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
I think you might be right about it only happening after the finale when loading a new campaign, but in my case, it hangs indefinitely and never loads for anyone until the person who is stuck disconnects, then everyone finishes loading normally. I can't remember if Improved ACS requires Proper Changelevel. If not, I will experiment with disabling Proper Changelevel and see if the problem goes away or persists. UPDATE: I disabled Proper Changelevel (l4d2_changelevel) and still had the same problem (map does not finish loading for anyone until "stuck" player disconnects. Whatever the cause, it does not appear to be related to Proper Changelevel. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Double-checked.
Calling CDirector::OnChangeChapterVote causes all dead on round start bug. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Obviously, some clearing code doesn't execute.
Maybe, native votes could be an alternative, need to find which function they call on vote finish... Also, I'm curious, what was your method of checking those vscript leaks, when you ensured CDirector::OnChangeChapterVote is a clear way. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
script cmd to run useless stuff memory keeps going up, run map cmd change to new level memory still full, ran a vote to change level and memory went down to avg usual usage. There is more to this like script hooks and call to nothing leading to high spikes as they pile up over time iirc but those are dependent if you run vscripts alongside also, but was so long ago I don't remember much, however i'm not sure if this is still an issue since TLS update may have been fixed but I just use this anyway since I don't really wanna input more time. |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Hello, is there any method to reset/manipulate "m_bAreTeamsFlipped" gamerule state.
Plugin works fine but if you change the map in the second half of round in versus, "m_bAreTeamsFlipped" state will be the same. GameRules_SetProp("m_bAreTeamsFlipped", 0 or 1, 4) sets it only for one frame then it resets back to original value. update: nvm, found the way to play around with "CDirector::SwapTeams". |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
hi Lux, i seem to have a problem while using this plugin (i am not 100% sure it is caused by this). since using this plugin, sometimes on map change while loading the new map, the server will freeze and eventually you will be timed out. the server wont crash but it will freeze and you cannot see it on server browser anymore. since removing this plugin I have not experienced this freeze anymore, there are no error logs from this plugin but just a headsup.
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Hello, is there any way to keep the fix, but without having to wait for everyone to connect to actually start the map? Some people have a very slow pc and it takes a long time.
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
|
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
So the question is: if we replace the script with logic_script, or by using this plugin Script Command Swap - Mem Leak Fix would avoid memory leaking issue on a global scale (instead on just map changes)? Am not sure if people here are aware of that plugin |
Re: [L4D2] Proper Changelevel [Left 4 Fix] [17/11/2019]
Quote:
|
| All times are GMT -4. The time now is 22:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.