public virtual bool onUse(ShapeBase user)
        {
            //// Invoked when the object uses this datablock, should return
            //// true if the item was used.

            return false;
        }
        public override int onThrow(ShapeBase user, int amount)
        {
            if (amount == 0)
                amount = 1;

            if (this["maxInventory"] != string.Empty)
                {
                if (amount > this["maxInventory"].AsInt())
                    amount = this["maxInventory"].AsInt();
                }

            if (!amount.AsBool())
                return 0;

            user.decInventory(this, amount);
            //ShapeBaseShapeBaseDecInventory(player, datablock, amount);

            // Construct the actual object in the world, and add it to
            // the mission group so it's cleaned up when the mission is
            // done.  The object is given a random z rotation.
            ObjectCreator tch = new ObjectCreator("Item", string.Empty);
            tch["datablock"] = this;
            tch["rotation"] = "0 0 1 " + (new Random().Next(0, 360));
            tch["count"] = amount;

            Item item = tch.Create();

            ((SimSet) "MissionGroup").pushToBack(item);

            item.SchedulePop();

            return item;
        }
Exemple #3
0
        public override void onInventory(ShapeBase user, int value)
        {
            //Player can be either a player object or a aiturret...

            GameConnection client = user["client"];
            for (int i = 0; i < 8; i++)
                {
                if (user.GetType() == typeof (Player))
                    {
                    ShapeBaseImageData image = (user).getMountedImage(i);
                    if (image <= 0)
                        continue;

                    if (!image["ammo"].isObject())
                        continue;
                    if (((SimObject) image["ammo"]).getId() != this.getId())
                        continue;

                    (user).setImageAmmo(i, value != 0);
                    }
                else if (user.GetType() == typeof (AITurretShape))
                    {
                    ShapeBaseImageData image = (user).getMountedImage(i);
                    if (image <= 0)
                        continue;

                    if (!image["ammo"].isObject())
                        continue;
                    if (((SimObject) image["ammo"]).getId() != getId())
                        continue;

                    (user).setImageAmmo(i, value != 0);
                    }

                int currentammo = user.getInventory(this); // ShapeBaseShapeBaseGetInventory(player, thisobj);

                if (user.getClassName() != "Player")
                    continue;

                int amountInClips;

                if (this["clip"].isObject())
                    {
                    amountInClips = user.getInventory(this["clip"]);
                    // ShapeBaseShapeBaseGetInventory(player, thisobj["clip"]);

                    amountInClips *= this["maxInventory"].AsInt();

                    amountInClips += user["remaining" + getName()].AsInt();
                    }
                else
                    {
                    amountInClips = currentammo;
                    currentammo = 1;
                    }
                if (user["client"] != string.Empty && !user["isAiControlled"].AsBool())
                    client.setAmmoAmountHud(currentammo, amountInClips);
                }
        }
 public virtual int onThrow(ShapeBase user, int amount)
 {
     // Invoked when the object is thrown.  This method should
     // construct and return the actual mission object to be
     // physically thrown.  This method is also responsible for
     // decrementing the user's inventory.
     return 0;
 }
 public virtual bool onPickup(Item obj, ShapeBase user, int amount)
 {
     // Invoked when the user attempts to pickup this datablock object.
     // The %amount argument is the space in the user's inventory for
     // this type of datablock.  This method is responsible for
     // incrementing the user's inventory is something is addded.
     // Should return true if something was added to the inventory.
     return false;
 }
        public override void onImageMount(ShapeBase obj, int slot, float dt)
        {
            obj.setImageAmmo(slot, true);

            int numTurrets = obj.getInventory(this["item"]);

            if (obj["client"] != string.Empty && obj.isAiControlled == false)
                ((GameConnection) obj["client"]).refreshWeaponHud(1, this["item.previewImage"], this["item.reticle"], this["item.zoomReticle"], numTurrets);
        }
