QuakeWorld TeamFortress 2003 (qvm version) (Based on TF 2.8.1, using code from TF 2.8.1b1, TF 2.9, Clan TF 3.0, Dragon TF, Omi TF and some original developments.)
Switch branches/tags
Nothing to show
Clone or download
Latest commit e658397 Jul 13, 2012
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs stream version 2006-11-29 Nov 29, 2006
include QVM API 12 Nov 26, 2006
src replaced findradius and makevectors -> trap_ versions Nov 29, 2006
LICENSE gnu Dec 23, 2004
Makefile.in build 02.10.2004 Oct 2, 2004
README readme Jul 13, 2012
config.guess linux compilation Oct 1, 2004
config.sub linux compilation Oct 1, 2004
configure linux compilation Oct 1, 2004
configure.in linux compilation Oct 1, 2004
install-sh linux compilation Oct 1, 2004
makevm.bat crc32 Nov 26, 2005
qwprogs.dsp fixed projects Mar 9, 2006
qwprogs.dsw Initial revision Sep 5, 2004
qwprogs.sln small fixes Nov 21, 2006
qwprogs.vcproj fixed projects Mar 9, 2006
todo.txt replaced findradius and makevectors -> trap_ versions Nov 29, 2006

README

this mod can be launched with qwsv262 or mvdsv (quakeworld servers)

Do not use double in mods, qvm does not support it.

Do not modify progdefs.h and g_public.h.

Use PROG_TO_EDICT, EDICT_TO_PROG for working with (gedict_t)->s.v entity
fields (like .owner, .enemy).

Map entities are described in g_spawn.c in tables:
field_t         fields[]
spawn_t         spawns[]

Missile spawn requires g_globalvars.newmis set.

dont use string arrys in one structure with other types ( q3asm place strings in different segment )

dont use map command with redirectcmd, executecmd, readcmd

compiler bugs/features:

# switch statements sometimes produce unsafe code if you use run-on in case 
labels. ie. each case label must have it's own break statement OR no lines of 
logic between the next case label. 
# For integer types avoid using data types other than int. Specifically don't 
use the short or unsigned char data types at all (info from ID). The Q3VM and 
compiler do not deal with non-wordsize types well -- using them often results 
in unpredictable behaviour. 
# double does not exist, everything is 32bit. float does not undergo type 
promotion when passed as a parameter. 

Mac VM Endianness

The Mac VM is big endian (high byte first in integers and shorts), which means 
you need to be careful with certain I/O operations. For example, you can't 
serialize an integer to a file stream just by writing its bytes. 
("trap_FS_Write(&i, 4, f)" - if "i" is an int - will produce different results 
in the Mac VM than in the PC VM, in other words.) 

Extracting bytes using shift operators and writing them to a temporary buffer 
will work. Or write your own htonl(), etc. (It's easy to tell if you need to 
swap bytes: assign an int to a constant, get a char* pointer to it, and check 
the bytes.)