forked from FWGS/Paranoia2
dlls: fix build
This commit is contained in:
parent
e3cfefbd5c
commit
a9d98679f3
@ -550,7 +550,8 @@ float SetController( void *pmodel, byte *controller, int iController, float flVa
|
|||||||
mstudiobonecontroller_t *pbonecontroller = (mstudiobonecontroller_t *)((byte *)pstudiohdr + pstudiohdr->bonecontrollerindex);
|
mstudiobonecontroller_t *pbonecontroller = (mstudiobonecontroller_t *)((byte *)pstudiohdr + pstudiohdr->bonecontrollerindex);
|
||||||
|
|
||||||
// find first controller that matches the index
|
// find first controller that matches the index
|
||||||
for( int i = 0; i < pstudiohdr->numbonecontrollers; i++, pbonecontroller++ )
|
int i;
|
||||||
|
for( i = 0; i < pstudiohdr->numbonecontrollers; i++, pbonecontroller++ )
|
||||||
{
|
{
|
||||||
if( pbonecontroller->index == iController )
|
if( pbonecontroller->index == iController )
|
||||||
break;
|
break;
|
||||||
@ -603,7 +604,8 @@ float GetControllerBound2( void *pmodel, int iController )
|
|||||||
mstudiobonecontroller_t *pbonecontroller = (mstudiobonecontroller_t *)((byte *)pstudiohdr + pstudiohdr->bonecontrollerindex);
|
mstudiobonecontroller_t *pbonecontroller = (mstudiobonecontroller_t *)((byte *)pstudiohdr + pstudiohdr->bonecontrollerindex);
|
||||||
|
|
||||||
// find first controller that matches the index
|
// find first controller that matches the index
|
||||||
for( int i = 0; i < pstudiohdr->numbonecontrollers; i++, pbonecontroller++ )
|
int i;
|
||||||
|
for( i = 0; i < pstudiohdr->numbonecontrollers; i++, pbonecontroller++ )
|
||||||
{
|
{
|
||||||
if( pbonecontroller->index == iController )
|
if( pbonecontroller->index == iController )
|
||||||
break;
|
break;
|
||||||
@ -792,4 +794,4 @@ float SequenceDuration( void *pmodel, float poseparams[], int iSequence )
|
|||||||
|
|
||||||
g_boneSetup.SetStudioPointers( pstudiohdr, poseparams );
|
g_boneSetup.SetStudioPointers( pstudiohdr, poseparams );
|
||||||
return g_boneSetup.LocalDuration( iSequence );
|
return g_boneSetup.LocalDuration( iSequence );
|
||||||
}
|
}
|
||||||
|
@ -323,9 +323,11 @@ void CEnvState::Think( void )
|
|||||||
{
|
{
|
||||||
ALERT(at_debug,"DEBUG: env_state \"%s\" turned itself off",STRING(pev->targetname));
|
ALERT(at_debug,"DEBUG: env_state \"%s\" turned itself off",STRING(pev->targetname));
|
||||||
if (pev->target)
|
if (pev->target)
|
||||||
|
{
|
||||||
ALERT(at_debug,": firing %s",STRING(pev->target));
|
ALERT(at_debug,": firing %s",STRING(pev->target));
|
||||||
if (pev->noise2)
|
if (pev->noise2)
|
||||||
ALERT(at_debug," and %s",STRING(pev->noise2));
|
ALERT(at_debug," and %s",STRING(pev->noise2));
|
||||||
|
}
|
||||||
else if (pev->noise2)
|
else if (pev->noise2)
|
||||||
ALERT(at_debug,": firing %s",STRING(pev->noise2));
|
ALERT(at_debug,": firing %s",STRING(pev->noise2));
|
||||||
ALERT(at_debug,".\n");
|
ALERT(at_debug,".\n");
|
||||||
|
@ -455,7 +455,7 @@ BOOL CBaseMonster :: HasHumanGibs( void )
|
|||||||
|
|
||||||
// these types of monster don't use gibs
|
// these types of monster don't use gibs
|
||||||
if ( myClass == CLASS_NONE || myClass == CLASS_MACHINE ||
|
if ( myClass == CLASS_NONE || myClass == CLASS_MACHINE ||
|
||||||
myClass == CLASS_PLAYER_BIOWEAPON && myClass == CLASS_ALIEN_BIOWEAPON)
|
(myClass == CLASS_PLAYER_BIOWEAPON && myClass == CLASS_ALIEN_BIOWEAPON))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -472,7 +472,7 @@ BOOL CBaseMonster :: HasAlienGibs( void )
|
|||||||
|
|
||||||
// these types of monster don't use gibs
|
// these types of monster don't use gibs
|
||||||
if ( myClass == CLASS_NONE || myClass == CLASS_MACHINE ||
|
if ( myClass == CLASS_NONE || myClass == CLASS_MACHINE ||
|
||||||
myClass == CLASS_PLAYER_BIOWEAPON && myClass == CLASS_ALIEN_BIOWEAPON)
|
(myClass == CLASS_PLAYER_BIOWEAPON && myClass == CLASS_ALIEN_BIOWEAPON))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -505,7 +505,7 @@ void CBaseMonster :: GibMonster( void )
|
|||||||
|
|
||||||
EMIT_SOUND(ENT(pev), CHAN_WEAPON, "common/bodysplat.wav", 1, ATTN_NORM);
|
EMIT_SOUND(ENT(pev), CHAN_WEAPON, "common/bodysplat.wav", 1, ATTN_NORM);
|
||||||
|
|
||||||
if ( iszCustomGibs = HasCustomGibs() ) //LRC - monster_generic can have a custom gibset
|
if ( (iszCustomGibs = HasCustomGibs()) ) //LRC - monster_generic can have a custom gibset
|
||||||
{
|
{
|
||||||
if ( CVAR_GET_FLOAT("violence_hgibs") != 0 )
|
if ( CVAR_GET_FLOAT("violence_hgibs") != 0 )
|
||||||
{
|
{
|
||||||
|
@ -392,7 +392,7 @@ void CBaseDoor::Spawn( )
|
|||||||
SetTouch ( NULL );
|
SetTouch ( NULL );
|
||||||
}
|
}
|
||||||
else // touchable button
|
else // touchable button
|
||||||
SetTouch( DoorTouch );
|
SetTouch( &CBaseDoor::DoorTouch );
|
||||||
}
|
}
|
||||||
//END
|
//END
|
||||||
|
|
||||||
@ -965,7 +965,7 @@ void CBaseDoor::Blocked( CBaseEntity *pOther )
|
|||||||
if ( !pTarget )
|
if ( !pTarget )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ( VARS( pTarget->pev ) != pev && FClassnameIs ( pTarget->pev, "func_door" ) ||
|
if ( ( VARS( pTarget->pev ) != pev && FClassnameIs ( pTarget->pev, "func_door" )) ||
|
||||||
FClassnameIs ( pTarget->pev, "func_door_rotating" ) )
|
FClassnameIs ( pTarget->pev, "func_door_rotating" ) )
|
||||||
{
|
{
|
||||||
pDoor = GetClassPtr( (CBaseDoor *) VARS(pTarget->pev) );
|
pDoor = GetClassPtr( (CBaseDoor *) VARS(pTarget->pev) );
|
||||||
|
@ -3939,7 +3939,7 @@ void CEnvDLight::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE us
|
|||||||
{
|
{
|
||||||
if (pev->spawnflags & SF_DLIGHT_ONLYONCE)
|
if (pev->spawnflags & SF_DLIGHT_ONLYONCE)
|
||||||
{
|
{
|
||||||
SetThink( SUB_Remove );
|
SetThink( &CEnvDLight::SUB_Remove );
|
||||||
SetNextThink( 0 );
|
SetNextThink( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3973,7 +3973,7 @@ void CEnvDLight::Think( void )
|
|||||||
|
|
||||||
if (pev->spawnflags & SF_DLIGHT_ONLYONCE)
|
if (pev->spawnflags & SF_DLIGHT_ONLYONCE)
|
||||||
{
|
{
|
||||||
SetThink( SUB_Remove );
|
SetThink( &CEnvDLight::SUB_Remove );
|
||||||
SetNextThink( 0 );
|
SetNextThink( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4680,7 +4680,8 @@ public:
|
|||||||
if( pev->skin <= 0 || pev->skin > 6 )
|
if( pev->skin <= 0 || pev->skin > 6 )
|
||||||
{
|
{
|
||||||
// try all directions
|
// try all directions
|
||||||
for( int i = 0; i < 6; i++ )
|
int i;
|
||||||
|
for( i = 0; i < 6; i++ )
|
||||||
if( PasteDecal( i )) break;
|
if( PasteDecal( i )) break;
|
||||||
if( i == 6 ) ALERT( at_warning, "failed to place decal %s\n", STRING( pev->netname ));
|
if( i == 6 ) ALERT( at_warning, "failed to place decal %s\n", STRING( pev->netname ));
|
||||||
}
|
}
|
||||||
@ -4871,12 +4872,12 @@ public:
|
|||||||
}
|
}
|
||||||
else if( pev->sequence )
|
else if( pev->sequence )
|
||||||
{
|
{
|
||||||
SetThink( CineThink );
|
SetThink( &CDynamicLight::CineThink );
|
||||||
SetNextThink( 0.1f );
|
SetNextThink( 0.1f );
|
||||||
}
|
}
|
||||||
else if( pev->scale )
|
else if( pev->scale )
|
||||||
{
|
{
|
||||||
SetThink( PVSThink );
|
SetThink( &CDynamicLight::PVSThink );
|
||||||
SetNextThink( 0.1f );
|
SetNextThink( 0.1f );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4924,12 +4925,12 @@ public:
|
|||||||
}
|
}
|
||||||
else if( pev->sequence )
|
else if( pev->sequence )
|
||||||
{
|
{
|
||||||
SetThink( CineThink );
|
SetThink( &CDynamicLight::CineThink );
|
||||||
SetNextThink( 0.1f );
|
SetNextThink( 0.1f );
|
||||||
}
|
}
|
||||||
else if( pev->scale )
|
else if( pev->scale )
|
||||||
{
|
{
|
||||||
SetThink( PVSThink );
|
SetThink( &CDynamicLight::PVSThink );
|
||||||
SetNextThink( 0.1f );
|
SetNextThink( 0.1f );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5034,7 +5035,7 @@ void CFuncScreenMovie :: Spawn( void )
|
|||||||
// enable monitor
|
// enable monitor
|
||||||
if( FBitSet( pev->spawnflags, SF_SCREENMOVIE_START_ON ))
|
if( FBitSet( pev->spawnflags, SF_SCREENMOVIE_START_ON ))
|
||||||
{
|
{
|
||||||
SetThink( SUB_CallUseToggle );
|
SetThink( &CFuncScreenMovie::SUB_CallUseToggle );
|
||||||
SetNextThink( 0.1 );
|
SetNextThink( 0.1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5047,7 +5048,7 @@ void CFuncScreenMovie :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetThink( CineThink );
|
SetThink( &CFuncScreenMovie::CineThink );
|
||||||
|
|
||||||
if( ShouldToggle( useType ))
|
if( ShouldToggle( useType ))
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
//typedef unsigned long ULONG;
|
//typedef unsigned long ULONG;
|
||||||
typedef unsigned char BYTE;
|
typedef unsigned char BYTE;
|
||||||
typedef int BOOL;
|
typedef int BOOL;
|
||||||
#define MAX_PATH PATH_MAX
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#ifndef min
|
#ifndef min
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
virtual int Save( CSave &save );
|
virtual int Save( CSave &save );
|
||||||
virtual int Restore( CRestore &restore );
|
virtual int Restore( CRestore &restore );
|
||||||
static TYPEDESCRIPTION m_SaveData[];
|
static TYPEDESCRIPTION m_SaveData[];
|
||||||
BOOL CFuncTankControls :: OnControls( entvars_t *pevTest );
|
BOOL OnControls( entvars_t *pevTest );
|
||||||
|
|
||||||
BOOL m_active; // am I being used to control tanks right now?
|
BOOL m_active; // am I being used to control tanks right now?
|
||||||
Vector m_vecControllerUsePos; // where was the player standing when he used me?
|
Vector m_vecControllerUsePos; // where was the player standing when he used me?
|
||||||
@ -234,7 +234,7 @@ protected:
|
|||||||
|
|
||||||
int m_iTankClass; // Behave As
|
int m_iTankClass; // Behave As
|
||||||
|
|
||||||
void CFuncTank::UpdateSpot( void );
|
void UpdateSpot( void );
|
||||||
// CLaserSpot* m_pViewTarg; // Player view indicator
|
// CLaserSpot* m_pViewTarg; // Player view indicator
|
||||||
|
|
||||||
CPointEntity *m_pFireProxy; //LRC - locus position for custom shots
|
CPointEntity *m_pFireProxy; //LRC - locus position for custom shots
|
||||||
@ -1595,7 +1595,7 @@ void CFuncTankControls :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, US
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
//LRC- Now uses FindEntityByTargetname, so that aliases work.
|
//LRC- Now uses FindEntityByTargetname, so that aliases work.
|
||||||
while (tryTank = UTIL_FindEntityByTargetname(tryTank, STRING(pev->target)))
|
while ((tryTank = UTIL_FindEntityByTargetname(tryTank, STRING(pev->target))))
|
||||||
{
|
{
|
||||||
if (!strncmp( STRING(tryTank->pev->classname), "func_tank", 9 ))
|
if (!strncmp( STRING(tryTank->pev->classname), "func_tank", 9 ))
|
||||||
{
|
{
|
||||||
@ -1635,7 +1635,7 @@ void CFuncTankControls :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, US
|
|||||||
//ALERT(at_console, "TANK controls deactivated\n");
|
//ALERT(at_console, "TANK controls deactivated\n");
|
||||||
|
|
||||||
//LRC- Now uses FindEntityByTargetname, so that aliases work.
|
//LRC- Now uses FindEntityByTargetname, so that aliases work.
|
||||||
while (tryTank = UTIL_FindEntityByTargetname(tryTank, STRING(pev->target)))
|
while ((tryTank = UTIL_FindEntityByTargetname(tryTank, STRING(pev->target))))
|
||||||
{
|
{
|
||||||
if (FClassnameIs(tryTank->pev, "func_tank") || FClassnameIs(tryTank->pev, "func_tanklaser") || FClassnameIs(tryTank->pev, "func_tankmortar") || FClassnameIs(tryTank->pev, "func_tankrocket"))
|
if (FClassnameIs(tryTank->pev, "func_tank") || FClassnameIs(tryTank->pev, "func_tanklaser") || FClassnameIs(tryTank->pev, "func_tankmortar") || FClassnameIs(tryTank->pev, "func_tankrocket"))
|
||||||
{
|
{
|
||||||
|
@ -355,7 +355,7 @@ void CHGrunt :: SpeakSentence( void )
|
|||||||
int CHGrunt::IRelationship ( CBaseEntity *pTarget )
|
int CHGrunt::IRelationship ( CBaseEntity *pTarget )
|
||||||
{
|
{
|
||||||
//LRC- only hate alien grunts if my behaviour hasn't been overridden
|
//LRC- only hate alien grunts if my behaviour hasn't been overridden
|
||||||
if (!m_iClass && FClassnameIs( pTarget->pev, "monster_alien_grunt" ) || ( FClassnameIs( pTarget->pev, "monster_gargantua" ) ) )
|
if ((!m_iClass && FClassnameIs( pTarget->pev, "monster_alien_grunt" )) || ( FClassnameIs( pTarget->pev, "monster_gargantua" ) ) )
|
||||||
{
|
{
|
||||||
return R_NM;
|
return R_NM;
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ public:
|
|||||||
BOOL FValidateHintType ( short sHint );
|
BOOL FValidateHintType ( short sHint );
|
||||||
BOOL FCanActiveIdle ( void );
|
BOOL FCanActiveIdle ( void );
|
||||||
Schedule_t *GetScheduleOfType ( int Type );
|
Schedule_t *GetScheduleOfType ( int Type );
|
||||||
Schedule_t *CHoundeye :: GetSchedule( void );
|
Schedule_t *GetSchedule( void );
|
||||||
|
|
||||||
int Save( CSave &save );
|
int Save( CSave &save );
|
||||||
int Restore( CRestore &restore );
|
int Restore( CRestore &restore );
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
{
|
{
|
||||||
pev->effects &= ~EF_NODRAW;
|
pev->effects &= ~EF_NODRAW;
|
||||||
|
|
||||||
SetThink( PVSThink );
|
SetThink( &CFlashlight::PVSThink );
|
||||||
SetNextThink( 0.1f );
|
SetNextThink( 0.1f );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,4 +166,4 @@ public:
|
|||||||
int m_iBackwardLen;
|
int m_iBackwardLen;
|
||||||
EHANDLE m_hOwner;
|
EHANDLE m_hOwner;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -112,7 +112,7 @@ void COfficerBlood::Shoot( entvars_t *pevOwner, Vector vecStart, Vector vecVeloc
|
|||||||
pBlood->pev->gravity = 1000;
|
pBlood->pev->gravity = 1000;
|
||||||
pBlood->pev->owner = ENT(pevOwner);
|
pBlood->pev->owner = ENT(pevOwner);
|
||||||
|
|
||||||
pBlood->SetThink ( Animate );
|
pBlood->SetThink ( &COfficerBlood::Animate );
|
||||||
pBlood->pev->nextthink = gpGlobals->time + 0.1;
|
pBlood->pev->nextthink = gpGlobals->time + 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ void COfficerBlood :: Touch ( CBaseEntity *pOther )
|
|||||||
pOther->TakeDamage ( pev, pev, gSkillData.superofficerDmgBlood, DMG_GENERIC );
|
pOther->TakeDamage ( pev, pev, gSkillData.superofficerDmgBlood, DMG_GENERIC );
|
||||||
}
|
}
|
||||||
|
|
||||||
SetThink ( SUB_Remove );
|
SetThink ( &COfficerBlood::SUB_Remove );
|
||||||
pev->nextthink = gpGlobals->time;
|
pev->nextthink = gpGlobals->time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2754,7 +2754,7 @@ void CBaseMonster :: UpdateYaw( int yawSpeed )
|
|||||||
{
|
{
|
||||||
float ideal, current, newYaw;
|
float ideal, current, newYaw;
|
||||||
|
|
||||||
if( yawSpeed = -1 )
|
if( yawSpeed == -1 )
|
||||||
yawSpeed = pev->yaw_speed;
|
yawSpeed = pev->yaw_speed;
|
||||||
|
|
||||||
// NOTE: GetIdealYaw() will never exactly be reached because UTIL_AngleMod
|
// NOTE: GetIdealYaw() will never exactly be reached because UTIL_AngleMod
|
||||||
@ -4004,4 +4004,4 @@ void CTargetMonster::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
|
|||||||
else
|
else
|
||||||
pev->health = 1;
|
pev->health = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -546,7 +546,7 @@ void CHalfLifeMultiplay :: PlayerSpawn( CBasePlayer *pPlayer )
|
|||||||
|
|
||||||
addDefault = TRUE;
|
addDefault = TRUE;
|
||||||
|
|
||||||
while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ))
|
while (( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" )))
|
||||||
{
|
{
|
||||||
pWeaponEntity->Touch( pPlayer );
|
pWeaponEntity->Touch( pPlayer );
|
||||||
addDefault = FALSE;
|
addDefault = FALSE;
|
||||||
|
@ -2428,7 +2428,7 @@ void CFuncTrackChange :: UpdateTrain( Vector &dest )
|
|||||||
float time;
|
float time;
|
||||||
Vector vel = pev->velocity;
|
Vector vel = pev->velocity;
|
||||||
|
|
||||||
if (m_pfnThink == LinearMoveNow)
|
if (m_pfnThink == &CFuncTrackChange::LinearMoveNow)
|
||||||
{
|
{
|
||||||
// we're going to do a LinearMoveNow: calculate the velocity it'll have
|
// we're going to do a LinearMoveNow: calculate the velocity it'll have
|
||||||
Vector vecDest;
|
Vector vecDest;
|
||||||
|
@ -5753,7 +5753,7 @@ void CBasePlayer::SetJumpHeight(int value)
|
|||||||
{
|
{
|
||||||
m_iJumpHeight = value;
|
m_iJumpHeight = value;
|
||||||
char buf[16];
|
char buf[16];
|
||||||
itoa(m_iJumpHeight, buf, 10);
|
Q_snprintf(buf, sizeof(buf), "%d", m_iJumpHeight);
|
||||||
g_engfuncs.pfnSetPhysicsKeyValue( edict(), "jh", buf );
|
g_engfuncs.pfnSetPhysicsKeyValue( edict(), "jh", buf );
|
||||||
// ALERT(at_aiconsole, "SETTING JUMP: %s\n", buf);
|
// ALERT(at_aiconsole, "SETTING JUMP: %s\n", buf);
|
||||||
}
|
}
|
||||||
@ -5831,4 +5831,4 @@ void CBasePlayer::ViewPunch( float p, float y, float r )
|
|||||||
pev->fuser2 -= p * 20;
|
pev->fuser2 -= p * 20;
|
||||||
pev->fuser3 += y * 20;
|
pev->fuser3 += y * 20;
|
||||||
pev->fuser4 += r * 20;
|
pev->fuser4 += r * 20;
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ void CPropExplosion :: Spawn( void )
|
|||||||
pev->nextthink = gpGlobals->time + 0.1;
|
pev->nextthink = gpGlobals->time + 0.1;
|
||||||
|
|
||||||
// SetTouch( PropTouch ); //maybe later
|
// SetTouch( PropTouch ); //maybe later
|
||||||
SetThink( PropThink );
|
SetThink( &CPropExplosion::PropThink );
|
||||||
|
|
||||||
//If not defined, add standart value
|
//If not defined, add standart value
|
||||||
if(!m_startHealth )
|
if(!m_startHealth )
|
||||||
@ -267,4 +267,4 @@ float CPropExplosion::CalculationSpriteScale( )
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
return Averagescale;
|
return Averagescale;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ public:
|
|||||||
void WritePositionVector( const char *pname, const float *value, int count ); // array of pos vectors
|
void WritePositionVector( const char *pname, const float *value, int count ); // array of pos vectors
|
||||||
void WriteFunction( const char *pname, const int *value, int count ); // Save a function pointer
|
void WriteFunction( const char *pname, const int *value, int count ); // Save a function pointer
|
||||||
// Save a function pointer. (LRC- also pass the classname to allow better error messages)
|
// Save a function pointer. (LRC- also pass the classname to allow better error messages)
|
||||||
void WriteFunction( const char* cname, const char *pname, const int *value, int count );
|
void WriteFunction( const char* cname, const char *pname, void **value, int count );
|
||||||
|
|
||||||
int WriteEntVars( const char *pname, entvars_t *pev ); // Save entvars_t (entvars_t)
|
int WriteEntVars( const char *pname, entvars_t *pev ); // Save entvars_t (entvars_t)
|
||||||
int WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount );
|
int WriteFields( const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount );
|
||||||
|
@ -1060,7 +1060,7 @@ MONSTERSTATE CScientist :: GetIdealState ( void )
|
|||||||
if ( IsFollowing() )
|
if ( IsFollowing() )
|
||||||
{
|
{
|
||||||
int relationship = IRelationship( m_hEnemy );
|
int relationship = IRelationship( m_hEnemy );
|
||||||
if ( relationship != R_FR || relationship != R_HT && !HasConditions( bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE ) )
|
if ( relationship != R_FR || ( relationship != R_HT && !HasConditions( bits_COND_LIGHT_DAMAGE | bits_COND_HEAVY_DAMAGE ) ))
|
||||||
{
|
{
|
||||||
// Don't go to combat if you're following the player
|
// Don't go to combat if you're following the player
|
||||||
m_IdealMonsterState = MONSTERSTATE_ALERT;
|
m_IdealMonsterState = MONSTERSTATE_ALERT;
|
||||||
|
@ -187,7 +187,7 @@ void CHalfLifeRules :: PlayerSpawn( CBasePlayer *pPlayer )
|
|||||||
|
|
||||||
// LRC what's wrong with allowing "game_player_equip" entities in single player? (The
|
// LRC what's wrong with allowing "game_player_equip" entities in single player? (The
|
||||||
// level designer is God: if he wants the player to start with a weapon, we should allow it!)
|
// level designer is God: if he wants the player to start with a weapon, we should allow it!)
|
||||||
while ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ))
|
while (( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" )))
|
||||||
{
|
{
|
||||||
pWeaponEntity->Touch( pPlayer );
|
pWeaponEntity->Touch( pPlayer );
|
||||||
}
|
}
|
||||||
|
@ -221,7 +221,7 @@ void CSqueakGrenade::HuntThink( void )
|
|||||||
pev->velocity = pev->velocity * 0.9;
|
pev->velocity = pev->velocity * 0.9;
|
||||||
pev->velocity.z += 8.0;
|
pev->velocity.z += 8.0;
|
||||||
}
|
}
|
||||||
else if (pev->movetype = MOVETYPE_FLY)
|
else if (pev->movetype == MOVETYPE_FLY)
|
||||||
{
|
{
|
||||||
pev->movetype = MOVETYPE_BOUNCE;
|
pev->movetype = MOVETYPE_BOUNCE;
|
||||||
}
|
}
|
||||||
@ -396,4 +396,4 @@ void CSqueakGrenade::SuperBounceTouch( CBaseEntity *pOther )
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_flNextBounceSoundTime = gpGlobals->time + 0.5;// half second.
|
m_flNextBounceSoundTime = gpGlobals->time + 0.5;// half second.
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ void UpdateStats( CBasePlayer *pPlayer )
|
|||||||
float ammo = 0;
|
float ammo = 0;
|
||||||
for (i = 1; i < MAX_AMMO_SLOTS; i++)
|
for (i = 1; i < MAX_AMMO_SLOTS; i++)
|
||||||
{
|
{
|
||||||
ammo += ammoCount[i] * AmmoDamage( CBasePlayerItem::AmmoInfoArray[i].pszName );
|
ammo += ammoCount[i] * AmmoDamage( CBasePlayerAmmo::AmmoInfoArray[i].pszName );
|
||||||
}
|
}
|
||||||
|
|
||||||
float health = pPlayer->pev->health + pPlayer->pev->armorvalue * 2; // Armor is 2X health
|
float health = pPlayer->pev->health + pPlayer->pev->armorvalue * 2; // Armor is 2X health
|
||||||
|
@ -673,7 +673,7 @@ CBaseEntity *CTalkMonster::EnumFriends( CBaseEntity *pPrevious, int listNumber,
|
|||||||
Vector vecCheck;
|
Vector vecCheck;
|
||||||
|
|
||||||
pszFriend = m_szFriends[ FriendNumber(listNumber) ];
|
pszFriend = m_szFriends[ FriendNumber(listNumber) ];
|
||||||
while (pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend ))
|
while ((pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend )))
|
||||||
{
|
{
|
||||||
if (pFriend == this || !pFriend->IsAlive())
|
if (pFriend == this || !pFriend->IsAlive())
|
||||||
// don't talk to self or dead people
|
// don't talk to self or dead people
|
||||||
@ -706,7 +706,7 @@ void CTalkMonster::AlertFriends( void )
|
|||||||
// for each friend in this bsp...
|
// for each friend in this bsp...
|
||||||
for ( i = 0; i < TLK_CFRIENDS; i++ )
|
for ( i = 0; i < TLK_CFRIENDS; i++ )
|
||||||
{
|
{
|
||||||
while (pFriend = EnumFriends( pFriend, i, TRUE ))
|
while ((pFriend = EnumFriends( pFriend, i, TRUE )))
|
||||||
{
|
{
|
||||||
CBaseMonster *pMonster = pFriend->MyMonsterPointer();
|
CBaseMonster *pMonster = pFriend->MyMonsterPointer();
|
||||||
if ( pMonster->IsAlive() )
|
if ( pMonster->IsAlive() )
|
||||||
@ -728,7 +728,7 @@ void CTalkMonster::ShutUpFriends( void )
|
|||||||
// for each friend in this bsp...
|
// for each friend in this bsp...
|
||||||
for ( i = 0; i < TLK_CFRIENDS; i++ )
|
for ( i = 0; i < TLK_CFRIENDS; i++ )
|
||||||
{
|
{
|
||||||
while (pFriend = EnumFriends( pFriend, i, TRUE ))
|
while ((pFriend = EnumFriends( pFriend, i, TRUE )))
|
||||||
{
|
{
|
||||||
CBaseMonster *pMonster = pFriend->MyMonsterPointer();
|
CBaseMonster *pMonster = pFriend->MyMonsterPointer();
|
||||||
if ( pMonster )
|
if ( pMonster )
|
||||||
@ -751,7 +751,7 @@ void CTalkMonster::LimitFollowers( CBaseEntity *pPlayer, int maxFollowers )
|
|||||||
// for each friend in this bsp...
|
// for each friend in this bsp...
|
||||||
for ( i = 0; i < TLK_CFRIENDS; i++ )
|
for ( i = 0; i < TLK_CFRIENDS; i++ )
|
||||||
{
|
{
|
||||||
while (pFriend = EnumFriends( pFriend, i, FALSE ))
|
while ((pFriend = EnumFriends( pFriend, i, FALSE )))
|
||||||
{
|
{
|
||||||
CBaseMonster *pMonster = pFriend->MyMonsterPointer();
|
CBaseMonster *pMonster = pFriend->MyMonsterPointer();
|
||||||
if ( pMonster )
|
if ( pMonster )
|
||||||
@ -909,7 +909,7 @@ CBaseEntity *CTalkMonster :: FindNearestFriend(BOOL fPlayer)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// for each friend in this bsp...
|
// for each friend in this bsp...
|
||||||
while (pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend ))
|
while ((pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend )))
|
||||||
{
|
{
|
||||||
if (pFriend == this || !pFriend->IsAlive())
|
if (pFriend == this || !pFriend->IsAlive())
|
||||||
// don't talk to self or dead people
|
// don't talk to self or dead people
|
||||||
|
@ -431,7 +431,7 @@ Vector UTIL_YawToVector( float yaw )
|
|||||||
|
|
||||||
//LRC - pass in a normalised axis vector and a number of degrees, and this returns the corresponding
|
//LRC - pass in a normalised axis vector and a number of degrees, and this returns the corresponding
|
||||||
// angles value for an entity.
|
// angles value for an entity.
|
||||||
inline Vector UTIL_AxisRotationToAngles( const Vector &vecAxis, float flDegs )
|
Vector UTIL_AxisRotationToAngles( const Vector &vecAxis, float flDegs )
|
||||||
{
|
{
|
||||||
Vector vecTemp = UTIL_AxisRotationToVec( vecAxis, flDegs );
|
Vector vecTemp = UTIL_AxisRotationToVec( vecAxis, flDegs );
|
||||||
float rgflVecOut[3];
|
float rgflVecOut[3];
|
||||||
@ -2601,7 +2601,7 @@ void CSave :: WritePositionVector( const char *pname, const float *value, int co
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CSave :: WriteFunction( const char* cname, const char *pname, const int *data, int count )
|
void CSave :: WriteFunction( const char* cname, const char *pname, void **data, int count )
|
||||||
{
|
{
|
||||||
const char *functionName;
|
const char *functionName;
|
||||||
|
|
||||||
@ -2774,7 +2774,7 @@ int CSave :: WriteFields( const char *cname, const char *pname, void *pBaseData,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case FIELD_FUNCTION:
|
case FIELD_FUNCTION:
|
||||||
WriteFunction( cname, pTest->fieldName, (int *)(char *)pOutputData, pTest->fieldSize );
|
WriteFunction( cname, pTest->fieldName, (void **)pOutputData, pTest->fieldSize );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ALERT( at_error, "Bad field type\n" );
|
ALERT( at_error, "Bad field type\n" );
|
||||||
@ -2995,12 +2995,11 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
|
|||||||
*((int *)pOutputData) = *( int *)pInputData;
|
*((int *)pOutputData) = *( int *)pInputData;
|
||||||
break;
|
break;
|
||||||
case FIELD_FUNCTION:
|
case FIELD_FUNCTION:
|
||||||
if ( strlen( (char *)pInputData ) == 0 )
|
if( ( (char *)pInputData )[0] == '\0' )
|
||||||
*((int *)pOutputData) = 0;
|
*( (void**)pOutputData ) = 0;
|
||||||
else
|
else
|
||||||
*((int *)pOutputData) = FUNCTION_FROM_NAME( (char *)pInputData );
|
*( (void**)pOutputData ) = (void*)FUNCTION_FROM_NAME( (char *)pInputData );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ALERT( at_error, "Bad field type\n" );
|
ALERT( at_error, "Bad field type\n" );
|
||||||
}
|
}
|
||||||
@ -3258,4 +3257,4 @@ unsigned short UTIL_PrecacheMovie( const char *s, int allow_sound )
|
|||||||
ALERT( at_console, "Warning: video (%s) not found!\n", path );
|
ALERT( at_console, "Warning: video (%s) not found!\n", path );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -429,8 +429,8 @@ void CBasePlayerItem :: Spawn( void )
|
|||||||
UTIL_SetSize( pev, g_vecZero, g_vecZero ); // pointsize until it lands on the ground.
|
UTIL_SetSize( pev, g_vecZero, g_vecZero ); // pointsize until it lands on the ground.
|
||||||
|
|
||||||
if( !FBitSet( ObjectCaps(), FCAP_USE_ONLY ) || FBitSet( pev->spawnflags, SF_NORESPAWN ))
|
if( !FBitSet( ObjectCaps(), FCAP_USE_ONLY ) || FBitSet( pev->spawnflags, SF_NORESPAWN ))
|
||||||
SetTouch( DefaultTouch );
|
SetTouch( &CBasePlayerItem::DefaultTouch );
|
||||||
SetThink( FallThink );
|
SetThink( &CBasePlayerItem::FallThink );
|
||||||
|
|
||||||
SET_MODEL( edict(), STRING( iWorldModel( )));
|
SET_MODEL( edict(), STRING( iWorldModel( )));
|
||||||
|
|
||||||
@ -1514,7 +1514,7 @@ BOOL CBasePlayerItem :: DefaultHolster( Activity sequence, bool force )
|
|||||||
ClearBits( m_pPlayer->pev->weapons, BIT( m_iId ));
|
ClearBits( m_pPlayer->pev->weapons, BIT( m_iId ));
|
||||||
m_pPlayer->pev->viewmodel = iStringNull;
|
m_pPlayer->pev->viewmodel = iStringNull;
|
||||||
m_pPlayer->pev->weaponmodel = iStringNull;
|
m_pPlayer->pev->weaponmodel = iStringNull;
|
||||||
SetThink( DestroyItem );
|
SetThink( &CBasePlayerItem::DestroyItem );
|
||||||
SetNextThink( 0.5 );
|
SetNextThink( 0.5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3066,4 +3066,4 @@ class CPainkiller : public CBasePlayerAmmo
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
LINK_ENTITY_TO_CLASS( item_painkiller, CPainkiller );
|
LINK_ENTITY_TO_CLASS( item_painkiller, CPainkiller );
|
||||||
|
10
dlls/wscript
10
dlls/wscript
@ -23,7 +23,15 @@ def configure(conf):
|
|||||||
def build(bld):
|
def build(bld):
|
||||||
source = bld.path.parent.ant_glob([
|
source = bld.path.parent.ant_glob([
|
||||||
'pm_shared/*.cpp',
|
'pm_shared/*.cpp',
|
||||||
'game_shared/*.cpp'
|
'game_shared/bone_setup.cpp',
|
||||||
|
'game_shared/common.cpp',
|
||||||
|
'game_shared/ikcontext.cpp',
|
||||||
|
'game_shared/material.cpp',
|
||||||
|
'game_shared/mathlib.cpp',
|
||||||
|
'game_shared/matrix.cpp',
|
||||||
|
'game_shared/stringlib.cpp',
|
||||||
|
'game_shared/virtualfs.cpp',
|
||||||
|
'game_shared/voice_gamemgr.cpp',
|
||||||
])
|
])
|
||||||
source += bld.path.ant_glob([
|
source += bld.path.ant_glob([
|
||||||
'*.cpp'
|
'*.cpp'
|
||||||
|
@ -350,6 +350,7 @@ typedef enum _fieldtypes
|
|||||||
FIELD_TIME, // a floating point time (these are fixed up automatically too!)
|
FIELD_TIME, // a floating point time (these are fixed up automatically too!)
|
||||||
FIELD_MODELNAME, // Engine string that is a model name (needs precache)
|
FIELD_MODELNAME, // Engine string that is a model name (needs precache)
|
||||||
FIELD_SOUNDNAME, // Engine string that is a sound name (needs precache)
|
FIELD_SOUNDNAME, // Engine string that is a sound name (needs precache)
|
||||||
|
FIELD_RANGE, // Min and Max range for generate random value
|
||||||
|
|
||||||
FIELD_TYPECOUNT // MUST BE LAST
|
FIELD_TYPECOUNT // MUST BE LAST
|
||||||
} FIELDTYPE;
|
} FIELDTYPE;
|
||||||
|
@ -25,12 +25,14 @@ public:
|
|||||||
RandomRange() { m_flMin = m_flMax = 0; m_bDefined = false; }
|
RandomRange() { m_flMin = m_flMax = 0; m_bDefined = false; }
|
||||||
RandomRange( float fValue ) { m_flMin = m_flMax = fValue; m_bDefined = true; }
|
RandomRange( float fValue ) { m_flMin = m_flMax = fValue; m_bDefined = true; }
|
||||||
RandomRange( float fMin, float fMax) { m_flMin = fMin; m_flMax = fMax; m_bDefined = true; }
|
RandomRange( float fMin, float fMax) { m_flMin = fMin; m_flMax = fMax; m_bDefined = true; }
|
||||||
RandomRange( char *szToken )
|
RandomRange( const char *szToken )
|
||||||
{
|
{
|
||||||
|
char *mutableToken = new char[Q_strlen(szToken)];
|
||||||
|
strcpy(mutableToken, szToken);
|
||||||
char *cOneDot = NULL;
|
char *cOneDot = NULL;
|
||||||
m_bDefined = true;
|
m_bDefined = true;
|
||||||
|
|
||||||
for( char *c = szToken; *c; c++ )
|
for( char *c = mutableToken; *c; c++ )
|
||||||
{
|
{
|
||||||
if( *c == '.' )
|
if( *c == '.' )
|
||||||
{
|
{
|
||||||
@ -48,6 +50,8 @@ public:
|
|||||||
}
|
}
|
||||||
else cOneDot = NULL;
|
else cOneDot = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete[] mutableToken;
|
||||||
|
|
||||||
// no range, just record the number
|
// no range, just record the number
|
||||||
m_flMax = m_flMin = Q_atof( szToken );
|
m_flMax = m_flMin = Q_atof( szToken );
|
||||||
@ -70,4 +74,4 @@ public:
|
|||||||
bool m_bDefined;
|
bool m_bDefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif//RANDOMRANGE_H
|
#endif//RANDOMRANGE_H
|
||||||
|
2
wscript
2
wscript
@ -179,6 +179,8 @@ def configure(conf):
|
|||||||
'-Werror=bool-compare',
|
'-Werror=bool-compare',
|
||||||
'-Werror=bool-operation',
|
'-Werror=bool-operation',
|
||||||
'-Wstrict-aliasing',
|
'-Wstrict-aliasing',
|
||||||
|
'-Wno-conversion-null',
|
||||||
|
'-Wno-write-strings'
|
||||||
]
|
]
|
||||||
|
|
||||||
c_compiler_optional_flags = [
|
c_compiler_optional_flags = [
|
||||||
|
Loading…
Reference in New Issue
Block a user