FWGS / xash3d

DEPRECATED in favor of https://github.com/FWGS/xash3d-fwgs. Only bugfixes are accepted.
https://xash.su
GNU General Public License v3.0
554 stars 107 forks source link

cannot create game server on linux #294

Closed aaptel closed 6 years ago

aaptel commented 6 years ago

Hi,

I've managed to build xash3d (master bcd55ee ) in 32bit under a 64bit Linux system (openSUSE 42.2) but I was getting errors with some system calls. The directory entry written by readdir() assumed large file support (file size >2GB) and so would fail everytime xash3d called it, effectively making listdirectory() silently always return 0 entries. I had to set CFLAGS to

-D_FILE_OFFSET_BITS=64

To work around this. Final build command was:

mkdir build
cd build
cmake -DHL_SDK_DIR=../hlsdk -DXASH_SDL=yes -DXASH_VGUI=yes \
           -DCMAKE_C_FLAGS="-m32 -D_FILE_OFFSET_BITS=64" \
           -DCMAKE_CXX_FLAGS="-m32 -D_FILE_OFFSET_BITS=64" \
           -DCMAKE_EXE_LINKER_FLAGS="-m32" ../
make

and it built properly.

mkdir ~/xash3d
cp engine/libxash.so \
   game_launch/xash3d \
   mainui/libxashmenu.so \
   ../hlsdk/linux/vgui.so \
   vgui_support/libvgui_support.so \
   ../xash3d.sh \
   ~/xash3d

I have installed and run at least once counter-strike on both linux (native steam provided by valve) and windows and so I have a copy of the Half-life valve & cstrike folder for both versions.

I've tried copying them over ~/xash3d

#
# clear, copy linux steam files, and see what dll&so we have
#
cd ~/xash3d
rm -rf valve cstrike && cp -r hl-steam-linux/{valve,cstrike} .
find valve cstrike -iname '*.so*' -or -iname '*.dll*'

Returns this:

valve/cl_dlls/particleman.so
valve/cl_dlls/gameui.so
cstrike/cl_dlls/client.dll
cstrike/cl_dlls/client.so
cstrike/dlls/cs.so
cstrike/dlls/cs_amd64.so
cstrike/dlls/mp.dll

Now if I run the game I have a popup with these errors:

cl_dlls/client.so: cannot open shared object file: No such file or directory
libtier0.so: cannot open shared object file: No such file or directory
client.so: cannot open shared object file: No such file or directory

I can click OK and it continues to load and run. The game opens, I can go in LAN and Create a game but the screen doesnt change when I create the game. Full log:

./xash3d.sh -game cstrike -dev 100

[20:04:14] /home/aaptel/x is working directory now
================================================================================
        Xash3D FWGS (build 910, Linux-i386) started at Sep27 2017 [20:04.14]
================================================================================
[20:04:14] Console initialized
[20:04:14] FS_AddGameDirectory( ./, 0 )
[20:04:14] FS_Init: done
[20:04:14] FS_LoadGameInfo( cstrike )
[20:04:14] FS_Rescan( Counter-Strike )
[20:04:14] 0 cstrike valve
[20:04:14] 1 valve valve
[20:04:14] FS_AddGameDirectory( valve/, 0 )
[20:04:14] Adding wadfile valve/cached.wad (2 files)
...(wad files)...
[20:04:14] Adding wadfile valve/xeno.wad (264 files)
[20:04:14] FS_AddGameDirectory( cstrike/downloaded/, 10 )
[20:04:14] FS_AddGameDirectory( cstrike/, 4 )
[20:04:14] Adding wadfile cstrike/ajawad.wad (1 files)
...(more wad files)...
[20:04:14] Adding wadfile cstrike/tswad.wad (29 files)
[20:04:14] FS_AddGameDirectory( cstrike/custom/, 10 )
[20:04:14] InitDecals: 225 decals
[20:04:14] Joystick: SDL
[20:04:14] No joystick found.
[20:04:14] NET_Init()
[20:04:14] Console initialized.
[20:04:14] couldn't exec video.cfg
[20:04:14] couldn't exec opengl.cfg
[20:04:14] Set: [1920x1080]
[20:04:14] Got closest display mode: 1920x1080@60
[20:04:14] VID_StartupGamma: validate screen gamma - ok
[20:04:14] GL_CheckExtension: OpenGL 1.1.0 - enabled
[20:04:14] Video: Mesa DRI Intel(R) Haswell Desktop x86/MMX/SSE2
[20:04:14] GL_CheckExtension: glDrawRangeElements - enabled
...(GL stuff)...
[20:04:14] GL_Upload: *vsdct s&3 [1 x 1]
[20:04:14] SCR_Init()
[20:04:14] AVI: Not supported
[20:04:14] UI_SetColors: colors.lst not found
[20:04:14] UI_LoadBmpButtons: btns_main.bmp not found
[20:04:14] Using SDL audio driver: pulseaudio @ 44100 Hz
[20:04:14] IN_TouchInit()
[20:04:29] Sys_Warn: Could not load client library:
cl_dlls/client.so: cannot open shared object file: No such file or directory
libtier0.so: cannot open shared object file: No such file or directory
client.so: cannot open shared object file: No such file or directory

