Raised This Month: $12 Target: $400
 3% 

MDLL_Touch = HLDS has stopped responding (just sometimes?)


Post New Thread Reply   
 
Thread Tools Display Modes
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 online now
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 01-27-2015 , 08:47   Re: MDLL_Touch = HLDS has stopped responding (just sometimes?)
Reply With Quote #2

Check give_item at fun.cpp

Are you sure it crash at _Touch?

You should copy origin values, I don't recommend to call UTIL_SetOrigin.

Also you have to delete the touched entity after touch.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Rirre
Veteran Member
Join Date: Nov 2006
Old 01-27-2015 , 12:40   Re: MDLL_Touch = HLDS has stopped responding (just sometimes?)
Reply With Quote #3

Quote:
Originally Posted by joropito View Post
Check give_item at fun.cpp

Are you sure it crash at _Touch?

You should copy origin values, I don't recommend to call UTIL_SetOrigin.

Also you have to delete the touched entity after touch.
I have, not that much of a difference.

Yes, since it stops there and doesn't continue to "Touch done" msg.

Is:
Code:
ent->v.origin = player->v.origin;
better? Same way as in give_item()

Adding REMOVE_ENTITY(ent); after MDLL_Touch crash the server when it comes to that line (REMOVE_ENTITY).
Rirre is online now
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 02-19-2015 , 01:38   Re: MDLL_Touch = HLDS has stopped responding (just sometimes?)
Reply With Quote #4

Have you fixed it?

Have you even checked FUN module's give_item?

You might check edict's Solid State before. And Touch(Entity, Player) not Touch(Player, Entity).
Don't try to invent your own methods while methods already exist. My recommendation.
__________________

Last edited by claudiuhks; 02-19-2015 at 01:39.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode