Giter Club home page Giter Club logo

iortcw's Introduction

iortcw logo

iortcw

The intent of this project is to provide a baseline RTCW which may be used for further development and fun. Some of the major features currently implemented are:

  • SDL backend
  • OpenAL sound API support (multiple speaker support and better sound quality)
  • Full x86_64 support
  • VoIP support, both in-game and external support through Mumble.
  • MinGW compilation support on Windows and cross compilation support on Linux
  • AVI video capture of demos
  • Much improved console autocompletion
  • Persistent console history
  • Colorized terminal output
  • Optional Ogg Vorbis support
  • Much improved QVM tools
  • Support for various esoteric operating systems
  • cl_guid support
  • HTTP/FTP download redirection (using cURL)
  • Multiuser support on Windows systems (user specific game data is stored in "My Documents\RTCW")
  • PNG support
  • Many, many bug fixes

The map editor and associated compiling tools are not included. We suggest you use a modern copy from http://icculus.org/gtkradiant/.

The original id software readme that accompanied the RTCW source release is named README.txt and is contained within the source tree of both MP and SP games.

Quick Start Guide

  1. If you have not already done so, install Return to Castle Wolfenstein and remember the target installation directory.
  2. Browse to the iortcw project release folder: https://github.com/iortcw/iortcw/releases.
  3. Download the latest release file for your operating system, as well as patch-data-141.zip. As of this writing, the latest version of the iortcw release file is v1.51c.
  4. Extract the latest release zip into a location where you would like to have your installation going forward (For example: c:\Games\iortcw\ in Windows or /home/joe/Games/iortcw/ in Linux).
  5. Go to the location of your original existing installation, open the “Main” folder, and copy the following files over to your iortcw's “Main” folder for the single player campaign: pak0.pk3, sp_pak1.pk3, sp_pak2.pk3, and sp_pak3.pk3. For multiplayer, copy the following files to your iortcw's “Main” folder: mp_bin.pk3, mp_pak0.pk3, mp_pak1.pk3, mp_pak2.pk3, mp_pak3.pk3, mp_pak4.pk3, mp_pak5.pk3, mp_pakmaps0.pk3, mp_pakmaps1.pk3, mp_pakmaps2.pk3, mp_pakmaps3.pk3, mp_pakmaps4.pk3, mp_pakmaps5.pk3, and mp_pakmaps6.pk3.
  6. Extract the contents of patch-data-141.zip (or a newer version in the meantime) into your iortcw folder and merge patch-data-141's content into your iortcw folder. For German, Spanish, French or Italian language support in-game, also extract the contents of one of the respective "patch-data-SP-language" zip files into your iortcw's "Main" folder.
  7. Go to your iortcw installation folder and start either the “iowolfsp*” file for single player or “iowolfmp*” for multiplayer. If your system uses a 64-bit processor, run the single player or multiplayer file that ends with x64.

Compilation and installation

For *nix
  1. Change to the directory containing this readme.
  2. Run 'make'.
For Windows,
  1. Please refer to the HOWTO-Build.txt file contained within this repository.
For Mac OS X, building a Universal Binary
  1. Install MacOSX SDK packages from XCode. For maximum compatibility, use XCode 3.2.6 on 10.6 Snow Leopard with MacOSX10.5sdk.
  2. Change to the directory containing the game source you wish to build.
  3. Run './make-macosx-ub.sh'
  4. Copy the resulting iowolfmp.app or iowolfsp.app in /build/release-darwin-ub to your /Applications/iortcw folder.
Installation, for *nix
  1. Set the COPYDIR variable in the shell to be where you installed RTCW to. By default it will be /usr/local/games/wolf if you haven't set it. This is the path as used by the original Linux RTCW installer and subsequent point releases.
  2. Run 'make copyfiles'.

It is also possible to cross compile for Windows under *nix and Cygwin using MinGW. Your distribution may have mingw32 packages available. You will need to install 'mingw-w64'.

Thereafter, cross compiling is simply a case running:

'PLATFORM=mingw32 ARCH=x86 make' in place of 'make'.

(ARCH may also be set to x86_64.)

The following variables may be set, either on the command line or in Makefile.local:

  • CFLAGS - use this for custom CFLAGS
  • V - set to show cc command line when building
  • DEFAULT_BASEDIR - extra path to search for main and such
  • BUILD_SERVER - build the 'iowolfded' server binary
  • BUILD_CLIENT - build the 'iowolfmp' or 'iowolfsp' client binary
  • BUILD_BASEGAME - build the 'main' binaries
  • BUILD_GAME_SO - build the game shared libraries
  • BUILD_GAME_QVM - build the game qvms
  • BUILD_STANDALONE - build binaries suited for stand-alone games
  • SERVERBIN - rename 'iowolfded' server binary
  • CLIENTBIN - rename 'iowolfmp' or 'iowolfsp' client binary
  • USE_RENDERER_DLOPEN - build and use the renderer in a library
  • USE_YACC - use yacc to update code/tools/lcc/lburg/gram.c
  • BASEGAME - rename 'main'
  • BASEGAME_CFLAGS - custom CFLAGS for basegame
  • USE_OPENAL - use OpenAL where available
  • USE_OPENAL_DLOPEN - link with OpenAL at runtime
  • USE_CURL - use libcurl for http/ftp download support
  • USE_CURL_DLOPEN - link with libcurl at runtime
  • USE_CODEC_VORBIS - enable Ogg Vorbis support
  • USE_CODEC_OPUS - enable Ogg Opus support
  • USE_MUMBLE - enable Mumble support
  • USE_VOIP - enable built-in VoIP support
  • USE_INTERNAL_LIBS - build internal libraries instead of dynamically linking against system libraries; this just sets the default for USE_INTERNAL_OPUS etc. and USE_LOCAL_HEADERS
  • USE_FREETYPE - enable FreeType support for rendering fonts
  • USE_INTERNAL_ZLIB - build and link against internal zlib
  • USE_INTERNAL_JPEG - build and link against internal JPEG library
  • USE_INTERNAL_OGG - build and link against internal ogg library
  • USE_INTERNAL_OPUS - build and link against internal opus/opusfile libraries
  • USE_INTERNAL_VORBIS - build and link against internal Vorbis library
  • USE_LOCAL_HEADERS - use headers contained within this source tree instead of system ones
  • DEBUG_CFLAGS - C compiler flags to use for building debug version
  • COPYDIR - the target installation directory
  • TEMPDIR - specify user defined directory for temp files

The defaults for these variables differ depending on the target platform.

Console

New cvars

  • cg_fixedAspect ( 0 ) - Use aspect corrected HUD/UI ( 0 = Off, 1 = 4:3 style, 2 = Widescreen style )

  • cg_fixedAspectFOV ( 1 ) - Use aspect correct FOV when using cg_fixedAspect cvar ( 0 = Off - Use cg_fov, 1 = Automatic FOV based on resolution )

  • cl_autoRecordDemo ( 0 ) - record a new demo on each map change

  • cl_aviFrameRate ( 25 )- the framerate to use when capturing video

  • cl_aviMotionJpeg ( 1 ) - use the mjpeg codec when capturing video

  • cl_guidServerUniq ( 1 ) - makes cl_guid unique for each server

  • cl_cURLLib - filename of cURL library to load

  • cl_consoleKeys - space delimited list of key names or characters that toggle the console

  • cl_mouseAccelStyle ( 0 )- Set to 1 for QuakeLive mouse acceleration behaviour, 0 for standard

  • cl_mouseAccelOffset ( 5 ) - Tuning the acceleration curve, see below

  • con_autochat ( 1 ) - Set to 0 to disable sending console input text as chat when there is not a slash at the beginning

  • con_autoclear ( 1 ) - Set to 0 to disable clearing console input text when console is closed

  • in_availableJoysticks - list of available Joysticks

  • in_keyboardDebug - print keyboard debug info

  • j_forward - Joystick analogue to m_forward, for forward movement speed/direction.

  • j_side - Joystick analogue to m_side, for side movement speed/direction.

  • j_up - Joystick up movement speed/direction.

  • j_pitch - Joystick analogue to m_pitch, for pitch rotation speed/direction.

  • j_yaw - Joystick analogue to m_yaw, for yaw rotation speed/direction.

  • j_forward_axis - Selects which joystick axis controls forward/back.

  • j_side_axis - Selects which joystick axis controls left/right.

  • j_up_axis - Selects which joystick axis controls up/down.

  • j_pitch_axis - Selects which joystick axis controls pitch.

  • j_yaw_axis - Selects which joystick axis controls yaw.

  • s_useOpenAL ( 1 ) - use the OpenAL sound backend if available

  • s_alPrecache ( 1 ) - cache OpenAL sounds before use

  • s_alGain ( 1.0 ) - the value of AL_GAIN for each source

  • s_alSources ( 128 ) - the total number of sources to allocate

  • s_alDopplerFactor ( 1.0 ) - the value passed to alDopplerFactor

  • s_alDopplerSpeed ( 9000 ) - the value passed to alDopplerVelocity

  • s_alMinDistance ( 128 ) - the value of AL_REFERENCE_DISTANCE for each source

  • s_alMaxDistance ( 1024 )- the maximum distance before sounds starts to become inaudible.

  • s_alRolloff ( 2 ) - the value of AL_ROLLOFF_FACTOR for each source

  • s_alGraceDistance ( 512 ) - after having passed MaxDistance, length until sounds are completely inaudible

  • s_alDriver - which OpenAL library to use

  • s_alDevice - which OpenAL device to use

  • s_alAvailableDevices - list of available OpenAL devices

  • s_alInputDevice - which OpenAL input device to use

  • s_alAvailableInputDevices - list of available OpenAL input devices

  • s_sdlBits - SDL bit resolution

  • s_sdlSpeed - SDL sample rate

  • s_sdlChannels - SDL number of channels

  • s_sdlDevSamps - SDL DMA buffer size override

  • s_sdlMixSamps - SDL mix buffer size override

  • s_backend - read only, indicates the current sound backend

  • s_muteWhenMinimized - mute sound when minimized

  • s_muteWhenUnfocused - mute sound when window is unfocused

  • sv_dlRate - bandwidth allotted to PK3 file downloads via UDP, in kbyte/s

  • sv_dlURL - the base of the HTTP or FTP site that holds custom pk3 files for your server

  • com_ansiColor - enable use of ANSI escape codes in the terminal

  • com_altivec - enable use of altivec on PowerPC systems

  • com_standalone (read only) - If set to 1, RTCW is running in standalone mode

  • com_basegame - Use a different base than main. If no original RTCW pak files are found, this will enable running in standalone mode

  • com_homepath - Specify name that is to be appended to the home path

  • com_legacyprotocol - Specify protocol version number for legacy RTCW 1.4 protocol, see "Network protocols" section below (startup only)

  • com_legacyversion - Use vanilla RTCW 1.41 version string for game server browser visibility

  • com_maxfpsUnfocused - Maximum frames per second when unfocused

  • com_maxfpsMinimized - Maximum frames per second when minimized

  • com_busyWait - Will use a busy loop to wait for rendering next frame when set to non-zero value

  • com_pipefile - Specify filename to create a named pipe through which other processes can control the server while it is running. ( Nonfunctional on Windows. )

  • com_gamename - Gamename sent to master server in getservers[Ext] query and infoResponse "gamename" infostring value. Also used for filtering local network games.

  • com_protocol - Specify protocol version number for current iortcw protocol, see "Network protocols" section below (startup only)

  • sv_banFile - Name of the file that is used for storing the server bans

  • net_ip6 - IPv6 address to bind to

  • net_port6 - port to bind to using the ipv6 address

  • net_mcast6addr - multicast address to use for scanning for IPv6 servers on the local network

  • net_mcastiface - outgoing interface to use for scan

  • net_enabled - enable networking, bitmask. Add up number for option to enable it:

    Enable IPv4 networking: 1

    Enable IPv6 networking: 2

    Prioritize IPv6 over IPv4: 4

    Disable multicast support: 8

  • r_allowResize - make window resizable

  • r_ext_texture_filter_anisotropic - anisotropic texture filtering

  • r_zProj - distance of observer camera to projection plane in quake3 standard units

  • r_greyscale - desaturate textures, useful for anaglyph, supports values in the range of 0 to 1

  • r_stereoEnabled - enable stereo rendering for techniques like shutter glasses (untested)

  • r_anaglyphMode - Enable rendering of anaglyph images

    red-cyan glasses: 1 red-blue: 2 red-green: 3 green-magenta: 4

    To swap the colors for left and right eye just add 4 to the value for the wanted color combination. For red-blue and red-green you probably want to enable r_greyscale

  • r_stereoSeparation - Control eye separation. Resulting separation is r_zProj divided by this value in quake3 standard units. See also http://wiki.ioquake3.org/Stereo_Rendering for more information

  • r_marksOnTriangleMeshes - Support impact marks on md3 models, MOD developers should increase the mark triangle limits in cg_marks.c if they intend to use this.

  • r_sdlDriver - read only, indicates the SDL driver backend being used

  • r_noborder - Remove window decoration from window managers, like borders and titlebar.

  • r_screenshotJpegQuality - Controls quality of jpeg screenshots captured using screenshotJPEG

  • r_aviMotionJpegQuality - Controls quality of video capture when cl_aviMotionJpeg is enabled

  • r_mode -2 - This new video mode automatically uses the desktop resolution.

New commands

  • video [filename]- start video capture (use with demo command)
  • stopvideo - stop video capture
  • stopmusic - stop background music
  • minimize - Minimize the game and show desktop
  • togglemenu - causes escape key event for opening/closing menu, or going to a previous menu. works in binds, even in UI
  • print - print out the contents of a cvar
  • unset - unset a user created cvar
  • banaddr ( range ) - ban an IP address range from joining a game on this server, valid ( range ) is either playernum or CIDR notation address range.
  • exceptaddr ( range ) - exempt an IP address range from a ban.
  • bandel ( range ) - delete ban (either range or ban number)
  • exceptdel ( range ) - delete exception (either range or exception number)
  • listbans - list all currently active bans and exceptions
  • rehashbans - reload the banlist from serverbans.dat
  • flushbans - delete all bans
  • net_restart - restart network subsystem to change latched settings
  • game_restart ( fs_game ) - Switch to another mod
  • which ( filename/path ) - print out the path on disk to a loaded item
  • execq ( filename ) - quiet exec command, doesn't print "execing file.cfg"
  • kicknum ( client number ) - kick a client by number, same as clientkick command
  • kickall - kick all clients, similar to "kick all" ( but kicks everyone even if someone is named "all" )
  • kickbots - kick all bots, similar to "kick allbots" (but kicks all bots even if someone is named "allbots")
  • tell ( client num ) msg - send message to a single client (new to server)
  • cvar_modified [filter] - list modified cvars, can filter results (such as "r*" for renderer cvars) like cvarlist which lists all cvars
  • addbot random - the bot name "random" now selects a random bot

README for Users

Using shared libraries instead of qvm:

To force RTCW-MP to use shared libraries, run it with the following parameters: +set vm_cgame 0 +set vm_game 0 +set vm_ui 0

Help! iortcw won't give me an fps of X anymore when setting com_maxfps!

iortcw now uses the select() system call to wait for the rendering of the next frame when com_maxfps was hit. This will improve your CPU load considerably in these cases. However, not all systems may support a granularity for its timing functions that is required to perform this waiting correctly. For instance, iortcw tells select() to wait 2 milliseconds, but really it can only wait for a multiple of 5ms, i.e. 5, 10, 15, 20... ms. In this case you can always revert back to the old behaviour by setting the cvar:

com_busyWait 1

Using HTTP/FTP Download Support (Server)

You can enable redirected downloads on your server even if it's not an iortcw server. You simply need to use the 'sets' command to put the sv_dlURL cvar into your SERVERINFO string and ensure sv_allowDownloads is set to 1

