Do you mean things like this: http://web.archive.org/web/20010308202415/http://www.vlatitude.com:80/resources.php
That might still be recoverable.
BOOL CTrolley::CheckMeleeAttack1( float flDot, float flDist )Anything within 50 units and in front of the trolley gets ammo every time it attacks. The conditions for attacks is based on how much ammo they've got, however you return R_AL in IRelationship if they have enough ammo, which can cause the AI to still consider it. Return R_NO instead, see if that changes anything.
{
// ALERT(at_aiconsole, "CheckMelee(%f, %f)\n", flDot, flDist);
if (flDot >= 0.7)
{
if (flDist <= 50)
return TRUE;
}
return FALSE;
}
if ( pTarget->ammo_9mm > 100 )to
if ( pTarget->ammo_9mm >= 100 )I'm assuming your code correctly updates ammo_9mm, which is SDK behavior. If it does not, you should correct that.
if( m_hEnemy != NULL && m_hEnemy->IsPlayer() )
int CTrolley :: GiveAmmo( CBasePlayer* pPlayer, int iCount, char *szName, int iMax )And HandleAnimEvent should do this:
{
if (pPlayer->ammo_9mm <= 100)//limite de munición para que te recargue
{
pPlayer->GiveAmmo(600,"9mm",600);
return TRUE;
}
return FALSE;
}
if( m_hEnemy && m_hEnemy->IsPlayer() )I should note that GiveAmmo ignores the values you're giving it and is always giving those amounts, so make sure you update it to use the input values if you want that to work correctly.
{
CBasePlayer* pPlayer = static_cast<CBasePlayer*>( static_cast<CBaseEntity*>( m_hEnemy ) );
GiveAmmo( pPlayer, 600,"9mm",600 );
}
%..Warning: Illegal Brush (edge without opposite face): Entity 1270, Brush 0Should probably fix this. If there are any warnings or errors during compilation then it probably won't work properly anyway.
.80%...90%.Warning: Illegal Brush (edge without opposite face): Entity 853, Brush 0
"edicts" "2048"Note that anyone that plays your map will also have to add this.
<xml version="1.0" standalone="no"/>Not that different, but it'll eliminate any issues with long names, since the original parsing code uses fixed size buffers.
<replacement_map>
<keyvalue key="models/scientist.mdl" value="models/female_scientist.mdl"/>
</replacement_map>