2.1 now has messages and functions that let you modify the shot type of a tank. The shot type is now independent of the flag you carry. When the shot type is changed, the client will pick up on that change and it will start shoting shots of that type. Once changed, you do NOT have to change the shot type of every shot fired. And yes, the shoting client WILL see the modified shot type, so the entire state will be in sync.
Code: Select all
BZF_API bool bz_setPlayerShotType( int playerId, bz_eShotType shotType );
This will set the current shot type for the player. Any shots fired after the shot type is sent will be of this new type.
you can also set the shotType field in the bz_eGrabFlagEvent event, and the shot type will be sent with the flag pickup ( this is the best way to do it ).
Any time a player spawns or drops a flag, there shot type will be reset to the standard shot type, and should be reset, if you want to change the default shots.