Exemple #7
0
 public override bool onPickup(Item obj, ShapeBase user, int amount)
 {
     if (base.onPickup(obj, user, amount))
         {
         Audio.AudioServerPlay3D("AmmoPickupSound", user.getTransform());
         return true;
         }
     return false;
 }
        /*note In torquescript they used a classname call to the weapon class to perform
         * the onPickUp and onUse.  Unfortunately, we don't have that ability in CSharp.
         */

        public override bool onPickup(Item obj, ShapeBase user, int amount)
        {
            if (!base.onPickup(obj, user, amount))
                return false;
            Audio.AudioServerPlay3D("WeaponPickupSound", user.getTransform());

            //todo do really like this, I guess they didn't want aiPlayer picking shit up.
            if (user.getClassName() == "Player" && user.getMountedImage(Constants.WeaponSlot) == 0)
                return user.Use(this);

            return false;
        }
        public override void onImageMount(ShapeBase obj, int slot, float dt)
        {
            obj.setImageAmmo(slot, true);
            int numofmines = obj.getInventory(this["item"]);

            string previewImage = this["item.previewImage"];
            string reticle = this["item.reticle"];
            string zoomReticle = this["item.zoomReticle"];

            GameConnection client = obj["client"];
            client.refreshWeaponHud(1, previewImage, reticle, zoomReticle, numofmines);
        }
        public override int onThrow(ShapeBase player, int amount)
        {
            if (amount == 0)
                amount = 1;

            if (this["maxInventory"] != string.Empty)
                {
                if (amount > this["maxInventory"].AsInt())
                    amount = this["maxInventory"].AsInt();
                }

            if (amount == 0)
                return 0;

            player.decInventory(this, amount);
            TransformF rot = new TransformF(player.getEulerRotation());

            ObjectCreator tc_obj = new ObjectCreator("AITurretShape", string.Empty);
            tc_obj["datablock"] = this.getName();
            tc_obj["rotation"] = "0 0 1 " + rot.mPositionZ;
            tc_obj["count"] = "1";
            tc_obj["sourceObject"] = player;
            tc_obj["client"] = player["client"];
            tc_obj["isAiControlled"] = true;

            AITurretShape obj = tc_obj.Create();
            ((SimSet) "MissionGroup").pushToBack(obj);

            //todo change to csharp
            obj.addToIgnoreList(player);

            GameConnection client = player["client"];
            if (client.isObject())
                {
                if (client["ownedTurrets"] == string.Empty)
                    client["ownedTurrets"] = new ObjectCreator("SimSet", string.Empty).Create().AsString();

                SimSet SimSet_id = client["ownedTurrets"];
                int countofitems = SimSet_id.getCount();
                for (uint i = 0; i < countofitems; i++)
                    {
                    AITurretShape turret = SimSet_id.getObject(i);
                    turret.addToIgnoreList(obj);
                    obj.addToIgnoreList(turret);
                    }
                SimSet_id.pushToBack(obj);
                }

            return obj;
        }
        public override void onCollision(ShapeBase obj, SceneObject collObj, Point3F vec, float len)
        {
            if (!((collObj.GetType() == typeof (Player)) || (collObj.GetType() == typeof (AIPlayer))))
                return;
            Player player = (Player) collObj;

            if (player.getDamageLevel() <= 0.00 || player.getState() == "Dead")
                return;

            player.applyRepair(this["repairAmount"].AsFloat());
            player.setEnergyLevel(1);

            obj.schedule((100).AsString(), "startFade", "1000", "0", "true");
            obj.schedule((1200).AsString(), "delete");
            Audio.AudioServerPlay3D("HealthUseSound", player.getTransform());
        }
        public override void onImageMount(ShapeBase obj, int slot, float dt)
        {
            GameConnection client = obj["client"];

            string ammoName = string.Empty;
            ammoName = this["ammo"].getName();

            int currentammo = 0;
            int ammountinClips = 0;
            if (isField("clip"))
                {
                if (obj.getInventory(this["ammo"]).AsBool())
                    {
                    obj.setImageAmmo(slot, true);
                    currentammo = obj.getInventory(this["ammo"]);
                    }
                else if (obj.getInventory(this["clip"]) > 0)
                    {
                    obj.setInventory(this["ammo"], this["ammo.maxInventory"].AsInt());
                    obj.setImageAmmo(slot, true);
                    currentammo = this["ammo.maxInventory"].AsInt();
                    ammountinClips += obj["remaining" + ammoName].AsInt();
                    }
                else
                    currentammo = obj["remaining" + ammoName].AsInt();

                ammountinClips = obj.getInventory(this["clip"]);
                ammountinClips *= this["ammo.maxInventory"].AsInt();

                if ((obj["client"] != string.Empty) && !obj["isAiControlled"].AsBool())
                    client.refreshWeaponHud(currentammo, this["item.previewImage"], this["item.reticle"], this["item.zoomReticle"], ammountinClips);
                }
            else if (this["ammo"] != string.Empty)
                {
                if (obj.getInventory(this["ammo"]).AsBool())
                    {
                    obj.setImageAmmo(slot, true);
                    currentammo = obj.getInventory(this["ammo"]);
                    }
                else
                    currentammo = 0;

                if (obj["client"] != string.Empty && !obj["isAiControlled"].AsBool())
                    client.refreshWeaponHud(1, this["item.previewImage"], this["item.reticle"], this["item.zoomReticle"], currentammo);
                }
        }
        public override bool onUse(ShapeBase obj)
        {
            if (obj.getMountedImage(Constants.WeaponSlot) == this["image"].AsInt())
                return false;

            Audio.AudioServerPlay3D("WeaponUseSound", obj.getTransform());

            obj.mountImage(this["image"], Constants.WeaponSlot, true, string.Empty);

            if (obj["client"].AsBool())
                {
                if (this["description"] != string.Empty)
                    message.MessageClient(obj["client"], "MsgWeaponUsed", "\\c3%1 \\c5 selected.", this["description"]);
                else
                    message.MessageClient(obj["client"], "MsgWeaponUsed", console.addTaggedString(@"\c0Weapon selected"));
                }

            if (obj.isInNamespaceHierarchy("Player"))
                return false;

            Player player = obj._ID;

            player.allowAllPoses();
            SimObject image = this["image"];

            if (image["jumpingDisallowed"].AsBool())
                player.allowJumping(false);

            if (image["jetJumpingDisallowed"].AsBool())
                player.allowJetJumping(false);

            if (image["sprintDisallowed"].AsBool())
                player.allowSprinting(false);

            if (image["crouchDisallowed"].AsBool())
                player.allowCrouching(false);

            if (image["proneDisallowed"].AsBool())
                player.allowProne(false);

            if (image["swimmingDisallowed"].AsBool())
                player.allowSwimming(false);

            return true;
        }
        public override void onDisabled(ShapeBase obj, string lastState)
        {
            //console.print("### AI DEAD ###!");
            Player npc = obj.ID;

            Util.cancelAll(npc);
            ScriptObject aimanager = null;

            aimanager = npc["aiManager"];
            if (!aimanager.isObject())
                {
                console.error("Bad aiManager");
                return;
                }
            npc.setImageTarget(0, false);

            SimObject item = ((SimObject) npc.getMountedImage(iGlobal["$WeaponSlot"]))["item"];
            if (item.isObject())
                {
                //string item = console.GetVarString(ShapeBase.getMountedImage(npc, WeaponSlot).AsString() + ".item");
                if (r.Next(1, 100) > 80)
                    {
                    int amount = npc.getInventory(item["image.ammo"]);

                    if (amount.AsBool())
                        npc.Throw(item["image.clip"], 1);
                    }
                }

            npc.tossPatch();
            npc.playDeathCry();
            npc.playDeathAnimation();
            int ctov = 2000;

            if (AI.lastcount > 0)
                AI.spawnAI(aimanager);

            npc.schedule((ctov - 1000).AsString(), "startFade", "1000", "0", "true");
            Util._schedule("1", "0", "SafeDeleteCallback", npc);
        }
