Giter Club home page Giter Club logo

halfpayne's People

Contributors

alfred-valve avatar danieloaks avatar dtugend avatar jengerer avatar joeltroch avatar johndrinkwater avatar suxinjke avatar thefoofighter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

halfpayne's Issues

Set `g_iSkillLevel` in `CCustomGameModeRules::RefreshSkillData()`

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...)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.