Raised This Month: $12 Target: $400
 3% 

[EXTENSION] Nav File Download Blocker (Linux fixed)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Russianeer
SourceMod Donor
Join Date: Feb 2011
Old 08-12-2012 , 04:38   [EXTENSION] Nav File Download Blocker (Linux fixed)
Reply With Quote #1

Navigation File Download Blocker

Download | Source

This extension was made in order to remove bot navigation files (Example: "ctf_2fort.nav") from the download list of connecting clients. By default, all clients download the ".nav" files unless they already have the file for a particular map.

Current Version: 1.1

Changelog:
1.1 - Changed the .nav extension checking method. Updated windows gamedata.
1.0 - Initial release.

Last edited by Russianeer; 06-18-2013 at 20:54. Reason: version 1.1
Russianeer is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 08-12-2012 , 05:25   Re: [EXTENSION] [TF2] Nav File Download Blocker
Reply With Quote #2

Does this work for other mods, too?

Edit: Wouldn't it be better to do:
Code:
size_t len = strlen(file);

if (len > 3 && stricmp(file + len - 4, ".nav") == 0)
So it wouldn't match if the .nav is in the middle of the path.

Last edited by Chrisber; 08-12-2012 at 05:29.
Chrisber is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-12-2012 , 05:30   Re: [EXTENSION] [TF2] Nav File Download Blocker
Reply With Quote #3

Quote:
Originally Posted by Chrisber View Post
Does this work for other mods, too?
I'm asking same
Bacardi is offline
Russianeer
SourceMod Donor
Join Date: Feb 2011
Old 08-12-2012 , 06:11   Re: [EXTENSION] [TF2] Nav File Download Blocker
Reply With Quote #4

Quote:
Originally Posted by Chrisber View Post
Edit: Wouldn't it be better to do:
Code:
size_t len = strlen(file);

if (len > 3 && stricmp(file + len - 4, ".nav") == 0)
So it wouldn't match if the .nav is in the middle of the path.
Why would it ever be in the middle of the path? It's not like you can have periods in the directory names. I mean, you can even look at the decompiled code of that function, and valve uses the same method.

Quote:
Originally Posted by Bacardi View Post
I'm asking same
I didn't know this was necessary for other mods. What other mods would require this extension? I could add support.

Last edited by Russianeer; 08-12-2012 at 06:30.
Russianeer is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-12-2012 , 06:25   Re: [EXTENSION] [TF2] Nav File Download Blocker
Reply With Quote #5

Quote:
Originally Posted by Russianeer View Post
I didn't know this was necessary for other mods. What other mods would require this extension? I could add support.

Edit: I'll add support for CS:S tomorrow.
I have tried request this kind feature some time ago
[Cs:s] Remove *.nav from download list ??

But it's not necessary for me anymore, but for others ofcource
__________________
Do not Private Message @me
Bacardi is offline
Russianeer
SourceMod Donor
Join Date: Feb 2011
Old 08-12-2012 , 06:29   Re: [EXTENSION] [TF2] Nav File Download Blocker
Reply With Quote #6

Quote:
Originally Posted by Bacardi View Post
I have tried request this kind feature some time ago
[Cs:s] Remove *.nav from download list ??

But it's not necessary for me anymore, but for others ofcource
Yeah, it will work for CS:S then.

Last edited by Russianeer; 08-12-2012 at 06:33.
Russianeer is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-12-2012 , 07:06   Re: [EXTENSION] Nav File Download Blocker
Reply With Quote #7

Aaw.. I tested in cs:s moment ago and it not block me download nav file.
I tested with and without using sv_downloadurl

OS windows
__________________
Do not Private Message @me

Last edited by Bacardi; 08-12-2012 at 07:06.
Bacardi is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-12-2012 , 11:29   Re: [EXTENSION] Nav File Download Blocker
Reply With Quote #8

THis is awesome i cant wait to try it out, ive been looking for this, since it saves a bit of time to just nav_generate and plop it onto the server, with out the clients worrying to about having to down load it xD
Mitchell is offline
API
Veteran Member
Join Date: May 2006
Old 08-12-2012 , 14:54   Re: [EXTENSION] Nav File Download Blocker
Reply With Quote #9

Chrisber is correct. You can put many extensions in a file, so you should check that the extension resides at the end of the string.

The decompiled code would show stricmp and check that the index is on the end of the string.
__________________
API is offline
Send a message via AIM to API
Russianeer
SourceMod Donor
Join Date: Feb 2011
Old 08-12-2012 , 15:34   Re: [EXTENSION] Nav File Download Blocker
Reply With Quote #10

Quote:
Originally Posted by pimpinjuice View Post
Chrisber is correct. You can put many extensions in a file, so you should check that the extension resides at the end of the string.
Ah, you're right. I'll fix it.

Quote:
Originally Posted by Bacardi View Post
Aaw.. I tested in cs:s moment ago and it not block me download nav file.
I tested with and without using sv_downloadurl

OS windows
Hmm, I'll test it and see what's up.

Last edited by Russianeer; 08-12-2012 at 15:35.
Russianeer is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode