18 Dec 2008

This commit is contained in:
g-cont 2008-12-18 00:00:00 +03:00 committed by Alibek Omarov
parent 8b5320bdda
commit a118bbeb91
21 changed files with 286 additions and 327 deletions

View File

@ -67,5 +67,5 @@ if exist vsound\vsound.plg del /f /q vsound\vsound.plg
echo Build succeeded! echo Build succeeded!
echo Please wait. Xash is now loading echo Please wait. Xash is now loading
cd D:\Xash3D\ cd D:\Xash3D\
quake.exe -game tmpQuArK -log -debug -dev 5 +map qctest quake.exe -game tmpQuArK -log -debug -dev 3 +map qctest
:done :done

View File

@ -354,15 +354,15 @@ CL_CmdButtons
*/ */
void CL_CmdButtons( usercmd_t *cmd ) void CL_CmdButtons( usercmd_t *cmd )
{ {
if ( in_attack.state & 3 ) if( in_attack.state & 3 )
cmd->buttons |= IN_ATTACK; cmd->buttons |= IN_ATTACK;
in_attack.state &= ~2; in_attack.state &= ~2;
if ( in_attack2.state & 3 ) if( in_attack2.state & 3 )
cmd->buttons |= IN_ATTACK2; cmd->buttons |= IN_ATTACK2;
in_attack2.state &= ~2; in_attack2.state &= ~2;
if (in_use.state & 3) if( in_use.state & 3 )
cmd->buttons |= IN_USE; cmd->buttons |= IN_USE;
in_use.state &= ~2; in_use.state &= ~2;

View File

@ -287,6 +287,7 @@ void CL_ParseConfigString( sizebuf_t *msg )
else if( i >= CS_USER_MESSAGES && i < CS_USER_MESSAGES+MAX_USER_MESSAGES ) else if( i >= CS_USER_MESSAGES && i < CS_USER_MESSAGES+MAX_USER_MESSAGES )
{ {
// FIXME: register user message here // FIXME: register user message here
// Msg("PrepUserMessage: %s[svc_%i]\n", cl.configstrings[i], i - CS_USER_MESSAGES );
} }
else if( i >= CS_CLASSNAMES && i < CS_CLASSNAMES+MAX_CLASSNAMES ) else if( i >= CS_CLASSNAMES && i < CS_CLASSNAMES+MAX_CLASSNAMES )
{ {

View File

@ -630,7 +630,7 @@ void Host_Init( int argc, char **argv)
Cmd_AddCommand ("crash", Host_Crash_f, "a way to force a bus error for development reasons"); Cmd_AddCommand ("crash", Host_Crash_f, "a way to force a bus error for development reasons");
} }
host_cheats = Cvar_Get( "host_cheats", "1", CVAR_SYSTEMINFO, "allow cheat variables to enable" ); host_cheats = Cvar_Get( "sv_cheats", "1", CVAR_SYSTEMINFO, "allow cheat variables to enable" );
host_maxfps = Cvar_Get( "host_maxfps", "100", CVAR_ARCHIVE, "host fps upper limit" ); host_maxfps = Cvar_Get( "host_maxfps", "100", CVAR_ARCHIVE, "host fps upper limit" );
host_frametime = Cvar_Get("host_frametime", "0.1", CVAR_SERVERINFO, "host frametime (only for test!)" ); host_frametime = Cvar_Get("host_frametime", "0.1", CVAR_SERVERINFO, "host frametime (only for test!)" );
host_maxclients = Cvar_Get("host_maxclients", "1", CVAR_SERVERINFO|CVAR_LATCH, "server maxplayers limit" ); host_maxclients = Cvar_Get("host_maxclients", "1", CVAR_SERVERINFO|CVAR_LATCH, "server maxplayers limit" );

View File

@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "svgame_api.h" #include "svgame_api.h"
//============================================================================= //=============================================================================
#define NUM_FOR_EDICT(e) ((int)((edict_t *)(e) - svg.edicts)) #define NUM_FOR_EDICT(e) ((int)((edict_t *)(e) - game.edicts))
#define EDICT_NUM( num ) _EDICT_NUM( num, __FILE__, __LINE__ ) #define EDICT_NUM( num ) _EDICT_NUM( num, __FILE__, __LINE__ )
#define AREA_SOLID 1 #define AREA_SOLID 1
@ -200,7 +200,12 @@ typedef struct
int msg_sizes[MAX_USER_MESSAGES]; // user messages bounds checker int msg_sizes[MAX_USER_MESSAGES]; // user messages bounds checker
int msg_leftsize; // left in bytes int msg_leftsize; // left in bytes
int msg_index; // for debug messages int msg_index; // for debug messages
edict_t *edicts;
union
{
edict_t *edicts; // acess by edict number
void *vp; // acess by offset in bytes
};
// library exports table // library exports table
word *ordinals; word *ordinals;
@ -208,6 +213,8 @@ typedef struct
char *names[MAX_SYSPATH]; // max 1024 exports supported char *names[MAX_SYSPATH]; // max 1024 exports supported
int num_ordinals; // actual exports count int num_ordinals; // actual exports count
dword funcBase; // base offset dword funcBase; // base offset
int hStringTable; // stringtable handle
} game_static_t; } game_static_t;
typedef struct typedef struct
@ -247,7 +254,7 @@ typedef struct
extern netadr_t master_adr[MAX_MASTERS]; // address of the master server extern netadr_t master_adr[MAX_MASTERS]; // address of the master server
extern const char *ed_name[]; extern const char *ed_name[];
extern server_static_t svs; // persistant server info extern server_static_t svs; // persistant server info
extern game_static_t svg; // persistant game info extern game_static_t game; // persistant game info
extern server_t sv; // local server extern server_t sv; // local server
extern cvar_t *sv_paused; extern cvar_t *sv_paused;
@ -365,7 +372,7 @@ void SV_Error (char *error, ...);
// //
bool SV_LoadProgs( const char *name ); bool SV_LoadProgs( const char *name );
void SV_UnloadProgs( void ); void SV_UnloadProgs( void );
void SV_InitEdict (edict_t *e); void SV_InitEdict( edict_t *pEdict );
void SV_ConfigString (int index, const char *val); void SV_ConfigString (int index, const char *val);
void SV_SetModel (edict_t *ent, const char *name); void SV_SetModel (edict_t *ent, const char *name);
void SV_CreatePhysBody( edict_t *ent ); void SV_CreatePhysBody( edict_t *ent );
@ -375,18 +382,20 @@ void SV_CopyTraceToGlobal( trace_t *trace );
void SV_CopyTraceResult( TraceResult *out, trace_t trace ); void SV_CopyTraceResult( TraceResult *out, trace_t trace );
float SV_AngleMod( float ideal, float current, float speed ); float SV_AngleMod( float ideal, float current, float speed );
void SV_SpawnEntities( const char *mapname, script_t *entities ); void SV_SpawnEntities( const char *mapname, script_t *entities );
string_t pfnAllocString( const char *szValue );
const char *pfnGetString( string_t iString );
_inline edict_t *_EDICT_NUM( int n, const char * file, const int line ) _inline edict_t *_EDICT_NUM( int n, const char * file, const int line )
{ {
if((n >= 0) && (n < svs.globals->maxEntities)) if((n >= 0) && (n < svs.globals->maxEntities))
return svg.edicts + n; return game.edicts + n;
Host_Error( "EDICT_NUM: bad number %i (called at %s:%i)\n", n, file, line ); Host_Error( "EDICT_NUM: bad number %i (called at %s:%i)\n", n, file, line );
return NULL; return NULL;
} }
// for constant strings // for constant strings
#define STRING( offset ) (const char *)( svs.globals->pStringBase + (int)offset ) #define STRING( offset ) pfnGetString( offset )
#define MAKE_STRING(str) ((int)str - (int)STRING( 0 )) #define MAKE_STRING(str) pfnAllocString( str )
// //
// sv_studio.c // sv_studio.c
@ -401,7 +410,6 @@ bool SV_CreateMeshBuffer( edict_t *in, cmodel_t *out );
// //
void SV_StartParticle( const float *org, const float *dir, int color, int count ); void SV_StartParticle( const float *org, const float *dir, int color, int count );
edict_t *SV_AllocEdict( void ); edict_t *SV_AllocEdict( void );
void SV_InitEdict( edict_t *pEdict );
void SV_FreeEdict( edict_t *pEdict ); void SV_FreeEdict( edict_t *pEdict );
bool SV_ClientConnect (edict_t *ent, char *userinfo); bool SV_ClientConnect (edict_t *ent, char *userinfo);
void SV_TouchTriggers (edict_t *ent); void SV_TouchTriggers (edict_t *ent);

View File

