fix build

This commit is contained in:
s1lentq 2024-12-12 01:31:05 +07:00
parent 1a17ef4e45
commit 17ae24e012
6 changed files with 6 additions and 8 deletions

View File

@ -24,7 +24,7 @@ void CBasePlayerAmmo::Spawn()
BOOL CBasePlayerAmmo::AddAmmo(CBaseEntity *pOther) BOOL CBasePlayerAmmo::AddAmmo(CBaseEntity *pOther)
{ {
auto ammoInfo = GetAmmoInfo(pev->classname); auto ammoInfo = GetAmmoInfo(pev->classname);
if (pOther->GiveAmmo(ammoInfo->buyClipSize, ammoInfo->ammoName2) == -1) if (!ammoInfo || pOther->GiveAmmo(ammoInfo->buyClipSize, ammoInfo->ammoName2) == -1)
{ {
return FALSE; return FALSE;
} }

View File

@ -470,10 +470,10 @@ void EXT_FUNC GameDLLInit()
SERVER_COMMAND("exec game_init.cfg\n"); SERVER_COMMAND("exec game_init.cfg\n");
SERVER_EXECUTE(); SERVER_EXECUTE();
Regamedll_Game_Init();
#endif // REGAMEDLL_ADD #endif // REGAMEDLL_ADD
Regamedll_Game_Init();
Bot_RegisterCVars(); Bot_RegisterCVars();
Tutor_RegisterCVars(); Tutor_RegisterCVars();
Hostage_RegisterCVars(); Hostage_RegisterCVars();

View File

@ -585,7 +585,6 @@ void CTriggerCDAudio::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
PlayTrack(pCaller->edict()); PlayTrack(pCaller->edict());
} }
#ifdef REGAMEDLL_FIXES
const char *g_szMP3trackFileMap[] = const char *g_szMP3trackFileMap[] =
{ {
"", "", "", "",
@ -617,7 +616,6 @@ const char *g_szMP3trackFileMap[] =
"media/Suspense05.mp3", "media/Suspense05.mp3",
"media/Suspense07.mp3" "media/Suspense07.mp3"
}; };
#endif
void PlayCDTrack(edict_t *pClient, int iTrack) void PlayCDTrack(edict_t *pClient, int iTrack)
{ {

View File

@ -545,7 +545,7 @@ WeaponInfoStruct *GetDefaultWeaponInfo(int weaponID)
AmmoInfoStruct *GetAmmoInfo(const char *ammoName) AmmoInfoStruct *GetAmmoInfo(const char *ammoName)
{ {
for (auto& info : g_ammoInfo) { for (auto& info : g_ammoInfo) {
if (!Q_stricmp(info.ammoName1, ammoName)) { if (info.ammoName1 && !Q_stricmp(info.ammoName1, ammoName)) {
return &info; return &info;
} }
} }

View File

@ -1,6 +1,6 @@
#include "precompiled.h" #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) LINK_ENTITY_TO_CLASS(weapon_m3, CM3, CCSM3)

View File

@ -1,6 +1,6 @@
#include "precompiled.h" #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) LINK_ENTITY_TO_CLASS(weapon_xm1014, CXM1014, CCSXM1014)