18 Apr 2010

This commit is contained in:
g-cont 2010-04-18 00:00:00 +04:00 committed by Alibek Omarov
parent 90d0b59baf
commit c24d48d3fe
39 changed files with 413 additions and 992 deletions

View File

@ -1,16 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: baserc - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
baserc.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -1,16 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: bshift - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
server.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -875,7 +875,6 @@ void CLightning::BeamUpdateVars( void )
pev->skin = 0;
pev->sequence = 0;
pev->rendermode = 0;
pev->flags |= FL_CUSTOMENTITY;
pev->model = m_iszSpriteName;
SetTexture( m_spriteTexture );
@ -949,7 +948,6 @@ void CLaser::Spawn( void )
Precache( );
SetThink( StrikeThink );
pev->flags |= FL_CUSTOMENTITY;
PointsInit( pev->origin, pev->origin );

View File

@ -48,7 +48,8 @@ public:
BOOL Deploy( void );
void Reload( void );
void WeaponIdle( void );
int m_iShell;
private:
unsigned short m_usFireGlock;
};
LINK_ENTITY_TO_CLASS( weapon_glock, CGlock );
LINK_ENTITY_TO_CLASS( weapon_9mmhandgun, CGlock );
@ -73,7 +74,7 @@ void CGlock::Precache( void )
PRECACHE_MODEL("models/w_9mmhandgun.mdl");
PRECACHE_MODEL("models/p_9mmhandgun.mdl");
m_iShell = PRECACHE_MODEL ("models/shell.mdl");// brass shell
int m_iShell = PRECACHE_MODEL ("models/shell.mdl");// brass shell
PRECACHE_SOUND("items/9mmclip1.wav");
PRECACHE_SOUND("items/9mmclip2.wav");
@ -81,6 +82,8 @@ void CGlock::Precache( void )
PRECACHE_SOUND ("weapons/pl_gun1.wav");//silenced handgun
PRECACHE_SOUND ("weapons/pl_gun2.wav");//silenced handgun
PRECACHE_SOUND ("weapons/pl_gun3.wav");//handgun
m_usFireGlock = PRECACHE_EVENT( 1, "evGlock1" );
}
int CGlock::GetItemInfo(ItemInfo *p)
@ -141,36 +144,17 @@ void CGlock::GlockFire( float flSpread , float flCycleTime, BOOL fUseAutoAim )
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
UTIL_MakeVectors( m_pPlayer->pev->viewangles + m_pPlayer->pev->punchangle );
Vector vecShellVelocity = m_pPlayer->pev->velocity
+ gpGlobals->v_right * RANDOM_FLOAT(50,70)
+ gpGlobals->v_up * RANDOM_FLOAT(100,150)
+ gpGlobals->v_forward * 25;
EjectBrass ( pev->origin + m_pPlayer->pev->view_ofs + gpGlobals->v_up * -12 + gpGlobals->v_forward * 32 + gpGlobals->v_right * 6 , vecShellVelocity, pev->angles.y, m_iShell, TE_BOUNCE_SHELL );
// silenced
if (pev->body == 1)
{
m_pPlayer->m_iWeaponVolume = QUIET_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
switch(RANDOM_LONG(0,1))
{
case 0:
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/pl_gun1.wav", RANDOM_FLOAT(0.9, 1.0), ATTN_NORM);
break;
case 1:
EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/pl_gun2.wav", RANDOM_FLOAT(0.9, 1.0), ATTN_NORM);
break;
}
}
else
{
// non-silenced
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;
EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/pl_gun3.wav", RANDOM_FLOAT(0.92, 1.0), ATTN_NORM, 0, 98 + RANDOM_LONG(0,3));
}
Vector vecSrc = m_pPlayer->GetGunPosition( );
@ -185,7 +169,13 @@ void CGlock::GlockFire( float flSpread , float flCycleTime, BOOL fUseAutoAim )
vecAiming = gpGlobals->v_forward;
}
m_pPlayer->FireBullets( 1, vecSrc, vecAiming, Vector( flSpread, flSpread, flSpread ), 8192, BULLET_PLAYER_9MM, 0 );
Vector vecDir;
vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, Vector( flSpread, flSpread, flSpread ), 8192, BULLET_PLAYER_9MM, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed );
int iAnim = ( m_iClip == 0 ) ? GLOCK_SHOOT_EMPTY : GLOCK_SHOOT;
PLAYBACK_EVENT_FULL( 0, m_pPlayer->edict(), m_usFireGlock, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, pev->body, iAnim, 0, pev->body );
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
@ -193,8 +183,6 @@ void CGlock::GlockFire( float flSpread , float flCycleTime, BOOL fUseAutoAim )
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT ( 10, 15 );
m_pPlayer->pev->punchangle.x -= 2;
}

View File

