03 Sep 2010

This commit is contained in:
g-cont 2010-09-03 00:00:00 +04:00 committed by Alibek Omarov
parent 11dd84ab2f
commit a100005969
31 changed files with 496 additions and 97 deletions

View File

@ -1,4 +1,4 @@
build ????
build 1305
Engine: implement bit-stream network buffer
Engine: implement custom delta-encoding with user defined script (delta.lst)
@ -10,6 +10,13 @@ Engine: rewrite hitbox trace
Engine: rewrite SV_PointContents
Engine: implement a new movetype: compound for gluing two entities together (like movewith in spirit)
Engine: fix toss entities on conveyors
Engine: rewrite MOVETYPE_PUSH
Engine: rewrite monsters movement code
Engine: reworking client and game interfaces
Engine: fix camera bugs (no sounds when client see in the camera)
SDK: fix many-many small HL bugs in original sdk code
Engine: fix trigger retouching system
Engine: adjust beam visibility
build 1271

View File

@ -18,7 +18,6 @@ typedef struct
int state;
} kbutton_t;
cvar_t *cl_lw;
cvar_t *cl_run;
cvar_t *cl_upspeed;
cvar_t *cl_yawspeed;
@ -672,7 +671,6 @@ void IN_Init( void )
cl_pitchspeed = CVAR_REGISTER( "cl_pitchspeed", "150", 0, "client pitch speed" );
cl_anglespeedkey = CVAR_REGISTER( "cl_anglespeedkey", "1.5", 0, "client anglespeed" );
cl_run = CVAR_REGISTER( "cl_run", "0", FCVAR_ARCHIVE, "keep client for always run mode" );
cl_lw = CVAR_REGISTER( "cl_lw", "1", FCVAR_ARCHIVE|FCVAR_USERINFO, "enable client weapon predicting" );
cl_movespeedkey = CVAR_REGISTER ( "cl_movespeedkey", "0.3", 0, "global scale factor between run and walk" );
cl_pitchup = CVAR_REGISTER ( "cl_pitchup", "89", 0, "how many pitch up" );

View File

