Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Dec 11, 2024
1 parent 1a17ef4 commit 17ae24e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion regamedll/dlls/ammo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions regamedll/dlls/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions regamedll/dlls/triggers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@ void CTriggerCDAudio::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP
PlayTrack(pCaller->edict());
}

#ifdef REGAMEDLL_FIXES
const char *g_szMP3trackFileMap[] =
{
"", "",
Expand Down Expand Up @@ -617,7 +616,6 @@ const char *g_szMP3trackFileMap[] =
"media/Suspense05.mp3",
"media/Suspense07.mp3"
};
#endif

void PlayCDTrack(edict_t *pClient, int iTrack)
{
Expand Down
2 changes: 1 addition & 1 deletion regamedll/dlls/weapontype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion regamedll/dlls/wpn_shared/wpn_m3.cpp
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion regamedll/dlls/wpn_shared/wpn_xm1014.cpp
Original file line number Diff line number Diff line change
@@ -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)

Expand Down

0 comments on commit 17ae24e

Please sign in to comment.