It would be cool if we could also have shields for bombs, but maybe I'm asking for too much.
EDIT: I just looked at the code, and adding custom HP to a bomb wouldn't be too hard ( I'm not even going to look at sheilds ). Would it look something like this?:
weapon.h
typedef struct weapon_info {
...
float max_hull_strength;
...
}
weapon.cpp
void init_weapon_entry(int weap_info_index) {
...
wip->max_hull_strength = 0.0f
...
}
int parse_weapon(int subtype, bool replace) {
...
if(optional_string("$Hitpoints:"))
{
stuff_float(&wip->max_hull_strength);
if (wip->hitpoints < 0.0f)
{
Warning(LOCATION, "Max hull strength on %s '%s' cannot be less than 0. Defaulting to 0.\n", info_type_name, wip->name, wip->max_hull_strength);
wip->max_hull_strength = 0.0f;
}
}
...
}
int weapon_create( vec3d * pos, matrix * porient, int weapon_type, int parent_objnum, int group_id, int is_locked, int is_spawned) {
...
if (wip->wi_flags & WIF_BOMB){
if (wip->max_hull_strength <= 0.0f) {
objp->hull_strength = 50.0f;
} else {
objp->hull_strength = wip->max_hull_strength;
}
} else {
objp->hull_strength = 0.0f;
}
...
}
Forgive me if this is incomplete/buggy/flat out wrong, I am really a n00b programmer who is used to working with high-level, object-oriented APIs in GUI based apps (in Objective-C or Java), and I am not set to test this.