Skip to content

Fix Armament not working properly with value 0 in BurstDelays#20675

Merged
Mailaender merged 2 commits intoOpenRA:bleedfrom
PunkPun:BurstDelays
Sep 23, 2023
Merged

Fix Armament not working properly with value 0 in BurstDelays#20675
Mailaender merged 2 commits intoOpenRA:bleedfrom
PunkPun:BurstDelays

Conversation

@PunkPun
Copy link
Copy Markdown
Member

@PunkPun PunkPun commented Feb 18, 2023

Supersedes: #20601

This allows us to simplify yaml definitions, as I've done in all non-d2k mods.
It will also make it easier for the encyclopedia to read armament definitions when we get to it.

@dnqbob
Copy link
Copy Markdown
Contributor

dnqbob commented Feb 18, 2023

This allows us to simplify yaml definitions, as I've done in all non-d2k mods.
It will also make it easier for the encyclopedia to read armament definitions when we get to it.

Add: by using this properly instead of massing armaments we can also get performance improve, since the armaments are traversed every time when AutoTarget check target and Attackbase fire at target.

Comment thread mods/ra/rules/vehicles.yaml
@michaeldgg2
Copy link
Copy Markdown
Contributor

michaeldgg2 commented Feb 24, 2023

I tested this change on OpenE2140 and it works fine. Here are the weapon and armament definition:

ucs_vehicles_tiger_assault:
	ReloadDelay: 40
	Report: 5.smp
	ValidTargets: Ground
	Burst: 8
	BurstDelays: 0, 10, 0, 10, 0, 10, 0
Armament@PRIMARY:
	Weapon: ucs_vehicles_tiger_assault
	Recoil: 64
	RecoilRecovery: 38
	LocalOffset: 100,-410,0, 100,410,0
	LocalYaw: 0, 0

It does not look as concise as the BurstPerFire (from superseded PR), but it does the job.

Comment thread OpenRA.Mods.Common/Traits/Armament.cs Outdated
Comment thread OpenRA.Mods.Common/Traits/Armament.cs Outdated
Comment thread mods/ts/rules/gdi-support.yaml Outdated
@Mailaender Mailaender merged commit d77fd5c into OpenRA:bleed Sep 23, 2023
@Mailaender
Copy link
Copy Markdown
Member

Changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants