View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002099 | FSSCP | gameplay | public | 2010-01-23 08:44 | 2010-05-12 19:38 |
| Reporter | ChronoReverse | Assigned To | Sushi_CW | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.6.11 | ||||
| Summary | 0002099: Energy transfer from shields to lasers does not reduce shields when using CustomAI | ||||
| Description | When the custom AI mod or BP:WiH (which has custom AI) is loaded, transferring energy directly from shields to lasers (NOT ETS) will recharge the lasers but does not use up shield energy. This means you can set the laser recharge to zero and keep it filled by transferring the unlimited energy from shields. | ||||
| Additional Information | Steps to reproduce: Load mod with custom AI Start mission and set engine recharge to maximum Fire primaries to drain capacitor Shunt energy from shields to lasers (default key is shift+scroll-lock) Required files: CustomAI (http://www.hard-light.net/forums/index.php?topic=66477.0) | ||||
| Tags | No tags attached. | ||||
|
|
After some digging, it turns out that the culprit is the $SMART SHIELD MANAGEMENT flag. Something about it isn't working quite right, and is causing the shields to not decrease when energy is transferred from them. Odds are, it affects the AI too. |
|
2010-05-10 16:36
|
2099_1.patch (665 bytes)
Index: code/object/objectshield.cpp
===================================================================
--- code/object/objectshield.cpp (revision 6095)
+++ code/object/objectshield.cpp (working copy)
@@ -49,7 +49,9 @@
if (delta == 0.0f)
return;
- if (!(Ai_info[Ships[objp->instance].ai_index].ai_profile_flags & AIPF_SMART_SHIELD_MANAGEMENT))
+
+ if (!(Ai_info[Ships[objp->instance].ai_index].ai_profile_flags & AIPF_SMART_SHIELD_MANAGEMENT)
+ || delta <= 0.0f) //SUSHI: We don't want smart shield management for negative delta
{
for (int i = 0; i < MAX_SHIELD_SECTIONS; i++)
shield_add_quad(objp, i, delta / MAX_SHIELD_SECTIONS);
|
|
|
Uploaded 2099_1.patch, which fixes the bug. I suspect it also affects the AI at some point, but I'm not entirely sure what that effect is. I want to get a bit of testing done on this before committing to trunk, just so we know exactly what this affects. |
|
|
Fixed in Trunk 6097. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-01-23 08:44 | ChronoReverse | New Issue | |
| 2010-01-23 17:55 | Sushi_CW | Status | new => assigned |
| 2010-01-23 17:55 | Sushi_CW | Assigned To | => Sushi_CW |
| 2010-05-10 16:18 | Sushi_CW | Note Added: 0011954 | |
| 2010-05-10 16:36 | Sushi_CW | File Added: 2099_1.patch | |
| 2010-05-10 16:37 | Sushi_CW | Note Added: 0011955 | |
| 2010-05-12 19:38 | Sushi_CW | Note Added: 0011958 | |
| 2010-05-12 19:38 | Sushi_CW | Status | assigned => resolved |
| 2010-05-12 19:38 | Sushi_CW | Resolution | open => fixed |