Swaffy'sMod Bug: ExpPack and Landmine

Ask questions, discuss ideas, get answers
dudejo
Posts: 71
Joined: Tue Nov 30, 2010 2:33 am

Re: Swaffy'sMod Bug: ExpPack and Landmine

Post by dudejo »

From what I can gather, the reason you're limited to 3 bombs is because of the rate of fire. The moment I set my personal files to your rate of fire of 10, I got the same problem as you. It's most likely causing a conflict with the Firedelay setting.

As for the ExpPacks setting the mines off, I couldn't get it to happen using your settings but I can confirm that what Vilespring said about the differences in mass is true. A heavier ExpPack will set off the mines under normal circumstances.

The best I can say is that a setting, somewhere, is preventing the landmine from registering its own mass.
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Swaffy'sMod Bug: ExpPack and Landmine

Post by Vilespring »

Throw a mine at an Expack. I really think that might help me. If the Expack goes boom, then we got something funny.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
dudejo
Posts: 71
Joined: Tue Nov 30, 2010 2:33 am

Re: Swaffy'sMod Bug: ExpPack and Landmine

Post by dudejo »

Something would indeed be fishy, considering his ExpPack doesn't have any code for proximity explosions. Unless proximity explosions can be triggered simply by giving damage mods to the weapon's materials.

Also, I noticed that his mines don't stick to the ground. Could it be the geometry files?
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Swaffy'sMod Bug: ExpPack and Landmine

Post by Swaffy »

Well, the whole "mines sticking to the ground" thing is because I increased the velocity for the FireArms on the ExpPack. Usually it has a very low velocity and thus the pack just drops. But I wanted players to be able to throw it a bit further.

Bugs fixed! It WAS the fire rate. And it WAS the mass that caused the landmines to explode, though it wasn't very important problem.

I will make a hotfix for my mod as soon as I figure out any other smallish bugs that might exist.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Swaffy'sMod Bug: ExpPack and Landmine

Post by Apache Thunder »

You can make the expack have more mass but not detonate the mines. Two things are required to trigger mines. A larger mass then the projectile, and having armor turned on.

Simply set "ObjectTemplate.hasAmor" to 0 on your exppacks and you can now make them as heavy as you want without causing mines to detonate. ;)
ImageImageImage
I have cameras in your head!
dudejo
Posts: 71
Joined: Tue Nov 30, 2010 2:33 am

Re: Swaffy'sMod Bug: ExpPack and Landmine

Post by dudejo »

Are there any side effects to deactivating armor on the ExpPack?

Or is that simply a vestigial function from the early versions of BF1942?
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Swaffy'sMod Bug: ExpPack and Landmine

Post by Vilespring »

The "hasArmor" oddly enough, makes minimap icons not work. It doesn't take damage, and, as odd as it sounds, makes AI not "see" you. In my debug modding days, I changed that code on the T34 tank, so that is how I know. Funny, because you are a stealth tank to the AI, for all they know, they are just dieing to nothing! :lol:
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
dudejo
Posts: 71
Joined: Tue Nov 30, 2010 2:33 am

Re: Swaffy'sMod Bug: ExpPack and Landmine

Post by dudejo »

I did notice that the AI tries to avoid landmines when they're not driving at full speed. The way I see it, disabling hasArmor on the ExpPacks and the Landmines will most likely make them entirely invisible to the AI.
russ
Posts: 73
Joined: Sun Oct 29, 2017 8:12 am

Re: Swaffy'sMod Bug: ExpPack and Landmine

Post by russ »

Apache Thunder wrote:You can make the expack have more mass but not detonate the mines. Two things are required to trigger mines. A larger mass then the projectile, and having armor turned on.

Simply set "ObjectTemplate.hasAmor" to 0 on your exppacks and you can now make them as heavy as you want without causing mines to detonate. ;)
Just resurrecting this thread to add additional detonation rules so they are documented somewhere. The rules apply to any projectiles with an explodeNearEnemyDistance (landmines, flak, sea mines, depth charges).

* ProximityFusePrimer time must have passed (if present).
* The object must have hasArmor set.
* The object cannot be a BFSoldier, even if hasArmor is set.
* The object must have a physics node.

If above water:

* The object must weigh more than the projectile.
* The center of the object must be within explodeNearEnemyDistance of the center of the projectile.
* The object must be less than or equal to 100000.0 in mass.
* The object must be moving at 2.5m/s or faster.

If under water:

* The object must weigh more than 50000.0
* The grid distance between object centers must be less than or equal to explodeNearEnemyDistance
* The Z distance between object centers must be less than explodeNearEnemyDistance

The second two rules may be a bit confusing, the object culling code pulls in objects by doing an approximate distance calculation. In the above water case, any collected objects will be accurately measured using Pythagorean. For underwater objects, only the Z distance is tested. This is also why placing mines with the PT boat is so damned dangerous, it doesn't matter how slow you are moving, if you get too close, boom. Also, if you place a mine near a ship that isn't moving, it will instaboom.

So a few notes, yes you can drive slowly to avoid mines. You can also drive with a mine on your vehicle as long as you do not exceed 2.5m/s. You can also drive slowly to avoid proximity flak. You cannot proximity flak a stationary vehicle.
Post Reply