Skip to content

QVM API 16 and support "sv_pr2references" for 64 bit native builds

Latest
Compare
Choose a tag to compare
@angeld29 angeld29 released this 04 Feb 15:18
Changes in GAME_API_VERSION 16
qvm ported from q3
server change string pointers in mod memory only in trapcall( strings passed from mod, and placed in mod memory)
never use pointers to memory outside mod memory, this cannot work in qvm in 64 bit server
SetString now work only for original dat mods
mapname and client netnames getting by get_infokey trap

******** CHANGES in MOD for API 16

  • remove all server data from edict_t
    now it must be
    typedef struct shared_edict_s { entvars_t v; } edict_t;

  • mod must get client netname in GAME_CLIENT_CONNECT call
    self = PROG_TO_EDICT( g_globalvars.self );
    self->s.v.netname = netnames[NUM_FOR_EDICT(self)-1]; //Init client names
    infokey( self, "netname", self->s.v.netname, 32);

  • mapname can obtain in GAME_LOADENTS call
    infokey( world, "mapname", mapname, sizeof(mapname) );

  • added parametr to GAME_CLIENT_USERINFO_CHANGED call
    called with 0 before changing, with 1 after changing
    mod must update client netname in call with param 1 and key = "name"