View Single Post
Author Message
Rirre
Veteran Member
Join Date: Nov 2006
Old 01-26-2015 , 05:21   MDLL_Touch = HLDS has stopped responding (just sometimes?)
Reply With Quote #1

I'm out of ideas why this occur.
MDLL_Spawn is working all the time, but when it comes to MDLL_Touch, then it crash whenever it feels to/randomly (with "HLDS has stopped responding"). It can be the 1st time, it can be the 5th time and so on..
Code:
void GiveEntity( char* name, edict_t* player, int count ) {     string_t str = ALLOC_STRING( name );     for( int i = 0; i < count; ++i )     {         edict_t *ent;         ent = CREATE_NAMED_ENTITY( str );         if( !FNullEnt( ent ) )         {             UTIL_SetOrigin( &ent->v, player->v.origin );             ent->v.spawnflags |= SF_NORESPAWN;             (*g_engfuncs.pfnServerPrint)("Spawn\n");             MDLL_Spawn( ent );             (*g_engfuncs.pfnServerPrint)("Done, moving on to Touch\n");
            MDLL_Touch( ent, player );
            (*g_engfuncs.pfnServerPrint)("Touch done\n");         }     } }

Last edited by Rirre; 01-27-2015 at 04:12.
Rirre is offline