Cybernetic pig wrote:Regarding mouse 3 & 4 support and HXMenuScreenCustomizeKeys
How come the arrays have 35+ more elements than vanilla (most are [61])?
IIRC I did this change, so we could use the code in Revision too. Biomod/Shifter has some extra commands, but they just increased the count of the array to exactly match how many commands are available as this was required with the old code. I change it, so it could work with an arbitrary number of commands up until the array is full, so it would just be adding another defprop instead of always matching the array to the number of commands. Afaik that was the main reason I posted it.
If I just replace vanilla MenuScreenCustomizeKeys with this HX one then I'll have mouse 3 & 4 support?
Problem is I cannot test it (for now) as I don't have such a mouse, so I want to be sure on what to do.
No you need a ViewportManager or sth. so you actually receive events for these keys. For Revision I added it as part of adding RawInput to WinDrvLite, so grab that out of Revision steam dir if you can, otherwise I can upload it. However there are still certain issues in, like some scaling for UI mouse would be nice as the mouse speed in the UI otherwise depends heavily on the mouse one uses, so no hardcoded scaling value would help. For ingame mouse speed I added some sort of logarithmic mouse speed slider, so one can have low mouse scalings too (0.1 to 10).
Code: Select all
//=============================================================================
// HXMenuChoice_MouseSensitivity
//
// Revision History:
// * Added range of 0.1-0.9 values in 0.1 steps to selection.
//=============================================================================
class HXMenuChoice_MouseSensitivity extends HXMenuUIChoiceSlider;
// ----------------------------------------------------------------------
// LoadSetting()
// ----------------------------------------------------------------------
function LoadSetting()
{
local float NewValue;
SaveValue = Player.MouseSensitivity;
if ( Player.MouseSensitivity<1.0 )
NewValue = Player.MouseSensitivity*10.0-1.0;
else
NewValue = Player.MouseSensitivity+8.0;
//Log( "LoadSetting() (MouseSensitivity="$Player.MouseSensitivity$",NewValue="$NewValue$")", Class.Name );
BtnSlider.WinSlider.SetTickPosition( NewValue );
}
// ----------------------------------------------------------------------
// CancelSetting()
// ----------------------------------------------------------------------
function CancelSetting()
{
//Log( "CancelSetting() (SaveValue=" $ SaveValue $ ")", Class.Name );
Player.UpdateSensitivity( SaveValue );
}
// ----------------------------------------------------------------------
// ResetToDefault()
// ----------------------------------------------------------------------
function ResetToDefault()
{
//Log( "CancelSetting() (SaveValue=" $ DefaultValue $ ")", Class.Name );
Player.UpdateSensitivity( DefaultValue );
SetValue( 9 );
}
// ----------------------------------------------------------------------
// SetEnumerators()
// ----------------------------------------------------------------------
function SetEnumerators()
{
local int i;
// 0.1 to 0.9 in 0.1 steps.
for ( i=0; i<9; i++ )
SetEnumeration( i, "0."$(i+1) );
// 1 to 10 in 1 steps.
for ( i=9; i<19; i++ )
SetEnumeration( i, (i-8) );
}
// ----------------------------------------------------------------------
// ScalePositionChanged()
//
// Update the Mouse Sensitivity value.
// ----------------------------------------------------------------------
event bool ScalePositionChanged( Window Scale, int NewTickPosition, float NewValue, bool bFinal )
{
local float Value;
// Don't do anything while initializing as we get several
// ScalePositionChanged() events before LoadSetting() is called.
if ( bInitializing )
return False;
if ( NewTickPosition<9 )
Value = (float(NewTickPosition)+1.0)/10.0;
else
Value = float(NewTickPosition)-8.0;
//Log( "ScalePositionChanged() (NewTickPosition="$NewTickPosition$",Value="$Value$")", Class.Name );
Player.UpdateSensitivity( Value );
return False;
}
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
defaultproperties
{
NumTicks=19
StartValue=0.1
EndValue=10.0
DefaultValue=1.0
HelpText="Modifies the mouse sensitivity"
ActionText="Mouse |&Sensitivity"
}
Also is there an accurate way of telling the player is attached to a ladder? Something like bIsClimbing set when the player is on a ladder would be really handy. Current method I'm using to play ladder climbing sounds is sub-optimal, but all the vanilla ladder code is native so I have no better method of checking currently.
The ladder climbing works fine for most ladders as seen
here, but it doesn't work too well on the few late game ladders the DX devs made out of multiple brushes with gaps between them (missed by GetWallTexture()).
The texture trace in vanilla Deus Ex is flawed (as discussed somewhere early in this thread). Simply put, it often returns another coplanar surface instead of the correct one. There are quite a lot of noticable examples in Hong Kong. However I still haven't quite figured out if my texture trace works correctly with mover surfaces. Basically I stopped working on it after I needed some testmap with some movers in, where each surface has an unique textures, maybe some complanar faces on the same mover and in the world outside the mover.
As for everything else related to climbing, I have never touched it, but i'll try to figure out how it is done.
/edit:
event WalkTexture() is called. I guess dx is the only game outside WoT where this is actually hooked in.
This should do the trick, but there might be more direct solutions.
Code: Select all
event WalkTexture( Texture Texture, vector StepLocation, vector StepNormal )
{
Log( "(Texture="$Texture$")", 'WalkTexture' );
if ( Texture.Outer!=None && Texture.Outer.Name=='Ladder' )
bOnLadder = True;
else
bOnLadder = False;
}
/edit2:
There is most likely no direct solution or bool which you can query. It happens inside the physics code and no bools are set or anything.