ThrustFactor

Moderator: GZDoom Developers

User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

ThrustFactor

Post by Major Cooke »

Pull Request.

Now thrusting can be done uniquely per each actor, using damagetypes. Works just like Damagetypes too. However, there's not any 'definitions' for ThrustFactors though. It's modular so you can change it at any time. Couple other goodies in there too:
  • A_SetThrustFactor(float amount, damagetype, pointer)
  • +NOIMPACTDAMAGE - Actors will not have the BLASTED flag set on them when thrusted.
Included is a test file if you want to try it out. Summon MCD in console.

Left click shoots a rocket.
Right click shoots a rawket.

MCD can be thrust by rawket while walking.
MCD can be thrust by rocket while firing.
Attachments
test.pk3
Summon MCD in console.
(7.23 KiB) Downloaded 62 times
Last edited by Major Cooke on Wed Jan 20, 2016 1:31 pm, edited 5 times in total.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: ThrustFactor

Post by Major Cooke »

I just went back through the pull request and noticed there were merge conflicts. Shall I take care of these, or just leave it be?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ThrustFactor

Post by Graf Zahl »

Make a new, clean one.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: ThrustFactor

Post by Major Cooke »

Currently updating this yet again and cleaning out the merge conflicts.
Nightfall (on Github) wrote:Why do we need damagetypes with a ThrustFactor? A simple ThrustFactor value would make more sense to me. ThrustFactor 0.0 would imply being unthrustable so the actor flag is unnecessary as well.
Because that's what Mass is for. If I did ThrustFactor without any sort of filtering, that's basically doing Mass over again, and it's completely pointless.

I want an enemy VERY thrustable by one damagetype while taking very little actual damage. Yet at the same time, I want the enemy to also move very little against a damagetype it's extremely susceptible towards.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: ThrustFactor

Post by Major Cooke »

And updated once more.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ThrustFactor

Post by Graf Zahl »

This will need at least one more update to deconflict with the ICESHATTER submission I just added.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: ThrustFactor

Post by Major Cooke »

Done!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ThrustFactor

Post by Graf Zahl »

Ok, but for this one I want to have a second opinion first as it's quite invasive and I cannot really say at the moment how this merges with the scripting branch.

No problem with the feature as such - which for certain kinds of mods may be quite useful.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: ThrustFactor

Post by Major Cooke »

Agreed. I figured it was equally (though not as curb kicking) as things like CountInv and the likes... Though I know those would definitely be a problem to the scripting branch (and is the reason Randi rejected those), this one hopefully will be less.
Blzut3
 
 
Posts: 3215
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: ThrustFactor

Post by Blzut3 »

Only have time for a line by line reading today. Left comments on GitHub.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: ThrustFactor

Post by Major Cooke »

Okay, there's a small problem with undefined damagefactors: there's no chance to use the raw damage instead of filtered damage if they're completely immune to it. I'm introducing a new flag, THRUSTRAWDMG. An inflictor or a target with this flag will be thrust the target using the raw damage versus filtered damage in the thrust calculations. This also solves a problem presented with my original version had, where I couldn't return it to normal.

Target will not need to have a thrustfactor defined for it.
Blzut3
 
 
Posts: 3215
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: ThrustFactor

Post by Blzut3 »

Pretty much everything that does thrusting is broken as I suspected. There is one place where the thrusting is done in floating point (MP sync issue?) which is fine, but the rest need FixedMul. Secondly you didn't set the default so you broke all thrusting regardless of that issue.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: ThrustFactor

Post by Major Cooke »

Yeah, the actor.txt file became corrupted along with a couple others when switching branches.

I've pushed the changes into the pull request, but please bear in mind I cannot test the Strife, Heretic or Hexen changes at all. I don't own those games.
User avatar
Major Cooke
Posts: 8215
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: ThrustFactor

Post by Major Cooke »

...Speaking of which, Blzut3, is this ready?
Blzut3
 
 
Posts: 3215
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: ThrustFactor

Post by Blzut3 »

Looks fine. Only thing I can think of is that the NOIMPACTDAMAGE flag doesn't quite do what it says. That is as far as I can tell the actors are still susceptible to impact damage from other blasted actors. That said I suppose it's consistent with the action parameter flags that it's trying to supplement and DONTBLAST is already taken (with a slightly different meaning).
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”