|
|
After some talk, I would think it'd be best to have this as a mod.tbl option, because Diaspora might hate my guts otherwise. |
|
|
|
Isn't this less about situations where the target ship is part of the same collision group, and instead a collision just happens to occur with part of the attacker ship's collision group, on the way towards the target ship? |
|
|
|
Suggested patch from The_E |
|
|
The_E
2012-08-19 09:59
administrator
|
weaponcolgroup.patch (2,137 bytes)
Index: globalincs/def_files.cpp
===================================================================
--- globalincs/def_files.cpp (revision 9123)
+++ globalincs/def_files.cpp (working copy)
@@ -156,6 +156,9 @@
;; used when no ani is specified or weapon_select_3d is active \n\
$Default weapon select effect: FS2 \n\
\n\
+;; Enable weapons to inherit their parent object's collision group setting \n\
+$Weapons inherit parent collision group: NO \n\
+ \n\
#END \n\
";
Index: mod_table/mod_table.cpp
===================================================================
--- mod_table/mod_table.cpp (revision 9123)
+++ mod_table/mod_table.cpp (working copy)
@@ -22,6 +22,7 @@
int Default_weapon_select_effect = 0;
bool Enable_external_shaders = false;
bool Full_color_head_anis = false;
+bool Weapons_inherit_parent_collision_group = false;
void parse_mod_table(char *filename)
@@ -162,6 +163,12 @@
Default_weapon_select_effect = 0;
}
+ if (optional_string("$Weapons inherit parent collision group")) {
+ stuff_boolean(&Weapons_inherit_parent_collision_group);
+ if (Weapons_inherit_parent_collision_group)
+ mprintf(("Game Settings Table: Weapons inherit parent collision group\n"));
+ }
+
required_string("#END");
// close localization
Index: mod_table/mod_table.h
===================================================================
--- mod_table/mod_table.h (revision 9123)
+++ mod_table/mod_table.h (working copy)
@@ -19,5 +19,6 @@
extern int Default_weapon_select_effect;
extern bool Enable_external_shaders;
extern bool Full_color_head_anis;
+extern bool Weapons_inherit_parent_collision_group;
void mod_table_init();
Index: weapon/weapons.cpp
===================================================================
--- weapon/weapons.cpp (revision 9123)
+++ weapon/weapons.cpp (working copy)
@@ -5233,6 +5233,10 @@
wp->damage_ship_id[i] = -1;
}
+ if (Weapons_inherit_parent_collision_group) {
+ Objects[objnum].collision_group_id = Objects[parent_objnum].collision_group_id;
+ }
+
return objnum;
}
|
|
|
|
This patch appears fine to me. The defaults are correct, so it is question of does this work for AndrewOfDoom, otherwise it should be committed (if you require a build with this fix please say so). |
|
|
|
Patch committed to svn @9293 |
|