MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / InsertProperty

Method InsertProperty

CryCommon/_ScriptableEx.h:173–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171 }
172 }
173 static void InsertProperty(const char *sName,Property &prop)
174 {
175
176 USER_DATA ud;
177 Property *p=new Property;
178 m_pvPropertiesVector->push_back(p);
179 *p=prop;
180 ud=m_pSS->CreateUserData((INT_PTR)p,-1);
181 m_pPropertiesTable->SetValue(sName,ud);
182 //test
183 int nTemp;
184 ULONG_PTR nP;
185 if(!m_pPropertiesTable->GetUDValue(sName,nP,nTemp))
186 CryError("Scriptable EX:Insert Property (GetUDValue)");
187 p=(Property *)nP;
188 if(p->nType!=prop.nType)
189 CryError("Scriptable EX:Insert Property");
190 }
191
192 static void RegisterProperty(const char *sName,PropertyType t, unsigned int offset)
193 {

Callers

nothing calls this directly

Calls 5

CryErrorFunction · 0.85
CreateUserDataMethod · 0.80
push_backMethod · 0.45
SetValueMethod · 0.45
GetUDValueMethod · 0.45

Tested by

no test coverage detected