Make ktpro work a bit better, a few new csqc builtins
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1135 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
6bb342cb83
commit
372d64347f
10 changed files with 162 additions and 90 deletions
|
@ -42,15 +42,15 @@ keydest_t key_dest;
|
||||||
|
|
||||||
int key_count; // incremented every key event
|
int key_count; // incremented every key event
|
||||||
|
|
||||||
char *keybindings[256][KEY_MODIFIERSTATES];
|
char *keybindings[K_MAX][KEY_MODIFIERSTATES];
|
||||||
qbyte bindcmdlevel[256][KEY_MODIFIERSTATES];
|
qbyte bindcmdlevel[K_MAX][KEY_MODIFIERSTATES];
|
||||||
qboolean consolekeys[256]; // if true, can't be rebound while in console
|
qboolean consolekeys[K_MAX]; // if true, can't be rebound while in console
|
||||||
qboolean menubound[256]; // if true, can't be rebound while in menu
|
qboolean menubound[K_MAX]; // if true, can't be rebound while in menu
|
||||||
int keyshift[256]; // key to map to if shift held down in console
|
int keyshift[K_MAX]; // key to map to if shift held down in console
|
||||||
int key_repeats[256]; // if > 1, it is autorepeating
|
int key_repeats[K_MAX]; // if > 1, it is autorepeating
|
||||||
qboolean keydown[256];
|
qboolean keydown[K_MAX];
|
||||||
|
|
||||||
qboolean deltaused[256][KEY_MODIFIERSTATES];
|
qboolean deltaused[K_MAX][KEY_MODIFIERSTATES];
|
||||||
|
|
||||||
extern cvar_t con_displaypossabilities;
|
extern cvar_t con_displaypossabilities;
|
||||||
extern cvar_t cl_chatmode;
|
extern cvar_t cl_chatmode;
|
||||||
|
@ -686,6 +686,12 @@ void Key_Message (int key)
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
char *Key_GetBinding(int keynum)
|
||||||
|
{
|
||||||
|
if (keynum >= 0 && keynum < K_MAX)
|
||||||
|
return keybindings[keynum][0];
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===================
|
===================
|
||||||
|
@ -851,7 +857,7 @@ void Key_Unbindall_f (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0 ; i<256 ; i++)
|
for (i=0 ; i<K_MAX ; i++)
|
||||||
if (keybindings[i])
|
if (keybindings[i])
|
||||||
Key_SetBinding (i, ~0, NULL, Cmd_ExecLevel);
|
Key_SetBinding (i, ~0, NULL, Cmd_ExecLevel);
|
||||||
}
|
}
|
||||||
|
@ -969,7 +975,7 @@ void Key_WriteBindings (FILE *f)
|
||||||
|
|
||||||
char prefix[128];
|
char prefix[128];
|
||||||
|
|
||||||
for (i=0 ; i<256 ; i++) //we rebind the key with all modifiers to get the standard bind, then change the specific ones.
|
for (i=0 ; i<K_MAX ; i++) //we rebind the key with all modifiers to get the standard bind, then change the specific ones.
|
||||||
{ //this does two things, it normally allows us to skip 7 of the 8 possabilities
|
{ //this does two things, it normally allows us to skip 7 of the 8 possabilities
|
||||||
base = keybindings[i][0]; //plus we can use the config with other clients.
|
base = keybindings[i][0]; //plus we can use the config with other clients.
|
||||||
if (!base)
|
if (!base)
|
||||||
|
@ -1054,7 +1060,7 @@ void Key_Init (void)
|
||||||
consolekeys['`'] = false;
|
consolekeys['`'] = false;
|
||||||
consolekeys['~'] = false;
|
consolekeys['~'] = false;
|
||||||
|
|
||||||
for (i=0 ; i<256 ; i++)
|
for (i=0 ; i<K_MAX ; i++)
|
||||||
keyshift[i] = i;
|
keyshift[i] = i;
|
||||||
for (i='a' ; i<='z' ; i++)
|
for (i='a' ; i<='z' ; i++)
|
||||||
keyshift[i] = i - 'a' + 'A';
|
keyshift[i] = i - 'a' + 'A';
|
||||||
|
@ -1119,7 +1125,7 @@ void Key_Event (int key, qboolean down)
|
||||||
|
|
||||||
keystate = KeyModifier(keydown[K_SHIFT], keydown[K_ALT], keydown[K_CTRL]);
|
keystate = KeyModifier(keydown[K_SHIFT], keydown[K_ALT], keydown[K_CTRL]);
|
||||||
|
|
||||||
for (k = 0; k < 256; k++)
|
for (k = 0; k < K_MAX; k++)
|
||||||
{ //go through the old state removing all depressed keys. they are all up now.
|
{ //go through the old state removing all depressed keys. they are all up now.
|
||||||
|
|
||||||
if (k == K_SHIFT || k == K_ALT || k == K_CTRL)
|
if (k == K_SHIFT || k == K_ALT || k == K_CTRL)
|
||||||
|
@ -1401,7 +1407,7 @@ void Key_ClearStates (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0 ; i<256 ; i++)
|
for (i=0 ; i<K_MAX ; i++)
|
||||||
{
|
{
|
||||||
keydown[i] = false;
|
keydown[i] = false;
|
||||||
key_repeats[i] = false;
|
key_repeats[i] = false;
|
||||||
|
|
|
@ -151,14 +151,16 @@ K_AUX31 = 237,
|
||||||
K_AUX32 = 238,
|
K_AUX32 = 238,
|
||||||
K_LWIN = 239,
|
K_LWIN = 239,
|
||||||
K_RWIN = 240,
|
K_RWIN = 240,
|
||||||
K_APP = 241
|
K_APP = 241,
|
||||||
|
|
||||||
|
K_MAX = 256
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {key_game, key_console, key_message, key_menu, key_editor} keydest_t;
|
typedef enum {key_game, key_console, key_message, key_menu, key_editor} keydest_t;
|
||||||
|
|
||||||
extern keydest_t key_dest;
|
extern keydest_t key_dest;
|
||||||
extern char *keybindings[256][8];
|
extern char *keybindings[K_MAX][8];
|
||||||
extern int key_repeats[256];
|
extern int key_repeats[K_MAX];
|
||||||
extern int key_count; // incremented every key event
|
extern int key_count; // incremented every key event
|
||||||
extern int key_lastpress;
|
extern int key_lastpress;
|
||||||
|
|
||||||
|
|
|
@ -285,11 +285,16 @@ void PF_CL_free_pic (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
void PF_CL_drawcharacter (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
void PF_CL_drawcharacter (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
void PF_CL_drawstring (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
void PF_CL_drawstring (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
void PF_CL_drawpic (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
void PF_CL_drawpic (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
|
void PF_CL_drawline (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
void PF_CL_drawfill (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
void PF_CL_drawfill (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
void PF_CL_drawsetcliparea (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
void PF_CL_drawsetcliparea (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
void PF_CL_drawresetcliparea (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
void PF_CL_drawresetcliparea (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
void PF_CL_drawgetimagesize (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
void PF_CL_drawgetimagesize (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
|
|
||||||
|
void PF_cl_keynumtostring (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
|
void PF_cl_stringtokeynum(progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
|
void PF_cl_getkeybind (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
|
|
||||||
void search_close_progs(progfuncs_t *prinst, qboolean complain);
|
void search_close_progs(progfuncs_t *prinst, qboolean complain);
|
||||||
void PF_search_begin (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
void PF_search_begin (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
void PF_search_end (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
void PF_search_end (progfuncs_t *prinst, struct globalvars_s *pr_globals);
|
||||||
|
@ -406,6 +411,13 @@ static void PF_Fixme (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
prinst->RunError(prinst, "\nBuiltin %i not implemented.\nCSQC is not compatable.", prinst->lastcalledbuiltinnumber);
|
prinst->RunError(prinst, "\nBuiltin %i not implemented.\nCSQC is not compatable.", prinst->lastcalledbuiltinnumber);
|
||||||
PR_BIError (prinst, "bulitin not implemented");
|
PR_BIError (prinst, "bulitin not implemented");
|
||||||
}
|
}
|
||||||
|
static void PF_NoCSQC (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
|
{
|
||||||
|
Con_Printf("\n");
|
||||||
|
|
||||||
|
prinst->RunError(prinst, "\nBuiltin %i does not make sense in csqc.\nCSQC is not compatable.", prinst->lastcalledbuiltinnumber);
|
||||||
|
PR_BIError (prinst, "bulitin not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
static void PF_cl_cprint (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
static void PF_cl_cprint (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
|
@ -1657,15 +1669,15 @@ PF_vectoyaw, // #13 float(vector v) vectoyaw (QUAKE)
|
||||||
PF_Spawn, // #14 entity() spawn (QUAKE)
|
PF_Spawn, // #14 entity() spawn (QUAKE)
|
||||||
PF_cs_remove, // #15 void(entity e) remove (QUAKE)
|
PF_cs_remove, // #15 void(entity e) remove (QUAKE)
|
||||||
PF_cs_traceline, // #16 void(vector v1, vector v2, float nomonst, entity forent) traceline (QUAKE)
|
PF_cs_traceline, // #16 void(vector v1, vector v2, float nomonst, entity forent) traceline (QUAKE)
|
||||||
PF_Fixme, // #17 entity() checkclient (QUAKE) (don't support)
|
PF_NoCSQC, // #17 entity() checkclient (QUAKE) (don't support)
|
||||||
PF_FindString, // #18 entity(entity start, .string fld, string match) findstring (QUAKE)
|
PF_FindString, // #18 entity(entity start, .string fld, string match) findstring (QUAKE)
|
||||||
PF_cs_PrecacheSound, // #19 void(string str) precache_sound (QUAKE)
|
PF_cs_PrecacheSound, // #19 void(string str) precache_sound (QUAKE)
|
||||||
//20
|
//20
|
||||||
PF_cs_PrecacheModel, // #20 void(string str) precache_model (QUAKE)
|
PF_cs_PrecacheModel, // #20 void(string str) precache_model (QUAKE)
|
||||||
PF_Fixme, // #21 void(entity client, string s) stuffcmd (QUAKE) (don't support)
|
PF_NoCSQC, // #21 void(entity client, string s) stuffcmd (QUAKE) (don't support)
|
||||||
PF_cs_findradius, // #22 entity(vector org, float rad) findradius (QUAKE)
|
PF_cs_findradius, // #22 entity(vector org, float rad) findradius (QUAKE)
|
||||||
PF_Fixme, // #23 void(string s, ...) bprint (QUAKE) (don't support)
|
PF_NoCSQC, // #23 void(string s, ...) bprint (QUAKE) (don't support)
|
||||||
PF_Fixme, // #24 void(entity e, string s, ...) sprint (QUAKE) (don't support)
|
PF_NoCSQC, // #24 void(entity e, string s, ...) sprint (QUAKE) (don't support)
|
||||||
PF_dprint, // #25 void(string s, ...) dprint (QUAKE)
|
PF_dprint, // #25 void(string s, ...) dprint (QUAKE)
|
||||||
PF_ftos, // #26 string(float f) ftos (QUAKE)
|
PF_ftos, // #26 string(float f) ftos (QUAKE)
|
||||||
PF_vtos, // #27 string(vector f) vtos (QUAKE)
|
PF_vtos, // #27 string(vector f) vtos (QUAKE)
|
||||||
|
@ -1687,7 +1699,7 @@ PF_cs_checkbottom, // #40 float(entity e) checkbottom (QUAKE)
|
||||||
PF_cs_pointcontents, // #41 float(vector org) pointcontents (QUAKE)
|
PF_cs_pointcontents, // #41 float(vector org) pointcontents (QUAKE)
|
||||||
PF_Fixme, // #42
|
PF_Fixme, // #42
|
||||||
PF_fabs, // #43 float(float f) fabs (QUAKE)
|
PF_fabs, // #43 float(float f) fabs (QUAKE)
|
||||||
PF_Fixme, // #44 vector(entity e, float speed) aim (QUAKE) (don't support)
|
PF_NoCSQC, // #44 vector(entity e, float speed) aim (QUAKE) (don't support)
|
||||||
PF_cvar, // #45 float(string cvarname) cvar (QUAKE)
|
PF_cvar, // #45 float(string cvarname) cvar (QUAKE)
|
||||||
PF_localcmd, // #46 void(string str) localcmd (QUAKE)
|
PF_localcmd, // #46 void(string str) localcmd (QUAKE)
|
||||||
PF_nextent, // #47 entity(entity e) nextent (QUAKE)
|
PF_nextent, // #47 entity(entity e) nextent (QUAKE)
|
||||||
|
@ -1716,24 +1728,24 @@ PF_cs_tracetoss, // #64 void(entity ent, entity ignore) tracetoss (DP_QC_TRACET
|
||||||
PF_etos, // #65 string(entity ent) etos (DP_QC_ETOS)
|
PF_etos, // #65 string(entity ent) etos (DP_QC_ETOS)
|
||||||
PF_Fixme, // #66
|
PF_Fixme, // #66
|
||||||
PF_Fixme, // #67 void(float step) movetogoal (QUAKE)
|
PF_Fixme, // #67 void(float step) movetogoal (QUAKE)
|
||||||
PF_Fixme, // #68 void(string s) precache_file (QUAKE) (don't support)
|
PF_NoCSQC, // #68 void(string s) precache_file (QUAKE) (don't support)
|
||||||
PF_cs_makestatic, // #69 void(entity e) makestatic (QUAKE)
|
PF_cs_makestatic, // #69 void(entity e) makestatic (QUAKE)
|
||||||
//70
|
//70
|
||||||
PF_Fixme, // #70 void(string mapname) changelevel (QUAKE) (don't support)
|
PF_NoCSQC, // #70 void(string mapname) changelevel (QUAKE) (don't support)
|
||||||
PF_Fixme, // #71
|
PF_Fixme, // #71
|
||||||
PF_cvar_set, // #72 void(string cvarname, string valuetoset) cvar_set (QUAKE)
|
PF_cvar_set, // #72 void(string cvarname, string valuetoset) cvar_set (QUAKE)
|
||||||
PF_Fixme, // #73 void(entity ent, string text) centerprint (QUAKE) (don't support - cprint is supported instead)
|
PF_NoCSQC, // #73 void(entity ent, string text) centerprint (QUAKE) (don't support - cprint is supported instead)
|
||||||
PF_cl_ambientsound, // #74 void (vector pos, string samp, float vol, float atten) ambientsound (QUAKE)
|
PF_cl_ambientsound, // #74 void (vector pos, string samp, float vol, float atten) ambientsound (QUAKE)
|
||||||
|
|
||||||
PF_cs_PrecacheModel, // #75 void(string str) precache_model2 (QUAKE)
|
PF_cs_PrecacheModel, // #75 void(string str) precache_model2 (QUAKE)
|
||||||
PF_cs_PrecacheSound, // #76 void(string str) precache_sound2 (QUAKE)
|
PF_cs_PrecacheSound, // #76 void(string str) precache_sound2 (QUAKE)
|
||||||
PF_Fixme, // #77 void(string str) precache_file2 (QUAKE)
|
PF_NoCSQC, // #77 void(string str) precache_file2 (QUAKE)
|
||||||
PF_Fixme, // #78 void() setspawnparms (QUAKE) (don't support)
|
PF_NoCSQC, // #78 void() setspawnparms (QUAKE) (don't support)
|
||||||
PF_Fixme, // #79 void(entity killer, entity killee) logfrag (QW_ENGINE) (don't support)
|
PF_NoCSQC, // #79 void(entity killer, entity killee) logfrag (QW_ENGINE) (don't support)
|
||||||
//80
|
//80
|
||||||
PF_Fixme, // #80 string(entity e, string keyname) infokey (QW_ENGINE) (don't support)
|
PF_NoCSQC, // #80 string(entity e, string keyname) infokey (QW_ENGINE) (don't support)
|
||||||
PF_stof, // #81 float(string s) stof (FRIK_FILE or QW_ENGINE)
|
PF_stof, // #81 float(string s) stof (FRIK_FILE or QW_ENGINE)
|
||||||
PF_Fixme, // #82 void(vector where, float set) multicast (QW_ENGINE) (don't support)
|
PF_NoCSQC, // #82 void(vector where, float set) multicast (QW_ENGINE) (don't support)
|
||||||
PF_Fixme,
|
PF_Fixme,
|
||||||
PF_Fixme,
|
PF_Fixme,
|
||||||
|
|
||||||
|
@ -1804,7 +1816,7 @@ PF_R_AddDynamicLight, // #???
|
||||||
PF_Fixme,
|
PF_Fixme,
|
||||||
PF_Fixme,
|
PF_Fixme,
|
||||||
PF_Fixme,
|
PF_Fixme,
|
||||||
PF_Fixme,
|
PF_CL_drawline, // #???
|
||||||
|
|
||||||
//140
|
//140
|
||||||
PF_CL_is_cached_pic, // #???
|
PF_CL_is_cached_pic, // #???
|
||||||
|
@ -1816,44 +1828,44 @@ PF_CL_drawpic, // #???
|
||||||
PF_CL_drawfill, // #???
|
PF_CL_drawfill, // #???
|
||||||
PF_CL_drawsetcliparea, // #???
|
PF_CL_drawsetcliparea, // #???
|
||||||
PF_CL_drawresetcliparea, // #???
|
PF_CL_drawresetcliparea, // #???
|
||||||
PF_CL_drawgetimagesize, // #???
|
PF_CL_drawgetimagesize, // #??? vector(string picname) draw_getimagesize (EXT_CSQC)
|
||||||
|
|
||||||
//150
|
//150
|
||||||
PF_cs_getstatf, // #???
|
PF_cs_getstatf, // #??? float(float stnum) getstatf (EXT_CSQC)
|
||||||
PF_cs_getstati, // #???
|
PF_cs_getstati, // #??? float(float stnum) getstati (EXT_CSQC)
|
||||||
PF_cs_getstats, // #???
|
PF_cs_getstats, // #??? string(float firststnum) getstats (EXT_CSQC)
|
||||||
PF_cs_SetModelIndex, // #???
|
PF_cs_SetModelIndex, // #??? void(entity e, float mdlindex) setmodelindex (EXT_CSQC)
|
||||||
PF_cs_ModelnameForIndex, // #???
|
PF_cs_ModelnameForIndex, // #??? string(float mdlindex) modelnameforindex (EXT_CSQC)
|
||||||
|
|
||||||
PF_cs_setsensativityscaler, // #???
|
PF_cs_setsensativityscaler, // #??? void(float sens) setsensitivityscaler (EXT_CSQC)
|
||||||
PF_cl_cprint, // #??? centerprint
|
PF_cl_cprint, // #??? void(string s) cprint (EXT_CSQC)
|
||||||
PF_print, // #??? console print
|
PF_print, // #??? void(string s) print (EXT_CSQC)
|
||||||
PF_cs_pointparticles, // #???
|
PF_cs_pointparticles, // #??? void(float effectnum, vector origin [, vector dir, float count]) pointparticles (EXT_CSQC)
|
||||||
PF_cs_particlesloaded, // #???
|
PF_cs_particlesloaded, // #??? float(string effectname) particleeffectnum (EXT_CSQC)
|
||||||
|
|
||||||
//160
|
//160
|
||||||
PF_cs_getinputstate, // #???
|
PF_cs_getinputstate, // #??? float(float framenum) getinputstate (EXT_CSQC)
|
||||||
PF_cs_runplayerphysics, // #???
|
PF_cs_runplayerphysics, // #???
|
||||||
PF_cs_getplayerkey, // #???
|
PF_cs_getplayerkey, // #??? string(float playernum, string keyname) getplayerkeyvalue (EXT_CSQC)
|
||||||
PF_cs_setwantskeys, // #???
|
PF_cs_setwantskeys, // #??? void(float wants) setwantskeys (EXT_CSQC)
|
||||||
PF_cs_getmousepos, // #???
|
PF_cs_getmousepos, // #??? vector() getmousepos (EXT_CSQC)
|
||||||
|
|
||||||
PF_cl_playingdemo, // #??? float() isdemo
|
PF_cl_playingdemo, // #??? float() isdemo
|
||||||
PF_cl_runningserver, // #??? float() isserver
|
PF_cl_runningserver, // #??? float() isserver
|
||||||
PF_Fixme,
|
PF_cl_keynumtostring, // #??? string(float keynum) keynumtostring (EXT_CSQC)
|
||||||
PF_Fixme,
|
PF_cl_stringtokeynum, // #??? float(string keyname) stringtokeynum (EXT_CSQC)
|
||||||
PF_Fixme,
|
PF_cl_getkeybind, // #??? string(float keynum) getkeybind (EXT_CSQC)
|
||||||
|
|
||||||
//170
|
//170
|
||||||
//note that 'ReadEntity' is pretty hard to implement reliably. Modders should use a combination of ReadShort, and findfloat, and remember that it might not be known clientside (pvs culled or other reason)
|
//note that 'ReadEntity' is pretty hard to implement reliably. Modders should use a combination of ReadShort, and findfloat, and remember that it might not be known clientside (pvs culled or other reason)
|
||||||
PF_ReadByte, // #???
|
PF_ReadByte, // #??? float() readbyte (EXT_CSQC)
|
||||||
PF_ReadChar, // #???
|
PF_ReadChar, // #??? float() readchar (EXT_CSQC)
|
||||||
PF_ReadShort, // #???
|
PF_ReadShort, // #??? float() readshort (EXT_CSQC)
|
||||||
PF_ReadLong, // #???
|
PF_ReadLong, // #??? float() readlong (EXT_CSQC)
|
||||||
PF_ReadCoord, // #???
|
PF_ReadCoord, // #??? float() readcoord (EXT_CSQC)
|
||||||
|
|
||||||
PF_ReadAngle, // #???
|
PF_ReadAngle, // #??? float() readangle (EXT_CSQC)
|
||||||
PF_ReadString, // #???
|
PF_ReadString, // #??? string() readstring (EXT_CSQC)
|
||||||
PF_Fixme,
|
PF_Fixme,
|
||||||
PF_Fixme,
|
PF_Fixme,
|
||||||
PF_Fixme,
|
PF_Fixme,
|
||||||
|
@ -1936,7 +1948,7 @@ PF_FixTen,
|
||||||
|
|
||||||
//400
|
//400
|
||||||
PF_cs_copyentity, // #400 void(entity from, entity to) copyentity (DP_QC_COPYENTITY)
|
PF_cs_copyentity, // #400 void(entity from, entity to) copyentity (DP_QC_COPYENTITY)
|
||||||
PF_Fixme, // #401 void(entity cl, float colours) setcolors (DP_SV_SETCOLOR) (don't implement)
|
PF_NoCSQC, // #401 void(entity cl, float colours) setcolors (DP_SV_SETCOLOR) (don't implement)
|
||||||
PF_findchain, // #402 entity(string field, string match) findchain (DP_QC_FINDCHAIN)
|
PF_findchain, // #402 entity(string field, string match) findchain (DP_QC_FINDCHAIN)
|
||||||
PF_findchainfloat, // #403 entity(float fld, float match) findchainfloat (DP_QC_FINDCHAINFLOAT)
|
PF_findchainfloat, // #403 entity(float fld, float match) findchainfloat (DP_QC_FINDCHAINFLOAT)
|
||||||
PF_cl_effect, // #404 void(vector org, string modelname, float startframe, float endframe, float framerate) effect (DP_SV_EFFECT)
|
PF_cl_effect, // #404 void(vector org, string modelname, float startframe, float endframe, float framerate) effect (DP_SV_EFFECT)
|
||||||
|
@ -1983,7 +1995,7 @@ PF_Fixme, // #437
|
||||||
PF_Fixme, // #438
|
PF_Fixme, // #438
|
||||||
PF_Fixme, // #439
|
PF_Fixme, // #439
|
||||||
|
|
||||||
PF_Fixme, // #440 void(entity e, string s) clientcommand (KRIMZON_SV_PARSECLIENTCOMMAND) (don't implement)
|
PF_NoCSQC, // #440 void(entity e, string s) clientcommand (KRIMZON_SV_PARSECLIENTCOMMAND) (don't implement)
|
||||||
PF_Tokenize, // #441 float(string s) tokenize (KRIMZON_SV_PARSECLIENTCOMMAND)
|
PF_Tokenize, // #441 float(string s) tokenize (KRIMZON_SV_PARSECLIENTCOMMAND)
|
||||||
PF_ArgV, // #442 string(float n) argv (KRIMZON_SV_PARSECLIENTCOMMAND)
|
PF_ArgV, // #442 string(float n) argv (KRIMZON_SV_PARSECLIENTCOMMAND)
|
||||||
PS_cs_setattachment, // #443 void(entity e, entity tagentity, string tagname) setattachment (DP_GFX_QUAKE3MODELTAGS)
|
PS_cs_setattachment, // #443 void(entity e, entity tagentity, string tagname) setattachment (DP_GFX_QUAKE3MODELTAGS)
|
||||||
|
@ -1998,10 +2010,10 @@ PF_FindFlags, // #449 entity(entity start, .entity fld, float match) findflags
|
||||||
PF_findchainflags, // #450 entity(.float fld, float match) findchainflags (DP_QC_FINDCHAINFLAGS)
|
PF_findchainflags, // #450 entity(.float fld, float match) findchainflags (DP_QC_FINDCHAINFLAGS)
|
||||||
PF_Fixme, // #451
|
PF_Fixme, // #451
|
||||||
PF_Fixme, // #452
|
PF_Fixme, // #452
|
||||||
PF_Fixme, // #453 void(entity player) dropclient (DP_QC_BOTCLIENT) (don't implement)
|
PF_NoCSQC, // #453 void(entity player) dropclient (DP_QC_BOTCLIENT) (don't implement)
|
||||||
PF_Fixme, // #454 entity() spawnclient (DP_QC_BOTCLIENT) (don't implement)
|
PF_NoCSQC, // #454 entity() spawnclient (DP_QC_BOTCLIENT) (don't implement)
|
||||||
|
|
||||||
PF_Fixme, // #455 float(entity client) clienttype (DP_QC_BOTCLIENT) (don't implement)
|
PF_NoCSQC, // #455 float(entity client) clienttype (DP_QC_BOTCLIENT) (don't implement)
|
||||||
PF_Fixme, // #456
|
PF_Fixme, // #456
|
||||||
PF_Fixme, // #457
|
PF_Fixme, // #457
|
||||||
PF_Fixme, // #458
|
PF_Fixme, // #458
|
||||||
|
|
|
@ -202,7 +202,7 @@ static void PF_cvar (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
G_FLOAT(OFS_RETURN) = 0;
|
G_FLOAT(OFS_RETURN) = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void PF_getresolution (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_cl_getresolution (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
float mode = G_FLOAT(OFS_PARM0);
|
float mode = G_FLOAT(OFS_PARM0);
|
||||||
float *ret = G_VECTOR(OFS_RETURN);
|
float *ret = G_VECTOR(OFS_RETURN);
|
||||||
|
@ -457,6 +457,12 @@ void PF_CL_drawresetcliparea (progfuncs_t *prinst, struct globalvars_s *pr_globa
|
||||||
{
|
{
|
||||||
G_FLOAT(OFS_RETURN) = 1;
|
G_FLOAT(OFS_RETURN) = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//void (float width, vector rgb, float alpha, float flags, vector pos1, ...) drawline;
|
||||||
|
void PF_CL_drawline (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
//vector drawgetimagesize(string pic) = #460;
|
//vector drawgetimagesize(string pic) = #460;
|
||||||
void PF_CL_drawgetimagesize (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_CL_drawgetimagesize (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
|
@ -480,7 +486,7 @@ void PF_CL_drawgetimagesize (progfuncs_t *prinst, struct globalvars_s *pr_global
|
||||||
}
|
}
|
||||||
|
|
||||||
//void setkeydest(float dest) = #601;
|
//void setkeydest(float dest) = #601;
|
||||||
void PF_setkeydest (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_cl_setkeydest (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
switch((int)G_FLOAT(OFS_PARM0))
|
switch((int)G_FLOAT(OFS_PARM0))
|
||||||
{
|
{
|
||||||
|
@ -502,7 +508,7 @@ void PF_setkeydest (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//float getkeydest(void) = #602;
|
//float getkeydest(void) = #602;
|
||||||
void PF_getkeydest (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_cl_getkeydest (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
switch(key_dest)
|
switch(key_dest)
|
||||||
{
|
{
|
||||||
|
@ -525,7 +531,7 @@ void PF_getkeydest (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
}
|
}
|
||||||
|
|
||||||
//void setmousetarget(float trg) = #603;
|
//void setmousetarget(float trg) = #603;
|
||||||
void PF_setmousetarget (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_cl_setmousetarget (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
extern int mouseusedforgui;
|
extern int mouseusedforgui;
|
||||||
switch ((int)G_FLOAT(OFS_PARM0))
|
switch ((int)G_FLOAT(OFS_PARM0))
|
||||||
|
@ -542,13 +548,13 @@ void PF_setmousetarget (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
}
|
}
|
||||||
|
|
||||||
//float getmousetarget(void) = #604;
|
//float getmousetarget(void) = #604;
|
||||||
void PF_getmousetarget (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_cl_getmousetarget (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int MP_TranslateDPtoFTECodes(int code);
|
int MP_TranslateDPtoFTECodes(int code);
|
||||||
//string keynumtostring(float keynum) = #609;
|
//string keynumtostring(float keynum) = #609;
|
||||||
void PF_CL_keynumtostring (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_cl_keynumtostring (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
int code = G_FLOAT(OFS_PARM0);
|
int code = G_FLOAT(OFS_PARM0);
|
||||||
char *keyname = PF_TempStr(prinst);
|
char *keyname = PF_TempStr(prinst);
|
||||||
|
@ -559,9 +565,19 @@ void PF_CL_keynumtostring (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
RETURN_SSTRING(keyname);
|
RETURN_SSTRING(keyname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PF_cl_getkeybind (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
|
{
|
||||||
|
char *binding = Key_GetBinding();
|
||||||
|
char *result = PF_TempStr(prinst);
|
||||||
|
if (!binding)
|
||||||
|
binding = "";
|
||||||
|
Q_strncpyz(result, binding, MAXTEMPBUFFERLEN);
|
||||||
|
RETURN_SSTRING(result);
|
||||||
|
}
|
||||||
|
|
||||||
int MP_TranslateDPtoFTECodes(int code);
|
int MP_TranslateDPtoFTECodes(int code);
|
||||||
//string findkeysforcommand(string command) = #610;
|
//string findkeysforcommand(string command) = #610;
|
||||||
void PF_CL_findkeysforcommand (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_cl_findkeysforcommand (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
char *cmdname = PR_GetStringOfs(prinst, OFS_PARM0);
|
char *cmdname = PR_GetStringOfs(prinst, OFS_PARM0);
|
||||||
int keynums[2];
|
int keynums[2];
|
||||||
|
@ -571,14 +587,14 @@ void PF_CL_findkeysforcommand (progfuncs_t *prinst, struct globalvars_s *pr_glob
|
||||||
|
|
||||||
keyname[0] = '\0';
|
keyname[0] = '\0';
|
||||||
|
|
||||||
strcat (keyname, va(" \'%i\'", MP_TranslateFTEtoDPCodes(keynums[0])));
|
Q_strncatz (keyname, va(" \'%i\'", MP_TranslateFTEtoDPCodes(keynums[0])), MAXTEMPBUFFERLEN);
|
||||||
strcat (keyname, va(" \'%i\'", MP_TranslateFTEtoDPCodes(keynums[1])));
|
Q_strncatz (keyname, va(" \'%i\'", MP_TranslateFTEtoDPCodes(keynums[1])), MAXTEMPBUFFERLEN);
|
||||||
|
|
||||||
RETURN_SSTRING(keyname);
|
RETURN_SSTRING(keyname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//vector getmousepos(void) = #66;
|
//vector getmousepos(void) = #66;
|
||||||
void PF_getmousepos (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_cl_getmousepos (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
float *ret = G_VECTOR(OFS_RETURN);
|
float *ret = G_VECTOR(OFS_RETURN);
|
||||||
extern int mousemove_x, mousemove_y;
|
extern int mousemove_x, mousemove_y;
|
||||||
|
@ -634,7 +650,7 @@ typedef enum{
|
||||||
SLIST_SORTDESCENDING
|
SLIST_SORTDESCENDING
|
||||||
} hostcacheglobal_t;
|
} hostcacheglobal_t;
|
||||||
|
|
||||||
void PF_gethostcachevalue (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_M_gethostcachevalue (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
hostcacheglobal_t hcg = G_FLOAT(OFS_PARM0);
|
hostcacheglobal_t hcg = G_FLOAT(OFS_PARM0);
|
||||||
G_FLOAT(OFS_RETURN) = 0;
|
G_FLOAT(OFS_RETURN) = 0;
|
||||||
|
@ -719,7 +735,7 @@ void PF_M_gethostcachenumber(progfuncs_t *prinst, struct globalvars_s *pr_global
|
||||||
|
|
||||||
G_FLOAT(OFS_RETURN) = ret;
|
G_FLOAT(OFS_RETURN) = ret;
|
||||||
}
|
}
|
||||||
void PF_gethostcachestring (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_M_gethostcachestring (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
char *keyname = PF_TempStr(prinst);
|
char *keyname = PF_TempStr(prinst);
|
||||||
char *ret = "";
|
char *ret = "";
|
||||||
|
@ -878,7 +894,7 @@ void PF_IsNotNull(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
G_FLOAT(OFS_RETURN) = !!str;
|
G_FLOAT(OFS_RETURN) = !!str;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PF_StringToKeyNum(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
void PF_cl_stringtokeynum(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int modifier;
|
int modifier;
|
||||||
|
@ -1100,7 +1116,7 @@ builtin_t menu_builtins[] = {
|
||||||
skip1 //void clientcommand(float client, string s) = #63;
|
skip1 //void clientcommand(float client, string s) = #63;
|
||||||
skip1 //void changelevel(string map) = #64;
|
skip1 //void changelevel(string map) = #64;
|
||||||
PF_localsound,
|
PF_localsound,
|
||||||
PF_getmousepos,
|
PF_cl_getmousepos,
|
||||||
PF_gettime,
|
PF_gettime,
|
||||||
PF_loadfromdata,
|
PF_loadfromdata,
|
||||||
PF_loadfromfile,
|
PF_loadfromfile,
|
||||||
|
@ -1172,21 +1188,21 @@ builtin_t menu_builtins[] = {
|
||||||
skip100
|
skip100
|
||||||
//600
|
//600
|
||||||
skip1
|
skip1
|
||||||
PF_setkeydest,
|
PF_cl_setkeydest,
|
||||||
PF_getkeydest,
|
PF_cl_getkeydest,
|
||||||
PF_setmousetarget,
|
PF_cl_setmousetarget,
|
||||||
PF_getmousetarget,
|
PF_cl_getmousetarget,
|
||||||
PF_callfunction,
|
PF_callfunction,
|
||||||
skip1 //void writetofile(float fhandle, entity ent) = #606;
|
skip1 //void writetofile(float fhandle, entity ent) = #606;
|
||||||
PF_isfunction,
|
PF_isfunction,
|
||||||
PF_getresolution,
|
PF_cl_getresolution,
|
||||||
PF_CL_keynumtostring,
|
PF_cl_keynumtostring,
|
||||||
PF_CL_findkeysforcommand,
|
PF_cl_findkeysforcommand,
|
||||||
PF_gethostcachevalue,
|
PF_M_gethostcachevalue,
|
||||||
PF_gethostcachestring,
|
PF_M_gethostcachestring,
|
||||||
PF_parseentitydata, //void parseentitydata(entity ent, string data) = #613;
|
PF_parseentitydata, //void parseentitydata(entity ent, string data) = #613;
|
||||||
|
|
||||||
PF_StringToKeyNum,
|
PF_cl_stringtokeynum,
|
||||||
|
|
||||||
PF_M_resethostcachemasks,
|
PF_M_resethostcachemasks,
|
||||||
PF_M_sethostcachemaskstring,
|
PF_M_sethostcachemaskstring,
|
||||||
|
|
|
@ -272,6 +272,7 @@ void R_StoreEfrags (efrag_t **ppefrag)
|
||||||
if ((pent->visframe != r_framecount) &&
|
if ((pent->visframe != r_framecount) &&
|
||||||
(cl_numvisedicts < MAX_VISEDICTS))
|
(cl_numvisedicts < MAX_VISEDICTS))
|
||||||
{
|
{
|
||||||
|
pent->frame1time = cl.time;
|
||||||
cl_visedicts[cl_numvisedicts++] = *pent;
|
cl_visedicts[cl_numvisedicts++] = *pent;
|
||||||
|
|
||||||
// mark that we've recorded this entity for this frame
|
// mark that we've recorded this entity for this frame
|
||||||
|
|
|
@ -886,6 +886,7 @@ void NPP_QWFlush(void)
|
||||||
|
|
||||||
if (multicastpos)
|
if (multicastpos)
|
||||||
{
|
{
|
||||||
|
int qwsize;
|
||||||
vec3_t org;
|
vec3_t org;
|
||||||
coorddata cd;
|
coorddata cd;
|
||||||
|
|
||||||
|
@ -896,7 +897,10 @@ void NPP_QWFlush(void)
|
||||||
memcpy(&cd, &buffer[multicastpos+sizeofcoord*2], sizeofcoord);
|
memcpy(&cd, &buffer[multicastpos+sizeofcoord*2], sizeofcoord);
|
||||||
org[2] = MSG_FromCoord(cd, sizeofcoord);
|
org[2] = MSG_FromCoord(cd, sizeofcoord);
|
||||||
|
|
||||||
|
qwsize = sv.multicast.cursize;
|
||||||
|
sv.multicast.cursize = 0;
|
||||||
SV_MulticastProtExt(org, multicasttype, FULLDIMENSIONMASK, requireextension, 0);
|
SV_MulticastProtExt(org, multicasttype, FULLDIMENSIONMASK, requireextension, 0);
|
||||||
|
sv.multicast.cursize = qwsize;
|
||||||
}
|
}
|
||||||
writedest = NULL;
|
writedest = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1138,12 +1142,12 @@ void NPP_QWWriteAngle(int dest, float in) //replacement write func (nq to qw)
|
||||||
if (sizeofangle==1)
|
if (sizeofangle==1)
|
||||||
{
|
{
|
||||||
char data = (int)(in*256/360) & 255;
|
char data = (int)(in*256/360) & 255;
|
||||||
NPP_NQWriteChar(dest, data);
|
NPP_QWWriteChar(dest, data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
short data = (int)(in*0xffff/360) & 0xffff;
|
short data = (int)(in*0xffff/360) & 0xffff;
|
||||||
NPP_NQWriteShort(dest, data);
|
NPP_QWWriteShort(dest, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void NPP_QWWriteCoord(int dest, float in) //replacement write func (nq to qw)
|
void NPP_QWWriteCoord(int dest, float in) //replacement write func (nq to qw)
|
||||||
|
|
|
@ -6529,7 +6529,7 @@ void PF_readcmd (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
if (old != RD_NONE)
|
if (old != RD_NONE)
|
||||||
SV_BeginRedirect(old, oldl);
|
SV_BeginRedirect(old, oldl);
|
||||||
|
|
||||||
|
Con_Printf("PF_readcmd: %s\n%s", s, output);
|
||||||
G_INT(OFS_RETURN) = (int)PR_SetString(prinst, output);
|
G_INT(OFS_RETURN) = (int)PR_SetString(prinst, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6621,16 +6621,19 @@ void PF_MVDSV_strcpy (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
char *dest = PR_GetStringOfs(prinst, OFS_PARM0);
|
char *dest = PR_GetStringOfs(prinst, OFS_PARM0);
|
||||||
int *ident;
|
int *ident;
|
||||||
ident = (int *)(dest-8);
|
ident = (int *)(dest-8);
|
||||||
|
|
||||||
|
/*
|
||||||
if (*ident != PRSTR)
|
if (*ident != PRSTR)
|
||||||
{
|
{
|
||||||
Con_Printf("PF_strcpy: not an allocated string\n");
|
Con_Printf("PF_strcpy: not an allocated string\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ident[0] < strlen(src)+1)
|
if (ident[1] < strlen(src)+1)
|
||||||
{
|
{
|
||||||
Con_Printf("PF_strcpy: allocated string is not big enough.\n");
|
Con_Printf("PF_strcpy: allocated string is not big enough.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
strcpy(dest, src);
|
strcpy(dest, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -900,6 +900,12 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
|
||||||
ent->v->solid = SOLID_BSP;
|
ent->v->solid = SOLID_BSP;
|
||||||
ent->v->movetype = MOVETYPE_PUSH;
|
ent->v->movetype = MOVETYPE_PUSH;
|
||||||
|
|
||||||
|
ent->v->dimension_see = 255;
|
||||||
|
ent->v->dimension_seen = 255;
|
||||||
|
ent->v->dimension_ghost = 0;
|
||||||
|
ent->v->dimension_solid = 255;
|
||||||
|
ent->v->dimension_hit = 255;
|
||||||
|
|
||||||
if (progstype == PROG_QW && pr_imitatemvdsv.value>0)
|
if (progstype == PROG_QW && pr_imitatemvdsv.value>0)
|
||||||
{
|
{
|
||||||
ent->v->targetname = PR_NewString(svprogfuncs, "mvdsv", 0);
|
ent->v->targetname = PR_NewString(svprogfuncs, "mvdsv", 0);
|
||||||
|
|
|
@ -417,7 +417,7 @@ dir_t Sys_listdir (char *path, char *ext, qboolean usesorting)
|
||||||
|
|
||||||
cvar_t sv_demoUseCache = {"sv_demoUseCache", ""};
|
cvar_t sv_demoUseCache = {"sv_demoUseCache", ""};
|
||||||
cvar_t sv_demoCacheSize = {"sv_demoCacheSize", ""};
|
cvar_t sv_demoCacheSize = {"sv_demoCacheSize", ""};
|
||||||
cvar_t sv_demoMaxDirSize = {"sv_demoMaxDirSize", ""};
|
cvar_t sv_demoMaxDirSize = {"sv_demoMaxDirSize", "102400"}; //so ktpro autorecords.
|
||||||
cvar_t sv_demoDir = {"sv_demoDir", "demos"};
|
cvar_t sv_demoDir = {"sv_demoDir", "demos"};
|
||||||
cvar_t sv_demofps = {"sv_demofps", ""};
|
cvar_t sv_demofps = {"sv_demofps", ""};
|
||||||
cvar_t sv_demoPings = {"sv_demoPings", ""};
|
cvar_t sv_demoPings = {"sv_demoPings", ""};
|
||||||
|
|
|
@ -72,6 +72,7 @@ extern cvar_t pm_slidefix;
|
||||||
extern cvar_t pm_slidyslopes;
|
extern cvar_t pm_slidyslopes;
|
||||||
extern cvar_t pm_airstep;
|
extern cvar_t pm_airstep;
|
||||||
extern cvar_t pm_walljump;
|
extern cvar_t pm_walljump;
|
||||||
|
cvar_t sv_pushplayers = {"sv_pushplayers", "0"};
|
||||||
|
|
||||||
char sv_votinggroup[] = "server voting";
|
char sv_votinggroup[] = "server voting";
|
||||||
|
|
||||||
|
@ -4153,6 +4154,25 @@ if (sv_player->v->health > 0 && before && !after )
|
||||||
// touch other objects
|
// touch other objects
|
||||||
for (i=0 ; i<pmove.numtouch ; i++)
|
for (i=0 ; i<pmove.numtouch ; i++)
|
||||||
{
|
{
|
||||||
|
if (sv_pushplayers.value)
|
||||||
|
{
|
||||||
|
n = pmove.physents[pmove.touchindex[i]].info;
|
||||||
|
if (n && n <= sv.allocated_client_slots)
|
||||||
|
{
|
||||||
|
float vel;
|
||||||
|
vec3_t dir;
|
||||||
|
vec3_t svel;
|
||||||
|
ent = EDICT_NUM(svprogfuncs, n);
|
||||||
|
VectorSubtract(ent->v->origin, sv_player->v->origin, dir);
|
||||||
|
VectorNormalize(dir);
|
||||||
|
VectorCopy(sv_player->v->velocity, svel);
|
||||||
|
VectorNormalize(svel);
|
||||||
|
vel = DotProduct(svel, dir);
|
||||||
|
VectorMA(ent->v->velocity, sv_pushplayers.value*vel, dir, ent->v->velocity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (pmove.physents[pmove.touchindex[i]].notouch)
|
if (pmove.physents[pmove.touchindex[i]].notouch)
|
||||||
continue;
|
continue;
|
||||||
n = pmove.physents[pmove.touchindex[i]].info;
|
n = pmove.physents[pmove.touchindex[i]].info;
|
||||||
|
@ -4807,6 +4827,8 @@ void SV_UserInit (void)
|
||||||
Cvar_Register (&sv_cheatspeedchecktime, cvargroup_servercontrol);
|
Cvar_Register (&sv_cheatspeedchecktime, cvargroup_servercontrol);
|
||||||
Cvar_Register (&sv_playermodelchecks, cvargroup_servercontrol);
|
Cvar_Register (&sv_playermodelchecks, cvargroup_servercontrol);
|
||||||
|
|
||||||
|
Cvar_Register (&sv_pushplayers, cvargroup_servercontrol);
|
||||||
|
|
||||||
Cvar_Register (&sv_cmdlikercon, cvargroup_serverpermissions);
|
Cvar_Register (&sv_cmdlikercon, cvargroup_serverpermissions);
|
||||||
Cvar_Register(&cmd_gamecodelevel, "Access controls");
|
Cvar_Register(&cmd_gamecodelevel, "Access controls");
|
||||||
Cvar_Register(&cmd_allowaccess, "Access controls");
|
Cvar_Register(&cmd_allowaccess, "Access controls");
|
||||||
|
|
Loading…
Reference in a new issue