Hi, it's me again
after the hint to the wiki, I was finally able to get my dev environment set up for plugin development. Thanks again.
Now, next question. I studied some of the emtpy-plugin source code and it seems to me that Valve wants me to use the IPlayerInfo interface to interact with the players in the game, creating an instance to it from the entity (edict_t*) passed to the plugin callbacks. Like:
IPlayerInfo *playerinfo = playerinfomanager->GetPlayerInfo( pEntity );
OK. So far so good. But having a look at the interface's methods, it seems there are only some getters and status vars, but no setter methods !!
In HL1, there was the nice v-structure accessible in the edict_t* where I could manipulate some properties of the entity directly, like:
pEdict->v.takedamage = DAMAGE_NO; for a given player entity.
So, I poked around a bit further and found, in class CBaseCombatCharacter, some methods that deal with taking damage, using m_takedamage to determine if damage is caused or not.
However, in the plugin, I cannot access this member that easy.
I think I need to create a CBaseCombatCharacter instance from pEntity, but how ?
What is the correct way to set m_takedamage ? Or is there a totally different way to achieve the same ?
Thanks
BotUser
P.S.:
Why is there no class diagram to show the design of the source SDK classes in the SDK documentation ? This would help greatly.