-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
586 changed files
with
200,042 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
#C file types to ignore | ||
|
||
*.o | ||
|
||
*.dll | ||
|
||
*.so | ||
|
||
*.exe | ||
|
||
*.lib | ||
|
||
*.def | ||
|
||
|
||
#Git files | ||
|
||
git-pull.sh | ||
|
||
git-push.sh | ||
|
||
git-status.sh | ||
|
||
|
||
build_official* | ||
bin/sys_error.txt | ||
bin/logs/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
CoD4X18-Server | ||
================ | ||
|
||
A custom dedicated server for the Call of Duty 4 game. | ||
|
||
If you find any bugs, please create an issue here on github. | ||
|
||
|
||
COPYRIGHT | ||
========= | ||
CoD4X is copyrighted by Ninja and TheKelm | ||
Large portions of CoD4X are copyrighted by "Id Software, Inc." | ||
Several portions are part of the "ioQuake-3 project". | ||
unzip is copyrighted by Gilles Vollant, Jean-loup Gailly and Mark Adler | ||
LibTomCrypt is copyrighted Tom St Denis. | ||
LibTomMath is copyrighted Tom St Denis. | ||
maxmind_geoip.c is copyrighted by "MaxMind LLC". | ||
|
||
LICENSE | ||
======= | ||
|
||
CoD4X is released under GNU Affero General Public License, see copying.txt | ||
|
||
Plugin Handler is released under GNU Affero General Public License, see copying.txt (if you want to request another license on Plugin Handler API for your plugin, contact us) | ||
|
||
Other: | ||
|
||
-LibTomMath and LibTomCrypt libraries are public domain, available at http://libtom.org/ | ||
|
||
-unzip.c is part of zlib and contains own license agreements you can find below: | ||
|
||
IO on .zip files using portions of zlib | ||
--------------------------------------------------------------------------- | ||
lines file(s) | ||
4301 src/qcommon/unzip.c | ||
Copyright (C) 1998 Gilles Vollant | ||
zlib is Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler | ||
|
||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
|
||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
|
||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
CONTACT | ||
======= | ||
|
||
https://cod4x.me |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
echo Compiling C-code... | ||
|
||
cd bin | ||
|
||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/unix/sys_unix.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/unix/sys_linux.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/unix/elf32_parser.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/unix/sys_cod4linker_linux.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/unix/sys_con_tty.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/*.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -D _GNU_SOURCE -c ../src/zlib/*.c | ||
|
||
cd ../ | ||
|
||
echo Compiling NASM... | ||
|
||
nasm -f elf src/qcommon_hooks.asm -o bin/qcommon_hooks.o | ||
nasm -f elf src/cmd_hooks.asm -o bin/cmd_hooks.o | ||
nasm -f elf src/filesystem_hooks.asm -o bin/filesystem_hooks.o | ||
nasm -f elf src/xassets_hooks.asm -o bin/xassets_hooks.o | ||
nasm -f elf src/trace_hooks.asm -o bin/trace_hooks.o | ||
nasm -f elf src/misc_hooks.asm -o bin/misc_hooks.o | ||
nasm -f elf src/scr_vm_hooks.asm -o bin/scr_vm_hooks.o | ||
nasm -f elf src/g_sv_hooks.asm -o bin/g_sv_hooks.o | ||
nasm -f elf src/server_hooks.asm -o bin/server_hooks.o | ||
nasm -f elf src/msg_hooks.asm -o bin/msg_hooks.o | ||
nasm -f elf src/pluginexports.asm -o bin/pluginexports.o | ||
|
||
echo Linking... | ||
gcc -m32 -rdynamic -Tlinkerscript.ld -o bin/cod4x18_dedrun bin/*.o -L./lib -ltomcrypt_linux -ltommath_linux -lsvsapi_elf -ldl -lpthread -lm -lstdc++ -lsteam_api -Wl,-rpath=./ | ||
rm bin/*.o | ||
|
||
cp lib/libsteam_api.so bin | ||
cp lib/steamclient.so bin | ||
|
||
./version_make_progress.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
echo Compiling C-code... | ||
cd bin | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -c ../src/unix/sys_unix.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -c ../src/unix/sys_mach.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -c ../src/unix/sys_cod4linker_mach.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -c ../src/unix/sys_con_tty.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -c ../src/*.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -c ../src/zlib/*.c | ||
cd ../ | ||
|
||
echo Compiling NASM... | ||
nasm -f macho src/qcommon_hooks.asm --prefix _ -o bin/qcommon_hooks.o | ||
nasm -f macho src/cmd_hooks.asm --prefix _ -o bin/cmd_hooks.o | ||
nasm -f macho src/filesystem_hooks.asm --prefix _ -o bin/filesystem_hooks.o | ||
nasm -f macho src/xassets_hooks.asm --prefix _ -o bin/xassets_hooks.o | ||
nasm -f macho src/trace_hooks.asm --prefix _ -o bin/trace_hooks.o | ||
nasm -f macho src/misc_hooks.asm --prefix _ -o bin/misc_hooks.o | ||
nasm -f macho src/scr_vm_hooks.asm --prefix _ -o bin/scr_vm_hooks.o | ||
nasm -f macho src/g_sv_hooks.asm --prefix _ -o bin/g_sv_hooks.o | ||
nasm -f macho src/server_hooks.asm --prefix _ -o bin/server_hooks.o | ||
nasm -f macho src/msg_hooks.asm --prefix _ -o bin/msg_hooks.o | ||
nasm -f macho src/pluginexports.asm --prefix _ -o bin/pluginexports.o | ||
|
||
|
||
echo Linking... | ||
gcc -m32 -stdlib=libc++ -rdynamic -o bin/cod4x18_dedrun bin/*.o -Llib/ -ltomcrypt_mach -ltommath_mach -Wl -ldl -lpthread -lm -lstdc++ | ||
|
||
#rm bin/*.o | ||
|
||
./version_make_progress.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
echo Compiling C-code... | ||
|
||
cd bin | ||
|
||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/unix/sys_unix.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/unix/sys_linux.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/unix/elf32_parser.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/unix/sys_cod4linker_linux.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D _GNU_SOURCE -c ../src/unix/sys_con_tty.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -I../lib_tomcrypt/headers -I../lib_tomcrypt/math/tommath -D COD4X18UPDATE -D OFFICIAL -D _GNU_SOURCE -c ../src/*.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -D _GNU_SOURCE -c ../src/zlib/*.c | ||
|
||
cd ../ | ||
|
||
echo Compiling NASM... | ||
|
||
nasm -f elf src/qcommon_hooks.asm -o bin/qcommon_hooks.o | ||
nasm -f elf src/cmd_hooks.asm -o bin/cmd_hooks.o | ||
nasm -f elf src/filesystem_hooks.asm -o bin/filesystem_hooks.o | ||
nasm -f elf src/xassets_hooks.asm -o bin/xassets_hooks.o | ||
nasm -f elf src/trace_hooks.asm -o bin/trace_hooks.o | ||
nasm -f elf src/misc_hooks.asm -o bin/misc_hooks.o | ||
nasm -f elf src/scr_vm_hooks.asm -o bin/scr_vm_hooks.o | ||
nasm -f elf src/g_sv_hooks.asm -o bin/g_sv_hooks.o | ||
nasm -f elf src/server_hooks.asm -o bin/server_hooks.o | ||
nasm -f elf src/msg_hooks.asm -o bin/msg_hooks.o | ||
nasm -f elf src/pluginexports.asm -o bin/pluginexports.o | ||
|
||
echo Linking... | ||
gcc -m32 -static-libgcc -rdynamic -Tlinkerscript.ld -o bin/cod4x18_dedrun bin/*.o -L./lib -lmbedtls -lmbedcrypto -lmbedx509 -ltomcrypt_linux -ltommath_linux -ldl -lpthread -lm -lstdc++ -Wl,-rpath=./ | ||
rm bin/*.o | ||
|
||
#cp lib/steamclient.so bin | ||
|
||
/sbin/paxctl -c ./bin/cod4x18_dedrun | ||
/sbin/paxctl -em ./bin/cod4x18_dedrun | ||
|
||
./version_make_progress.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@set path=%LOCALAPPDATA%\nasm;C:\MinGW\bin;%path% | ||
@echo off | ||
|
||
echo Compiling C-code... | ||
cd bin | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -march=nocona -D WINVER=0x501 -I..\lib_tomcrypt\headers -I..\lib_tomcrypt\math\tommath -c ..\src\win32\sys_win32.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -march=nocona -D WINVER=0x501 -I..\lib_tomcrypt\headers -I..\lib_tomcrypt\math\tommath -c ..\src\win32\win_syscon.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -march=nocona -D WINVER=0x501 -I..\lib_tomcrypt\headers -I..\lib_tomcrypt\math\tommath -c ..\src\win32\sys_cod4linker_win32.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -march=nocona -D WINVER=0x501 -I..\lib_tomcrypt\headers -I..\lib_tomcrypt\math\tommath -c ..\src\win32\pe32_parser.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -march=nocona -D OFFICIAL -D COD4X18UPDATE -D WINVER=0x501 -I..\lib_tomcrypt\headers -I..\lib_tomcrypt\math\tommath -c ..\src\*.c | ||
gcc -m32 -Wall -O0 -g -fno-omit-frame-pointer -mtune=nocona -D WINVER=0x501 -c ..\src\zlib\*.c | ||
cd ..\ | ||
|
||
echo Compiling NASM... | ||
nasm -f coff src\qcommon_hooks.asm --prefix _ -o bin\qcommon_hooks.o | ||
nasm -f coff src\cmd_hooks.asm --prefix _ -o bin\cmd_hooks.o | ||
nasm -f coff src\filesystem_hooks.asm --prefix _ -o bin\filesystem_hooks.o | ||
nasm -f coff src\xassets_hooks.asm --prefix _ -o bin\xassets_hooks.o | ||
nasm -f coff src\trace_hooks.asm --prefix _ -o bin\trace_hooks.o | ||
nasm -f coff src\misc_hooks.asm --prefix _ -o bin\misc_hooks.o | ||
nasm -f coff src\scr_vm_hooks.asm --prefix _ -o bin\scr_vm_hooks.o | ||
nasm -f coff src\g_sv_hooks.asm --prefix _ -o bin\g_sv_hooks.o | ||
nasm -f coff src\server_hooks.asm --prefix _ -o bin\server_hooks.o | ||
nasm -f coff src\msg_hooks.asm --prefix _ -o bin\msg_hooks.o | ||
nasm -f coff src\pluginexports.asm -dWin32 --prefix _ -o bin\pluginexports.o | ||
|
||
echo Linking... | ||
gcc -m32 -g -Wl,--nxcompat,--image-base,0x8040000,--stack,0x800000 -Tlinkerscript_win32.ld -o bin\cod4x18_dedrun bin\*.o src\win32\win_cod4.res -Llib\ -ltomcrypt_win32 -ltommath_win32 -lmbedtls_win32 -lm -lws2_32 -lwsock32 -lgdi32 -mwindows -lwinmm -static-libgcc -static -lstdc++ | ||
|
||
echo Cleaning up... | ||
cd bin | ||
del *.o | ||
|
||
echo Creating plugin export lib... | ||
|
||
pexports cod4x18_dedrun.exe > cod4x18_dedrun.def | ||
rename cod4x18_dedrun.exe _____________________________________________cod4x18_dedrun.exe | ||
dlltool -D _____________________________________________cod4x18_dedrun.exe -d cod4x18_dedrun.def -l ..\plugins\libcom_plugin.a | ||
rename _____________________________________________cod4x18_dedrun.exe cod4x18_dedrun.exe | ||
|
||
echo Done! | ||
pause | ||
REM .\version_make_progress.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
|
||
July 7 2013: | ||
|
||
Code_CallbackPlayerSay*: Added 2nd argument (to entity) | ||
|
||
August 11 2013 | ||
Code_CallbackPlayerSay*: 2nd argument = boolean teamchat -> false: toall true: onlyteam | ||
|
||
|
||
Hmm I was too lazy to write anything... | ||
|
||
February 3 2014: | ||
|
||
CodeCallback_PlayerSayCmd is removed. | ||
CodeCallback_PlayerSayAll is renamed to CodeCallback_PlayerSay. | ||
CodeCallback_ScriptCommand added as well as script function: addscriptcommand() | ||
|
||
Fixed an issue that cheatprotected cvars got no reset on level startup which caused strange effects on Deathrun mod with bg_falldamage cvars. | ||
|
||
June 22 2014: | ||
Removed chat trap for script when a command gets invoked. | ||
Use CodeCallback_ScriptCommand and addscriptcommand() instead (see scriptcommand_example.txt) | ||
|
||
Added securemode which should prevent breaking out of cod4 server into shell. | ||
|
||
|
||
June 29 2014: | ||
Removed the non working recusion callback function for player's chat. Use plugins instead. | ||
|
||
July 27 2014: | ||
exec() script function now returns the result as string truncated - Maybe this functionality getting removed later again if issues arise | ||
|
||
September 09 2014: | ||
exec is now execex | ||
exec works like before July 27 2014 |
Oops, something went wrong.