View Single Post
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 06-04-2016 , 15:53   datamaps expanding
Reply With Quote #1

I need to add some new fields to the CKnife - weapon_knife. As I can see datamap array is like a list, so each datamap_t struct contains a pointer to the next one, does it mean that I can append my own datamaps to this array this way?

PHP Code:
unsigned int UTIL_FindInDataMap(datamap_t *pMap, const char *name)
{
    while (
pMap)
    {
        
//staff
        
pMap pMap->baseMap;
    }
    
pMap->baseMap = new datamap_t;
    
//....
    
pMap->baseMap->baseMap =NULL;
    return 
0

Will this work, work with sm functions?
And the last question. Each entity has own storage buffer for datamaps, is the size of the buffer limited with the last datamap offset (m_hEffectEntity) or there is a reserved space, and I can write over the last datamap offset m_hEffectEntity, use the unmapped space for my own datamaps ?

Last edited by kadet.89; 06-04-2016 at 15:55.
kadet.89 is offline
Send a message via Skype™ to kadet.89