@ -274,7 +274,7 @@ void SetScreenFade( Vector fadeColor, float alpha, float duration, float holdTim
for( int i = 0; i < HUD_MAX_FADES; i++ )
{
// search for free spot
if( gHUD.m_FadeList[i].fadeFlags == 0 )
if( !gHUD.m_FadeList[i].bActive )
{
sf = &gHUD.m_FadeList[i];
break;
@ -358,22 +358,19 @@ void DrawScreenFade( void )
// Fading...
int iFadeAlpha;
if( pFade->fadeFlags & FFADE_OUT )
if( pFade->fadeFlags == FFADE_STAYOUT )
{
iFadeAlpha = pFade->fadeSpeed * ( pFade->fadeEnd - gHUD.m_flTime );
iFadeAlpha += pFade->fadeAlpha;
iFadeAlpha = min( iFadeAlpha, pFade->fadeAlpha );
iFadeAlpha = max( 0, iFadeAlpha );
}
else if( !( pFade->fadeFlags & FFADE_STAYOUT ))
{
iFadeAlpha = pFade->fadeSpeed * ( pFade->fadeEnd - gHUD.m_flTime );
iFadeAlpha = min( iFadeAlpha, pFade->fadeAlpha );
iFadeAlpha = max( 0, iFadeAlpha );
iFadeAlpha = pFade->fadeAlpha;
}
else
{
iFadeAlpha = pFade->fadeAlpha;
iFadeAlpha = pFade->fadeSpeed * ( pFade->fadeEnd - gHUD.m_flTime );
if( pFade->fadeFlags & FFADE_OUT )
{
iFadeAlpha += pFade->fadeAlpha;
}
iFadeAlpha = min( iFadeAlpha, pFade->fadeAlpha );
iFadeAlpha = max( 0, iFadeAlpha );
}
// Use highest alpha

View File

@ -234,6 +234,7 @@ extern int g_iAlive; // indicates alive local client or not
extern cvar_t *v_centerspeed;
extern cvar_t *v_centermove;
extern cvar_t *r_studio_lerping;
extern cvar_t *m_sensitivity;
extern cvar_t *cl_forwardspeed;
extern cvar_t *cl_particles;
extern cvar_t *cl_draw_beams;

View File

@ -356,7 +356,7 @@ void V_PreRender( ref_params_t *pparams )
if( gHUD.m_iCameraMode ) pparams->flags |= RDF_THIRDPERSON;
else pparams->flags &= ~RDF_THIRDPERSON;
pparams->fov_x = gHUD.m_flFOV; // this is a final fov value
pparams->fov_x = gHUD.m_iFOV; // this is a final fov value
pparams->fov_y = V_CalcFov( pparams->fov_x, pparams->viewport[2], pparams->viewport[3] );
memset( pparams->blend, 0, sizeof( pparams->blend ));

View File

@ -198,20 +198,37 @@ void CHud :: Think( void )
pList = pList->pNext;
}
// think about default fov
float def_fov = CVAR_GET_FLOAT( "default_fov" );
if( m_flFOV == 0.0f ) m_flFOV = max( CVAR_GET_FLOAT( "default_fov" ), 90 );
// change sensitivity
if( m_flFOV == def_fov )
int newfov = HUD_GetFOV();
if ( newfov == 0 )
{
m_flMouseSensitivity = 0;
m_iFOV = default_fov->value;
}
else
{
m_iFOV = newfov;
}
// the clients fov is actually set in the client data update section of the hud
// Set a new sensitivity
if ( m_iFOV == default_fov->value )
{
// reset to saved sensitivity
m_flMouseSensitivity = 0;
}
else
{
// set a new sensitivity that is proportional to the change from the FOV default
m_flMouseSensitivity = CVAR_GET_FLOAT( "sensitivity" ) * ( m_flFOV / def_fov );
m_flMouseSensitivity *= CVAR_GET_FLOAT( "zoom_sensitivity_ratio" ); // apply zoom factor
m_flMouseSensitivity = m_sensitivity->value * ((float)newfov / (float)default_fov->value );
m_flMouseSensitivity *= CVAR_GET_FLOAT( "zoom_sensitivity_ratio" );
}
// think about default fov
if ( m_iFOV == 0 )
{
// only let players adjust up in fov, and only if they are not overriden by something else
m_iFOV = max( default_fov->value, 90 );
}
}
@ -231,11 +248,11 @@ int CHud :: UpdateClientData( client_data_t *cdata, float time )
m_iKeyBits = CL_ButtonBits( 0 );
m_iWeaponBits = cdata->iWeaponBits;
// in_fov = cdata->fov;
float in_fov = cdata->fov;
Think();
// cdata->fov = m_iFOV;
cdata->fov = m_iFOV;
v_idlescale = m_iConcussionEffect;

View File

@ -535,7 +535,7 @@ public:
float m_vecAngles[3];
int m_iKeyBits;
int m_iHideHUDDisplay;
float m_flFOV;
float m_iFOV;
int m_Teamplay;
int m_iRes;
int m_iCameraMode;
@ -553,6 +553,7 @@ private:
wrect_t *m_rgrcRects;
wrect_t nullRect;
char *m_rgszSpriteNames;
cvar_t *default_fov;
public:
HSPRITE GetSprite( int index ) { return (index < 0) ? 0 : m_rghSprites[index]; }
wrect_t& GetSpriteRect( int index ) { return (index < 0) ? nullRect : m_rgrcRects[index]; }
@ -594,6 +595,7 @@ public:
int _cdecl MsgFunc_ResetHUD( const char *pszName, int iSize, void *pbuf);
int _cdecl MsgFunc_InitHUD( const char *pszName, int iSize, void *pbuf );
int _cdecl MsgFunc_ViewMode( const char *pszName, int iSize, void *pbuf );
int _cdecl MsgFunc_SetFOV( const char *pszName, int iSize, void *pbuf );
int _cdecl MsgFunc_Concuss( const char *pszName, int iSize, void *pbuf );
int _cdecl MsgFunc_ScreenShake( const char *pszName, int iSize, void *pbuf );
int _cdecl MsgFunc_RainData( const char *pszName, int iSize, void *pbuf );
@ -649,6 +651,8 @@ public:
extern CHud gHUD;
float HUD_GetFOV( void );
extern int g_iPlayerClass;
extern int g_iTeamNumber;
extern int g_iUser1;

View File

@ -352,12 +352,12 @@ void CHudAmmo :: Think( void )
}
}
if( Q_rint( gHUD.m_flFOV ) != gWR.iOldFOV )
if( gHUD.m_iFOV != gWR.iOldFOV )
{
if( m_pWeapon )
{
// update crosshairs
if( gHUD.m_flFOV >= 90 )
if( gHUD.m_iFOV >= 90 )
{
// normal crosshairs
if( m_pWeapon->iOnTarget && m_pWeapon->hAutoaim )
@ -372,7 +372,7 @@ void CHudAmmo :: Think( void )
else SetCrosshair( m_pWeapon->hZoomedCrosshair, m_pWeapon->rcZoomedCrosshair, 255, 255, 255 );
}
}
gWR.iOldFOV = gHUD.m_flFOV;
gWR.iOldFOV = gHUD.m_iFOV;
}
if( !gpActiveSel ) return;
@ -615,7 +615,7 @@ int CHudAmmo::MsgFunc_CurWeapon( const char *pszName, int iSize, void *pbuf )
m_pWeapon->iOnTarget = fOnTarget;
// update crosshairs
if( gHUD.m_flFOV >= 90 )
if( gHUD.m_iFOV >= 90 )
{
// normal crosshairs
if( m_pWeapon->iOnTarget && m_pWeapon->hAutoaim )

View File

@ -25,6 +25,7 @@
DECLARE_HUDMESSAGE( Logo );
DECLARE_HUDMESSAGE( HUDColor );
DECLARE_HUDMESSAGE( SetFog );
DECLARE_HUDMESSAGE( SetFOV );
DECLARE_HUDMESSAGE( RainData );
DECLARE_HUDMESSAGE( SetBody );
DECLARE_HUDMESSAGE( SetSkin );
@ -39,6 +40,9 @@ DECLARE_HUDMESSAGE( ServerName );
DECLARE_HUDMESSAGE( ScreenShake );
DECLARE_HUDCOMMAND( ChangeLevel );
cvar_t *cl_lw = NULL;
float g_lastFOV = 0.0f;
int CHud :: InitMessages( void )
{
HOOK_MESSAGE( Logo );
@ -51,6 +55,7 @@ int CHud :: InitMessages( void )
HOOK_MESSAGE( HUDColor );
HOOK_MESSAGE( Particle );
HOOK_MESSAGE( SetFog );
HOOK_MESSAGE( SetFOV );
HOOK_MESSAGE( RainData );
HOOK_MESSAGE( SetBody );
HOOK_MESSAGE( SetSkin );
@ -59,13 +64,15 @@ int CHud :: InitMessages( void )
HOOK_COMMAND( "hud_changelevel", ChangeLevel ); // send by engine
m_flFOV = 0;
m_iLogo = 0;
m_iFOV = 0;
m_iHUDColor = RGB_YELLOWISH; // 255, 160, 0
CVAR_REGISTER( "zoom_sensitivity_ratio", "1.2", 0, "mouse sensitivity when zooming" );
CVAR_REGISTER( "default_fov", "90", 0, "default client fov" );
default_fov = CVAR_REGISTER( "default_fov", "90", 0, "default client fov" );
CVAR_REGISTER( "hud_draw", "1", 0, "disable hud rendering" );
CVAR_REGISTER( "hud_takesshots", "0", 0, "take screenshots at 30 fps" );
cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" );
// clear any old HUD list
if( m_pHudList )
@ -199,6 +206,51 @@ int CHud :: MsgFunc_SetFog( const char *pszName, int iSize, void *pbuf )
return 1;
}
int CHud::MsgFunc_SetFOV(const char *pszName, int iSize, void *pbuf)
{
BEGIN_READ( pszName, iSize, pbuf );
int newfov = READ_BYTE();
int def_fov = CVAR_GET_FLOAT( "default_fov" );
//Weapon prediction already takes care of changing the fog. ( g_lastFOV ).
if ( cl_lw && cl_lw->integer )
{
END_READ();
return 1;
}
g_lastFOV = newfov;
if ( newfov == 0 )
{
m_iFOV = def_fov;
}
else
{
m_iFOV = newfov;
}
// the clients fov is actually set in the client data update section of the hud
// Set a new sensitivity
if ( m_iFOV == def_fov )
{
// reset to saved sensitivity
m_flMouseSensitivity = 0;
}
else
{
// set a new sensitivity that is proportional to the change from the FOV default
m_flMouseSensitivity = m_sensitivity->value * ((float)newfov / (float)def_fov );
m_flMouseSensitivity *= CVAR_GET_FLOAT( "zoom_sensitivity_ratio" );
}
END_READ();
return 1;
}
int CHud :: MsgFunc_GameMode( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pszName, iSize, pbuf );
@ -356,4 +408,16 @@ int CHud::MsgFunc_ScreenShake( const char *pszName, int iSize, void *pbuf )
END_READ();
return 1;
}
/*
=====================
HUD_GetFOV
Returns last FOV
=====================
*/
float HUD_GetFOV( void )
{
return g_lastFOV;
}

