AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   [EXTENSION] Nav File Download Blocker (Linux fixed) (https://forums.alliedmods.net/showthread.php?t=192615)

Russianeer 08-12-2012 04:38

[EXTENSION] Nav File Download Blocker (Linux fixed)
 
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.

Chrisber 08-12-2012 05:25

Re: [EXTENSION] [TF2] Nav File Download Blocker
 
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.

Bacardi 08-12-2012 05:30

Re: [EXTENSION] [TF2] Nav File Download Blocker
 
Quote:

Originally Posted by Chrisber (Post 1769768)
Does this work for other mods, too?

I'm asking same :)

Russianeer 08-12-2012 06:11

Re: [EXTENSION] [TF2] Nav File Download Blocker
 
Quote:

Originally Posted by Chrisber (Post 1769768)
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 (Post 1769772)
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.

Bacardi 08-12-2012 06:25

Re: [EXTENSION] [TF2] Nav File Download Blocker
 
Quote:

Originally Posted by Russianeer (Post 1769784)
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

Russianeer 08-12-2012 06:29

Re: [EXTENSION] [TF2] Nav File Download Blocker
 
Quote:

Originally Posted by Bacardi (Post 1769790)
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.

Bacardi 08-12-2012 07:06

Re: [EXTENSION] Nav File Download Blocker
 
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

Mitchell 08-12-2012 11:29

Re: [EXTENSION] Nav File Download Blocker
 
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

API 08-12-2012 14:54

Re: [EXTENSION] Nav File Download Blocker
 
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.

Russianeer 08-12-2012 15:34

Re: [EXTENSION] Nav File Download Blocker
 
Quote:

Originally Posted by pimpinjuice (Post 1770004)
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 (Post 1769800)
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.


All times are GMT -4. The time now is 05:23.

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