Exemple #15
0
        public override bool onPickup(Item obj, ShapeBase user, int amount)
        {
            if (!base.onPickup(obj, user, amount))
                return false;

            Audio.AudioServerPlay3D("WeaponPickupSound", user.getTransform());

            ShapeBaseImageData image = user.getMountedImage(Constants.WeaponSlot);

            if (image == 0)
                return false;

            if (!console.isField(image, "clip") || image["clip"].getID() != getId())
                return false;

            bool outOfAmmo = !user.getImageAmmo(Constants.WeaponSlot);

            int amountInClips = 0;

            int currentAmmo = user.getInventory(image["ammo"]);

            if (console.isObject(image["clip"]))
                amountInClips = user.getInventory(image["clip"]);

            int t = console.GetVarInt(string.Format("{0}.ammo.maxInventory", image));

            amountInClips *= t;

            int amountloadedingun = console.GetVarInt(string.Format("{0}.remaining{1}", obj, console.GetVarString(string.Format("{0}.ammo", this))));

            amountInClips += amountloadedingun;

            GameConnection client = user["client"];
            client.setAmmoAmountHud(currentAmmo, amountInClips);

            if (outOfAmmo)
                ((WeaponImage) image.ID).onClipEmpty(user, Constants.WeaponSlot);

            return true;
        }