@ -421,6 +421,8 @@ public:
void Holster( int skiplocal = 0 );
void WeaponIdle( void );
int m_fJustThrown;
private:
unsigned short m_usSnarkFire;
};
LINK_ENTITY_TO_CLASS( weapon_snark, CSqueak );
@ -449,6 +451,8 @@ void CSqueak::Precache( void )
PRECACHE_SOUND("squeek/sqk_hunt2.wav");
PRECACHE_SOUND("squeek/sqk_hunt3.wav");
UTIL_PrecacheOther("monster_snark");
m_usSnarkFire = PRECACHE_EVENT ( 1, "evSnarkFire" );
}
@ -522,11 +526,10 @@ void CSqueak::PrimaryAttack()
// find place to toss monster
UTIL_TraceLine( trace_origin + gpGlobals->v_forward * 20, trace_origin + gpGlobals->v_forward * 64, dont_ignore_monsters, NULL, &tr );
PLAYBACK_EVENT_FULL( 0, m_pPlayer->edict(), m_usSnarkFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, pev->body, 0, 0, 0 );
if (tr.fAllSolid == 0 && tr.fStartSolid == 0 && tr.flFraction > 0.25)
{
SendWeaponAnim( SQUEAK_THROW );
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );

View File

@ -1,16 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: client - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
client.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -672,7 +672,6 @@ void EV_FireGlock1( event_args_t *args )
Vector origin = args->origin;
Vector angles = args->angles;
Vector velocity = args->velocity;
int empty;
Vector ShellVelocity;
Vector ShellOrigin;
@ -682,7 +681,6 @@ void EV_FireGlock1( event_args_t *args )
idx = args->entindex;
empty = args->bparam1;
AngleVectors( angles, forward, right, up );
shell = g_engfuncs.pEventAPI->EV_FindModelIndex ( "models/shell.mdl" ); // brass shell
@ -690,7 +688,7 @@ void EV_FireGlock1( event_args_t *args )
if ( EV_IsLocal( idx ) )
{
edict_t *view = GetViewModel();
g_engfuncs.pEventAPI->EV_WeaponAnim( empty ? GLOCK_SHOOT_EMPTY : GLOCK_SHOOT, args->iparam1, 1.0f );
g_engfuncs.pEventAPI->EV_WeaponAnim( args->iparam2, args->iparam1, 1.0f );
EV_MuzzleFlash();
@ -1641,7 +1639,7 @@ void EV_SnarkFire( event_args_t *args )
vecSrc = vecSrc - ( VEC_HULL_MIN - VEC_DUCK_HULL_MIN );
// store off the old count
UTIL_TraceLine( vecSrc + forward * 20, vecSrc + forward * 64, dont_ignore_monsters, GetEntityByIndex( idx ), &tr );
UTIL_TraceLine( vecSrc + forward * 20, vecSrc + forward * 64, dont_ignore_monsters, NULL, &tr );
// find space to drop the thing.
if ( tr.fAllSolid == 0 && tr.fStartSolid == 0 && tr.flFraction > 0.25f )

View File

@ -2221,11 +2221,11 @@ void DrawRing( int noise_divisions, float *prgNoise, void (*pfnNoise)( float *no
point[2] = xaxis[2] * x + yaxis[2] * y + center[2];
// Distort using noise
factor = prgNoise[(noiseIndex>>16) & 0x7F] * scale;
factor = prgNoise[(noiseIndex>>16) & NOISE_MASK] * scale;
point = point + (gpViewParams->up * factor);
// Rotate the noise along the perpendicluar axis a bit to keep the bolt from looking diagonal
factor = prgNoise[(noiseIndex>>16) & 0x7F] * scale * cos(fraction * M_PI * 3 * 8 + freq);
factor = prgNoise[(noiseIndex>>16) & NOISE_MASK] * scale * cos(fraction * M_PI * 3 * 8 + freq);
point = point + (gpViewParams->right * factor);
// Transform point into screen space

View File

@ -9,7 +9,8 @@
#include "beam_def.h"
#include "te_shared.h"
#define NOISE_DIVISIONS 128
#define NOISE_DIVISIONS 64 // don't touch - many tripmines cause the crash when it equal 128
#define NOISE_MASK (NOISE_DIVISIONS-1)
#define MAX_BEAM_ENTS 2 // start & end entity
#define MAX_BEAMS 128 // Max simultaneous beams
#define MAX_BEAMTRAILS 2048 // default max # of particles at one time

View File

@ -84,7 +84,7 @@ typedef struct
// shared modelinfo
modtype_t type; // model type
vec3_t mins, maxs; // model boundbox
vec3_t mins, maxs; // bounding box at angles '0 0 0'
byte *extradata; // studiomodels extradata
void *submodels; // animations ptr
int numframes; // sprite framecount

View File

@ -358,7 +358,7 @@ void CM_ModelFrames( model_t handle, int *numFrames );
modtype_t CM_ModelType( model_t handle );
cmodel_t *CM_ClipHandleToModel( model_t handle );
model_t CM_TempBoxModel( const vec3_t mins, const vec3_t maxs, bool capsule );
void CM_BeginRegistration ( const char *name, bool clientload, uint *checksum );
void CM_BeginRegistration( const char *name, bool clientload, uint *checksum );
bool CM_RegisterModel( const char *name, int sv_index );
void *CM_Extradata( model_t handle );
void CM_EndRegistration ( void );

View File

@ -122,9 +122,9 @@
#define FL_DUCKING (1<<14) // monster (or player) is ducked
#define FL_FLOAT (1<<15) // Apply floating force to this entity when in water
#define FL_GRAPHED (1<<16) // worldgraph has this ent listed as something that blocks a connection
#define FL_PROJECTILE (1<<17) // this is rocket entity (was FL_IMMUNE_WATER)
#define FL_TANK (1<<18) // this is func tank entity (was FL_IMMUNE_SLIME)
#define FL_POINTENTITY (1<<19) // this is point entity (was FL_IMMUNE_LAVA)
#define FL_IMMUNE_WATER (1<<17) // not used
#define FL_IMMUNE_SLIME (1<<18) // not used
#define FL_IMMUNE_LAVA (1<<19) // not used
#define FL_PROXY (1<<20) // This is a spectator proxy
#define FL_ALWAYSTHINK (1<<21) // Brush model flag -- call think every frame regardless of nextthink - ltime (for constantly changing velocity/path)
#define FL_BASEVELOCITY (1<<22) // Base velocity has been applied this frame (used to convert base velocity into momentum)
@ -133,7 +133,8 @@
#define FL_WORLDBRUSH (1<<25) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
#define FL_SPECTATOR (1<<26) // This client is a spectator, don't run touch functions, etc.
#define FL_PHS_FILTER (1<<27) // This entity requested phs bitvector in AddToFullPack calls
#define FL_CUSTOMENTITY (1<<29) // This is a custom entity
#define FL_PROJECTILE (1<<28) // This is a projectile entity
#define FL_TEAMSLAVE (1<<29) // Not first on the team ( engine 'moves with' spec)
#define FL_KILLME (1<<30) // This entity is marked for death -- This allows the engine to kill ents at the appropriate time
#define FL_DORMANT (1<<31) // Entity is dormant, no updates to client
@ -141,6 +142,7 @@
#define SF_START_ON (1<<0)
// classic quake flags (must be not collide with any dll spawnflags - engine uses this)
// please include string "allow_inhibited_entities" into your gameinfo.txt if you want to enable this feature
#define SF_NOT_EASY (1<<8)
#define SF_NOT_MEDIUM (1<<9)
#define SF_NOT_HARD (1<<10)
@ -236,8 +238,8 @@ typedef enum
typedef enum
{
MOVETYPE_NONE = 0, // never moves
MOVETYPE_CONVEYOR, // simulate conveyor belt, push all stuff
MOVETYPE_STOP, // toggled between PUSHSTEP and STOP
MOVETYPE_CONVEYOR, // Xash3D: simulate conveyor belt, push all stuff
MOVETYPE_COMPOUND, // Xash3D: compound two entities
MOVETYPE_WALK, // Player only - moving on the ground
MOVETYPE_STEP, // gravity, special edge handling
MOVETYPE_FLY, // No gravity, but still collides with stuff
@ -247,7 +249,7 @@ typedef enum
MOVETYPE_FLYMISSILE,// extra size to monsters
MOVETYPE_BOUNCE, // Just like Toss, but reflect velocity when contacting surfaces
MOVETYPE_BOUNCEMISSILE,// bounce w/o gravity
MOVETYPE_FOLLOW, // attached models
MOVETYPE_FOLLOW, // studio attached models
MOVETYPE_PUSHSTEP, // BSP model that needs physics/world collisions
MOVETYPE_PHYSIC, // phys simulation
} movetype_t;

View File

@ -2022,15 +2022,7 @@ pfnGetModBounds
*/
void pfnGetModBounds( model_t modelIndex, float *mins, float *maxs )
{
if( pe )
{
pe->Mod_GetBounds( modelIndex, mins, maxs );
}
else
{
if( mins ) VectorClear( mins );
if( maxs ) VectorClear( maxs );
}
Mod_GetBounds( modelIndex, mins, maxs );
}
/*

View File

@ -32,7 +32,11 @@ _inline void CM_BeginRegistration( const char *name, bool clientload, uint *chec
_inline void Mod_GetBounds( model_t handle, vec3_t mins, vec3_t maxs )
{
if( pe ) pe->Mod_GetBounds( handle, mins, maxs );
else mins[0] = mins[1] = mins[2] = maxs[0] = maxs[1] = maxs[2] = 0.0f;
else
{
if( mins ) mins[0] = mins[1] = mins[2] = 0.0f;
if( maxs ) maxs[0] = maxs[1] = maxs[2] = 0.0f;
}
}
_inline void Mod_GetFrames( model_t handle, int *numFrames )

View File

@ -1,102 +0,0 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: engine - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP26FF.tmp" with contents
[
/nologo /MD /W3 /GX /O2 /I "./" /I "common" /I "server" /I "client" /I "uimenu" /I "../public" /I "../common" /I "../game_shared" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fo"..\temp\engine\!release/" /Fd"..\temp\engine\!release/" /FD /c
"D:\Xash3D\src_main\engine\server\sv_game.c"
]
Creating command line "cl.exe @"C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP26FF.tmp""
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2700.tmp" with contents
[
user32.lib msvcrt.lib /nologo /subsystem:windows /dll /pdb:none /machine:I386 /nodefaultlib:"libc.lib" /out:"..\temp\engine\!release/engine.dll" /implib:"..\temp\engine\!release/engine.lib" /opt:nowin98
"\Xash3D\src_main\temp\engine\!release\build.obj"
"\Xash3D\src_main\temp\engine\!release\cinematic.obj"
"\Xash3D\src_main\temp\engine\!release\cl_cmds.obj"
"\Xash3D\src_main\temp\engine\!release\cl_demo.obj"
"\Xash3D\src_main\temp\engine\!release\cl_effects.obj"
"\Xash3D\src_main\temp\engine\!release\cl_frame.obj"
"\Xash3D\src_main\temp\engine\!release\cl_game.obj"
"\Xash3D\src_main\temp\engine\!release\cl_main.obj"
"\Xash3D\src_main\temp\engine\!release\cl_move.obj"
"\Xash3D\src_main\temp\engine\!release\cl_parse.obj"
"\Xash3D\src_main\temp\engine\!release\cl_phys.obj"
"\Xash3D\src_main\temp\engine\!release\cl_scrn.obj"
"\Xash3D\src_main\temp\engine\!release\cl_tent.obj"
"\Xash3D\src_main\temp\engine\!release\cl_video.obj"
"\Xash3D\src_main\temp\engine\!release\cl_view.obj"
"\Xash3D\src_main\temp\engine\!release\cl_world.obj"
"\Xash3D\src_main\temp\engine\!release\com_keys.obj"
"\Xash3D\src_main\temp\engine\!release\com_world.obj"
"\Xash3D\src_main\temp\engine\!release\con_main.obj"
"\Xash3D\src_main\temp\engine\!release\con_utils.obj"
"\Xash3D\src_main\temp\engine\!release\engfuncs.obj"
"\Xash3D\src_main\temp\engine\!release\host.obj"
"\Xash3D\src_main\temp\engine\!release\infostring.obj"
"\Xash3D\src_main\temp\engine\!release\input.obj"
"\Xash3D\src_main\temp\engine\!release\net_chan.obj"
"\Xash3D\src_main\temp\engine\!release\net_huff.obj"
"\Xash3D\src_main\temp\engine\!release\net_msg.obj"
"\Xash3D\src_main\temp\engine\!release\sv_client.obj"
"\Xash3D\src_main\temp\engine\!release\sv_cmds.obj"
"\Xash3D\src_main\temp\engine\!release\sv_frame.obj"
"\Xash3D\src_main\temp\engine\!release\sv_game.obj"
"\Xash3D\src_main\temp\engine\!release\sv_init.obj"
"\Xash3D\src_main\temp\engine\!release\sv_main.obj"
"\Xash3D\src_main\temp\engine\!release\sv_move.obj"
"\Xash3D\src_main\temp\engine\!release\sv_phys.obj"
"\Xash3D\src_main\temp\engine\!release\sv_save.obj"
"\Xash3D\src_main\temp\engine\!release\sv_world.obj"
"\Xash3D\src_main\temp\engine\!release\titles.obj"
"\Xash3D\src_main\temp\engine\!release\ui_advcontrols.obj"
"\Xash3D\src_main\temp\engine\!release\ui_audio.obj"
"\Xash3D\src_main\temp\engine\!release\ui_configuration.obj"
"\Xash3D\src_main\temp\engine\!release\ui_controls.obj"
"\Xash3D\src_main\temp\engine\!release\ui_creategame.obj"
"\Xash3D\src_main\temp\engine\!release\ui_credits.obj"
"\Xash3D\src_main\temp\engine\!release\ui_customgame.obj"
"\Xash3D\src_main\temp\engine\!release\ui_gameoptions.obj"
"\Xash3D\src_main\temp\engine\!release\ui_langame.obj"
"\Xash3D\src_main\temp\engine\!release\ui_loadgame.obj"
"\Xash3D\src_main\temp\engine\!release\ui_main.obj"
"\Xash3D\src_main\temp\engine\!release\ui_menu.obj"
"\Xash3D\src_main\temp\engine\!release\ui_multiplayer.obj"
"\Xash3D\src_main\temp\engine\!release\ui_newgame.obj"
"\Xash3D\src_main\temp\engine\!release\ui_playdemo.obj"
"\Xash3D\src_main\temp\engine\!release\ui_playersetup.obj"
"\Xash3D\src_main\temp\engine\!release\ui_playrec.obj"
"\Xash3D\src_main\temp\engine\!release\ui_qmenu.obj"
"\Xash3D\src_main\temp\engine\!release\ui_recdemo.obj"
"\Xash3D\src_main\temp\engine\!release\ui_savegame.obj"
"\Xash3D\src_main\temp\engine\!release\ui_saveload.obj"
"\Xash3D\src_main\temp\engine\!release\ui_video.obj"
"\Xash3D\src_main\temp\engine\!release\ui_vidmodes.obj"
"\Xash3D\src_main\temp\engine\!release\ui_vidoptions.obj"
]
Creating command line "link.exe @"C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2700.tmp""
Creating temporary file "C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2701.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\engine\!release\engine.dll "D:\Xash3D\bin\engine.dll"
]
Creating command line ""C:\DOCUME~1\ĚČŘŔ\LOCALS~1\Temp\RSP2701.bat""
Compiling...
sv_game.c
Linking...
Creating library ..\temp\engine\!release/engine.lib and object ..\temp\engine\!release/engine.exp
<h3>Output Window</h3>
Performing Custom Build Step on \Xash3D\src_main\temp\engine\!release\engine.dll
‘Ş®Ż¨ŕ®˘ ­® ä ©«®˘: 1.
<h3>Results</h3>
engine.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>

View File

@ -865,6 +865,12 @@ void Host_Init( const int argc, const char **argv )
s = va( "^1Xash %g ^3%s", GI->version, buildstring );
Cvar_Get( "version", s, CVAR_INIT, "engine current version" );
// content control
Cvar_Get( "violence_hgibs", "1", CVAR_SYSTEMINFO, "content control disables human gibs" );
Cvar_Get( "violence_agibs", "1", CVAR_SYSTEMINFO, "content control disables alien gibs" );
Cvar_Get( "violence_hblood", "1", CVAR_SYSTEMINFO, "content control disables human blood" );
Cvar_Get( "violence_ablood", "1", CVAR_SYSTEMINFO, "content control disables alien blood" );
NET_Init();
Netchan_Init();

View File

@ -159,22 +159,14 @@ struct sv_priv_s
link_t area; // linked to a division node or leaf
sv_client_t *client; // filled for player ents
int lastcluster; // unused if num_clusters != -1
int linkcount;
int num_clusters; // if -1, use headnode instead
int clusternums[MAX_ENT_CLUSTERS];
int framenum; // update framenumber
int areanum, areanum2;
bool linked; // passed through SV_LinkEdict
bool stuck; // entity stucked in brush
// cached position to avoid redundant SV_CheckWaterTransition calls on monsters
bool forceupdate; // force an update on this entity
// (set by SV_PushMove code for moving water entities)
vec3_t water_origin; // updates whenever this changes
vec3_t moved_origin; // used by PushMove to keep track of where objects were before
vec3_t moved_angles; // they were moved, in case they need to be moved back
vec3_t moved_origin;
vec3_t moved_angles;
size_t pvdata_size; // member size of alloceed pvPrivateData
// (used by SV_CopyEdict)
@ -338,7 +330,6 @@ void SV_Physics( void );
void SV_CheckVelocity( edict_t *ent );
bool SV_CheckWater( edict_t *ent );
bool SV_RunThink( edict_t *ent );
bool SV_UnstickEntity( edict_t *ent );
void SV_FreeOldEntities( void );
bool SV_TestEntityPosition( edict_t *ent, const vec3_t offset ); // for EntityInSolid checks

View File

@ -1315,7 +1315,6 @@ int pfnDropToFloor( edict_t* e )
return false;
}
SV_UnstickEntity( e );
VectorCopy( e->v.origin, end );
end[2] -= 256;
@ -1333,7 +1332,6 @@ int pfnDropToFloor( edict_t* e )
if( trace.fStartSolid )
{
MsgDev( D_NOTE, "SV_DropToFloor: startsolid at %g %g %g\n", e->v.origin[0], e->v.origin[1], e->v.origin[2] );
SV_UnstickEntity( e );
SV_LinkEdict( e, true );
e->v.flags |= FL_ONGROUND;
e->v.groundentity = NULL;
@ -1343,7 +1341,6 @@ int pfnDropToFloor( edict_t* e )
{
MsgDev( D_NOTE, "SV_DropToFloor: moved to %g %g %g\n", e->v.origin[0], e->v.origin[1], e->v.origin[2] );
VectorCopy( trace.vecEndPos, e->v.origin );
SV_UnstickEntity( e );
SV_LinkEdict( e, true );
e->v.flags |= FL_ONGROUND;
e->v.groundentity = trace.pHit;

View File

@ -225,10 +225,11 @@ void SV_DeactivateServer( void )
{
int i;
if( !svs.initialized || sv.state == ss_dead )
return;
if( !svs.initialized ) return;
SV_FreeEdicts ();
if( sv.state == ss_dead ) return;
sv.state = ss_dead;
if( sys_sharedstrings->integer )

View File

@ -371,7 +371,7 @@ void SV_PrepWorldFrame( void )
ent->v.effects &= ~EF_MUZZLEFLASH;
// clear NOINTERP flag automatically only for alive creatures
if( ent->v.flags & ( FL_MONSTER|FL_CLIENT|FL_FAKECLIENT ) && ent->v.health > 0.0f )
if( ent->v.flags & ( FL_MONSTER|FL_CLIENT|FL_FAKECLIENT ) && ent->v.deadflag != DEAD_DEAD )
ent->v.effects &= ~EF_NOINTERP;
}
}

View File

@ -591,9 +591,8 @@ SV_RunCmd
void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd )
{
edict_t *clent;
int i, oldmsec;
static usercmd_t cmd;
vec3_t oldvel;
int i;
cl->commandMsec -= ucmd->msec;
@ -604,20 +603,7 @@ void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd )
}
clent = cl->edict;
cmd = *ucmd;
if( !clent || clent->free ) return;
// chop up very long commands
if( cmd.msec > 50 )
{
oldmsec = ucmd->msec;
cmd.msec = oldmsec / 2;
SV_RunCmd( cl, &cmd );
cmd.msec = oldmsec / 2;
cmd.impulse = 0;
SV_RunCmd( cl, &cmd );
return;
}
if( !SV_IsValidEdict( clent )) return;
PM_CheckMovingGround( clent, ucmd->msec * 0.001f );
@ -631,7 +617,7 @@ void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd )
// angles
// show 1/3 the pitch angle and all the roll angle
if( clent->v.health > 0.0f )
if( clent->v.deadflag != DEAD_DEAD )
{
if( !clent->v.fixangle )
{
@ -640,12 +626,12 @@ void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd )
}
}
svgame.globals->time = (sv.time * 0.001f);
svgame.globals->frametime = (sv.frametime * 0.001f);
if(!( clent->v.flags & FL_SPECTATOR ))
{
svgame.globals->time = sv.time * 0.001f;
svgame.globals->frametime = ucmd->msec * 0.001f;
svgame.dllFuncs.pfnPlayerPreThink( clent );
SV_RunThink( clent ); // clients cannot be deleted from map
// If conveyor, or think, set basevelocity, then send to client asap too.
@ -653,9 +639,12 @@ void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd )
VectorCopy( clent->v.basevelocity, clent->v.clbasevelocity );
}
if(( sv_maxclients->integer <= 1 ) && !CL_IsInGame( ))
if(( sv_maxclients->integer <= 1 ) && !CL_IsInGame( ) || ( clent->v.flags & FL_FROZEN ))
ucmd->msec = 0; // pause
svgame.globals->time = (sv.time * 0.001f);
svgame.globals->frametime = (ucmd->msec * 0.001f);
// setup playermove state
PM_SetupMove( svgame.pmove, clent, ucmd, cl->physinfo );
@ -708,8 +697,6 @@ void SV_PostRunCmd( sv_client_t *cl )
if( !clent || clent->free ) return;
svgame.pmove->runfuncs = false; // all next calls ignore footstep sounds
svgame.globals->frametime = 0.0f; // PlayerPostThink uses it
svgame.globals->time = sv.time * 0.001f;
// run post-think
if( clent->v.flags & FL_SPECTATOR )

File diff suppressed because it is too large Load Diff

View File

@ -215,7 +215,6 @@ void SV_LinkEdict( edict_t *ent, bool touch_triggers )
}
}
ent->pvServerData->linkcount++;
ent->pvServerData->s.ed_flags |= ESF_LINKEDICT; // change edict state on a client too...
sv_ent->linked = true;

View File

@ -1593,7 +1593,7 @@ int PM_CheckStuck( void )
if ( !pmove->server )
{
// World or BSP model
if ( hitent == ENTINDEX( 0 ) || ( hitent && Mod_GetType( hitent->v.modelindex ) == mod_brush ))
if ( hitent == ENTINDEX( 0 ) || ( hitent && Mod_GetType( hitent->v.modelindex ) == mod_world ))
{
int nReps = 0;
@ -1644,6 +1644,7 @@ int PM_CheckStuck( void )
return 0;
}
/*
// If player is flailing while stuck in another player ( should never happen ), then see
// if we can't "unstick" them forceably.
if( pmove->cmd.buttons & (IN_JUMP|IN_DUCK|IN_ATTACK) && ( hitent && hitent->v.flags & FL_CLIENT ))
@ -1674,9 +1675,7 @@ int PM_CheckStuck( void )
}
}
}
// pmove->origin = base;
*/
return 1;
}

View File

@ -167,7 +167,7 @@ void CBaseEntity :: SetParent( CBaseEntity* pParent, int m_iAttachment )
if( m_iAttachment )
{
if( pev->flags & FL_POINTENTITY || pev->flags & FL_MONSTER )
if( pFlags & PF_POINTENTITY || pev->flags & FL_MONSTER )
{
pev->colormap = ((pev->colormap & 0xFF00)>>8) | m_iAttachment;
pev->aiment = m_pParent->edict();
@ -209,7 +209,7 @@ void CBaseEntity :: SetParent( CBaseEntity* pParent, int m_iAttachment )
OffsetOrigin = pev->origin - pParentOrigin;
OffsetAngles = pev->angles - pParentAngles;
if((m_pParent->pFlags & PF_ANGULAR && OffsetOrigin != g_vecZero) || m_pParent->pev->flags & FL_POINTENTITY)
if((m_pParent->pFlags & PF_ANGULAR && OffsetOrigin != g_vecZero) || m_pParent->pFlags & PF_POINTENTITY)
{
SetBits (pFlags, PF_POSTORG);//magic stuff
//GetPInfo( this );

View File

@ -688,7 +688,7 @@ void CSprite::Spawn( void )
pev->solid = SOLID_NOT;
pev->movetype = MOVETYPE_NOCLIP;
pev->frame = 0;
SetBits( pev->flags, FL_POINTENTITY );
SetBits( pFlags, PF_POINTENTITY );
pev->angles.x = -pev->angles.x;
pev->angles.y = 180 - pev->angles.y;

View File

@ -22,7 +22,7 @@ public:
pev->solid = SOLID_NOT;
UTIL_SetModel(ENT(pev),"models/common/null.mdl");
UTIL_SetSize(pev, g_vecZero, g_vecZero);
SetBits( pev->flags, FL_POINTENTITY );
SetBits( pFlags, PF_POINTENTITY );
}
};
@ -72,7 +72,7 @@ public:
pev->soundindex = pev->impulse;
UTIL_SetModel( ENT( pev ), "models/props/torch1.mdl" );
UTIL_SetSize(pev, g_vecZero, g_vecZero);
SetBits( pev->flags, FL_POINTENTITY );
SetBits( pFlags, PF_POINTENTITY );
pev->animtime = gpGlobals->time + 0.2; // enable animation
pev->framerate = 0.5f;
}
@ -327,7 +327,7 @@ void CInfoPath :: Spawn( void )
m_iState = STATE_ON;
m_index = 0;
SetBits( pev->flags, FL_POINTENTITY );
SetBits( pFlags, PF_POINTENTITY );
UTIL_SetModel( ENT( pev ), "blabla.mdl");
pev->scale = 0.1f;
}

View File

@ -8,7 +8,7 @@
class CPointEntity : public CBaseEntity
{
public:
void Spawn( void ){ SetBits( pev->flags, FL_POINTENTITY ); pev->solid = SOLID_NOT; }
void Spawn( void ){ SetBits( pFlags, PF_POINTENTITY ); pev->solid = SOLID_NOT; }
virtual int ObjectCaps( void ) { return CBaseEntity :: ObjectCaps() & ~FCAP_ACROSS_TRANSITION; }
};

View File

@ -172,7 +172,6 @@ void CFuncTank :: Spawn( void )
if ( m_spread > MAX_FIRING_SPREADS ) m_spread = 0;
pev->oldorigin = pev->origin;
pev->flags |= FL_TANK;//this is tank entity
}
void CFuncTank::PostSpawn( void )
@ -1072,18 +1071,18 @@ BOOL CFuncTankControls :: OnControls( entvars_t *pevTest )
return FALSE;
}
void CFuncTankControls :: HandleTank ( CBaseEntity *pActivator, CBaseEntity *m_pTank, BOOL activate )
void CFuncTankControls :: HandleTank ( CBaseEntity *pActivator, CBaseEntity *pTank, BOOL activate )
{
if(m_pTank->pev->flags & FL_TANK)//it's tank entity
if( !strncmp( STRING( pTank->pev->classname ), "func_tank", 9 ))
{
if(activate)
if( activate )
{
if (((CFuncTank*)m_pTank)->StartControl((CBasePlayer*)pActivator, this))
if( (( CFuncTank *)pTank)->StartControl(( CBasePlayer *)pActivator, this ))
{
m_iState = STATE_ON; //we have active tank!
}
}
else ((CFuncTank*)m_pTank)->StopControl(this);
else (( CFuncTank *)pTank)->StopControl( this );
}
}

