2019-12-07 16:55 EST


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002454FSSCPgameplaypublic2011-06-11 18:45
ReporterThe_E 
Assigned ToThe_E 
PrioritylowSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.13 
Target VersionFixed in Version3.6.13 
Summary0002454: Weapon damage not applied correctly for AI or player
DescriptionFollowing discussion found here: http://www.hard-light.net/forums/index.php?topic=76608.0

It seems that the player and the AI operate on different rules regarding the damage they are able to do. Test mission is attached, showing the issue.
TagsNo tags attached.
Attached Files
  • ? file icon weapontest.fs2 (4,067 bytes) 2011-06-11 14:17
  • patch file icon weapondamage.patch (1,530 bytes) 2011-06-11 14:52 -
    Index: code/ai/ai_profiles.cpp
    ===================================================================
    --- code/ai/ai_profiles.cpp	(revision 7237)
    +++ code/ai/ai_profiles.cpp	(working copy)
    @@ -428,6 +428,8 @@
     
     			set_flag(profile, "$allow beams to damage bombs:", AIPF2_BEAMS_DAMAGE_WEAPONS, AIP_FLAG2);
     
    +			set_flag(profile, "$use damage scaling for ai weapons:", AIPF2_AI_WEAPON_SCALE_FIX, AIP_FLAG2);
    +
     			profile->ai_path_mode = AI_PATH_MODE_NORMAL;
     			if(optional_string("$ai path mode:"))
     			{
    Index: code/ai/ai_profiles.h
    ===================================================================
    --- code/ai/ai_profiles.h	(revision 7237)
    +++ code/ai/ai_profiles.h	(working copy)
    @@ -60,6 +60,7 @@
     #define AIPF2_AI_AIMS_FROM_SHIP_CENTER								(1 << 6)
     #define AIPF2_ALLOW_PRIMARY_LINK_DELAY								(1 << 7)
     #define	AIPF2_BEAMS_DAMAGE_WEAPONS									(1 << 8)
    +#define AIPF2_AI_WEAPON_SCALE_FIX									(1 << 9)
     
     // AI Path types
     #define	AI_PATH_MODE_NORMAL 0
    Index: code/weapon/weapons.cpp
    ===================================================================
    --- code/weapon/weapons.cpp	(revision 7237)
    +++ code/weapon/weapons.cpp	(working copy)
    @@ -6771,7 +6771,7 @@
     		if( is_big_damage_ship && !(wip->wi_flags & (WIF_HURTS_BIG_SHIPS)) ){
     
     			// if the player is firing it
    -			if ( from_player ) {
    +			if ( from_player || The_mission.ai_profile->flags2 & AIPF2_AI_WEAPON_SCALE_FIX) {
     				// if it's a laser weapon
     				if(wip->subtype == WP_LASER){
     					total_scale *= 0.01f;
    
    patch file icon weapondamage.patch (1,530 bytes) 2011-06-11 14:52 +

-Relationships
+Relationships

-Notes

~0012710

The_E (administrator)

Okay, after a bit of digging, this is confirmed as a retail "feature".

However, since I find this "feature" to be more of a "bug", I propose the addition of an AI Profiles flag to better control this behaviour. Patch attached.

~0012711

The_E (administrator)

After discussion with Sushi, I added a new AI Profiles option in 7238
+Notes

-Issue History
Date Modified Username Field Change
2011-06-11 14:17 The_E New Issue
2011-06-11 14:17 The_E File Added: weapontest.fs2
2011-06-11 14:52 The_E File Added: weapondamage.patch
2011-06-11 14:52 The_E Note Added: 0012710
2011-06-11 14:52 The_E Priority high => low
2011-06-11 14:52 The_E Status new => acknowledged
2011-06-11 18:45 The_E Note Added: 0012711
2011-06-11 18:45 The_E Status acknowledged => resolved
2011-06-11 18:45 The_E Fixed in Version => 3.6.13
2011-06-11 18:45 The_E Resolution open => fixed
2011-06-11 18:45 The_E Assigned To => The_E
+Issue History