mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-25 14:25:32 +03:00
Fixes
This commit is contained in:
parent
5a0c406dbf
commit
7877953b6c
@ -66,6 +66,8 @@ void CCustomWeaponSystem::AddManifestFile(KeyValues* pKV, bool bDontWarn)
|
||||
if (pKey)
|
||||
{
|
||||
char value[MAX_PATH];
|
||||
value[0] = '\0';
|
||||
|
||||
// Parse %mapname%, etc.
|
||||
bool inparam = false;
|
||||
CUtlStringList outStrings;
|
||||
@ -76,7 +78,7 @@ void CCustomWeaponSystem::AddManifestFile(KeyValues* pKV, bool bDontWarn)
|
||||
{
|
||||
if (FStrEq(outStrings[i], "mapname"))
|
||||
{
|
||||
Q_strncat(value, MapName(), sizeof(value));
|
||||
Q_strncat(value, STRING(gpGlobals->mapname), sizeof(value));
|
||||
}
|
||||
else if (FStrEq(outStrings[i], "language"))
|
||||
{
|
||||
@ -128,7 +130,7 @@ void CCustomWeaponSystem::LoadCustomWeaponsManifest(const char* file, bool bDont
|
||||
m_ClassFactories[ClassIndex].pOldFactory = EntityFactoryDictionary()->FindFactory(pszClassname);
|
||||
}
|
||||
|
||||
m_ClassFactories[ClassIndex].sDataFile = file;
|
||||
m_ClassFactories[ClassIndex].sDataFile = pkvWeapon->GetString();
|
||||
m_ClassFactories[ClassIndex].pNewFactory = Factory.Element(FactoryIndex);
|
||||
EntityFactoryDictionary()->UninstallFactory(pszClassname);
|
||||
EntityFactoryDictionary()->InstallFactory(m_ClassFactories[ClassIndex].pNewFactory, pszClassname);
|
||||
@ -141,7 +143,7 @@ void CCustomWeaponSystem::LoadCustomWeaponsManifest(const char* file, bool bDont
|
||||
|
||||
void CCustomWeaponSystem::LevelShutdownPostEntity()
|
||||
{
|
||||
for (int i = 0; i < m_ClassFactories.Count(); i++)
|
||||
for (unsigned short i = 0; i < m_ClassFactories.Count(); i++)
|
||||
{
|
||||
EntityFactoryDictionary()->UninstallFactory(m_ClassFactories.GetElementName(i));
|
||||
const CustomClassName_t& entry = m_ClassFactories.Element(i);
|
||||
|
@ -427,7 +427,7 @@ void CWeaponCustomScripted::SecondaryAttack( void )
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
#define ACTIVITY_FUNC_OVERRIDE( name ) ScriptVariant_t retVal; \
|
||||
if (RunWeaponHook( g_Hook_##name, m_Func_##name, &retVal ) && retVal.m_bool == false) \
|
||||
if (RunWeaponHook( g_Hook_##name, m_Func_##name, &retVal ) && !retVal.IsNull()) \
|
||||
{ \
|
||||
if (retVal.m_type == FIELD_INTEGER) \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user