Skip to content

angeld29/TF2003-qvm

Repository files navigation

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.) 

About

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.)

Resources

License

Stars

Watchers

Forks

Packages

No packages published