[20:04:29] Reading config script file settings.scr
[20:04:29] Reading config script file user.scr
[20:04:29] execing config.cfg
[20:04:29] couldn't exec userconfig.cfg
[20:04:29] execing valve.rc
[20:04:29] execing language.cfg
[20:04:29] couldn't exec joystick.cfg
[20:04:29] execing autoexec.cfg
[20:04:29] execing violence.cfg
[20:04:29] execing config.cfg
[20:04:29] couldn't exec userconfig.cfg
[20:04:29] execing game.cfg
[20:04:29] execing touch.cfg
[20:04:29] FS_OpenStream: couldn't open "media/gamestartup"
[20:04:29] FS_OpenStream: couldn't open "gamestartup"
[20:04:29] Warning: FS_LoadSound: couldn't load "media/launch_upmenu1"
[20:04:29] Set: [1920x1080]
[20:04:29] Got closest display mode: 1920x1080@60

After I create the game I can see in the log the models are loaded and everything but my screen is still in the "create server" menu, where I can navigate but not play!

[20:08:01] Server IP address: (null)
[20:08:02] maps.lst found: basedir
[20:08:06] SV_LoadProgs: initailized Server Blending interface ver. 1
[20:08:06] Dll loaded for mod Counter-Strike
[20:08:06] SV: hull0, player_mins: -16 -16 -36, player_maxs: 16 16 36
[20:08:06] SV: hull1, player_mins: -16 -16 -18, player_maxs: 16 16 18
[20:08:06] SV: hull2, player_mins: 0 0 0, player_maxs: 0 0 0
[20:08:06] Reading config script file user.scr
[20:08:06] Reading config script file settings.scr
[20:08:06] execing listenserver.cfg
[20:08:06] Spawn Server: cs_office
[20:08:06] Mod_LoadModel: maps/cs_office.bsp
[20:08:06] SV_SpawnEntities( cs_office )
[20:08:06] execing game.cfg
[20:08:06] Mod_LoadModel: sprites/voiceicon.spr
[20:08:06] server: GAME SKILL LEVEL:1
[20:08:06] server: Executing listen server config file
[20:08:06] Mod_LoadModel: models/w_kevlar.mdl
....(model loading)....
[20:08:06] Mod_LoadModel: models/fleshgibs.mdl
[20:08:06] SV_LoadFromFile: 0 entities inhibited
[20:08:06] Total 252 entities spawned
[20:08:06] Mod_LoadModel: sprites/muzzleflash.spr
...(more model loading)...
[20:08:06] Mod_LoadModel: sprites/richo1.spr
[20:08:06] 8 player server started
[20:08:06] execing listenserver.cfg
[20:08:06] execing listenserver.cfg

If run click on "create server" again it says one is already running and saying OK will stop that one to create a new. OK again will do what is said, but same result: I'm still in the menu. There is written "Dedicated Server" at the bottom but I see no checkbox or anything that indicates if this option is on or off :/

Any ideas?

a1batross commented 6 years ago

You can't run client library from CS 1.6.

You should build Xash Dedicated Server(Pass -DXASH_DEDICATED=1 to cmake).

aaptel commented 6 years ago

I think I explained myself wrong. I just want to play CS 1.6 on LAN from linux and I'm not able to. This is supposed to be possible right? I'm not interested in a dedicated server, just want to create a LAN game, play and have other xash3d CS players join from my LAN.

Right now when I create a multiplayer game from the menu I never leave the menu.

a1batross commented 6 years ago

I don't support cs16-client on other platforms than mobile. Original client don't work on Xash3D due to undocumented GoldSrc engine features.

So there is no supported way to play locally or through Internet.

28 сент. 2017 г. 10:47 ДП пользователь "aaptel" notifications@github.com написал:

I think I explained myself wrong. I just want to play CS 1.6 on LAN from linux and I'm not able to. This is supposed to be possible right? I'm not interested in a dedicated server, just want to create a LAN game, play and have other xash3d CS players join from my LAN.

Right now when I create a multiplayer game from the menu I never leave the menu.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FWGS/xash3d/issues/294#issuecomment-332756455, or mute the thread https://github.com/notifications/unsubscribe-auth/ADEJgSgdeXZmr6D9ED5xWdfNqjTFtQ4bks5sm08XgaJpZM4PmM1f .

aaptel commented 6 years ago

On Thu, Sep 28, 2017 at 11:03 AM, Alibek Omarov notifications@github.com wrote:

I don't support cs16-client on other platforms than mobile. Original client don't work on Xash3D due to undocumented GoldSrc engine features.

So there is no supported way to play locally or through Internet.

How hard would it be to add support of cs16-client to linux? I think if the android port works it shouldn't be too hard.

a1batross commented 6 years ago

It's not hard. Mostly it even works(on my dev machine). But I'm just not interested in this and even keeping cs16client open source too.