monster_generic resets when shooted Created 7 years ago2016-12-07 11:25:38 UTC by abbadon abbadon

Created 7 years ago2016-12-07 11:25:38 UTC by abbadon abbadon

Posted 7 years ago2016-12-07 13:26:29 UTC Post #332604
Nevermind. Close/Delete this thread. I have asked for the problem before and never received an answer. :(

Thanks and sorry for using TWHL´s web space! ;)
Posted 7 years ago2016-12-07 21:50:02 UTC Post #332616
If you want monster_generic to not respond to damage you can override the TakeDamage method and just provide an empty implementation. Return 0 so it knows that it didn't do any damage.
Posted 7 years ago2016-12-07 23:57:54 UTC Post #332617
Hi Solokiller (Always to the rescue), should it be something like this:

[quote]
if ( bitsDamageType & (DMG_BLAST|DMG_BULLET) )
{
	UTIL_Sparks( ptr->vecEndPos );
return;
}
[/quote]

The UTIL_Sparks is present in every npc of the mod...
Posted 7 years ago2016-12-08 16:49:34 UTC Post #332625
Something like this:
int CGenericMonster:: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType )
{
return 0;
}
Posted 7 years ago2016-12-08 19:40:36 UTC Post #332626
Ok. I will test it tonight. ;)
You must be logged in to post a response.