Game Development Community

T3D 1.1/1.2 - ShakeCamera on NoAmmo bug - LOGGED (THREED-2523)

by CSMP · in Torque 3D Professional · 09/01/2011 (4:01 pm) · 9 replies

Issues: I've noticed that if you use ShakeCamera on weapons that the camera will continue shaking after you run out of ammo if you hold down the trigger, which does not look very good

Steps to Repeat:
1. enable ShakeCamera on a weapon
2. fire weapon until ammo is gone, while holding down the trigger
3. you will notice that the camera will shake as long as the trigger is held down


Suggested Fix: Open Shapebase.cpp around line 3180
gCamFXMgr.addFX( mWeaponCamShake );
                           mWeaponCamShake->isAdded = true;
                        }
                     }
                  }
               }
               
               updateImageState(i,0);

               if ( !image.triggerDown || !image.ammo)  //<--- Added: !image.ammo here for fix
               {
                  if ( mWeaponCamShake && mWeaponCamShake->isAdded )
                  {
                     gCamFXMgr.removeFX( mWeaponCamShake );
                     mWeaponCamShake->isAdded = false;
                  }
               }

Update Bug#2: This fix DOES NOT work for semi-auto weapons: After firing a round if you do not release the mouse the CameraShake will go wild since it still has ammo.(the "fix" only checked for ammo and was not tested with semi-autos)

#1
09/01/2011 (9:10 pm)
I've gone ahead and logged this bug under THREED-2523. Thanks CSMP.
#2
09/02/2011 (12:37 pm)
Thanks CSMP, I'll talk with the team about getting this into 1.2
#3
09/02/2011 (1:24 pm)
Glad I could help.
#4
09/04/2011 (3:26 pm)
Note: Semiauto weapons and ShakeCamera is still broken:
After firing a round if you do not release the mouse the CameraShake will go wild since it still has ammo(the fix only checked for ammo, not if it has already fired the round).
#5
12/13/2011 (11:30 am)
This fix has not been added to T3D 1.2, and using this with a semi-automatic weapon still shakes after the round is fired until the trigger is released.

Has anyone been able to stop the camera from shaking for a semi-auto type weapon?
#6
12/13/2011 (2:04 pm)
Did they ever (properly) network this? I seem to remember shakeCamera when applied to the weapons (unlike explosions) making all clients shake...
#7
12/13/2011 (2:30 pm)
nope, just tested it and it appears cameraShake is not networked.
#8
12/13/2011 (2:50 pm)
Yeah, that's why I never experimented with it. If I get a chance, later this week maybe, I'll see what I can work out about the semi-auto fire. I remember a few weapons we had that had animation issues that could be worked around with creative use of the state system.
#9
01/03/2012 (3:29 pm)
Strange, I was just searching through the forums and this is under the 'Resolved Bugs' section, yet not only is the original problem semi-fixed but ShakeCamera networking is broken all-together.