View File

@ -93,7 +93,7 @@ typedef struct enginefuncs_s
void (*pfnTraceHull)( const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr );
void (*pfnTraceModel)( const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr );
const char *(*pfnTraceTexture)( edict_t *pTextureEntity, const float *v1, const float *v2 );
void (*pfnTraceSphere)( const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr );
int (*pfnBoxVisible)( const float *mins, const float *maxs, const byte *pset );
void (*pfnGetAimVector)( edict_t* ent, float speed, float *rgflReturn );
void (*pfnServerCommand)( const char* str );
void (*pfnServerExecute)( void );
@ -385,5 +385,6 @@ typedef struct
typedef int (*APIFUNCTION)( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion );
typedef int (*APIFUNCTION2)( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion );
typedef int (*NEW_DLL_FUNCTIONS_FN)( NEW_DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion );
#endif//EIFACE_H

View File

@ -133,6 +133,7 @@ inline void *GET_PRIVATE( edict_t *pent )
#define ENGINE_SET_PAS (*g_engfuncs.pfnSetFatPAS)
#define ENGINE_CHECK_VISIBILITY (*g_engfuncs.pfnCheckVisibility)
#define ENGINE_BOX_VISIBLE (*g_engfuncs.pfnCheckVisible)
#define DELTA_SET ( *g_engfuncs.pfnDeltaSetField )
#define DELTA_UNSET ( *g_engfuncs.pfnDeltaUnsetField )

View File

@ -294,6 +294,9 @@ void CGauss::SecondaryAttack()
UTIL_ScreenFade( m_pPlayer, Vector(255,128,0), 2, 0.5, 128, FFADE_IN );
#endif
SendWeaponAnim( GAUSS_IDLE );
// g-cont. kill spinning sound after shock (SDK 2.3 bug)
PLAYBACK_EVENT_FULL( flags | FEV_RELIABLE, m_pPlayer->edict(), m_usGaussFire, 0.01, (float *)&m_pPlayer->pev->origin, (float *)&m_pPlayer->pev->angles, 0.0, 0.0, 0, 0, 0, 1 );
// Player may have been killed and this weapon dropped, don't execute any more code after this!
return;

250
dlls/hl.plg Normal file
View File

