mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +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
|
||||
|
||||
#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 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
|
||||
//so we need to bias our entvars_t and fake the offsets a little.
|
||||
|
||||
|
@ -139,7 +139,7 @@ typedef enum
|
|||
|
||||
G_PRECACHE_VWEP_MODEL,
|
||||
G_SETPAUSE,
|
||||
G_SETUSERINFO,
|
||||
G_SETUSERINFO,
|
||||
G_MOVETOGOAL,
|
||||
|
||||
|
||||
|
@ -982,7 +982,10 @@ static int syscallqvm (void *offset, unsigned int mask, int fn, const int *arg)
|
|||
if (VM_OOB(arg[1], arg[2]))
|
||||
return -1;
|
||||
cv = Cvar_Get(VM_POINTER(arg[0]), "", 0, "QC variables");
|
||||
Q_strncpyz(VM_POINTER(arg[1]), cv->string, VM_LONG(arg[2]));
|
||||
if (cv)
|
||||
Q_strncpyz(VM_POINTER(arg[1]), cv->string, VM_LONG(arg[2]));
|
||||
else
|
||||
Q_strncpyz(VM_POINTER(arg[1]), "", VM_LONG(arg[2]));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1113,10 +1116,10 @@ Con_DPrintf("PF_readcmd: %s\n%s", s, output);
|
|||
if (*key == '*' && (VM_LONG(arg[3])&1))
|
||||
return -1; //denied!
|
||||
}
|
||||
//fallthrough
|
||||
|
||||
case G_MOVETOGOAL:
|
||||
return !!WrapQCBuiltin(SV_MoveToGoal, offset, mask, arg, "f");
|
||||
//fallthrough
|
||||
|
||||
case G_MOVETOGOAL:
|
||||
return !!WrapQCBuiltin(SV_MoveToGoal, offset, mask, arg, "f");
|
||||
|
||||
case G_SetBotUserInfo:
|
||||
WrapQCBuiltin(PF_ForceInfoKey, offset, mask, arg, "ess");
|
||||
|
@ -1427,14 +1430,10 @@ qboolean Q1QVM_ClientSay(edict_t *player, qboolean team)
|
|||
if (!q1qvm)
|
||||
return false;
|
||||
|
||||
SV_EndRedirect();
|
||||
|
||||
pr_global_struct->time = sv.physicstime;
|
||||
pr_global_struct->self = Q1QVMPF_EdictToProgs(svprogfuncs, player);
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue