Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#121 closed task (fixed)

Implement Weapon Impulse Handling in lua

Reported by: REVENGE Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: impulse, weapons, lua Cc:

Description (last modified by beherith)

http://pastebin.com/LHLP3CGF

The general gist is that DoDamage() will call ImpulseAdded(addedImpulse), and the impulse will be added accordingly to the unit's velocity vector dependent on its MoveType. The "residualImpulse" decays every Update according to some fixed value. The multipliers are added in via GameHelper when calculating damage, but I'm not entirely clear on how that portion works (but it should be transparent enough that you can just implement it as you see fit).

85.0 introduced some new stuff, particularly with features and collisions, but I'm not sure if you need to re-implement all of those features as well...

I'm uncertain if this is everything you need. Code is taken from 85.0. Caveat emptor, I found lots of changes in impulse handling between 0.82.7.1 and 85.0. I also do not know what parts of impulse are being removed from the next release, so I do not know what you want to recreate.

Change History (8)

comment:1 by beherith, 8 years ago

I need a bit more info, like what the difference is between current engine, how that changes behaviour.

comment:2 by REVENGE, 8 years ago

Ok, I'm going to try and diff 91.0 and something from the 80s.

comment:3 by REVENGE, 8 years ago

I'm seeing some interesting comments that were written between 85 and 91.

--> collisions are neither truly elastic nor truly inelastic to prevent the simulation from blowing up from impulses applied to tight groups of units

I'm guessing the "blowing up" is something you want recreated?

comment:4 by beherith, 8 years ago

No, dont want the blowing up (the part where tight groups flew everywhere.)

in reply to:  3 comment:5 by REVENGE, 8 years ago

Replying to REVENGE:

I'm seeing some interesting comments that were written between 85 and 91.

--> collisions are neither truly elastic nor truly inelastic to prevent the simulation from blowing up from impulses applied to tight groups of units

I'm guessing the "blowing up" is something you want recreated?

False alarm, just added documentation in the source.

comment:6 by beherith, 7 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

Already done by Bluestone.

comment:7 by Bluestone, 7 years ago

There was no need to implement it in lua, the engine handles it just fine. All I did was tweak the unitdefs of the ones that should have noticeable impulse to match what the current engine wanted

Note: See TracTickets for help on using tickets.