Game Development Community

[Beta 2] Shooting the Ammo create causes engine crash

by Aldavidson · in Torque 3D Professional · 06/02/2009 (7:20 am) · 2 replies

Whenever you shoot the ammo create (the 3 bullets stuck together) the engine crashes.

to reproduce:
1. load up fps kit
2. shoot the locket launcher at the ground till you die
3. go back to where you died and shoot the ammo create

#1
06/02/2009 (9:56 am)
I had seen that problem, sort of, and thought it had been fixed since I can't reproduce it. But it did only happen with the items you toss when you die.

What I had seen was an issue about the impulse factor for the radius damage. If the ratio of the item's mass and the impulse was greater than 1:2000 then the game would hang up for a few seconds -- but there was no crash.

Just to see if it's related to the same issue, would you try changing the mass of the ammo item to something greater and/or lowering the impulse factor for the rocket? For example with 20000 impulse try making the mass of the ammo item 10 or greater, or for a mass of 2 lower the impulse to 4000 or less.

If that doesn't work then in player.cs (scripts/server) just comment/remove this code in Armor::onDisabled()
// Toss current mounted weapon and ammo if any
%item = %obj.getMountedImage($WeaponSlot).item;
if (isObject(%item))
{
    %amount = %obj.getInventory(%item.image.ammo);
    if(%amount)
        %obj.throw(%item.image.ammo, %amount);
    %obj.throw(%item, 1);
}

// Toss out a health patch
%obj.tossPatch();
#2
06/02/2009 (1:21 pm)
Nope still crashes for me =S.

i imagine your code patch would fix it, but removes the functionality that is still desired :P