AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   Precaching Mapfiles with spaces in them (https://forums.alliedmods.net/showthread.php?t=325473)

MaNaReaver 06-23-2020 12:12

Precaching Mapfiles with spaces in them
 
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.

fysiks 06-23-2020 20:04

Re: Precaching Mapfiles with spaces in them
 
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.

MaNaReaver 06-24-2020 16:12

Re: Precaching Mapfiles with spaces in them
 
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.

fysiks 06-24-2020 23:08

Re: Precaching Mapfiles with spaces in them
 
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.

fysiks 06-27-2020 17:17

Re: Precaching Mapfiles with spaces in them
 
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).

MaNaReaver 06-28-2020 22:40

Re: Precaching Mapfiles with spaces in them
 
Quote:

Originally Posted by fysiks (Post 2707590)
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! :D


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

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