First of all great mod! Its one of my favorite ways to replay Half-Life.
As a disclaimer, I haven't really worked with the Half-Life SDK before so I could be wrong here.
There's this global int defined in globals.cpp:
DLL_GLOBAL int g_iSkillLevel;
It's used to alter the behavior of NPCs in a few places, ex from hgrunt.cpp:2254:
if ( g_iSkillLevel == SKILL_HARD && HasConditions( bits_COND_CAN_RANGE_ATTACK2 ) && OccupySlot( bits_SLOTS_HGRUNT_GRENADE ) )
{
....
}
In the base CGameRules::RefreshSkillData(), this global gets updated:
iSkill = (int)CVAR_GET_FLOAT("skill");
g_iSkillLevel = iSkill;
But for custom gamemodes, CCustomGameModeRules::RefreshSkillData() only seems to alter gSkillData and not g_iSkillLevel as well which seems like a bug. Apologies if I missed something since again I'm pretty new to the SDK.
I haven't tried updating g_iSkillLevel in CCustomGameModeRules::RefreshSkillData() but I'll post an update once I figure out how to build the DLLs with any results. Thanks again for your work on this mod! And maybe see you on Knockout sometime (if I ever stop lurking and start posting...)
First of all great mod! Its one of my favorite ways to replay Half-Life.
As a disclaimer, I haven't really worked with the Half-Life SDK before so I could be wrong here.
There's this global int defined in
globals.cpp:It's used to alter the behavior of NPCs in a few places, ex from
hgrunt.cpp:2254:In the base
CGameRules::RefreshSkillData(), this global gets updated:But for custom gamemodes,
CCustomGameModeRules::RefreshSkillData()only seems to altergSkillDataand notg_iSkillLevelas well which seems like a bug. Apologies if I missed something since again I'm pretty new to the SDK.I haven't tried updating
g_iSkillLevelinCCustomGameModeRules::RefreshSkillData()but I'll post an update once I figure out how to build the DLLs with any results. Thanks again for your work on this mod! And maybe see you on Knockout sometime (if I ever stop lurking and start posting...)