diff --git a/regamedll/dlls/ammo.cpp b/regamedll/dlls/ammo.cpp index 1df3622c..8c264ac7 100644 --- a/regamedll/dlls/ammo.cpp +++ b/regamedll/dlls/ammo.cpp @@ -24,7 +24,7 @@ void CBasePlayerAmmo::Spawn() BOOL CBasePlayerAmmo::AddAmmo(CBaseEntity *pOther) { auto ammoInfo = GetAmmoInfo(pev->classname); - if (pOther->GiveAmmo(ammoInfo->buyClipSize, ammoInfo->ammoName2) == -1) + if (!ammoInfo || pOther->GiveAmmo(ammoInfo->buyClipSize, ammoInfo->ammoName2) == -1) { return FALSE; } diff --git a/regamedll/dlls/game.cpp b/regamedll/dlls/game.cpp index 12f63c1a..5680db82 100644 --- a/regamedll/dlls/game.cpp +++ b/regamedll/dlls/game.cpp @@ -470,10 +470,10 @@ void EXT_FUNC GameDLLInit() SERVER_COMMAND("exec game_init.cfg\n"); SERVER_EXECUTE(); - Regamedll_Game_Init(); - #endif // REGAMEDLL_ADD + Regamedll_Game_Init(); + Bot_RegisterCVars(); Tutor_RegisterCVars(); Hostage_RegisterCVars(); diff --git a/regamedll/dlls/triggers.cpp b/regamedll/dlls/triggers.cpp index 42e5cbde..63282c06 100644 --- a/regamedll/dlls/triggers.cpp +++ b/regamedll/dlls/triggers.cpp @@ -585,7 +585,6 @@ void CTriggerCDAudio::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP PlayTrack(pCaller->edict()); } -#ifdef REGAMEDLL_FIXES const char *g_szMP3trackFileMap[] = { "", "", @@ -617,7 +616,6 @@ const char *g_szMP3trackFileMap[] = "media/Suspense05.mp3", "media/Suspense07.mp3" }; -#endif void PlayCDTrack(edict_t *pClient, int iTrack) { diff --git a/regamedll/dlls/weapontype.cpp b/regamedll/dlls/weapontype.cpp index dd7dc0f8..cc341d7c 100644 --- a/regamedll/dlls/weapontype.cpp +++ b/regamedll/dlls/weapontype.cpp @@ -545,7 +545,7 @@ WeaponInfoStruct *GetDefaultWeaponInfo(int weaponID) AmmoInfoStruct *GetAmmoInfo(const char *ammoName) { for (auto& info : g_ammoInfo) { - if (!Q_stricmp(info.ammoName1, ammoName)) { + if (info.ammoName1 && !Q_stricmp(info.ammoName1, ammoName)) { return &info; } } diff --git a/regamedll/dlls/wpn_shared/wpn_m3.cpp b/regamedll/dlls/wpn_shared/wpn_m3.cpp index e071c19c..2f341c95 100644 --- a/regamedll/dlls/wpn_shared/wpn_m3.cpp +++ b/regamedll/dlls/wpn_shared/wpn_m3.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -const Vector M3_CONE_VECTOR = {0.0675, 0.0675, 0.0}; // special shotgun spreads +const Vector M3_CONE_VECTOR = Vector(0.0675, 0.0675, 0.0); // special shotgun spreads LINK_ENTITY_TO_CLASS(weapon_m3, CM3, CCSM3) diff --git a/regamedll/dlls/wpn_shared/wpn_xm1014.cpp b/regamedll/dlls/wpn_shared/wpn_xm1014.cpp index fb63a050..c664fe59 100644 --- a/regamedll/dlls/wpn_shared/wpn_xm1014.cpp +++ b/regamedll/dlls/wpn_shared/wpn_xm1014.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -const Vector XM1014_CONE_VECTOR = {0.0725, 0.0725, 0.0}; // special shotgun spreads +const Vector XM1014_CONE_VECTOR = Vector(0.0725, 0.0725, 0.0); // special shotgun spreads LINK_ENTITY_TO_CLASS(weapon_xm1014, CXM1014, CCSXM1014)