Skip to content

Commit

Permalink
Merge pull request #37 from Deaod/master
Browse files Browse the repository at this point in the history
InstaGib+ 8
  • Loading branch information
Deaod authored Sep 12, 2021
2 parents 3314675 + 7e4de6b commit 443d9b7
Show file tree
Hide file tree
Showing 63 changed files with 3,752 additions and 439 deletions.
54 changes: 50 additions & 4 deletions Classes/ClientSettings.uc
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ var config bool bAllowWeaponShake;
var config bool bAutoReady;
var config bool bShowDeathReport;
var config bool bSmoothFOVChanges;
var config bool bEnableKillFeed;
var config float KillFeedX;
var config float KillFeedY;
var config float KillFeedSpeed;
var config float KillFeedScale;

enum EHitMarkerSource {
HMSRC_Server,
Expand Down Expand Up @@ -109,6 +114,8 @@ var config CrosshairLayerDescr CrosshairLayers[10];
var CrosshairLayer BottomLayer;
var CrosshairLayer TopLayer;

var config float MenuX, MenuY, MenuWidth, MenuHeight;

simulated function AppendLayer(CrosshairLayer L) {
if (BottomLayer == none) {
BottomLayer = L;
Expand Down Expand Up @@ -206,6 +213,30 @@ simulated function string DumpCrosshairLayers() {
return Result;
}
simulated function EHitSoundSource IntToHitSoundSource(int A) {
switch(A) {
case 0: return HSSRC_Server;
case 1: return HSSRC_Client;
}
return HSSRC_Server;
}
simulated function EHitMarkerSource IntToHitMarkerSource(int A) {
switch(A) {
case 0: return HMSRC_Server;
case 1: return HMSRC_Client;
}
return HMSRC_Server;
}
simulated function EHitMarkerColorMode IntToHitMarkerColorMode(int A) {
switch(A) {
case 0: return HMCM_FriendOrFoe;
case 1: return HMCM_TeamColor;
}
return HMCM_FriendOrFoe;
}
simulated function string DumpSettings() {
return "IG+ Client Settings:"$Chr(10)$
GetSetting("bForceModels")$
Expand Down Expand Up @@ -266,6 +297,11 @@ simulated function string DumpSettings() {
GetSetting("bAutoReady")$
GetSetting("bShowDeathReport")$
GetSetting("bSmoothFOVChanges")$
GetSetting("bEnableKillFeed")$
GetSetting("KillFeedX")$
GetSetting("KillFeedY")$
GetSetting("KillFeedSpeed")$
GetSetting("KillFeedScale")$
GetSetting("bEnableHitMarker")$
GetSetting("bEnableTeamHitMarker")$
GetSetting("HitMarkerColorMode")$
Expand Down Expand Up @@ -307,10 +343,10 @@ defaultproperties
SelectedTeamHitSound=2
HitSoundVolume=4
HitSoundTeamVolume=4
sHitSound(0)="InstaGibPlus7.HitSound"
sHitSound(0)="InstaGibPlus8.HitSound"
sHitSound(1)="UnrealShare.StingerFire"
sHitSound(2)="InstaGibPlus7.HitSoundFriendly"
sHitSound(3)="InstaGibPlus7.HitSound1"
sHitSound(2)="InstaGibPlus8.HitSoundFriendly"
sHitSound(3)="InstaGibPlus8.HitSound1"
cShockBeam=1
bHideOwnBeam=False
BeamScale=0.45
Expand All @@ -319,7 +355,7 @@ defaultproperties
BeamOriginMode=0
BeamDestinationMode=0
SSRRingType=1
DesiredNetUpdateRate=250.0
DesiredNetUpdateRate=200.0
DesiredNetspeed=25000
bNoSmoothing=True
bNoOwnFootsteps=False
Expand All @@ -341,6 +377,11 @@ defaultproperties
bAutoReady=True
bShowDeathReport=False
bSmoothFOVChanges=False
bEnableKillFeed=True
KillFeedX=0.0
KillFeedY=0.5
KillFeedSpeed=1.0
KillFeedScale=1.0
bEnableHitMarker=False
bEnableTeamHitMarker=False
HitMarkerColorMode=HMCM_FriendOrFoe
Expand All @@ -352,4 +393,9 @@ defaultproperties
HitMarkerDecayExponent=5.0
HitMarkerSource=HMSRC_Server
bUseCrosshairFactory=False

MenuX=200
MenuY=200
MenuWidth=240
MenuHeight=400
}
36 changes: 20 additions & 16 deletions Classes/ClientSuperShockBeam.uc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class ClientSuperShockBeam extends Effects;
// Settings
var int Team;
var float Size;
var byte Curve;
var float Curve;
var float Duration;
var vector MoveAmount;
var int NumPuffs;
Expand All @@ -15,36 +15,25 @@ var ClientSuperShockBeam Next;
var ClientSuperShockBeam Free;

simulated function Tick(float DeltaTime) {
local byte x;
local float d;

if (Level.NetMode != NM_DedicatedServer) {
d = TimeLeft / Duration;

ScaleGlow = 1;
for (x = 0; x < Curve; x++)
ScaleGlow *= d;
ScaleGlow = (TimeLeft / Duration) ** Curve;

AmbientGlow = ScaleGlow * 210;
if (Team >= 0)
LightBrightness = ScaleGlow * 128;

TimeLeft -= DeltaTime;
if (TimeLeft <= 0.0)
if (TimeLeft <= 0.0) {
FreeBeam(self);
}
}
}

simulated function PostBeginPlay() {
if (Level.NetMode != NM_DedicatedServer)
SetTimer(0.05, false);
}

simulated function SetProperties(int pTeam, float pSize, float pCurve, float pDuration, vector pMoveAmount, int pNumPuffs) {
Team = pTeam;
Size = pSize;
Duration = pDuration;
Curve = Clamp(pCurve, 1, 6);
Curve = pCurve;
MoveAmount = pMoveAmount;
NumPuffs = pNumPuffs;

Expand Down Expand Up @@ -88,6 +77,9 @@ simulated function SetProperties(int pTeam, float pSize, float pCurve, float pDu
}
DrawScale = 0.44 * Size;
TimeLeft = Duration;

if (Level.NetMode != NM_DedicatedServer)
SetTimer(0.05, false);
}

simulated function Timer() {
Expand All @@ -101,6 +93,17 @@ simulated function Timer() {
}
}

static final function ResetBeam(ClientSuperShockBeam Beam) {
Beam.Texture = default.Texture;
Beam.Mesh = default.Mesh;
Beam.LightType = default.LightType;
Beam.LightEffect = default.LightEffect;
Beam.LightBrightness = default.LightBrightness;
Beam.LightSaturation = default.LightSaturation;
Beam.LightRadius = default.LightRadius;
Beam.LightHue = default.LightHue;
}

static final function ClientSuperShockBeam AllocBeam(PlayerPawn P) {
local ClientSuperShockBeam Beam;

Expand All @@ -115,6 +118,7 @@ static final function ClientSuperShockBeam AllocBeam(PlayerPawn P) {
Beam = P.Spawn(class'ClientSuperShockBeam', P);
}

ResetBeam(Beam);
return Beam;
}

Expand Down
45 changes: 45 additions & 0 deletions Classes/IGPlus_Checkbox.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
class IGPlus_Checkbox extends UWindowCheckbox;

var UWindowDialogControl NextSettingControl;

function MouseLeave() {
super(UWindowDialogControl).MouseLeave();

if(ToolTipString != "")
ToolTip("");
}

simulated function MouseEnter() {
local int CutPos;
local int CutPos2;

super(UWindowDialogControl).MouseEnter();

if(ToolTipString != "") {
CutPos = InStr(ToolTipString, "\\n");

CutPos2 = InStr(ToolTipString, Chr(13));
if ((CutPos == -1 && CutPos2 >= 0) || (CutPos >= 0 && CutPos2 >= 0 && CutPos2 < CutPos))
CutPos = CutPos2;

CutPos2 = InStr(ToolTipString, Chr(10));
if ((CutPos == -1 && CutPos2 >= 0) || (CutPos >= 0 && CutPos2 >= 0 && CutPos2 < CutPos))
CutPos = CutPos2;

if (CutPos >= 0)
ToolTip(Left(ToolTipString, CutPos));
else
ToolTip(ToolTipString);
}

if (!bDisabled && (OverSound != None))
GetPlayerOwner().PlaySound( OverSound, SLOT_Interface );
}

function RClick(float X, float Y)
{
local UWindowMessageBox W;
if (HelpText == "") return;
W = MessageBox(Text, HelpText, MB_OK, MR_OK);
W.bLeaveOnscreen = true;
}
64 changes: 64 additions & 0 deletions Classes/IGPlus_ComboBox.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
class IGPlus_ComboBox extends UWindowComboControl;

var UWindowDialogControl NextSettingControl;

var float EditBoxMinWidth;
var float EditBoxMaxWidth;
var float EditBoxWidthFraction;

function AfterCreate() {
EditBoxWidthFraction = FClamp(EditBoxWidth / WinWidth, 0.05, 0.95);
EditBoxMinWidth = WinWidth * EditBoxWidthFraction;
EditBoxMaxWidth = WinWidth * EditBoxWidthFraction;
}

function UWindowComboListItem FindEntry(int Index) {
return UWindowComboListItem(List.Items.FindEntry(Index));
}

function int GetSelectedIndex2() {
return List.FindItemIndex2(GetValue2());
}

function MouseLeave() {
Super.MouseLeave();
if(HelpText != "") ToolTip("");
}

function MouseEnter() {
local int CutPos;
local int CutPos2;

Super.MouseEnter();

if(HelpText != "") {
CutPos = InStr(HelpText, "\\n");

CutPos2 = InStr(HelpText, Chr(13));
if ((CutPos == -1 && CutPos2 >= 0) || (CutPos >= 0 && CutPos2 >= 0 && CutPos2 < CutPos))
CutPos = CutPos2;

CutPos2 = InStr(HelpText, Chr(10));
if ((CutPos == -1 && CutPos2 >= 0) || (CutPos >= 0 && CutPos2 >= 0 && CutPos2 < CutPos))
CutPos = CutPos2;

if (CutPos >= 0)
ToolTip(Left(HelpText, CutPos));
else
ToolTip(HelpText);
}
}

function Resized() {
super.Resized();

EditBoxWidth = FClamp(WinWidth * EditBoxWidthFraction, EditBoxMinWidth, EditBoxMaxWidth);
}

function RClick(float X, float Y)
{
local UWindowMessageBox W;
if (HelpText == "") return;
W = MessageBox(Text, HelpText, MB_OK, MR_OK);
W.bLeaveOnscreen = true;
}
Loading

0 comments on commit 443d9b7

Please sign in to comment.