Game Development Community


#1
08/05/2010 (4:36 pm)
This is fixed in FPS Example - but not in New Projects ... there's a few of these fixed in one place but not in another ...
#2
08/05/2010 (6:56 pm)
hmm, didn't think to test in the example. doesn't do any good if it doesn't carry over to a new project though
#3
08/11/2010 (5:17 pm)
Logged as TQA-785 for the QA team to verify.
#4
08/13/2010 (1:19 pm)
ok delved into this a bit further and this is what I have found.

in the FPS example in default.bind.cs it has

function toggleZoom(%val)
{
   if (%val)
   {
      if (!$ZoomOn)
         commandToServer('getZoomReticle');
   }
   else
   {
      clientCmdUnSetZoom();
   }
}


and in the new project in default.bind.cs it has

function toggleZoom(%val)
{
   if (%val)
   {
      if (!$ZoomOn)
         commandToServer('getZoomReticle');
   }
   else
   {
      $ZoomOn = false;
      setFOV($Pref::Player::defaultFOV);
      reticle.setVisible(true);
      zoomReticle.setVisible(false);
   }
}
#5
08/13/2010 (5:03 pm)
The FPS Example uses unSetZoom() to handle clearing zoom reticle, reverting back to the dynamic weapon reticle, and also for clearing the DOF stage. The Full Template skips the unSetZoom() stage and does it all in toggleZoom() with the exception of turning off DOF -- which was apparently missed when DOF was added to the Template scripts.. Simply add this to the else portion (at the end) of the Full Template's toggleZoom() method:
DOFPostEffect.disable();

There are reasons (explicit to a FPS genre game) for why the FPS Example does this differently. The Full Template is meant to be more generic in nature so there is no need for the extra step. The fix is to add that single line to the F.Template's toggleZoom() to disable the DOF effect when toggling out of zoom status.
#6
08/13/2010 (5:44 pm)
that's what I have been doing to fix. was just curious as to why it didn't transfer into the full project. I understand its to be more generic but having it not reset after leaving the zoom state doesn't make sense either
#7
08/13/2010 (6:43 pm)
Quote:
with the exception of turning off DOF -- which was apparently missed when DOF was added to the Template scripts..

I've offered to go through the Full Template and FPS Example both and merge missing fixes like this between them... but no response on that yet.

Offtopic: I plan on doing up a Resource soon (or series of Resources) that removes a good bit of the FPS-centric script code out of the Full Template and simplify it to be more of a all purpose non-genre specific template. Eventually I'm also planning another Resource that fixes and extends the gametype functionality used in the FPS Example -- you have no idea how much I dislike some of the design decisions made as to what is "core" and what is "game".
#8
08/13/2010 (7:39 pm)
Bug confirmed.
#9
08/31/2010 (7:51 pm)
Fixed in 1.1 Beta 3.
#10
08/31/2010 (8:52 pm)
I just finished going over this in Jira. Though both functions
clientCmdUnSetZoom();
and
$ZoomOn = false;  
      setFOV($Pref::Player::defaultFOV);  
      reticle.setVisible(true);  
      zoomReticle.setVisible(false);
      DOFPostEffect.disable();//adding this line

Both will work in most situations. Just for continuity, the checked in fix calls clientCmdUnSetZoom();.