Server extension for Call Of Duty 1, 2 and 4
C++ C Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
plugins
.gitignore
README.md
config.hpp
cracking.cpp
cracking.hpp
doit.sh
functions.hpp
gsc.cpp
gsc.hpp
gsc_astar.cpp
gsc_astar.hpp
gsc_car.cpp
gsc_car.hpp
gsc_math.cpp
gsc_math.hpp
gsc_memory.cpp
gsc_memory.hpp
gsc_mysql.cpp
gsc_mysql.hpp
gsc_player.cpp
gsc_player.hpp
gsc_tcc.cpp
gsc_tcc.hpp
gsc_utils.cpp
gsc_utils.hpp
java_embed.c
java_embed.h
libcod.cpp
server.c
server.hpp
test.c

README.md

The Call of Duty extension libcod is adding new server-side functions to:

  • Call Of Duty 2 1.2
  • Call Of Duty 2 1.3
  • Call Of Duty 4 1.7

Requirements:

dpkg --add-architecture i386
apt-get update
apt-get install gcc-multilib
apt-get install libmysqlclient-dev:i386
apt-get install g++-multilib

Precompiled shared libraries: http://killtube.org/downloads/libcod/

Starting the server:

LD_PRELOAD=libcod2_1_3_nomysql.so ./cod2_lnxded +set fs_game ...

Some enviroments need LD_LIBRARY_PATH also:

LD_LIBRARY_PATH=. LD_PRELOAD=libcod2_1_3_nomysql.so ./cod2_lnxded +set fs_game ...

Working with the source / Compiling:

./doit.sh tar
./doit.sh base # compiles object files needed by every .so
./doit.sh cod1_1_5 # compiles object files for CoD 1 1.5 and linking them against base to the actual bin/libcod1_1_5.so
./doit.sh cod2_1_2
./doit.sh cod2_1_3
./doit.sh cod4_1_7
./doit.sh wrapper

Mods depending on libcod:

Little overview of added functions:

  • MySQL
  • setVelocity, getVelocity, addVelocity (needed for the mods: portal, surf)
  • keyPressed-functions for left, right, forward, backward, leanleft, leanright, jump etc., (needed for: surf, doublejump made by IzNoGod)
  • blazing fast astar-implementation (needed for: zombots)
  • setAlive-function (needed for: zombots, so xmodels are damagable without damage-trigger... zombots in stockmaps)
  • disableGlobalPlayerCollision()

Community / Help: http://killtube.org/forum.php

Porting libcod to a new Call Of Duty: find . -name '*.c*' | xargs grep -n _VERSION