@ -0,0 +1,250 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: hl - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP1731.tmp" with contents
[
/nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\dlls" /I "..\common" /I "..\game_shared" /I "..\\" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"..\temp\hl\!debug/" /Fo"..\temp\hl\!debug/" /Fd"..\temp\hl\!debug/" /FD /c
"D:\Xash3D\src_main\dlls\aflock.cpp"
"D:\Xash3D\src_main\dlls\agrunt.cpp"
"D:\Xash3D\src_main\dlls\airtank.cpp"
"D:\Xash3D\src_main\dlls\animating.cpp"
"D:\Xash3D\src_main\dlls\animation.cpp"
"D:\Xash3D\src_main\dlls\apache.cpp"
"D:\Xash3D\src_main\dlls\barnacle.cpp"
"D:\Xash3D\src_main\dlls\barney.cpp"
"D:\Xash3D\src_main\dlls\bigmomma.cpp"
"D:\Xash3D\src_main\dlls\bloater.cpp"
"D:\Xash3D\src_main\dlls\bmodels.cpp"
"D:\Xash3D\src_main\dlls\bullsquid.cpp"
"D:\Xash3D\src_main\dlls\buttons.cpp"
"D:\Xash3D\src_main\dlls\cbase.cpp"
"D:\Xash3D\src_main\dlls\client.cpp"
"D:\Xash3D\src_main\dlls\combat.cpp"
"D:\Xash3D\src_main\dlls\controller.cpp"
"D:\Xash3D\src_main\dlls\crossbow.cpp"
"D:\Xash3D\src_main\dlls\crowbar.cpp"
"D:\Xash3D\src_main\dlls\defaultai.cpp"
"D:\Xash3D\src_main\dlls\doors.cpp"
"D:\Xash3D\src_main\dlls\effects.cpp"
"D:\Xash3D\src_main\dlls\egon.cpp"
"D:\Xash3D\src_main\dlls\explode.cpp"
"D:\Xash3D\src_main\dlls\flyingmonster.cpp"
"D:\Xash3D\src_main\dlls\func_break.cpp"
"D:\Xash3D\src_main\dlls\func_tank.cpp"
"D:\Xash3D\src_main\dlls\game.cpp"
"D:\Xash3D\src_main\dlls\gamerules.cpp"
"D:\Xash3D\src_main\dlls\gargantua.cpp"
"D:\Xash3D\src_main\dlls\gauss.cpp"
"D:\Xash3D\src_main\dlls\genericmonster.cpp"
"D:\Xash3D\src_main\dlls\ggrenade.cpp"
"D:\Xash3D\src_main\dlls\globals.cpp"
"D:\Xash3D\src_main\dlls\glock.cpp"
"D:\Xash3D\src_main\dlls\gman.cpp"
"D:\Xash3D\src_main\dlls\h_ai.cpp"
"D:\Xash3D\src_main\dlls\h_battery.cpp"
"D:\Xash3D\src_main\dlls\h_cine.cpp"
"D:\Xash3D\src_main\dlls\h_cycler.cpp"
"D:\Xash3D\src_main\dlls\h_export.cpp"
"D:\Xash3D\src_main\dlls\handgrenade.cpp"
"D:\Xash3D\src_main\dlls\hassassin.cpp"
"D:\Xash3D\src_main\dlls\headcrab.cpp"
"D:\Xash3D\src_main\dlls\healthkit.cpp"
"D:\Xash3D\src_main\dlls\hgrunt.cpp"
"D:\Xash3D\src_main\dlls\hornet.cpp"
"D:\Xash3D\src_main\dlls\hornetgun.cpp"
"D:\Xash3D\src_main\dlls\houndeye.cpp"
"D:\Xash3D\src_main\dlls\ichthyosaur.cpp"
"D:\Xash3D\src_main\dlls\islave.cpp"
"D:\Xash3D\src_main\dlls\items.cpp"
"D:\Xash3D\src_main\dlls\leech.cpp"
"D:\Xash3D\src_main\dlls\lights.cpp"
"D:\Xash3D\src_main\dlls\maprules.cpp"
"D:\Xash3D\src_main\dlls\monstermaker.cpp"
"D:\Xash3D\src_main\dlls\monsters.cpp"
"D:\Xash3D\src_main\dlls\monsterstate.cpp"
"D:\Xash3D\src_main\dlls\mortar.cpp"
"D:\Xash3D\src_main\dlls\mp5.cpp"
"D:\Xash3D\src_main\dlls\multiplay_gamerules.cpp"
"D:\Xash3D\src_main\dlls\nihilanth.cpp"
"D:\Xash3D\src_main\dlls\nodes.cpp"
"D:\Xash3D\src_main\dlls\osprey.cpp"
"D:\Xash3D\src_main\dlls\pathcorner.cpp"
"D:\Xash3D\src_main\dlls\plane.cpp"
"D:\Xash3D\src_main\dlls\plats.cpp"
"D:\Xash3D\src_main\dlls\player.cpp"
"D:\Xash3D\src_main\game_shared\pm_debug.cpp"
"D:\Xash3D\src_main\game_shared\pm_math.cpp"
"D:\Xash3D\src_main\game_shared\pm_shared.cpp"
"D:\Xash3D\src_main\dlls\python.cpp"
"D:\Xash3D\src_main\dlls\rat.cpp"
"D:\Xash3D\src_main\dlls\roach.cpp"
"D:\Xash3D\src_main\dlls\rpg.cpp"
"D:\Xash3D\src_main\dlls\satchel.cpp"
"D:\Xash3D\src_main\dlls\schedule.cpp"
"D:\Xash3D\src_main\dlls\scientist.cpp"
"D:\Xash3D\src_main\dlls\scripted.cpp"
"D:\Xash3D\src_main\dlls\shotgun.cpp"
"D:\Xash3D\src_main\dlls\singleplay_gamerules.cpp"
"D:\Xash3D\src_main\dlls\skill.cpp"
"D:\Xash3D\src_main\dlls\sound.cpp"
"D:\Xash3D\src_main\dlls\soundent.cpp"
"D:\Xash3D\src_main\dlls\spectator.cpp"
"D:\Xash3D\src_main\dlls\squadmonster.cpp"
"D:\Xash3D\src_main\dlls\squeakgrenade.cpp"
"D:\Xash3D\src_main\dlls\subs.cpp"
"D:\Xash3D\src_main\dlls\talkmonster.cpp"
"D:\Xash3D\src_main\dlls\teamplay_gamerules.cpp"
"D:\Xash3D\src_main\dlls\tempmonster.cpp"
"D:\Xash3D\src_main\dlls\tentacle.cpp"
"D:\Xash3D\src_main\dlls\triggers.cpp"
"D:\Xash3D\src_main\dlls\tripmine.cpp"
"D:\Xash3D\src_main\dlls\turret.cpp"
"D:\Xash3D\src_main\dlls\util.cpp"
"D:\Xash3D\src_main\dlls\weapons.cpp"
"D:\Xash3D\src_main\dlls\world.cpp"
"D:\Xash3D\src_main\dlls\xen.cpp"
"D:\Xash3D\src_main\dlls\zombie.cpp"
]
Creating command line "cl.exe @"C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP1731.tmp""
Creating temporary file "C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP1732.tmp" with contents
[
msvcrtd.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"..\temp\hl\!debug/hl.pdb" /debug /machine:I386 /nodefaultlib:"libc.lib" /def:".\hl.def" /out:"..\temp\hl\!debug/hl.dll" /implib:"..\temp\hl\!debug/hl.lib" /pdbtype:sept
"\Xash3D\src_main\temp\hl\!debug\aflock.obj"
"\Xash3D\src_main\temp\hl\!debug\agrunt.obj"
"\Xash3D\src_main\temp\hl\!debug\airtank.obj"
"\Xash3D\src_main\temp\hl\!debug\animating.obj"
"\Xash3D\src_main\temp\hl\!debug\animation.obj"
"\Xash3D\src_main\temp\hl\!debug\apache.obj"
"\Xash3D\src_main\temp\hl\!debug\barnacle.obj"
"\Xash3D\src_main\temp\hl\!debug\barney.obj"
"\Xash3D\src_main\temp\hl\!debug\bigmomma.obj"
"\Xash3D\src_main\temp\hl\!debug\bloater.obj"
"\Xash3D\src_main\temp\hl\!debug\bmodels.obj"
"\Xash3D\src_main\temp\hl\!debug\bullsquid.obj"
"\Xash3D\src_main\temp\hl\!debug\buttons.obj"
"\Xash3D\src_main\temp\hl\!debug\cbase.obj"
"\Xash3D\src_main\temp\hl\!debug\client.obj"
"\Xash3D\src_main\temp\hl\!debug\combat.obj"
"\Xash3D\src_main\temp\hl\!debug\controller.obj"
"\Xash3D\src_main\temp\hl\!debug\crossbow.obj"
"\Xash3D\src_main\temp\hl\!debug\crowbar.obj"
"\Xash3D\src_main\temp\hl\!debug\defaultai.obj"
"\Xash3D\src_main\temp\hl\!debug\doors.obj"
"\Xash3D\src_main\temp\hl\!debug\effects.obj"
"\Xash3D\src_main\temp\hl\!debug\egon.obj"
"\Xash3D\src_main\temp\hl\!debug\explode.obj"
"\Xash3D\src_main\temp\hl\!debug\flyingmonster.obj"
"\Xash3D\src_main\temp\hl\!debug\func_break.obj"
"\Xash3D\src_main\temp\hl\!debug\func_tank.obj"
"\Xash3D\src_main\temp\hl\!debug\game.obj"
"\Xash3D\src_main\temp\hl\!debug\gamerules.obj"
"\Xash3D\src_main\temp\hl\!debug\gargantua.obj"
"\Xash3D\src_main\temp\hl\!debug\gauss.obj"
"\Xash3D\src_main\temp\hl\!debug\genericmonster.obj"
"\Xash3D\src_main\temp\hl\!debug\ggrenade.obj"
"\Xash3D\src_main\temp\hl\!debug\globals.obj"
"\Xash3D\src_main\temp\hl\!debug\glock.obj"
"\Xash3D\src_main\temp\hl\!debug\gman.obj"
"\Xash3D\src_main\temp\hl\!debug\h_ai.obj"
"\Xash3D\src_main\temp\hl\!debug\h_battery.obj"
"\Xash3D\src_main\temp\hl\!debug\h_cine.obj"
"\Xash3D\src_main\temp\hl\!debug\h_cycler.obj"
"\Xash3D\src_main\temp\hl\!debug\h_export.obj"
"\Xash3D\src_main\temp\hl\!debug\handgrenade.obj"
"\Xash3D\src_main\temp\hl\!debug\hassassin.obj"
"\Xash3D\src_main\temp\hl\!debug\headcrab.obj"
"\Xash3D\src_main\temp\hl\!debug\healthkit.obj"
"\Xash3D\src_main\temp\hl\!debug\hgrunt.obj"
"\Xash3D\src_main\temp\hl\!debug\hornet.obj"
"\Xash3D\src_main\temp\hl\!debug\hornetgun.obj"
"\Xash3D\src_main\temp\hl\!debug\houndeye.obj"
"\Xash3D\src_main\temp\hl\!debug\ichthyosaur.obj"
"\Xash3D\src_main\temp\hl\!debug\islave.obj"
"\Xash3D\src_main\temp\hl\!debug\items.obj"
"\Xash3D\src_main\temp\hl\!debug\leech.obj"
"\Xash3D\src_main\temp\hl\!debug\lights.obj"
"\Xash3D\src_main\temp\hl\!debug\maprules.obj"
"\Xash3D\src_main\temp\hl\!debug\monstermaker.obj"
"\Xash3D\src_main\temp\hl\!debug\monsters.obj"
"\Xash3D\src_main\temp\hl\!debug\monsterstate.obj"
"\Xash3D\src_main\temp\hl\!debug\mortar.obj"
"\Xash3D\src_main\temp\hl\!debug\mp5.obj"
"\Xash3D\src_main\temp\hl\!debug\multiplay_gamerules.obj"
"\Xash3D\src_main\temp\hl\!debug\nihilanth.obj"
"\Xash3D\src_main\temp\hl\!debug\nodes.obj"
"\Xash3D\src_main\temp\hl\!debug\osprey.obj"
"\Xash3D\src_main\temp\hl\!debug\pathcorner.obj"
"\Xash3D\src_main\temp\hl\!debug\plane.obj"
"\Xash3D\src_main\temp\hl\!debug\plats.obj"
"\Xash3D\src_main\temp\hl\!debug\player.obj"
"\Xash3D\src_main\temp\hl\!debug\pm_debug.obj"
"\Xash3D\src_main\temp\hl\!debug\pm_math.obj"
"\Xash3D\src_main\temp\hl\!debug\pm_shared.obj"
"\Xash3D\src_main\temp\hl\!debug\python.obj"
"\Xash3D\src_main\temp\hl\!debug\rat.obj"
"\Xash3D\src_main\temp\hl\!debug\roach.obj"
"\Xash3D\src_main\temp\hl\!debug\rpg.obj"
"\Xash3D\src_main\temp\hl\!debug\satchel.obj"
"\Xash3D\src_main\temp\hl\!debug\schedule.obj"
"\Xash3D\src_main\temp\hl\!debug\scientist.obj"
"\Xash3D\src_main\temp\hl\!debug\scripted.obj"
"\Xash3D\src_main\temp\hl\!debug\shotgun.obj"
"\Xash3D\src_main\temp\hl\!debug\singleplay_gamerules.obj"
"\Xash3D\src_main\temp\hl\!debug\skill.obj"
"\Xash3D\src_main\temp\hl\!debug\sound.obj"
"\Xash3D\src_main\temp\hl\!debug\soundent.obj"
"\Xash3D\src_main\temp\hl\!debug\spectator.obj"
"\Xash3D\src_main\temp\hl\!debug\squadmonster.obj"
"\Xash3D\src_main\temp\hl\!debug\squeakgrenade.obj"
"\Xash3D\src_main\temp\hl\!debug\subs.obj"
"\Xash3D\src_main\temp\hl\!debug\talkmonster.obj"
"\Xash3D\src_main\temp\hl\!debug\teamplay_gamerules.obj"
"\Xash3D\src_main\temp\hl\!debug\tempmonster.obj"
"\Xash3D\src_main\temp\hl\!debug\tentacle.obj"
"\Xash3D\src_main\temp\hl\!debug\triggers.obj"
"\Xash3D\src_main\temp\hl\!debug\tripmine.obj"
"\Xash3D\src_main\temp\hl\!debug\turret.obj"
"\Xash3D\src_main\temp\hl\!debug\util.obj"
"\Xash3D\src_main\temp\hl\!debug\weapons.obj"
"\Xash3D\src_main\temp\hl\!debug\world.obj"
"\Xash3D\src_main\temp\hl\!debug\xen.obj"
"\Xash3D\src_main\temp\hl\!debug\zombie.obj"
]
Creating command line "link.exe @"C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP1732.tmp""
Creating temporary file "C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP1733.bat" with contents
[
@echo off
copy \Xash3D\src_main\temp\hl\!debug\hl.dll "D:\Xash3D\valve\bin\server.dll"
]
Creating command line ""C:\DOCUME~1\ÌÈØÀ\LOCALS~1\Temp\RSP1733.bat""
Compiling...
aflock.cpp
agrunt.cpp
airtank.cpp
animating.cpp
animation.cpp
apache.cpp
barnacle.cpp
barney.cpp
bigmomma.cpp
bloater.cpp
bmodels.cpp
bullsquid.cpp
buttons.cpp
cbase.cpp
client.cpp
combat.cpp
controller.cpp
crossbow.cpp
crowbar.cpp
defaultai.cpp
cl.exe terminated at user request.
</pre>
</body>
</html>

