Game Development Community

Torque 3D Beta 1: Sniper bugs.

by Neill Silva · in Torque 3D Professional · 05/17/2009 (2:53 pm) · 4 replies

When you shoot the Sniper Rifle, you will always get this message in the console:

Material Info for object WarningMaterial - warnMat
[0] Files: shadergen:/10000000088_de84619e13ef6390_V.hlsl, shadergen:/10000000088_de84619e13ef6390_P.hlsl Pix Version: 3.00

And, if you use R to zoom in with the sniper, and then switch weapons, the scope mask will stay on screen and zoomed in.

#1
05/17/2009 (3:41 pm)
It's entirely possible that the "bullet" isn't textured -- thus the warning material.

Good catch with the zoom reticle, does it go away when you let go of the button?
#2
05/17/2009 (3:47 pm)
Yes, it goes away.
#3
05/18/2009 (1:33 am)
Ok, a quick fix To prevent being able to change weapons while zooming. Change function ShapeBase::use() in "scripts/server/inventory.cs" to look like this
function ShapeBase::use(%this, %data)
{
    // Use an object in the inventory.

    // Need to prevent weapon changing when zooming
    if ($ZoomOn $= false)
    {
        if (%this.getInventory(%data) > 0)
            return %data.onUse(%this);
    }
    return false;
}
And somewhere in "scripts/client/default.bind.cs" add this (near the zoom functions)
$ZoomOn = false;
#4
05/18/2009 (1:39 am)
Actually that "fix" (the if ($ZoomOn $= false){...}) may be more appropriate in function Weapon::onUse()