public void ProxMineOnInventory(coProximityMine thisobj, coPlayer player, int amount)
     {
     coGameConnection client = player["client"];
     if (client.isObject())
         GameConnectionSetAmmoAmountHud(client, 1, amount);
     if ((amount == 0) && player.isMethod("getMountSlot"))
         ShapeBaseCycleWeapon(player, "prev");
     }
Beispiel #2
0
        public void DeployableTurretWeaponOnInventory(coAITurretShapeData thisobj, coPlayer obj, int amount)
            {
            if (obj["client"] != "0" && obj["isAiControlled"].AsBool() == false)
                GameConnectionSetAmmoAmountHud(obj["client"], 1, amount);


            //Sometimes....  Alice to the moon.
            /*
             * So here I was thinking that this line of code in the torque script...
             *    if ( !%amount && ( %slot = %obj.getMountSlot( %this.image ) ) != -1 )
             *    was checking to see if the slot was != to -1... but that is not the case.
             *    What it is actually checking is if %slot is blank or not.  As in is the temporary 
             *    variable %slot a variable or not, (i.e. it's id is -1)
             *    
             * It's nice how they use error suppression in there tokens to hide
             * the error message that the function doesn't exist from the console.
             * But... really?  I mean, you couldn't comment that that was what the f**k you
             * where doing??????
             *    
             * Well shit, I do believe there could be an easier way.....
             */
            //error("Amount = " + amount);
            if (amount == 0 && obj.isMethod("getMountSlot"))
                obj.call("cycleWeapon", new[] { "prev" });
            }