View File

@ -156,7 +156,8 @@ void CRpgRocket :: Spawn( void )
pev->velocity = gpGlobals->v_forward * 250;
pev->gravity = 0.5;
pev->nextthink = gpGlobals->time + 0.4;
if( RANDOM_LONG( 0, 1 ))
pev->nextthink = gpGlobals->time + 0.4;
pev->dmg = gSkillData.plrDmgRPG;
}

View File

@ -497,9 +497,6 @@ void CL_AddEntities( void )
}
else cl.lerpFrac = 1.0f - ( cl.frame.servertime - cl.time ) * (float)( cl.serverframetime * 0.0001f );
if( cl.refdef.paused )
cl.lerpFrac = 1.0f;
cl.render_flags = 0;
clgame.dllFuncs.pfnStartFrame(); // new frame has begin

View File

@ -1415,6 +1415,10 @@ void CL_Init( void )
Host_CheckChanges ();
cls.initialized = true;
// g-cont. disable for now
Cvar_SetValue( "cl_lw", 0 );
Cvar_SetValue( "cl_predict", 0 );
}

View File

@ -94,7 +94,7 @@ int CM_PointLeafnum( const vec3_t p );
mleaf_t *CM_PointInLeaf( const vec3_t p, mnode_t *node );
int CM_BoxLeafnums( const vec3_t mins, const vec3_t maxs, short *list, int listsize, int *lastleaf );
int CM_TempBoxModel( const vec3_t mins, const vec3_t maxs, bool capsule );
bool CM_BoxVisible( const vec3_t mins, const vec3_t maxs, byte *visbits );
bool CM_BoxVisible( const vec3_t mins, const vec3_t maxs, const byte *visbits );
int CM_HullPointContents( hull_t *hull, int num, const vec3_t p );
int CM_PointContents( const vec3_t p );
void CM_AmbientLevels( const vec3_t p, byte *pvolumes );

