Check if tank is sealed

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
Grue
Private First Class
Private First Class
Posts: 27
Joined: Tue Apr 08, 2014 12:23 am
Contact:

Check if tank is sealed

Post by Grue »

Hey folks,

How can I tell if a tank is sealed?

Grue
User avatar
Zehra
Private First Class
Private First Class
Posts: 914
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: Check if tank is sealed

Post by Zehra »

From include/bzfsAPI.h in source.

Code: Select all

typedef struct bz_PlayerUpdateState
{
    bz_ePlayerStatus  status;         // special states
    bool          falling;        // not driving on the ground or an obstacle
    bool          crossingWall;       // crossing an obstacle wall
    bool          inPhantomZone;      // zoned
    float         pos[3];         // position of tank
    float         velocity[3];        // velocity of tank
    float         rotation;       // orientation of tank
    float         angVel;         // angular velocity of tank
    int           phydrv;         // physics driver
} bz_PlayerUpdateState;
Perhaps try checking crossingWall, it may work, but I haven't checked.(I'm not sure if it works on sealed or just even if a tank is simply crossing an object which is drivethrough.)

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
Grue
Private First Class
Private First Class
Posts: 27
Joined: Tue Apr 08, 2014 12:23 am
Contact:

Re: Check if tank is sealed

Post by Grue »

Unfortunately, using crossingWall does not check whether or not tank is completely sealed...
User avatar
Zehra
Private First Class
Private First Class
Posts: 914
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: Check if tank is sealed

Post by Zehra »

What are you trying to do?

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
Post Reply