No extension changes. This adds typedefs to typesets containing entity index parameters replaced with a CBaseEntity (or derived) methodmap parameter.
The main motivation behind this is to eliminate the need to cast from an entity index to a custom entity methodmap in a callback, which can happen a lot when it comes to NextBotAction callback functions. These typesets takes advantage of methodmap "inheritance", where it is valid to specify a methodmap that "inherits" from the methodmap parameter in the typedef.
The original typedefs have not changed for backwards compatibility.
As a result, we can now reduce this:
static int OnStart(NextBotAction action, int actor, NextBotAction prevAction)
{
TestScoutBot ent = TestScoutBot(actor);
int sequence = ent.LookupSequence( "taunt_laugh" );
if (sequence == -1)
{
return action.Done();
}
// ...
return action.Continue();
}
To this:
static int OnStart(TestScoutBotLaughAction action, TestScoutBot actor, NextBotAction prevAction)
{
int sequence = actor.LookupSequence( "taunt_laugh" );
if (sequence == -1)
{
return action.Done();
}
// ...
return action.Continue();
}
No extension changes. This adds typedefs to typesets containing entity index parameters replaced with a
CBaseEntity
(or derived) methodmap parameter.The main motivation behind this is to eliminate the need to cast from an entity index to a custom entity methodmap in a callback, which can happen a lot when it comes to
NextBotAction
callback functions. These typesets takes advantage of methodmap "inheritance", where it is valid to specify a methodmap that "inherits" from the methodmap parameter in the typedef.The original typedefs have not changed for backwards compatibility.
As a result, we can now reduce this:
To this: