Raised This Month: $60 Target: $400
 15% 

Precaching Mapfiles with spaces in them


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 06-23-2020 , 12:12   Precaching Mapfiles with spaces in them
Reply With Quote #1

Hey AM,

Just a bug I've been unable to figure out how to fix. I have certain maps on my server that have precache files with spaces in them, and these files do not get downloaded by players, as they're separated by a space delimiter.

For example:
A B C D E.mdl loads A, B, C, D, E.mdl instead of "A B C D E.mdl". The map will successfully load, because the mapped file can open the model, but players can't join because they lack the model file.

I've tried adding %20 delimiter, to allow downloading the file, but yet the file doesn't download. Are there any ways to fix this issue? Thanks for assisting out.

Best regards.
MaNaReaver is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-23-2020 , 20:04   Re: Precaching Mapfiles with spaces in them
Reply With Quote #2

I don't think I've ever seen a map with models that had spaces in their names. Do you have the file(s) properly listed in the maps .res file? Are you using fast download? What does the client console say when it tries to download the map's resources (might need to turn on developer mode to get more console info in the client)?

It sounds like the map needs fixed to use models that don't have spaces in their names. Typically, an underscore is used instead of a space.
__________________
fysiks is offline
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 06-24-2020 , 16:12   Re: Precaching Mapfiles with spaces in them
Reply With Quote #3

There are a few maps that consist of files with spaces in them. The file's not listed in the res file, but it's hardcoded, so it loads anyway.

I have FastDL loaded, and the client console just says: "Error: server failed to transmit file 'models/A' ", and gets stuck at Validating Resources.

Developer mode doesn't give any specific important information. I guess there's nothing that can be done other than asking the mapper to update the map.
MaNaReaver is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-24-2020 , 23:08   Re: Precaching Mapfiles with spaces in them
Reply With Quote #4

When using fast download you need the .res file to list ALL required resources. If the model is a separate file from the .bsp then it's not "hardcoded". If you already have the file locally then it doesn't need to be in the .res file because you don't need to download it. At least this is how I understand it. Even if I'm not exactly correct, it's worth a try.

If you can link to a map (on 17buddies for exampe) that has a model with a space in it, I can give it a try.
__________________

Last edited by fysiks; 06-24-2020 at 23:10.
fysiks is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-27-2020 , 17:17   Re: Precaching Mapfiles with spaces in them
Reply With Quote #5

Quote:
Originally Posted by MaNaReaver
Thanks for assisting me out with this bug. Two maps that have such issues are linked below:

vcn_cbkz_rescue [boat (2).mdl]
kz_kzlv_wanderer [00 - your rain.wav]
I tried the first map you have linked and I was unable to get it to work with the space in the name. The only way I was able to get it to work was to rename the model file by editing the BSP (using BSPEdit) and renaming the file and putting that new filename in the .res file. In my case, I chose "boat__2_.mdl" (I removed the parentheses also just in case and used underscores to make the file the same length, no real reason for keeping it the same length though but you'll want to make sure the new name never conflicts with another model of the same name).
__________________

Last edited by fysiks; 06-27-2020 at 17:17.
fysiks is offline
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 06-28-2020 , 22:40   Re: Precaching Mapfiles with spaces in them
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
I tried the first map you have linked and I was unable to get it to work with the space in the name. The only way I was able to get it to work was to rename the model file by editing the BSP (using BSPEdit) and renaming the file and putting that new filename in the .res file. In my case, I chose "boat__2_.mdl" (I removed the parentheses also just in case and used underscores to make the file the same length, no real reason for keeping it the same length though but you'll want to make sure the new name never conflicts with another model of the same name).
Thank's a lot fysiks, I was able to get the maps running!
MaNaReaver 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 19:08.


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