Some work on the missile projectile#8717
Conversation
Starting with low speed and gradually become faster, rather than flying at constant speed. |
There was a problem hiding this comment.
Might be a good opportunity to unhardcode this. Something like "JammedDiversionBounds" (used for both horizontal and vertical, but there might be a better name for that) with Desc "Defines range of facings by which jammed missiles can stray from current path.".
There was a problem hiding this comment.
It's jamming the current path instead of the original path. This gives a compounding jamming effect on the path of the missile.
|
I'll play around with the acceleration next. I guess that that would mean
|
There was a problem hiding this comment.
I don't think Trail and related should be renamed. The tag was named as such in TS/RA2 and theirmods tend to use fire/toxic weapons with them too.
There was a problem hiding this comment.
Agreed. It's also used for the RA flamethrowers, so it should stay Trail, in my opinion.
There was a problem hiding this comment.
The current code have them mixed - new tags and the code use Smoke* already with only the old tags aren't renamed - this should be reverted back entirely to use Trail*.
|
Sorry, I took only a quick glampse so far. What is freefall mode you refer to? Does that apply to missiles which already passed their RangeLimit but has ExplodeWhenEmpty=false and refers that they fall to the ground without doing(?) damage? Does ActivationDelay means RA2 CourseLockDuration - missile is forced into the initial facing for x frames and only then starts to guide itself to target? |
There was a problem hiding this comment.
I haven't tested this yet, true, but unless I overlooked something/didn't grasped the concept, you completely disable acceleration when the firer directly fires upside.
There was a problem hiding this comment.
You'll need to rewrite this using integer math. Floating point math can be non-deterministic, and causes hard-to-reproduce desyncs.
There was a problem hiding this comment.
This condition might change, but @GraionDilach, right now it works well with any firing angle.
|
@GraionDilach, you have understood the The |
There was a problem hiding this comment.
Nit: Add a 'TODO:' before Rename, easier to keep track of these if you have a buzzword to search for.
|
OK, updated. The TODO comments will be taken care of when the YAML upgrade rule is in place. |
|
|
|
I've removed the missile shadow part cause it's done in #8923 |
753b0e8 to
b10031a
Compare
Added downward lookahead capability.
b10031a to
cd8a152
Compare
|
Making this thing know how to avoid obstacles is proving to be a handful. As it turns out, the previous version of the lookahead didn't handle firing downhill properly... @obrakmann, the bike and stealth tank should now be able to fire normally. The previous bug was a consequence of incorrectly choosing negative launch angles. |
|
Retested since there have been a few updates since I last looked at this. The look-ahead works fine now, the vertical angle is factored into the sprite facing and the rest still works. So I'm renewing my 👍 |
|
Yes, works fine now, 👍 |
Some work on the missile projectile
|
I wanted to clean up the code some more. And make sure no other problems appear... Are you sure you want to merge it in the state it is in? Can I file a followup PR then? In particular I'm afraid that some of my calls to |
|
@matija-hustic: oh sorry, I wasn't aware of that. But sure, file a follow-up. It all seemed to work nicely for me, though. |
|
OK, I'll do that asap. And next time I'll ask for a "Has dependencies" label. I just hope the |
There was a problem hiding this comment.
If you do a followup pr, could you please put in some more readable names? We have plenty of spare vowels available for use in variables ;)
There was a problem hiding this comment.
Sure :) I would have already left the vowels before were I not afraid of the names being excessively long and ugly. E.g. predAttHght to predictedAttainedHeight basically doubles the length
|
I'm just here to state that @matija-hustic is a hero:tm:, no more, no less. |
There was a problem hiding this comment.
If you do unhardcode this in a follow-up (I like the idea), personally I'd suggest leaving the minus here and only unhardcode the number, I think that would be more intuitive for modders (higher value = stronger gravity).
|
This seriously junked up the SAM sites for NOD / CnC Gold FYI. The SAMs now shoot missles into the ground short of their targets. |
Followup to OpenRA#8717 * Gravity unharcoded * Variable names more readable * More smaller functions instead of few big ones * Crash check reverted to strictly negative heights * Retested SAMs, submarines, adv. guard towers I'm happier with how the code looks right now. Feels cleaner to me at least. As far as I've seen, current functionality is OK. It remains to see if the new features will cooperate once they're used in YAMLs.
An attempt at tackling #7509.
Introduces:
Not sure about what was meant in #7509 by
Still missing and out of scope of this PR (at least currently)