View File

@ -121,7 +121,7 @@ Returns true if any leaf in boxspace
is potentially visible
=============
*/
bool CM_BoxVisible( const vec3_t mins, const vec3_t maxs, byte *visbits )
bool CM_BoxVisible( const vec3_t mins, const vec3_t maxs, const byte *visbits )
{
short leafList[MAX_BOX_LEAFS];
int i, count;

View File

@ -298,6 +298,11 @@ static void Con_LoadConchars( void )
if( con_fontsize->integer < 0 ) Cvar_SetValue( "con_fontsize", 0 );
if( con_fontsize->integer > 2 ) Cvar_SetValue( "con_fontsize", 2 );
// select properly fontsize
if( scr_width->integer < 640 ) Cvar_SetValue( "con_fontsize", 0 );
else if( scr_width->integer >= 1280 ) Cvar_SetValue( "con_fontsize", 2 );
else Cvar_SetValue( "con_fontsize", 1 );
if( !re ) return;
// loading conchars

View File

@ -112,7 +112,7 @@ void BF_WriteOneBit( sizebuf_t *bf, int nValue )
void BF_WriteUBitLongExt( sizebuf_t *bf, uint curData, int numbits, bool bCheckRange )
{
#ifdef PARANOID
#ifdef _DEBUG
// make sure it doesn't overflow.
if( bCheckRange && numbits < 32 )
{

View File

@ -338,6 +338,7 @@ bool SV_CheckWater( edict_t *ent );
bool SV_RunThink( edict_t *ent );
void SV_FreeOldEntities( void );
bool SV_TestEntityPosition( edict_t *ent ); // for EntityInSolid checks
bool SV_TestPlayerPosition( edict_t *ent ); // for PlayerInSolid checks
//
// sv_move.c

View File

@ -1265,11 +1265,13 @@ bool SV_Multicast( int dest, const vec3_t origin, const edict_t *ent, bool direc
sv_client_t *cl, *current = svs.clients;
bool reliable = false;
bool specproxy = false;
float *viewOrg = NULL;
switch( dest )
{
case MSG_INIT:
if( sv.state == ss_loading )
// FIXME: implement back bufffers this solution is suxx
if( sv.state == ss_loading && BF_GetNumBytesWritten( &sv.signon ) < BF_GetMaxBytes( &sv.signon ) / 2 )
{
// copy signon buffer
BF_WriteBits( &sv.signon, BF_GetData( &sv.multicast ), BF_GetNumBitsWritten( &sv.multicast ));
@ -1322,6 +1324,7 @@ bool SV_Multicast( int dest, const vec3_t origin, const edict_t *ent, bool direc
{
if( cl->state == cs_free || cl->state == cs_zombie )
continue;
if( cl->state != cs_spawned && !reliable )
continue;
@ -1333,7 +1336,11 @@ bool SV_Multicast( int dest, const vec3_t origin, const edict_t *ent, bool direc
if( mask )
{
leafnum = CM_PointLeafnum( cl->edict->v.origin );
if( SV_IsValidEdict( cl->pViewEntity ))
viewOrg = cl->pViewEntity->v.origin;
else viewOrg = cl->edict->v.origin;
leafnum = CM_PointLeafnum( viewOrg );
if( mask && (!(mask[leafnum>>3] & (1<<( leafnum & 7 )))))
continue;
}

View File

@ -1638,13 +1638,13 @@ static const char *pfnTraceTexture( edict_t *pTextureEntity, const float *v1, co
/*
=============
pfnTraceSphere
pfnBoxVisible
FIXME: implement
=============
*/
static void pfnTraceSphere( const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr )
static int pfnBoxVisible( const float *mins, const float *maxs, const byte *pset )
{
return CM_BoxVisible( mins, maxs, pset );
}
/*
@ -2037,7 +2037,7 @@ pfnWriteShort
*/
void pfnWriteShort( int iValue )
{
BF_WriteShort( &sv.multicast, iValue );
BF_WriteShort( &sv.multicast, (short)iValue );
svgame.msg_realsize += 2;
}
@ -3526,7 +3526,7 @@ static enginefuncs_t gEngfuncs =
pfnTraceHull,
pfnTraceModel,
pfnTraceTexture,
pfnTraceSphere,
pfnBoxVisible,
pfnGetAimVector,
pfnServerCommand,
pfnServerExecute,
@ -3866,13 +3866,14 @@ void SV_UnloadProgs( void )
bool SV_LoadProgs( const char *name )
{
int i, version;
static APIFUNCTION GetEntityAPI;
static APIFUNCTION2 GetEntityAPI2;
static GIVEFNPTRSTODLL GiveFnptrsToDll;
static NEW_DLL_FUNCTIONS_FN GiveNewDllFuncs;
static globalvars_t gpGlobals;
static playermove_t gpMove;
edict_t *e;
int i;
if( svgame.hInstance ) SV_UnloadProgs();
@ -3887,6 +3888,8 @@ bool SV_LoadProgs( const char *name )
Mem_Set( &svgame.dllFuncs2, 0, sizeof( svgame.dllFuncs2 ));
GetEntityAPI = (APIFUNCTION)FS_GetProcAddress( svgame.hInstance, "GetEntityAPI" );
GetEntityAPI2 = (APIFUNCTION2)FS_GetProcAddress( svgame.hInstance, "GetEntityAPI2" );
GiveNewDllFuncs = (NEW_DLL_FUNCTIONS_FN)FS_GetProcAddress( svgame.hInstance, "GetNewDLLFunctions" );
if( !GetEntityAPI )
{
@ -3906,16 +3909,40 @@ bool SV_LoadProgs( const char *name )
return false;
}
if( !GetEntityAPI( &svgame.dllFuncs, INTERFACE_VERSION ))
version = INTERFACE_VERSION;
if( !GetEntityAPI( &svgame.dllFuncs, version ))
{
FS_FreeLibrary( svgame.hInstance );
MsgDev( D_ERROR, "SV_LoadProgs: couldn't get entity API\n" );
svgame.hInstance = NULL;
return false;
if( !GetEntityAPI2 )
{
FS_FreeLibrary( svgame.hInstance );
MsgDev( D_ERROR, "SV_LoadProgs: couldn't get entity API\n" );
svgame.hInstance = NULL;
return false;
}
else if( !GetEntityAPI2( &svgame.dllFuncs, &version ))
{
FS_FreeLibrary( svgame.hInstance );
MsgDev( D_ERROR, "SV_LoadProgs: interface version %i should be %i\n", INTERFACE_VERSION, version );
svgame.hInstance = NULL;
return false;
}
}
GiveFnptrsToDll( &gEngfuncs, svgame.globals );
// get extended callbacks
if( GiveNewDllFuncs )
{
version = NEW_DLL_FUNCTIONS_VERSION;
if( !GiveNewDllFuncs( &svgame.dllFuncs2, &version ))
{
MsgDev( D_WARN, "SV_LoadProgs: new interface version %i should be %i\n", NEW_DLL_FUNCTIONS_VERSION, version );
Mem_Set( &svgame.dllFuncs2, 0, sizeof( svgame.dllFuncs2 ));
}
}
svgame.globals->pStringBase = ""; // setup string base
svgame.globals->maxEntities = GI->max_edicts;

View File

@ -562,20 +562,23 @@ trace_t SV_PushEntity( edict_t *ent, const vec3_t lpush, const vec3_t apush, int
type = MOVE_NOMONSTERS; // only clip against bmodels
else type = MOVE_NORMAL;
trace = SV_Move( ent->v.origin, ent->v.mins, ent->v.maxs, end, type, ent );
VectorCopy( trace.vecEndPos, ent->v.origin );
SV_LinkEdict( ent, true );
if( apush[YAW] && ent->v.flags & FL_CLIENT && ( cl = SV_ClientFromEdict( ent, true )) != NULL )
trace = SV_Move( ent->v.origin, ent->v.mins, ent->v.maxs, end, type|FMOVE_SIMPLEBOX, ent );
if( !trace.fAllSolid && !trace.fStartSolid )
{
cl->addangle = apush[1];
ent->v.fixangle = 2;
}
VectorCopy( trace.vecEndPos, ent->v.origin );
SV_LinkEdict( ent, true );
// don't rotate pushables!
if( ent->v.movetype != MOVETYPE_PUSHSTEP )
{
ent->v.angles[YAW] += trace.flFraction * apush[YAW];
if( apush[YAW] && ent->v.flags & FL_CLIENT && ( cl = SV_ClientFromEdict( ent, true )) != NULL )
{
cl->addangle = apush[1];
ent->v.fixangle = 2;
}
// don't rotate pushables!
if( ent->v.movetype != MOVETYPE_PUSHSTEP )
{
ent->v.angles[YAW] += trace.flFraction * apush[YAW];
}
}
if( blocked ) *blocked = !VectorCompare( ent->v.origin, end ); // can't move full distance
@ -1441,6 +1444,12 @@ static void SV_Physics_Client( edict_t *ent )
default: return;
}
if( svgame.globals->force_retouch )
{
// force retouch even for stationary
SV_LinkEdict( ent, true );
}
// check client colliding with monster (e.g. tentacle damage)
trace = SV_Move( ent->v.origin, ent->v.mins, ent->v.maxs, ent->v.origin, MOVE_NORMAL, ent );
pHit = trace.pHit;
@ -1461,6 +1470,12 @@ static void SV_Physics_Entity( edict_t *ent )
}
ent->v.flags &= ~FL_BASEVELOCITY;
if( svgame.globals->force_retouch )
{
// force retouch even for stationary
SV_LinkEdict( ent, true );
}
// user dll can override movement type
if( svgame.dllFuncs2.pfnPhysicsEntity )
{
@ -1540,16 +1555,6 @@ void SV_Physics( void )
SV_CheckAllEnts ();
// treat each object in turn
for( i = 1; ( svgame.globals->force_retouch > 0 ) && i < svgame.numEntities; i++ )
{
ent = EDICT_NUM( i );
if( !SV_IsValidEdict( ent )) continue;
// force retouch even for stationary
SV_LinkEdict( ent, true );
}
// treat each object in turn
if( !( sv.hostflags & SVF_PLAYERSONLY ))
{

View File

@ -690,6 +690,20 @@ bool SV_TestEntityPosition( edict_t *ent )
return trace.fStartSolid;
}
/*
============
SV_TestPlayerPosition
same as SV_TestEntityPosition but check only players
============
*/
bool SV_TestPlayerPosition( edict_t *ent )
{
if( ent->v.flags & (FL_CLIENT|FL_FAKECLIENT))
return SV_TestEntityPosition( ent );
return false;
}
/*
===============================================================================
@ -963,30 +977,27 @@ static void SV_ClipToLinks( areanode_t *node, moveclip_t *clip )
if( clip->flags & FMOVE_IGNORE_GLASS && modType == mod_brush )
{
// we ignore brushes with rendermode != kRenderNormal
switch( touch->v.rendermode )
{
case kRenderTransAdd:
case kRenderTransAlpha:
case kRenderTransTexture:
continue; // passed through glass
default: break;
}
// we ignore brushes with rendermode != kRenderNormal and without FL_WORLDBRUSH set
if( touch->v.flags & FL_WORLDBRUSH );
else if( touch->v.rendermode != kRenderNormal )
continue;
}
// might intersect, so do an exact clip
if( clip->trace.fAllSolid ) return;
traceHitbox = false;
if( clip->passedict )
{
if( touch->v.owner == clip->passedict )
continue; // don't clip against own missiles
if( clip->passedict->v.owner == touch )
continue; // don't clip against owner
if( clip->passedict->v.solid == SOLID_BBOX && touch->v.solid != SOLID_BSP )
traceHitbox = true;
}
traceHitbox = false;
// select a properly trace method
if( modType == mod_studio && !( clip->flags & FMOVE_SIMPLEBOX ))
{

View File

@ -19,7 +19,7 @@
#define LAUNCH_DLL // ignore alias names
#include "launch_api.h"
#define XASH_VERSION 0.71f // current version will be shared across gameinfo struct
#define XASH_VERSION 0.72f // current version will be shared across gameinfo struct
#define MAX_NUM_ARGVS 128
#define MAX_STRING_TOKENS 80

View File

@ -17,7 +17,7 @@
#define MAX_DECALNAMES 1024 // server decal indexes (different decalnames, not a render limit)
#define MAX_USER_MESSAGES 191 // another 63 messages reserved for engine routines
#define MAX_EVENTS 1024 // playback events that can be queued (a byte range, don't touch)
#define MAX_MSGLEN 16384 // max length of network message
#define MAX_MSGLEN 32768 // max length of network message
#define MAX_GENERICS 1024 // generic files that can download from server
#define MAX_SOUNDS 2048 // max unique loaded sounds (not counting sequences)
#define MAX_MODELS 2048 // total count of brush & studio various models per one map

View File

@ -754,8 +754,7 @@ void S_RenderFrame( ref_params_t *fd )
s_listener.inmenu = si.IsInMenu();
s_listener.paused = fd->paused;
VectorCopy( fd->simorg, s_listener.origin );
VectorCopy( fd->vieworg, s_listener.vieworg );
VectorCopy( fd->vieworg, s_listener.origin );
VectorCopy( fd->simvel, s_listener.velocity );
VectorCopy( fd->forward, s_listener.forward );
VectorCopy( fd->right, s_listener.right );

View File

@ -102,8 +102,7 @@ typedef struct
typedef struct
{
vec3_t origin; // simorg
vec3_t vieworg; // simorg + view_ofs
vec3_t origin; // simorg + view_ofs
vec3_t velocity;
vec3_t forward;
vec3_t right;

View File

@ -2262,7 +2262,7 @@ byte *Mod_GetCurrentVis( void )
bool Mod_CullBox( const vec3_t mins, const vec3_t maxs )
{
return R_CullBox( mins, maxs, 15 );
return R_CullBox( mins, maxs, RI.clipFlags );
}
shader_t R_GetSpriteTexture( int spriteIndex, int spriteFrame )

View File

@ -1219,7 +1219,7 @@ void R_StudioSetUpTransform( ref_entity_t *e, bool trivial_accept )
}
// update it so attachments always have right pos
VectorCopy( origin, e->origin );
if( !RI.refdef.paused ) VectorCopy( origin, e->origin );
}
// don't rotate clients, only aim