View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002468 | FSSCP | SEXPs | public | 2011-07-09 05:54 | 2011-09-18 05:23 |
Reporter | bigchunk1 | Assigned To | niffiwan | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.13 | ||||
Fixed in Version | 3.6.14 RC1 | ||||
Summary | 0002468: Change-Ship-Class does not change armor type | ||||
Description | Pretty straightforward explaination. If you use the change-ship-class sexp to change a ship's class, the armor values of the ship will not be changed. The ship which had the sexp act on it will retain the armor values of the prior class. This data transfer error may also apply to other data in a ship's class, but that part is only speculation. | ||||
Additional Information | A test mod can be found here. Look for the mission in the tech room. http://www.mediafire.com/?9jva394a5mep8cf | ||||
Tags | No tags attached. | ||||
2011-09-12 10:16
|
mantis-2468.patch (865 bytes)
Index: code/ship/ship.cpp =================================================================== --- code/ship/ship.cpp (revision 7707) +++ code/ship/ship.cpp (working copy) @@ -8756,6 +8756,12 @@ Assert(sp->ship_max_hull_strength > 0.0f); Assert(objp->hull_strength > 0.0f); + // niffiwan: set new armor types + sp->armor_type_idx = sip->armor_type_idx; + sp->shield_armor_type_idx = sip->shield_armor_type_idx; + sp->collision_damage_type_idx = sip->collision_damage_type_idx; + sp->debris_damage_type_idx = sip->debris_damage_type_idx; + // subsys stuff done only after hull stuff is set // if the subsystem list is not currently empty, then we need to clear it out first. ship_subsystems_delete(sp); @@ -16709,4 +16715,4 @@ void init_path_metadata(path_metadata& metadata) { vm_vec_zero(&metadata.departure_rvec); -} \ No newline at end of file +} |
|
I've created a patch to transfer the armor (& shield, collision, debris) values to the new ship. My testing with your mod has worked - thanks for providing that. I've built a binary for you to test with as well, here's the link: http://www.mediafire.com/?hsnelzavnbdbiv9 Let me know if there are any problems with it. |
|
Here's a new link with better filename, and I've 7zip'd it. http://www.mediafire.com/?xq09ucwfbn7z56z |
|
Ok, I was able to test this and it worked. I used two armor types, one essentially invulnerable and one vulnerable. When the missions switched the class of the ship to a 'vulnerable armor' class I was able to destroy the ship. Seems you fixed the issue. What happens now? |
|
Thanks - I've posted my patch on the forums. If the SCP are happy with it, it should be committed to trunk in the near future. http://www.hard-light.net/forums/index.php?topic=78305.0 |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-07-09 05:54 | bigchunk1 | New Issue | |
2011-09-11 02:30 | niffiwan | Assigned To | => niffiwan |
2011-09-11 02:30 | niffiwan | Status | new => confirmed |
2011-09-12 10:16 | niffiwan | File Added: mantis-2468.patch | |
2011-09-12 11:14 | niffiwan | Note Added: 0012814 | |
2011-09-13 13:09 | niffiwan | Status | confirmed => feedback |
2011-09-15 10:55 | niffiwan | Note Added: 0012822 | |
2011-09-17 00:58 | bigchunk1 | Note Added: 0012824 | |
2011-09-17 11:31 | niffiwan | Note Added: 0012826 | |
2011-09-18 05:23 | Echelon9 | Status | feedback => resolved |
2011-09-18 05:23 | Echelon9 | Fixed in Version | => 3.6.14 RC1 |
2011-09-18 05:23 | Echelon9 | Resolution | open => fixed |