View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002252 | FSSCP | AI | public | 2010-07-08 13:53 | 2010-07-09 13:48 |
| Reporter | Spoon | Assigned To | Sushi_CW | ||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.6.13 | ||||
| Summary | 0002252: Shield management for capital ships | ||||
| Description | For Sushi Currently capital ships with shields (and a mesh) do not manage their shields at all. | ||||
| Tags | No tags attached. | ||||
|
2010-07-08 14:23
|
cap_shield_manage.patch (2,407 bytes)
Index: code/ai/ai_profiles.cpp
===================================================================
--- code/ai/ai_profiles.cpp (revision 6282)
+++ code/ai/ai_profiles.cpp (working copy)
@@ -393,6 +393,8 @@
set_flag(profile, "$perform less checks for death screams:", AIPF2_PERFORM_LESS_SCREAM_CHECKS, AIP_FLAG2);
+ set_flag(profile, "$big ships manage shields:", AIPF2_BIG_SHIELD_MANAGE, AIP_FLAG2);
+
// if we've been through once already and are at the same place, force a move
if ( saved_Mp && (saved_Mp == Mp) )
Mp++;
Index: code/ai/ai_profiles.h
===================================================================
--- code/ai/ai_profiles.h (revision 6282)
+++ code/ai/ai_profiles.h (working copy)
@@ -54,6 +54,7 @@
#define AIPF2_TURRETS_IGNORE_TARGET_RADIUS (1 << 0)
#define AIPF2_NO_SPECIAL_PLAYER_AVOID (1 << 1)
#define AIPF2_PERFORM_LESS_SCREAM_CHECKS (1 << 2)
+#define AIPF2_BIG_SHIELD_MANAGE (1 << 3)
#define MAX_AI_PROFILES 5
Index: code/ai/aicode.cpp
===================================================================
--- code/ai/aicode.cpp (revision 6282)
+++ code/ai/aicode.cpp (working copy)
@@ -769,6 +769,8 @@
set_aic_flag(aicp, "$allow vertical dodge:", AIPF_ALLOW_VERTICAL_DODGE, AIP_FLAG);
set_aic_flag(aicp, "$no extra collision avoidance vs player:", AIPF2_NO_SPECIAL_PLAYER_AVOID, AIP_FLAG2);
+
+ set_aic_flag(aicp, "$big ships manage shields:", AIPF2_BIG_SHIELD_MANAGE, AIP_FLAG2);
}
void reset_ai_class_names()
@@ -12455,7 +12457,7 @@
// set timestamp
aip->shield_manage_timestamp = timestamp((int) (delay * 1000.0f));
- if (sip->flags & SIF_SMALL_SHIP) {
+ if (sip->flags & SIF_SMALL_SHIP || (aip->ai_profile_flags2 & AIPF2_BIG_SHIELD_MANAGE)) {
if (Missiontime - aip->last_hit_time < F1_0*10)
ai_transfer_shield(objp, aip->last_hit_quadrant);
else
Index: code/globalincs/def_files.cpp
===================================================================
--- code/globalincs/def_files.cpp (revision 6282)
+++ code/globalincs/def_files.cpp (working copy)
@@ -990,6 +990,9 @@
;; before making it give a death scream \n\
$perform less checks for death screams: NO \n\
\n\
+;; If set, allows shield management for large ships. \n\
+$big ships manage shields: NO \n\
+ \n\
#End \n\
";
|
|
|
Added in 6288 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-07-08 13:53 | Spoon | New Issue | |
| 2010-07-08 13:53 | Spoon | Status | new => assigned |
| 2010-07-08 13:53 | Spoon | Assigned To | => Sushi_CW |
| 2010-07-08 14:23 | Sushi_CW | File Added: cap_shield_manage.patch | |
| 2010-07-09 13:48 | Sushi_CW | Note Added: 0012207 | |
| 2010-07-09 13:48 | Sushi_CW | Status | assigned => resolved |
| 2010-07-09 13:48 | Sushi_CW | Resolution | open => fixed |