Exemple #16
0
 public virtual void onWetFire(ShapeBase obj, int slot)
 {
 }
 public virtual int switchSeats(TurretShape turret, ShapeBase player)
 {
     for (int i = 0; i < this["numMountPoints"].AsInt(); i++)
         {
         int node = turret.getMountNodeObject(i);
         if (node == player || node != 0)
             continue;
         if (node == 0)
             return i;
         }
     return -1;
 }
Exemple #18
0
 public override bool onUse(ShapeBase user)
 {
     return(false);
 }
public virtual  void onForceUncloak(ShapeBase obj, string reason){}
public virtual  void onTrigger(ShapeBase obj, int index, bool state){}
public virtual  void onCollision(ShapeBase obj, SceneObject collObj, Point3F vec, float len){}
public virtual  void onDestroyed(ShapeBase obj, string lastState){}
 public override void onTrigger(ShapeBase obj, int index, bool state)
 {
     // This method is invoked when the player receives a trigger move event.
     // The player automatically triggers slot 0 and slot one off of triggers #
     // 0 & 1.  Trigger # 2 is also used as the jump key.
 }
 public virtual void onWetFire(ShapeBase obj, int slot)
 {
 }
Exemple #25
0
        public override bool onUse(ShapeBase obj)
        {
            if (obj.getMountedImage(Constants.WeaponSlot) == this["image"].AsInt())
            {
                return(false);
            }

            Audio.AudioServerPlay3D("WeaponUseSound", obj.getTransform());

            obj.mountImage(this["image"], Constants.WeaponSlot, true, string.Empty);

            if (obj["client"].AsBool())
            {
                if (this["description"] != string.Empty)
                {
                    message.MessageClient(obj["client"], "MsgWeaponUsed", "\\c3%1 \\c5 selected.", this["description"]);
                }
                else
                {
                    message.MessageClient(obj["client"], "MsgWeaponUsed", console.addTaggedString(@"\c0Weapon selected"));
                }
            }

            if (obj.isInNamespaceHierarchy("Player"))
            {
                return(false);
            }

            Player player = obj._ID;

            player.allowAllPoses();
            SimObject image = this["image"];

            if (image["jumpingDisallowed"].AsBool())
            {
                player.allowJumping(false);
            }

            if (image["jetJumpingDisallowed"].AsBool())
            {
                player.allowJetJumping(false);
            }

            if (image["sprintDisallowed"].AsBool())
            {
                player.allowSprinting(false);
            }

            if (image["crouchDisallowed"].AsBool())
            {
                player.allowCrouching(false);
            }

            if (image["proneDisallowed"].AsBool())
            {
                player.allowProne(false);
            }

            if (image["swimmingDisallowed"].AsBool())
            {
                player.allowSwimming(false);
            }

            return(true);
        }
 public virtual void onInventory(ShapeBase thisobj, ModelBase data, string value)
 {
     // Invoked on ShapeBase objects whenever their inventory changes
     // for the given datablock.
 }
        public virtual void teleFrag(GameBase player, Trigger exit)
        {
            // When a telefrag happens, there are two cases we have to consider.
            // The first case occurs when the player's bounding box is much larger than the exit location,
            // it is possible to have players colide even though a player is not within the bounds
            // of the trigger Because of this we first check a radius the size of a player's bounding
            // box around the exit location.

            // Get the bounding box of the player

            Point3F boundingBoxSize = new Point3F(((PlayerData)player.getDataBlock())["boundingBox"]);
            float   radius          = boundingBoxSize.x;
            float   boxSizeY        = boundingBoxSize.y;
            float   boxSizeZ        = boundingBoxSize.z;

            // Use the largest dimention as the radius to check
            if (boxSizeY > radius)
            {
                radius = boxSizeY;
            }
            if (boxSizeZ > radius)
            {
                radius = boxSizeZ;
            }

            Point3F position = exit.getTransform().GetPosition(); // new TransformF(con.getTransform(exit));
            uint    mask     = (uint)SceneObjectTypesAsUint.PlayerObjectType;

            // Check all objects within the found radius of the exit location, and telefrag
            // any players that meet the conditions.

            Dictionary <uint, float> r = console.initContainerRadiusSearch(position, radius, mask);

            foreach (ShapeBase objectNearExit in
                     r.Keys.Where(objectNearExit => ((ShapeBase)objectNearExit).isMemberOfClass("Player")).Where(objectNearExit => objectNearExit.AsString() != player))
            {
                objectNearExit.damage(player, exit.getTransform().GetPosition(), 10000, "Telefrag");
            }
            // The second case occurs when the bounds of the trigger are much larger
            // than the bounding box of the player. (So multiple players can exist within the
            // same trigger). For this case we check all objects contained within the trigger
            // and telefrag all players.

            int objectsInExit = exit.getNumObjects();

            // Loop through all objects in the teleporter exit
            // And kill any players
            for (int i = 0; i < objectsInExit; i++)
            {
                ShapeBase objectInTeleporter = console.Call(exit, "getObject", new[] { i.AsString() });
                if (objectInTeleporter.isMemberOfClass("Player"))
                {
                    continue;
                }
                // Avoid killing the player that is teleporting in the case of two
                // Teleporters near eachother.
                if (objectInTeleporter == player)
                {
                    continue;
                }

                objectInTeleporter.damage(player, exit.getTransform().GetPosition(), 10000, "Telefrag");
            }
        }
