View Issue Details

IDProjectCategoryView StatusLast Update
0004831Spring engineGeneralpublic2015-06-21 13:42
Reporterhokomoko Assigned Tohokomoko  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version98.0.1+git 
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

Activities

abma

2015-06-21 13:04

administrator   ~0014667

Last edited: 2015-06-21 13:08

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.

abma

2015-06-21 13:07

administrator   ~0014668

Last edited: 2015-06-21 13:22

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)

hokomoko

2015-06-21 13:20

developer   ~0014669

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

hokomoko

2015-06-21 13:42

developer   ~0014670

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

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
2015-06-21 13:20 hokomoko Note Added: 0014669
2015-06-21 13:22 abma Note Edited: 0014668
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