Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/pr-changelogs/3397.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* add `subMissile` boolean export to the Lua weaponDefs. Non-torpedo weapon types always have subMissile=false.
1 change: 1 addition & 0 deletions rts/Lua/LuaWeaponDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ static bool InitParamMap()
ADD_BOOL("turret", wd.turret);
ADD_BOOL("onlyForward", wd.onlyForward);
ADD_BOOL("waterWeapon", wd.waterweapon);
ADD_BOOL("subMissile", wd.submissile);
ADD_BOOL("tracks", wd.tracks);
ADD_BOOL("paralyzer", wd.paralyzer);

Expand Down
1 change: 1 addition & 0 deletions rts/Sim/Weapons/WeaponDef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ WeaponDef::WeaponDef(const LuaTable& wdTable, const std::string& name_, int id_)
isShield = (type == "Shield");
noAutoTarget = (manualfire || interceptor || isShield);
onlyForward = !turret && (projectileType != WEAPON_STARBURST_PROJECTILE);
submissile &= (projectileType == WEAPON_TORPEDO_PROJECTILE);
}


Expand Down
Loading