Author: Devin DeLong
BZFlag Name: Enigma
Required BZFlag Version: 2.0.10
The ProximityMine plug-in is essentially an improved version of the UselessMine plug-in. Some of the improvements include the ability to give points for using mines, the ability to remove mines from around a base on flag capture, and the ability to only let the enemy trigger mines. The biggest improvement, however, is under the hood; the code is much nicer than the code in the UselessMine project. In addition, there are two new types of mines: a super bullet mine and a bad flag mine. The super bullet mine is essentially the same as the SR mine, except the shot type is SB, and the bad flag mine tries to give a bad flag instead of killing. There has to be some bad flags on the map for the bad flag mine to work.
Usage
If you type /mine without any parameters, this is what you will see:
Code: Select all
/mine <type>
sw - Shock wave mine.
cr - Fast bullet mine (cylindrical pattern)
sr - Fast bullet mine (spherical pattern)
bf - Bad flag mine (gives a bad flag)
sb - Super bullet mine (Spherical pattern)
Options:
show - The server sends information about the mines currently on the map
(position, type, player ID)
count - Shows the number of mines on the field
set <variable> <value> (not implemented yet)
Variables:
spawnSafety (bool) - If true, removes mines from around a base on flag capture
teamKillSafety (bool) - If true, teammates cannot cause mines to blow up
Compiling
This plugin requires the Boost library to compile. The Boost library is available at http://boost.org/, and is basically an extension to the C++ Standard Library. The parts of the Boost library that are used include: bind, ptr_vector, format, algorithm/string, array, and lexical_cast.
When you rerun autogen.sh and configure, make sure you add the paths to your boost library during the configure step. The used Boost libraries are header only, so you do not have to link to anything. Here is an example:
Code: Select all
./configure --enable-shared --enable-plugins CPPFLAGS="-I/opt/local/include/boost-1_34_1"
One minor problem is that only one of each mine can blow up at once. This is due to how shot IDs are handled; the shot IDs are reused for each mine, and BZFlag does not allow multiple shots with the same ID to exist at once. This, however, is fairly insignificant, since mines blow up quickly.
Sometimes BZFlag will create a shot with an id withing the range [kMineShotIDMin, kMineShotIDMax], resulting in a call to sendKilledMessage(), which shouldn't be called. This, however, from past experience and testing, seems to be a rare event.
Also, the mines are invisible. Unfortunately it is not possible to add temporary objects to the world.
Sometimes mines mysteriously blow up. This seems to happen at the instant a player presses 'i' or right clicks, in order to spawn.