sv_dlURL is the base of the URL that contains your custom .pk3 files the client will append both fs_game and the filename to the end of this value. For example, if you have sv_dlURL set to "http://yoursite.org", fs_game is "main", and the client is missing "test.pk3", it will attempt to download from the URL "http://yoursite.org/main/test.pk3"

  • sv_allowDownload's value is now a bitmask made up of the following flags:

    1 - ENABLE

    4 - do not use UDP downloads

    8 - do not ask the client to disconnect when using HTTP/FTP

Server operators who are concerned about potential "leeching" from their HTTP servers from other iortcw servers can make use of the HTTP_REFERER that iortcw sets which is "ioQ3://{SERVER_IP}:{SERVER_PORT}". For example, Apache's mod_rewrite can restrict access based on HTTP_REFERER.

On a sidenote, downloading via UDP has been improved and yields higher data rates now. You can configure the maximum bandwidth for UDP downloads via the cvar sv_dlRate. Due to system-specific limits the download rate is capped at about 1 Mbyte/s per client, so curl downloading may still be faster.

Using HTTP/FTP Download Support (Client)

Simply setting cl_allowDownload to 1 will enable HTTP/FTP downloads assuming iortcw was compiled with USE_CURL=1 (the default).

  • Like sv_allowDownload, cl_allowDownload also uses a bitmask value supporting the following flags: 1 - ENABLE 2 - do not use HTTP/FTP downloads 4 - do not use UDP downloads

When iortcw is built with USE_CURL_DLOPEN=1 (default), it will use the value of the cvar cl_cURLLib as the filename of the cURL library to dynamically load.

Multiuser Support on Windows systems

On Windows, all user specific files such as autogenerated configuration, demos, videos, screenshots, and autodownloaded pk3s are now saved in a directory specific to the user who is running iortcw.

On NT-based such as Windows XP, this is usually a directory named: "C:\Documents and Settings%USERNAME%\My Docuemtns\RTCW"

On Windows Vista, Windows 7, and Windows 10 will use a directory like: "C:\Users%USERNAME%\Documents\RTCW"

You can revert to the old single-user behaviour by setting the fs_homepath cvar to the directory where iortcw is installed. For example:

ioWolfMP.exe +set fs_homepath "c:\iortcw"

or

ioWolfSP.exe +set fs_homepath "c:\iortcw"

Note that this cvar MUST be set as a command line parameter.

SDL Keyboard Differences

iortcw clients have different keyboard behaviour compared to the original RTCW clients.

