mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-01 05:00:46 +00:00
Updated to support mvdsv's qvm api version 13 instead.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3255 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
03aa7fefaf
commit
f7b9395261
1 changed files with 11 additions and 12 deletions
|
@ -23,12 +23,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#ifdef VM_Q1
|
#ifdef VM_Q1
|
||||||
|
|
||||||
#define GAME_API_VERSION 12
|
#define GAME_API_VERSION 13
|
||||||
#define MAX_Q1QVM_EDICTS 768 //according to ktx at api version 12 (fte's protocols go to 2048)
|
#define MAX_Q1QVM_EDICTS 768 //according to ktx at api version 12 (fte's protocols go to 2048)
|
||||||
|
|
||||||
#define VMFSID_Q1QVM 57235 //a cookie
|
#define VMFSID_Q1QVM 57235 //a cookie
|
||||||
|
|
||||||
#define WASTED_EDICT_T_SIZE 112 //qclib has split edict_t and entvars_t.
|
#define WASTED_EDICT_T_SIZE sizeof(void*) //qclib has split edict_t and entvars_t.
|
||||||
//mvdsv and the api we're implementing has them in one lump
|
//mvdsv and the api we're implementing has them in one lump
|
||||||
//so we need to bias our entvars_t and fake the offsets a little.
|
//so we need to bias our entvars_t and fake the offsets a little.
|
||||||
|
|
||||||
|
@ -982,7 +982,10 @@ static int syscallqvm (void *offset, unsigned int mask, int fn, const int *arg)
|
||||||
if (VM_OOB(arg[1], arg[2]))
|
if (VM_OOB(arg[1], arg[2]))
|
||||||
return -1;
|
return -1;
|
||||||
cv = Cvar_Get(VM_POINTER(arg[0]), "", 0, "QC variables");
|
cv = Cvar_Get(VM_POINTER(arg[0]), "", 0, "QC variables");
|
||||||
|
if (cv)
|
||||||
Q_strncpyz(VM_POINTER(arg[1]), cv->string, VM_LONG(arg[2]));
|
Q_strncpyz(VM_POINTER(arg[1]), cv->string, VM_LONG(arg[2]));
|
||||||
|
else
|
||||||
|
Q_strncpyz(VM_POINTER(arg[1]), "", VM_LONG(arg[2]));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1427,14 +1430,10 @@ qboolean Q1QVM_ClientSay(edict_t *player, qboolean team)
|
||||||
if (!q1qvm)
|
if (!q1qvm)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
SV_EndRedirect();
|
|
||||||
|
|
||||||
pr_global_struct->time = sv.physicstime;
|
pr_global_struct->time = sv.physicstime;
|
||||||
pr_global_struct->self = Q1QVMPF_EdictToProgs(svprogfuncs, player);
|
pr_global_struct->self = Q1QVMPF_EdictToProgs(svprogfuncs, player);
|
||||||
washandled = VM_Call(q1qvm, GAME_CLIENT_SAY, team);
|
washandled = VM_Call(q1qvm, GAME_CLIENT_SAY, team);
|
||||||
|
|
||||||
SV_BeginRedirect(RD_CLIENT, host_client->language); //put it back to how we expect it was. *shudder*
|
|
||||||
|
|
||||||
return washandled;
|
return washandled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue