19 Dec 2008

This commit is contained in:
g-cont 2008-12-19 00:00:00 +03:00 committed by Alibek Omarov
parent a118bbeb91
commit 7f4f351ea2
4 changed files with 21 additions and 116 deletions

View File

@ -107,7 +107,7 @@ static net_field_t cmd_fields[] =
{ CM_FIELD(forwardmove), NET_SHORT, false },
{ CM_FIELD(sidemove), NET_SHORT, false },
{ CM_FIELD(upmove), NET_SHORT, false },
{ CM_FIELD(buttons), NET_BYTE, false },
{ CM_FIELD(buttons), NET_SHORT, false },
{ CM_FIELD(impulse), NET_BYTE, false },
{ CM_FIELD(lightlevel), NET_BYTE, false },
{ NULL },

View File

@ -1316,7 +1316,7 @@ int pfnGetEntityIllum( edict_t* pEnt )
MsgDev( D_WARN, "SV_GetEntityIllum: can't get light level at free entity\n" );
return 0;
}
return 255; //FIXME: implement
return 255; // FIXME: implement
}
/*
@ -1328,13 +1328,12 @@ return NULL instead of world
*/
edict_t* pfnFindEntityInSphere( edict_t *pStartEdict, const float *org, float rad )
{
edict_t *ent, *chain;
edict_t *ent;
float radSquare;
vec3_t eorg;
int e = 0;
radSquare = rad * rad;
chain = pStartEdict;
if( pStartEdict )
e = NUM_FOR_EDICT( pStartEdict );
@ -1342,19 +1341,14 @@ edict_t* pfnFindEntityInSphere( edict_t *pStartEdict, const float *org, float ra
{
ent = EDICT_NUM( e );
if( ent->free ) continue;
if( ent->v.solid == SOLID_NOT ) continue;
VectorSubtract( org, ent->v.origin, eorg );
VectorMAMAM( 1, eorg, 0.5f, ent->v.mins, 0.5f, ent->v.maxs, eorg );
if(DotProduct( eorg, eorg ) < radSquare )
{
ent->v.chain = chain;
chain = ent;
}
if( DotProduct( eorg, eorg ) < radSquare )
return ent;
}
return chain; // fisrt chain
return NULL; // fisrt chain
}
/*
@ -1366,24 +1360,20 @@ return NULL instead of world
*/
edict_t* pfnFindClientInPVS( edict_t *pEdict )
{
edict_t *pClient, *chain;
int i, numents;
edict_t *pClient;
int i;
chain = NULL;
numents = svs.globals->maxClients;
for( i = 1; i < numents; i++ )
for( i = 1; i < svs.globals->maxClients; i++ )
{
pClient = game.edicts + i;
if( pClient->free ) continue;
if( SV_EntitiesIn( DVIS_PVS, pEdict->v.origin, pClient->v.origin ))
{
Msg( "found client %d\n", pClient->serialnumber );
pEdict->v.chain = chain;
chain = pEdict;
return pEdict;
}
}
return chain; // fisrt entry
return NULL;
}
/*
@ -1395,24 +1385,20 @@ return NULL instead of world
*/
edict_t* pfnFindClientInPHS( edict_t *pEdict )
{
edict_t *pClient, *chain;
int i, numents;
edict_t *pClient;
int i;
chain = NULL;
numents = svs.globals->maxClients;
for( i = 1; i < numents; i++ )
for( i = 1; i < svs.globals->maxClients; i++ )
{
pClient = game.edicts + i;
if( pClient->free ) continue;
if( SV_EntitiesIn( DVIS_PHS, pClient->v.origin, pEdict->v.origin ))
if( SV_EntitiesIn( DVIS_PHS, pEdict->v.origin, pClient->v.origin ))
{
Msg( "found client %d\n", pClient->serialnumber );
pClient->v.chain = chain;
chain = pClient;
return pEdict;
}
}
return chain; // fisrt entry
return NULL;
}
/*

View File

@ -10,6 +10,8 @@
#pragma warning(disable : 4018) // signed/unsigned mismatch
#pragma warning(disable : 4305) // truncation from const double to float
#define false 0
#define true 1
#define STRING_COLOR_TAG '^'
#define MAX_STRING 256 // generic string
#define MAX_SYSPATH 1024 // system filepath
@ -18,11 +20,11 @@
#define bound(min, num, max) ((num) >= (min) ? ((num) < (max) ? (num) : (max)) : (min))
#define DLLEXPORT __declspec( dllexport )
// generic engine types
#ifndef __cplusplus
typedef enum { false, true } bool;
#define bool BOOL // sizeof( int )
#endif
// generic engine types
typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned long dword;

View File

@ -6,89 +6,6 @@
--------------------Configuration: server - Win32 Debug--------------------
</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.