@ -481,7 +481,6 @@ void SV_PutClientInServer( edict_t *ent )
edict_t *viewmodel; edict_t *viewmodel;
int i; int i;
Com_Assert( 1 );
index = NUM_FOR_EDICT( ent ) - 1; index = NUM_FOR_EDICT( ent ) - 1;
client = ent->pvEngineData->client; client = ent->pvEngineData->client;
@ -504,10 +503,7 @@ void SV_PutClientInServer( edict_t *ent )
VectorCopy( ent->v.angles, viewmodel->v.angles ); VectorCopy( ent->v.angles, viewmodel->v.angles );
viewmodel->v.model = ent->v.viewmodel; viewmodel->v.model = ent->v.viewmodel;
viewmodel->v.movetype = MOVETYPE_FOLLOW; viewmodel->v.movetype = MOVETYPE_FOLLOW;
// make cross links for consistency
viewmodel->v.aiment = ent; viewmodel->v.aiment = ent;
ent->v.aiment = viewmodel;
} }
else else
{ {

View File

@ -1,158 +0,0 @@
//=======================================================================
// Copyright XashXT Group 2008 ©
// sv_edict.h - server prvm edict
//=======================================================================
#ifndef SV_EDICT_H
#define SV_EDICT_H
struct sv_globalvars_s
{
int pad[34];
int pev;
int other;
int world;
float time;
float frametime;
float serverflags;
string_t mapname;
string_t startspot;
vec3_t spotoffset;
float deathmatch;
float teamplay;
float coop;
float total_secrets;
float found_secrets;
float total_monsters;
float killed_monsters;
vec3_t v_forward;
vec3_t v_right;
vec3_t v_up;
float trace_allsolid;
float trace_startsolid;
float trace_fraction;
float trace_plane_dist;
vec3_t trace_endpos;
vec3_t trace_plane_normal;
float trace_contents;
float trace_hitgroup;
float trace_flags;
int trace_ent;
func_t StartFrame;
func_t EndFrame;
func_t PlayerPreThink;
func_t PlayerPostThink;
func_t ClientConnect;
func_t ClientCommand;
func_t ClientDisconnect;
func_t PutClientInServer;
func_t KeyValue;
func_t ClientUserInfoChanged;
func_t EmitSound;
};
struct sv_entvars_s
{
string_t classname;
string_t globalname;
int chain;
func_t precache;
func_t activate;
func_t blocked;
func_t touch;
func_t think;
func_t use;
vec3_t origin;
vec3_t angles;
float modelindex;
vec3_t old_origin;
vec3_t old_angles;
vec3_t velocity;
vec3_t avelocity;
vec3_t m_pcentre[3];
vec3_t m_pmatrix[3];
vec3_t movedir;
vec3_t force;
vec3_t torque;
vec3_t post_origin;
vec3_t post_angles;
vec3_t origin_offset;
vec3_t absmin;
vec3_t absmax;
vec3_t mins;
vec3_t maxs;
vec3_t size;
float mass;
float solid;
float scale;
float contents;
float movetype;
float waterlevel;
float watertype;
float ltime;
string_t model;
float skin;
float body;
float frame;
float speed;
float sequence;
float animtime;
float framerate;
float effects;
float renderfx;
float rendermode;
float renderamt;
vec3_t rendercolor;
float gaitsequence;
float colormap;
float style;
float flags;
float aiflags;
float spawnflags;
float controller[16];
float blending[16];
vec3_t v_angle;
vec3_t view_ofs;
float fixangle;
vec3_t punchangle;
float button0;
float button1;
float button2;
float impulse;
float weapon;
float items;
float currentammo;
float v_sequence;
float v_frame;
string_t v_model;
float v_body;
float v_skin;
float p_sequence;
float p_frame;
string_t p_model;
float p_body;
float p_skin;
string_t loopsound;
float loopsndvol;
float loopsndattn;
int owner;
int enemy;
int aiment;
int goalentity;
float teleport_time;
float ideal_yaw;
float yaw_speed;
float m_flGroundSpeed;
float m_flFrameRate;
float m_flWeaponFrameRate;
int groundentity;
float takedamage;
float nextthink;
float gravity;
float health;
float frags;
float team;
};
#define PROG_CRC_SERVER 8505
#endif//SV_EDICT_H

View File

@ -67,7 +67,6 @@ void SV_UpdateEntityState( edict_t *ent )
ent->pvEngineData->s.renderamt = ent->v.renderamt; // alpha value ent->pvEngineData->s.renderamt = ent->v.renderamt; // alpha value
ent->pvEngineData->s.model.framerate = ent->v.framerate; ent->pvEngineData->s.model.framerate = ent->v.framerate;
ent->pvEngineData->s.model.animtime = (int)(1000.0 * ent->v.animtime) * 0.001; // sequence time ent->pvEngineData->s.model.animtime = (int)(1000.0 * ent->v.animtime) * 0.001; // sequence time
ent->pvEngineData->s.aiment = NUM_FOR_EDICT( ent->v.aiment ); // viewmodel parent
ent->pvEngineData->s.model.scale = ent->v.scale; // shared client and render flags ent->pvEngineData->s.model.scale = ent->v.scale; // shared client and render flags
VectorCopy( ent->v.rendercolor, ent->pvEngineData->s.rendercolor ); VectorCopy( ent->v.rendercolor, ent->pvEngineData->s.rendercolor );
@ -92,11 +91,14 @@ void SV_UpdateEntityState( edict_t *ent )
if( ent->pvEngineData->s.ed_type == ED_VIEWMODEL ) if( ent->pvEngineData->s.ed_type == ED_VIEWMODEL )
{ {
if( !ent->v.aiment ) return; // no aiment
// copy v_model state from client to viemodel entity // copy v_model state from client to viemodel entity
client = ent->v.aiment; client = ent->v.aiment;
// update both arrays, because viewmodel are hidden for qc-coders // update both arrays, because viewmodel are hidden for qc-coders
ent->v.modelindex = SV_ModelIndex( STRING( client->v.viewmodel )); ent->v.modelindex = SV_ModelIndex( STRING( client->v.viewmodel ));
ent->pvEngineData->s.aiment = NUM_FOR_EDICT( client ); // viewmodel parent
ent->pvEngineData->s.model.index = ent->v.modelindex; ent->pvEngineData->s.model.index = ent->v.modelindex;
ent->pvEngineData->s.model.frame = ent->v.frame = client->v.weaponframe; ent->pvEngineData->s.model.frame = ent->v.frame = client->v.weaponframe;
ent->pvEngineData->s.model.body = ent->v.body = client->v.weaponbody; ent->pvEngineData->s.model.body = ent->v.body = client->v.weaponbody;
@ -264,6 +266,7 @@ static void SV_AddEntitiesToPacket( vec3_t origin, client_frame_t *frame, sv_ent
for( e = 1; e < svs.globals->numEntities; e++ ) for( e = 1; e < svs.globals->numEntities; e++ )
{ {
ent = EDICT_NUM( e ); ent = EDICT_NUM( e );
if( ent->free ) continue;
force = false; // clear forceflag force = false; // clear forceflag
// completely ignore dormant entity // completely ignore dormant entity

View File

@ -27,18 +27,18 @@ void Sys_FreeNameFuncGlobals( void )
{ {
int i; int i;
if( svg.ordinals ) Mem_Free( svg.ordinals ); if( game.ordinals ) Mem_Free( game.ordinals );
if( svg.funcs) Mem_Free( svg.funcs); if( game.funcs) Mem_Free( game.funcs);
for( i = 0; i < svg.num_ordinals; i++ ) for( i = 0; i < game.num_ordinals; i++ )
{ {
if( svg.names[i] ) if( game.names[i] )
Mem_Free( svg.names[i] ); Mem_Free( game.names[i] );
} }
svg.num_ordinals = 0; game.num_ordinals = 0;
svg.ordinals = NULL; game.ordinals = NULL;
svg.funcs = NULL; game.funcs = NULL;
} }
char *Sys_GetMSVCName( const char *in_name ) char *Sys_GetMSVCName( const char *in_name )
@ -51,13 +51,13 @@ char *Sys_GetMSVCName( const char *in_name )
{ {
int len = pos - in_name; int len = pos - in_name;
out_name = copystring( in_name + 1 ); // strip off the leading '?' // strip off the leading '?'
out_name = com.stralloc( svs.private, in_name + 1, __FILE__, __LINE__ );
out_name[len-1] = 0; // terminate string at the "@@" out_name[len-1] = 0; // terminate string at the "@@"
return out_name; return out_name;
} }
} }
return com.stralloc( svs.private, in_name, __FILE__, __LINE__ );
return copystring( in_name );
} }
bool Sys_LoadSymbols( const char *filename ) bool Sys_LoadSymbols( const char *filename )
@ -79,8 +79,8 @@ bool Sys_LoadSymbols( const char *filename )
dword *p_Names = NULL; dword *p_Names = NULL;
int i, index; int i, index;
for( i = 0; i < svg.num_ordinals; i++ ) for( i = 0; i < game.num_ordinals; i++ )
svg.names[i] = NULL; game.names[i] = NULL;
f = FS_Open( filename, "rb" ); f = FS_Open( filename, "rb" );
if( !f ) if( !f )
@ -189,9 +189,9 @@ bool Sys_LoadSymbols( const char *filename )
return false; return false;
} }
svg.num_ordinals = export_directory.NumberOfNames; // also number of ordinals game.num_ordinals = export_directory.NumberOfNames; // also number of ordinals
if( svg.num_ordinals > MAX_SYSPATH ) if( game.num_ordinals > MAX_SYSPATH )
{ {
MsgDev( D_ERROR, "Sys_LoadSymbols: %s too many exports\n", filename ); MsgDev( D_ERROR, "Sys_LoadSymbols: %s too many exports\n", filename );
FS_Close( f ); FS_Close( f );
@ -207,9 +207,9 @@ bool Sys_LoadSymbols( const char *filename )
return false; return false;
} }
svg.ordinals = Z_Malloc( svg.num_ordinals * sizeof( word )); game.ordinals = Z_Malloc( game.num_ordinals * sizeof( word ));
if( FS_Read( f, svg.ordinals, svg.num_ordinals * sizeof( word )) != (svg.num_ordinals * sizeof( word ))) if( FS_Read( f, game.ordinals, game.num_ordinals * sizeof( word )) != (game.num_ordinals * sizeof( word )))
{ {
Sys_FreeNameFuncGlobals(); Sys_FreeNameFuncGlobals();
MsgDev( D_ERROR, "Sys_LoadSymbols: %s error during reading ordinals table\n", filename ); MsgDev( D_ERROR, "Sys_LoadSymbols: %s error during reading ordinals table\n", filename );
@ -225,9 +225,9 @@ bool Sys_LoadSymbols( const char *filename )
return false; return false;
} }
svg.funcs = Z_Malloc( svg.num_ordinals * sizeof( dword )); game.funcs = Z_Malloc( game.num_ordinals * sizeof( dword ));
if( FS_Read( f, svg.funcs, svg.num_ordinals * sizeof( dword )) != (svg.num_ordinals * sizeof( dword ))) if( FS_Read( f, game.funcs, game.num_ordinals * sizeof( dword )) != (game.num_ordinals * sizeof( dword )))
{ {
Sys_FreeNameFuncGlobals(); Sys_FreeNameFuncGlobals();
MsgDev( D_ERROR, "Sys_LoadSymbols: %s error during reading export address section\n", filename ); MsgDev( D_ERROR, "Sys_LoadSymbols: %s error during reading export address section\n", filename );
@ -245,9 +245,9 @@ bool Sys_LoadSymbols( const char *filename )
return false; return false;
} }
p_Names = Z_Malloc( svg.num_ordinals * sizeof( dword )); p_Names = Z_Malloc( game.num_ordinals * sizeof( dword ));
if( FS_Read( f, p_Names, svg.num_ordinals * sizeof( dword )) != (svg.num_ordinals * sizeof( dword ))) if( FS_Read( f, p_Names, game.num_ordinals * sizeof( dword )) != (game.num_ordinals * sizeof( dword )))
{ {
Sys_FreeNameFuncGlobals(); Sys_FreeNameFuncGlobals();
if( p_Names ) Mem_Free( p_Names ); if( p_Names ) Mem_Free( p_Names );
@ -256,7 +256,7 @@ bool Sys_LoadSymbols( const char *filename )
return false; return false;
} }
for( i = 0; i < svg.num_ordinals; i++ ) for( i = 0; i < game.num_ordinals; i++ )
{ {
name_offset = p_Names[i] - edata_delta; name_offset = p_Names[i] - edata_delta;
@ -265,13 +265,13 @@ bool Sys_LoadSymbols( const char *filename )
if( FS_Seek( f, name_offset, SEEK_SET ) != -1 ) if( FS_Seek( f, name_offset, SEEK_SET ) != -1 )
{ {
Sys_FsGetString( f, function_name ); Sys_FsGetString( f, function_name );
svg.names[i] = Sys_GetMSVCName( function_name ); game.names[i] = Sys_GetMSVCName( function_name );
} }
else break; else break;
} }
} }
if( i != svg.num_ordinals ) if( i != game.num_ordinals )
{ {
Sys_FreeNameFuncGlobals(); Sys_FreeNameFuncGlobals();
if( p_Names ) Mem_Free( p_Names ); if( p_Names ) Mem_Free( p_Names );
@ -281,15 +281,15 @@ bool Sys_LoadSymbols( const char *filename )
} }
FS_Close( f ); FS_Close( f );
for( i = 0; i < svg.num_ordinals; i++ ) for( i = 0; i < game.num_ordinals; i++ )
{ {
if( com.strcmp( "GiveFnptrsToDll", svg.names[i] )) if( !com.strcmp( "GiveFnptrsToDll", game.names[i] ))
{ {
void *fn_offset; void *fn_offset;
index = svg.ordinals[i]; index = game.ordinals[i];
fn_offset = (void *)Sys_GetProcAddress( svs.game, "GiveFnptrsToDll" ); fn_offset = (void *)Sys_GetProcAddress( svs.game, "GiveFnptrsToDll" );
svg.funcBase = (dword)(fn_offset) - svg.funcs[index]; game.funcBase = (dword)(fn_offset) - game.funcs[index];
break; break;
} }
} }
@ -622,6 +622,7 @@ bool SV_EntitiesIn( bool mode, vec3_t v1, vec3_t v2 )
void SV_InitEdict( edict_t *pEdict ) void SV_InitEdict( edict_t *pEdict )
{ {
Com_Assert( pEdict == NULL ); Com_Assert( pEdict == NULL );
Com_Assert( pEdict->pvServerData != NULL );
pEdict->v.pContainingEntity = pEdict; // make cross-links for consistency pEdict->v.pContainingEntity = pEdict; // make cross-links for consistency
pEdict->pvEngineData = (ed_priv_t *)Mem_Alloc( svs.mempool, sizeof( ed_priv_t )); pEdict->pvEngineData = (ed_priv_t *)Mem_Alloc( svs.mempool, sizeof( ed_priv_t ));
@ -632,6 +633,9 @@ void SV_InitEdict( edict_t *pEdict )
void SV_FreeEdict( edict_t *pEdict ) void SV_FreeEdict( edict_t *pEdict )
{ {
Com_Assert( pEdict == NULL );
Com_Assert( pEdict->free );
// unlink from world // unlink from world
SV_UnlinkEdict( pEdict ); SV_UnlinkEdict( pEdict );
pe->RemoveBody( pEdict->pvEngineData->physbody ); pe->RemoveBody( pEdict->pvEngineData->physbody );
@ -1019,7 +1023,7 @@ pfnSetModel
*/ */
void pfnSetModel( edict_t *e, const char *m ) void pfnSetModel( edict_t *e, const char *m )
{ {
if( e == svg.edicts ) if( e == game.edicts )
{ {
MsgDev( D_WARN, "SV_SetModel: can't modify world entity\n" ); MsgDev( D_WARN, "SV_SetModel: can't modify world entity\n" );
return; return;
@ -1088,7 +1092,7 @@ void pfnSetSize( edict_t *e, const float *rgflMin, const float *rgflMax )
MsgDev( D_ERROR, "SV_SetSize: entity not exist\n" ); MsgDev( D_ERROR, "SV_SetSize: entity not exist\n" );
return; return;
} }
else if( e == svg.edicts ) else if( e == game.edicts )
{ {
MsgDev( D_ERROR, "SV_SetSize: can't modify world entity\n" ); MsgDev( D_ERROR, "SV_SetSize: can't modify world entity\n" );
return; return;
@ -1211,7 +1215,7 @@ void pfnChangeYaw( edict_t* ent )
{ {
float current; float current;
if( ent == svg.edicts ) if( ent == game.edicts )
{ {
MsgDev( D_WARN, "SV_ChangeYaw: can't modify world entity\n" ); MsgDev( D_WARN, "SV_ChangeYaw: can't modify world entity\n" );
return; return;
@ -1236,7 +1240,7 @@ void pfnChangePitch( edict_t* ent )
{ {
float current; float current;
if( ent == svg.edicts ) if( ent == game.edicts )
{ {
MsgDev( D_WARN, "SV_ChangePitch: can't modify world entity\n" ); MsgDev( D_WARN, "SV_ChangePitch: can't modify world entity\n" );
return; return;
@ -1263,7 +1267,9 @@ edict_t* pfnFindEntityByString( edict_t *pStartEdict, const char *pszField, cons
const char *t; const char *t;
edict_t *ed; edict_t *ed;
e = NUM_FOR_EDICT( pStartEdict ); if( !pStartEdict )
e = NUM_FOR_EDICT( game.edicts );
else e = NUM_FOR_EDICT( pStartEdict );
if( !pszValue ) pszValue = ""; if( !pszValue ) pszValue = "";
if( !com.strcmp( pszField, "classname" )) if( !com.strcmp( pszField, "classname" ))
@ -1289,7 +1295,7 @@ edict_t* pfnFindEntityByString( edict_t *pStartEdict, const char *pszField, cons
if( !com.strcmp( t, pszValue )) if( !com.strcmp( t, pszValue ))
return ed; return ed;
} }
return svg.edicts; return game.edicts;
} }
/* /*
@ -1300,7 +1306,7 @@ pfnGetEntityIllum
*/ */
int pfnGetEntityIllum( edict_t* pEnt ) int pfnGetEntityIllum( edict_t* pEnt )
{ {
if( pEnt == svg.edicts ) if( pEnt == game.edicts )
{ {
MsgDev( D_WARN, "SV_GetEntityIllum: can't get light level at world entity\n" ); MsgDev( D_WARN, "SV_GetEntityIllum: can't get light level at world entity\n" );
return 0; return 0;
@ -1325,10 +1331,11 @@ edict_t* pfnFindEntityInSphere( edict_t *pStartEdict, const float *org, float ra
edict_t *ent, *chain; edict_t *ent, *chain;
float radSquare; float radSquare;
vec3_t eorg; vec3_t eorg;
int e; int e = 0;
radSquare = rad * rad; radSquare = rad * rad;
chain = pStartEdict; chain = pStartEdict;
if( pStartEdict )
e = NUM_FOR_EDICT( pStartEdict ); e = NUM_FOR_EDICT( pStartEdict );
for( e++; e < svs.globals->numEntities; e++ ) for( e++; e < svs.globals->numEntities; e++ )
@ -1367,7 +1374,7 @@ edict_t* pfnFindClientInPVS( edict_t *pEdict )
for( i = 1; i < numents; i++ ) for( i = 1; i < numents; i++ )
{ {
pClient = svg.edicts + i; pClient = game.edicts + i;
if( pClient->free ) continue; if( pClient->free ) continue;
if( SV_EntitiesIn( DVIS_PVS, pEdict->v.origin, pClient->v.origin )) if( SV_EntitiesIn( DVIS_PVS, pEdict->v.origin, pClient->v.origin ))
{ {
@ -1396,7 +1403,7 @@ edict_t* pfnFindClientInPHS( edict_t *pEdict )
for( i = 1; i < numents; i++ ) for( i = 1; i < numents; i++ )
{ {
pClient = svg.edicts + i; pClient = game.edicts + i;
if( pClient->free ) continue; if( pClient->free ) continue;
if( SV_EntitiesIn( DVIS_PHS, pClient->v.origin, pEdict->v.origin )) if( SV_EntitiesIn( DVIS_PHS, pClient->v.origin, pEdict->v.origin ))
{ {
@ -1424,7 +1431,7 @@ edict_t* pfnEntitiesInPVS( edict_t *pplayer )
for( i = svs.globals->maxClients; i < numents; i++ ) for( i = svs.globals->maxClients; i < numents; i++ )
{ {
pEdict = svg.edicts + i; pEdict = game.edicts + i;
if( pEdict->free ) continue; if( pEdict->free ) continue;
if( SV_EntitiesIn( DVIS_PVS, pEdict->v.origin, pplayer->v.origin )) if( SV_EntitiesIn( DVIS_PVS, pEdict->v.origin, pplayer->v.origin ))
{ {
@ -1452,7 +1459,7 @@ edict_t* pfnEntitiesInPHS( edict_t *pplayer )
for( i = svs.globals->maxClients; i < numents; i++ ) for( i = svs.globals->maxClients; i < numents; i++ )
{ {
pEdict = svg.edicts + i; pEdict = game.edicts + i;
if( pEdict->free ) continue; if( pEdict->free ) continue;
if( SV_EntitiesIn( DVIS_PHS, pEdict->v.origin, pplayer->v.origin )) if( SV_EntitiesIn( DVIS_PHS, pEdict->v.origin, pplayer->v.origin ))
{ {
@ -1511,7 +1518,7 @@ void pfnRemoveEntity( edict_t* e )
// never free client or world entity // never free client or world entity
if( NUM_FOR_EDICT( e ) < svs.globals->maxClients ) if( NUM_FOR_EDICT( e ) < svs.globals->maxClients )
{ {
MsgDev( D_ERROR, "SV_RemoveEntity: can't delete %s\n", (e == svg.edicts) ? "world" : "client" ); MsgDev( D_ERROR, "SV_RemoveEntity: can't delete %s\n", (e == game.edicts) ? "world" : "client" );
return; return;
} }
SV_FreeEdict( e ); SV_FreeEdict( e );
@ -1534,7 +1541,6 @@ edict_t* pfnCreateNamedEntity( string_t className )
pszClassName = STRING( className ); pszClassName = STRING( className );
// also register classname to send for client // also register classname to send for client
Com_Assert( pszClassName == NULL || !pszClassName[0] );
ed->pvEngineData->s.classname = SV_ClassIndex( pszClassName ); ed->pvEngineData->s.classname = SV_ClassIndex( pszClassName );
return ed; return ed;
@ -1576,7 +1582,7 @@ int pfnDropToFloor( edict_t* e )
trace_t trace; trace_t trace;
// ignore world silently // ignore world silently
if( e == svg.edicts ) return false; if( e == game.edicts ) return false;
if( e->free ) if( e->free )
{ {
MsgDev( D_ERROR, "SV_DropToFloor: can't modify free entity\n" ); MsgDev( D_ERROR, "SV_DropToFloor: can't modify free entity\n" );
@ -1654,7 +1660,7 @@ int pfnWalkMove( edict_t *ent, float yaw, float dist, int iMode )
vec3_t move; vec3_t move;
// ignore world silently // ignore world silently
if( ent == svg.edicts ) return false; if( ent == game.edicts ) return false;
if( ent->free ) if( ent->free )
{ {
MsgDev( D_WARN, "SV_DropToFloor: can't modify free entity\n" ); MsgDev( D_WARN, "SV_DropToFloor: can't modify free entity\n" );
@ -1678,7 +1684,7 @@ pfnSetOrigin
void pfnSetOrigin( edict_t *e, const float *rgflOrigin ) void pfnSetOrigin( edict_t *e, const float *rgflOrigin )
{ {
// ignore world silently // ignore world silently
if( e == svg.edicts ) return; if( e == game.edicts ) return;
if( e->free ) if( e->free )
{ {
MsgDev( D_ERROR, "SV_SetOrigin: can't modify free entity\n" ); MsgDev( D_ERROR, "SV_SetOrigin: can't modify free entity\n" );
@ -1701,7 +1707,7 @@ pfnSetAngles
*/ */
void pfnSetAngles( edict_t *e, const float *rgflAngles ) void pfnSetAngles( edict_t *e, const float *rgflAngles )
{ {
if( e == svg.edicts ) return; if( e == game.edicts ) return;
if( e->free ) if( e->free )
{ {
MsgDev( D_ERROR, "SV_SetAngles: can't modify free entity\n" ); MsgDev( D_ERROR, "SV_SetAngles: can't modify free entity\n" );
@ -1768,7 +1774,7 @@ void pfnTraceToss( edict_t* pent, edict_t* pentToIgnore, TraceResult *ptr )
{ {
trace_t trace; trace_t trace;
if( pent == svg.edicts ) return; if( pent == game.edicts ) return;
trace = SV_TraceToss( pent, pentToIgnore ); trace = SV_TraceToss( pent, pentToIgnore );
SV_CopyTraceResult( ptr, trace ); SV_CopyTraceResult( ptr, trace );
} }
@ -1854,7 +1860,7 @@ void pfnGetAimVector( edict_t* ent, float speed, float *rgflReturn )
fNoFriendlyFire = Cvar_VariableValue( "mp_friendlyfire" ); fNoFriendlyFire = Cvar_VariableValue( "mp_friendlyfire" );
VectorCopy( svs.globals->v_forward, rgflReturn ); // assume failure if it returns early VectorCopy( svs.globals->v_forward, rgflReturn ); // assume failure if it returns early
if( ent == svg.edicts ) return; if( ent == game.edicts ) return;
if( ent->free ) if( ent->free )
{ {
MsgDev( D_ERROR, "SV_GetAimVector: can't aiming at free entity\n" ); MsgDev( D_ERROR, "SV_GetAimVector: can't aiming at free entity\n" );
@ -1880,7 +1886,7 @@ void pfnGetAimVector( edict_t* ent, float speed, float *rgflReturn )
bestdist = 0.5f; bestdist = 0.5f;
bestent = NULL; bestent = NULL;
check = svg.edicts + 1; // start at first client check = game.edicts + 1; // start at first client
for( i = 1; i < svs.globals->numEntities; i++, check++ ) for( i = 1; i < svs.globals->numEntities; i++, check++ )
{ {
if( check->v.takedamage != DAMAGE_AIM ) continue; if( check->v.takedamage != DAMAGE_AIM ) continue;
@ -2024,14 +2030,14 @@ void pfnMessageBegin( int msg_dest, int msg_type, const float *pOrigin, edict_t
{ {
// some users can send message with engine index // some users can send message with engine index
// reduce number to avoid overflow problems or cheating // reduce number to avoid overflow problems or cheating
svg.msg_index = bound( svc_bad, msg_type, svc_nop ); game.msg_index = bound( svc_bad, msg_type, svc_nop );
MSG_Begin( svg.msg_index ); MSG_Begin( game.msg_index );
// save message destination // save message destination
if( pOrigin ) VectorCopy( pOrigin, svs.msg_org ); if( pOrigin ) VectorCopy( pOrigin, svs.msg_org );
else VectorClear( svs.msg_org ); else VectorClear( svs.msg_org );
svg.msg_leftsize = svg.msg_sizes[msg_type]; game.msg_leftsize = game.msg_sizes[msg_type];
svs.msg_dest = msg_dest; svs.msg_dest = msg_dest;
svs.msg_ent = ed; svs.msg_ent = ed;
} }
@ -2044,11 +2050,13 @@ pfnMessageEnd
*/ */
void pfnMessageEnd( void ) void pfnMessageEnd( void )
{ {
if( svg.msg_leftsize != 0xFFFF && svg.msg_leftsize != 0 ) return;//
if( game.msg_leftsize != 0xFFFF && game.msg_leftsize != 0 )
{ {
const char *name = sv.configstrings[CS_USER_MESSAGES + svg.msg_index]; const char *name = sv.configstrings[CS_USER_MESSAGES + game.msg_index];
int size = svg.msg_sizes[svg.msg_index]; int size = game.msg_sizes[game.msg_index];
int realsize = size - svg.msg_leftsize; int realsize = size - game.msg_leftsize;
MsgDev( D_ERROR, "SV_Message: %s expected %i bytes, it written %i\n", name, size, realsize ); MsgDev( D_ERROR, "SV_Message: %s expected %i bytes, it written %i\n", name, size, realsize );
MSG_Clear( &sv.multicast ); MSG_Clear( &sv.multicast );
@ -2068,7 +2076,7 @@ pfnWriteByte
void pfnWriteByte( int iValue ) void pfnWriteByte( int iValue )
{ {
MSG_WriteByte( &sv.multicast, (int)iValue ); MSG_WriteByte( &sv.multicast, (int)iValue );
if( svg.msg_leftsize != 0xFFFF ) svg.msg_leftsize--; if( game.msg_leftsize != 0xFFFF ) game.msg_leftsize--;
} }
/* /*
@ -2080,7 +2088,7 @@ pfnWriteChar
void pfnWriteChar( int iValue ) void pfnWriteChar( int iValue )
{ {
MSG_WriteChar( &sv.multicast, (int)iValue ); MSG_WriteChar( &sv.multicast, (int)iValue );
if( svg.msg_leftsize != 0xFFFF ) svg.msg_leftsize--; if( game.msg_leftsize != 0xFFFF ) game.msg_leftsize--;
} }
/* /*
@ -2092,7 +2100,7 @@ pfnWriteShort
void pfnWriteShort( int iValue ) void pfnWriteShort( int iValue )
{ {
MSG_WriteShort( &sv.multicast, (int)iValue ); MSG_WriteShort( &sv.multicast, (int)iValue );
if( svg.msg_leftsize != 0xFFFF ) svg.msg_leftsize -= 2; if( game.msg_leftsize != 0xFFFF ) game.msg_leftsize -= 2;
} }
/* /*
@ -2104,7 +2112,7 @@ pfnWriteLong
void pfnWriteLong( int iValue ) void pfnWriteLong( int iValue )
{ {
MSG_WriteLong( &sv.multicast, (int)iValue ); MSG_WriteLong( &sv.multicast, (int)iValue );
if( svg.msg_leftsize != 0xFFFF ) svg.msg_leftsize -= 4; if( game.msg_leftsize != 0xFFFF ) game.msg_leftsize -= 4;
} }
/* /*
@ -2116,7 +2124,7 @@ pfnWriteAngle
void pfnWriteAngle( float flValue ) void pfnWriteAngle( float flValue )
{ {
MSG_WriteAngle32( &sv.multicast, flValue ); MSG_WriteAngle32( &sv.multicast, flValue );
if( svg.msg_leftsize != 0xFFFF ) svg.msg_leftsize -= 4; if( game.msg_leftsize != 0xFFFF ) game.msg_leftsize -= 4;
} }
/* /*
@ -2128,7 +2136,7 @@ pfnWriteCoord
void pfnWriteCoord( float flValue ) void pfnWriteCoord( float flValue )
{ {
MSG_WriteCoord32( &sv.multicast, flValue ); MSG_WriteCoord32( &sv.multicast, flValue );
if( svg.msg_leftsize != 0xFFFF ) svg.msg_leftsize -= 4; if( game.msg_leftsize != 0xFFFF ) game.msg_leftsize -= 4;
} }
/* /*
@ -2146,8 +2154,8 @@ void pfnWriteString( const char *sz )
total_size = sv.multicast.cursize - cur_size; total_size = sv.multicast.cursize - cur_size;
// some messages with constant strings can be marked as known sized // some messages with constant strings can be marked as known sized
if( svg.msg_leftsize != 0xFFFF ) if( game.msg_leftsize != 0xFFFF )
svg.msg_leftsize -= total_size; game.msg_leftsize -= total_size;
} }
/* /*
@ -2161,7 +2169,7 @@ void pfnWriteEntity( int iValue )
if( iValue < 0 || iValue > svs.globals->numEntities ) if( iValue < 0 || iValue > svs.globals->numEntities )
Host_Error( "MSG_WriteEntity: invalid entnumber %d\n", iValue ); Host_Error( "MSG_WriteEntity: invalid entnumber %d\n", iValue );
MSG_WriteShort( &sv.multicast, iValue ); MSG_WriteShort( &sv.multicast, iValue );
if( svg.msg_leftsize != 0xFFFF ) svg.msg_leftsize -= 2; if( game.msg_leftsize != 0xFFFF ) game.msg_leftsize -= 2;
} }
/* /*
@ -2247,10 +2255,10 @@ pfnPvAllocEntPrivateData
*/ */
void *pfnPvAllocEntPrivateData( edict_t *pEdict, long cb ) void *pfnPvAllocEntPrivateData( edict_t *pEdict, long cb )
{ {
Msg("Edict: %s alloc %s\n", STRING( pEdict->v.classname ), memprint( cb )); Com_Assert( pEdict == NULL );
// to avoid multiple alloc // to avoid multiple alloc
pEdict->pvServerData = (void *)Mem_Alloc( svs.private, cb ); pEdict->pvServerData = (void *)Mem_Realloc( svs.private, pEdict->pvServerData, cb );
return pEdict->pvServerData; return pEdict->pvServerData;
} }
@ -2263,7 +2271,8 @@ pfnFreeEntPrivateData
*/ */
void pfnFreeEntPrivateData( edict_t *pEdict ) void pfnFreeEntPrivateData( edict_t *pEdict )
{ {
if( pEdict->pvServerData ) Mem_Free( pEdict->pvServerData ); if( pEdict->pvServerData )
Mem_Free( pEdict->pvServerData );
pEdict->pvServerData = NULL; // freed pEdict->pvServerData = NULL; // freed
} }
@ -2271,41 +2280,44 @@ void pfnFreeEntPrivateData( edict_t *pEdict )
============= =============
pfnAllocString pfnAllocString
FIXME: make work
============= =============
*/ */
string_t pfnAllocString( const char *szValue ) string_t pfnAllocString( const char *szValue )
{ {
string_t str; return StringTable_SetString( game.hStringTable, szValue );
}
str = ED_NewString( szValue, svs.stringpool ) - svs.globals->pStringBase; /*
=============
pfnGetString
Msg("AllocString: %s\n", STRING( str )); =============
return str; */
const char *pfnGetString( string_t iString )
{
return StringTable_GetString( game.hStringTable, iString );
} }
/* /*
============= =============
pfnPEntityOfEntOffset pfnPEntityOfEntOffset
FIXME: this is correct ?
============= =============
*/ */
edict_t* pfnPEntityOfEntOffset( int iEntOffset ) edict_t* pfnPEntityOfEntOffset( int iEntOffset )
{ {
return svg.edicts + iEntOffset; return (&((edict_t*)game.vp)[iEntOffset]);
} }
/* /*
============= =============
pfnEntOffsetOfPEntity pfnEntOffsetOfPEntity
FIXME: this is correct ?
============= =============
*/ */
int pfnEntOffsetOfPEntity( const edict_t *pEdict ) int pfnEntOffsetOfPEntity( const edict_t *pEdict )
{ {
return pEdict - svg.edicts; return ((byte *)pEdict - (byte *)game.vp);
} }
/* /*
@ -2316,7 +2328,7 @@ pfnIndexOfEdict
*/ */
int pfnIndexOfEdict( const edict_t *pEdict ) int pfnIndexOfEdict( const edict_t *pEdict )
{ {
return pEdict - svg.edicts; return NUM_FOR_EDICT( pEdict );
} }
/* /*
@ -2327,7 +2339,7 @@ pfnPEntityOfEntIndex
*/ */
edict_t* pfnPEntityOfEntIndex( int iEntIndex ) edict_t* pfnPEntityOfEntIndex( int iEntIndex )
{ {
return svg.edicts + iEntIndex; return EDICT_NUM( iEntIndex );
} }
/* /*
@ -2339,9 +2351,14 @@ slow linear brute force
*/ */
edict_t* pfnFindEntityByVars( entvars_t* pvars ) edict_t* pfnFindEntityByVars( entvars_t* pvars )
{ {
edict_t *e = svg.edicts; edict_t *e = game.edicts;
int i; int i;
Msg("FindEntity by VARS()\n" );
// HACKHACK
if( pvars ) return pvars->pContainingEntity;
for( i = 0; i < svs.globals->numEntities; i++, e++ ) for( i = 0; i < svs.globals->numEntities; i++, e++ )
{ {
if( e->free ) continue; if( e->free ) continue;
@ -2381,8 +2398,8 @@ int pfnRegUserMsg( const char *pszName, int iSize )
msg_index = SV_UserMessageIndex( pszName ); msg_index = SV_UserMessageIndex( pszName );
if( iSize == -1 ) if( iSize == -1 )
svg.msg_sizes[msg_index] = 0xFFFF; game.msg_sizes[msg_index] = 0xFFFF;
else svg.msg_sizes[msg_index] = iSize; else game.msg_sizes[msg_index] = iSize;
return msg_index; return msg_index;
} }
@ -2419,12 +2436,12 @@ dword pfnFunctionFromName( const char *pName )
{ {
int i, index; int i, index;
for( i = 0; i < svg.num_ordinals; i++ ) for( i = 0; i < game.num_ordinals; i++ )
{ {
if( !com.strcmp( pName, svg.names[i] )) if( !com.strcmp( pName, game.names[i] ))
{ {
index = svg.ordinals[i]; index = game.ordinals[i];
return svg.funcs[index] + svg.funcBase; return game.funcs[index] + game.funcBase;
} }
} }
@ -2442,13 +2459,14 @@ const char *pfnNameForFunction( dword function )
{ {
int i, index; int i, index;
for( i = 0; i < svg.num_ordinals; i++ ) for( i = 0; i < game.num_ordinals; i++ )
{ {
index = svg.ordinals[i]; index = game.ordinals[i];
if((function - svg.funcBase) == svg.funcs[index] ) if((function - game.funcBase) == game.funcs[index] )
return svg.names[i]; return game.names[i];
} }
// couldn't find the function address to return name // couldn't find the function address to return name
return NULL; return NULL;
} }
@ -2516,7 +2534,7 @@ changes area portal state
*/ */
void pfnAreaPortal( edict_t *pEdict, bool enable ) void pfnAreaPortal( edict_t *pEdict, bool enable )
{ {
if( pEdict == svg.edicts ) return; if( pEdict == game.edicts ) return;
if( pEdict->free ) if( pEdict->free )
{ {
MsgDev( D_ERROR, "SV_AreaPortal: can't modify free entity\n" ); MsgDev( D_ERROR, "SV_AreaPortal: can't modify free entity\n" );
@ -2939,6 +2957,7 @@ static enginefuncs_t gEngfuncs =
pfnPvAllocEntPrivateData, pfnPvAllocEntPrivateData,
pfnFreeEntPrivateData, pfnFreeEntPrivateData,
pfnAllocString, pfnAllocString,
pfnGetString,
pfnPEntityOfEntOffset, pfnPEntityOfEntOffset,
pfnEntOffsetOfPEntity, pfnEntOffsetOfPEntity,
pfnIndexOfEdict, pfnIndexOfEdict,
@ -2979,7 +2998,8 @@ static enginefuncs_t gEngfuncs =
pfnSetClientKeyValue, pfnSetClientKeyValue,
pfnSetSkybox, pfnSetSkybox,
pfnPlayMusic, pfnPlayMusic,
pfnDropClient pfnDropClient,
Host_Error
}; };
/* /*
@ -3095,14 +3115,11 @@ void SV_LoadFromFile( script_t *entities )
if( !SV_ParseEdict( entities, ent )) if( !SV_ParseEdict( entities, ent ))
continue; continue;
Msg("SpawnEntity: %s\n", STRING( ent->v.classname ));
if( svs.dllFuncs.pfnSpawn( ent ) == -1 ) if( svs.dllFuncs.pfnSpawn( ent ) == -1 )
died++; died++;
else spawned++; else spawned++;
} }
MsgDev( D_INFO, "%i entities inhibited\n", inhibited ); MsgDev( D_INFO, "%i entities inhibited\n", inhibited );
Com_Assert( 1 );
} }
/* /*
@ -3120,8 +3137,8 @@ void SV_SpawnEntities( const char *mapname, script_t *entities )
MsgDev( D_NOTE, "SV_SpawnEntities()\n" ); MsgDev( D_NOTE, "SV_SpawnEntities()\n" );
ent = svg.edicts; ent = EDICT_NUM( 0 );
Mem_Set( &ent->v, 0, sizeof( entvars_t )); SV_InitEdict( ent );
ent->v.model = pfnAllocString( sv.configstrings[CS_MODELS] ); ent->v.model = pfnAllocString( sv.configstrings[CS_MODELS] );
ent->v.modelindex = 1; // world model ent->v.modelindex = 1; // world model
ent->v.solid = SOLID_BSP; ent->v.solid = SOLID_BSP;
@ -3142,14 +3159,15 @@ void SV_SpawnEntities( const char *mapname, script_t *entities )
ent = EDICT_NUM( i + 1 ); ent = EDICT_NUM( i + 1 );
SV_InitEdict( ent ); SV_InitEdict( ent );
ent->pvEngineData->client = svs.clients + i; ent->pvEngineData->client = svs.clients + i;
svs.globals->numClients++;
} }
Msg("Total %i entities spawned\n", svs.globals->numEntities ); Msg("Total %i entities spawned\n", svs.globals->numEntities );
} }
void SV_UnloadProgs( void ) void SV_UnloadProgs( void )
{ {
Sys_FreeNameFuncGlobals(); Sys_FreeNameFuncGlobals();
StringTable_Delete( game.hStringTable );
if( svs.game && svs.game->link ) if( svs.game && svs.game->link )
{ {
@ -3212,13 +3230,15 @@ bool SV_LoadProgs( const char *name )
return false; return false;
} }
// get pointer as really static object // 65535 unique strings should be enough ...
svs.globals->pStringBase = (const char *)GiveFnptrsToDll; game.hStringTable = StringTable_Create( "Game Strings", 0x10000 );
StringTable_SetString( game.hStringTable, "" ); // make NULL string
svs.globals->maxEntities = host.max_edicts; svs.globals->maxEntities = host.max_edicts;
svs.globals->maxClients = Host_MaxClients(); svs.globals->maxClients = Host_MaxClients();
svg.edicts = Mem_Alloc( svs.mempool, sizeof( edict_t ) * svs.globals->maxEntities ); game.edicts = Mem_Alloc( svs.mempool, sizeof( edict_t ) * svs.globals->maxEntities );
svs.globals->numClients = svs.globals->numEntities = 0; svs.globals->numEntities = svs.globals->maxClients + 1; // clients + world
for( i = 0, e = svg.edicts; i < svs.globals->maxEntities; i++, e++ ) svs.globals->numClients = 0;
for( i = 0, e = game.edicts; i < svs.globals->maxEntities; i++, e++ )
e->free = true; // mark all edicts as freed e->free = true; // mark all edicts as freed
// initialize game // initialize game

View File

@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "server.h" #include "server.h"
server_static_t svs; // persistant server info server_static_t svs; // persistant server info
game_static_t svg; // persistant game info game_static_t game; // persistant game info
server_t sv; // local server server_t sv; // local server
/* /*
@ -209,6 +209,8 @@ void SV_SpawnServer( const char *server, const char *savename )
if( sv.loadgame ) SV_ReadLevelFile( savename ); if( sv.loadgame ) SV_ReadLevelFile( savename );
else SV_SpawnEntities( sv.name, pe->GetEntityScript()); else SV_SpawnEntities( sv.name, pe->GetEntityScript());
svs.dllFuncs.pfnServerActivate( game.edicts, svs.globals->numEntities, svs.globals->maxClients );
// run two frames to allow everything to settle // run two frames to allow everything to settle
for( i = 0; i < 2; i++ ) for( i = 0; i < 2; i++ )
{ {

View File

@ -106,11 +106,11 @@ bool SV_movestep( edict_t *ent, vec3_t move, bool relink, bool noenemy, bool set
for( i = 0; i < 2; i++ ) for( i = 0; i < 2; i++ )
{ {
VectorAdd( ent->v.origin, move, neworg ); VectorAdd( ent->v.origin, move, neworg );
if( noenemy ) enemy = svg.edicts; if( noenemy ) enemy = EDICT_NUM( 0 );
else else
{ {
enemy = ent->v.enemy; enemy = ent->v.enemy;
if( i == 0 && enemy != svg.edicts ) if( i == 0 && enemy != EDICT_NUM( 0 ))
{ {
dz = ent->v.origin[2] - ent->v.enemy->v.origin[2]; dz = ent->v.origin[2] - ent->v.enemy->v.origin[2];
if( dz > 40 ) neworg[2] -= 8; if( dz > 40 ) neworg[2] -= 8;
@ -129,7 +129,7 @@ bool SV_movestep( edict_t *ent, vec3_t move, bool relink, bool noenemy, bool set
if( relink ) SV_LinkEdict( ent ); if( relink ) SV_LinkEdict( ent );
return true; return true;
} }
if( enemy == svg.edicts ) break; if( enemy == EDICT_NUM( 0 )) break;
} }
return false; return false;
} }
@ -349,7 +349,7 @@ bool SV_MoveToGoal( edict_t *ent, edict_t *goal, float dist )
} }
// if the next step hits the enemy, return immediately // if the next step hits the enemy, return immediately
if( ent->v.enemy != svg.edicts && SV_CloseEnough( ent, goal, dist )) if( ent->v.enemy != EDICT_NUM( 0 ) && SV_CloseEnough( ent, goal, dist ))
return false; return false;
// bump around... // bump around...

View File

@ -82,7 +82,7 @@ trace_t SV_Trace( const vec3_t start, const vec3_t mins, const vec3_t maxs, cons
pe->ClipToWorld( &cliptrace, sv.worldmodel, clipstart, clipmins, clipmaxs, clipend, contentsmask ); pe->ClipToWorld( &cliptrace, sv.worldmodel, clipstart, clipmins, clipmaxs, clipend, contentsmask );
cliptrace.startstuck = cliptrace.startsolid; cliptrace.startstuck = cliptrace.startsolid;
if( cliptrace.startsolid || cliptrace.fraction < 1 ) if( cliptrace.startsolid || cliptrace.fraction < 1 )
cliptrace.ent = svg.edicts; cliptrace.ent = NULL;
if( type == MOVE_WORLDONLY ) if( type == MOVE_WORLDONLY )
return cliptrace; return cliptrace;
@ -106,12 +106,12 @@ trace_t SV_Trace( const vec3_t start, const vec3_t mins, const vec3_t maxs, cons
clipboxmaxs[i] = max(clipstart[i], cliptrace.endpos[i]) + max(hullmaxs[i], clipmaxs2[i]) + 1; clipboxmaxs[i] = max(clipstart[i], cliptrace.endpos[i]) + max(hullmaxs[i], clipmaxs2[i]) + 1;
} }
// if the passedict is world, make it NULL (to avoid two checks each time)
if( passedict == svg.edicts ) passedict = NULL;
// figure out whether this is a point trace for comparisons // figure out whether this is a point trace for comparisons
pointtrace = VectorCompare(clipmins, clipmaxs); pointtrace = VectorCompare(clipmins, clipmaxs);
// precalculate passedict's owner edict pointer for comparisons // precalculate passedict's owner edict pointer for comparisons
traceowner = passedict ? passedict->v.owner : svg.edicts; if( passedict && passedict->v.owner )
traceowner = passedict->v.owner;
else traceowner = NULL;
// clip to entities // clip to entities
// because this uses SV_AreaEdicts, we know all entity boxes overlap // because this uses SV_AreaEdicts, we know all entity boxes overlap
@ -139,7 +139,7 @@ trace_t SV_Trace( const vec3_t start, const vec3_t mins, const vec3_t maxs, cons
// don't clip owner against owned entities // don't clip owner against owned entities
if( passedict == touch->v.owner ) continue; if( passedict == touch->v.owner ) continue;
// don't clip points against points (they can't collide) // don't clip points against points (they can't collide)
if( pointtrace && VectorCompare( touch->v.mins, touch->v.maxs ) && (type != MOVE_MISSILE || !((int)touch->v.flags & FL_MONSTER))) if( pointtrace && VectorCompare( touch->v.mins, touch->v.maxs ) && (type != MOVE_MISSILE || !(touch->v.flags & FL_MONSTER)))
continue; continue;
} }
@ -147,7 +147,7 @@ trace_t SV_Trace( const vec3_t start, const vec3_t mins, const vec3_t maxs, cons
// might interact, so do an exact clip // might interact, so do an exact clip
model = NULL; model = NULL;
if((int)touch->v.solid == SOLID_BSP || type == MOVE_HITMODEL ) if( touch->v.solid == SOLID_BSP || type == MOVE_HITMODEL )
{ {
uint modelindex = (uint)touch->v.modelindex; uint modelindex = (uint)touch->v.modelindex;
// if the modelindex is 0, it shouldn't be SOLID_BSP! // if the modelindex is 0, it shouldn't be SOLID_BSP!
@ -251,7 +251,7 @@ void SV_CheckAllEnts( void )
edict_t *check; edict_t *check;
// see if any solid entities are inside the final position // see if any solid entities are inside the final position
check = svg.edicts + 1; check = EDICT_NUM( 1 );
for( e = 1; e < svs.globals->numEntities; e++, check++ ) for( e = 1; e < svs.globals->numEntities; e++, check++ )
{ {
if( check->free ) continue; if( check->free ) continue;
@ -478,7 +478,7 @@ int SV_FlyMove( edict_t *ent, float time, float *stepnormal, int contentsmask )
if( !trace.ent ) if( !trace.ent )
{ {
MsgDev( D_WARN, "SV_FlyMove: trace.ent == NULL\n" ); MsgDev( D_WARN, "SV_FlyMove: trace.ent == NULL\n" );
trace.ent = svg.edicts; trace.ent = EDICT_NUM( 0 );
} }
impact = !(ent->v.flags & FL_ONGROUND) || ent->v.groundentity != trace.ent; impact = !(ent->v.flags & FL_ONGROUND) || ent->v.groundentity != trace.ent;
@ -899,7 +899,7 @@ void SV_Physics_Pusher( edict_t *ent )
oldltime = ent->v.ltime; oldltime = ent->v.ltime;
thinktime = ent->v.nextthink; thinktime = ent->v.nextthink;
if( thinktime < ent->v.ltime + sv.frametime) if( thinktime < ent->v.ltime + sv.frametime )
{ {
movetime = thinktime - ent->v.ltime; movetime = thinktime - ent->v.ltime;
if( movetime < 0 ) movetime = 0; if( movetime < 0 ) movetime = 0;
@ -1316,7 +1316,7 @@ void SV_Physics_Toss( edict_t *ent )
// if ent was supported by a brush model on previous frame, // if ent was supported by a brush model on previous frame,
// and groundentity is now freed, set groundentity to 0 (world) // and groundentity is now freed, set groundentity to 0 (world)
// which leaves it suspended in the air // which leaves it suspended in the air
ent->v.groundentity = svg.edicts; ent->v.groundentity = EDICT_NUM( 0 );
return; return;
} }
} }
@ -1368,7 +1368,7 @@ void SV_Physics_Toss( edict_t *ent )
{ {
ent->v.flags |= FL_ONGROUND; ent->v.flags |= FL_ONGROUND;
ent->v.groundentity = trace.ent; ent->v.groundentity = trace.ent;
if( trace.ent->v.solid == SOLID_BSP ) if( trace.ent && trace.ent->v.solid == SOLID_BSP )
ent->pvEngineData->suspended = true; ent->pvEngineData->suspended = true;
VectorClear( ent->v.velocity ); VectorClear( ent->v.velocity );
VectorClear( ent->v.avelocity ); VectorClear( ent->v.avelocity );
@ -1542,7 +1542,7 @@ void SV_Physics_None( edict_t *ent )
static void SV_Physics_Entity( edict_t *ent ) static void SV_Physics_Entity( edict_t *ent )
{ {
switch((int)ent->v.movetype) switch( ent->v.movetype )
{ {
case MOVETYPE_PUSH: case MOVETYPE_PUSH:
SV_Physics_Pusher( ent ); SV_Physics_Pusher( ent );
@ -1763,8 +1763,11 @@ void SV_Physics( void )
} }
// at end of frame kill all entities which supposed to it // at end of frame kill all entities which supposed to it
for( i = svs.globals->maxClients; i < svs.globals->numEntities; i++ ) for( i = svs.globals->maxClients + 1; i < svs.globals->numEntities; i++ )
{ {
ent = EDICT_NUM( i );
if( ent->free ) continue;
if( ent->v.flags & FL_KILLME ) if( ent->v.flags & FL_KILLME )
SV_FreeEdict( EDICT_NUM( i )); SV_FreeEdict( EDICT_NUM( i ));
} }
@ -1772,8 +1775,6 @@ void SV_Physics( void )
svs.globals->time = sv.time; svs.globals->time = sv.time;
// svs.dllFuncs.pfnEndFrame(); // svs.dllFuncs.pfnEndFrame();
Msg("NumEnts %d\n", svs.globals->numEntities - 1 );
// decrement svs.globals->numEntities if the highest number entities died // decrement svs.globals->numEntities if the highest number entities died
for( ; EDICT_NUM( svs.globals->numEntities - 1)->free; svs.globals->numEntities-- ); for( ; EDICT_NUM( svs.globals->numEntities - 1)->free; svs.globals->numEntities-- );

View File

@ -15,9 +15,9 @@ void SV_BeginIncreaseEdicts( void )
edict_t *ent; edict_t *ent;
// links don't survive the transition, so unlink everything // links don't survive the transition, so unlink everything
for( i = 0, ent = svg.edicts; i < svs.globals->maxEntities; i++, ent++ ) for( i = 0, ent = EDICT_NUM( 0 ); i < svs.globals->maxEntities; i++, ent++ )
{ {
if( !ent->free ) SV_UnlinkEdict( svg.edicts + i ); // free old entity if( !ent->free ) SV_UnlinkEdict( EDICT_NUM( i )); // free old entity
Mem_Set( &ent->pvEngineData->clusternums, 0, sizeof( ent->pvEngineData->clusternums )); Mem_Set( &ent->pvEngineData->clusternums, 0, sizeof( ent->pvEngineData->clusternums ));
} }
SV_ClearWorld(); SV_ClearWorld();
@ -28,7 +28,7 @@ void SV_EndIncreaseEdicts(void)
int i; int i;
edict_t *ent; edict_t *ent;
for( i = 0, ent = svg.edicts; i < svs.globals->maxEntities; i++, ent++ ) for( i = 0, ent = EDICT_NUM( 0 ); i < svs.globals->maxEntities; i++, ent++ )
{ {
// link every entity except world // link every entity except world
if( !ent->free ) SV_LinkEdict(ent); if( !ent->free ) SV_LinkEdict(ent);

View File

@ -180,7 +180,7 @@ void SV_ClassifyEdict( edict_t *ent )
const char *classname; const char *classname;
sv_ent = ent->pvEngineData; sv_ent = ent->pvEngineData;
if( sv_ent->s.ed_type != ED_SPAWNED ) if( !sv_ent || sv_ent->s.ed_type != ED_SPAWNED )
return; return;
// null state ? // null state ?
@ -268,7 +268,7 @@ void SV_LinkEdict( edict_t *ent )
sv_ent = ent->pvEngineData; sv_ent = ent->pvEngineData;
if( sv_ent->area.prev ) SV_UnlinkEdict( ent ); // unlink from old position if( sv_ent->area.prev ) SV_UnlinkEdict( ent ); // unlink from old position
if( ent == svg.edicts ) return; // don't add the world if( ent == EDICT_NUM( 0 )) return; // don't add the world
if( ent->free ) return; if( ent->free ) return;
// trying to classify unclassified edicts // trying to classify unclassified edicts

View File

@ -314,7 +314,7 @@ cvar_t *Cvar_Set2 (const char *var_name, const char *value, bool force)
var->modificationCount++; var->modificationCount++;
return var; return var;
} }
if((var->flags & CVAR_CHEAT) && !Cvar_VariableInteger("host_cheats")) if((var->flags & CVAR_CHEAT) && !Cvar_VariableInteger( "sv_cheats" ))
{ {
MsgDev( D_INFO, "%s is cheat protected.\n", var_name ); MsgDev( D_INFO, "%s is cheat protected.\n", var_name );
return var; return var;

View File

@ -12,7 +12,7 @@ Base Entry Point
*/ */
DLLEXPORT int CreateAPI( char *hostname, bool console ) DLLEXPORT int CreateAPI( char *hostname, bool console )
{ {
// memeber name // member name
com_strncpy( Sys.progname, hostname, sizeof(Sys.progname)); com_strncpy( Sys.progname, hostname, sizeof(Sys.progname));
Sys.hooked_out = console; // set mode Sys.hooked_out = console; // set mode

View File

@ -260,7 +260,7 @@ bool StringTable_CheckString( int handle, string_t str )
if(!StringTable_CheckHandle( handle )) if(!StringTable_CheckHandle( handle ))
return false; return false;
if( str < 0 || str > dstring[handle]->numstrings ) if( str < 0 || str >= dstring[handle]->numstrings )
{ {
MsgDev( D_ERROR, "StringTable_CheckString: invalid string index %i\n", str ); MsgDev( D_ERROR, "StringTable_CheckString: invalid string index %i\n", str );
return false; return false;
@ -316,7 +316,7 @@ string_t StringTable_SetString( int handle, const char *string )
for( i = 0; i < dstring[handle]->numstrings; i++ ) for( i = 0; i < dstring[handle]->numstrings; i++ )
{ {
if(!com.stricmp( string, StringTable_GetString( handle, i ))) if(!com.strcmp( string, StringTable_GetString( handle, i )))
return i; // already existing return i; // already existing
} }

View File

@ -40,9 +40,9 @@ enum
// NOTE: engine trace struct not matched with svgame trace // NOTE: engine trace struct not matched with svgame trace
typedef struct typedef struct
{ {
bool fAllSolid; // if true, plane is not valid BOOL fAllSolid; // if true, plane is not valid
bool fStartSolid; // if true, the initial point was in a solid area BOOL fStartSolid; // if true, the initial point was in a solid area
bool fStartStuck; // if true, trace started from solid entity BOOL fStartStuck; // if true, trace started from solid entity
float flFraction; // time completed, 1.0 = didn't hit anything float flFraction; // time completed, 1.0 = didn't hit anything
vec3_t vecEndPos; // final position vec3_t vecEndPos; // final position
int iStartContents; // start pos conetnts int iStartContents; // start pos conetnts
@ -124,6 +124,7 @@ typedef struct enginefuncs_s
void* (*pfnPvAllocEntPrivateData)( edict_t *pEdict, long cb ); void* (*pfnPvAllocEntPrivateData)( edict_t *pEdict, long cb );
void (*pfnFreeEntPrivateData)( edict_t *pEdict ); void (*pfnFreeEntPrivateData)( edict_t *pEdict );
string_t (*pfnAllocString)( const char *szValue ); string_t (*pfnAllocString)( const char *szValue );
const char *(*pfnGetString)( string_t iString );
edict_t* (*pfnPEntityOfEntOffset)( int iEntOffset ); edict_t* (*pfnPEntityOfEntOffset)( int iEntOffset );
int (*pfnEntOffsetOfPEntity)( const edict_t *pEdict ); int (*pfnEntOffsetOfPEntity)( const edict_t *pEdict );
int (*pfnIndexOfEdict)( const edict_t *pEdict ); int (*pfnIndexOfEdict)( const edict_t *pEdict );
@ -137,7 +138,7 @@ typedef struct enginefuncs_s
const char *(*pfnNameForFunction)( dword function ); const char *(*pfnNameForFunction)( dword function );
void (*pfnClientPrintf)( edict_t* pEdict, int ptype, const char *szMsg ); void (*pfnClientPrintf)( edict_t* pEdict, int ptype, const char *szMsg );
void (*pfnServerPrint)( const char *szMsg ); void (*pfnServerPrint)( const char *szMsg );
void (*pfnAreaPortal)( edict_t *pEdict, bool enable ); void (*pfnAreaPortal)( edict_t *pEdict, BOOL enable );
const char *(*pfnCmd_Args)( void ); const char *(*pfnCmd_Args)( void );
const char *(*pfnCmd_Argv)( int argc ); const char *(*pfnCmd_Argv)( int argc );
int (*pfnCmd_Argc)( void ); int (*pfnCmd_Argc)( void );
@ -167,6 +168,7 @@ typedef struct enginefuncs_s
void (*pfnSetSkybox)( const char *name ); void (*pfnSetSkybox)( const char *name );
void (*pfnPlayMusic)( const char *trackname, int flags ); // background track void (*pfnPlayMusic)( const char *trackname, int flags ); // background track
void (*pfnDropClient)( int clientIndex ); // used for kick cheaters from server void (*pfnDropClient)( int clientIndex ); // used for kick cheaters from server
void (*pfnHostError)( const char *szFmt, ... ); // invoke host error
} enginefuncs_t; } enginefuncs_t;
// passed to pfnKeyValue // passed to pfnKeyValue

View File

@ -16,9 +16,9 @@ typedef struct globalvars_s
string_t startspot; string_t startspot;
vec3_t spotOffset; // landmark offset vec3_t spotOffset; // landmark offset
bool deathmatch; BOOL deathmatch;
bool coop; BOOL coop;
bool teamplay; BOOL teamplay;
int serverflags; int serverflags;
int maxClients; int maxClients;
@ -30,9 +30,9 @@ typedef struct globalvars_s
vec3_t v_right; vec3_t v_right;
vec3_t v_up; vec3_t v_up;
bool trace_allsolid; BOOL trace_allsolid;
bool trace_startsolid; BOOL trace_startsolid;
bool trace_startstuck; BOOL trace_startstuck;
float trace_fraction; float trace_fraction;
vec3_t trace_endpos; vec3_t trace_endpos;
vec3_t trace_plane_normal; vec3_t trace_plane_normal;
@ -48,7 +48,6 @@ typedef struct globalvars_s
int total_monsters; int total_monsters;
int killed_monsters; // number of monsters killed int killed_monsters; // number of monsters killed
const char *pStringBase; // stringtable base offset
void *pSaveData; // savedata base offset void *pSaveData; // savedata base offset
} globalvars_t; } globalvars_t;
@ -190,7 +189,7 @@ typedef struct entvars_s
struct edict_s struct edict_s
{ {
bool free; BOOL free;
float freetime; // sv.time when the object was freed float freetime; // sv.time when the object was freed
int serialnumber; int serialnumber;

View File

@ -6,6 +6,89 @@
--------------------Configuration: server - Win32 Debug-------------------- --------------------Configuration: server - Win32 Debug--------------------
</h3> </h3>
<h3>Command Lines</h3> <h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ÀÄÌÈÍÈ~1.9CC\LOCALS~1\Temp\RSP3B0.tmp" with contents
[
/nologo /MDd /W3 /Gm /Gi /GX /ZI /Od /I "./" /I "./ents" /I "./game" /I "./global" /I "./monsters" /I "../public" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"..\temp\server\!debug/" /Fo"..\temp\server\!debug/" /Fd"..\temp\server\!debug/" /FD /c
"D:\Xash3D\src_main\sv_dll\global\client.cpp"
]
Creating command line "cl.exe @"C:\DOCUME~1\ÀÄÌÈÍÈ~1.9CC\LOCALS~1\Temp\RSP3B0.tmp""
Creating temporary file "C:\DOCUME~1\ÀÄÌÈÍÈ~1.9CC\LOCALS~1\Temp\RSP3B1.tmp" with contents
[
msvcrtd.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"..\temp\server\!debug/server.pdb" /debug /machine:I386 /nodefaultlib:"libc.lib" /def:".\server.def" /out:"..\temp\server\!debug/server.dll" /implib:"..\temp\server\!debug/server.lib" /pdbtype:sept
"\Xash3D\src_main\temp\server\!debug\ai_sound.obj"
"\Xash3D\src_main\temp\server\!debug\animating.obj"
"\Xash3D\src_main\temp\server\!debug\animation.obj"
"\Xash3D\src_main\temp\server\!debug\apache.obj"
"\Xash3D\src_main\temp\server\!debug\barnacle.obj"
"\Xash3D\src_main\temp\server\!debug\barney.obj"
"\Xash3D\src_main\temp\server\!debug\basebrush.obj"
"\Xash3D\src_main\temp\server\!debug\baseentity.obj"
"\Xash3D\src_main\temp\server\!debug\basefunc.obj"
"\Xash3D\src_main\temp\server\!debug\basefx.obj"
"\Xash3D\src_main\temp\server\!debug\baseinfo.obj"
"\Xash3D\src_main\temp\server\!debug\baseitem.obj"
"\Xash3D\src_main\temp\server\!debug\baselogic.obj"
"\Xash3D\src_main\temp\server\!debug\basemonster.obj"
"\Xash3D\src_main\temp\server\!debug\basemover.obj"
"\Xash3D\src_main\temp\server\!debug\baseother.obj"
"\Xash3D\src_main\temp\server\!debug\basepath.obj"
"\Xash3D\src_main\temp\server\!debug\baserockets.obj"
"\Xash3D\src_main\temp\server\!debug\basetank.obj"
"\Xash3D\src_main\temp\server\!debug\basetrigger.obj"
"\Xash3D\src_main\temp\server\!debug\baseutil.obj"
"\Xash3D\src_main\temp\server\!debug\baseweapon.obj"
"\Xash3D\src_main\temp\server\!debug\baseworld.obj"
"\Xash3D\src_main\temp\server\!debug\client.obj"
"\Xash3D\src_main\temp\server\!debug\combat.obj"
"\Xash3D\src_main\temp\server\!debug\decals.obj"
"\Xash3D\src_main\temp\server\!debug\defaultai.obj"
"\Xash3D\src_main\temp\server\!debug\dll_int.obj"
"\Xash3D\src_main\temp\server\!debug\flyingmonster.obj"
"\Xash3D\src_main\temp\server\!debug\game.obj"
"\Xash3D\src_main\temp\server\!debug\gamerules.obj"
"\Xash3D\src_main\temp\server\!debug\generic.obj"
"\Xash3D\src_main\temp\server\!debug\globals.obj"
"\Xash3D\src_main\temp\server\!debug\gman.obj"
"\Xash3D\src_main\temp\server\!debug\hassassin.obj"
"\Xash3D\src_main\temp\server\!debug\headcrab.obj"
"\Xash3D\src_main\temp\server\!debug\hgrunt.obj"
"\Xash3D\src_main\temp\server\!debug\leech.obj"
"\Xash3D\src_main\temp\server\!debug\legacy.obj"
"\Xash3D\src_main\temp\server\!debug\lights.obj"
"\Xash3D\src_main\temp\server\!debug\multiplay_gamerules.obj"
"\Xash3D\src_main\temp\server\!debug\nodes.obj"
"\Xash3D\src_main\temp\server\!debug\osprey.obj"
"\Xash3D\src_main\temp\server\!debug\parent.obj"
"\Xash3D\src_main\temp\server\!debug\player.obj"
"\Xash3D\src_main\temp\server\!debug\rat.obj"
"\Xash3D\src_main\temp\server\!debug\roach.obj"
"\Xash3D\src_main\temp\server\!debug\saverestore.obj"
"\Xash3D\src_main\temp\server\!debug\scientist.obj"
"\Xash3D\src_main\temp\server\!debug\scripted.obj"
"\Xash3D\src_main\temp\server\!debug\sfx.obj"
"\Xash3D\src_main\temp\server\!debug\singleplay_gamerules.obj"
"\Xash3D\src_main\temp\server\!debug\sound.obj"
"\Xash3D\src_main\temp\server\!debug\squadmonster.obj"
"\Xash3D\src_main\temp\server\!debug\talkmonster.obj"
"\Xash3D\src_main\temp\server\!debug\teamplay_gamerules.obj"
"\Xash3D\src_main\temp\server\!debug\turret.obj"
"\Xash3D\src_main\temp\server\!debug\utils.obj"
"\Xash3D\src_main\temp\server\!debug\weapon_generic.obj"
"\Xash3D\src_main\temp\server\!debug\zombie.obj"
]
Creating command line "link.exe @"C:\DOCUME~1\ÀÄÌÈÍÈ~1.9CC\LOCALS~1\Temp\RSP3B1.tmp""
Creating temporary file "C:\DOCUME~1\ÀÄÌÈÍÈ~1.9CC\LOCALS~1\Temp\RSP3B2.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\server\!debug\server.dll "D:\Xash3D\tmpQuArK\bin\server.dll"
]
Creating command line ""C:\DOCUME~1\ÀÄÌÈÍÈ~1.9CC\LOCALS~1\Temp\RSP3B2.bat""
Compiling...
client.cpp
Linking...
<h3>Output Window</h3>
Performing Custom Build Step on \Xash3D\src_main\temp\server\!debug\server.dll
‘ª®¯¨à®¢ ­® ä ©«®¢: 1.

View File

@ -18,7 +18,9 @@ fopen
Beta 13.12.08 Beta 13.12.08
0. َُليً<D98A><D98B>وْ<D988> sv_dll ي َُِميْ<D98A> 0. َُليً<D98A><D98B>وْ<D988> sv_dll ي َُِميْ<D98A> OK
1. قيً<D98A><D98B>وْ<D988> Think OK
2. rename bool to BOOL
entity_state_t невидима для пользователя entity_state_t невидима для пользователя