beyond-all-reason / beyond-all-reason/RecoilEngine
841 WeaponDefs is zero indexed
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
We only discovered this in ZK by cleaning out unused weapons. Now a weapon that appears in the game has weaponDefID 0 and it is causing issues. UnitDefs is one indexed.
```
for i, data in pairs(WeaponDefs) do
Spring.Echo("index", i, "weapon", data.name)
end
for i, data in pairs(UnitDefs) do
Spring.Echo("index", i, "unit", data.name)
end
...
[t=00:02:04.208972][f=0001965] index, 703, weapon, zenith_meteor_aim
[t=00:02:04.208998][f=0001965] index, 704, weapon, zenith_meteor_float
[t=00:02:04.209024][f=0001965] index, 705, weapon, zenith_meteor_uncontrolled
[t=00:02:04.209068][f=0001965] index, 0, weapon, amphaa_missile
```
Contributor guide
Assessment
This issue has not been assessed yet.