[Fixed] Hitscan & throwback

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Hitscan & throwback

Postby LilWhiteMouse » Fri Sep 05, 2003 6:59 pm

I've noticed with hitscan weapons that low mass enemies have a tendancy to fly torwards you when they die. I don't remember this in Doom or older versions of ZDoom.
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Biff » Fri Sep 05, 2003 7:13 pm

The Heretic gargoyles often did that....I think, like a last leap at you as they die. Hmm, did I see a Wraith do that in hspawn recently?
User avatar
Biff
Caleb is back for a visit
 
Joined: 16 Jul 2003
Location: Monrovia, CA, USA

Postby LilWhiteMouse » Fri Sep 05, 2003 7:27 pm

It happens frequently to zombiemen and shotgunners as well, so it's not limited to avian actors. The dragon's claw/blaster seems to be the most offending weapon.
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Ultraviolet » Fri Sep 05, 2003 8:00 pm

Heh. I keep misreading things. I thought you said it wasn't limited to Asian actors.
User avatar
Ultraviolet
AKA "Faint"
 
Joined: 15 Jul 2003
Location: PROJECT DETAILS CLASSIFIED.

Postby randi » Fri Sep 05, 2003 9:10 pm

From the source code:
Code: Select allExpand view
// make fall forwards sometimes
if ((damage < 40) && (damage > target->health)
    && (target->z - inflictor->z > 64*FRACUNIT)
    && (pr_damagemobj()&1))
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Postby Hirogen2 » Sat Sep 06, 2003 5:17 am

Now the question: why? It's... against the usual physics ?:)
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby Chris » Sat Sep 06, 2003 5:22 am

'cuz it makes a cool effect, especially when they're on ledges? that'd be my guess :P
User avatar
Chris
 
Joined: 17 Jul 2003

Postby LilWhiteMouse » Sat Sep 06, 2003 7:07 am

I don't really understand the source. Does it explain why the zombieman I just killed on top of the two high crates in the background is now at my feet? If he had been a projectile there's no way I could have evaded, he traveled much faster then even the Arachnotrons projectile.

Image
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Graf Zahl » Sat Sep 06, 2003 9:18 am

Ok, here it goes:

if ((damage < 40)

Do this only if the damage inflicted is less than 40 health points.
(can't say from a picture but it seems in your case it was the case)

&& (damage > target->health)

.. and higher than the victim's health
(as in: he will be killed for sure - like your Zombie)

&& (target->z - inflictor->z > 64*FRACUNIT)

The one who shot the poor guy is standing at least 64 units below the victim
(your crate would do that!)

&& (pr_damagemobj()&1))

a little randomness so it doesn't happen always.

If all the stuff above applies the following happens
(ang is the angle of thrust being applied to the victim)

{
ang += ANG180;
thrust *= 4;
}

Just reverse the angle (push the guy forward instead of backward) and multiply the thrust force by 4 so a minor push backward is turned into a bigger push forward.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Kappes Buur » Sat Sep 06, 2003 9:52 am

.
If you want to "experiment" with that effect, then use the cheat 'mdk'.

This cheat, however, affects everything which can frag you, monsters or things (such as barrels).
.
User avatar
Kappes Buur
 
 
 
Joined: 17 Jul 2003
Location: British Columbia, Canada

Postby Cyb » Sat Sep 06, 2003 11:17 am

aye, hehe it's fun to accidently mdk a barrel halfway across the map and have it flung towards you and take a good chunk of health :P
Cyb
 
Joined: 15 Jul 2003

Postby Bio Hazard » Sat Sep 06, 2003 1:35 pm

i really think stuff should fly backward...

is there a way to do that?
User avatar
Bio Hazard
Lord of the Lord of Nitpicking.
 
Joined: 15 Aug 2003
Location: ferret ~/C/ZDL $

Postby Graf Zahl » Sat Sep 06, 2003 4:16 pm

Bio Hazard wrote:i really think stuff should fly backward...

is there a way to do that?



Sure!

Remove the offending code from P_interaction.cpp and recompile the whole thing! :wink:
IMHO this should only apply to flying enemies. With walking ones it really just looks odd.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Hitscan & throwback

Postby IntergalacticWalrus » Sat Sep 06, 2003 9:44 pm

LilWhiteMouse wrote:I've noticed with hitscan weapons that low mass enemies have a tendancy to fly torwards you when they die. I don't remember this in Doom or older versions of ZDoom.


I can't see why you never noticed this in the original Doom, it happened all the time. Especially in the first episode of Doom, where there are lots of places where zombies and imps are standing on top of high edges, and killing them with bullets cause them to fall down. That's perfectly normal, it gives the game a more cinematic effect, I guess.
User avatar
IntergalacticWalrus
Baka ne...
 
Joined: 01 Sep 2003
Location: E2M2, among the many UAC boxes

Postby HotWax » Tue Sep 09, 2003 9:42 am

I don't think the problem is that an enemy on a ledge will sometimes fall forward and thus off the ledge; that would seem to be a natural enough occurance that would happen in reality. The problem is that, apparently to ensure the victim does indeed reach and fall off the ledge, they multiply the force by a factor of 4. This might be okay for a light nudge, but if you blast someone at close range with an SSG, multiplying the already high force by 4 is going to make them move insanely fast. Even if you left the direction alone, that would look wrong. Reversing it makes matters much worse. Hitting someone full in the face with an SSG should NOT cause them to fly in YOUR direction at 50 MPH. That's just silly.

Perhaps an upper limit could be applied to the force, either as an additional condition:

if ((damage < 40) && (blah blah blah) && (force < xyz) . . .

where xyz is some abitrary amount of force. This way if you smack the crap out of someone, there's no way that the engine will decide it's a good time to make them fall FORWARD, which seems pretty logical...

or, you could apply the limit after the other calculations...

{
ang += ANG180;
if ((thrust *= 4) > xyz) thrust = xyz;
}

which would simply ensure that the corpse doesn't come flying at you like a bat out of hell.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Next

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests