View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004831 | Spring engine | General | public | 2015-06-21 12:14 | 2015-06-21 13:42 |
| Reporter | hokomoko | Assigned To | hokomoko | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 98.0.1+git | ||||
| Summary | 0004831: NoWeapon doesn't do what it's supposed to do | ||||
| Description | Currently 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? | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
|
|
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. |
|
|
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) |
|
|
I'll try making something sane along those lines and see if we get errors. |
|
|
Fix bc4f682009d1101fea3ff92dfaec71aeb72862c3 committed to develop branch: Fix 0004831, repo: spring changeset id: 5193 |
| 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 |