SDL > 1.2.9 does not support disabling dead key recognition. In order to send dead key characters ( e.g. ~, ', `, and ^ ), you must key a Space ( or sometimes the same character again ) after the character to send it on many international keyboard layouts.

The SDL client supports many more keys than the original RTCW client. For example the keys: "Windows", "SysReq", "ScrollLock", and "Break". For non-US keyboards, all of the so called "World" keys are now supported as well as F13, F14, F15, and the country-specific mode/meta keys.

On many international layouts the default console toggle keys are also dead keys, meaning that dropping the console potentially results in unintentionally initiating the keying of a dead key. Furthermore SDL 1.2's dead key support is broken by design and RTCW doesn't support non-ASCII text entry, so the chances are you won't get the correct character anyway.

If you use such a keyboard layout, you can set the cvar cl_consoleKeys. This is a space delimited list of key names that will toggle the console. The key names are the usual RTCW names e.g. "~", "`", "c", "BACKSPACE", "PAUSE", "WINDOWS" etc. It's also possible to use ASCII characters, by hexadecimal number. Some example values for cl_consoleKeys:

"~ ` 0x7e 0x60"           Toggle on ~ or ` (the default)
"WINDOWS"                 Toggle on the Windows key
"c"                       Toggle on the c key
"0x43"                    Toggle on the C character (Shift-c)
"PAUSE F1 PGUP"           Toggle on the Pause, F1 or Page Up keys

Note that when you elect a set of console keys or characters, they cannot then be used for binding, nor will they generate characters when entering text. Also, in addition to the nominated console keys, Shift-ESC is hard coded to always toggle the console.

QuakeLive mouse acceleration ( patch and this text written by TTimo from id )...I've been using an experimental mouse acceleration code for a while, and decided to make it available to everyone. Don't be too worried if you don't understand the explanations below, this is mostly intended for advanced players:

To enable it, set cl_mouseAccelStyle 1 ( 0 is the default/legacy behavior ) New style is controlled with 3 cvars:

  • sensitivity
  • cl_mouseAccel
  • cl_mouseAccelOffset

The old code ( cl_mouseAccelStyle 0 ) can be difficult to calibrate because if you have a base sensitivity setup, as soon as you set a non zero acceleration your base sensitivity at low speeds will change as well. The other problem with style 0 is that you are stuck on a square ( power of two ) acceleration curve.

The new code tries to solve both problems:

Once you setup your sensitivity to feel comfortable and accurate enough for low mouse deltas with no acceleration ( cl_mouseAccel 0 ), you can start increasing cl_mouseAccel and tweaking cl_mouseAccelOffset to get the amplification you want for high deltas with little effect on low mouse deltas.

cl_mouseAccel is a power value. Should be >= 1, 2 will be the same power curve as style 0. The higher the value, the faster the amplification grows with the mouse delta.

cl_mouseAccelOffset sets how much base mouse delta will be doubled by acceleration. The closer to zero you bring it, the more acceleration will happen at low speeds. This is also very useful if you are changing to a new mouse with higher dpi, if you go from 500 to 1000 dpi, you can divide your cl_mouseAccelOffset by two to keep the same overall 'feel' ( you will likely gain in precision when you do that, but that is not related to mouse acceleration ).

Mouse acceleration is tricky to configure, and when you do you'll have to re-learn your aiming. But you will find that it's very much worth it in the long run.

If you try the new acceleration code and start using it, I'd be very interested by your feedback.

README for Developers
  • 64-bit mods

If you wish to compile external mods as shared libraries on a 64bit platform, and the mod source is derived from the id RTCW SDK, you will need to modify the interface code a little. Open the files ending in _syscalls.c and change every instance of int to intptr_t in the declaration of the syscall function pointer and the dllEntry function. Also find the vmMain function for each module ( usually in cg_main.c g_main.c etc. ) and similarly replace the return value in the prototype with intptr_t (arg0, arg1, ...stay int).

Add the following code snippet to q_shared.h:

#ifdef Q3_VM
typedef int intptr_t;
#else
#include <stdint.h>
#endif
  • Creating standalone games

Have you finished the daunting task of removing all dependencies on the RTCW game data? You probably now want to give your users the opportunity to play the game without owning a copy of RTCW, which consequently means removing cd-key and authentication server checks.

In addition to being a straightforward RTCW client, iortcw also purports to be a reliable and stable code base on which to base your game project.

However, before you start compiling your own version of iortcw, you have to ask yourself: Have we changed or will we need to change anything of importance in the engine?

If your answer to this question is "no", it probably makes no sense to build your own binaries. Instead, you can just use the pre-built binaries on the website. Just make sure the game is called with:

+set com_basegame <yournewbase>

in any links/scripts you install for your users to start the game. The binary must not detect any original RTCW game pak files. If this condition is met, the game will set com_standalone to 1 and is then running in stand alone mode.

If you want the engine to use a different directory in your homepath than e.g. "My Documents\RTCW" on Windows or ".wolf" on Linux, then set a new name at startup by adding

+set com_homepath <homedirname>

to the command line. You can also control which game name to use when talking to the master server:

+set com_gamename <gamename>

So clients requesting a server list will only receive servers that have a matching game name.

Example line:

+set com_basegame basefoo +set com_homepath .foo
+set com_gamename foo

If you really changed parts that would make vanilla iortcw incompatible with your mod, we have included another way to conveniently build a stand-alone binary. Just run make with the option BUILD_STANDALONE=1. Don't forget to edit the PRODUCT_NAME and subsequent #defines in qcommon/q_shared.h with information appropriate for your project.

While a lot of work has been put into iortcw that you can benefit from free of charge, it does not mean that you have no obligations to fulfill. Please be aware that as soon as you start distributing your game with an engine based on our sources we expect you to fully comply with the requirements as stated in the GPL. That includes making sources and modifications you made to the iortcw engine as well as the game-code used to compile the .qvm/.so files for the game logic freely available to everyone. Furthermore, note that the "RTCW Game Source License" prohibits distribution of mods that are intended to operate on a version of RTCW not sanctioned by id software.

This means that if you're creating a standalone game, you cannot use said license on any portion of the product. As the only other license this code has been released under is the GPL, this is the only option.

This does NOT mean that you cannot market this game commercially. The GPL does not prohibit commercial exploitation and all assets (e.g. textures, sounds, maps) created by yourself are your property and can be sold like every other game you find in stores.

Network protocols

There are now two cvars that give you some degree of freedom over the reported protocol versions between clients and servers:

"com_protocol"

and

"com_legacyprotocol"

The reason for this is that some standalone games increased the protocol number even though nothing really changed in their protocol and the iortcw engine is still fully compatible.

In order to harden the network protocol against UDP spoofing attacks a new network protocol was introduced that defends against such attacks.

Unfortunately, this protocol will be incompatible to the original RTCW 1.4 which is the latest official release from id.

Luckily, iortcw has backwards compatibility, on the client as well as on the server. This means iortcw players can play on old servers just as iortcw servers are able to service old clients.

The cvar "com_protocol" denotes the protocol version for the new hardened protocol, whereas the "com_legacyprotocol" cvar denotes the protocol version for the legacy protocol.

If the value for "com_protocol" and "com_legacyprotocol" is identical, then the legacy protocol is always used. If "com_legacyprotocol" is set to 0, then support for the legacy protocol is disabled.

Mods that use a standalone engine obviously do not require dual protocol support, and it is turned off if the engine is compiled with STANDALONE per default. If you desire backwards compatibility to older versions of your game you can still enable it in q_shared.h by defining

LEGACY_PROTOCOL
cl_guid Support

cl_guid is a cvar which is part of the client's USERINFO string. Its value is a 32 character string made up of [a-f] and [0-9] characters. This value is pseudo-unique for every player. Id's RTCW client also sets cl_guid, but only if Punkbuster is enabled on the client. iortcw uses the same method of calculating cl_guid as Punkbuster does by default ( based on cd-key ) So your cl_guid should match what it is in Id's client.

If cl_guidServerUniq is non-zero (the default), then this value is also pseudo-unique for each server a client connects to (based on IP:PORT of the server).

The purpose of cl_guid is to add an identifier for each player on a server. This value can be reset by the client at any time so it's not useful for blocking access. However, it can have at least two uses in your mod's game code:

  1. improve logging to allow statistical tools to index players by more than just name
  2. granting some weak admin rights to players without requiring passwords
PNG support

iortcw supports the use of PNG (Portable Network Graphic) images as textures. It should be noted that the use of such images in a map will result in missing placeholder textures where the map is used with the id RTCW client.

Recent versions of GtkRadiant and q3map2 support PNG images without modification. However GtkRadiant is not aware that PNG textures are supported by iortcw. To change this behaviour open the file 'q3.game' in the 'games' directory of the GtkRadiant base directory with an editor and change the line:

texturetypes="tga jpg"

to

texturetypes="tga jpg png"

Restart GtkRadiant and PNG textures are now available.

Contributing

Please send all patches as a pull request on Github: (https://github.com/iortcw/iortcw)

The focus for iortcw is to develop a stable base suitable for further development and provide players with the same RTCW experience they've had for years. As such iortcw does not have any significant graphical enhancements and none are planned at this time. However, improved graphics and sound patches will be accepted as long as they are entirely optional, do not require new media and are off by default.

Credits

Maintainers

Significant contributions from

iortcw's People

Contributors

a-detiste avatar abpostelnicu avatar ec- avatar hosterholz avatar man-at-arms avatar mastero2 avatar pkubaj avatar r-a-sattarov avatar siryodajedi avatar smcv avatar smiletheory avatar wssdude avatar zturtleman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iortcw's Issues

NetBSD build issue

The whole build is full of the same error :
make: "/home/Adrien2002/iortcw-1.42d/SP/Makefile" line 2849: Missing dependency operator
make: "/home/Adrien2002/iortcw-1.42d/SP/Makefile" line 2851: Need an operator

I just download the sources, entered in SP folder and wrote "make" as described in the README. Maybe the NetBSD part in the Makefile is not compatible anymore with how NetBSD is nowadays, I'm not an expert at all about it. If we success to build it, I'll port it to pkgsrc.

OSX compilation issues

Is there a specific reason why so many libraries are included in the repo instead of compiling using system libs like most other idtech source ports? Due to the SP/MP split all are included twice, in fact.

On OSX this is creating a conflict with user installed openal-soft that results in a crash on iortcw startup unless it is uninstalled or USE_OPENAL_DLOPEN is set to 0 in the makefile.

Compiling with USE_LOCAL_HEADERS=0 is also broken due to the header path being wrong (does not include "SDL2/"). It only disables SDL2 and OpenAL local headers too, libcurl libogg libvorbis opus libjpeg etc are all still internal.

I have created a fork and will work on removing all 3rd party libs/headers from the repo. Once I am done I will create a pull request.

Changing graphics quality presets produces errors when setting the renderer

Going into Options\System\Graphics and changing the Graphics preset produces a yellow error box with the following messages (depends on the preset):

Error: Restricted source tried to set "cl_renderer" to "rend2"
Error: Restricted source tried to set "cl_renderer" to "opengl1"

Does not crash the game, just returns to the main menu. I can set the renderer manually via console, just the settings don't really work as intended. :-(

Checksum error when attempting to change crosshair in pak0

iortcw 1.51b-SP win_mingw64-x64 Aug 16 2017
SSE instruction set enabled
----- FS_Startup -----
Current search path:
C:\Users\upton\Documents\RTCW\main
D:\SteamLibrary\steamapps\common\Return to Castle Wolfenstein\main\sp_rend2_shaders0.pk3 (5 files)
D:\SteamLibrary\steamapps\common\Return to Castle Wolfenstein\main\sp_pak4.pk3 (21 files)
D:\SteamLibrary\steamapps\common\Return to Castle Wolfenstein\main\sp_pak3.pk3 (14 files)
D:\SteamLibrary\steamapps\common\Return to Castle Wolfenstein\main\sp_pak2.pk3 (232 files)
D:\SteamLibrary\steamapps\common\Return to Castle Wolfenstein\main\sp_pak1.pk3 (1342 files)
D:\SteamLibrary\steamapps\common\Return to Castle Wolfenstein\main\pak0.pk3 (4775 files)
D:\SteamLibrary\steamapps\common\Return to Castle Wolfenstein\main
c:/program files (x86)/steam\SteamApps\common\Return To Castle Wolfenstein\main


6389 files in pk3 files


WARNING: main/pak0.pk3 is present but its checksum (1349421837)
is not correct. Please re-copy pak0.pk3 from your
legitimate RTCW CDROM.


The normal exe works fine.

Alt tab creates a loop

Pressing alt-tab sometimes creates a vid_restart loop. It keeps going until game is shut down with either quit or task manager shutdown. Then Documents\RTCW\wolfconfig_mp.cfg must be deleted to prevent the same upon startup. There are no differences between new good and old bad wolfconfig_mp.cfg except
cg_selectedPlayer
cg_selectedPlayerName
variables , which should not matter

Jerky movement for short time after spmap call

I don't know how high this is on the TODO list as I noticed this is present from the very first version of iortcw released so you are probably aware of that.

When using map command to start map, the jerky movement at the start is not present, but when using spmap, it is.

I don't know what causes it, it happens only for short period of time, but is still quite annoying.
Like the SP server was "lagging" after giving player the control.

I couldn't find the cause of it unfortunately.

This issue is present on two of my machines and occures on both on Windows 10 64-bit and ArchLinux 64-bit.
I'm compiling from latest sources, 64-bit binaries.

Loading a saved game while in game does not work.

So, I installed this source port, and been playing it a bit. Works great, much better than the original game, but I ran into an issue where if I load a saved game (whether it be through quick load or the load game menu in the pause menu) the ESC key doesn't work anymore, nor does the Quick Load key. As a result, I have to ALT-F4 (Since I can't press ESC to get to the quit game menu) and then relaunch the game to load my saves from the main menu. Any insight on this? Hopefully I have provided enough information to explain the problem. Thank you.

P.S. I used one of the "releases" versions, because I am not proficient enough to compile it myself.

Trouble setting up Dedicated Server

Hi everyone,

I have had much success setting up an ioquake3 dedicated server on my Mac Mini Server...not so much with iortcw. Q3 starts up no issue and works fine, but I am getting some sort of error with RTCW. I will include the Terminal text from when the server starts up and automatically shuts down. Hopefully someone can give me some insight into what the issue is.

Terminal Saved Output 2.txt

64-bit Windows build not loading correct OpenAl dll

On 64-bit Windows build, when I open console, iortcw tries to load OpenAl32.dll, but there's none in the game folder so it loads the one stored in System32.

Renaming OpenAl64.dll in game folder to OpenAl32.dll seems to do the work for now but it should definitely be dealt with somehow.

I see two solutions:

  • renaming OpenAl64.dll to OpenAl32.dll inside libs
  • do some checking inside code

Makefile DO_REF_STR sed expression escaping issue

The DO_REF_STR in your Makefile looks like this

define DO_REF_STR
$(echo_cmd) "REF_STR $<"
$(Q)rm -f $@
$(Q)echo "const char *fallbackShader_$(notdir $(basename $<)) =" >> $@
$(Q)cat $< | sed -e 's/^/\"/;s/$$/\\n\"/' | tr -d '\r' >> $@
$(Q)echo ";" >> $@
endef

On my system, this puts literal newline character before end quote, resulting to corrupted .c files being generated.
My solution to this issue was to modify the part with sed to
$(Q)cat $< | sed -e 's/^/\"/;s/$$/\\\n\"/' | tr -d '\r' >> $@

Also, you could rewrite your sed expression as a whole to
$(Q)cat $< | sed 's/.*/"&\\\n"/' | tr -d '\r' >> $@

It's shorter and (at least to my eyes) more elegant, but that's up for you.

Spanish version

Hi,

I've located the Spanish dub, which trigger this warning, like the french one:

**************************************************
WARNING: main/sp_pak1.pk3 is present but its checksum (652879493)
is not correct. Please re-copy sp_pak1.pk3 from your
legitimate RTCW CDROM.
**************************************************

file main/sp_pak1.pk3?es
255164624 bytes
md5= 99a26bcd4b8511f8f43576a37a7ccbdb

The game works perfectly, even when I didn't bother to recode scrips/translastions.cfg
from a CRLF fila to a unixy one.

http://anonscm.debian.org/cgit/pkg-games/game-data-packager.git/commit/?id=06c54202670aae47a23ab97edc6df0c6458542f5

Problem with menu transition

Hello, game Works pretty great with iortcw besides one gripe.
When loading a new mission the arrow that is supposed to pop in at the lower corner is missing so i have to click bllindly hoping to hit it. This does not allways Work however.
It only seems to happen when using rend2.

cg_autoactivate bug

I have cg_autoactivate set to "0" but it's not working (items are gathered automatically)

Kicking impossible because of OpenAL update

I don't know why and how OpenAL causes this exactly, but whenever I press G key (kicking) I can't kick.

This issue was not present in 1.51 and when I tried to track it down in latest source here, I found out there is something wrong with updated OpenAL library, as when I replaced new OpenAL DLL in my build folder with the old one from 1.51, I was suddenly able to kick!

I tried it many times, it is easily reproducible.

NOTE: It could be caused by some GCC optimization, as I found out the bug is not present at all when using Debug build instead of Release one. But it is still somehow tied up to OpenAL, as I tried to build the working version 1.51 myself (to see if it is not some issue with the compiler...) and everything works fine even with all optimizations.

I'm using MSYS2's MinGW32 32bit compiler with COMPILE_ARCH=x86 to generate 32bit executables.

Please do a release

The file writing checks you merged recently appear to be a security fix, so it would be a good idea to do a 1.51 release with them, either from master or by backporting them onto a branch starting at 1.5a.

(Backporting them into Debian now.)

Cannot enter CD-Key

To play online some servers require to have a CD-Key set.
I tried to enter mine in the Settings but it cannot be entered.
The cursor just keeps blinking while typing.

System Info:
Arch Linux
Gnome Shell
Nvidia GTX 660 (Driver 375.20)

Mac version unable to enter cd key

On the mac version i am unable to enter the cd key for some reason.

I can reasign mapped keys under keyboard config fine, type in console, enter letters in the very last box of key and even tab between the boxes but for some reason it doesnt register any keys in the first 4 boxes

This is on a macbook pro

sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.4
BuildVersion: 15E65

Please use version numbers whose correct order is obvious

It looks as though the iortcw version numbers are intended to be treated like decimal floating-point: 1.4 < 1.41 < 1.5. However, version numbers are usually sorted as though they were vectors of integers: for example, Linux 3.2, 3.9, 3.10, 3.11 were released in that order. Package management tools like dpkg and RPM assume the vector-of-integers interpretation.

Please could you use versions like 1.50b, 1.51a or 1.60a for future releases, so that both interpretations lead to the version numbers being sorted in the same order?

(For now, I'm going to prepare Debian packages for 1.5a as though it had been versioned 1.50a.)

Imprecise hit detection in release (and more...)

I noticed many of my shots didn't connect when they clearly should. Also, physics behaved weirdly, mouse felt more stuttery,...
I found these issues was not present in the Debug build.

Looking at the Makefile -ffast-math is enabled in Release. Removing this and recompiling fixed the issues so this can clearly be attributed to this compiler flag.

-ffast-math
Sets the options -fno-math-errno, -funsafe-math-optimizations, -ffinite-math-only, -fno-rounding-math, -fno-signaling-nans, -fcx-limited-range and -fexcess-precision=fast.
This option causes the preprocessor macro FAST_MATH to be defined.
This option is not turned on by any -O option besides -Ofast since it can result in incorrect output for programs that depend on an exact implementation of IEEE or ISO rules/specifications for math functions. It may, however, yield faster code for programs that do not require the guarantees of these specifications.

I think it should be removed.
I didn't experience any perceptual drop in performance without it so it just adds salt into injury without helping curing it in any mandatory way.

Issues with fading

Also another issue I noticed a long time ago is fading in general.

Audio functions for sound related fading are all stubs, so that is kind of expected (should be implemented though somehow...).
Scene fading has some problem too.
It seems to be problem when engine tells the game to fade, but than comes startCamera with startBlack parameter set. If scene fading was caused by the engine (for example by pressing ESC during cutscene) and StartCamera is called, the value is overwritten by it, effectively starting fadein/fadeout when it shouldn't.

This can be seen nicely in the very first cutscene when you try to for example skip it.
Audio is not faded (for obvious reasons) and scene just fades out and than back in after startCam is called.

This is not behaviour with the original engine.
This issue is present at least on 64-bit linux and windows builds. I'm compiling from latest sources here.

iortcw compilation on Ubuntu 16.10: I can not launch iortcw directly

Hello,

I upgraded to ubuntu 16.10 and when I compile iortcw, I can no more launch it directly from the explorer files (Nautilus), only from a terminal like this:
$ ./iortcw64
Do you think it is related to this:
https://wiki.ubuntu.com/SecurityTeam/PIE ?
Is iortcw compiled by default with pie on or off?

Iortcw is not the only open source software concerned by this Ubuntu change:
I had the same bug with Dolphin-emu (https://bugs.dolphin-emu.org/issues/9853), mame or nuke32.

Thank you for your help.

LGDN

Graphical glitch when loading and ingame menu shown

I recorded it here so you can see what I mean...
https://www.youtube.com/watch?v=GlXHlE80SQI

It happens when I load a game and quickly press ESC to open ingame menu.
I would fix it myself but I don't really know where to look at (just getting familiarized with the source...)

I'm suspecting some buffer not getting cleared properly.

It happens with both renderering backends, opengl1 and rend2.

NOTE: I would suggest blocking opening of ingame menu during load, as it seems kind of 'not efficient' to do so anyway, and it would also get rid of a bug in a way too. But it is just a suggestion.

Please allow us to compile using visual studio

Like how vkquake does it. a simple .sln file we have to double click, clean, select version and build it.

I already have visual studio and cmake. I would have to have to download another application for one file build.

The readme file states of a wolf.sln that dosen't exist btw.

Where is COPYING.txt?

The Readme files in both the SP and MP folder reference COPYING.txt, but it doesn't seem to be included.

ioRTCW in realtRTCW 2.1 issues

*r_swapinterval 1 -> CL_Initgame=1 minute (!)
*max anisotropy autoset to 2 (instead of 16) with a GeForce GTX 1050 Ti, lastest drivers

cl_consoleKeys breaks functionality for dual KB layout

I have US and other (russian) layouts selected from windows settings. Most common way of switching keyboards is ALT+SHIFT which can be pressed a lot during gameplay and keyboard flips EN-RU-EN all the time.

The issue with iortcw is the cl_consoleKeys functionality breaks the 100% responsiveness to tilde key.

Console appears fine if the KB layout happens to be EN (50% of the time)
The other 50% nothing happens when i press tilde, so i have to switch layout first.

I figure this is a breaking change following the iortcw philosophy of only introducing optional changes switched off by default.

When my KB layout is different i get char ъ , which is hex 0x3f
When i type this key in console i get J (latin capital j) - which is also different from rtcw. Hex - 0x4a

So i thought implementing this would work

seta cl_consoleKeys "~ ` 0x7e 0x60 0x3f J 0x4a"

But nothing happens.

I think the priority should be given to original code of TILDE key and then cl_consoleKeys logic.

PS: as mentioned above, non-US keyboard input produces garbage. It always did, but it produces different garbage than before. I would be a nice feature if iortcw recognized the keystrokes and
either

  1. translated them from RU back to basic EN automatically to avoid errors (best)
    OR
  2. Like Quake live allowed unicode characters (latin and others) (no point really)

pk3 checksum problem

i have russian pack of game with addons:
Return To Castle Wolfenstein (just original game with russian lang)
game/tye/sp_pak8.pk3 4361abed69e586e055c48d15fe4655445870cd76 SHA1
game/main/pak0.pk3 069fa3c0476402452d8b639af6e5eb10d2368df0 SHA1
Operation Trondheim 1 - Special Forces
game/trond/sp_pak8.pk3 5ec44a614662618e67fd8f28deb3cc315dc41edf SHA1
Operation Trondheim 2 - Red Alert
game/redalert/sp_pak8.pk3 0a2e6cf7daea7d46dde6675eeac6a173d37504e4 SHA1
Operation Trondheim 3 - Iron Cross
game/ironcross/sp_pak8.pk3 cb736368de51b13f4b769e703594496260e643b5 SHA1
Return To Castle Wolfenstein - Project 51
game/p51/sp_pak8.pk3 caafaa78b9daade64aa8ba052483d4bce2d02cec SHA1
Return To Castle Wolfenstein - Time Gate
game/gate/sp_pak8.pk3 e942a54bdedb7d751cfcce2d8432fa417f8c42ce SHA1
Return To Castle Wolfenstein - Stalingrad
game/stalingrad/sp_pak8.pk3 900398d91dfc9f117a5aace96b6a35eaed1f282c SHA1

Return To Castle Wolfenstein - Saboteur
game/main/pak0.pk3 153f5afe2641960b8c76463dbddb95765bb088d3 SHA1

Return To Castle Wolfenstein - The Curse of the Pharaohs

and cant run any of this becouse iortcw want only original english version
how to torn off checksum?

low FPS

Hi, i have:
Ryzen 2400G
Kubuntu 18.04 with Kernel 4.18.8
2560x1440 monitor

and i have low 30 - 50 FPS. Half Life 2 runs with 60fps flat in that resolution, everything on highest.

none of the usual fixes help, r_primitives "2" does nothing.

CPU is bored to death for the most part, i cant even see a difference between running the game or not running it.

i don't know what to do next.

Unpure client detected

Version: iortcw master(133cb06)
System: Mac
Message: Unpure client detected invalid pk3 files referenced.
When: Trying to join a mp server

pk3s
MD5 (main/mp_bin.pk3) = 7651d02fe51fc8a949536f3e0cfa8dd6
MD5 (main/mp_pak0.pk3) = 62641cffd9a8ad0f62cc1cca867d51f8
MD5 (main/mp_pak1.pk3) = 22b972974f499a237c96a2200b0d019e
MD5 (main/mp_pak2.pk3) = 30f29ffa81748a957e0441af8c14cb56
MD5 (main/mp_pak3.pk3) = fdc00dfd72b888e92a4387e1933826e4
MD5 (main/mp_pak4.pk3) = c5f76bbde262eba577a00bebe9cd4f8f
MD5 (main/mp_pak5.pk3) = d17df62d6c71078ed137aefc69d80f30
MD5 (main/mp_pakmaps0.pk3) = f2d361a0082ed9bc1e26d2327b4f22db
MD5 (main/mp_pakmaps1.pk3) = d1856aa9bc62f719a400428b9ec27ebb
MD5 (main/mp_pakmaps2.pk3) = a0ee8714c6f7ee72680293778c22d6ee
MD5 (main/mp_pakmaps3.pk3) = 01bb7c4fb3b11273d75ae658fb4de0cc
MD5 (main/mp_pakmaps4.pk3) = a39525809f7a0780f5546063dad1e5d1
MD5 (main/mp_pakmaps5.pk3) = bb24fb011b0f4b84335c66a869d1ab1c
MD5 (main/mp_pakmaps6.pk3) = 397e0b48673a1a8e0ec25eb0f3ccae9d
MD5 (main/pak0.pk3) = ce92b11df889cb0a045762bb5fd7cde5
MD5 (main/sp_pak1.pk3) = a0d3fe956f85f40c8efd6babe0d09832
MD5 (main/sp_pak2.pk3) = 330b272d5261fe19fcf3c3fbc943c7f3
MD5 (main/sp_pak3.pk3) = cf25d6731ed29c80303febbb177aa585
MD5 (main/sp_pak4.pk3) = 4223cc6588594ec0ceee186f0e73a6e9

Build from source fails on linux

Hello,

Building iortcw 1.5a from source on linux (slackware 14.1/14.2) fails with error :

make[2]: *** No rule to make target '../.git/index', needed by 'build/release-linux-x86_64/client/cl_console.o'. Stop.

I checked the Makefile and found that error is due to the line #2661 which makes reference to file ../.git/index that is not part of source archive. Since line #2662 and #2663 make reference to this file as well, I removed these lines and compilation went well this time.

It seems that issue comes from commit d6094c

--
SeB

Unable to launch on 16.04 how to debug ?

Hi I have purchased the most recent version of RTCW from GOG and installed it in a windows 7 VM.
I've downloaded the latest release of IORTCW for 64bit linux and copied over the Main directory from the the installed RTCW to the IORTCW directory.

Upon executing ./iowolfsp.x86_64 I get the following in the crashlog.

am@seattle:~/Downloads/iortcw-1.51b-linux-x86_64$ cat /home/am/.wolf/main/crashlog.txt
iortcw 1.51b-SP linux-x86_64 Aug 16 2017
SSE instruction set enabled
----- FS_Startup -----
Current search path:
/home/am/.wolf/main
./main/sp_pak4.pk3 (21 files)
./main/sp_pak3.pk3 (14 files)
./main/sp_pak2.pk3 (232 files)
./main/sp_pak1.pk3 (1342 files)
./main/pak0.pk3 (4775 files)
./main


6384 files in pk3 files
execing default.cfg
execing wolfconfig.cfg
execing autoexec.cfg
Minimum com_hunkMegs is 128, allocating 128 megs.
Hunk_Clear: reset the hunk ok
Bypassing CD checks
----- Client Initialization -----
Couldn't read rtcwhistory.
Cmd_AddCommand: map_restart already defined
----- Initializing Renderer ----
Trying to load "renderer_sp_opengl1_x86_64.so" from "."...
---- Renderer Initialization Complete ----
RTCWKEY found.
----- Client Initialization Complete -----
----- R_Init -----
SDL using driver "x11"
Initializing OpenGL display
Display aspect: 1.778
...setting mode 3: 640 480
Using 24 color bits, 24 depth, 8 stencil display.
Available modes: '1920x1080 720x400 1280x800 1440x900 640x480 800x600 1024x768 1152x864 1280x1024'
GL_RENDERER: Mesa DRI Intel(R) Ivybridge Desktop
Initializing OpenGL extensions
...using GL_EXT_texture_compression_s3tc
...using GL_EXT_texture_env_add
...using GL_ARB_multitexture
...using GL_EXT_compiled_vertex_array
...ignoring GL_EXT_texture_filter_anisotropic
Initializing Shaders
^3WARNING: In shader file scripts/common.shader...Shader "textures/sfx/portal3a_back2" on line 822 is missing closing brace^3.
^3WARNING: In shader file scripts/ui_wolf.shader...Invalid shader name "}" on line 1849.
----- finished R_Init -----
------ Initializing Sound ------
Trying to load "libopenal.so.1"...
Allocated 128 sources.
OpenAL default capture device is 'Built-in Audio Analogue Stereo'
OpenAL capture device opened.
OpenAL info:
Vendor: OpenAL Community
Version: 1.1 ALSOFT 1.16.0
Renderer: OpenAL Soft
AL Extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_block_alignment AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length
ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFTX_device_clock ALC_SOFTX_HRTF ALC_SOFT_loopback ALC_SOFTX_midi_interface ALC_SOFT_pause_device
Device: Built-in Audio Analogue Stereo
Available Devices:
Built-in Audio Analogue Stereo
Input Device: Built-in Audio Analogue Stereo
Available Input Devices:
Built-in Audio Analogue Stereo
Monitor of Built-in Audio Analogue Stereo
Sound initialization successful.

----- Client Shutdown (Client fatal crashed: VM_Create on UI failed) -----
RE_Shutdown( 1 )
Hunk_Clear: reset the hunk ok
OpenAL capture device closed.

VM_Create on UI failed

Can you please advise me on how I can debug this further.

thanks in advance

[Linux] Game stuck in an infinite reboot

Launching the game on an Ubuntu 14.04.3 (64bit) or 15.04 (64bit) causes the game to reboot itself in an endless loop. I tried this both with the Open Source (default) driver and also the closed sourced Nvidia one - same result.

On Xubuntu 14.04.3 and Linux Mint 17 (both Ubuntu variants) this issue is not present, which leads me to suspect that this could be a conflict with the Unity Desktop Environment?

System Specs:

Intel i5-2400
8GB DDR3 1333MHZ
Geforce GTX 760 2GB

On Raspberry pi

compilation terminated.
Makefile:2556: recipe for target 'build/release-linux-arm/renderer/tr_animation.o' failed
make[2]: *** [build/release-linux-arm/renderer/tr_animation.o] Error 1
make[2]: Leaving directory '/home/sem/iortcw/SP'
Makefile:1303: recipe for target 'targets' failed
make[1]: *** [targets] Error 2
make[1]: Leaving directory '/home/sem/iortcw/SP'
Makefile:1254: recipe for target 'release' failed
make: *** [release] Error 2

arbitrary native code execution on clients with auto-download enabled

There are a couple of related issues in how iortcw deals with cgame/ui code in PK3 files, which I don't think can be fixed without breaking game mods designed for retail RTCW (although they can be mitigated).

I'm currently trying to get iortcw packages into Debian's contrib repository, so I'm looking for the least-bad trade-off that makes it secure while removing as little functionality as possible.

Vulnerability 1. Unpacking native code from PK3s

If an active PK3 file contains an appropriate native-code DLL for the platform and CPU, it will be unpacked into the filesystem and loaded as a module (library). If I understand correctly, in retail RTCW this was the only way to get a mod's executable code to be run by the engine, because retail RTCW didn't have the QVM bytecode interpreter. In iortcw it is still a desired feature, to be able to run mods that were designed to be compatible with retail RTCW, or join "pure servers" that are not running iortcw.

Because clients can be configured to auto-download PK3s for mods and other resources from servers, this means the server (or a man in the middle) can make the client run arbitrary native code of its choice, with the user's full privileges.

Vulnerability 2. Escaping from the QVM interpreter sandbox by creating native code

This is basically CVE-2011-3012: in retail Quake III Arena, QVM bytecode could open any file in the engine's data directory for writing, including native DLL files. QVM-based mods are meant to have limited access to the filesystem, because the interpreter acts as a (fairly weak) sandbox, but in this case they could escalate their privileges by writing out native DLLs of their choice, which would be loaded and executed with the user's full privileges next time the engine starts in the appropriate mode.

iortcw has most of the checks that were introduced to fix CVE-2011-3012 checks, but some of them were disabled in r133 because they broke the ability to unpack DLLs from PK3s. Again, auto-downloading is what makes this a plausible remote attack.

Possible solution 1. Disabling auto-downloading

If clients refuse to auto-download from servers, then servers cannot carry out this attack. cl_allowDownload is currently on-by-default in iortcw and off-by-default in ioquake3; the setting can be changed from its default in the GUI of each game.

Disabling auto-downloading - either by changing the default, or by forcibly disabling it such that it cannot be enabled - would prevent these attacks, but is a functionality loss. In particular, it has the collateral damage of removing the ability to auto-download non-executable content (maps), which is believed to be safe.

If the option remains present, it might also be useful to alter the UI so that toggling the option has a confirmation prompt, like I did for Debian's version of OpenArena: https://sources.debian.net/src/openarena/0.8.8-14/debian/patches/Request-confirmation-if-a-user-enables-auto-download.patch/

Possible solution 2. Disabling DLL unpacking and reinstating the CVE-2011-3012 checks

If DLL unpacking was disabled and the CVE-2011-3012 checks were brought back, then auto-downloading would be as safe as it is in ioquake3 (which is still not particularly safe, since I suspect a determined attacker can break out of the QVM sandbox, but it's better than nothing). However, this breaks existing mods, which are documented to be installed by simply dropping the PK3 file into the appropriate place; it's a trade-off.

One possibility would be to have a compile-time or runtime option that chooses between the two non-ideal situations: "safe, but mods don't work" and "unsafe for auto-downloading, but mods work"...

Possible solution 3. Distinguishing between auto-downloaded and manually-installed PK3s

I've opened ioquake/ioq3#130 to discuss long-term ways to solve this with less collateral damage.

Supporting XDG base directory specification

I just tried building iortcw from source on Linux (Debian testing), and it works quite well. I only noticed that it uses $HOME/.iortcw for storing saves and settings. I patched the game to use $XDG_DATA_HOME/return-to-castle-wolfenstein (or $HOME/.local/share/return-to-castle-wolfenstein if $XDG_DATA_HOME is undefined). This makes it compliant with XDG base directory spec and stores data neatly without cluttering $HOME.

Are you interested in that patch? It involves changing mostly code/sys/sys_unix.c
Is that something that you regularly pull from upstream, or you can accept patches specific to your codebase in it? I made a merge request here: #12

Let me know if it's OK or needs any adjustments / changes to approach.

Resolution via in-game menu

*ioRTCW 1.42d
*Deleted every config file in the RTCW folders

Can't set resolution via in-game option/menu, only with r_mode "-1" and custom values. AMD&Nvidia GPUs (Win7/Win10)
What is "r_custompixelaspect" (not "cg_fixedAspect ") variable and how to set it properly?

System menu not showing up

OS: Ubuntu 18.04
GPU: AMD 280x OpenGL version string: 3.1 Mesa 18.2.0-devel
iortcw version: 1.51c-SP (compiled from source today and previous version I downloaded elsewhere, forgot where exactly)
Relevant error in console: Error: UI/hud.menu. line (multiple line numbers here): unknown menu item keyword (multiple lines with "bottomright" and "scralign"). Relevant pic.

On the menu before game, the system menu just doesn't show and takes me back to the main screen. Apparently someone else had the issue also.

Custom FOV

How can I properly set a custom FOV value in single-player?

Firstly, I use cg_fixedAspect "2" to play in widescreen.

Secondly, I tried using seta cg_fov "120" in the configuration file. FOV stays locked at 90(?). I entered cg_fov 120 in the console. Does nothing. Actually all cvars I enter in the console seems to do nothing.

I think you should be allowed to increase the FOV while still getting proper scaling provided by the fixedAspect (unless there's another way to do it). I appreciate any support.

Scaling problems with Nvidia card.

I am trying to play rtcw in 1080 and running into an issue with display scaling. It seems no matter what settings I tweak either in my video card or in the game massive amounts of the screen bleed out of the boundaries of my monitor. I have an ASUS gaming laptop with a GeForce 960m.

resolution

Hello,

I just compiled lastest iortcw version from git and I can not set correctly my resolution:
even if I choose 1920x1080 fullscreen (my desktop resolution), it stays in an inferior resolution.
In the window mode the resolution seems buggy too.
How do I can help you for debugging this?

Thank you for your help.

LGDN
config:
Ubuntu 16.10 64 bits
NVIDIA GeForce GTX 770
official Ubuntu Nvidia drivers 367.57 - 1920x1080

Savegames from PointRelease 1.4 not compatible

Hi, my savegames i created on the steam version are apparently not compatible with iortcw, i get the error message:

clipboard1

The console output is:

sv_maxclients will be changed upon restarting.
------ Server Initialization ------
Server: forest
RE_Shutdown( 0 )
------- FBO_Shutdown -------
------- R_ShutdownVaos -------
------- GLSL_ShutdownGPUShaders -------
Hunk_Clear: reset the hunk ok
----- FS_Startup -----
Current search path:
/home/blabla/.wolf/main/toak_marketgarden.pk3 (98 files)
/home/blabla/.wolf/main/Final_DeathWish.pk3 (34 files)
/home/blabla/.wolf/main/denoflions_dual.pk3 (84 files)
/home/blabla/.wolf/main
./main/sp_rend2_shaders0.pk3 (5 files)
./main/sp_pak4.pk3 (21 files)
./main/sp_pak3.pk3 (14 files)
./main/sp_pak2.pk3 (232 files)
./main/sp_pak1.pk3 (1342 files)
./main/pak0.pk3 (4775 files)
./main
    
----------------------
6605 files in pk3 files
Gametype changed, clearing session data.
------- BotLib Initialization -------
------------ Map Loading ------------
trying to load maps/forest_b0.aas
loaded maps/forest_b0.aas
trying to load maps/forest_b1.aas
loaded maps/forest_b1.aas
-------------------------------------
AAS initialized.
AAS initialized.
-----------------------------------
RE_Shutdown( 0 )
----- R_Init -----
------- FBO_Init -------
------- GLSL_InitGPUShaders -------
loaded 276 GLSL shaders (192 gen 42 light 42 etc) in  0.07 seconds
------- R_InitVaos -------
Initializing Shaders
^3WARNING: In shader file scripts/common.shader...Shader "textures/sfx/portal3a_back2" on line 822 is missing closing brace^3.
^3WARNING: In shader file scripts/ui_wolf.shader...Invalid shader name "}" on line 1849.
----- finished R_Init -----
LOADING... collision map
LOADING... sounds
    
.........................
Initializing Sound Scripts
...loading 'sound/scripts/cutscene1.sounds'
...loading 'sound/scripts/cutscene6.sounds'
...loading 'sound/scripts/cutscene9.sounds'
...loading 'sound/scripts/cutscene11.sounds'
...loading 'sound/scripts/cutscene14.sounds'
...loading 'sound/scripts/cutscene19.sounds'
...loading 'sound/scripts/escape1.sounds'
...loading 'sound/scripts/escape2.sounds'
...loading 'sound/scripts/tram.sounds'
...loading 'sound/scripts/village1.sounds'
...loading 'sound/scripts/crypt1.sounds'
...loading 'sound/scripts/crypt2.sounds'
...loading 'sound/scripts/church.sounds'
...loading 'sound/scripts/boss1.sounds'
...loading 'sound/scripts/forest.sounds'
...loading 'sound/scripts/rocket.sounds'
...loading 'sound/scripts/assault.sounds'
...loading 'sound/scripts/sfm.sounds'
...loading 'sound/scripts/factory.sounds'
...loading 'sound/scripts/trainyard.sounds'
...loading 'sound/scripts/swf.sounds'
...loading 'sound/scripts/norway.sounds'
...loading 'sound/scripts/xlabs.sounds'
...loading 'sound/scripts/boss2.sounds'
...loading 'sound/scripts/dam.sounds'
...loading 'sound/scripts/village2.sounds'
...loading 'sound/scripts/chateau.sounds'
...loading 'sound/scripts/dark.sounds'
...loading 'sound/scripts/castle.sounds'
...loading 'sound/scripts/end.sounds'
...loading 'sound/scripts/ai.sounds'
...loading 'sound/scripts/general.sounds'
...loading 'sound/scripts/combat.sounds'
...loading 'sound/scripts/movers.sounds'
done.
LOADING... graphics
LOADING... maps/forest.bsp
stitched 8 LoD cracks
...loaded 6004 faces, 24 meshes, 343 trisurfs, 8 flares
LOADING... game media
LOADING...  - textures
LOADING...  - models
LOADING...  - weapons
LOADING...  - items
LOADING...  - inline models
LOADING...  - server models
LOADING...  - particles
LOADING...  - game media done
LOADING... flamechunks
LOADING... clients
LOADING... WolfPlayer
UI menu load time = 1 milli seconds
CL_InitCGame:  1.42 seconds
95 msec to draw all images
Com_TouchMemory: 0 msec
********************
ERROR: ReadField: function name is greater than buffer (512 chars)
********************
----- Server Shutdown (Server crashed: ReadField: function name is greater than buffer (512 chars)) -----
AAS shutdown.
forcefully unloading qagame vm
---------------------------
RE_Shutdown( 0 )
------- FBO_Shutdown -------
------- R_ShutdownVaos -------
------- GLSL_ShutdownGPUShaders -------
Hunk_Clear: reset the hunk ok
----- R_Init -----
------- FBO_Init -------
------- GLSL_InitGPUShaders -------
loaded 276 GLSL shaders (192 gen 42 light 42 etc) in  0.07 seconds
------- R_InitVaos -------
Initializing Shaders
^3WARNING: In shader file scripts/common.shader...Shader "textures/sfx/portal3a_back2" on line 822 is missing closing brace^3.
^3WARNING: In shader file scripts/ui_wolf.shader...Invalid shader name "}" on line 1849.
----- finished R_Init -----

It happens on all old savegames i tested.

Mouselook stutter during movement

There's very noticeable mouselook microstutter during movement. It's not present in vanilla game or knightmare.
Any ideas how to fix it? I'm on Win10 x64.

Help with Punk Buster

I've found various guides for fixing the Punk Buster issue, but the problem is I'm on Mac and all the guides are for Windows. The best example for this I have is this: http://steamcommunity.com/app/9010/discussions/0/846960628224537824/
Does ioRtCW work around this issue or does it require PB?

Also, in an unrelated request, do you think you could add support for the standalone multiplayer expansion, Enemy Territory? It's a bit of a pain to switch between what is essentially the same game.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.