Exemple #28
0
        public void setDamageDirection(GameBase sourceObject, TransformF damagePos)
        {
            if (sourceObject.isObject())
            {
                damagePos = console.isField(sourceObject, "initialPosition") ? new TransformF(sourceObject["initialPosition"]) : sourceObject.getTransform();
            }

            TransformF dp  = damagePos;
            Point3F    wbc = getWorldBoxCenter();

            TransformF damagevec = dp - new TransformF(wbc);

            damagevec = damagevec.normalizeSafe();

            GameConnection client = this["client"];

            if (!client.isObject())
            {
                return;
            }

            ShapeBase cameraobject = client.getCameraObject();

            TransformF inverseTransform = cameraobject.getInverseTransform();

            damagevec = math.MatrixMulVector(inverseTransform, damagevec.GetPosition());

            float[]  components = new float[6];
            string[] directions = new string[6];
            directions[0] = "Left";
            directions[1] = "Right";
            directions[2] = "Bottom";
            directions[3] = "Front";
            directions[4] = "Bottom";
            directions[5] = "Top";

            components[0] = -damagevec.mPositionX;
            components[1] = damagevec.mPositionX;
            components[2] = -damagevec.mPositionY;
            components[3] = damagevec.mPositionY;
            components[4] = -damagevec.mPositionZ;
            components[5] = damagevec.mPositionZ;
            string damagedirection = string.Empty;
            float  max             = 0;

            for (int i = 0; i < 6; i++)
            {
                if (components[i] <= max)
                {
                    continue;
                }
                damagedirection = directions[i];
                max             = components[i];
            }

            if (console.isObject(client))
            {
                // Util._commandToClient(client, console.addTaggedString("setDamageDirection"), damagedirection);
                console.commandToClient(client, console.addTaggedString("setDamageDirection"), new[] { damagedirection });
            }
        }
 public virtual void onInventory(ShapeBase user, int value)
 {
 }
public virtual  void onDisabled(ShapeBase obj, string lastState){}
 public override void onImageUnmount(ShapeBase obj, int slot, float dt)
 {
     GameConnection client = obj["client"];
     client.refreshWeaponHud(0, string.Empty, string.Empty, string.Empty, 0);
 }
public virtual  void onImpact(ShapeBase obj, SceneObject collObj, Point3F vec, float len){}
 public virtual void damage(ShapeBase obj, Point3F position, GameBase source, float damage, string damagetype)
 {
     // Ignore damage by default. This empty method is here to
     // avoid console warnings.
 }
public virtual  void onDamage(ShapeBase obj, float delta){}
        public virtual void setMountTurret(TurretShape turret, ShapeBase player)
        {
            if (!turret.isObject() || turret.getDamageState() == "Destroyed")
                return;

            //todo convert to csharp
            int node = call("findEmptySeat", turret, player).AsInt();
            if (node < 0)
                return;
            turret.mountObject(player, node, new TransformF("0 0 0"));

            player["mVehicle"] = turret;
        }
public virtual  void onEndSequence(ShapeBase obj, int slot, string name){}
 public virtual int findEmptySeat(TurretShape turret, ShapeBase player)
 {
     for (int i = 0; i < this["numMountPoints"].AsInt(); i++)
         {
         int node = turret.getMountNodeObject(i);
         if (node == 0)
             return i;
         }
     return -1;
 }
        public virtual void mountPlayer(TurretShape turret, ShapeBase player)
        {
            if (turret.isObject() && turret.getDamageState() != "Destroyed")
                //todo change to csharp

                turret.call("setMountTurret", player);
        }
