@ -993,7 +993,7 @@ void CHudSpectator::DrawOverviewLayer()
if ( hasMapImage)
{
i = m_MapSprite->numframes / (4*3);
i = sqrt(i);
i = sqrt(float(i));
xTiles = i*4;
yTiles = i*3;
}
@ -54,7 +54,7 @@ float rel_pitch;
#define IMPULSE_DOWN 2
#define IMPULSE_UP 4
bool CL_IsDead();
int CL_IsDead( void );
Vector dead_viewangles(0, 0, 0);
void IN_ToggleButtons( float forwardmove, float sidemove )
@ -32,6 +32,10 @@
extern vec3_t vec3_origin;
#ifdef _MSC_VER
vec3_t vec3_origin;
#endif
double sqrt( double x );
float Length( const float *v )
@ -27,6 +27,8 @@
#define BOLT_AIR_VELOCITY 2000
#define BOLT_WATER_VELOCITY 1000
extern BOOL gPhysicsInterfaceInitialized;
// UNDONE: Save/restore this? Don't forget to set classname and LINK_ENTITY_TO_CLASS()
//
// OVERLOADS SOME ENTVARS:
@ -181,10 +183,12 @@ void CCrossbowBolt::BoltTouch( CBaseEntity *pOther )
pev->angles.z = RANDOM_LONG( 0, 360 );
pev->nextthink = gpGlobals->time + 60.0;
if (gPhysicsInterfaceInitialized) {
// g-cont. Setup movewith feature
pev->movetype = MOVETYPE_COMPOUND; // set movewith type
pev->aiment = ENT( pOther->pev ); // set parent
if( UTIL_PointContents( pev->origin ) != CONTENTS_WATER )
@ -411,7 +411,7 @@ LINK_ENTITY_TO_CLASS( trip_beam, CTripBeam )
void CTripBeam::Spawn( void )
CLightning::Spawn();
SetTouch( &TriggerTouch );
SetTouch( &CLightning::TriggerTouch );
pev->solid = SOLID_TRIGGER;
RelinkBeam();
@ -1268,7 +1268,7 @@ void CSprite::TurnOn( void )
pev->effects = 0;
if( ( pev->framerate && m_maxFrame > 1.0 ) || ( pev->spawnflags & SF_SPRITE_ONCE ) )
SetThink( &CSprite::CSprite::AnimateThink );
SetThink( &CSprite::AnimateThink );
pev->nextthink = gpGlobals->time;
m_lastTime = gpGlobals->time;
@ -45,6 +45,8 @@ LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt )
#include <unistd.h>
#include <sys/stat.h>
#define CreateDirectory(p, n) mkdir(p, 0777)
#else
#define CreateDirectory(p, n) CreateDirectoryA(p, n)
//=========================================================
@ -1342,6 +1342,8 @@ BOOL CTalkMonster::CanFollow( void )
if( m_MonsterState == MONSTERSTATE_SCRIPT )
if( !m_pCine )
return FALSE;
if( !m_pCine->CanInterrupt() )
@ -1243,7 +1243,7 @@ void CBasePlayerAmmo::DefaultTouch( CBaseEntity *pOther )
int CBasePlayerWeapon::ExtractAmmo( CBasePlayerWeapon *pWeapon )
int iReturn;
int iReturn = 0;
if( pszAmmo1() != NULL )
@ -825,6 +825,8 @@ static physics_interface_t gPhysicsInterface =
DispatchPhysicsEntity,
};
BOOL gPhysicsInterfaceInitialized = FALSE;
int Server_GetPhysicsInterface( int iVersion, server_physics_api_t *pfuncsFromEngine, physics_interface_t *pFunctionTable )
if( !pFunctionTable || !pfuncsFromEngine || iVersion != SV_PHYSICS_INTERFACE_VERSION )
@ -837,6 +839,6 @@ int Server_GetPhysicsInterface( int iVersion, server_physics_api_t *pfuncsFromEn
// fill engine callbacks
memcpy( pFunctionTable, &gPhysicsInterface, sizeof(physics_interface_t) );
gPhysicsInterfaceInitialized = TRUE;
return TRUE;
@ -33,8 +33,8 @@
#ifdef CLIENT_DLL
// Spectator Mode
int iJumpSpectator;
float vJumpOrigin[3];
float vJumpAngles[3];
extern float vJumpOrigin[3];
extern float vJumpAngles[3];
static int pm_shared_initialized = 0;