View File

@ -314,7 +314,7 @@ class CTriggerPush : public CBaseTrigger
pOwner = UTIL_FindEntityByTargetname( NULL, STRING( pev->target ));
if( !pOwner ) return; // dir set with angles
if( pOwner->pev->flags & FL_POINTENTITY )
if( pOwner->pFlags & PF_POINTENTITY )
{
// xash allows to precache from random place
UTIL_PrecacheSound( "world/jumppad.wav" );
@ -795,7 +795,7 @@ void CTriggerCamera :: Spawn (void )
UTIL_SetModel( ENT( pev ), "models/common/null.mdl" );
UTIL_SetSize( pev, g_vecZero, g_vecZero );
SetBits( pev->flags, FL_POINTENTITY );
SetBits( pFlags, PF_POINTENTITY );
}
void CTriggerCamera::PostSpawn( void )

View File

@ -778,6 +778,7 @@ void COM_FreeFile (char *buffer);
#define PF_PARENTMOVE (1<<10) //parent give me velocity or avelocity
#define PF_ANGULAR (1<<11) //parent has angular moving
#define PF_POSTORG (1<<12) //this entity MUST changed origin only
#define PF_POINTENTITY (1<<13)
#define PF_LINKCHILD (PF_AFFECT|PF_DESIRED|PF_MERGEPOS|PF_POSTORG)
BOOL FClassnameIs(CBaseEntity *pEnt, const char* szClassname);

