19 Sep 2007
This commit is contained in:
parent
d002f418e7
commit
e0a3de04fd
|
@ -33,15 +33,13 @@ SV_ClipToLinks SV_ClipMoveToEntities
|
|||
SV_FreeEdict не передается указатель OK
|
||||
наладить think system OK
|
||||
наладить VM_bprint и VM_dprint OK
|
||||
îđăŕíčçîâŕňü ďĺđĺäŕ÷ó progs.sv â priv.sv->s
|
||||
ďîëíŕ˙ îňëŕäęŕ ôčçčęč!
|
||||
íŕńňđîčňü ńâ˙çč ěĺćäó progs č state
|
||||
организовать передачу progs.sv в priv.sv->s OK
|
||||
настроить связи между progs и state OK
|
||||
переписать CM_LoadModel OK
|
||||
игрок застревает в полу после команды reconnect OK
|
||||
отладка физики
|
||||
}
|
||||
|
||||
SV_CreateBaseLine progs->state
|
||||
SV_BuildClientFrame progs->state
|
||||
SV_PrepWorldFrame state<-progs
|
||||
|
||||
//==================================================
|
||||
// то, что уже готово
|
||||
//==================================================
|
||||
|
|
|
@ -658,13 +658,13 @@ scriptsystem_api_t Sc_GetAPI( void )
|
|||
sc.Load = FS_LoadScript;
|
||||
sc.Include = FS_AddScript;
|
||||
sc.GetToken = SC_GetToken;
|
||||
sc.Token = SC_Token;
|
||||
sc.TryToken = SC_TryToken;
|
||||
sc.FreeToken = SC_FreeToken;
|
||||
sc.SkipToken = SC_SkipToken;
|
||||
sc.MatchToken = SC_MatchToken;
|
||||
sc.ParseToken = SC_ParseToken;
|
||||
sc.ParseWord = SC_ParseWord;
|
||||
sc.Token = token;
|
||||
|
||||
return sc;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ if errorlevel 1 set BUILD_ERROR=1
|
|||
%MSDEV% render/render.dsp %CONFIG%"render - Win32 Debug" %build_target%
|
||||
if errorlevel 1 set BUILD_ERROR=1
|
||||
|
||||
vprogs\qcclib.exe
|
||||
qcclib.exe -src vprogs
|
||||
if errorlevel 1 set BUILD_ERROR=1
|
||||
|
||||
if "%BUILD_ERROR%"=="" goto build_ok
|
||||
|
@ -50,10 +50,10 @@ if exist engine\engine.plg del /f /q engine\engine.plg
|
|||
if exist launch\launch.plg del /f /q launch\launch.plg
|
||||
if exist common\common.plg del /f /q common\common.plg
|
||||
if exist render\render.plg del /f /q render\render.plg
|
||||
if exist vprogs\server.dat move vprogs\server.dat D:\Xash3D\xash\server.dat
|
||||
if exist server.dat move server.dat D:\Xash3D\xash\server.dat
|
||||
|
||||
echo Build succeeded!
|
||||
echo Please wait. Xash is now loading
|
||||
cd D:\Xash3D\
|
||||
xash.exe +map qctest -log
|
||||
xash.exe +map base1 -log
|
||||
:done
|
|
@ -278,9 +278,8 @@ void CL_ParseDelta (entity_state_t *from, entity_state_t *to, int number, int bi
|
|||
if (bits & U_SEQUENCE) to->sequence = MSG_ReadByte (&net_message);
|
||||
if (bits & U_SOLID) to->solid = MSG_ReadShort (&net_message);
|
||||
if (bits & U_ALPHA) to->alpha = MSG_ReadFloat (&net_message);
|
||||
|
||||
if (bits & U_SOUND) to->sound = MSG_ReadByte (&net_message);
|
||||
if (bits & U_EVENT) to->event = MSG_ReadByte (&net_message);
|
||||
if (bits & U_SOUNDIDX) to->soundindex = MSG_ReadByte (&net_message);
|
||||
else to->event = 0;
|
||||
|
||||
if (bits & U_BODY) to->body = MSG_ReadByte (&net_message);
|
||||
|
|
|
@ -498,7 +498,7 @@ void V_RenderView( float stereo_separation )
|
|||
cl.refdef.width = scr_vrect.width;
|
||||
cl.refdef.height = scr_vrect.height;
|
||||
cl.refdef.fov_y = CalcFov (cl.refdef.fov_x, cl.refdef.width, cl.refdef.height);
|
||||
cl.refdef.time = cl.time; // render use realtime now
|
||||
cl.refdef.time = cls.realtime; // render use realtime now
|
||||
|
||||
cl.refdef.areabits = cl.frame.areabits;
|
||||
|
||||
|
|
|
@ -313,13 +313,13 @@ enum clc_ops_e
|
|||
#define U_RENDERFX16 (1<<18) // 8 + 16 = 32
|
||||
#define U_EFFECTS16 (1<<19) // 8 + 16 = 32
|
||||
#define U_WEAPONMODEL (1<<20) // weapons, flags, etc
|
||||
#define U_BODY (1<<21)
|
||||
#define U_SOUNDIDX (1<<21)
|
||||
#define U_SEQUENCE (1<<22) // animation sequence
|
||||
#define U_MOREBITS3 (1<<23) // read one additional byte
|
||||
|
||||
// fourth byte
|
||||
#define U_OLDORIGIN (1<<24) // FIXME: get rid of this
|
||||
#define U_SOUND (1<<25)
|
||||
#define U_BODY (1<<25)
|
||||
#define U_SOLID (1<<26)
|
||||
#define U_ALPHA (1<<27) // alpha value
|
||||
#define U_EVENT (1<<28) // remove this
|
||||
|
@ -544,7 +544,7 @@ CMODEL
|
|||
|
||||
cmodel_t *CM_LoadMap (char *name, bool clientload, unsigned *checksum);
|
||||
cmodel_t *CM_InlineModel (char *name); // *1, *2, etc
|
||||
cmodel_t *CM_LoadModel (char *name);
|
||||
cmodel_t *CM_LoadModel( int modelindex );
|
||||
|
||||
extern byte portalopen[MAX_MAP_AREAPORTALS];
|
||||
|
||||
|
|
|
@ -540,6 +540,7 @@ cmodel_t *CM_LoadMap (char *name, bool clientload, unsigned *checksum)
|
|||
numnodes = 0;
|
||||
numleafs = 0;
|
||||
numcmodels = 0;
|
||||
numsmodels = 0;
|
||||
numvisibility = 0;
|
||||
numentitychars = 0;
|
||||
map_entitystring[0] = 0;
|
||||
|
@ -1704,10 +1705,10 @@ STUDIO SHARED CMODELS
|
|||
|
||||
===============================================================================
|
||||
*/
|
||||
#define NUM_HULL_ROUNDS 22
|
||||
#define HULL_PRECISION 4
|
||||
|
||||
word hull_table[NUM_HULL_ROUNDS] = { 0, 4, 8, 16, 18, 24, 28, 30, 32, 40, 48, 54, 56, 60, 64, 72, 80, 112, 120, 128, 140, 176 };
|
||||
word hull_table[] = { 0, 4, 8, 16, 18, 24, 28, 30, 32, 40, 48, 54, 56, 60, 64, 72, 80, 112, 120, 128, 140, 176 };
|
||||
#define NUM_HULL_ROUNDS (sizeof(hull_table) / sizeof(word))
|
||||
|
||||
void CM_LookUpHullSize(vec3_t size, bool down)
|
||||
{
|
||||
|
@ -1738,11 +1739,8 @@ void CM_LookUpHullSize(vec3_t size, bool down)
|
|||
|
||||
cmodel_t *CM_StudioModel (char *name, byte *buffer)
|
||||
{
|
||||
int i = numcmodels; // studiomodels starting after bmodels
|
||||
int max_models = numcmodels + numsmodels;
|
||||
cmodel_t *out;
|
||||
studiohdr_t *phdr;
|
||||
char modname[64]; // probaly this is not better way...
|
||||
|
||||
phdr = (studiohdr_t *)buffer;
|
||||
|
||||
|
@ -1751,24 +1749,11 @@ cmodel_t *CM_StudioModel (char *name, byte *buffer)
|
|||
MsgWarn("CM_StudioModel: %s has wrong version number (%i should be %i)", phdr->name, phdr->version, STUDIO_VERSION);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset( modname, 0, sizeof(modname));
|
||||
FS_FileBase( name, modname );
|
||||
|
||||
for(i = 0; i < max_models; i++ )
|
||||
{
|
||||
out = map_cmodels + i;
|
||||
|
||||
//probably is sprite model
|
||||
if(!out->extradata) continue;
|
||||
if(!stricmp(modname, out->name))
|
||||
return out;
|
||||
}
|
||||
|
||||
out = &map_cmodels[max_models];
|
||||
out = &map_cmodels[numcmodels + numsmodels];
|
||||
out->extradata = buffer;
|
||||
out->numframes = 0;//reset sprite info
|
||||
strncpy(out->name, modname, sizeof(out->name));
|
||||
strncpy(out->name, name, sizeof(out->name));
|
||||
|
||||
if(SV_StudioExtractBbox( phdr, 0, out->mins, out->maxs ))
|
||||
{
|
||||
|
@ -1782,18 +1767,15 @@ cmodel_t *CM_StudioModel (char *name, byte *buffer)
|
|||
VectorSet(out->mins, -32, -32, -32 );
|
||||
VectorSet(out->maxs, 32, 32, 32 );
|
||||
}
|
||||
|
||||
Msg("CM_StudioModel: %s mins[%g %g %g] maxs[%g %g %g] new loaded\n", out->name, out->mins[0], out->mins[1],out->mins[2],out->maxs[0],out->maxs[1],out->maxs[2]);
|
||||
numsmodels++;
|
||||
return out;
|
||||
}
|
||||
|
||||
cmodel_t *CM_SpriteModel (char *name, byte *buffer)
|
||||
{
|
||||
int i = numcmodels;
|
||||
int max_models = numcmodels + numsmodels;
|
||||
cmodel_t *out;
|
||||
dsprite_t *phdr;
|
||||
char modname[64]; //probaly this is not better way...
|
||||
|
||||
phdr = (dsprite_t *)buffer;
|
||||
|
||||
|
@ -1802,23 +1784,10 @@ cmodel_t *CM_SpriteModel (char *name, byte *buffer)
|
|||
MsgWarn("CM_SpriteModel: %s has wrong version number (%i should be %i or %i)\n", name, phdr->version, SPRITE_VERSION_HALF, SPRITE_VERSION_XASH);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset( modname, 0, sizeof(modname));
|
||||
FS_FileBase( name, modname );
|
||||
|
||||
for(i = 0; i < max_models; i++ )
|
||||
{
|
||||
out = map_cmodels + i;
|
||||
|
||||
//probably is studio model
|
||||
if(!out->numframes) continue;
|
||||
if(!stricmp(modname, out->name))
|
||||
return out;
|
||||
}
|
||||
|
||||
out = &map_cmodels[max_models];
|
||||
out = &map_cmodels[numcmodels + numsmodels];
|
||||
out->numframes = phdr->numframes;
|
||||
strncpy(out->name, modname, sizeof(out->name));
|
||||
strncpy(out->name, name, sizeof(out->name));
|
||||
|
||||
out->mins[0] = out->mins[1] = -phdr->width / 2;
|
||||
out->maxs[0] = out->maxs[1] = phdr->width / 2;
|
||||
|
@ -1829,29 +1798,36 @@ cmodel_t *CM_SpriteModel (char *name, byte *buffer)
|
|||
return out;
|
||||
}
|
||||
|
||||
cmodel_t *CM_LoadModel (char *name)
|
||||
cmodel_t *CM_LoadModel ( int modelindex )
|
||||
{
|
||||
char name[MAX_QPATH];
|
||||
byte *buffer;
|
||||
cmodel_t *mod = NULL;
|
||||
int i = numcmodels;
|
||||
int max_models = numcmodels + numsmodels;
|
||||
|
||||
if (!name[0])
|
||||
{
|
||||
MsgWarn("CM_LoadModel: NULL name, ignored\n");
|
||||
return NULL;
|
||||
}
|
||||
// check for preloading
|
||||
strncpy(name, sv.configstrings[CS_MODELS + modelindex], MAX_QPATH );
|
||||
if(name[0] == '*') return CM_InlineModel( name ); //skip bmodels
|
||||
|
||||
if(name[0] == '*') return CM_InlineModel (name);
|
||||
if(!FS_FileExists( name ))
|
||||
{
|
||||
MsgWarn("CM_LoadModel: %s not found\n", name );
|
||||
return NULL;
|
||||
}
|
||||
for(i = 0; i < max_models; i++ )
|
||||
{
|
||||
mod = map_cmodels + i;
|
||||
if(!stricmp(name, mod->name))
|
||||
return mod;
|
||||
}
|
||||
|
||||
// new model
|
||||
if(numcmodels + numsmodels > MAX_MAP_MODELS)
|
||||
{
|
||||
MsgWarn("CM_LoadModel: MAX_MAP_MODELS limit exceeded\n" );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(!FS_FileExists( name ))
|
||||
{
|
||||
MsgWarn("CM_LoadModel: %s not found\n", name );
|
||||
return NULL;
|
||||
}
|
||||
buffer = FS_LoadFile (name, NULL );
|
||||
|
||||
// call the apropriate loader
|
||||
|
|
|
@ -218,7 +218,7 @@ void _MSG_WriteDeltaEntity (entity_state_t *from, entity_state_t *to, sizebuf_t
|
|||
if ( to->weaponmodel != from->weaponmodel ) bits |= U_WEAPONMODEL;
|
||||
if ( to->body != from->body ) bits |= U_BODY;
|
||||
if ( to->sequence != from->sequence ) bits |= U_SEQUENCE;
|
||||
if ( to->sound != from->sound ) bits |= U_SOUND;
|
||||
if ( to->soundindex != from->soundindex ) bits |= U_SOUNDIDX;
|
||||
if (newentity || (to->renderfx & RF_BEAM)) bits |= U_OLDORIGIN;
|
||||
if( to->alpha != from->alpha ) bits |= U_ALPHA;
|
||||
|
||||
|
@ -291,8 +291,8 @@ void _MSG_WriteDeltaEntity (entity_state_t *from, entity_state_t *to, sizebuf_t
|
|||
if (bits & U_SEQUENCE) _MSG_WriteByte (msg, to->sequence, filename, fileline);
|
||||
if (bits & U_SOLID) _MSG_WriteShort (msg, to->solid, filename, fileline);
|
||||
if (bits & U_ALPHA) _MSG_WriteFloat (msg, to->alpha, filename, fileline);
|
||||
if (bits & U_SOUND) _MSG_WriteByte (msg, to->sound, filename, fileline);
|
||||
if (bits & U_EVENT) _MSG_WriteByte (msg, to->event, filename, fileline);
|
||||
if (bits & U_SOUNDIDX) _MSG_WriteByte (msg, to->soundindex, filename, fileline);
|
||||
if (bits & U_BODY) _MSG_WriteByte (msg, to->body, filename, fileline);
|
||||
}
|
||||
|
||||
|
|
|
@ -1795,11 +1795,11 @@ void VM_tokenize (void)
|
|||
size_t tokenlen;
|
||||
if (num_tokens >= (int)(sizeof(tokens)/sizeof(tokens[0])))
|
||||
break;
|
||||
tokenlen = strlen(COM_Token()) + 1;
|
||||
tokenlen = strlen(COM_Token) + 1;
|
||||
if (pos + tokenlen > sizeof(tokenbuf))
|
||||
break;
|
||||
tokens[num_tokens++] = tokenbuf + pos;
|
||||
Mem_Copy(tokenbuf + pos, COM_Token(), tokenlen);
|
||||
Mem_Copy(tokenbuf + pos, COM_Token, tokenlen);
|
||||
pos += tokenlen;
|
||||
}
|
||||
|
||||
|
@ -1961,7 +1961,7 @@ void VM_parseentitydata(void)
|
|||
data = PRVM_G_STRING(OFS_PARM1);
|
||||
|
||||
// parse the opening brace
|
||||
if (!COM_Parse(&data) || COM_Token()[0] != '{' )
|
||||
if (!COM_Parse(&data) || COM_Token[0] != '{' )
|
||||
PRVM_ERROR ("VM_parseentitydata: %s: Couldn't parse entity data:\n%s", PRVM_NAME, data );
|
||||
|
||||
PRVM_ED_ParseEdict (data, ent);
|
||||
|
|
|
@ -872,16 +872,16 @@ void PRVM_ED_ParseGlobals (const char *data)
|
|||
// parse key
|
||||
if (!COM_Parse(&data))
|
||||
PRVM_ERROR ("PRVM_ED_ParseGlobals: EOF without closing brace");
|
||||
if (COM_Token()[0] == '}')
|
||||
if (COM_Token[0] == '}')
|
||||
break;
|
||||
|
||||
strncpy (keyname, COM_Token(), sizeof(keyname));
|
||||
strncpy (keyname, COM_Token, sizeof(keyname));
|
||||
|
||||
// parse value
|
||||
if (!COM_Parse(&data))
|
||||
PRVM_ERROR ("PRVM_ED_ParseGlobals: EOF without closing brace");
|
||||
|
||||
if (COM_Token()[0] == '}')
|
||||
if (COM_Token[0] == '}')
|
||||
PRVM_ERROR ("PRVM_ED_ParseGlobals: closing brace without data");
|
||||
|
||||
key = PRVM_ED_FindGlobal (keyname);
|
||||
|
@ -891,7 +891,7 @@ void PRVM_ED_ParseGlobals (const char *data)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!PRVM_ED_ParseEpair(NULL, key, COM_Token()))
|
||||
if (!PRVM_ED_ParseEpair(NULL, key, COM_Token))
|
||||
PRVM_ERROR ("PRVM_ED_ParseGlobals: parse error");
|
||||
}
|
||||
}
|
||||
|
@ -1048,7 +1048,7 @@ Used for initial level load and for savegames.
|
|||
const char *PRVM_ED_ParseEdict (const char *data, edict_t *ent)
|
||||
{
|
||||
ddef_t *key;
|
||||
bool init, newline;
|
||||
bool init, newline, anglehack;
|
||||
char keyname[256];
|
||||
size_t n;
|
||||
|
||||
|
@ -1061,11 +1061,20 @@ const char *PRVM_ED_ParseEdict (const char *data, edict_t *ent)
|
|||
if (!COM_Parse(&data))
|
||||
PRVM_ERROR ("PRVM_ED_ParseEdict: EOF without closing brace");
|
||||
|
||||
newline = (COM_Token()[0] == '}') ? true : false;
|
||||
if(!newline) MsgDev(D_LOAD, "Key: \"%s\"", COM_Token());
|
||||
newline = (COM_Token[0] == '}') ? true : false;
|
||||
if(!newline) MsgDev(D_LOAD, "Key: \"%s\"", COM_Token);
|
||||
else break;
|
||||
|
||||
// anglehack is to allow QuakeEd to write single scalar angles
|
||||
// and allow them to be turned into vectors. (FIXME...)
|
||||
if (!strcmp(COM_Token, "angle"))
|
||||
{
|
||||
strncpy (COM_Token, "angles", MAX_QPATH);
|
||||
anglehack = true;
|
||||
}
|
||||
else anglehack = false;
|
||||
|
||||
strncpy (keyname, COM_Token(), sizeof(keyname));
|
||||
strncpy (keyname, COM_Token, sizeof(keyname));
|
||||
|
||||
// another hack to fix keynames with trailing spaces
|
||||
n = strlen(keyname);
|
||||
|
@ -1078,9 +1087,9 @@ const char *PRVM_ED_ParseEdict (const char *data, edict_t *ent)
|
|||
// parse value
|
||||
if (!COM_Parse(&data))
|
||||
PRVM_ERROR ("PRVM_ED_ParseEdict: EOF without closing brace");
|
||||
MsgDev(D_LOAD, " \"%s\"\n", COM_Token());
|
||||
MsgDev(D_LOAD, " \"%s\"\n", COM_Token);
|
||||
|
||||
if (COM_Token()[0] == '}')
|
||||
if (COM_Token[0] == '}')
|
||||
PRVM_ERROR ("PRVM_ED_ParseEdict: closing brace without data");
|
||||
|
||||
init = true;
|
||||
|
@ -1100,7 +1109,15 @@ const char *PRVM_ED_ParseEdict (const char *data, edict_t *ent)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!PRVM_ED_ParseEpair(ent, key, COM_Token()))
|
||||
if (anglehack)
|
||||
{
|
||||
char temp[32];
|
||||
|
||||
strncpy (temp, COM_Token, sizeof(temp));
|
||||
sprintf (COM_Token, "0 %s 0", temp);
|
||||
}
|
||||
|
||||
if (!PRVM_ED_ParseEpair(ent, key, COM_Token))
|
||||
PRVM_ERROR ("PRVM_ED_ParseEdict: parse error");
|
||||
}
|
||||
|
||||
|
@ -1142,8 +1159,8 @@ void PRVM_ED_LoadFromFile (const char *data)
|
|||
{
|
||||
// parse the opening brace
|
||||
if (!COM_Parse(&data)) break;
|
||||
if (COM_Token()[0] != '{')
|
||||
PRVM_ERROR ("PRVM_ED_LoadFromFile: %s: found %s when expecting {", PRVM_NAME, COM_Token());
|
||||
if (COM_Token[0] != '{')
|
||||
PRVM_ERROR ("PRVM_ED_LoadFromFile: %s: found %s when expecting {", PRVM_NAME, COM_Token);
|
||||
|
||||
// CHANGED: this is not conform to PR_LoadFromFile
|
||||
if(prog->loadintoworld)
|
||||
|
|
|
@ -74,6 +74,8 @@ typedef struct entvars_s
|
|||
// physics description
|
||||
vec3_t origin;
|
||||
vec3_t angles;
|
||||
vec3_t old_origin;
|
||||
vec3_t old_angles;
|
||||
vec3_t velocity;
|
||||
vec3_t avelocity;
|
||||
vec3_t post_origin;
|
||||
|
@ -146,7 +148,7 @@ typedef struct entvars_s
|
|||
float idealpitch;
|
||||
string_t netname;
|
||||
int enemy;
|
||||
float colormap;
|
||||
float alpha;
|
||||
float team;
|
||||
float max_health;
|
||||
float teleport_time;
|
||||
|
@ -166,7 +168,7 @@ typedef struct entvars_s
|
|||
string_t noise;
|
||||
string_t noise1;
|
||||
string_t noise2;
|
||||
string_t noise3;
|
||||
string_t sound;
|
||||
float jumpup;
|
||||
float jumpdn;
|
||||
int movetarget;
|
||||
|
@ -179,6 +181,6 @@ typedef struct entvars_s
|
|||
|
||||
} entvars_t;
|
||||
|
||||
#define PROG_CRC_SERVER 42175
|
||||
#define PROG_CRC_SERVER 5039
|
||||
|
||||
#endif//PROGDEFS_H
|
|
@ -277,6 +277,7 @@ void SV_Status_f (void);
|
|||
void SV_WriteFrameToClient (client_t *client, sizebuf_t *msg);
|
||||
void SV_RecordDemoMessage (void);
|
||||
void SV_BuildClientFrame (client_t *client);
|
||||
void SV_UpdateEntityState( edict_t *ent);
|
||||
void SV_FatPVS ( vec3_t org );
|
||||
|
||||
void SV_Error (char *error, ...);
|
||||
|
|
|
@ -69,6 +69,9 @@ struct sv_edict_s
|
|||
int num_clusters; // if -1, use headnode instead
|
||||
int clusternums[MAX_ENT_CLUSTERS];
|
||||
int areanum, areanum2;
|
||||
int serialnumber; // unical entity #id
|
||||
int solid; // see entity_state_t for details
|
||||
int event; // apply sv.events too
|
||||
|
||||
// baselines
|
||||
entity_state_t s;
|
||||
|
|
|
@ -24,6 +24,37 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
/*
|
||||
=============================================================================
|
||||
|
||||
Copy PRVM values into entity state
|
||||
|
||||
=============================================================================
|
||||
*/
|
||||
void SV_UpdateEntityState( edict_t *ent)
|
||||
{
|
||||
// copy progs values to state
|
||||
ent->priv.sv->s.number = ent->priv.sv->serialnumber;
|
||||
ent->priv.sv->s.solid = ent->priv.sv->solid;
|
||||
ent->priv.sv->s.event = ent->priv.sv->event;
|
||||
|
||||
VectorCopy (ent->progs.sv->origin, ent->priv.sv->s.origin);
|
||||
VectorCopy (ent->progs.sv->angles, ent->priv.sv->s.angles);
|
||||
VectorCopy (ent->progs.sv->old_origin, ent->priv.sv->s.old_origin);
|
||||
|
||||
ent->priv.sv->s.modelindex = (int)ent->progs.sv->modelindex;
|
||||
ent->priv.sv->s.weaponmodel = SV_ModelIndex(PRVM_GetString(ent->progs.sv->weaponmodel));
|
||||
|
||||
ent->priv.sv->s.skin = (short)ent->progs.sv->skin; // studio model skin
|
||||
ent->priv.sv->s.body = (byte)ent->progs.sv->body; // studio model submodel
|
||||
ent->priv.sv->s.frame = (short)ent->progs.sv->frame; // any model current frame
|
||||
ent->priv.sv->s.sequence = (byte)ent->progs.sv->sequence; // studio model sequence
|
||||
ent->priv.sv->s.effects = (uint)ent->progs.sv->effects; // shared client and render flags
|
||||
ent->priv.sv->s.renderfx = (int)ent->progs.sv->renderfx; // renderer flags
|
||||
ent->priv.sv->s.alpha = ent->progs.sv->alpha; // alpha value
|
||||
ent->priv.sv->s.soundindex = SV_SoundIndex(PRVM_GetString(ent->progs.sv->sound));
|
||||
}
|
||||
|
||||
/*
|
||||
=============================================================================
|
||||
|
||||
Encode a client frame onto the network channel
|
||||
|
||||
=============================================================================
|
||||
|
@ -490,7 +521,7 @@ void SV_BuildClientFrame (client_t *client)
|
|||
ent = PRVM_EDICT_NUM(e);
|
||||
|
||||
// ignore ents without visible models unless they have an effect
|
||||
if (!ent->priv.sv->s.modelindex && !ent->priv.sv->s.effects && !ent->priv.sv->s.sound && !ent->priv.sv->s.event)
|
||||
if (!ent->progs.sv->modelindex && !ent->progs.sv->effects && !ent->progs.sv->sound && !ent->priv.sv->event)
|
||||
continue;
|
||||
|
||||
// ignore if not touching a PV leaf
|
||||
|
@ -506,7 +537,7 @@ void SV_BuildClientFrame (client_t *client)
|
|||
}
|
||||
|
||||
// beams just check one point for PHS
|
||||
if (ent->priv.sv->s.renderfx & RF_BEAM)
|
||||
if ((int)ent->progs.sv->renderfx & RF_BEAM)
|
||||
{
|
||||
l = ent->priv.sv->clusternums[0];
|
||||
if ( !(clientphs[l >> 3] & (1 << (l&7) )) )
|
||||
|
@ -516,7 +547,7 @@ void SV_BuildClientFrame (client_t *client)
|
|||
{
|
||||
// FIXME: if an ent has a model and a sound, but isn't
|
||||
// in the PVS, only the PHS, clear the model
|
||||
if (ent->priv.sv->s.sound)
|
||||
if (ent->progs.sv->sound)
|
||||
{
|
||||
bitvector = fatpvs; //clientphs;
|
||||
}
|
||||
|
@ -541,13 +572,13 @@ void SV_BuildClientFrame (client_t *client)
|
|||
continue; // not visible
|
||||
}
|
||||
|
||||
if (!ent->priv.sv->s.modelindex)
|
||||
if (!ent->progs.sv->modelindex)
|
||||
{
|
||||
// don't send sounds if they will be attenuated away
|
||||
vec3_t delta;
|
||||
float len;
|
||||
|
||||
VectorSubtract (org, ent->priv.sv->s.origin, delta);
|
||||
VectorSubtract (org, ent->progs.sv->origin, delta);
|
||||
len = VectorLength (delta);
|
||||
if (len > 400) continue;
|
||||
}
|
||||
|
@ -556,17 +587,13 @@ void SV_BuildClientFrame (client_t *client)
|
|||
|
||||
// add it to the circular client_entities array
|
||||
state = &svs.client_entities[svs.next_client_entities % svs.num_client_entities];
|
||||
if (ent->priv.sv->s.number != e)
|
||||
if (ent->priv.sv->serialnumber != e)
|
||||
{
|
||||
MsgWarn ("SV_BuildClientFrame: invalid ent->priv.sv->s.number %d\n", ent->priv.sv->s.number );
|
||||
ent->priv.sv->s.number = e; // ptr to current entity such as entnumber
|
||||
MsgWarn ("SV_BuildClientFrame: invalid ent->priv.sv->serialnumber %d\n", ent->priv.sv->serialnumber );
|
||||
ent->priv.sv->serialnumber = e; // ptr to current entity such as entnumber
|
||||
}
|
||||
|
||||
// copy progs values to state
|
||||
//ent->priv.sv->s.modelindex = ent->progs.sv->modelindex;
|
||||
//ent->priv.sv->s.frame = ent->progs.sv->frame;
|
||||
//for (i = 0; i < 3; i++) ent->priv.sv->s.origin[i] = ent->progs.sv->origin[i];
|
||||
|
||||
SV_UpdateEntityState( ent );
|
||||
*state = ent->priv.sv->s;
|
||||
|
||||
// don't mark players missiles as solid
|
||||
|
@ -612,8 +639,8 @@ void SV_RecordDemoMessage (void)
|
|||
while (e < prog->num_edicts)
|
||||
{
|
||||
// ignore ents without visible models unless they have an effect
|
||||
if (!ent->priv.sv->free && ent->priv.sv->s.number &&
|
||||
(ent->priv.sv->s.modelindex || ent->priv.sv->s.effects || ent->priv.sv->s.sound || ent->priv.sv->s.event))
|
||||
if (!ent->priv.sv->free && ent->priv.sv->serialnumber &&
|
||||
(ent->priv.sv->s.modelindex || ent->progs.sv->effects || ent->progs.sv->sound || ent->priv.sv->event))
|
||||
MSG_WriteDeltaEntity (&nostate, &ent->priv.sv->s, &buf, false, true);
|
||||
|
||||
e++;
|
||||
|
|
|
@ -66,7 +66,7 @@ void PF_setorigin (void)
|
|||
return;
|
||||
}
|
||||
org = PRVM_G_VECTOR(OFS_PARM1);
|
||||
VectorCopy (org, e->priv.sv->s.origin);
|
||||
VectorCopy (org, e->progs.sv->origin);
|
||||
SV_LinkEdict (e);
|
||||
}
|
||||
|
||||
|
@ -162,12 +162,12 @@ void SV_SetModel (edict_t *ent, const char *name)
|
|||
|
||||
i = SV_ModelIndex( name );
|
||||
ent->progs.sv->model = PRVM_SetEngineString(sv.configstrings[CS_MODELS+i]);
|
||||
ent->progs.sv->modelindex = ent->priv.sv->s.modelindex = i;
|
||||
VectorCopy (ent->progs.sv->origin, ent->priv.sv->s.origin);
|
||||
VectorCopy (ent->progs.sv->angles, ent->priv.sv->s.angles);
|
||||
ent->progs.sv->modelindex = ent->progs.sv->modelindex = i;
|
||||
VectorCopy (ent->progs.sv->origin, ent->progs.sv->origin);
|
||||
VectorCopy (ent->progs.sv->angles, ent->progs.sv->angles);
|
||||
|
||||
mod = CM_LoadModel(sv.configstrings[CS_MODELS+i]);
|
||||
if(mod) SetMinMaxSize( ent, mod->mins, mod->maxs, false );
|
||||
mod = CM_LoadModel( i );
|
||||
if( mod )SetMinMaxSize( ent, mod->mins, mod->maxs, false );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -754,11 +754,10 @@ float(float yaw, float dist) walkmove
|
|||
*/
|
||||
void PF_walkmove (void)
|
||||
{
|
||||
edict_t *ent;
|
||||
edict_t *ent;
|
||||
float yaw, dist;
|
||||
vec3_t move;
|
||||
mfunction_t *oldf;
|
||||
int oldself;
|
||||
int oldpev;
|
||||
|
||||
// assume failure if it returns early
|
||||
PRVM_G_FLOAT(OFS_RETURN) = 0;
|
||||
|
@ -781,21 +780,15 @@ void PF_walkmove (void)
|
|||
if (!((int)ent->progs.sv->aiflags & (AI_ONGROUND|AI_FLY|AI_SWIM)))
|
||||
return;
|
||||
|
||||
yaw = yaw * M_PI * 2 / 360;
|
||||
|
||||
move[0] = cos(yaw)*dist;
|
||||
move[1] = sin(yaw)*dist;
|
||||
move[2] = 0;
|
||||
|
||||
// save program state, because SV_movestep may call other progs
|
||||
oldf = prog->xfunction;
|
||||
oldself = prog->globals.server->pev;
|
||||
oldpev = prog->globals.server->pev;
|
||||
|
||||
PRVM_G_FLOAT(OFS_RETURN) = 0;//SV_movestep(ent, move, true);
|
||||
PRVM_G_FLOAT(OFS_RETURN) = SV_WalkMove(ent, yaw, dist);
|
||||
|
||||
// restore program state
|
||||
prog->xfunction = oldf;
|
||||
prog->globals.server->pev = oldself;
|
||||
prog->globals.server->pev = oldpev;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -33,98 +33,100 @@ prvm_fieldvars_t reqfields[] =
|
|||
{2, 2, "modelindex"},
|
||||
{3, 3, "origin"},
|
||||
{6, 3, "angles"},
|
||||
{9, 3, "velocity"},
|
||||
{12, 3, "avelocity"},
|
||||
{15, 3, "post_origin"},
|
||||
{18, 3, "post_angles"},
|
||||
{21, 3, "post_velocity"},
|
||||
{24, 3, "post_avelocity"},
|
||||
{27, 3, "origin_offset"},
|
||||
{30, 3, "angles_offset"},
|
||||
{33, 2, "ltime"},
|
||||
{34, 2, "bouncetype"},
|
||||
{35, 2, "movetype"},
|
||||
{36, 2, "solid"},
|
||||
{37, 3, "absmin"},
|
||||
{40, 3, "absmax"},
|
||||
{43, 3, "mins"},
|
||||
{46, 3, "maxs"},
|
||||
{49, 3, "size"},
|
||||
{52, 4, "chain"},
|
||||
{53, 1, "model"},
|
||||
{54, 2, "frame"},
|
||||
{55, 2, "sequence"},
|
||||
{56, 2, "renderfx"},
|
||||
{57, 2, "effects"},
|
||||
{58, 2, "skin"},
|
||||
{59, 2, "body"},
|
||||
{60, 1, "weaponmodel"},
|
||||
{61, 2, "weaponframe"},
|
||||
{62, 6, "use"},
|
||||
{63, 6, "touch"},
|
||||
{64, 6, "think"},
|
||||
{65, 6, "blocked"},
|
||||
{66, 6, "activate"},
|
||||
{67, 6, "walk"},
|
||||
{68, 6, "jump"},
|
||||
{69, 6, "duck"},
|
||||
{70, 2, "flags"},
|
||||
{71, 2, "aiflags"},
|
||||
{72, 2, "spawnflags"},
|
||||
{73, 4, "groundentity"},
|
||||
{74, 2, "nextthink"},
|
||||
{75, 2, "takedamage"},
|
||||
{76, 2, "health"},
|
||||
{77, 2, "frags"},
|
||||
{78, 2, "weapon"},
|
||||
{79, 2, "items"},
|
||||
{80, 1, "target"},
|
||||
{81, 1, "parent"},
|
||||
{82, 1, "targetname"},
|
||||
{83, 4, "aiment"},
|
||||
{84, 4, "goalentity"},
|
||||
{85, 3, "punchangle"},
|
||||
{88, 2, "deadflag"},
|
||||
{89, 3, "view_ofs"},
|
||||
{92, 2, "button0"},
|
||||
{93, 2, "button1"},
|
||||
{94, 2, "button2"},
|
||||
{95, 2, "impulse"},
|
||||
{96, 2, "fixangle"},
|
||||
{97, 3, "v_angle"},
|
||||
{100, 2, "idealpitch"},
|
||||
{101, 1, "netname"},
|
||||
{102, 4, "enemy"},
|
||||
{103, 2, "colormap"},
|
||||
{104, 2, "team"},
|
||||
{105, 2, "max_health"},
|
||||
{106, 2, "teleport_time"},
|
||||
{107, 2, "armortype"},
|
||||
{108, 2, "armorvalue"},
|
||||
{109, 2, "waterlevel"},
|
||||
{110, 2, "watertype"},
|
||||
{111, 2, "ideal_yaw"},
|
||||
{112, 2, "yaw_speed"},
|
||||
{113, 2, "dmg_take"},
|
||||
{114, 2, "dmg_save"},
|
||||
{115, 4, "dmg_inflictor"},
|
||||
{116, 4, "owner"},
|
||||
{117, 3, "movedir"},
|
||||
{120, 1, "message"},
|
||||
{121, 2, "sounds"},
|
||||
{122, 1, "noise"},
|
||||
{123, 1, "noise1"},
|
||||
{124, 1, "noise2"},
|
||||
{125, 1, "noise3"},
|
||||
{126, 2, "jumpup"},
|
||||
{127, 2, "jumpdn"},
|
||||
{128, 4, "movetarget"},
|
||||
{129, 2, "mass"},
|
||||
{130, 2, "density"},
|
||||
{131, 2, "gravity"},
|
||||
{132, 2, "dmg"},
|
||||
{133, 2, "dmgtime"},
|
||||
{134, 2, "speed"}
|
||||
{9, 3, "old_origin"},
|
||||
{12, 3, "old_angles"},
|
||||
{15, 3, "velocity"},
|
||||
{18, 3, "avelocity"},
|
||||
{21, 3, "post_origin"},
|
||||
{24, 3, "post_angles"},
|
||||
{27, 3, "post_velocity"},
|
||||
{30, 3, "post_avelocity"},
|
||||
{33, 3, "origin_offset"},
|
||||
{36, 3, "angles_offset"},
|
||||
{39, 2, "ltime"},
|
||||
{40, 2, "bouncetype"},
|
||||
{41, 2, "movetype"},
|
||||
{42, 2, "solid"},
|
||||
{43, 3, "absmin"},
|
||||
{46, 3, "absmax"},
|
||||
{49, 3, "mins"},
|
||||
{52, 3, "maxs"},
|
||||
{55, 3, "size"},
|
||||
{58, 4, "chain"},
|
||||
{59, 1, "model"},
|
||||
{60, 2, "frame"},
|
||||
{61, 2, "sequence"},
|
||||
{62, 2, "renderfx"},
|
||||
{63, 2, "effects"},
|
||||
{64, 2, "skin"},
|
||||
{65, 2, "body"},
|
||||
{66, 1, "weaponmodel"},
|
||||
{67, 2, "weaponframe"},
|
||||
{68, 6, "use"},
|
||||
{69, 6, "touch"},
|
||||
{70, 6, "think"},
|
||||
{71, 6, "blocked"},
|
||||
{72, 6, "activate"},
|
||||
{73, 6, "walk"},
|
||||
{74, 6, "jump"},
|
||||
{75, 6, "duck"},
|
||||
{76, 2, "flags"},
|
||||
{77, 2, "aiflags"},
|
||||
{78, 2, "spawnflags"},
|
||||
{79, 4, "groundentity"},
|
||||
{80, 2, "nextthink"},
|
||||
{81, 2, "takedamage"},
|
||||
{82, 2, "health"},
|
||||
{83, 2, "frags"},
|
||||
{84, 2, "weapon"},
|
||||
{85, 2, "items"},
|
||||
{86, 1, "target"},
|
||||
{87, 1, "parent"},
|
||||
{88, 1, "targetname"},
|
||||
{89, 4, "aiment"},
|
||||
{90, 4, "goalentity"},
|
||||
{91, 3, "punchangle"},
|
||||
{94, 2, "deadflag"},
|
||||
{95, 3, "view_ofs"},
|
||||
{98, 2, "button0"},
|
||||
{99, 2, "button1"},
|
||||
{100, 2, "button2"},
|
||||
{101, 2, "impulse"},
|
||||
{102, 2, "fixangle"},
|
||||
{103, 3, "v_angle"},
|
||||
{106, 2, "idealpitch"},
|
||||
{107, 1, "netname"},
|
||||
{108, 4, "enemy"},
|
||||
{109, 2, "colormap"},
|
||||
{110, 2, "team"},
|
||||
{111, 2, "max_health"},
|
||||
{112, 2, "teleport_time"},
|
||||
{113, 2, "armortype"},
|
||||
{114, 2, "armorvalue"},
|
||||
{115, 2, "waterlevel"},
|
||||
{116, 2, "watertype"},
|
||||
{117, 2, "ideal_yaw"},
|
||||
{118, 2, "yaw_speed"},
|
||||
{119, 2, "dmg_take"},
|
||||
{120, 2, "dmg_save"},
|
||||
{121, 4, "dmg_inflictor"},
|
||||
{122, 4, "owner"},
|
||||
{123, 3, "movedir"},
|
||||
{126, 1, "message"},
|
||||
{127, 2, "sounds"},
|
||||
{128, 1, "noise"},
|
||||
{129, 1, "noise1"},
|
||||
{130, 1, "noise2"},
|
||||
{131, 1, "noise3"},
|
||||
{132, 2, "jumpup"},
|
||||
{133, 2, "jumpdn"},
|
||||
{134, 4, "movetarget"},
|
||||
{135, 2, "mass"},
|
||||
{136, 2, "density"},
|
||||
{137, 2, "gravity"},
|
||||
{138, 2, "dmg"},
|
||||
{139, 2, "dmgtime"},
|
||||
{140, 2, "speed"}
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -200,14 +202,16 @@ void SV_CreateBaseline (void)
|
|||
{
|
||||
svent = PRVM_EDICT_NUM(entnum);
|
||||
if (svent->priv.sv->free) continue;
|
||||
if (!svent->priv.sv->s.modelindex && !svent->priv.sv->s.sound && !svent->priv.sv->s.effects)
|
||||
if (!svent->progs.sv->modelindex && !svent->progs.sv->sound && !svent->progs.sv->effects)
|
||||
continue;
|
||||
svent->priv.sv->s.number = entnum;
|
||||
svent->priv.sv->serialnumber = entnum;
|
||||
|
||||
//
|
||||
// take current state as baseline
|
||||
//
|
||||
VectorCopy (svent->priv.sv->s.origin, svent->priv.sv->s.old_origin);
|
||||
VectorCopy (svent->progs.sv->origin, svent->progs.sv->old_origin);
|
||||
SV_UpdateEntityState( svent );
|
||||
|
||||
sv.baselines[entnum] = svent->priv.sv->s;
|
||||
}
|
||||
}
|
||||
|
@ -436,7 +440,7 @@ void SV_InitGame (void)
|
|||
for (i = 0; i < maxclients->value; i++)
|
||||
{
|
||||
ent = PRVM_EDICT_NUM(i + 1);
|
||||
ent->priv.sv->s.number = i + 1;
|
||||
ent->priv.sv->serialnumber = i + 1;
|
||||
svs.clients[i].edict = ent;
|
||||
memset (&svs.clients[i].lastcmd, 0, sizeof(svs.clients[i].lastcmd));
|
||||
}
|
||||
|
|
|
@ -706,7 +706,7 @@ void SV_PrepWorldFrame (void)
|
|||
{
|
||||
ent = PRVM_EDICT_NUM(i);
|
||||
// events only last for a single message
|
||||
ent->priv.sv->s.event = 0;
|
||||
ent->priv.sv->event = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -727,7 +727,7 @@ void SV_RunGameFrame (void)
|
|||
// compression can get confused when a client
|
||||
// has the "current" frame
|
||||
sv.framenum++;
|
||||
sv.frametime = 0.001f;
|
||||
sv.frametime = 0.001f;//1000 fps
|
||||
sv.time = sv.framenum * sv.frametime;
|
||||
|
||||
// don't run if paused
|
||||
|
|
|
@ -43,8 +43,8 @@ bool SV_CheckBottom (edict_t *ent)
|
|||
int x, y;
|
||||
float mid, bottom;
|
||||
|
||||
VectorAdd (ent->priv.sv->s.origin, ent->progs.sv->mins, mins);
|
||||
VectorAdd (ent->priv.sv->s.origin, ent->progs.sv->maxs, maxs);
|
||||
VectorAdd (ent->progs.sv->origin, ent->progs.sv->mins, mins);
|
||||
VectorAdd (ent->progs.sv->origin, ent->progs.sv->maxs, maxs);
|
||||
|
||||
// if all of the points under the corners are solid world, don't bother
|
||||
// with the tougher checks
|
||||
|
@ -121,19 +121,19 @@ void SV_DropToFloor (edict_t *ent)
|
|||
ent->progs.sv->movetype = MOVETYPE_TOSS;
|
||||
|
||||
VectorSet(v, 0, 0, -128);
|
||||
VectorAdd (ent->priv.sv->s.origin, v, dest);
|
||||
VectorAdd (ent->progs.sv->origin, v, dest);
|
||||
|
||||
tr = SV_Trace (ent->priv.sv->s.origin, ent->progs.sv->mins, ent->progs.sv->maxs, dest, ent, MASK_SOLID);
|
||||
tr = SV_Trace (ent->progs.sv->origin, ent->progs.sv->mins, ent->progs.sv->maxs, dest, ent, MASK_SOLID);
|
||||
if (tr.startsolid)
|
||||
{
|
||||
Msg("SV_DropToFloor: %s startsolid at %s\n", PRVM_G_STRING(ent->progs.sv->classname), ent->priv.sv->s.origin[0], ent->priv.sv->s.origin[1], ent->priv.sv->s.origin[2]);
|
||||
Msg("SV_DropToFloor: %s startsolid at %g %g %g\n", PRVM_GetString(ent->progs.sv->classname), ent->progs.sv->origin[0], ent->progs.sv->origin[1], ent->progs.sv->origin[2]);
|
||||
SV_FreeEdict (ent);
|
||||
return;
|
||||
}
|
||||
tr.endpos[2] += 1;
|
||||
ent->progs.sv->mins[2] -= 1;
|
||||
ent->progs.sv->groundentity = PRVM_EDICT_TO_PROG(tr.ent);
|
||||
VectorCopy (tr.endpos, ent->priv.sv->s.origin);
|
||||
VectorCopy (tr.endpos, ent->progs.sv->origin);
|
||||
|
||||
SV_LinkEdict (ent);
|
||||
}
|
||||
|
@ -151,11 +151,11 @@ void SV_CheckGround (edict_t *ent)
|
|||
}
|
||||
|
||||
// if the hull point one-quarter unit down is solid the entity is on ground
|
||||
point[0] = ent->priv.sv->s.origin[0];
|
||||
point[1] = ent->priv.sv->s.origin[1];
|
||||
point[2] = ent->priv.sv->s.origin[2] - 0.25;
|
||||
point[0] = ent->progs.sv->origin[0];
|
||||
point[1] = ent->progs.sv->origin[1];
|
||||
point[2] = ent->progs.sv->origin[2] - 0.25;
|
||||
|
||||
trace = SV_Trace (ent->priv.sv->s.origin, ent->progs.sv->mins, ent->progs.sv->maxs, point, ent, MASK_MONSTERSOLID);
|
||||
trace = SV_Trace (ent->progs.sv->origin, ent->progs.sv->mins, ent->progs.sv->maxs, point, ent, MASK_MONSTERSOLID);
|
||||
|
||||
// check steepness
|
||||
if ( trace.plane.normal[2] < 0.7 && !trace.startsolid)
|
||||
|
@ -173,7 +173,7 @@ void SV_CheckGround (edict_t *ent)
|
|||
ent->progs.sv->groundentity = PRVM_EDICT_TO_PROG(trace.ent);
|
||||
if (!trace.startsolid && !trace.allsolid)
|
||||
{
|
||||
VectorCopy (trace.endpos, ent->priv.sv->s.origin);
|
||||
VectorCopy (trace.endpos, ent->progs.sv->origin);
|
||||
ent->progs.sv->groundentity = PRVM_EDICT_TO_PROG(trace.ent);
|
||||
ent->progs.sv->velocity[2] = trace.ent->progs.sv->velocity[2];
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ void SV_FallingDamage (edict_t *ent)
|
|||
|
||||
if (delta < 15)
|
||||
{
|
||||
ent->priv.sv->s.event = EV_FOOTSTEP;
|
||||
ent->priv.sv->event = EV_FOOTSTEP;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ void SV_FallingDamage (edict_t *ent)
|
|||
if (damage < 1) damage = 1;
|
||||
VectorSet (dir, 0, 0, 1);
|
||||
|
||||
T_Damage (ent, prog->edicts, prog->edicts, dir, ent->priv.sv->s.origin, vec3_origin, damage, 0, 0, DMG_FALL);
|
||||
T_Damage (ent, prog->edicts, prog->edicts, dir, ent->progs.sv->origin, vec3_origin, damage, 0, 0, DMG_FALL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,10 +266,10 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
edict_t *target;
|
||||
|
||||
// try the move
|
||||
VectorCopy (ent->priv.sv->s.origin, oldorg);
|
||||
VectorAdd (ent->priv.sv->s.origin, move, neworg);
|
||||
VectorCopy (ent->progs.sv->origin, oldorg);
|
||||
VectorAdd (ent->progs.sv->origin, move, neworg);
|
||||
|
||||
AngleVectors(ent->priv.sv->s.angles,forward,NULL,up);
|
||||
AngleVectors(ent->progs.sv->angles,forward, NULL, up);
|
||||
if(ent->progs.sv->enemy)
|
||||
target = PRVM_PROG_TO_EDICT(ent->progs.sv->enemy);
|
||||
else if(ent->progs.sv->movetarget)
|
||||
|
@ -283,12 +283,12 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
// try one move with vertical motion, then one without
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
VectorAdd (ent->priv.sv->s.origin, move, neworg);
|
||||
VectorAdd (ent->progs.sv->origin, move, neworg);
|
||||
if (i == 0 && ent->progs.sv->enemy)
|
||||
{
|
||||
if (!ent->progs.sv->goalentity)
|
||||
ent->progs.sv->goalentity = ent->progs.sv->enemy;
|
||||
dz = ent->priv.sv->s.origin[2] - PRVM_PROG_TO_EDICT(ent->progs.sv->goalentity)->priv.sv->s.origin[2];
|
||||
dz = ent->progs.sv->origin[2] - PRVM_PROG_TO_EDICT(ent->progs.sv->goalentity)->progs.sv->origin[2];
|
||||
if (PRVM_PROG_TO_EDICT(ent->progs.sv->goalentity)->priv.sv->client)
|
||||
{
|
||||
if (dz > 40) neworg[2] -= 8;
|
||||
|
@ -303,7 +303,7 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
else neworg[2] += dz;
|
||||
}
|
||||
}
|
||||
trace = SV_Trace (ent->priv.sv->s.origin, ent->progs.sv->mins, ent->progs.sv->maxs, neworg, ent, MASK_MONSTERSOLID);
|
||||
trace = SV_Trace (ent->progs.sv->origin, ent->progs.sv->mins, ent->progs.sv->maxs, neworg, ent, MASK_MONSTERSOLID);
|
||||
|
||||
// fly monsters don't enter water voluntarily
|
||||
if ((int)ent->progs.sv->aiflags & AI_FLY)
|
||||
|
@ -335,7 +335,7 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
|
||||
if (trace.fraction == 1)
|
||||
{
|
||||
VectorCopy (trace.endpos, ent->priv.sv->s.origin);
|
||||
VectorCopy (trace.endpos, ent->progs.sv->origin);
|
||||
if (relink)
|
||||
{
|
||||
SV_LinkEdict(ent);
|
||||
|
@ -376,9 +376,9 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
{
|
||||
// Never jump unless it places monster closer to his goal
|
||||
vec3_t dir;
|
||||
VectorSubtract(target->priv.sv->s.origin, oldorg, dir);
|
||||
VectorSubtract(target->progs.sv->origin, oldorg, dir);
|
||||
d1 = VectorLength(dir);
|
||||
VectorSubtract(target->priv.sv->s.origin, trace.endpos, dir);
|
||||
VectorSubtract(target->progs.sv->origin, trace.endpos, dir);
|
||||
d2 = VectorLength(dir);
|
||||
if(d2 < d1)
|
||||
canjump = true;
|
||||
|
@ -404,12 +404,12 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
trace_t tr;
|
||||
vec3_t p2;
|
||||
|
||||
VectorMA(ent->priv.sv->s.origin,1024,forward,p2);
|
||||
tr = SV_Trace(ent->priv.sv->s.origin,ent->progs.sv->mins,ent->progs.sv->maxs,p2,ent,MASK_MONSTERSOLID);
|
||||
VectorMA(ent->progs.sv->origin,1024,forward,p2);
|
||||
tr = SV_Trace(ent->progs.sv->origin,ent->progs.sv->mins,ent->progs.sv->maxs,p2,ent,MASK_MONSTERSOLID);
|
||||
if(DotProduct(tr.plane.normal,forward) < -0.95)
|
||||
{
|
||||
jump = 1;
|
||||
jumpheight = trace.endpos[2] - ent->priv.sv->s.origin[2];
|
||||
jumpheight = trace.endpos[2] - ent->progs.sv->origin[2];
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
@ -474,23 +474,23 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
{
|
||||
e = PRVM_EDICT_NUM(i);
|
||||
if(e->priv.sv->free) continue;
|
||||
if(!PRVM_G_STRING(e->progs.sv->classname)) continue;
|
||||
if(strcmp(PRVM_G_STRING(e->progs.sv->classname), "env_laser")) continue;
|
||||
if(!PF_inpvs(ent->priv.sv->s.origin,e->priv.sv->s.origin))
|
||||
if(!PRVM_GetString(e->progs.sv->classname)) continue;
|
||||
if(strcmp(PRVM_GetString(e->progs.sv->classname), "env_laser")) continue;
|
||||
if(!PF_inpvs(ent->progs.sv->origin,e->progs.sv->origin))
|
||||
continue;
|
||||
// Check to see if monster is ALREADY in the path of this laser.
|
||||
// If so, allow the move so he can get out.
|
||||
VectorMA(e->priv.sv->s.origin, 2048, e->progs.sv->movedir, laser_end);
|
||||
laser_trace = SV_Trace(e->priv.sv->s.origin,NULL,NULL,laser_end,NULL,CONTENTS_SOLID|CONTENTS_MONSTER);
|
||||
VectorMA(e->progs.sv->origin, 2048, e->progs.sv->movedir, laser_end);
|
||||
laser_trace = SV_Trace(e->progs.sv->origin,NULL,NULL,laser_end,NULL,CONTENTS_SOLID|CONTENTS_MONSTER);
|
||||
if(laser_trace.ent == ent)
|
||||
continue;
|
||||
VectorCopy(laser_trace.endpos,laser_end);
|
||||
laser_mins[0] = min(e->priv.sv->s.origin[0],laser_end[0]);
|
||||
laser_mins[1] = min(e->priv.sv->s.origin[1],laser_end[1]);
|
||||
laser_mins[2] = min(e->priv.sv->s.origin[2],laser_end[2]);
|
||||
laser_maxs[0] = max(e->priv.sv->s.origin[0],laser_end[0]);
|
||||
laser_maxs[1] = max(e->priv.sv->s.origin[1],laser_end[1]);
|
||||
laser_maxs[2] = max(e->priv.sv->s.origin[2],laser_end[2]);
|
||||
laser_mins[0] = min(e->progs.sv->origin[0],laser_end[0]);
|
||||
laser_mins[1] = min(e->progs.sv->origin[1],laser_end[1]);
|
||||
laser_mins[2] = min(e->progs.sv->origin[2],laser_end[2]);
|
||||
laser_maxs[0] = max(e->progs.sv->origin[0],laser_end[0]);
|
||||
laser_maxs[1] = max(e->progs.sv->origin[1],laser_end[1]);
|
||||
laser_maxs[2] = max(e->progs.sv->origin[2],laser_end[2]);
|
||||
monster_mins[0] = min(oldorg[0],trace.endpos[0]) + ent->progs.sv->mins[0];
|
||||
monster_mins[1] = min(oldorg[1],trace.endpos[1]) + ent->progs.sv->mins[1];
|
||||
monster_mins[2] = min(oldorg[2],trace.endpos[2]) + ent->progs.sv->mins[2];
|
||||
|
@ -517,8 +517,8 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
while(delta < dist+15.875)
|
||||
{
|
||||
if(delta > dist) delta = dist;
|
||||
VectorMA(e->priv.sv->s.origin, -delta,dir,laser_start);
|
||||
VectorMA(e->priv.sv->s.old_origin,-delta,dir,laser_end);
|
||||
VectorMA(e->progs.sv->origin, -delta,dir,laser_start);
|
||||
VectorMA(e->progs.sv->old_origin,-delta,dir,laser_end);
|
||||
laser_trace = SV_Trace(laser_start,NULL,NULL,laser_end,prog->edicts,CONTENTS_SOLID|CONTENTS_MONSTER);
|
||||
if(laser_trace.ent == ent)
|
||||
return false;
|
||||
|
@ -543,7 +543,7 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
// if monster had the ground pulled out, go ahead and fall
|
||||
if ((int)ent->progs.sv->aiflags & AI_PARTIALONGROUND )
|
||||
{
|
||||
VectorAdd (ent->priv.sv->s.origin, move, ent->priv.sv->s.origin);
|
||||
VectorAdd (ent->progs.sv->origin, move, ent->progs.sv->origin);
|
||||
if (relink)
|
||||
{
|
||||
SV_LinkEdict(ent);
|
||||
|
@ -556,20 +556,20 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
}
|
||||
|
||||
// check point traces down for dangling corners
|
||||
VectorCopy (trace.endpos, ent->priv.sv->s.origin);
|
||||
VectorCopy (trace.endpos, ent->progs.sv->origin);
|
||||
|
||||
if(!jump)
|
||||
{
|
||||
bool skip = false;
|
||||
// if monster CAN jump down, and a position just a bit forward would be
|
||||
// a good jump-down spot, allow (briefly) !M_CheckBottom
|
||||
if (canjump && target && (target->priv.sv->s.origin[2] < ent->priv.sv->s.origin[2]) && (ent->progs.sv->jumpdn > 0))
|
||||
if (canjump && target && (target->progs.sv->origin[2] < ent->progs.sv->origin[2]) && (ent->progs.sv->jumpdn > 0))
|
||||
{
|
||||
vec3_t p1, p2;
|
||||
trace_t tr;
|
||||
|
||||
VectorMA(oldorg,48,forward,p1);
|
||||
tr = SV_Trace(ent->priv.sv->s.origin, ent->progs.sv->mins, ent->progs.sv->maxs, p1, ent, MASK_MONSTERSOLID);
|
||||
tr = SV_Trace(ent->progs.sv->origin, ent->progs.sv->mins, ent->progs.sv->maxs, p1, ent, MASK_MONSTERSOLID);
|
||||
if(tr.fraction == 1)
|
||||
{
|
||||
p2[0] = p1[0];
|
||||
|
@ -580,7 +580,7 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
{
|
||||
if(!tr.ent || (!tr.ent->priv.sv->client && !((int)tr.ent->progs.sv->flags & FL_MONSTER) && !((int)tr.ent->progs.sv->flags & FL_DEADMONSTER)))
|
||||
{
|
||||
VectorSubtract(target->priv.sv->s.origin, tr.endpos, dir);
|
||||
VectorSubtract(target->progs.sv->origin, tr.endpos, dir);
|
||||
d2 = VectorLength(dir);
|
||||
if(d2 < d1)
|
||||
skip = true;
|
||||
|
@ -603,7 +603,7 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
VectorCopy (oldorg, ent->priv.sv->s.origin);
|
||||
VectorCopy (oldorg, ent->progs.sv->origin);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -627,8 +627,8 @@ bool SV_MoveStep (edict_t *ent, vec3_t move, bool relink)
|
|||
else
|
||||
{
|
||||
ent->progs.sv->velocity[2] = max(ent->progs.sv->velocity[2],100);
|
||||
if(oldorg[2] - ent->priv.sv->s.origin[2] > 48)
|
||||
ent->priv.sv->s.origin[2] = oldorg[2] + ent->progs.sv->velocity[2]*0.1f;
|
||||
if(oldorg[2] - ent->progs.sv->origin[2] > 48)
|
||||
ent->progs.sv->origin[2] = oldorg[2] + ent->progs.sv->velocity[2]*0.1f;
|
||||
}
|
||||
if(relink)
|
||||
{
|
||||
|
@ -653,7 +653,7 @@ bool SV_WalkMove (edict_t *ent, float yaw, float dist)
|
|||
{
|
||||
vec3_t move;
|
||||
|
||||
if (!ent->progs.sv->groundentity && !((int)ent->progs.sv->aiflags & (AI_FLY|AI_SWIM)))
|
||||
if (!((int)ent->progs.sv->aiflags & (AI_ONGROUND|AI_FLY|AI_SWIM)))
|
||||
return false;
|
||||
|
||||
yaw = yaw * M_PI*2 / 360;
|
||||
|
@ -682,12 +682,12 @@ edict_t *SV_TestEntityPosition (edict_t *ent)
|
|||
if(ent->progs.sv->solid == SOLID_BSP)
|
||||
{
|
||||
vec3_t org, mins, maxs;
|
||||
VectorAdd(ent->priv.sv->s.origin, ent->progs.sv->origin_offset, org);
|
||||
VectorAdd(ent->progs.sv->origin, ent->progs.sv->origin_offset, org);
|
||||
VectorSubtract(ent->progs.sv->mins, ent->progs.sv->origin_offset, mins);
|
||||
VectorSubtract(ent->progs.sv->maxs, ent->progs.sv->origin_offset, maxs);
|
||||
trace = SV_Trace (org, mins, maxs, org, ent, mask);
|
||||
}
|
||||
else trace = SV_Trace (ent->priv.sv->s.origin, ent->progs.sv->mins, ent->progs.sv->maxs, ent->priv.sv->s.origin, ent, mask);
|
||||
else trace = SV_Trace (ent->progs.sv->origin, ent->progs.sv->mins, ent->progs.sv->maxs, ent->progs.sv->origin, ent, mask);
|
||||
|
||||
if (trace.startsolid)
|
||||
{
|
||||
|
@ -760,7 +760,6 @@ void SV_Impact (edict_t *e1, trace_t *trace)
|
|||
PRVM_PUSH_GLOBALS;
|
||||
|
||||
prog->globals.server->time = sv.time;
|
||||
Msg("touch %d and %d\n", e2->priv.sv->s.number, e1->priv.sv->s.number );
|
||||
if (!e1->priv.sv->free && !e2->priv.sv->free && e1->progs.sv->touch && e1->progs.sv->solid != SOLID_NOT)
|
||||
{
|
||||
prog->globals.server->pev = PRVM_EDICT_TO_PROG(e1);
|
||||
|
@ -869,9 +868,9 @@ retry:
|
|||
ent->progs.sv->groundentity = 0;
|
||||
for (bumpcount = 0; bumpcount < numbumps; bumpcount++)
|
||||
{
|
||||
for (i = 0; i < 3; i++) end[i] = ent->priv.sv->s.origin[i] + time_left * ent->progs.sv->velocity[i];
|
||||
for (i = 0; i < 3; i++) end[i] = ent->progs.sv->origin[i] + time_left * ent->progs.sv->velocity[i];
|
||||
|
||||
trace = SV_Trace (ent->priv.sv->s.origin, ent->progs.sv->mins, ent->progs.sv->maxs, end, ent, mask);
|
||||
trace = SV_Trace (ent->progs.sv->origin, ent->progs.sv->mins, ent->progs.sv->maxs, end, ent, mask);
|
||||
|
||||
if (trace.allsolid)
|
||||
{
|
||||
|
@ -883,7 +882,7 @@ retry:
|
|||
if (trace.fraction > 0)
|
||||
{
|
||||
// actually covered some distance
|
||||
VectorCopy (trace.endpos, ent->priv.sv->s.origin);
|
||||
VectorCopy (trace.endpos, ent->progs.sv->origin);
|
||||
VectorCopy (ent->progs.sv->velocity, original_velocity);
|
||||
numplanes = 0;
|
||||
}
|
||||
|
@ -906,7 +905,7 @@ retry:
|
|||
trace = SV_Trace (above, ent->progs.sv->mins, ent->progs.sv->maxs, end, ent, mask);
|
||||
VectorCopy (trace.endpos,end);
|
||||
end[2] += 1;
|
||||
VectorSubtract (end,ent->priv.sv->s.origin,ent->progs.sv->velocity);
|
||||
VectorSubtract (end,ent->progs.sv->origin,ent->progs.sv->velocity);
|
||||
VectorScale (ent->progs.sv->velocity,1.0/time_left,ent->progs.sv->velocity);
|
||||
num_retries++;
|
||||
goto retry;
|
||||
|
@ -921,11 +920,11 @@ retry:
|
|||
|
||||
if(ent->progs.sv->mass > hit->progs.sv->mass)
|
||||
{
|
||||
VectorMA (hit->priv.sv->s.origin,time_left,ent->progs.sv->velocity,player_dest);
|
||||
ptrace = SV_Trace(hit->priv.sv->s.origin,hit->progs.sv->mins,hit->progs.sv->maxs,player_dest,hit,hit->priv.sv->clipmask);
|
||||
VectorMA (hit->progs.sv->origin,time_left,ent->progs.sv->velocity,player_dest);
|
||||
ptrace = SV_Trace(hit->progs.sv->origin,hit->progs.sv->mins,hit->progs.sv->maxs,player_dest,hit,hit->priv.sv->clipmask);
|
||||
if(ptrace.fraction == 1.0)
|
||||
{
|
||||
VectorCopy(player_dest,hit->priv.sv->s.origin);
|
||||
VectorCopy(player_dest,hit->progs.sv->origin);
|
||||
SV_LinkEdict(hit);
|
||||
goto retry;
|
||||
}
|
||||
|
@ -1054,7 +1053,7 @@ retry:
|
|||
|
||||
time_left = time;
|
||||
|
||||
VectorAdd(ent->priv.sv->s.origin,ent->progs.sv->origin_offset,origin);
|
||||
VectorAdd(ent->progs.sv->origin,ent->progs.sv->origin_offset,origin);
|
||||
VectorCopy(ent->progs.sv->size,maxs);
|
||||
VectorScale(maxs,0.5,maxs);
|
||||
VectorNegate(maxs,mins);
|
||||
|
@ -1078,7 +1077,7 @@ retry:
|
|||
{
|
||||
// actually covered some distance
|
||||
VectorCopy (trace.endpos, origin);
|
||||
VectorSubtract (origin, ent->progs.sv->origin_offset, ent->priv.sv->s.origin);
|
||||
VectorSubtract (origin, ent->progs.sv->origin_offset, ent->progs.sv->origin);
|
||||
VectorCopy (ent->progs.sv->velocity, original_velocity);
|
||||
numplanes = 0;
|
||||
}
|
||||
|
@ -1115,11 +1114,11 @@ retry:
|
|||
|
||||
if(ent->progs.sv->mass > hit->progs.sv->mass)
|
||||
{
|
||||
VectorMA (hit->priv.sv->s.origin,time_left,ent->progs.sv->velocity,player_dest);
|
||||
ptrace = SV_Trace(hit->priv.sv->s.origin,hit->progs.sv->mins,hit->progs.sv->maxs,player_dest,hit,hit->priv.sv->clipmask);
|
||||
VectorMA (hit->progs.sv->origin,time_left,ent->progs.sv->velocity,player_dest);
|
||||
ptrace = SV_Trace(hit->progs.sv->origin,hit->progs.sv->mins,hit->progs.sv->maxs,player_dest,hit,hit->priv.sv->clipmask);
|
||||
if(ptrace.fraction == 1.0)
|
||||
{
|
||||
VectorCopy(player_dest,hit->priv.sv->s.origin);
|
||||
VectorCopy(player_dest,hit->progs.sv->origin);
|
||||
SV_LinkEdict(hit);
|
||||
goto retry;
|
||||
}
|
||||
|
@ -1273,7 +1272,7 @@ trace_t SV_PushEntity (edict_t *ent, vec3_t push)
|
|||
int mask;
|
||||
int num_retries=0;
|
||||
|
||||
VectorCopy (ent->priv.sv->s.origin, start);
|
||||
VectorCopy (ent->progs.sv->origin, start);
|
||||
VectorAdd (start, push, end);
|
||||
|
||||
if (ent->priv.sv->clipmask)
|
||||
|
@ -1284,7 +1283,7 @@ trace_t SV_PushEntity (edict_t *ent, vec3_t push)
|
|||
retry:
|
||||
trace = SV_Trace (start, ent->progs.sv->mins, ent->progs.sv->maxs, end, ent, mask);
|
||||
|
||||
VectorCopy (trace.endpos, ent->priv.sv->s.origin);
|
||||
VectorCopy (trace.endpos, ent->progs.sv->origin);
|
||||
SV_LinkEdict (ent);
|
||||
|
||||
if (trace.fraction != 1.0)
|
||||
|
@ -1295,7 +1294,7 @@ retry:
|
|||
if (trace.ent->priv.sv->free && !ent->priv.sv->free)
|
||||
{
|
||||
// move the pusher back and try again
|
||||
VectorCopy (start, ent->priv.sv->s.origin);
|
||||
VectorCopy (start, ent->progs.sv->origin);
|
||||
SV_LinkEdict (ent);
|
||||
goto retry;
|
||||
}
|
||||
|
@ -1311,7 +1310,7 @@ retry:
|
|||
above[2] += 32;
|
||||
trace = SV_Trace (above, ent->progs.sv->mins, ent->progs.sv->maxs, end, ent, mask);
|
||||
VectorCopy (trace.endpos, end);
|
||||
VectorCopy (start, ent->priv.sv->s.origin);
|
||||
VectorCopy (start, ent->progs.sv->origin);
|
||||
SV_LinkEdict(ent);
|
||||
num_retries++;
|
||||
goto retry;
|
||||
|
@ -1321,8 +1320,8 @@ retry:
|
|||
{
|
||||
// If blocker can be damaged, destroy it. Otherwise destroy blockee.
|
||||
if(trace.ent->progs.sv->takedamage == DAMAGE_YES)
|
||||
T_Damage(trace.ent, ent, ent, vec3_origin, trace.ent->priv.sv->s.origin, vec3_origin, 100000, 1, 0, DMG_CRUSH);
|
||||
else T_Damage(ent, trace.ent, trace.ent, vec3_origin, ent->priv.sv->s.origin, vec3_origin, 100000, 1, 0, DMG_CRUSH);
|
||||
T_Damage(trace.ent, ent, ent, vec3_origin, trace.ent->progs.sv->origin, vec3_origin, 100000, 1, 0, DMG_CRUSH);
|
||||
else T_Damage(ent, trace.ent, trace.ent, vec3_origin, ent->progs.sv->origin, vec3_origin, 100000, 1, 0, DMG_CRUSH);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1352,13 +1351,13 @@ void MoveRiders_r(edict_t *platform, edict_t *ignore, vec3_t move, vec3_t amove,
|
|||
{
|
||||
if((rider->progs.sv->groundentity == PRVM_EDICT_TO_PROG(platform)) && (rider != ignore))
|
||||
{
|
||||
VectorAdd(rider->priv.sv->s.origin, move, rider->priv.sv->s.origin);
|
||||
VectorAdd(rider->progs.sv->origin, move, rider->progs.sv->origin);
|
||||
if (turn && (amove[YAW] != 0.))
|
||||
{
|
||||
if(!rider->priv.sv->client) rider->priv.sv->s.angles[YAW] += amove[YAW];
|
||||
if(!rider->priv.sv->client) rider->progs.sv->angles[YAW] += amove[YAW];
|
||||
else
|
||||
{
|
||||
rider->priv.sv->s.angles[YAW] += amove[YAW];
|
||||
rider->progs.sv->angles[YAW] += amove[YAW];
|
||||
rider->priv.sv->client->ps.pmove.delta_angles[YAW] += ANGLE2SHORT(amove[YAW]);
|
||||
rider->priv.sv->client->ps.pmove.pm_type = PM_FREEZE;
|
||||
rider->priv.sv->client->ps.pmove.pm_flags |= PMF_NO_PREDICTION;
|
||||
|
@ -1370,10 +1369,10 @@ void MoveRiders_r(edict_t *platform, edict_t *ignore, vec3_t move, vec3_t amove,
|
|||
{
|
||||
// Move is blocked. Since this is for riders, not pushees,
|
||||
// it should be ok to just back the move for this rider off
|
||||
VectorSubtract(rider->priv.sv->s.origin,move,rider->priv.sv->s.origin);
|
||||
VectorSubtract(rider->progs.sv->origin,move,rider->progs.sv->origin);
|
||||
if(turn && (amove[YAW] != 0.))
|
||||
{
|
||||
rider->priv.sv->s.angles[YAW] -= amove[YAW];
|
||||
rider->progs.sv->angles[YAW] -= amove[YAW];
|
||||
if(rider->priv.sv->client)
|
||||
{
|
||||
rider->priv.sv->client->ps.pmove.delta_angles[YAW] -= ANGLE2SHORT(amove[YAW]);
|
||||
|
@ -1433,14 +1432,14 @@ void RealBoundingBox(edict_t *ent, vec3_t mins, vec3_t maxs)
|
|||
}
|
||||
}
|
||||
|
||||
AngleVectors(ent->priv.sv->s.angles, forward, left, up);
|
||||
AngleVectors(ent->progs.sv->angles, forward, left, up);
|
||||
|
||||
for(i = 0; i < 8; i++)
|
||||
{
|
||||
VectorScale(forward, p[i][0], f1);
|
||||
VectorScale(left, -p[i][1], l1);
|
||||
VectorScale(up, p[i][2], u1);
|
||||
VectorAdd(ent->priv.sv->s.origin, f1, p[i]);
|
||||
VectorAdd(ent->progs.sv->origin, f1, p[i]);
|
||||
VectorAdd(p[i], l1, p[i]);
|
||||
VectorAdd(p[i], u1, p[i]);
|
||||
}
|
||||
|
@ -1504,14 +1503,14 @@ bool SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
|||
|
||||
// save the pusher's original position
|
||||
pushed_p->ent = pusher;
|
||||
VectorCopy (pusher->priv.sv->s.origin, pushed_p->origin);
|
||||
VectorCopy (pusher->priv.sv->s.angles, pushed_p->angles);
|
||||
VectorCopy (pusher->progs.sv->origin, pushed_p->origin);
|
||||
VectorCopy (pusher->progs.sv->angles, pushed_p->angles);
|
||||
if (pusher->priv.sv->client) pushed_p->deltayaw = pusher->priv.sv->client->ps.pmove.delta_angles[YAW];
|
||||
pushed_p++;
|
||||
|
||||
// move the pusher to it's final position
|
||||
VectorAdd (pusher->priv.sv->s.origin, move, pusher->priv.sv->s.origin);
|
||||
VectorAdd (pusher->priv.sv->s.angles, amove, pusher->priv.sv->s.angles);
|
||||
VectorAdd (pusher->progs.sv->origin, move, pusher->progs.sv->origin);
|
||||
VectorAdd (pusher->progs.sv->angles, amove, pusher->progs.sv->angles);
|
||||
SV_LinkEdict (pusher);
|
||||
|
||||
// Lazarus: Standard Q2 takes a horrible shortcut
|
||||
|
@ -1562,29 +1561,29 @@ bool SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
|||
if (((int)pusher->progs.sv->flags & FL_TRACKTRAIN) && pusher->progs.sv->owner && (((int)check->progs.sv->flags & FL_MONSTER) || check->priv.sv->client) && (check->progs.sv->groundentity != PRVM_EDICT_TO_PROG(pusher)))
|
||||
{
|
||||
vec3_t dir;
|
||||
VectorSubtract(check->priv.sv->s.origin,pusher->priv.sv->s.origin,dir);
|
||||
VectorSubtract(check->progs.sv->origin,pusher->progs.sv->origin,dir);
|
||||
dir[2] += 16;
|
||||
VectorNormalize(dir);
|
||||
T_Damage (check, pusher, pusher, dir, check->priv.sv->s.origin, vec3_origin, pusher->progs.sv->dmg, 1, 0, DMG_CRUSH);
|
||||
T_Damage (check, pusher, pusher, dir, check->progs.sv->origin, vec3_origin, pusher->progs.sv->dmg, 1, 0, DMG_CRUSH);
|
||||
}
|
||||
|
||||
if ((pusher->progs.sv->movetype == MOVETYPE_PUSH) || (check->progs.sv->groundentity == PRVM_EDICT_TO_PROG(pusher)))
|
||||
{
|
||||
// move this entity
|
||||
pushed_p->ent = check;
|
||||
VectorCopy (check->priv.sv->s.origin, pushed_p->origin);
|
||||
VectorCopy (check->priv.sv->s.angles, pushed_p->angles);
|
||||
VectorCopy (check->progs.sv->origin, pushed_p->origin);
|
||||
VectorCopy (check->progs.sv->angles, pushed_p->angles);
|
||||
pushed_p++;
|
||||
|
||||
// try moving the contacted entity
|
||||
VectorAdd (check->priv.sv->s.origin, move, check->priv.sv->s.origin);
|
||||
VectorAdd (check->progs.sv->origin, move, check->progs.sv->origin);
|
||||
// Lazarus: if turn_rider is set, do it. We don't do this by default
|
||||
// 'cause it can be a fairly drastic change in gameplay
|
||||
if (turn && (check->progs.sv->groundentity == PRVM_EDICT_TO_PROG(pusher)))
|
||||
{
|
||||
if(!check->priv.sv->client)
|
||||
{
|
||||
check->priv.sv->s.angles[YAW] += amove[YAW];
|
||||
check->progs.sv->angles[YAW] += amove[YAW];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1608,7 +1607,7 @@ bool SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
|||
float delta_yaw;
|
||||
float pitch = amove[PITCH];
|
||||
|
||||
delta_yaw = check->priv.sv->s.angles[YAW] - pusher->priv.sv->s.angles[YAW];
|
||||
delta_yaw = check->progs.sv->angles[YAW] - pusher->progs.sv->angles[YAW];
|
||||
delta_yaw *= M_PI / 180.;
|
||||
pitch *= cos(delta_yaw);
|
||||
check->priv.sv->client->ps.pmove.delta_angles[PITCH] += ANGLE2SHORT(pitch);
|
||||
|
@ -1626,20 +1625,20 @@ bool SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
|||
if((amove[PITCH] != 0) || (amove[YAW] != 0) || (amove[ROLL] != 0))
|
||||
{
|
||||
// figure movement due to the pusher's amove
|
||||
VectorAdd(check->priv.sv->s.origin,check->progs.sv->origin_offset,org_check);
|
||||
VectorSubtract (org_check, pusher->priv.sv->s.origin, org);
|
||||
VectorAdd(check->progs.sv->origin,check->progs.sv->origin_offset,org_check);
|
||||
VectorSubtract (org_check, pusher->progs.sv->origin, org);
|
||||
org2[0] = DotProduct (org, forward);
|
||||
org2[1] = -DotProduct (org, right);
|
||||
org2[2] = DotProduct (org, up);
|
||||
VectorSubtract (org2, org, move2);
|
||||
VectorAdd (check->priv.sv->s.origin, move2, check->priv.sv->s.origin);
|
||||
VectorAdd (check->progs.sv->origin, move2, check->progs.sv->origin);
|
||||
if((amove[PITCH] != 0) || (amove[ROLL] != 0))
|
||||
{
|
||||
VectorCopy(check->priv.sv->s.origin,org);
|
||||
VectorCopy(check->progs.sv->origin,org);
|
||||
org[2] += 2*check->progs.sv->mins[2];
|
||||
tr = SV_Trace(check->priv.sv->s.origin,vec3_origin,vec3_origin,org,check,MASK_SOLID);
|
||||
tr = SV_Trace(check->progs.sv->origin,vec3_origin,vec3_origin,org,check,MASK_SOLID);
|
||||
if(!tr.startsolid && tr.fraction < 1)
|
||||
check->priv.sv->s.origin[2] = tr.endpos[2] - check->progs.sv->mins[2] + fabs(tr.plane.normal[0])*check->progs.sv->size[0]/2 + fabs(tr.plane.normal[1])*check->progs.sv->size[1]/2;
|
||||
check->progs.sv->origin[2] = tr.endpos[2] - check->progs.sv->mins[2] + fabs(tr.plane.normal[0])*check->progs.sv->size[0]/2 + fabs(tr.plane.normal[1])*check->progs.sv->size[1]/2;
|
||||
|
||||
// Lazarus: func_tracktrain is a special case. Since we KNOW (if the map was
|
||||
// constructed properly) that "post_origin" is a safe position, we
|
||||
|
@ -1649,22 +1648,22 @@ bool SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
|||
{
|
||||
vec3_t f,l,u;
|
||||
|
||||
AngleVectors(pusher->priv.sv->s.angles, f, l, u);
|
||||
AngleVectors(pusher->progs.sv->angles, f, l, u);
|
||||
VectorScale(f,pusher->progs.sv->post_origin[0],f);
|
||||
VectorScale(l,-pusher->progs.sv->post_origin[1],l);
|
||||
VectorAdd(pusher->priv.sv->s.origin,f,org);
|
||||
VectorAdd(pusher->progs.sv->origin,f,org);
|
||||
VectorAdd(org,l,org);
|
||||
org[2] += pusher->progs.sv->post_origin[2] + 1;
|
||||
org[2] += 16 * ( fabs(u[0]) + fabs(u[1]) );
|
||||
tr = SV_Trace(org,check->progs.sv->mins,check->progs.sv->maxs,check->priv.sv->s.origin,check,MASK_SOLID);
|
||||
tr = SV_Trace(org,check->progs.sv->mins,check->progs.sv->maxs,check->progs.sv->origin,check,MASK_SOLID);
|
||||
if(!tr.startsolid)
|
||||
{
|
||||
VectorCopy(tr.endpos,check->priv.sv->s.origin);
|
||||
VectorCopy(check->priv.sv->s.origin,org);
|
||||
VectorCopy(tr.endpos,check->progs.sv->origin);
|
||||
VectorCopy(check->progs.sv->origin,org);
|
||||
org[2] -= 128;
|
||||
tr = SV_Trace(check->priv.sv->s.origin,check->progs.sv->mins,check->progs.sv->maxs,org,check,MASK_SOLID);
|
||||
tr = SV_Trace(check->progs.sv->origin,check->progs.sv->mins,check->progs.sv->maxs,org,check,MASK_SOLID);
|
||||
if(tr.fraction > 0)
|
||||
VectorCopy(tr.endpos,check->priv.sv->s.origin);
|
||||
VectorCopy(tr.endpos,check->progs.sv->origin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1682,22 +1681,22 @@ bool SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
|||
// gonna be stuck.
|
||||
vec3_t f,l,u;
|
||||
|
||||
AngleVectors(pusher->priv.sv->s.angles, f, l, u);
|
||||
AngleVectors(pusher->progs.sv->angles, f, l, u);
|
||||
VectorScale(f,pusher->progs.sv->post_origin[0],f);
|
||||
VectorScale(l,-pusher->progs.sv->post_origin[1],l);
|
||||
VectorAdd(pusher->priv.sv->s.origin,f,org);
|
||||
VectorAdd(pusher->progs.sv->origin,f,org);
|
||||
VectorAdd(org,l,org);
|
||||
org[2] += pusher->progs.sv->post_origin[2] + 1;
|
||||
org[2] += 16 * ( fabs(u[0]) + fabs(u[1]) );
|
||||
tr = SV_Trace(org,check->progs.sv->mins,check->progs.sv->maxs,check->priv.sv->s.origin,check,MASK_SOLID);
|
||||
tr = SV_Trace(org,check->progs.sv->mins,check->progs.sv->maxs,check->progs.sv->origin,check,MASK_SOLID);
|
||||
if(!tr.startsolid)
|
||||
{
|
||||
VectorCopy(tr.endpos,check->priv.sv->s.origin);
|
||||
VectorCopy(check->priv.sv->s.origin,org);
|
||||
VectorCopy(tr.endpos,check->progs.sv->origin);
|
||||
VectorCopy(check->progs.sv->origin,org);
|
||||
org[2] -= 128;
|
||||
tr = SV_Trace(check->priv.sv->s.origin,check->progs.sv->mins,check->progs.sv->maxs,org,check,MASK_SOLID);
|
||||
tr = SV_Trace(check->progs.sv->origin,check->progs.sv->mins,check->progs.sv->maxs,org,check,MASK_SOLID);
|
||||
if(tr.fraction > 0)
|
||||
VectorCopy(tr.endpos,check->priv.sv->s.origin);
|
||||
VectorCopy(tr.endpos,check->progs.sv->origin);
|
||||
block = SV_TestEntityPosition (check);
|
||||
}
|
||||
}
|
||||
|
@ -1713,12 +1712,12 @@ bool SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
|||
|
||||
// if it is ok to leave in the old position, do it
|
||||
// this is only relevent for riding entities, not pushed
|
||||
VectorSubtract (check->priv.sv->s.origin, move, check->priv.sv->s.origin);
|
||||
VectorSubtract (check->priv.sv->s.origin, move2, check->priv.sv->s.origin);
|
||||
VectorSubtract (check->progs.sv->origin, move, check->progs.sv->origin);
|
||||
VectorSubtract (check->progs.sv->origin, move2, check->progs.sv->origin);
|
||||
if(turn)
|
||||
{
|
||||
// Argh! - angle
|
||||
check->priv.sv->s.angles[YAW] -= amove[YAW];
|
||||
check->progs.sv->angles[YAW] -= amove[YAW];
|
||||
if(check->priv.sv->client)
|
||||
{
|
||||
check->priv.sv->client->ps.pmove.delta_angles[YAW] -= ANGLE2SHORT(amove[YAW]);
|
||||
|
@ -1742,8 +1741,8 @@ bool SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
|||
// twice, it goes back to the original position
|
||||
for (p=pushed_p-1 ; p>=pushed ; p--)
|
||||
{
|
||||
VectorCopy (p->origin, p->ent->priv.sv->s.origin);
|
||||
VectorCopy (p->angles, p->ent->priv.sv->s.angles);
|
||||
VectorCopy (p->origin, p->ent->progs.sv->origin);
|
||||
VectorCopy (p->angles, p->ent->progs.sv->angles);
|
||||
if (p->ent->priv.sv->client)
|
||||
{
|
||||
p->ent->priv.sv->client->ps.pmove.delta_angles[YAW] = p->deltayaw;
|
||||
|
@ -1820,8 +1819,8 @@ void SV_Physics_Noclip (edict_t *ent)
|
|||
// regular thinking
|
||||
if (!SV_RunThink (ent)) return;
|
||||
|
||||
VectorMA (ent->priv.sv->s.angles, 0.1f, ent->progs.sv->avelocity, ent->priv.sv->s.angles);
|
||||
VectorMA (ent->priv.sv->s.origin, 0.1f, ent->progs.sv->velocity, ent->priv.sv->s.origin);
|
||||
VectorMA (ent->progs.sv->angles, 0.1f, ent->progs.sv->avelocity, ent->progs.sv->angles);
|
||||
VectorMA (ent->progs.sv->origin, 0.1f, ent->progs.sv->velocity, ent->progs.sv->origin);
|
||||
|
||||
SV_LinkEdict(ent);
|
||||
}
|
||||
|
@ -1869,7 +1868,7 @@ void SV_Physics_Toss (edict_t *ent)
|
|||
trace_t tr;
|
||||
edict_t *ground = PRVM_PROG_TO_EDICT(ent->progs.sv->groundentity);
|
||||
|
||||
VectorCopy(ent->priv.sv->s.origin,point);
|
||||
VectorCopy(ent->progs.sv->origin,point);
|
||||
point[2] += 1;
|
||||
VectorCopy(point,end);
|
||||
end[2] -= 256;
|
||||
|
@ -1900,7 +1899,7 @@ void SV_Physics_Toss (edict_t *ent)
|
|||
if ( ent->progs.sv->groundentity )
|
||||
return;
|
||||
|
||||
VectorCopy (ent->priv.sv->s.origin, old_origin);
|
||||
VectorCopy (ent->progs.sv->origin, old_origin);
|
||||
|
||||
SV_CheckVelocity (ent);
|
||||
|
||||
|
@ -1909,7 +1908,7 @@ void SV_Physics_Toss (edict_t *ent)
|
|||
SV_AddGravity (ent);
|
||||
|
||||
// move angles
|
||||
VectorMA (ent->priv.sv->s.angles, 0.1f, ent->progs.sv->avelocity, ent->priv.sv->s.angles);
|
||||
VectorMA (ent->progs.sv->angles, 0.1f, ent->progs.sv->avelocity, ent->progs.sv->angles);
|
||||
|
||||
// move origin
|
||||
VectorScale (ent->progs.sv->velocity, 0.1f, move);
|
||||
|
@ -1941,7 +1940,7 @@ void SV_Physics_Toss (edict_t *ent)
|
|||
|
||||
// check for water transition
|
||||
wasinwater = ((int)ent->progs.sv->watertype & MASK_WATER);
|
||||
ent->progs.sv->watertype = SV_PointContents (ent->priv.sv->s.origin);
|
||||
ent->progs.sv->watertype = SV_PointContents (ent->progs.sv->origin);
|
||||
isinwater = (int)ent->progs.sv->watertype & MASK_WATER;
|
||||
|
||||
if (isinwater) ent->progs.sv->waterlevel = 1;
|
||||
|
@ -1950,7 +1949,7 @@ void SV_Physics_Toss (edict_t *ent)
|
|||
if (!wasinwater && isinwater)
|
||||
SV_StartSound(old_origin, prog->edicts, CHAN_AUTO, SV_SoundIndex("misc/h2ohit1.wav"), 1, 1, 0);
|
||||
else if (wasinwater && !isinwater)
|
||||
SV_StartSound(ent->priv.sv->s.origin, prog->edicts, CHAN_AUTO, SV_SoundIndex("misc/h2ohit1.wav"), 1, 1, 0);
|
||||
SV_StartSound(ent->progs.sv->origin, prog->edicts, CHAN_AUTO, SV_SoundIndex("misc/h2ohit1.wav"), 1, 1, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1983,7 +1982,7 @@ void SV_AddRotationalFriction (edict_t *ent)
|
|||
int n;
|
||||
float adjustment;
|
||||
|
||||
VectorMA (ent->priv.sv->s.angles, 0.1f, ent->progs.sv->avelocity, ent->priv.sv->s.angles);
|
||||
VectorMA (ent->progs.sv->angles, 0.1f, ent->progs.sv->avelocity, ent->progs.sv->angles);
|
||||
adjustment = 0.1f * sv_stopspeed * sv_friction;
|
||||
|
||||
for (n = 0; n < 3; n++)
|
||||
|
@ -2028,9 +2027,9 @@ float RiderMass(edict_t *platform)
|
|||
// func_pushables don't really have a groundentity, even
|
||||
// though they may be sitting on another swimming
|
||||
// func_pushable, which is what we need to know.
|
||||
VectorCopy(rider->priv.sv->s.origin,point);
|
||||
VectorCopy(rider->progs.sv->origin,point);
|
||||
point[2] -= 0.25;
|
||||
trace = SV_Trace (rider->priv.sv->s.origin, rider->progs.sv->mins, rider->progs.sv->maxs, point, rider, MASK_MONSTERSOLID);
|
||||
trace = SV_Trace (rider->progs.sv->origin, rider->progs.sv->mins, rider->progs.sv->maxs, point, rider, MASK_MONSTERSOLID);
|
||||
if ( trace.plane.normal[2] < 0.7 && !trace.startsolid)
|
||||
continue;
|
||||
if (!trace.startsolid && !trace.allsolid)
|
||||
|
@ -2066,7 +2065,7 @@ void SV_Physics_Step (edict_t *ent)
|
|||
|
||||
oldwaterlevel = ent->progs.sv->waterlevel;
|
||||
|
||||
VectorCopy(ent->priv.sv->s.origin, old_origin);
|
||||
VectorCopy(ent->progs.sv->origin, old_origin);
|
||||
|
||||
// Lazarus: If density hasn't been calculated yet, do so now
|
||||
if (ent->progs.sv->mass > 0 && ent->progs.sv->density == 0.)
|
||||
|
@ -2252,7 +2251,7 @@ void SV_Physics_Step (edict_t *ent)
|
|||
{
|
||||
trace_t tr;
|
||||
|
||||
VectorCopy(ent->priv.sv->s.origin,point);
|
||||
VectorCopy(ent->progs.sv->origin,point);
|
||||
point[2] += 1;
|
||||
VectorCopy(point,end);
|
||||
end[2] -= 256;
|
||||
|
@ -2315,7 +2314,7 @@ void SV_Physics_Step (edict_t *ent)
|
|||
block = SV_PushableMove (ent, 0.1f, mask);
|
||||
if(block && !(block & 8) && onconveyor)
|
||||
{
|
||||
T_Damage(ent, prog->edicts, prog->edicts, vec3_origin, ent->priv.sv->s.origin, vec3_origin, 100000, 1, 0, DMG_CRUSH);
|
||||
T_Damage(ent, prog->edicts, prog->edicts, vec3_origin, ent->progs.sv->origin, vec3_origin, 100000, 1, 0, DMG_CRUSH);
|
||||
if(ent->priv.sv->free) return;
|
||||
}
|
||||
}
|
||||
|
@ -2324,7 +2323,7 @@ void SV_Physics_Step (edict_t *ent)
|
|||
block = SV_FlyMove (ent, 0.1f, mask);
|
||||
if(block && !(block & 8) && onconveyor)
|
||||
{
|
||||
T_Damage (ent, prog->edicts, prog->edicts, vec3_origin, ent->priv.sv->s.origin, vec3_origin, 100000, 1, 0, DMG_CRUSH);
|
||||
T_Damage (ent, prog->edicts, prog->edicts, vec3_origin, ent->progs.sv->origin, vec3_origin, 100000, 1, 0, DMG_CRUSH);
|
||||
if(ent->priv.sv->free) return;
|
||||
}
|
||||
}
|
||||
|
@ -2342,16 +2341,16 @@ void SV_Physics_Step (edict_t *ent)
|
|||
{
|
||||
trace_t tr;
|
||||
|
||||
if(ent->progs.sv->bouncetype == 2) VectorMA(old_origin,0.1f,ent->progs.sv->velocity,ent->priv.sv->s.origin);
|
||||
VectorSubtract(ent->priv.sv->s.origin,old_origin,move);
|
||||
if(ent->progs.sv->bouncetype == 2) VectorMA(old_origin,0.1f,ent->progs.sv->velocity,ent->progs.sv->origin);
|
||||
VectorSubtract(ent->progs.sv->origin,old_origin,move);
|
||||
for(i = 1, e = PRVM_EDICT_NUM(i); i < prog->num_edicts; i++, e = PRVM_EDICT_NUM(i))
|
||||
{
|
||||
if(e==ent) continue;
|
||||
if(e->progs.sv->groundentity == PRVM_EDICT_TO_PROG(ent))
|
||||
{
|
||||
VectorAdd(e->priv.sv->s.origin,move,end);
|
||||
tr = SV_Trace(e->priv.sv->s.origin, e->progs.sv->mins, e->progs.sv->maxs, end, ent, MASK_SOLID);
|
||||
VectorCopy(tr.endpos,e->priv.sv->s.origin);
|
||||
VectorAdd(e->progs.sv->origin,move,end);
|
||||
tr = SV_Trace(e->progs.sv->origin, e->progs.sv->mins, e->progs.sv->maxs, end, ent, MASK_SOLID);
|
||||
VectorCopy(tr.endpos,e->progs.sv->origin);
|
||||
SV_LinkEdict(e);
|
||||
}
|
||||
}
|
||||
|
@ -2405,13 +2404,13 @@ trace_t SV_DebrisEntity (edict_t *ent, vec3_t push)
|
|||
int damage;
|
||||
int mask;
|
||||
|
||||
VectorCopy (ent->priv.sv->s.origin, start);
|
||||
VectorCopy (ent->progs.sv->origin, start);
|
||||
VectorAdd (start, push, end);
|
||||
if(ent->priv.sv->clipmask) mask = ent->priv.sv->clipmask;
|
||||
else mask = MASK_SHOT;
|
||||
|
||||
trace = SV_Trace (start, ent->progs.sv->mins, ent->progs.sv->maxs, end, ent, mask);
|
||||
VectorCopy (trace.endpos, ent->priv.sv->s.origin);
|
||||
VectorCopy (trace.endpos, ent->progs.sv->origin);
|
||||
SV_LinkEdict (ent);
|
||||
|
||||
if (trace.fraction != 1.0)
|
||||
|
@ -2443,7 +2442,7 @@ trace_t SV_DebrisEntity (edict_t *ent, vec3_t push)
|
|||
if(speed1 > 100)
|
||||
{
|
||||
damage = (int)(ent->progs.sv->mass * speed1 / 5000.);
|
||||
if(damage) T_Damage(trace.ent, prog->edicts, prog->edicts, v1, trace.ent->priv.sv->s.origin, vec3_origin, damage, 0, 0, DMG_CRUSH);
|
||||
if(damage) T_Damage(trace.ent, prog->edicts, prog->edicts, v1, trace.ent->progs.sv->origin, vec3_origin, damage, 0, 0, DMG_CRUSH);
|
||||
}
|
||||
|
||||
PRVM_PUSH_GLOBALS;
|
||||
|
@ -2504,12 +2503,12 @@ void SV_Physics_Debris (edict_t *ent)
|
|||
if ( ent->progs.sv->groundentity )
|
||||
return;
|
||||
|
||||
VectorCopy (ent->priv.sv->s.origin, old_origin);
|
||||
VectorCopy (ent->progs.sv->origin, old_origin);
|
||||
SV_CheckVelocity (ent);
|
||||
SV_AddGravity (ent);
|
||||
|
||||
// move angles
|
||||
VectorMA (ent->priv.sv->s.angles, 0.1f, ent->progs.sv->avelocity, ent->priv.sv->s.angles);
|
||||
VectorMA (ent->progs.sv->angles, 0.1f, ent->progs.sv->avelocity, ent->progs.sv->angles);
|
||||
|
||||
// move origin
|
||||
VectorScale (ent->progs.sv->velocity, 0.1f, move);
|
||||
|
@ -2535,14 +2534,14 @@ void SV_Physics_Debris (edict_t *ent)
|
|||
|
||||
// check for water transition
|
||||
wasinwater = ((int)ent->progs.sv->watertype & MASK_WATER);
|
||||
ent->progs.sv->watertype = SV_PointContents (ent->priv.sv->s.origin);
|
||||
ent->progs.sv->watertype = SV_PointContents (ent->progs.sv->origin);
|
||||
isinwater = (int)ent->progs.sv->watertype & MASK_WATER;
|
||||
|
||||
if (isinwater) ent->progs.sv->waterlevel = 1;
|
||||
else ent->progs.sv->waterlevel = 0;
|
||||
|
||||
if (!wasinwater && isinwater) SV_StartSound (old_origin, prog->edicts, CHAN_AUTO, SV_SoundIndex("misc/h2ohit1.wav"), 1, 1, 0);
|
||||
else if (wasinwater && !isinwater) SV_StartSound (ent->priv.sv->s.origin, prog->edicts, CHAN_AUTO, SV_SoundIndex("misc/h2ohit1.wav"), 1, 1, 0);
|
||||
else if (wasinwater && !isinwater) SV_StartSound (ent->progs.sv->origin, prog->edicts, CHAN_AUTO, SV_SoundIndex("misc/h2ohit1.wav"), 1, 1, 0);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2575,7 +2574,7 @@ void SV_Physics_Conveyor(edict_t *ent)
|
|||
if(player->progs.sv->groundentity != PRVM_EDICT_TO_PROG(ent)) continue;
|
||||
|
||||
// Look below player; make sure he's on a conveyor
|
||||
VectorCopy(player->priv.sv->s.origin,point);
|
||||
VectorCopy(player->progs.sv->origin,point);
|
||||
point[2] += 1;
|
||||
VectorCopy(point,end);
|
||||
end[2] -= 256;
|
||||
|
@ -2594,9 +2593,9 @@ void SV_Physics_Conveyor(edict_t *ent)
|
|||
}
|
||||
move[2] = v[2] * 0.1f;
|
||||
}
|
||||
VectorAdd(player->priv.sv->s.origin,move,end);
|
||||
tr = SV_Trace(player->priv.sv->s.origin,player->progs.sv->mins,player->progs.sv->maxs,end,player,player->priv.sv->clipmask);
|
||||
VectorCopy(tr.endpos,player->priv.sv->s.origin);
|
||||
VectorAdd(player->progs.sv->origin,move,end);
|
||||
tr = SV_Trace(player->progs.sv->origin,player->progs.sv->mins,player->progs.sv->maxs,end,player,player->priv.sv->clipmask);
|
||||
VectorCopy(tr.endpos,player->progs.sv->origin);
|
||||
SV_LinkEdict(player);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -227,7 +227,7 @@ void _MSG_Send (msgtype_t to, vec3_t origin, edict_t *ent, const char *filename,
|
|||
{
|
||||
area2 = CM_LeafArea (leafnum);
|
||||
cluster = CM_LeafCluster (leafnum);
|
||||
leafnum = CM_PointLeafnum (client->edict->priv.sv->s.origin);
|
||||
leafnum = CM_PointLeafnum (client->edict->progs.sv->origin);
|
||||
if (!CM_AreasConnected (area1, area2)) continue;
|
||||
if ( mask && (!(mask[cluster>>3] & (1<<(cluster&7))))) continue;
|
||||
}
|
||||
|
@ -330,12 +330,12 @@ void SV_StartSound (vec3_t origin, edict_t *entity, int channel, int soundindex,
|
|||
{
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
origin_v[i] = entity->priv.sv->s.origin[i]+0.5*(entity->progs.sv->mins[i]+entity->progs.sv->maxs[i]);
|
||||
origin_v[i] = entity->progs.sv->origin[i]+0.5*(entity->progs.sv->mins[i]+entity->progs.sv->maxs[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorCopy (entity->priv.sv->s.origin, origin_v);
|
||||
VectorCopy (entity->progs.sv->origin, origin_v);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -499,8 +499,7 @@ void SV_SendClientMessages (void)
|
|||
// read the next demo message if needed
|
||||
if (sv.state == ss_demo && sv.demofile)
|
||||
{
|
||||
if (sv_paused->value)
|
||||
msglen = 0;
|
||||
if (sv_paused->value) msglen = 0;
|
||||
else
|
||||
{
|
||||
// get the next message
|
||||
|
@ -525,7 +524,7 @@ void SV_SendClientMessages (void)
|
|||
}
|
||||
|
||||
// send a message to each connected client
|
||||
for (i=0, c = svs.clients ; i<maxclients->value; i++, c++)
|
||||
for (i = 0, c = svs.clients; i < maxclients->value; i++, c++)
|
||||
{
|
||||
if (!c->state) continue;
|
||||
// if the reliable message overflowed,
|
||||
|
@ -538,17 +537,12 @@ void SV_SendClientMessages (void)
|
|||
SV_DropClient (c);
|
||||
}
|
||||
|
||||
if (sv.state == ss_cinematic
|
||||
|| sv.state == ss_demo
|
||||
|| sv.state == ss_pic
|
||||
)
|
||||
if (sv.state == ss_cinematic || sv.state == ss_demo || sv.state == ss_pic)
|
||||
Netchan_Transmit (&c->netchan, msglen, msgbuf);
|
||||
else if (c->state == cs_spawned)
|
||||
{
|
||||
// don't overrun bandwidth
|
||||
if (SV_RateDrop (c))
|
||||
continue;
|
||||
|
||||
if (SV_RateDrop (c)) continue;
|
||||
SV_SendClientDatagram (c);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -11,36 +11,6 @@ trace_t PM_trace (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end)
|
|||
return SV_Trace (start, mins, maxs, end, pm_passent, MASK_DEADSOLID);
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
ED_NewString
|
||||
=============
|
||||
*/
|
||||
char *ED_NewString (const char *string)
|
||||
{
|
||||
char *newb, *new_p;
|
||||
int i, l;
|
||||
|
||||
l = strlen(string) + 1;
|
||||
|
||||
newb = (char *)Z_Malloc(l);
|
||||
|
||||
new_p = newb;
|
||||
|
||||
for (i = 0; i < l; i++)
|
||||
{
|
||||
if (string[i] == '\\' && i < l-1)
|
||||
{
|
||||
i++;
|
||||
if (string[i] == 'n')
|
||||
*new_p++ = '\n';
|
||||
else *new_p++ = '\\';
|
||||
}
|
||||
else *new_p++ = string[i];
|
||||
}
|
||||
return newb;
|
||||
}
|
||||
|
||||
/*
|
||||
===========
|
||||
PutClientInServer
|
||||
|
@ -80,18 +50,17 @@ void SV_PutClientInServer (edict_t *ent)
|
|||
client->ps.gunindex = SV_ModelIndex("models/weapons/v_eagle.mdl");
|
||||
|
||||
// clear entity state values
|
||||
ent->priv.sv->s.effects = 0;
|
||||
ent->priv.sv->s.modelindex = MAX_MODELS - 1; // will use the skin specified model
|
||||
ent->priv.sv->s.weaponmodel = MAX_MODELS - 1; // custom gun model
|
||||
ent->progs.sv->effects = 0;
|
||||
ent->progs.sv->modelindex = MAX_MODELS - 1; // will use the skin specified model
|
||||
ent->progs.sv->weaponmodel = MAX_MODELS - 1; // custom gun model
|
||||
|
||||
// sknum is player num and weapon number
|
||||
// weapon number will be added in changeweapon
|
||||
ent->priv.sv->s.skin = PRVM_NUM_FOR_EDICT(ent) - 1;
|
||||
ent->progs.sv->skin = PRVM_NUM_FOR_EDICT(ent) - 1;
|
||||
|
||||
ent->priv.sv->s.frame = 0;
|
||||
VectorCopy (ent->progs.sv->origin, ent->priv.sv->s.origin);
|
||||
ent->priv.sv->s.origin[2] += 1; // make sure off ground
|
||||
VectorCopy (ent->priv.sv->s.origin, ent->priv.sv->s.old_origin);
|
||||
ent->progs.sv->frame = 0;
|
||||
ent->progs.sv->origin[2] += 1; // make sure off ground
|
||||
VectorCopy (ent->progs.sv->origin, ent->progs.sv->old_origin);
|
||||
|
||||
// set the delta angle
|
||||
for (i = 0; i < 3; i++)
|
||||
|
@ -99,9 +68,9 @@ void SV_PutClientInServer (edict_t *ent)
|
|||
client->ps.pmove.delta_angles[i] = ANGLE2SHORT(ent->progs.sv->angles[i]);
|
||||
}
|
||||
|
||||
ent->priv.sv->s.angles[PITCH] = ent->priv.sv->s.angles[ROLL] = 0;
|
||||
ent->priv.sv->s.angles[YAW] = ent->progs.sv->angles[YAW];
|
||||
VectorCopy(ent->priv.sv->s.angles, client->ps.viewangles);
|
||||
ent->progs.sv->angles[PITCH] = ent->progs.sv->angles[ROLL] = 0;
|
||||
ent->progs.sv->angles[YAW] = ent->progs.sv->angles[YAW];
|
||||
VectorCopy(ent->progs.sv->angles, client->ps.viewangles);
|
||||
VectorCopy (client->ps.viewangles, client->v_angle);
|
||||
|
||||
SV_LinkEdict(ent);
|
||||
|
@ -154,8 +123,7 @@ void SV_SpawnEntities (char *mapname, char *entities, char *spawnpoint)
|
|||
|
||||
void SV_InitEdict (edict_t *e)
|
||||
{
|
||||
e->priv.sv->s.number = PRVM_NUM_FOR_EDICT(e);
|
||||
e->priv.sv->s.renderfx |= RF_IR_VISIBLE; //evil stuff...
|
||||
e->priv.sv->serialnumber = PRVM_NUM_FOR_EDICT(e);
|
||||
}
|
||||
|
||||
|
||||
|
@ -168,10 +136,6 @@ Marks the edict as free
|
|||
*/
|
||||
void SV_FreeEdict (edict_t *ed)
|
||||
{
|
||||
// don't free players!
|
||||
if (PRVM_NUM_FOR_EDICT(ed) <= maxclients->value)
|
||||
return;
|
||||
|
||||
ed->priv.sv->freetime = sv.time;
|
||||
ed->priv.sv->free = true;
|
||||
|
||||
|
@ -377,7 +341,7 @@ void ClientEndServerFrame (edict_t *ent)
|
|||
//
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
current_client->ps.pmove.origin[i] = ent->priv.sv->s.origin[i]*8.0;
|
||||
current_client->ps.pmove.origin[i] = ent->progs.sv->origin[i]*8.0;
|
||||
current_client->ps.pmove.velocity[i] = ent->progs.sv->velocity[i]*8.0;
|
||||
}
|
||||
|
||||
|
@ -387,12 +351,12 @@ void ClientEndServerFrame (edict_t *ent)
|
|||
// set model angles from view angles so other things in
|
||||
// the world can tell which direction you are looking
|
||||
//
|
||||
if (ent->priv.sv->client->v_angle[PITCH] > 180) ent->priv.sv->s.angles[PITCH] = (-360 + ent->priv.sv->client->v_angle[PITCH])/3;
|
||||
else ent->priv.sv->s.angles[PITCH] = ent->priv.sv->client->v_angle[PITCH]/3;
|
||||
if (ent->priv.sv->client->v_angle[PITCH] > 180) ent->progs.sv->angles[PITCH] = (-360 + ent->priv.sv->client->v_angle[PITCH])/3;
|
||||
else ent->progs.sv->angles[PITCH] = ent->priv.sv->client->v_angle[PITCH]/3;
|
||||
|
||||
ent->priv.sv->s.angles[YAW] = ent->priv.sv->client->v_angle[YAW];
|
||||
ent->priv.sv->s.angles[ROLL] = 0;
|
||||
ent->priv.sv->s.angles[ROLL] = SV_CalcRoll (ent->priv.sv->s.angles, ent->progs.sv->velocity)*4;
|
||||
ent->progs.sv->angles[YAW] = ent->priv.sv->client->v_angle[YAW];
|
||||
ent->progs.sv->angles[ROLL] = 0;
|
||||
ent->progs.sv->angles[ROLL] = SV_CalcRoll (ent->progs.sv->angles, ent->progs.sv->velocity)*4;
|
||||
|
||||
//
|
||||
// calculate speed and cycle to be used for
|
||||
|
@ -475,7 +439,7 @@ void SV_RunFrame( void )
|
|||
ent = PRVM_EDICT_NUM(i);
|
||||
if (ent->priv.sv->free) continue;
|
||||
|
||||
VectorCopy (ent->priv.sv->s.origin, ent->priv.sv->s.old_origin);
|
||||
VectorCopy (ent->progs.sv->origin, ent->progs.sv->old_origin);
|
||||
|
||||
// don't apply phys on clients
|
||||
if (i > 0 && i <= maxclients->value) continue;
|
||||
|
@ -593,12 +557,12 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
|||
prog->globals.server->pev = PRVM_EDICT_TO_PROG(ent);
|
||||
PRVM_ExecuteProgram (prog->globals.server->PlayerPreThink, "QC function PlayerPreThink is missing");
|
||||
|
||||
VectorCopy(ent->priv.sv->s.origin, oldorigin);
|
||||
VectorCopy(ent->progs.sv->origin, oldorigin);
|
||||
VectorCopy(ent->progs.sv->velocity, oldvelocity);
|
||||
|
||||
ent->priv.sv->client->ps.pmove.pm_flags &= ~PMF_NO_PREDICTION;
|
||||
|
||||
VectorCopy(ent->priv.sv->s.origin, view);
|
||||
VectorCopy(ent->progs.sv->origin, view);
|
||||
|
||||
pm_passent = ent;
|
||||
|
||||
|
@ -606,7 +570,6 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
|||
memset (&pm, 0, sizeof(pm));
|
||||
|
||||
if (ent->progs.sv->movetype == MOVETYPE_NOCLIP) client->ps.pmove.pm_type = PM_SPECTATOR;
|
||||
else if (ent->priv.sv->s.modelindex != MAX_MODELS - 1) client->ps.pmove.pm_type = PM_GIB;
|
||||
else client->ps.pmove.pm_type = PM_NORMAL;
|
||||
client->ps.pmove.gravity = sv_gravity->value;
|
||||
|
||||
|
@ -614,7 +577,7 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
|||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
pm.s.origin[i] = ent->priv.sv->s.origin[i]*8;
|
||||
pm.s.origin[i] = ent->progs.sv->origin[i]*8;
|
||||
pm.s.velocity[i] = ent->progs.sv->velocity[i]*8;
|
||||
}
|
||||
|
||||
|
@ -635,7 +598,7 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
|||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
ent->priv.sv->s.origin[i] = pm.s.origin[i]*0.125;
|
||||
ent->progs.sv->origin[i] = pm.s.origin[i]*0.125;
|
||||
ent->progs.sv->velocity[i] = pm.s.velocity[i]*0.125;
|
||||
}
|
||||
VectorCopy (pm.mins, ent->progs.sv->mins);
|
||||
|
@ -656,12 +619,12 @@ void ClientThink (edict_t *ent, usercmd_t *ucmd)
|
|||
break;
|
||||
}
|
||||
if (j != i) continue; // duplicated
|
||||
if (!ent->progs.sv->touch) continue;
|
||||
if (!other->progs.sv->touch) continue;
|
||||
|
||||
prog->globals.server->pev = PRVM_EDICT_TO_PROG(other);
|
||||
prog->globals.server->other = PRVM_EDICT_TO_PROG(ent);
|
||||
prog->globals.server->time = sv.time;
|
||||
PRVM_ExecuteProgram (ent->progs.sv->touch, "QC function pev->touch is missing");
|
||||
PRVM_ExecuteProgram (other->progs.sv->touch, "QC function pev->touch is missing");
|
||||
}
|
||||
PRVM_POP_GLOBALS;
|
||||
|
||||
|
@ -691,10 +654,10 @@ void SV_ClientDisconnect (edict_t *ent)
|
|||
MSG_Begin( svc_muzzleflash );
|
||||
MSG_WriteShort( &sv.multicast, PRVM_NUM_FOR_EDICT(ent));
|
||||
MSG_WriteByte( &sv.multicast, MZ_LOGOUT );
|
||||
MSG_Send(MSG_PVS, ent->priv.sv->s.origin, NULL);
|
||||
MSG_Send(MSG_PVS, ent->progs.sv->origin, NULL);
|
||||
|
||||
SV_UnlinkEdict(ent);
|
||||
ent->priv.sv->s.modelindex = 0;
|
||||
ent->progs.sv->modelindex = 0;
|
||||
ent->progs.sv->solid = SOLID_NOT;
|
||||
ent->priv.sv->free = true;
|
||||
ent->progs.sv->classname = PRVM_SetEngineString("disconnected");
|
||||
|
|
|
@ -21,6 +21,11 @@ int SV_StudioExtractBbox( studiohdr_t *phdr, int sequence, float *mins, float *m
|
|||
|
||||
byte *SV_GetModelPtr(edict_t *ent)
|
||||
{
|
||||
if(!ent) return NULL;
|
||||
return NULL;
|
||||
cmodel_t *cmod;
|
||||
|
||||
if(!ent || !ent->progs.sv->modelindex) return NULL;
|
||||
cmod = CM_LoadModel( ent->progs.sv->modelindex );
|
||||
if(!cmod || !cmod->extradata) return NULL;
|
||||
|
||||
return cmod->extradata;
|
||||
}
|
|
@ -97,8 +97,8 @@ void SV_New_f (void)
|
|||
if (sv.state == ss_game)
|
||||
{
|
||||
// set up the entity for the client
|
||||
ent = PRVM_EDICT_NUM(playernum+1);
|
||||
ent->priv.sv->s.number = playernum+1;
|
||||
ent = PRVM_EDICT_NUM(playernum + 1);
|
||||
ent->priv.sv->serialnumber = playernum + 1;
|
||||
sv_client->edict = ent;
|
||||
memset (&sv_client->lastcmd, 0, sizeof(sv_client->lastcmd));
|
||||
|
||||
|
@ -196,7 +196,7 @@ void SV_Baselines_f (void)
|
|||
while ( sv_client->netchan.message.cursize < MAX_MSGLEN/2 && start < MAX_EDICTS)
|
||||
{
|
||||
base = &sv.baselines[start];
|
||||
if (base->modelindex || base->sound || base->effects)
|
||||
if (base->modelindex || base->soundindex || base->effects)
|
||||
{
|
||||
MSG_WriteByte (&sv_client->netchan.message, svc_spawnbaseline);
|
||||
MSG_WriteDeltaEntity (&nullstate, base, &sv_client->netchan.message, true, true);
|
||||
|
|
|
@ -189,16 +189,16 @@ void SV_LinkEdict (edict_t *ent)
|
|||
k = (ent->progs.sv->maxs[2]+32)/8;
|
||||
if (k<1) k = 1;
|
||||
if (k>63) k = 63;
|
||||
ent->priv.sv->s.solid = (k<<10) | (j<<5) | i;
|
||||
ent->priv.sv->solid = (k<<10) | (j<<5) | i;
|
||||
}
|
||||
else if (ent->progs.sv->solid == SOLID_BSP)
|
||||
{
|
||||
ent->priv.sv->s.solid = 31; // a solid_bbox will never create this value
|
||||
ent->priv.sv->solid = 31; // a solid_bbox will never create this value
|
||||
}
|
||||
else ent->priv.sv->s.solid = 0;
|
||||
else ent->priv.sv->solid = 0;
|
||||
|
||||
// set the abs box
|
||||
if (ent->progs.sv->solid == SOLID_BSP && !VectorIsNull(ent->priv.sv->s.angles))
|
||||
if (ent->progs.sv->solid == SOLID_BSP && !VectorIsNull(ent->progs.sv->angles))
|
||||
{
|
||||
// expand for rotation
|
||||
float max = 0, v;
|
||||
|
@ -213,14 +213,14 @@ void SV_LinkEdict (edict_t *ent)
|
|||
}
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
ent->progs.sv->absmin[i] = ent->priv.sv->s.origin[i] - max;
|
||||
ent->progs.sv->absmax[i] = ent->priv.sv->s.origin[i] + max;
|
||||
ent->progs.sv->absmin[i] = ent->progs.sv->origin[i] - max;
|
||||
ent->progs.sv->absmax[i] = ent->progs.sv->origin[i] + max;
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // normal
|
||||
VectorAdd (ent->priv.sv->s.origin, ent->progs.sv->mins, ent->progs.sv->absmin);
|
||||
VectorAdd (ent->priv.sv->s.origin, ent->progs.sv->maxs, ent->progs.sv->absmax);
|
||||
VectorAdd (ent->progs.sv->origin, ent->progs.sv->mins, ent->progs.sv->absmin);
|
||||
VectorAdd (ent->progs.sv->origin, ent->progs.sv->maxs, ent->progs.sv->absmax);
|
||||
}
|
||||
|
||||
// because movement is clipped an epsilon away from an actual edge,
|
||||
|
@ -291,7 +291,7 @@ void SV_LinkEdict (edict_t *ent)
|
|||
// if first time, make sure old_origin is valid
|
||||
if (!ent->priv.sv->linkcount)
|
||||
{
|
||||
VectorCopy (ent->priv.sv->s.origin, ent->priv.sv->s.old_origin);
|
||||
VectorCopy (ent->progs.sv->origin, ent->progs.sv->old_origin);
|
||||
}
|
||||
ent->priv.sv->linkcount++;
|
||||
|
||||
|
@ -409,9 +409,9 @@ int SV_PointContents (vec3_t p)
|
|||
|
||||
// might intersect, so do an exact clip
|
||||
headnode = SV_HullForEntity (hit);
|
||||
angles = hit->priv.sv->s.angles;
|
||||
angles = hit->progs.sv->angles;
|
||||
if (hit->progs.sv->solid != SOLID_BSP) angles = vec3_origin; // boxes don't rotate
|
||||
c2 = CM_TransformedPointContents (p, headnode, hit->priv.sv->s.origin, hit->priv.sv->s.angles);
|
||||
c2 = CM_TransformedPointContents (p, headnode, hit->progs.sv->origin, hit->progs.sv->angles);
|
||||
contents |= c2;
|
||||
}
|
||||
return contents;
|
||||
|
@ -451,7 +451,7 @@ int SV_HullForEntity (edict_t *ent)
|
|||
if (ent->progs.sv->solid == SOLID_BSP)
|
||||
{
|
||||
// explicit hulls in the BSP model
|
||||
model = sv.models[ ent->priv.sv->s.modelindex ];
|
||||
model = sv.models[ (int)ent->progs.sv->modelindex ];
|
||||
|
||||
if (!model)
|
||||
{
|
||||
|
@ -502,16 +502,16 @@ void SV_ClipMoveToEntities ( moveclip_t *clip )
|
|||
|
||||
// might intersect, so do an exact clip
|
||||
headnode = SV_HullForEntity (touch);
|
||||
angles = touch->priv.sv->s.angles;
|
||||
angles = touch->progs.sv->angles;
|
||||
if (touch->progs.sv->solid != SOLID_BSP) angles = vec3_origin; // boxes don't rotate
|
||||
|
||||
if ((int)touch->progs.sv->flags & FL_MONSTER)
|
||||
{
|
||||
trace = CM_TransformedBoxTrace (clip->start, clip->end, clip->mins2, clip->maxs2, headnode, clip->contentmask, touch->priv.sv->s.origin, angles);
|
||||
trace = CM_TransformedBoxTrace (clip->start, clip->end, clip->mins2, clip->maxs2, headnode, clip->contentmask, touch->progs.sv->origin, angles);
|
||||
}
|
||||
else
|
||||
{
|
||||
trace = CM_TransformedBoxTrace (clip->start, clip->end, clip->mins, clip->maxs, headnode, clip->contentmask, touch->priv.sv->s.origin, angles);
|
||||
trace = CM_TransformedBoxTrace (clip->start, clip->end, clip->mins, clip->maxs, headnode, clip->contentmask, touch->progs.sv->origin, angles);
|
||||
}
|
||||
if (trace.allsolid || trace.startsolid || trace.fraction < clip->trace.fraction)
|
||||
{
|
||||
|
|
|
@ -839,7 +839,7 @@ void S_AddLoopSounds (void)
|
|||
{
|
||||
num = (cl.frame.parse_entities + i)&(MAX_PARSE_ENTITIES-1);
|
||||
ent = &cl_parse_entities[num];
|
||||
sounds[i] = ent->sound;
|
||||
sounds[i] = ent->soundindex;
|
||||
}
|
||||
|
||||
for (i=0 ; i<cl.frame.num_entities ; i++)
|
||||
|
|
|
@ -751,28 +751,28 @@ typedef enum
|
|||
// need to render in some way
|
||||
typedef struct entity_state_s
|
||||
{
|
||||
int number; // edict index
|
||||
int number; // edict index
|
||||
|
||||
vec3_t origin;
|
||||
vec3_t angles;
|
||||
vec3_t old_origin; // for lerping animation
|
||||
vec3_t old_origin; // for lerping animation
|
||||
int modelindex;
|
||||
int soundindex;
|
||||
int weaponmodel;
|
||||
|
||||
short skin; // skin for studiomodels
|
||||
short frame; // % playback position in animation sequences (0..512)
|
||||
byte body; // sub-model selection for studiomodels
|
||||
byte sequence; // animation sequence (0 - 255)
|
||||
uint effects; // PGM - we're filling it, so it needs to be unsigned
|
||||
short skin; // skin for studiomodels
|
||||
short frame; // % playback position in animation sequences (0..512)
|
||||
byte body; // sub-model selection for studiomodels
|
||||
byte sequence; // animation sequence (0 - 255)
|
||||
uint effects; // PGM - we're filling it, so it needs to be unsigned
|
||||
int renderfx;
|
||||
int solid; // for client side prediction, 8*(bits 0-4) is x/y radius
|
||||
// 8*(bits 5-9) is z down distance, 8(bits10-15) is z up
|
||||
// gi.linkentity sets this properly
|
||||
int sound; // for looping sounds, to guarantee shutoff
|
||||
int event; // impulse events -- muzzle flashes, footsteps, etc
|
||||
// events only go out for a single frame, they
|
||||
// are automatically cleared each frame
|
||||
float alpha; // alpha value
|
||||
int solid; // for client side prediction, 8*(bits 0-4) is x/y radius
|
||||
// 8*(bits 5-9) is z down distance, 8(bits10-15) is z up
|
||||
// gi.linkentity sets this properly
|
||||
int event; // impulse events -- muzzle flashes, footsteps, etc
|
||||
// events only go out for a single frame, they
|
||||
// are automatically cleared each frame
|
||||
float alpha; // alpha value
|
||||
} entity_state_t;
|
||||
|
||||
//==============================================
|
||||
|
|
|
@ -466,13 +466,13 @@ typedef struct scriptsystem_api_s
|
|||
bool (*Load)( const char *name, char *buf, int size );// load script into stack from file or bufer
|
||||
bool (*Include)( const char *name, char *buf, int size ); // include script from file or buffer
|
||||
char *(*GetToken)( bool newline ); // get next token on a line or newline
|
||||
char *(*Token)( void ); // just return current token
|
||||
bool (*TryToken)( void ); // return 1 if have token on a line
|
||||
void (*FreeToken)( void ); // free current token to may get it again
|
||||
void (*SkipToken)( void ); // skip current token and jump into newline
|
||||
bool (*MatchToken)( const char *match ); // compare current token with user keyword
|
||||
char *(*ParseToken)(const char **data ); // parse token from char buffer
|
||||
char *(*ParseWord)( const char **data ); // parse word from char buffer
|
||||
char *Token; // contains current token
|
||||
|
||||
} scriptsystem_api_t;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ if errorlevel 1 set BUILD_ERROR=1
|
|||
%MSDEV% render/render.dsp %CONFIG%"render - Win32 Release" %build_target%
|
||||
if errorlevel 1 set BUILD_ERROR=1
|
||||
|
||||
vprogs\qcclib.exe
|
||||
qcclib.exe -src vprogs -O3
|
||||
if errorlevel 1 set BUILD_ERROR=1
|
||||
|
||||
if "%BUILD_ERROR%"=="" goto build_ok
|
||||
|
@ -51,7 +51,7 @@ if exist engine\engine.plg del /f /q engine\engine.plg
|
|||
if exist launch\launch.plg del /f /q launch\launch.plg
|
||||
if exist common\common.plg del /f /q common\common.plg
|
||||
if exist render\render.plg del /f /q render\render.plg
|
||||
if exist vprogs\server.dat move vprogs\server.dat D:\Xash3D\xash\server.dat
|
||||
if exist server.dat move server.dat D:\Xash3D\xash\server.dat
|
||||
|
||||
echo Build succeeded!
|
||||
echo Please wait. Xash is now loading
|
||||
|
|
|
@ -1115,7 +1115,7 @@ void R_DrawWorld (void)
|
|||
|
||||
// auto cycle the world frame for texture animation
|
||||
memset (&ent, 0, sizeof(ent));
|
||||
ent.frame = (int)(r_newrefdef.time * 0.01);
|
||||
ent.frame = (int)(r_newrefdef.time * 0.1);
|
||||
currententity = &ent;
|
||||
|
||||
gl_state.currenttextures[0] = gl_state.currenttextures[1] = -1;
|
||||
|
|
|
@ -208,11 +208,11 @@ Does a water warp on the pre-fragmented glpoly_t chain
|
|||
*/
|
||||
void EmitWaterPolys (msurface_t *fa)
|
||||
{
|
||||
glpoly_t *p, *bp;
|
||||
glpoly_t *p, *bp;
|
||||
float *v;
|
||||
int i;
|
||||
float s, t, os, ot;
|
||||
float scroll;
|
||||
int i;
|
||||
float scroll, s, t, os, ot;
|
||||
float rdt = r_newrefdef.time * 1.4f;
|
||||
|
||||
if (fa->texinfo->flags & SURF_FLOWING)
|
||||
scroll = -64 * ( (r_newrefdef.time * 0.5) - (int)(r_newrefdef.time * 0.5));
|
||||
|
@ -228,11 +228,11 @@ void EmitWaterPolys (msurface_t *fa)
|
|||
os = v[3];
|
||||
ot = v[4];
|
||||
|
||||
s = os + r_turbsin[(int)((ot * 0.125 + r_newrefdef.time) * TURBSCALE) & 255];
|
||||
s = os + r_turbsin[(int)((ot * 0.125 + rdt) * TURBSCALE) & 255];
|
||||
s += scroll;
|
||||
s *= (1.0/64);
|
||||
|
||||
t = ot + r_turbsin[(int)((os * 0.125 + r_newrefdef.time) * TURBSCALE) & 255];
|
||||
t = ot + r_turbsin[(int)((os * 0.125 + rdt) * TURBSCALE) & 255];
|
||||
t *= (1.0/64);
|
||||
|
||||
qglTexCoord2f (s, t);
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
=======================================================================
|
||||
Xash3D QuakeC Compiler started at Sep18 2007 [11:53:52]
|
||||
=======================================================================
|
||||
Sys_LoadLibrary: Loading launch.dll [5] - ok
|
||||
Sys_LoadLibrary: Loading common.dll [2] - ok
|
||||
CPU: AuthenticAMD [1 core]. Frequency: 1.8 Ghz
|
||||
CPU Features: MMX 3DNow SSE SSE2 RDTSC CMOV FCMOV
|
||||
Current search path:
|
||||
./
|
||||
--------------------Configuration: server - Vm16 Debug--------------------
|
||||
Compiling...
|
||||
defs.c
|
||||
main.c
|
||||
damage.c
|
||||
player.c
|
||||
client.c
|
||||
dummys.c
|
||||
ents/internal.c
|
||||
ents/lights.c
|
||||
ents/ambient.c
|
||||
ents/ccam.c
|
||||
ents/triggers/triggers.c
|
||||
ents/triggers/trigger_generic.c
|
||||
ents/triggers/trigger_once.c
|
||||
ents/triggers/trigger_sequence.c
|
||||
ents/triggers/trigger_message.c
|
||||
ents/triggers/trigger_counter.c
|
||||
ents/triggers/trigger_setviewpoint.c
|
||||
ents/triggers/trigger_teleport.c
|
||||
ents/triggers/trigger_hurt.c
|
||||
ents/triggers/trigger_push.c
|
||||
ents/triggers/trigger_changelevel.c
|
||||
ents/triggers/trigger_setskill.c
|
||||
ents/triggers/trigger_secret.c
|
||||
ents/funcs/funcs.c
|
||||
ents/funcs/func_mover.c
|
||||
ents/funcs/func_door.c
|
||||
ents/funcs/func_button.c
|
||||
ents/funcs/func_path_corner.c
|
||||
ents/funcs/func_train.c
|
||||
ents/items/items.c
|
||||
impulses.c
|
||||
writing progdefs.h
|
||||
Progs should run on any Quake executor
|
||||
main.c(103) : warning C2: 'skyaxis' : unreferenced local variable
|
||||
client.c(75) : warning C2: 'who' : unreferenced local variable
|
||||
client.c(76) : warning C2: 'fragnum' : unreferenced local variable
|
||||
dummys.c(130) : warning C2: 'f' : unreferenced local variable
|
||||
dummys.c(130) : warning C2: 'g' : unreferenced local variable
|
||||
ents/triggers/trigger_setviewpoint.c(26) : warning C2: 'oldpev' : unreferenced local variable
|
||||
ents/triggers/trigger_setviewpoint.c(26) : warning C2: 'oldtrig' : unreferenced local variable
|
||||
18820 strofs (of 1000000)
|
||||
2849 numstatements (of 524288)
|
||||
266 numfunctions (of 16384)
|
||||
898 numglobaldefs (of 32768)
|
||||
235 numfielddefs (210 unique) (of 2048)
|
||||
909 numpr_globals (of 65536)
|
||||
Writing server.dat
|
||||
64076 TOTAL SIZE
|
||||
17 unique precache_sounds
|
||||
5 unique precache_models
|
||||
optres_shortenifnots 30
|
||||
optres_overlaptemps 1308
|
||||
optres_nonvec_parms 462
|
||||
optres_assignments 59
|
||||
optres_unreferenced 94
|
||||
optres_dupconstdefs 84
|
||||
‘ª®¯¨à®¢ ® ä ©«®¢: 1.
|
||||
|
||||
server.dat - 0 error(s), 7 warning(s)
|
||||
Sys_FreeLibrary: Unloading common.dll
|
||||
Sys_FreeLibrary: Unloading launch.dll
|
||||
|
||||
=======================================================================
|
||||
Xash3D QuakeC Compiler stopped at Sep18 2007 [11:53:52]
|
||||
=======================================================================
|
|
@ -80,6 +80,8 @@ void end_sys_globals; // flag for structure dumping
|
|||
// physics description
|
||||
.vector origin;
|
||||
.vector angles;
|
||||
.vector old_origin;
|
||||
.vector old_angles;
|
||||
.vector velocity;
|
||||
.vector avelocity;
|
||||
.vector post_origin;
|
||||
|
@ -152,7 +154,7 @@ void end_sys_globals; // flag for structure dumping
|
|||
.float idealpitch;
|
||||
.string netname;
|
||||
.entity enemy;
|
||||
.float colormap;
|
||||
.float alpha;
|
||||
.float team;
|
||||
.float max_health;
|
||||
.float teleport_time;
|
||||
|
@ -172,7 +174,7 @@ void end_sys_globals; // flag for structure dumping
|
|||
.string noise;
|
||||
.string noise1;
|
||||
.string noise2;
|
||||
.string noise3;
|
||||
.string noise3; //a looped sound case
|
||||
.float jumpup;
|
||||
.float jumpdn;
|
||||
.entity movetarget;
|
||||
|
|
|
@ -90,6 +90,20 @@ void() item_artifact_envirosuit = {remove(pev);};
|
|||
void() item_artifact_invisibility = {remove(pev);};
|
||||
void() item_artifact_super_damage = {remove(pev);};
|
||||
|
||||
void barrel_touch( void )
|
||||
{
|
||||
float ratio;
|
||||
vector v;
|
||||
|
||||
// only players can move barrel
|
||||
if (!(other->flags & FL_CLIENT))
|
||||
return;
|
||||
|
||||
ratio = (float)other->mass / (float)pev->mass;
|
||||
v = pev->origin - other->origin;
|
||||
walkmove(vectoyaw(v), 20 * ratio * frametime);
|
||||
}
|
||||
|
||||
void barrel_spawn(string netname1, string model1, string deathmessage, float damage)
|
||||
{
|
||||
local float oldz;
|
||||
|
@ -102,13 +116,14 @@ void barrel_spawn(string netname1, string model1, string deathmessage, float dam
|
|||
|
||||
pev->owner = pev;
|
||||
pev->solid = SOLID_BBOX;
|
||||
pev->movetype = MOVETYPE_NONE;
|
||||
pev->movetype = MOVETYPE_STEP;
|
||||
setmodel (pev, model1);
|
||||
pev->health = 20;
|
||||
pev->th_die = SUB_Null;
|
||||
pev->takedamage = DAMAGE_AIM;
|
||||
pev->think = SUB_Null;
|
||||
pev->nextthink = -1;
|
||||
pev->touch = barrel_touch;
|
||||
pev->flags = 0;
|
||||
|
||||
pev->origin_z = pev->origin_z + 2;
|
||||
|
|
|
@ -170,7 +170,7 @@ void() func_mover_touch =
|
|||
{
|
||||
pev->triggerer = other;
|
||||
|
||||
pev->touched = TRUE; //stop touching me!
|
||||
pev->touched = TRUE; //stop touching me!
|
||||
pev->think = func_mover_fire; //set me next think
|
||||
pev->nextthink = pev->ltime + pev->delay; //set it so it happens in 0.1 secs from now.
|
||||
}
|
||||
|
@ -208,9 +208,10 @@ void() func_mover =
|
|||
|
||||
pev->blocked = func_mover_blocked;
|
||||
pev->use = func_mover_use;
|
||||
pev->touch = func_mover_touch;
|
||||
pev->th_die = func_mover_die;
|
||||
|
||||
if(!pev->targetname) pev->touch = func_mover_touch;
|
||||
|
||||
//func_mover; DEFAULTS;
|
||||
if (!pev->speed)
|
||||
pev->speed = 100;
|
||||
|
@ -237,8 +238,5 @@ void() func_mover =
|
|||
}
|
||||
else
|
||||
pev->state = STATE_CLOSED;
|
||||
|
||||
pev->think = func_mover_use;
|
||||
pev->nextthink = pev->ltime + 1.0;
|
||||
};
|
||||
|
||||
|
|
|
@ -88,3 +88,6 @@ void() func_place_model =
|
|||
pev->movetype = MOVETYPE_NONE;
|
||||
};
|
||||
|
||||
void func_areaportal( void )
|
||||
{
|
||||
}
|
|
@ -1,321 +0,0 @@
|
|||
|
||||
/* File generated by FTEQCC, relevent for engine modding only, the generated crc must be the same as your engine expects. */
|
||||
|
||||
typedef struct globalvars_s
|
||||
{ int pad;
|
||||
int ofs_return[3];
|
||||
int ofs_parm0[3];
|
||||
int ofs_parm1[3];
|
||||
int ofs_parm2[3];
|
||||
int ofs_parm3[3];
|
||||
int ofs_parm4[3];
|
||||
int ofs_parm5[3];
|
||||
int ofs_parm6[3];
|
||||
int ofs_parm7[3];
|
||||
int pev;
|
||||
int other;
|
||||
int world;
|
||||
float time;
|
||||
float frametime;
|
||||
string_t mapname;
|
||||
string_t startspot;
|
||||
vec3_t spotoffset;
|
||||
float deathmatch;
|
||||
float coop;
|
||||
float teamplay;
|
||||
float serverflags;
|
||||
float total_secrets;
|
||||
float total_monsters;
|
||||
float found_secrets;
|
||||
float killed_monsters;
|
||||
vec3_t v_forward;
|
||||
vec3_t v_right;
|
||||
vec3_t v_up;
|
||||
float trace_allsolid;
|
||||
float trace_startsolid;
|
||||
float trace_fraction;
|
||||
vec3_t trace_endpos;
|
||||
vec3_t trace_plane_normal;
|
||||
float trace_plane_dist;
|
||||
float trace_hitgroup;
|
||||
float trace_contents;
|
||||
int trace_ent;
|
||||
float trace_flags;
|
||||
func_t main;
|
||||
func_t StartFrame;
|
||||
func_t EndFrame;
|
||||
func_t PlayerPreThink;
|
||||
func_t PlayerPostThink;
|
||||
func_t ClientKill;
|
||||
func_t ClientConnect;
|
||||
func_t PutClientInServer;
|
||||
func_t ClientDisconnect;
|
||||
func_t SetNewParms;
|
||||
func_t SetChangeParms;
|
||||
} globalvars_t;
|
||||
|
||||
typedef struct entvars_s
|
||||
{
|
||||
string_t classname;
|
||||
string_t globalname;
|
||||
float modelindex;
|
||||
vec3_t origin;
|
||||
vec3_t angles;
|
||||
vec3_t velocity;
|
||||
vec3_t avelocity;
|
||||
vec3_t post_origin;
|
||||
vec3_t post_angles;
|
||||
vec3_t post_velocity;
|
||||
vec3_t post_avelocity;
|
||||
vec3_t origin_offset;
|
||||
vec3_t angles_offset;
|
||||
float ltime;
|
||||
float bouncetype;
|
||||
float movetype;
|
||||
float solid;
|
||||
vec3_t absmin;
|
||||
vec3_t absmax;
|
||||
vec3_t mins;
|
||||
vec3_t maxs;
|
||||
vec3_t size;
|
||||
int chain;
|
||||
string_t model;
|
||||
float frame;
|
||||
float sequence;
|
||||
float renderfx;
|
||||
float effects;
|
||||
float skin;
|
||||
float body;
|
||||
string_t weaponmodel;
|
||||
float weaponframe;
|
||||
func_t use;
|
||||
func_t touch;
|
||||
func_t think;
|
||||
func_t blocked;
|
||||
func_t activate;
|
||||
func_t walk;
|
||||
func_t jump;
|
||||
func_t duck;
|
||||
float flags;
|
||||
float aiflags;
|
||||
float spawnflags;
|
||||
int groundentity;
|
||||
float nextthink;
|
||||
float takedamage;
|
||||
float health;
|
||||
float frags;
|
||||
float weapon;
|
||||
float items;
|
||||
string_t target;
|
||||
string_t parent;
|
||||
string_t targetname;
|
||||
int aiment;
|
||||
int goalentity;
|
||||
vec3_t punchangle;
|
||||
float deadflag;
|
||||
vec3_t view_ofs;
|
||||
float button0;
|
||||
float button1;
|
||||
float button2;
|
||||
float impulse;
|
||||
float fixangle;
|
||||
vec3_t v_angle;
|
||||
float idealpitch;
|
||||
string_t netname;
|
||||
int enemy;
|
||||
float colormap;
|
||||
float team;
|
||||
float max_health;
|
||||
float teleport_time;
|
||||
float armortype;
|
||||
float armorvalue;
|
||||
float waterlevel;
|
||||
float watertype;
|
||||
float ideal_yaw;
|
||||
float yaw_speed;
|
||||
float dmg_take;
|
||||
float dmg_save;
|
||||
int dmg_inflictor;
|
||||
int owner;
|
||||
vec3_t movedir;
|
||||
string_t message;
|
||||
float sounds;
|
||||
string_t noise;
|
||||
string_t noise1;
|
||||
string_t noise2;
|
||||
string_t noise3;
|
||||
float jumpup;
|
||||
float jumpdn;
|
||||
int movetarget;
|
||||
float mass;
|
||||
float density;
|
||||
float gravity;
|
||||
float dmg;
|
||||
float dmgtime;
|
||||
float speed;
|
||||
} entvars_t;
|
||||
|
||||
//with this the crc isn't needed for fields.
|
||||
struct fieldvars_s
|
||||
{
|
||||
int ofs;
|
||||
int type;
|
||||
char *name;
|
||||
} fieldvars[] = {
|
||||
{0, 1, "classname"},
|
||||
{1, 1, "globalname"},
|
||||
{2, 2, "modelindex"},
|
||||
{3, 3, "origin"},
|
||||
{3, 2, "origin_x"},
|
||||
{4, 2, "origin_y"},
|
||||
{5, 2, "origin_z"},
|
||||
{6, 3, "angles"},
|
||||
{6, 2, "angles_x"},
|
||||
{7, 2, "angles_y"},
|
||||
{8, 2, "angles_z"},
|
||||
{9, 3, "velocity"},
|
||||
{9, 2, "velocity_x"},
|
||||
{10, 2, "velocity_y"},
|
||||
{11, 2, "velocity_z"},
|
||||
{12, 3, "avelocity"},
|
||||
{12, 2, "avelocity_x"},
|
||||
{13, 2, "avelocity_y"},
|
||||
{14, 2, "avelocity_z"},
|
||||
{15, 3, "post_origin"},
|
||||
{15, 2, "post_origin_x"},
|
||||
{16, 2, "post_origin_y"},
|
||||
{17, 2, "post_origin_z"},
|
||||
{18, 3, "post_angles"},
|
||||
{18, 2, "post_angles_x"},
|
||||
{19, 2, "post_angles_y"},
|
||||
{20, 2, "post_angles_z"},
|
||||
{21, 3, "post_velocity"},
|
||||
{21, 2, "post_velocity_x"},
|
||||
{22, 2, "post_velocity_y"},
|
||||
{23, 2, "post_velocity_z"},
|
||||
{24, 3, "post_avelocity"},
|
||||
{24, 2, "post_avelocity_x"},
|
||||
{25, 2, "post_avelocity_y"},
|
||||
{26, 2, "post_avelocity_z"},
|
||||
{27, 3, "origin_offset"},
|
||||
{27, 2, "origin_offset_x"},
|
||||
{28, 2, "origin_offset_y"},
|
||||
{29, 2, "origin_offset_z"},
|
||||
{30, 3, "angles_offset"},
|
||||
{30, 2, "angles_offset_x"},
|
||||
{31, 2, "angles_offset_y"},
|
||||
{32, 2, "angles_offset_z"},
|
||||
{33, 2, "ltime"},
|
||||
{34, 2, "bouncetype"},
|
||||
{35, 2, "movetype"},
|
||||
{36, 2, "solid"},
|
||||
{37, 3, "absmin"},
|
||||
{37, 2, "absmin_x"},
|
||||
{38, 2, "absmin_y"},
|
||||
{39, 2, "absmin_z"},
|
||||
{40, 3, "absmax"},
|
||||
{40, 2, "absmax_x"},
|
||||
{41, 2, "absmax_y"},
|
||||
{42, 2, "absmax_z"},
|
||||
{43, 3, "mins"},
|
||||
{43, 2, "mins_x"},
|
||||
{44, 2, "mins_y"},
|
||||
{45, 2, "mins_z"},
|
||||
{46, 3, "maxs"},
|
||||
{46, 2, "maxs_x"},
|
||||
{47, 2, "maxs_y"},
|
||||
{48, 2, "maxs_z"},
|
||||
{49, 3, "size"},
|
||||
{49, 2, "size_x"},
|
||||
{50, 2, "size_y"},
|
||||
{51, 2, "size_z"},
|
||||
{52, 4, "chain"},
|
||||
{53, 1, "model"},
|
||||
{54, 2, "frame"},
|
||||
{55, 2, "sequence"},
|
||||
{56, 2, "renderfx"},
|
||||
{57, 2, "effects"},
|
||||
{58, 2, "skin"},
|
||||
{59, 2, "body"},
|
||||
{60, 1, "weaponmodel"},
|
||||
{61, 2, "weaponframe"},
|
||||
{62, 6, "use"},
|
||||
{63, 6, "touch"},
|
||||
{64, 6, "think"},
|
||||
{65, 6, "blocked"},
|
||||
{66, 6, "activate"},
|
||||
{67, 6, "walk"},
|
||||
{68, 6, "jump"},
|
||||
{69, 6, "duck"},
|
||||
{70, 2, "flags"},
|
||||
{71, 2, "aiflags"},
|
||||
{72, 2, "spawnflags"},
|
||||
{73, 4, "groundentity"},
|
||||
{74, 2, "nextthink"},
|
||||
{75, 2, "takedamage"},
|
||||
{76, 2, "health"},
|
||||
{77, 2, "frags"},
|
||||
{78, 2, "weapon"},
|
||||
{79, 2, "items"},
|
||||
{80, 1, "target"},
|
||||
{81, 1, "parent"},
|
||||
{82, 1, "targetname"},
|
||||
{83, 4, "aiment"},
|
||||
{84, 4, "goalentity"},
|
||||
{85, 3, "punchangle"},
|
||||
{85, 2, "punchangle_x"},
|
||||
{86, 2, "punchangle_y"},
|
||||
{87, 2, "punchangle_z"},
|
||||
{88, 2, "deadflag"},
|
||||
{89, 3, "view_ofs"},
|
||||
{89, 2, "view_ofs_x"},
|
||||
{90, 2, "view_ofs_y"},
|
||||
{91, 2, "view_ofs_z"},
|
||||
{92, 2, "button0"},
|
||||
{93, 2, "button1"},
|
||||
{94, 2, "button2"},
|
||||
{95, 2, "impulse"},
|
||||
{96, 2, "fixangle"},
|
||||
{97, 3, "v_angle"},
|
||||
{97, 2, "v_angle_x"},
|
||||
{98, 2, "v_angle_y"},
|
||||
{99, 2, "v_angle_z"},
|
||||
{100, 2, "idealpitch"},
|
||||
{101, 1, "netname"},
|
||||
{102, 4, "enemy"},
|
||||
{103, 2, "colormap"},
|
||||
{104, 2, "team"},
|
||||
{105, 2, "max_health"},
|
||||
{106, 2, "teleport_time"},
|
||||
{107, 2, "armortype"},
|
||||
{108, 2, "armorvalue"},
|
||||
{109, 2, "waterlevel"},
|
||||
{110, 2, "watertype"},
|
||||
{111, 2, "ideal_yaw"},
|
||||
{112, 2, "yaw_speed"},
|
||||
{113, 2, "dmg_take"},
|
||||
{114, 2, "dmg_save"},
|
||||
{115, 4, "dmg_inflictor"},
|
||||
{116, 4, "owner"},
|
||||
{117, 3, "movedir"},
|
||||
{117, 2, "movedir_x"},
|
||||
{118, 2, "movedir_y"},
|
||||
{119, 2, "movedir_z"},
|
||||
{120, 1, "message"},
|
||||
{121, 2, "sounds"},
|
||||
{122, 1, "noise"},
|
||||
{123, 1, "noise1"},
|
||||
{124, 1, "noise2"},
|
||||
{125, 1, "noise3"},
|
||||
{126, 2, "jumpup"},
|
||||
{127, 2, "jumpdn"},
|
||||
{128, 4, "movetarget"},
|
||||
{129, 2, "mass"},
|
||||
{130, 2, "density"},
|
||||
{131, 2, "gravity"},
|
||||
{132, 2, "dmg"},
|
||||
{133, 2, "dmgtime"},
|
||||
{134, 2, "speed"}
|
||||
};
|
||||
|
||||
#define PROGHEADER_CRC 42175
|
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
qcclib -log -dev 4 -progdefs -debug
|
Reference in New Issue