- correct readme

- make minigun work also on Netplay
- fix mutator
This commit is contained in:
cclecle
2022-12-10 13:32:31 +00:00
parent 53bf6c6a77
commit fa6404868c
6 changed files with 50 additions and 23 deletions

View File

@@ -7,8 +7,8 @@ Behavior:
Installation: Installation:
=> Copy files and enable one of the mutator: => Copy files and enable one of the mutator:
UT2341WeaponsReduced<VERSION>.UT2341Instagib UT2341WeaponsReduced<VERSION>.Mut_UT2341Instagib
UT2341WeaponsReduced<VERSION>.UT2341Replacement UT2341WeaponsReduced<VERSION>.Mut_UT2341Replacement
=> If you are on a server add the .u to ServerPackages + dopy redirect files => If you are on a server add the .u to ServerPackages + dopy redirect files
@@ -16,7 +16,7 @@ Configuration:
+ You can now configure wich weapon to replace with UT99 one: + You can now configure wich weapon to replace with UT99 one:
[UT2341WeaponsReduced<VERSION>.UT2341Replacement] [UT2341WeaponsReduced<VERSION>.Mut_UT2341Replacement]
bReplaceAssaultRifle = True bReplaceAssaultRifle = True
bReplaceBioRifle = True bReplaceBioRifle = True
bReplaceONSMineLayer = True bReplaceONSMineLayer = True

View File

@@ -16,13 +16,14 @@ var config bool bReplacePainter;
var config bool bReplaceStartWeapons; var config bool bReplaceStartWeapons;
simulated function PreBeginPlay() function PostBeginPlay()
{ {
local xPickupBase P; //local xPickupBase P;
Super.PreBeginPlay(); Super.PostBeginPlay();
//Apparently CheckReplacement doesn't work on the client side //Apparently CheckReplacement doesn't work on the client side
/*
foreach AllActors (class'xPickupBase', P) foreach AllActors (class'xPickupBase', P)
{ {
P.bHidden = True; P.bHidden = True;
@@ -30,6 +31,7 @@ simulated function PreBeginPlay()
P.SetDrawType(DT_None); P.SetDrawType(DT_None);
P.SetStaticMesh(None); P.SetStaticMesh(None);
} }
*/
} }
@@ -123,6 +125,7 @@ function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
local PhysicsVolume PV; local PhysicsVolume PV;
bSuperRelevant = 0; bSuperRelevant = 0;
/*
PV = PhysicsVolume(Other); PV = PhysicsVolume(Other);
if ( PV != None ) if ( PV != None )
{ {
@@ -130,7 +133,8 @@ function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
PV.RemoteRole = ROLE_DumbProxy; PV.RemoteRole = ROLE_DumbProxy;
return true; return true;
} }
*/
if (xPawn(Other) != None) if (xPawn(Other) != None)
{ {
@@ -142,11 +146,11 @@ function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
if (xLastManStandingGame(Level.Game) != None) if (xLastManStandingGame(Level.Game) != None)
xPawn(Other).RequiredEquipment[2] = "UT2341WeaponsReducedv1a.UT2341Ripper"; xPawn(Other).RequiredEquipment[2] = "UT2341WeaponsReducedv1a.UT2341Ripper";
return true;
} }
return true;
} }
else if (xPickupBase(Other) != None) if (xPickupBase(Other) != None)
{ {
Other.bHidden = True; Other.bHidden = True;
Other.SetDrawType(DT_None); Other.SetDrawType(DT_None);
@@ -232,7 +236,7 @@ function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
return true; return true;
} }
else if (Pickup(Other) != None) if (Pickup(Other) != None)
{ {
if ( WeaponLocker(Other) != None ) if ( WeaponLocker(Other) != None )
{ {
@@ -285,7 +289,8 @@ function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
} }
return true; return true;
} }
else if (UTAmmoPickup(Other) != None)
if (UTAmmoPickup(Other) != None)
{ {
switch(UTAmmoPickup(Other).Class) switch(UTAmmoPickup(Other).Class)
{ {
@@ -336,14 +341,10 @@ function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
} }
return true; return true;
} }
else
return true;
return false;
} }
else
return true; return true;
return false;
} }
defaultproperties defaultproperties
@@ -368,4 +369,5 @@ defaultproperties
bReplaceRedeemer = True bReplaceRedeemer = True
bReplacePainter = True bReplacePainter = True
bReplaceStartWeapons = True bReplaceStartWeapons = True
bAddToServerpackages = True
} }