View File

@ -26,7 +26,7 @@ public:
pev->soundindex = pev->impulse;
UTIL_SetModel( ENT( pev ), "models/props/torch1.mdl" );
UTIL_SetSize(pev, g_vecZero, g_vecZero);
SetBits( pev->flags, FL_POINTENTITY );
SetBits( pFlags, PF_POINTENTITY );
pev->animtime = gpGlobals->time + 0.2; // enable animation
pev->framerate = 0.5f;
}

View File

@ -147,7 +147,12 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther )
if( pOther->IsBSPModel())
{
SetParent( pOther );//glue bolt with parent system
// TEST compound
pev->movetype = MOVETYPE_COMPOUND;
pev->aiment = pOther->edict();
pev->effects |= EF_NOINTERP;
// SetParent( pOther );//glue bolt with parent system
}
if (UTIL_PointContents(pev->origin) != CONTENTS_WATER)

View File

@ -1031,7 +1031,6 @@ void CLightning::BeamUpdateVars( void )
pev->skin = 0;
pev->sequence = 0;
pev->rendermode = 0;
pev->flags |= FL_CUSTOMENTITY;
pev->model = m_iszSpriteName;
SetTexture( m_spriteTexture );
@ -1079,7 +1078,6 @@ void CLaser::Spawn( void )
Precache( );
SetThink(&CLaser:: StrikeThink );
pev->flags |= FL_CUSTOMENTITY;
}
void CLaser::PostSpawn( void )

