If. It's not that I advocate it, maybe it wont work out well, but the good is, that it makes you not to care about weapon positions, it is operated more intuitive.zeep said:Psych i understand your points. I wouldn't mind testing such an aim system if it was programmed.
Climbing has defenitely the priority on this case, but I agree, jumping should be a key. I mean where is the problem, since it is not such an important movement? It doesn't have to be the Space key, but some other, which is used just sometimes.zeep said:Just a small thing with jumping; I think for me personally i've established a bond with jumping in all games. (I'm not talking about bunnyhopping!). Jumping can give a creative player a nice position in a map where other maybe don't go.
// added Nov 11 2008 to support freeaim
simulated final function float CalcYawInertia(float dt, float FrictionFactor, float OldValue, float NewValue){
local float Friction;
if( bINFSRot){
if(abs(OldValue) < maxYawFAdiff) return NewValue;
else if(OldValue > 1) return NewValue + (OldValue - maxYawFAdiff);
else return NewValue + (OldValue + maxYawFAdiff);
}else{
Friction = 1.f - FClamp( (0.02*FrictionFactor) ** dt, 0.f, 1.f);
if(abs(OldValue) <= (maxYawFAdiff / 7)) return NewValue;//placed by Ibex, still camera when close to center
else if(abs(OldValue) <= maxYawFAdiff) return OldValue * Friction + NewValue;
else if(OldValue >= 1) return NewValue + (OldValue - maxYawFAdiff);
else return NewValue + (OldValue + maxYawFAdiff);
}
}
simulated final function float CalcPitchInertia(float dt, float FrictionFactor, float OldValue, float NewValue){
local float Friction;
if( bINFSRot){
if(abs(OldValue) < maxPitchFAdiff) return NewValue;
else if(OldValue > 1) return NewValue + (OldValue - maxPitchFAdiff);
else return NewValue + (OldValue + maxPitchFAdiff);
}else{
Friction = 1.f - FClamp( (0.02*FrictionFactor) ** dt, 0.f, 1.f);
if(abs(OldValue) <= (maxPitchFAdiff / 7)) return NewValue;//placed by Ibex, still camera when close to center
else if(abs(OldValue) <= maxPitchFAdiff) return OldValue * Friction + NewValue;
else if(OldValue >= 1) return NewValue + (OldValue - maxPitchFAdiff);
else return NewValue + (OldValue + maxPitchFAdiff);
}
}
CamRotationInertia=3.500000
maxPitchFAdiff=3500
maxYawFAdiff=4000
CameraLocation = CameraLocation + Pawn.EyePosition() + Pawn.WalkBob + ShakeOffset.X * x + ShakeOffset.Y * y + ShakeOffset.Z * z + AmbShakeOffset;
CameraLocation = CameraLocation + Pawn.EyePosition() + ShakeOffset.X * x + ShakeOffset.Y * y + ShakeOffset.Z * z + AmbShakeOffset;
simulated function vector EyePosition(){
local vector X, Y, Z, tot;
local coords bonepos;
if (abs(CurrLean)>0.02){
GetAxes(Rotation,X,Y,Z);
tot = (14*Y);//Lrightvect.y
//Ibex removed the + WalkBob so the camera will not rock up and down
//return EyeHeight * vect(0,0,1) + WalkBob + tot*CurrLean + abs(Currlean)*vect(0,0,-7);
return EyeHeight * vect(0,0,1) + tot*CurrLean + abs(Currlean)*vect(0,0,-7);
}
else if(bPerformingAnimMove){
bonepos = GetBoneCoords(HeadBone);
//rootpos = GetBoneCoords(RootBone);
return ((8*bonepos.Zaxis) + bonepos.origin - location);
}else return EyeHeight * vect(0,0,1); // + WalkBob;
}
simulated function vector CalcDrawOffset(inventory Inv){
local vector DrawOffset;
local coords bonepos;
local vector X,Y,Z, tot;
if ( Controller == None )
return (Inv.PlayerViewOffset >> Rotation) + BaseEyeHeight * vect(0,0,1);
DrawOffset = ((0.9/Weapon.DisplayFOV * 100 * ModifiedPlayerViewOffset(Inv)) >> GetViewRotation() );
if ( !IsLocallyControlled() )
DrawOffset.Z += BaseEyeHeight;
else if(bPerformingAnimMove){
bonepos = GetBoneCoords(HeadBone);
//rootpos = GetBoneCoords(RootBone);
return ((8*bonepos.Zaxis) + bonepos.origin - location);
}else{
if (abs(CurrLean)>0.02){
GetAxes(Rotation,X,Y,Z);
//tot= (Lrightvect.y*Y + Lrightvect.z*Z) * CurrLean;
tot = (14*Y)*CurrLean + abs(Currlean)*vect(0,0,-7);
DrawOffset += tot;
}
DrawOffset.Z += EyeHeight;
// gam ---
//Ibex removed this so weapon mesh bob is always on for this pawn type
//if( bWeaponBob )
DrawOffset += WeaponBob(Inv.BobDamping);
// --- gam
DrawOffset += CameraShake();
}
return DrawOffset;
}
// overwritten to add an X component to the bobbing while moving
function CheckBob(float DeltaTime, vector Y)
{
local float Speed2D;
local vector X;
local float OldBobTime;
local int m,n;
OldBobTime = BobTime;
//if( !bWeaponBob || bJustLanded )
if( bJustLanded )
{
BobTime = 0;
WalkBob = Vect(0,0,0);
return;
}
Bob = FClamp(Bob, -0.01, 0.01);
if (Physics == PHYS_Walking )
{
X = Vector(Rotation);
Speed2D = VSize(Velocity);
if ( Speed2D < 10 )
BobTime += 0.2 * DeltaTime;
else
BobTime += DeltaTime * (0.3 + 0.7 * Speed2D/GroundSpeed);
//BobTime += DeltaTime * (0.3 + 0.9 * Speed2D/GroundSpeed); // speed this up a tad
WalkBob = Y * Bob * Speed2D * sin(8 * BobTime) + X * Bob * Speed2D * sin(16 * BobTime);//
AppliedBob = AppliedBob * (1 - FMin(1, 16 * deltatime));
WalkBob.Z = AppliedBob;
if ( Speed2D > 10 )
WalkBob.Z = WalkBob.Z + 0.75 * Bob * Speed2D * sin(16 * BobTime);
}
else if ( Physics == PHYS_Swimming )
{
BobTime += DeltaTime;
Speed2D = Sqrt(Velocity.X * Velocity.X + Velocity.Y * Velocity.Y);
WalkBob = Y * Bob * 0.5 * Speed2D * sin(4.0 * BobTime);
WalkBob.Z = Bob * 1.5 * Speed2D * sin(8.0 * BobTime);
}
else
{
BobTime = 0;
WalkBob = WalkBob * (1 - FMin(1, 8 * deltatime));
}
////////////////////////////////////////////////////////////////////////
//set the bob time so it plays the sounds properly
OldBobTime = BobTime;
////////////////////////////////////////////////////////////////////////
//here is the stuff from UnrealPawn CheckBob
if ( (Physics != PHYS_Walking) || (VSize(Velocity) < 10)
|| ((PlayerController(Controller) != None) && PlayerController(Controller).bBehindView) )
return;
m = int(0.5 * Pi + 9.0 * OldBobTime/Pi);
n = int(0.5 * Pi + 9.0 * BobTime/Pi);
if ( (m != n) && !bIsWalking && !bIsCrouched )
FootStepping(0);
//Ibex Removed the !bWeaponBob so it still plays the sound
//else if ( !bWeaponBob && bPlayOwnFootSteps && !bIsWalking && !bIsCrouched && (Level.TimeSeconds - LastFootStepTime > 0.35) )
else if ( bPlayOwnFootSteps && !bIsWalking && !bIsCrouched && (Level.TimeSeconds - LastFootStepTime > 0.35) )
{
LastFootStepTime = Level.TimeSeconds;
FootStepping(0);
}
}