View Single Post
Having a problem creating a entity...
Old
  (#1)
EclipseX
Guest
 
Status:
Posts: n/a
Default Having a problem creating a entity... - 25-01-2004

I know this probably ain't the place to ask this question, but when I try to spawn a new entity using a model I precahed before hand... seems to crash the server..


PHP Code:
 In DispatchSpawn:
   const 
char *pClassName STRING(pent->v.classname);
   
DWORD pCrc32 CRC32::Generate((BYTE *)pClassNameutils::mstrlen(pClassName));
   if (
pCrc32 == 0x13EF7D28)
   {
     
// "worldspawn"
     // Do all our level initialization shit here...
 
     // Precache the models & sounds...
     
PreCacheModel("models/crystal.mdl");
 
     
// Initialize the string-name...
     
locator::markerName AllocString("item_locmarker");
   }
 
 
In Locator::AddMarker:
   
// Create the entity... 
   
locs[s].ent CreateNamedEntity(markerName);
 
   
// Give the entity a model...
   
SetModel(locs[s].ent"models/crystal.mdl");
 
  
// Set the model size...
  
SetSize(locs[s].entvec3_t(-1, -1, -1), vec3_t(1,1,1));
 
  
// Set the model origin...
  
SetOrigin(locs[s].ent, (float *)&locs[s].origin);
 
  
// Spawn the entity...
  
Spawn(locs[s].ent); 
Upon adding a marker the server crashes... (swds.dll: 0656D166 89B8 34010000 MOV DWORD PTR DS:[EAX+134],EDI)
  
Reply With Quote