Exemple #39
0
 public override void onInventory(ShapeBase user, int value)
 {
 }
 public override void onFire(ShapeBase obj, int slot)
 {
     obj.Throw(this["item"]);
 }
 public override void onCollision(ShapeBase obj, SceneObject collObj, Point3F vec, float len)
 {
     // Collision with other objects, including items
 }
Exemple #42
0
        public override int onThrow(ShapeBase player, int amount)
        {
            if (amount == 0)
            {
                amount = 1;
            }

            if (this["maxInventory"] != string.Empty)
            {
                if (amount > this["maxInventory"].AsInt())
                {
                    amount = this["maxInventory"].AsInt();
                }
            }

            if (amount == 0)
            {
                return(0);
            }

            player.decInventory(this, amount);
            TransformF rot = new TransformF(player.getEulerRotation());

            ObjectCreator tc_obj = new ObjectCreator("AITurretShape", string.Empty);

            tc_obj["datablock"]      = this.getName();
            tc_obj["rotation"]       = "0 0 1 " + rot.mPositionZ;
            tc_obj["count"]          = "1";
            tc_obj["sourceObject"]   = player;
            tc_obj["client"]         = player["client"];
            tc_obj["isAiControlled"] = true;

            AITurretShape obj = tc_obj.Create();

            ((SimSet)"MissionGroup").pushToBack(obj);

            //todo change to csharp
            obj.addToIgnoreList(player);

            GameConnection client = player["client"];

            if (client.isObject())
            {
                if (client["ownedTurrets"] == string.Empty)
                {
                    client["ownedTurrets"] = new ObjectCreator("SimSet", string.Empty).Create().AsString();
                }

                SimSet SimSet_id    = client["ownedTurrets"];
                int    countofitems = SimSet_id.getCount();
                for (uint i = 0; i < countofitems; i++)
                {
                    AITurretShape turret = SimSet_id.getObject(i);
                    turret.addToIgnoreList(obj);
                    obj.addToIgnoreList(turret);
                }
                SimSet_id.pushToBack(obj);
            }

            return(obj);
        }
        public override void onCollision(ShapeBase obj, SceneObject col, Point3F vec, float len)
        {
            Player player = obj.getId();

            if (player.getState() == "Dead")
            {
                return;
            }
            // Try and pickup all items
            if (col.getClassName() == "Item")
            {
                player.pickup(col.ID, 1);
                return;
            }

            if (col.GetType() != typeof(WheeledVehicle))
            {
                return;
            }

            WheeledVehicle vcol = (WheeledVehicle)col;

            //AI are not allowed to drive they are lousey drivers....
            GameConnection client = player["client"];

            if (!client.isObject())
            {
                return;
            }
            //Mount Vehicle.
            if ((console.getTypeMask(col) & (UInt32)SceneObjectTypesAsUint.GameBaseObjectType) != (UInt32)SceneObjectTypesAsUint.GameBaseObjectType)
            {
                return;
            }
            VehicleData db = vcol.getDataBlock();

            if (!(((db.getClassName() == "WheeledVehicleData") || player["mountVehicle"].AsBool() || player.getState() == "Move" || col["mountable"].AsBool())))
            {
                return;
            }
            // Only mount drivers for now.

            // For this specific example, only one person can fit
            // into a vehicle
            int mount = vcol.getMountNodeObject(0);

            if (mount > 0)
            {
                try
                {
                    Player p = mount;
                    return;
                }
                catch (Exception err)
                {
                    //Water particle emitters seem to take up the seat when the vehicle is in water.
                    vcol.unmountObject(mount.AsString());
                    vcol.mountObject(player, 0, new TransformF());
                    ((GameConnection)player["client"]).setFirstPerson(false);
                    console.commandToClient(client, "PushVehicleMap");
                }
            }
            else
            {
                vcol.mountObject(player, 0, new TransformF());
                ((GameConnection)player["client"]).setFirstPerson(false);
                console.commandToClient(client, "PushVehicleMap");
            }
            //if (mount > 0)
            //return;
            // For this specific FPS Example, always mount the player to node 0

            player["mVehicle"] = col;
        }