Islave Lightning attack pushes npcs away Created 7 years ago2017-03-30 19:35:52 UTC by abbadon abbadon

Created 7 years ago2017-03-30 19:35:52 UTC by abbadon abbadon

Posted 7 years ago2017-03-30 19:36:28 UTC Post #334160
Hi again. I´m quite busy this days and I found myself unable to work more often on the mod as I wanted. Anyway, I found a strange thing happening with the monster_trolley of my mod. If they are hit by the infantry gunners (they shot the lightning attack of the Islave) the npc is pushed away as long is the lightning itself. Although it´s quite funny, it turns into a problem because there only can be one of them alive each time it´s spawned via monstermakers, which left the player unable to obtain more ammo, and so ruining the gameplay.

In the spawn function there´s one line of code I think could be the culprit:

Ver I:
pev->solid= SOLID_BBOX;
Ver II:
pev->solid= SOLID_SLIDEBOX;
I tried both two versions but with no luck. It is not that it happen always, but when it does is quite annoying. Any ideas?
Posted 7 years ago2017-03-31 07:27:23 UTC Post #334163
pev->movetype = MOVETYPE_NONE;
?
Posted 7 years ago2017-03-31 07:57:33 UTC Post #334164
Eeeeemmmm... wouldn´t it override the movement of the npc?, I mean, there are various movetype, like MOVETYPE_FLY, MOVETYPE_WALK, no? , I say this because the npc walks... (I didn´t studied much of entvars). :\

But I will do it. Your advices always saved me from trouble. :glad:

More things to add to the credits, my friend. :crowbar:
Posted 7 years ago2017-03-31 08:38:19 UTC Post #334166
Monsters are moved around when they take damage: https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dlls/combat.cpp#L892

You can update this code to let you disable this behavior on a case by case basis if you want.
Posted 7 years ago2017-03-31 11:57:05 UTC Post #334171
Will do that!!. Thank you Solokiller and Shepard!! (updating credits ;) )
You must be logged in to post a response.