RPG's & Explosive stuff push Enemy's towards you.
I know this is a bug with the original Duke 3d and not Eduke32. I know I've see a post on this, or so some other duke forums that had a fix for it but can't find it now ( well i'm at lest 90% sure there was a fix). So can anyone tell me how to fix this or where to get the fix.Would have thought this would be fixed with Eduke32, but I guess there's been more important things to do.
Page 1 of 1
RPG's & Explosive stuff push Enemy's towards you.
#1 Posted 04 February 2014 - 04:57 AM
This post has been edited by -=SomeThingEviL=-: 05 February 2014 - 03:44 AM
#2 Posted 05 February 2014 - 01:59 PM
-=SomeThingEviL=-, on 04 February 2014 - 04:57 AM, said:
RPG's & Explosive stuff push Enemy's towards you.
I know this is a bug with the original Duke 3d and not Eduke32. I know I've see a post on this, or so some other duke forums that had a fix for it but can't find it now ( well i'm at lest 90% sure there was a fix). So can anyone tell me how to fix this or where to get the fix.Would have thought this would be fixed with Eduke32, but I guess there's been more important things to do.
I know this is a bug with the original Duke 3d and not Eduke32. I know I've see a post on this, or so some other duke forums that had a fix for it but can't find it now ( well i'm at lest 90% sure there was a fix). So can anyone tell me how to fix this or where to get the fix.Would have thought this would be fixed with Eduke32, but I guess there's been more important things to do.
Yeah, there is a fix for this that I use in my mods. The buggy behavior is a result of the xvel member of the sprite getting set to a positive value when the sprite takes damage from an explosive. What you have to do is have the actor's code check htextra and htpicnum. If htextra (damage) is >0 and htpicnum (weapon type) is either RPG or RADIUSEXPLOSION, then you reset xvel (velocity) to a new value. One simple method is to multiply xvel by -1, which will cause the actor to move backwards instead of forwards. Note that this all has to be done before the actor uses the ifhitweapon command, which will clear the htextra value.
#3 Posted 05 February 2014 - 06:50 PM
Trooper Dan, on 05 February 2014 - 01:59 PM, said:
Note that this all has to be done before the actor uses the ifhitweapon command, which will clear the htextra value.
EVENT_PREGAME should work for this.
#4 Posted 05 February 2014 - 08:29 PM
Hendricks266, on 05 February 2014 - 06:50 PM, said:
EVENT_PREGAME should work for this.
Oh, that's good. I don't think that event existed the last time I was coding.
#5 Posted 05 February 2014 - 08:45 PM
Trooper Dan, on 05 February 2014 - 01:59 PM, said:
Yeah, there is a fix for this that I use in my mods. The buggy behavior is a result of the xvel member of the sprite getting set to a positive value when the sprite takes damage from an explosive. What you have to do is have the actor's code check htextra and htpicnum. If htextra (damage) is >0 and htpicnum (weapon type) is either RPG or RADIUSEXPLOSION, then you reset xvel (velocity) to a new value. One simple method is to multiply xvel by -1, which will cause the actor to move backwards instead of forwards. Note that this all has to be done before the actor uses the ifhitweapon command, which will clear the htextra value.
(All weapon types can push enemies.) The actual problem is that the angle which the enemies is pushes away is the same it is facing. Instead movesprite should be used...
This post has been edited by Fox: 05 February 2014 - 08:45 PM
#6 Posted 05 February 2014 - 08:51 PM
Fox, on 05 February 2014 - 08:45 PM, said:
(All weapon types can push enemies.) The actual problem is that the angle which the enemies is pushes away is the same it is facing. Instead movesprite should be used...
That's good to know, but in practice the bug is only noticeable for explosives. I do actually use movesprite for knockback in some of my mods, but reversing xvel is a quick and dirty fix that gives acceptable results.
Share this topic:
Page 1 of 1