RSSy MYGO.pl Opublikowano Listopad 12, 2022 o 11:46 RSSy Udostępnij Opublikowano Listopad 12, 2022 o 11:46 About:Fixes plugins fighting over the "m_flLaggedMovementValue" netprop value. Multiple plugins can now use this plugin to retrieve the value to set, whilst considering other plugins that may set the speed. Server owners have the option to combine the speed from plugins setting player speed, or average the speed set by them. Plugins using this:[L4D & L4D2] Weapons Movement Speed by "Silvers" [L4D & L4D2] Indomitable Survivor Bot by "NoroHime" Natives and Information for developers: Spoiler Suggest viewing "Weapons Movement Speed" plugin for an implementation example on making this plugin optional. Highly suggest searching for "Fix movement speed bug when jumping or staggering" in "Weapons Movement Speed" and adding this section to fix issues when jumping and speed value is set. PHP Code: /** * @brief Given the requested value, returns the required value to set considering all plugins wanting to set the m_flLaggedMovementValue value. * @remarks The last plugin requesting this value in the same frame will be the one writing the value. * @remarks Typically plugins set the m_flLaggedMovementValue in a PreThinkPost function. * * @notes Highly suggest viewing "Weapons Movement Speed" plugin by "Silvers" and adding the "Fix movement speed bug when jumping or staggering" code * @notes from that plugin to your plugins PreThinkPost function before setting the m_flLaggedMovementValue value. This fixes bugs with the m_flLaggedMovementValue * @Notes causing player to jump faster or slower when the value is changed from 1.0. * * @Notes View the "Weapons Movement Speed" plugin source to make this plugin optionally used if detected. * @Notes Example code usage: SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", L4D_LaggedMovement(client, 2.0)); * * @param client Client index of the person we're changing the speed value on * @param value The speed we want to set on this player * @param forced If forcing the value it will override all other plugins setting the value * * @return The speed value we need to set */ native float L4D_LaggedMovement(int client, float value, bool forced = false); CVars: Saved to l4d_lagged_movement.cfg in your servers \cfg\sourcemod\ folder. PHP Code: // When plugins compete to set a players speed value should the final value be: 1=Average of both. 2=Combined value added from both. l4d_lagged_movement_type "1" // Lagged Movement - Plugin Conflict Resolver plugin version. l4d_lagged_movement_version Changes: Code: 1.0 (12-Nov-2022) - Initial release. Installation:Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder. Attached Files Get Plugin or Get Source (l4d_lagged_movement.sp - 5.8 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi