COD4 Custom maps with shared game directory won't load

J. Miribel admin at nitroserv.com
Sat Jan 26 10:14:19 EST 2008


Hi Elbandi,

Thanks for your help. I reply directly on the list cuz it may help 
someone else around here.

In fact this can't help on my particular case because it won't allow me 
to have more than one server setup using the same base install who will 
be able to load custom maps: the symlink links directly in one 
particular server zone file and the link's target remains the same on 
each server instance..

We definitly need a fix for this (Ryan ?)..

I could symlink all the base install in the user's dir and launch the 
server directly from user's dir, but this solution creates lots of 
troubles in case of a game update.. And hey, thats why we have a 
fs_basepath and fs_homepath no ? ;)

Regards,
Julian


Elbandi a écrit :
> Hi!
>  
> This is a bug:
> Ryan use getcwd() in fopen, when open zone and usermap files.
> Look at the first 2 lines from strace log:
>  
> --[begin]--
> getcwd("/home/games/cod4", 255)         = 17
> open("/home/games/cod4/zone/english/code_post_gfx_mp.ff", O_RDONLY) = 25
> fstat64(25, {st_mode=S_IFREG|0644, st_size=88764, ...}) = 0
> fstat64(25, {st_mode=S_IFREG|0644, st_size=88764, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
> 0) = 0xae1c5000
> read(25, 
> "IWffu100\5\0\0\0x\332\354\275\7 at SI\3277>\271I\350\275\212"..., 
> 262144) = 88764
> read(25, "", 172032)                    = 0
> read(25, "", 262144)                    = 0
> write(2, "Loaded zone \'code_post_gfx_mp\'\n", 31) = 31
> close(25)                               = 0
> getcwd("/home/games/cod4", 255)         = 17
> open("/home/games/cod4/zone/english/localized_code_post_gfx_mp.ff", 
> O_RDONLY) = 25
> ...
> --[end]--
>  
> A workaround: symlink the zone file to userdir, and run cod4 from userdir:
>  
> ln -s /usr/local/games/cod4/zone home/cod401/cod4/zone
> cd home/cod401/cod4
> /usr/local/games/cod4/cod4_lnxded +set fs_homepath /home/cod401/cod4/  
> +set fs_basepath /usr/local/games/cod4/ ...
>  
> Elbandi
>
>     ------------------------------------------------------------------------
>     *From:* J. Miribel [mailto:admin at nitroserv.com]
>     *To:* cod at icculus.org
>     *Sent:* Fri, 25 Jan 2008 14:59:44 +0100
>     *Subject:* COD4 Custom maps with shared game directory won't load
>
>     Hi everyone,
>
>     I am facing a lot of troubles trying to launch custom maps on shared
>     game dir installs:
>
>     Here is my startup line:
>     /usr/local/games/cod4/cod4_lnxded +set fs_homepath /home/cod401/cod4/
>     +set fs_basepath /usr/local/games/cod4/ +set loc_language 1 +set
>     fs_game
>     mods/modwarfare +exec server.cfg
>
>     If I place my usermaps/ dir in /usr/local/games/cod4/ I will be
>     able to
>     launch the custom map with no problem.
>     If I move the usermaps/ folder in the user directory
>     (/home/cod401/cod4/), the server will take the server.cfg in
>     /home/cod401/cod4/mods/modwarfare/ but it won't be able to open the
>     custom map and keeps saying the server must be modded when I try to
>     launch one...
>
>     My usermaps/ tree is fine since it works when placed in the game
>     directory
>
>     Any of you running setups like this and had it to work ? I might be
>     missing something here...
>
>     Best regards
>
>
>  
>  



More information about the Cod mailing list