Custom rifle and UTPURE - Problem with scope.
-
- Novice
- Posts: 20
- Joined: Tue Feb 12, 2008 1:11 pm
Custom rifle and UTPURE - Problem with scope.
If you are running UTPURE on your server and you have custom rifles, there's a chance that the scope does not work as supposed to.
This is because of the way the Weapon has been coded.
The Symptoms: When you try to zoom, you get the scope to tremble, but never actually zooms.
The solution: Search on your server Unrealtournament.ini (or corresponding file. In my Linux server is server.cfg) for a parameter in the UTPURE section called TrackFOV
If it reads something different from TrackFOV=0 then change it to match the 0 value. (Most times it reads the value 2).
Restart your server, and that should be it.
Lordi
This is because of the way the Weapon has been coded.
The Symptoms: When you try to zoom, you get the scope to tremble, but never actually zooms.
The solution: Search on your server Unrealtournament.ini (or corresponding file. In my Linux server is server.cfg) for a parameter in the UTPURE section called TrackFOV
If it reads something different from TrackFOV=0 then change it to match the 0 value. (Most times it reads the value 2).
Restart your server, and that should be it.
Lordi
STOP!!!!
setting it to 0 will allow FOV cheats.
the only way to fix it 100% is to recode the script and add a hudmutator that will make the rifle UTpure compatible, this is all you need to add to the rifle realy :
then add in the rifle script :
setting it to 0 will allow FOV cheats.
the only way to fix it 100% is to recode the script and add a hudmutator that will make the rifle UTpure compatible, this is all you need to add to the rifle realy :
class AMLPClanRifle_HUDMutator expands Mutator;
var PlayerPawn HUDOwner;
simulated event PostRender( canvas Canvas )
{
if (HUDOwner != None && HUDOwner.Weapon != None)
{
// if (Owner.Weapon.IsA('ClanRifleAMLP')) // You may want to enable this.
HUDOwner.Weapon.PostRender(Canvas);
}
}
defaultproperties
{
}
then add in the rifle script :
now ofcause change the names of the packages to your rifles names.simulated event PostNetBeginPlay()
{
local AMLPClanRifle_HUDMutator crosshair;
local PlayerPawn HUDOwner;
Super.PostNetBeginPlay();
// If owner is the local player, check that the HUD Mutator exists. Also check for the presense of a bbPlayer (UTPure enabled)
HUDOwner = PlayerPawn(Owner);
if (HUDOwner != None && HUDOwner.IsA('bbPlayer') && HUDOwner.myHUD != None)
{
ForEach AllActors(Class'AMLPClanRifle_HUDMutator', crosshair)
break;
if (crosshair == None)
{
crosshair = Spawn(Class'AMLPClanRifle_HUDMutator', Owner);
crosshair.RegisterHUDMutator();
crosshair.HUDOwner = HUDOwner;
}
}
}
Retired.
-
- Novice
- Posts: 20
- Joined: Tue Feb 12, 2008 1:11 pm
True with the FOV.
But, in my case, I have the code added, but the problem is still there.
Maybe the problem is in another part of my weapon.
Let's check
This is my RifleHUDMutator.uc file in the class folder of my weapon:
class RifleHUDMutator extends Mutator;
This is added to my weapon in the Rifle.uc file :
Don't see the problem, but still it does not work.
I'll continue to check, but, in case it does not work with the script, the first solution works... and yes, allowing players to exploit FOV. Your call.
But, in my case, I have the code added, but the problem is still there.
Maybe the problem is in another part of my weapon.
Let's check
This is my RifleHUDMutator.uc file in the class folder of my weapon:
class RifleHUDMutator extends Mutator;
Code: Select all
var PlayerPawn HUDOwner;
simulated event PostRender( Canvas Canvas )
{
if (HUDOwner != None && HUDOwner.Weapon != None)
{
if (HUDOwner.Weapon.IsA('Rifle')) // You may want to enable this.
HUDOwner.Weapon.PostRender(Canvas);
}
}
defaultproperties
{
}
Code: Select all
simulated event PostNetBeginPlay()
{
local RifleHUDMutator crosshair;
local PlayerPawn HUDOwner;
Super.PostNetBeginPlay();
// If owner is the local player, check that the HUD Mutator exists. Also check for the presense of a bbPlayer (UTPure enabled)
HUDOwner = PlayerPawn(Owner);
if (HUDOwner != None && HUDOwner.IsA('bbPlayer') && HUDOwner.myHUD != None)
{
ForEach AllActors(Class'RifleHUDMutator', crosshair)
break;
if (crosshair == None)
{
crosshair = Spawn(Class'RifleHUDMutator', Owner);
crosshair.RegisterHUDMutator();
crosshair.HUDOwner = HUDOwner;
}
}
}
I'll continue to check, but, in case it does not work with the script, the first solution works... and yes, allowing players to exploit FOV. Your call.
-
- Novice
- Posts: 20
- Joined: Tue Feb 12, 2008 1:11 pm
DFon't know if something references it... damn shouldn't have quit the Unreal coder course!!! hehehe
I Use 7G.
I'm gonna check the code to see if there's anything strange...
Also, is there any rifle source code available? Like a template or something?
Maybe the problem is that my rifle does change the FOV to do the zooming... who Knows...
I Use 7G.
I'm gonna check the code to see if there's anything strange...
Also, is there any rifle source code available? Like a template or something?
Maybe the problem is that my rifle does change the FOV to do the zooming... who Knows...
-
- Novice
- Posts: 20
- Joined: Tue Feb 12, 2008 1:11 pm
Maybe i was right and the rifle does change the FOV to zoom... look a this code:
Code: Select all
state Zooming
{
simulated function Tick(float DeltaTime)
{
if ( Pawn(Owner).bAltFire == 0 )
{
bZoom = false;
SetTimer(0.0,False);
GoToState('Idle');
}
else if ( bZoom )
{
if ( PlayerPawn(Owner).DesiredFOV > 3 )
{
PlayerPawn(Owner).DesiredFOV -= PlayerPawn(Owner).DesiredFOV*DeltaTime*4.5;
}
if ( PlayerPawn(Owner).DesiredFOV <=3 )
{
PlayerPawn(Owner).DesiredFOV = 3;
bZoom = false;
SetTimer(0.0,False);
GoToState('Idle');
}
}
}
that is very normal, and the only way to actualy do a proper zoom i think?
I honestly don't know why it shouldn't work for you? I run the same version of UTPure?
I build my rifle on the script from the default rifle, I have modified it a lot over the years, but i haven't changed the core of it. So you can just exctract that script and take it from there.
I honestly don't know why it shouldn't work for you? I run the same version of UTPure?
I build my rifle on the script from the default rifle, I have modified it a lot over the years, but i haven't changed the core of it. So you can just exctract that script and take it from there.
Retired.
-
- Novice
- Posts: 20
- Joined: Tue Feb 12, 2008 1:11 pm
Re: Custom rifle and UTPURE - Problem with scope.
yea i have had to scpoe go out on me lol not that i need it
-
- Posts: 2
- Joined: Thu Mar 20, 2008 4:45 pm
- Personal rank: unstoppleeeeeeee