2025-07-21 16:26 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004831Spring engineGeneralpublic2015-06-21 13:42
Reporterhokomoko 
Assigned Tohokomoko 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version98.0.1+git 
Target VersionFixed in Version 
Summary0004831: NoWeapon doesn't do what it's supposed to do
DescriptionCurrently when a weapon's type isn't specified, it defaults to cannon:
https://github.com/spring/spring/blob/develop/rts/Sim/Weapons/WeaponDef.cpp#L29
hence you can't declare a weapon as a NoWeapon.
Even if you do, you'll still get an error.
https://github.com/spring/spring/blob/develop/rts/Sim/Weapons/WeaponLoader.cpp#L98

Should NoWeapon be a valid choice?
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0014667

abma (administrator)

Last edited: 2015-06-21 13:08

View 2 revisions

docs say yes:

https://springrts.com/wiki/Gamedev:WeaponDefs#NoWeapon

it also says:
"There needs to be only one of these weapons and it is created by setting weaponName = "NOWEAPON" rather than by the weaponType tag."

which is really weird which should be deprecated imo.

~0014668

abma (administrator)

Last edited: 2015-06-21 13:22

View 2 revisions

imo sth. like:

} else if (weaponType == "NOWEAPON") {
    weapon = new CNoWeapon(owner, weaponDef);
} else {
    LOG_L(L_ERROR, "weapon-type %s unknown", weaponType.c_str());
    weapon = new CNoWeapon(owner, weaponDef);
}

(but i'm not familar with this part of the engine)

~0014669

hokomoko (developer)

I'll try making something sane along those lines and see if we get errors.

~0014670

hokomoko (developer)

Fix bc4f682009d1101fea3ff92dfaec71aeb72862c3 committed to develop branch: Fix 0004831, repo: spring changeset id: 5193
+Notes

-Issue History
Date Modified Username Field Change
2015-06-21 12:14 hokomoko New Issue
2015-06-21 13:04 abma Note Added: 0014667
2015-06-21 13:07 abma Note Added: 0014668
2015-06-21 13:08 abma Note Edited: 0014667 View Revisions
2015-06-21 13:20 hokomoko Note Added: 0014669
2015-06-21 13:22 abma Note Edited: 0014668 View Revisions
2015-06-21 13:42 hokomoko Changeset attached => spring develop bc4f6820
2015-06-21 13:42 hokomoko Note Added: 0014670
2015-06-21 13:42 hokomoko Assigned To => hokomoko
2015-06-21 13:42 hokomoko Status new => resolved
2015-06-21 13:42 hokomoko Resolution open => fixed
+Issue History