1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 20:16:10 +08:00

Modified SDK for GCC 4.2

This commit is contained in:
Scott Ehlert
2008-09-15 02:50:57 -05:00
parent 86f3bc8a60
commit 7ff7f366d5
696 changed files with 23423 additions and 22634 deletions

View File

@ -5,6 +5,7 @@
// $NoKeywords: $
//
//=============================================================================//
#include "cbase.h"
#include "npc_talker.h"
@ -37,7 +38,7 @@ BEGIN_DATADESC( CNPCSimpleTalker )
END_DATADESC()
// array of friend names
char *CNPCSimpleTalker::m_szFriends[TLK_CFRIENDS] =
const char *CNPCSimpleTalker::m_szFriends[TLK_CFRIENDS] =
{
"NPC_barney",
"NPC_scientist",
@ -312,7 +313,7 @@ void CNPCSimpleTalker::Event_Killed( const CTakeDamageInfo &info )
CBaseEntity *CNPCSimpleTalker::EnumFriends( CBaseEntity *pPrevious, int listNumber, bool bTrace )
{
CBaseEntity *pFriend = pPrevious;
char *pszFriend;
const char *pszFriend;
trace_t tr;
Vector vecCheck;
@ -765,7 +766,7 @@ int CNPCSimpleTalker::PlayScriptedSentence( const char *pszSentence, float delay
m_useTime = gpGlobals->curtime + delay;
// Stop all idle speech until after the sentence has completed
DeferAllIdleSpeech( delay + random->RandomInt( 3.0f, 5.0f ) );
DeferAllIdleSpeech( delay + random->RandomFloat( 3.0f, 5.0f ) );
return sentenceIndex;
}
@ -1126,7 +1127,7 @@ bool CNPCSimpleTalker::ShouldSpeakRandom( int iChance, float flModifier )
if ( !flModifier )
return false;
iChance = floor( (float)iChance / flModifier );
iChance = (int)floor( (float)iChance / flModifier );
}
return (random->RandomInt(0,iChance) == 0);