actor SniperPistol_Zoomed : Inventory
{
inventory.maxamount 2
}
actor SniperPistol : Pistol replaces Chainsaw
{
States
{
AltFire:
PISG ABC 6
TNT1 A 0 A_JumpIfInventory("SniperPistol_Zoomed", 2, "ZoomOut")
TNT1 A 0 A_JumpIfInventory("SniperPistol_Zoomed", 1, "Zoom2")
//fall through
Zoom1:
TNT1 A 0 A_ZoomFactor(2.0)
TNT1 A 0 A_GiveInventory ("SniperPistol_Zoomed", 1)
Goto "AltFireDone"
Zoom2:
TNT1 A 0 A_ZoomFactor(4.0)
TNT1 A 0 A_GiveInventory ("SniperPistol_Zoomed", 1)
Goto "AltFireDone"
ZoomOut:
TNT1 A 0 A_ZoomFactor(1.0)
TNT1 A 0 A_TakeInventory ("SniperPistol_Zoomed", 2)
Goto "AltFireDone"
AltFireDone:
PISG C 5 A_ReFire
Goto "Ready"
Deselect:
TNT1 A 0 A_TakeInventory ("SniperPistol_Zoomed", 2)
TNT1 A 0 A_ZoomFactor(1.0)
Goto "Super::Deselect"
}
}
Re: BHSCode builds
Posted: Tue Jun 30, 2009 18:56
by Jimmy
Probably wrong thread, but... could another argument be added that if true makes the zoom instant rather than smooth?
Re: BHSCode builds
Posted: Tue Jun 30, 2009 19:26
by baghead
The zoom is already instant... the original fov properties FOV and DesiredFOV are not affected by this patch, so the smooth zooming stuff doesn't ever kick in. This just adds a modifier that is applied to the current FOV before it is sent to the renderer -- that way there's less chance for interference with other code. Smooth zooming will probably not be an option (but you can simulate it with clever decorate).
Re: BHSCode builds
Posted: Tue Jun 30, 2009 20:37
by Rachael
Since Randy already put this in over at ZDoom.org, there's no reason to put it in the community build.