View Single Post
GHartmann
Junior Member
Join Date: Feb 2018
Old 02-25-2018 , 12:23   Re: [EXTENSION] Late Downloads
Reply With Quote #15

Quote:
Originally Posted by Backup View Post
You can work around this issue by moving the brackets behind the variable name. If you look at the attached image, you can clearly see the problem.
I was trying to figure out what the problem could be for the longest time, I assumed my code was bugged somehow. Ah well, thanks for the fix!

Another bug:
latedl_minimalbandwidth kicks clients if called within OnClientAuthorized and perhaps other connection stages, I guess since they aren't yet accepting the download.

I modified the extension to add a function to send only to specified clients. Maybe this is a feature that could be added?

The short use case is to cache which players have already downloaded a file to avoid resending.

The longer version is:
The plugin associates a list of files with a server, map, and player, adds those files to a download list for each connected client and has them download it. In order to do this properly, it needs to send files only to specific clients so it can avoid resending to any clients that already have those files.

So for example, a server has:
materials/foo/magic.vtf
sound/foo/neat.wav

The map cp_process_final has:
materials/foo/processthing.vtf

A player has:
materials/foo/superspray.vtf

Another player has:
materials/foo/cooliospray.vtf

It adds all those files to a list and sends them out to all clients that don't already have them. The list changes based on the current map and players in the server.
GHartmann is offline