View File

@ -161,7 +161,9 @@ void CGlock::PrimaryAttack( void )
Vector vecDir;
vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, Vector( 0.02, 0.02, 0.02 ), 8192, BULLET_PLAYER_9MM, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed );
PLAYBACK_EVENT_FULL( 0, m_pPlayer->edict(), m_usFireGlock, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, pev->body, 0, ( m_iClip == 0 ) ? 1 : 0, m_iBody );
int iAnim = ( m_iClip == 0 ) ? GLOCK_SHOOT_EMPTY : GLOCK_SHOOT;
PLAYBACK_EVENT_FULL( 0, m_pPlayer->edict(), m_usFireGlock, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, pev->body, iAnim, 0, m_iBody );
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.35;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT ( 10, 15 );

View File

@ -462,11 +462,13 @@ void CSqueak::PrimaryAttack()
// Move origin up if crouched and start trace a bit outside of body ( 20 units instead of 16 )
trace_origin = m_pPlayer->pev->origin;
if ( m_pPlayer->pev->flags & FL_DUCKING )
{
trace_origin = trace_origin - ( VEC_HULL_MIN - VEC_DUCK_HULL_MIN );
}
// find place to toss monster
UTIL_TraceLine( trace_origin + gpGlobals->v_forward * 20, trace_origin + gpGlobals->v_forward * 64, dont_ignore_monsters, NULL, &tr );
PLAYBACK_EVENT_FULL( 0, m_pPlayer->edict(), m_usSnarkFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, pev->body, 0, 0, 0 );
PLAYBACK_EVENT_FULL( 0, m_pPlayer->edict(), m_usSnarkFire, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, pev->body, 0, 0, 0 );
if ( tr.fAllSolid == 0 && tr.fStartSolid == 0 && tr.flFraction > 0.25 )
{

View File

@ -34,5 +34,5 @@ Xash 0.71 Beta 05.05.10
10.revision MOVETYPE_PUSH physic
11.rewrite EntitiesInPVS check OK
12.reworking snd_dx.dll
13. revision MOVETYPE_BOUNCE physic
14. revision MOVETYPE_FOLLOW physic
13. revision MOVETYPE_BOUNCE physic OK
14. revision MOVETYPE_COMPOUND physic

View File

@ -249,7 +249,7 @@ static void Tri_DrawPolygon( void )
tri_mesh.colorsArray[0] = tri_colors;
tri_mesh.elems = tri_elems;
if( tri_mbuffer.shaderkey != (int)shader->sortkey || -tri_mbuffer.infokey-1+4 > MAX_ARRAY_VERTS )
if( tri_mbuffer.shaderkey != (int)shader->sortkey || -tri_mbuffer.infokey-1+32 > MAX_ARRAY_VERTS )
{
if( tri_mbuffer.shaderkey )
{

View File

@ -2108,8 +2108,14 @@ int R_ComputeFxBlend( ref_entity_t *e )
}
// store value back into client entity, some effects requires this
if( m_pEntity ) m_pEntity->v.renderamt = renderAmt;
if( m_pEntity )
{
m_pEntity->v.renderamt = renderAmt;
// NOTE: never pass sprites with rendercolor '0 0 0' it's a stupid Valve Hammer Editor bug
if(( !e->rendercolor[0] && !e->rendercolor[1] && !e->rendercolor[2] ))
VectorSet( e->rendercolor, 255, 255, 255 );
}
blend = bound( 0, blend, 255 );
return blend;