Fix High Explosive firing from MechLab

Correct the High Explosive ammo key and ensure positive-capacity weapons receive at least one starting round and ammo per pack. Apply MechLab special handling to weapon ID 87 and document activation, stacking, validation, and deployment requirements.
This commit is contained in:
2026-08-08 22:46:42 -05:00
parent 3e48718330
commit cd10398f71
4 changed files with 30 additions and 5 deletions
+6 -3
View File
@@ -906,8 +906,10 @@ void
if(model->maxAmmoCount > 0)
{
Verify(model->totalSlotsTaken != 0);
create_message->ammoCount = model->maxAmmoCount / (3 * model->totalSlotsTaken);
create_message->initialAmmoCount = model->maxAmmoCount / (3 * model->totalSlotsTaken);
int ammo_count = model->maxAmmoCount / (3 * model->totalSlotsTaken);
Min_Clamp(ammo_count, 1);
create_message->ammoCount = ammo_count;
create_message->initialAmmoCount = ammo_count;
}
else
{
@@ -1064,7 +1066,8 @@ int
Verify(model->totalSlotsTaken != 0);
int value = model->maxAmmoCount / (3 * model->totalSlotsTaken);
Min_Clamp(value, 0);
if(model->maxAmmoCount > 0)
Min_Clamp(value, 1);
return value;
}
@@ -1701,7 +1701,7 @@ s_weapon_slot
render_posy += getheight(slots[k].weapon_pic)
if slot_value[k] == 84
if slot_value[k] == 87
{
slots[k].highexplosive = true
}
@@ -12,7 +12,7 @@ DamageAmount=100
Tonage=2.0
NumFire=1.0
fireRate=0.15
MaxAmmoCount=1
MaxAmmo=1
InitialLinearVelocity=0.0 0.0 0.0
InitialLinearAcceleration=0.0 0.0 0.0
SplashRadius=30.0