View File

@@ -6,6 +6,14 @@ class UT2341Minigun extends Minigun
#EXEC OBJ LOAD FILE=InterfaceContent.utx #EXEC OBJ LOAD FILE=InterfaceContent.utx
replication
{
reliable if( ROLE<ROLE_Authority)
ForceFiringServer;
}
simulated function PostBeginPlay() simulated function PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
@@ -21,6 +29,20 @@ simulated function PostBeginPlay()
} }
} }
simulated function ForceFiring(int Mode)
{
Log("ForceFiring()");
GetFireMode(Mode).bIsFiring = True;
ForceFiringServer(Mode);
}
function ForceFiringServer(int Mode)
{
Log("ForceFiringServer()");
GetFireMode(Mode).bIsFiring = True;
}
simulated function bool ConsumeAmmo(int Mode, float load, optional bool bAmountNeededIsMax) simulated function bool ConsumeAmmo(int Mode, float load, optional bool bAmountNeededIsMax)
{ {
local int AmountNeeded; local int AmountNeeded;

View File

@@ -165,16 +165,17 @@ state WindDown
if( ((C.bFire==1)&&(ThisModeNum == 0)) || if( ((C.bFire==1)&&(ThisModeNum == 0)) ||
((C.bAltFire==1)&&(ThisModeNum == 1)) ) ((C.bAltFire==1)&&(ThisModeNum == 1)) )
{ {
bIsFiring=True; //Restart same firing mode
UT2341Minigun(Weapon).ForceFiring(ThisModeNum);
Gun.UpdateRoll(dt, RollSpeed, ThisModeNum); Gun.UpdateRoll(dt, RollSpeed, ThisModeNum);
GotoState('WindUp'); GotoState('WindUp');
} }
else if(C.bAltFire==1) else if(C.bAltFire==1)
{ {
//Switch to AltFire
UT2341MinigunAltFire(Weapon.GetFireMode(1)).RollSpeed = RollSpeed; UT2341MinigunAltFire(Weapon.GetFireMode(1)).RollSpeed = RollSpeed;
UT2341MinigunAltFire(Weapon.GetFireMode(1)).FireTime = FireTime; UT2341MinigunAltFire(Weapon.GetFireMode(1)).FireTime = FireTime;
UT2341MinigunAltFire(Weapon.GetFireMode(1)).bIsFiring = True; UT2341Minigun(Weapon).ForceFiring(1);
UT2341MinigunAltFire(Weapon.GetFireMode(1)).GotoState('WindUp'); UT2341MinigunAltFire(Weapon.GetFireMode(1)).GotoState('WindUp');
Gun.UpdateRoll(dt, RollSpeed, 1); Gun.UpdateRoll(dt, RollSpeed, 1);
RollSpeed = 0.f; RollSpeed = 0.f;
@@ -183,9 +184,11 @@ state WindDown
} }
else if(C.bFire==1) else if(C.bFire==1)
{ {
UT2341MinigunFire(Weapon.GetFireMode(0)).RollSpeed = RollSpeed; //Switch to Main Fire
UT2341MinigunFire(Weapon.GetFireMode(0)).RollSpeed = RollSpeed;
UT2341MinigunFire(Weapon.GetFireMode(0)).FireTime = FireTime; UT2341MinigunFire(Weapon.GetFireMode(0)).FireTime = FireTime;
UT2341MinigunFire(Weapon.GetFireMode(0)).bIsFiring = True; //UT2341MinigunFire(Weapon.GetFireMode(0)).bIsFiring = True;
UT2341Minigun(Weapon).ForceFiring(0);
UT2341MinigunFire(Weapon.GetFireMode(0)).GotoState('WindUp'); UT2341MinigunFire(Weapon.GetFireMode(0)).GotoState('WindUp');
Gun.UpdateRoll(dt, RollSpeed, 0); Gun.UpdateRoll(dt, RollSpeed, 0);
RollSpeed = 0.f; RollSpeed = 0.f;

Binary file not shown.