diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f29310 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# List of files to ignore +[Uu][Tt]2004.ini +[Uu]ser.ini diff --git a/Animations/EONSLocustA.ukx b/Animations/EONSLocustA.ukx new file mode 100644 index 0000000..9a9b874 Binary files /dev/null and b/Animations/EONSLocustA.ukx differ diff --git a/Animations/UT3FuryAnims.ukx b/Animations/UT3FuryAnims.ukx new file mode 100644 index 0000000..ea09dbb Binary files /dev/null and b/Animations/UT3FuryAnims.ukx differ diff --git a/Animations/UT3GoliathAnims.ukx b/Animations/UT3GoliathAnims.ukx new file mode 100644 index 0000000..7ba6353 Binary files /dev/null and b/Animations/UT3GoliathAnims.ukx differ diff --git a/Animations/UT3MantaAnims.ukx b/Animations/UT3MantaAnims.ukx new file mode 100644 index 0000000..53b8e8e Binary files /dev/null and b/Animations/UT3MantaAnims.ukx differ diff --git a/Animations/UT3NemesisAnims.ukx b/Animations/UT3NemesisAnims.ukx new file mode 100644 index 0000000..fd6b00d Binary files /dev/null and b/Animations/UT3NemesisAnims.ukx differ diff --git a/Animations/UT3NightshadeAnims.ukx b/Animations/UT3NightshadeAnims.ukx new file mode 100644 index 0000000..f47c6b4 Binary files /dev/null and b/Animations/UT3NightshadeAnims.ukx differ diff --git a/Animations/UT3PaladinAnims.ukx b/Animations/UT3PaladinAnims.ukx new file mode 100644 index 0000000..0f1afb8 Binary files /dev/null and b/Animations/UT3PaladinAnims.ukx differ diff --git a/Animations/UT3StealthBenderAnims.ukx b/Animations/UT3StealthBenderAnims.ukx new file mode 100644 index 0000000..63bbdb0 Binary files /dev/null and b/Animations/UT3StealthBenderAnims.ukx differ diff --git a/Animations/UT3VH_Cicada_Anims.ukx b/Animations/UT3VH_Cicada_Anims.ukx new file mode 100644 index 0000000..9108edd Binary files /dev/null and b/Animations/UT3VH_Cicada_Anims.ukx differ diff --git a/Animations/UT3VH_Hellbender_Anims.ukx b/Animations/UT3VH_Hellbender_Anims.ukx new file mode 100644 index 0000000..fcaac18 Binary files /dev/null and b/Animations/UT3VH_Hellbender_Anims.ukx differ diff --git a/Animations/UT3VH_Leviathan_Anims.ukx b/Animations/UT3VH_Leviathan_Anims.ukx new file mode 100644 index 0000000..abcb4bb Binary files /dev/null and b/Animations/UT3VH_Leviathan_Anims.ukx differ diff --git a/Animations/UT3VH_Paladin_Anims.ukx b/Animations/UT3VH_Paladin_Anims.ukx new file mode 100644 index 0000000..e2053e0 Binary files /dev/null and b/Animations/UT3VH_Paladin_Anims.ukx differ diff --git a/Animations/UT3VH_Raptor_Anims.ukx b/Animations/UT3VH_Raptor_Anims.ukx new file mode 100644 index 0000000..50525bb Binary files /dev/null and b/Animations/UT3VH_Raptor_Anims.ukx differ diff --git a/Animations/UT3VH_SPMA_Anims.ukx b/Animations/UT3VH_SPMA_Anims.ukx new file mode 100644 index 0000000..532fee7 Binary files /dev/null and b/Animations/UT3VH_SPMA_Anims.ukx differ diff --git a/Animations/UT3VH_Scorpion_Anims.ukx b/Animations/UT3VH_Scorpion_Anims.ukx new file mode 100644 index 0000000..563f8a4 Binary files /dev/null and b/Animations/UT3VH_Scorpion_Anims.ukx differ diff --git a/Animations/UT3ViperAnims.ukx b/Animations/UT3ViperAnims.ukx new file mode 100644 index 0000000..d6aee6b Binary files /dev/null and b/Animations/UT3ViperAnims.ukx differ diff --git a/Animations/Unused/UT3CicadaAnims.ukx b/Animations/Unused/UT3CicadaAnims.ukx new file mode 100644 index 0000000..df52fe5 Binary files /dev/null and b/Animations/Unused/UT3CicadaAnims.ukx differ diff --git a/Animations/Unused/UT3DarkWalkerAnims.ukx b/Animations/Unused/UT3DarkWalkerAnims.ukx new file mode 100644 index 0000000..c7be7c3 Binary files /dev/null and b/Animations/Unused/UT3DarkWalkerAnims.ukx differ diff --git a/Animations/Unused/UT3HellbenderAnims.ukx b/Animations/Unused/UT3HellbenderAnims.ukx new file mode 100644 index 0000000..9bfd7dd Binary files /dev/null and b/Animations/Unused/UT3HellbenderAnims.ukx differ diff --git a/Animations/Unused/UT3LeviathanAnims.ukx b/Animations/Unused/UT3LeviathanAnims.ukx new file mode 100644 index 0000000..8082b10 Binary files /dev/null and b/Animations/Unused/UT3LeviathanAnims.ukx differ diff --git a/Animations/Unused/UT3Nemesis.ukx b/Animations/Unused/UT3Nemesis.ukx new file mode 100644 index 0000000..158416e Binary files /dev/null and b/Animations/Unused/UT3Nemesis.ukx differ diff --git a/Animations/Unused/UT3SPMAAnims.ukx b/Animations/Unused/UT3SPMAAnims.ukx new file mode 100644 index 0000000..de27237 Binary files /dev/null and b/Animations/Unused/UT3SPMAAnims.ukx differ diff --git a/Animations/Unused/UT3Scavenger.ukx b/Animations/Unused/UT3Scavenger.ukx new file mode 100644 index 0000000..dea89a5 Binary files /dev/null and b/Animations/Unused/UT3Scavenger.ukx differ diff --git a/Classes/Beam.uc b/Classes/Beam.uc deleted file mode 100644 index bca5c69..0000000 --- a/Classes/Beam.uc +++ /dev/null @@ -1,7 +0,0 @@ -class Beam extends LinkBeamEffect; - -simulated function SetBeamLocation() -{ - // Only set the location, we get BeamStart from the nightshade. - SetLocation(StartEffect); -} \ No newline at end of file diff --git a/Classes/DeployableMine.uc b/Classes/DeployableMine.uc deleted file mode 100644 index 9228116..0000000 --- a/Classes/DeployableMine.uc +++ /dev/null @@ -1,88 +0,0 @@ -//============================================================ -// Base class for deployable objects. -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class DeployableMine extends Actor; - -/* The deployer's controller. */ -var Controller Controller; -/* Indicates wether or not we've deployed. */ -var bool bDeployed; -/* The team of the deployable. */ -var byte Team; - - -replication -{ - reliable if (Role == ROLE_Authority && bNetDirty) - bDeployed, Team; -} - - -function PostBeginPlay() -{ - Super.PostBeginPlay(); - - if (Instigator != None) - { - Controller = Instigator.Controller; - Team = Controller.PlayerReplicationInfo.Team.TeamIndex; - } -} -simulated function Deploy() -{ - bDeployed = true; -} -event Landed(vector HitNormal) -{ - // We want to deploy after we land. - Deploy(); - bCollideWorld=false; - SetCollision(false, false, false); -} -static function bool DeployablesNearby(Actor MyActor, vector StartLocation, float CheckRadius) -{ - local float Dist; - local DeployableMine DeployedActor; - - if (MyActor.Instigator == None) - return true; - - foreach MyActor.DynamicActors(class'DeployableMine', DeployedActor) - { - Dist = VSize(DeployedActor.Location - StartLocation); - if (Dist < CheckRadius) - { - if (DeployableMine(MyActor) != None && DeployedActor.Team == DeployableMine(MyActor).Team) - return true; - else if (Pawn(MyActor) != None && DeployedActor.Team == Pawn(MyActor).Controller.PlayerReplicationInfo.Team.TeamIndex) - return true; - } - } - - return false; -} - - -DefaultProperties -{ - // Looks. - StaticMesh=StaticMesh'2k4ChargerMeshes.ChargerMeshes.HealthChargerMESH-DS'; - DrawType=DT_StaticMesh; - - // Collision. - bCollideWorld=true; - bCollideActors=true; - bBlockActors=true; - CollisionHeight = 0; - - // Network. - bReplicateInstigator=true; - bReplicateAnimations=true; - RemoteRole=ROLE_SimulatedProxy; - - // Movement. - Physics=PHYS_Falling; -} diff --git a/Classes/DeployableSlowVolume.uc b/Classes/DeployableSlowVolume.uc deleted file mode 100644 index fc88a25..0000000 --- a/Classes/DeployableSlowVolume.uc +++ /dev/null @@ -1,29 +0,0 @@ -class DeployableSlowVolume extends DeployableMine; - -/* */ -var SlowVolume OwnedVolume; - -function Deploy() -{ - local rotator rot; - - Super.Deploy(); - - OwnedVolume = Spawn(class'SlowVolume', Instigator,, Location, Rotation); - OwnedVolume.MineBase = self; - - rot = Rotation; - rot.Pitch = 0; - rot.Roll = 0; - - SetRotation(rot); - OwnedVolume.SetRotation(rot); -} - -event Destroyed() -{ - if (OwnedVolume != None) - OwnedVolume.Destroy(); - - Super.Destroyed(); -} diff --git a/Classes/DmgType_SelfDestruct.uc b/Classes/DmgType_SelfDestruct.uc deleted file mode 100644 index 3db46f0..0000000 --- a/Classes/DmgType_SelfDestruct.uc +++ /dev/null @@ -1,29 +0,0 @@ -//============================================================ -// Self Destruct Damage Type -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class DmgType_SelfDestruct extends VehicleDamageType - abstract; - - -static function IncrementKills (Controller KillerRI) -{ - super.IncrementKills(KillerRI); -} - - -DefaultProperties -{ - // Strings. - DeathString="%k stung %o with a Viper self-destruct."; - MaleSuicide="%o stung himself with his own Viper self-destruct." - FemaleSuicide="%o stung herself with her own Viper self-destruct." - - // Misc. - VehicleClass=Class'UT3Viper.UT3Viper'; - bDelayedDamage=true; - bDetonatesGoop=true; - FlashFog=(X=700.0); -} diff --git a/Classes/DmgType_ViperBolt.uc b/Classes/DmgType_ViperBolt.uc deleted file mode 100644 index c1e60f5..0000000 --- a/Classes/DmgType_ViperBolt.uc +++ /dev/null @@ -1,24 +0,0 @@ -//============================================================ -// UT3 Viper Weapon Projectile's Damage Type -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class DmgType_ViperBolt extends WeaponDamageType - abstract; - -DefaultProperties -{ - // Strings. - DeathString="%k kills %o with a Viper Gun."; - MaleSuicide="%o kills himself with his own Viper Gun."; - FemaleSuicide="%o kills herself with her own Viper Gun."; - - // Vehicle. - VehicleMomentumScaling=1.0; - VehicleDamageScaling=0.7; - - // Misc. - WeaponClass=class'UT3Viper.Weap_ViperGun'; - bCausesBlood=false; -} diff --git a/Classes/EMPDisabler.uc b/Classes/EMPDisabler.uc deleted file mode 100644 index 22a100c..0000000 --- a/Classes/EMPDisabler.uc +++ /dev/null @@ -1,25 +0,0 @@ -class EMPDisabler extends Inventory; - -/* */ -var byte Team; - -function Destroyed() -{ - local Vehicle V; - - V = Vehicle(Owner); - - if (V != None) - { - V.Team = Team; - V.bTeamLocked = false; - } - - Super.Destroyed(); -} - -DefaultProperties -{ - // UTVehicle.DisabledTime; - LifeSpan = 20.0; -} diff --git a/Classes/EMPMine.uc b/Classes/EMPMine.uc deleted file mode 100644 index 8e33c36..0000000 --- a/Classes/EMPMine.uc +++ /dev/null @@ -1,104 +0,0 @@ -class EMPMine extends DeployableMine; - -#exec audio import group=EMPSounds file=..\Sounds\UT3Nightshade\EMPMine\EMP_Drop.wav -#exec audio import group=EMPSounds file=..\Sounds\UT3Nightshade\EMPMine\EMP_Shock.wav - -/* */ -var float EMPRadius; -/* */ -var Sound DropSnd; -/* */ -var Sound ShockSnd; - -event Landed(vector HitNormal) -{ - local vector HitLocation, TraceHitNormal; - local Actor HitActor; - - Super.Landed(HitNormal); - - //Trace(HitLocation, HitNormal, TraceEnd, Location, true) - HitActor = Trace(HitLocation, TraceHitNormal, Location - vect(0,0,10), Location, true); - - if (Vehicle(HitActor) != None) - LifeSpan = FMin(LifeSpan, 30.0); - - if (!bDeleteMe) - SetTimer(0.1, true); -} -simulated function Deploy() -{ - Super.Deploy(); - PlaySound(DropSnd, SLOT_None); - PlayAnim('Deploy'); -} -function CheckEMP() -{ - local Vehicle V; - local Controller C, NextC; - local bool bActivated; - - C = Level.ControllerList; - while (C != None) - { - NextC = C.NextController; - - V = Vehicle(C.Pawn); - //if (C.Pawn != None && Vehicle(C.Pawn) != None && Vehicle(C.Pawn).Health > 0 && Vehicle(C.Pawn).Driver != None && C.GetTeamNum() != Team && VSize(C.Pawn.Location - Location) < EMPRadius && FastTrace(Location, C.Pawn.Location)) - if (V != None && V.Health > 0 && V.Driver != None && C.GetTeamNum() != Team && VSize(V.Location - Location) < EMPRadius && FastTrace(Location, V.Location)) - { - //V.EjectDriver(); - V.KDriverLeave(true); - - // 254 = EMP'ed team. - if (V.Team != 254) - { - PlaySound(ShockSnd, SLOT_None); - DisableVehicle(V); - bActivated = true; - } - } - - C = NextC; - } - - if (bActivated) - { - MakeNoise(1.0); - // PlayEffect()? - } -} -function DisableVehicle(Vehicle V) -{ - local EMPDisabler Disabler; - - Disabler = Spawn(class'EMPDisabler',,, Location); - Disabler.Team = V.Team; - - V.Team = 254; - V.bTeamLocked = true; - - Disabler.GiveTo(V); -} -event Timer() -{ - CheckEMP(); -} - -DefaultProperties -{ - EMPRadius = 500.0; - - Mesh = SkeletalMesh'UT3NightshadeAnims.EMPMine'; - DrawType = DT_Mesh; - - bCollideActors = false; - bBlockActors = false; - bBlockKarma = false; - - LifeSpan = 60.0; - - // Sound. - DropSnd = Sound'UT3Nightshade.EMPSounds.EMP_Drop'; - ShockSnd = Sound'UT3Nightshade.EMPSounds.EMP_Shock'; -} diff --git a/Classes/EMPObject.uc b/Classes/EMPObject.uc deleted file mode 100644 index cbef8ca..0000000 --- a/Classes/EMPObject.uc +++ /dev/null @@ -1,13 +0,0 @@ -//============================================================ -// Mine object (object that happears in the Nightshade's arm) -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class EMPObject extends Actor; - -DefaultProperties -{ - Mesh = SkeletalMesh'UT3NightshadeAnims.EMPMine'; - DrawType = DT_Mesh; -} \ No newline at end of file diff --git a/Classes/EONSLocustHoverDust.uc b/Classes/EONSLocustHoverDust.uc new file mode 100644 index 0000000..98bab25 --- /dev/null +++ b/Classes/EONSLocustHoverDust.uc @@ -0,0 +1,82 @@ +class EONSLocustHoverDust extends ONSHoverBikeHoverDust; + +#exec OBJ LOAD FILE=..\Textures\AW-2004Particles.utx + +defaultproperties +{ + bNoDelete=false + bBlockActors=False + RemoteRole=ROLE_None + Physics=PHYS_None + bHardAttach=True + CullDistance=8000.0 + + Begin Object Class=SpriteEmitter Name=SpriteEmitter0 + UseColorScale=True + SpinParticles=True + UseSizeScale=True + UseRegularSizeScale=False + UniformSize=True + BlendBetweenSubdivisions=True + UseRandomSubdivision=True + UseVelocityScale=True + Acceleration=(Z=500.000000) + ColorScale(0)=(Color=(B=96,G=128,R=164)) + ColorScale(1)=(RelativeTime=0.200000,Color=(B=96,G=128,R=164,A=255)) + ColorScale(2)=(RelativeTime=0.500000,Color=(B=64,G=100,R=128,A=255)) + ColorScale(3)=(RelativeTime=1.000000,Color=(B=68,G=104,R=125)) + FadeOutStartTime=0.500000 + FadeInEndTime=0.350000 + MaxParticles=50 + StartLocationShape=PTLS_Polar + StartLocationPolarRange=(X=(Min=16384.000000,Max=16384.000000),Y=(Max=65536.000000),Z=(Min=20.000000,Max=20.000000)) + UseRotationFrom=PTRS_Actor + SizeScale(0)=(RelativeSize=0.300000) + SizeScale(1)=(RelativeTime=1.000000,RelativeSize=0.600000) + StartSizeRange=(X=(Min=50.000000,Max=90.000000),Y=(Min=0.000000,Max=0.000000),Z=(Min=0.000000,Max=0.000000)) + DrawStyle=PTDS_AlphaBlend + Texture=Texture'AW-2004Particles.Weapons.SmokePanels2' + TextureUSubdivisions=4 + TextureVSubdivisions=4 + LifetimeRange=(Min=0.500000,Max=0.800000) + StartVelocityRange=(X=(Min=70.000000,Max=70.000000)) + StartVelocityRadialRange=(Min=-600.000000,Max=-800.000000) + GetVelocityDirectionFrom=PTVD_AddRadial + VelocityScale(0)=(RelativeVelocity=(X=1.000000,Y=1.000000,Z=1.000000)) + VelocityScale(1)=(RelativeTime=0.200000,RelativeVelocity=(X=0.350000,Y=0.350000,Z=0.350000)) + VelocityScale(2)=(RelativeTime=0.500000,RelativeVelocity=(X=0.100000,Y=0.100000,Z=0.100000)) + VelocityScale(3)=(RelativeTime=1.000000) + RespawnDeadParticles=False + AutomaticInitialSpawning=False + ParticlesPerSecond=50 + InitialParticlesPerSecond=50 + Name="SpriteEmitter0" + End Object + Emitters(0)=SpriteEmitter'SpriteEmitter0' + + Begin Object Class=SpriteEmitter Name=SpriteEmitter1 + UseDirectionAs=PTDU_Normal + ProjectionNormal=(X=1.000000,Z=0.000000) + UseColorScale=True + SpinParticles=True + UseSizeScale=True + UseRegularSizeScale=False + UniformSize=True + ColorScale(1)=(RelativeTime=0.450000,Color=(B=128,G=128,R=128)) + ColorScale(2)=(RelativeTime=0.550000,Color=(B=128,G=128,R=128)) + ColorScale(3)=(RelativeTime=1.000000) + Opacity=0.2500000 + StartLocationOffset=(Z=6.000000) + CoordinateSystem=PTCS_Relative + MaxParticles=3 + StartSpinRange=(X=(Max=1.000000)) + SizeScale(0)=(RelativeSize=0.500000) + SizeScale(1)=(RelativeTime=1.000000,RelativeSize=2.500000) + StartSizeRange=(X=(Min=25.000000,Max=30.000000)) + Texture=Texture'AW-2004Particles.SmallBang' + LifetimeRange=(Min=0.300000,Max=0.300000) + AutomaticInitialSpawning=true + Name="SpriteEmitter1" + End Object + Emitters(1)=SpriteEmitter'SpriteEmitter1' +} diff --git a/Classes/EONSLocustJumpEffect.uc b/Classes/EONSLocustJumpEffect.uc new file mode 100644 index 0000000..3f4d0a5 --- /dev/null +++ b/Classes/EONSLocustJumpEffect.uc @@ -0,0 +1,72 @@ +//=========================================================== +// EONS-Locust Hoverboard by Wail of Suicide +// Please contact me before using any of this code in your own maps/mutators. +// Contact: wailofsuicide@gmail.com or www.wailofsuicide.com - Comments and suggestions welcome. +//=========================================================== + +class EONSLocustJumpEffect extends Emitter; + +defaultproperties +{ + Begin Object Class=MeshEmitter Name=MeshEmitter14 + StaticMesh=StaticMesh'ONSWeapons-SM.PC_MantaJumpBlast' + UseMeshBlendMode=False + RenderTwoSided=True + UseColorScale=True + RespawnDeadParticles=False + SpinParticles=True + UseSizeScale=True + UseRegularSizeScale=False + AutomaticInitialSpawning=False + Acceleration=(Z=-50.000000) + ColorScale(1)=(RelativeTime=0.250000,Color=(B=255,G=255,R=255)) + ColorScale(2)=(RelativeTime=1.000000) + Opacity=0.500000 + CoordinateSystem=PTCS_Relative + MaxParticles=2 + StartLocationOffset=(X=50.000000,Z=-20.000000) + SpinsPerSecondRange=(X=(Min=0.750000,Max=1.000000)) + StartSpinRange=(X=(Max=1.000000)) + SizeScale(0)=(RelativeSize=0.700000) + SizeScale(1)=(RelativeTime=1.000000,RelativeSize=0.850000) + StartSizeRange=(X=(Min=0.400000),Y=(Min=0.400000),Z=(Min=0.500000,Max=1.500000)) + InitialParticlesPerSecond=50.000000 + DrawStyle=PTDS_Brighten + LifetimeRange=(Min=0.500000,Max=0.750000) + End Object + Emitters(0)=MeshEmitter'MeshEmitter14' + + Begin Object Class=MeshEmitter Name=MeshEmitter15 + StaticMesh=StaticMesh'ONSWeapons-SM.PC_MantaJumpBlast' + UseMeshBlendMode=False + RenderTwoSided=True + UseColorScale=True + RespawnDeadParticles=False + SpinParticles=True + UseSizeScale=True + UseRegularSizeScale=False + AutomaticInitialSpawning=False + Acceleration=(Z=-50.000000) + ColorScale(1)=(RelativeTime=0.250000,Color=(B=255,G=255,R=255)) + ColorScale(2)=(RelativeTime=1.000000) + Opacity=0.500000 + CoordinateSystem=PTCS_Relative + MaxParticles=2 + StartLocationOffset=(X=-50.000000,Z=-20.000000) + SpinsPerSecondRange=(X=(Min=0.750000,Max=1.000000)) + StartSpinRange=(X=(Max=1.000000)) + SizeScale(0)=(RelativeSize=0.700000) + SizeScale(1)=(RelativeTime=1.000000,RelativeSize=0.850000) + StartSizeRange=(X=(Min=0.400000),Y=(Min=0.400000),Z=(Min=0.500000,Max=1.500000)) + InitialParticlesPerSecond=50.000000 + DrawStyle=PTDS_Brighten + LifetimeRange=(Min=0.500000,Max=0.750000) + End Object + Emitters(1)=MeshEmitter'MeshEmitter15' + + AutoDestroy=True + CullDistance=5000.000000 + bNoDelete=False + Physics=PHYS_Trailer + bHardAttach=True +} diff --git a/Classes/EONSLocustThrusterEffectBlue.uc b/Classes/EONSLocustThrusterEffectBlue.uc new file mode 100644 index 0000000..6de941c --- /dev/null +++ b/Classes/EONSLocustThrusterEffectBlue.uc @@ -0,0 +1,58 @@ +class EONSLocustThrusterEffectBlue extends Emitter; + +defaultproperties +{ + Begin Object Class=SpriteEmitter Name=SpriteEmitter0 + UseColorScale=True + FadeOut=True + SpinParticles=True + UseSizeScale=True + UseRegularSizeScale=False + UniformSize=True + ColorScale(0)=(Color=(B=96,G=160,R=255)) + ColorScale(1)=(RelativeTime=0.500000,Color=(B=255,G=128,R=48)) + ColorScale(2)=(RelativeTime=0.900000,Color=(B=255,G=128,R=48)) + ColorScale(3)=(RelativeTime=1.000000) + CoordinateSystem=PTCS_Relative + MaxParticles=12 + StartSpinRange=(X=(Max=1.000000)) + SizeScale(0)=(RelativeSize=1.000000) + SizeScale(1)=(RelativeTime=0.150000,RelativeSize=4.000000) + SizeScale(2)=(RelativeTime=0.500000,RelativeSize=2.500000) + SizeScale(3)=(RelativeTime=1.000000,RelativeSize=1.000000) + StartSizeRange=(X=(Min=1.250000,Max=2.500000)) + InitialParticlesPerSecond=2000.000000 + Texture=Texture'EpicParticles.Flares.FlashFlare1' + SecondsBeforeInactive=0.000000 + LifetimeRange=(Min=0.500000,Max=0.500000) + StartVelocityRange=(X=(Min=-47.000000,Max=-47.000000)) + End Object + Emitters(0)=SpriteEmitter'SpriteEmitter0' + + Begin Object Class=SpriteEmitter Name=SpriteEmitter1 + UseColorScale=True + SpinParticles=True + UniformSize=True + AutomaticInitialSpawning=False + ColorScale(1)=(RelativeTime=0.330000,Color=(B=220,G=112,R=64,A=255)) + ColorScale(2)=(RelativeTime=0.660000,Color=(B=220,G=112,R=64,A=255)) + ColorScale(3)=(RelativeTime=1.000000) + Opacity=0.660000 + CoordinateSystem=PTCS_Relative + MaxParticles=1 + SpinCCWorCW=(X=0.000000,Y=0.000000,Z=0.000000) + SpinsPerSecondRange=(X=(Min=0.050000,Max=0.050000)) + StartSpinRange=(X=(Max=1.000000)) + StartSizeRange=(X=(Min=9.000000,Max=16.000000)) + InitialParticlesPerSecond=10.000000 + DrawStyle=PTDS_Brighten + Texture=Texture'AS_FX_TX.Flares.Laser_Flare' + SecondsBeforeInactive=0.000000 + LifetimeRange=(Min=1.000000,Max=2.000000) + End Object + Emitters(1)=SpriteEmitter'SpriteEmitter1' + + bNoDelete=false + bHardAttach=true + AutoDestroy=true +} \ No newline at end of file diff --git a/Classes/EONSLocustThrusterEffectRed.uc b/Classes/EONSLocustThrusterEffectRed.uc new file mode 100644 index 0000000..b804575 --- /dev/null +++ b/Classes/EONSLocustThrusterEffectRed.uc @@ -0,0 +1,58 @@ +class EONSLocustThrusterEffectRed extends Emitter; + +defaultproperties +{ + Begin Object Class=SpriteEmitter Name=SpriteEmitter0 + UseColorScale=True + FadeOut=True + SpinParticles=True + UseSizeScale=True + UseRegularSizeScale=False + UniformSize=True + ColorScale(0)=(Color=(B=96,G=160,R=255)) + ColorScale(1)=(RelativeTime=0.500000,Color=(B=48,G=128,R=255)) + ColorScale(2)=(RelativeTime=0.900000,Color=(B=48,G=128,R=255)) + ColorScale(3)=(RelativeTime=1.000000) + CoordinateSystem=PTCS_Relative + MaxParticles=12 + StartSpinRange=(X=(Max=1.000000)) + SizeScale(0)=(RelativeSize=1.000000) + SizeScale(1)=(RelativeTime=0.150000,RelativeSize=4.000000) + SizeScale(2)=(RelativeTime=0.500000,RelativeSize=2.500000) + SizeScale(3)=(RelativeTime=1.000000,RelativeSize=1.000000) + StartSizeRange=(X=(Min=1.250000,Max=2.500000)) //0.625, 1.25 + InitialParticlesPerSecond=2000.000000 + Texture=Texture'EpicParticles.Flares.FlashFlare1' + SecondsBeforeInactive=0.000000 + LifetimeRange=(Min=0.500000,Max=0.500000) + StartVelocityRange=(X=(Min=-47.000000,Max=-47.000000)) //23.5 + End Object + Emitters(0)=SpriteEmitter'SpriteEmitter0' + + Begin Object Class=SpriteEmitter Name=SpriteEmitter1 + UseColorScale=True + SpinParticles=True + UniformSize=True + AutomaticInitialSpawning=False + ColorScale(1)=(RelativeTime=0.330000,Color=(B=64,G=112,R=220,A=255)) + ColorScale(2)=(RelativeTime=0.660000,Color=(B=64,G=112,R=220,A=255)) + ColorScale(3)=(RelativeTime=1.000000) + Opacity=0.660000 + CoordinateSystem=PTCS_Relative + MaxParticles=1 + SpinCCWorCW=(X=0.000000,Y=0.000000,Z=0.000000) + SpinsPerSecondRange=(X=(Min=0.050000,Max=0.050000)) + StartSpinRange=(X=(Max=1.000000)) + StartSizeRange=(X=(Min=9.000000,Max=16.000000)) //4.5, 8 + InitialParticlesPerSecond=10.000000 + DrawStyle=PTDS_Brighten + Texture=Texture'AS_FX_TX.Flares.Laser_Flare' + SecondsBeforeInactive=0.000000 + LifetimeRange=(Min=1.000000,Max=2.000000) + End Object + Emitters(1)=SpriteEmitter'SpriteEmitter1' + + bNoDelete=false + bHardAttach=true + AutoDestroy=true +} \ No newline at end of file diff --git a/Classes/Emitter_ViperDust.uc b/Classes/Emitter_ViperDust.uc deleted file mode 100644 index bf0fb0d..0000000 --- a/Classes/Emitter_ViperDust.uc +++ /dev/null @@ -1,40 +0,0 @@ -class Emitter_ViperDust extends ONSHoverBikeHoverDust; - -simulated function UpdateHoverDust(bool bActive, float HoverHeight) -{ - local float Force; - - Force = 1 - HoverHeight; - - if(!bActive) - { - Emitters[0].ParticlesPerSecond = 0; - Emitters[0].InitialParticlesPerSecond = 0; - Emitters[1].Disabled = true; - return; - } - else - { - Emitters[0].ParticlesPerSecond = 5; // 100 - Emitters[0].InitialParticlesPerSecond = 5; // 100 - Emitters[0].AllParticlesDead = false; - //Emitters[1].Disabled = (Level.DetailMode == DM_Low); - Emitters[1].Disabled = true; - } - - // Dust - Emitters[0].StartVelocityRadialRange.Min = -325 + (Force * -100); // -650 + (Force * -100) - Emitters[0].StartVelocityRadialRange.Max = Emitters[0].StartVelocityRadialRange.Min - 100; - - Emitters[0].StartLocationPolarRange.Z.Min = 10 + (HoverHeight * 30); - Emitters[0].StartLocationPolarRange.Z.Max = Emitters[0].StartLocationPolarRange.Z.Min; -} - -simulated function SetDustColor(color DustColor) -{ - Super.SetDustColor(DustColor); - - // Reduce opacity. - Emitters[0].ColorScale[1].Color.A = 200; - Emitters[0].ColorScale[2].Color.A = 200; -} \ No newline at end of file diff --git a/Classes/EnergyShield.uc b/Classes/EnergyShield.uc deleted file mode 100644 index be8c069..0000000 --- a/Classes/EnergyShield.uc +++ /dev/null @@ -1,55 +0,0 @@ -//============================================================ -// Shield generator (spawns a shield to protect from damage). -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class EnergyShield extends DeployableMine; - -#exec audio import group=ShieldSounds file=..\Sounds\UT3Nightshade\Shield\Shield_Open.wav -#exec audio import group=ShieldSounds file=..\Sounds\UT3Nightshade\Shield\Shield_Close.wav - -/* */ -var Shield ShieldActor; -/* */ -var Sound OpenSnd; -/* */ -var Sound CloseSnd; - -simulated function Deploy() -{ - Super.Deploy(); - - PlayAnim('Deploy'); - PlaySound(OpenSnd, SLOT_None); - - ShieldActor = Spawn(class'Shield', self,, Location); - ShieldActor.SetCollision(true, false); - ShieldActor.BaseMine = self; - bCollideWorld = false; -} -simulated event Destroyed() -{ - Super.Destroyed(); - ShieldActor.Destroy(); - - if (Role == ROLE_Authority) - { - PlaySound(CloseSnd, SLOT_None); - } -} - -DefaultProperties -{ - Mesh = SkeletalMesh'UT3NightshadeAnims.ShieldMine'; - DrawType = DT_Mesh; - - bHardAttach = true; - bBlockActors = false; - bAlwaysRelevant = true; - LifeSpan = 90.0; - - // Sound. - OpenSnd = Sound'UT3Nightshade.ShieldSounds.Shield_Open'; - CloseSnd = Sound'UT3Nightshade.ShieldSounds.Shield_Close'; -} diff --git a/Classes/HUDItem.uc b/Classes/HUDItem.uc deleted file mode 100644 index 2ea5078..0000000 --- a/Classes/HUDItem.uc +++ /dev/null @@ -1,24 +0,0 @@ -//============================================================ -// HUD item, used to display available mines. -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class HUDItem extends Actor; - -/* The color to drawn the image with. */ -var Color DrawColor; -/* Position of where the image will be drawn. */ -var float PosX, PosY; -/* The image that will be drawn */ -var Texture Icon; -/* The scale that the image will be drawn with. */ -var float Scale; - -DefaultProperties -{ - DrawColor = (R=255,G=255,B=255,A=255); - PosX = 0.0; - PosY = 0.0; - Scale = 1.0; -} diff --git a/Classes/Inv_Ejection.uc b/Classes/Inv_Ejection.uc deleted file mode 100644 index 15d95e6..0000000 --- a/Classes/Inv_Ejection.uc +++ /dev/null @@ -1,15 +0,0 @@ -//============================================================ -// Ejection Invunerability -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class Inv_Ejection extends Armor; - -DefaultProperties -{ - ProtectionType=Class'UT3Viper.DmgType_SelfDestruct'; - AbsorptionPriority=99; - Charge=30; - LifeSpan=10.0; -} diff --git a/Classes/Inv_SelfDestruct.uc b/Classes/Inv_SelfDestruct.uc deleted file mode 100644 index 0a2bd3e..0000000 --- a/Classes/Inv_SelfDestruct.uc +++ /dev/null @@ -1,16 +0,0 @@ -//============================================================ -// Self Destruct Invunerability -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class Inv_SelfDestruct extends Armor; - -DefaultProperties -{ - ProtectionType=Class'UT3Viper.DmgType_SelfDestruct'; - ArmorAbsorption=100; - AbsorptionPriority=100; - Charge=400; - LifeSpan=1.0; -} diff --git a/Classes/MutUT3Hoverboards.uc b/Classes/MutUT3Hoverboards.uc new file mode 100644 index 0000000..4ac243c --- /dev/null +++ b/Classes/MutUT3Hoverboards.uc @@ -0,0 +1,83 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class MutUT3Hoverboards extends Mutator; + +var bool bHasInteraction; //GE: True if a player owns an Interaction object + +simulated function Tick(float DeltaTime) +{ + local PlayerController PC; + + //UEWiki: If the player has an interaction already, exit function. + if (bHasInteraction || !Level.Game.bAllowVehicles) + Return; + PC = Level.GetLocalPlayerController(); + + //UEWiki: Run a check to see whether this mutator should create an interaction for the player + if ( PC != None && !PC.PlayerReplicationInfo.bIsSpectator ) + { + PC.Player.InteractionMaster.AddInteraction(string(class'UT3HoverboardInteraction'), PC.Player); //UEWiki: Create the interaction + bHasInteraction = True; //UEWiki: Set the variable so this lot isn't called again + } +} + +function ModifyPlayer(Pawn Other) +{ + local KarmaParams KP; + local RagdollInventory RI; + if(xPawn(Other) != none) + { + RI = Spawn(class'UT3RagdollInventory', Other); + RI.GiveTo(Other); + KP = KarmaParams(Other.KParams); + if(KP != none) + KP.bClientOnly = false; + } + Super.ModifyPlayer(Other); +} + +defaultproperties +{ + FriendlyName = "UT3 Hoverboards" + Description = "Allows using hoverboards in vehicular gametypes (press the translocator button to mount)." + GroupName = "Translocator" + RemoteRole = ROLE_SimulatedProxy //GE: Needed for Interactions. + bAlwaysRelevant = true //GE: Needed for Interactions. +} diff --git a/Classes/MutUT3NecrisVehicles.uc b/Classes/MutUT3NecrisVehicles.uc new file mode 100644 index 0000000..e70d2ba --- /dev/null +++ b/Classes/MutUT3NecrisVehicles.uc @@ -0,0 +1,127 @@ +/* + * Copyright © 2008 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class MutUT3NecrisVehicles extends Mutator; + +//var bool bHasInteraction; //GE: True if a player owns an Interaction object + +/** +Modifies vehicle factories that originally spawn Onslaught vehicles to spawn +the corresponding UT3 vehicles instead. +*/ +function bool CheckReplacement(Actor Other, out byte bSuperRelevant) +{ + local SVehicleFactory Factory; + + if (SVehicleFactory(Other) != None) { + Factory = SVehicleFactory(Other); + switch (Factory.VehicleClass) { + case class'ONSMobileAssaultStation': + Factory.VehicleClass = class'UT3Leviathan'; + break; + case class'ONSAttackCraft': + Factory.VehicleClass = class'UT3Fury'; + break; + + + case class'ONSArtillery': + Factory.VehicleClass = class'UT3Nightshade'; + break; + case class'ONSDualAttackCraft': + Factory.VehicleClass = class'UT3Fury'; + break; + case class'ONSShockTank': + Factory.VehicleClass = class'UT3Paladin'; + break; + case class'ONSRV': + Factory.VehicleClass = class'UT3Scorpion'; + break; + case class'ONSHoverTank': + Factory.VehicleClass = class'UT3Goliath'; + break; + case class'ONSHoverBike': + Factory.VehicleClass = class'UT3Viper'; + break; + case class'ONSPRV': + Factory.VehicleClass = class'UT3Stealthbender'; + break; + } + } + return Super.CheckReplacement(Other, bSuperRelevant); +} + +/* +=========== +GE: Spawn an Interaction. UT3 vehicles tend to use special keys, and this is +a great way of replicating such behavioiur. See UT3Scorpion for a use example. +GEm: No they don't, they use Rise and KDriverLeave you dummy +=========== +*/ + +/*simulated function Tick(float DeltaTime) +{ + local PlayerController PC; + + //UEWiki: If the player has an interaction already, exit function. + if (bHasInteraction) + Return; + PC = Level.GetLocalPlayerController(); + + //UEWiki: Run a check to see whether this mutator should create an interaction for the player + if ( PC != None && !PC.PlayerReplicationInfo.bIsSpectator ) //TODO !!GE: if PC.Pawn.IsA('UT3Scorpion') + { + // PC.Player.InteractionMaster.AddInteraction("UT3Style.UT3ScorpionInteraction", PC.Player); //UEWiki: Create the interaction + bHasInteraction = True; //UEWiki: Set the variable so this lot isn't called again + } +}*/ + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + FriendlyName = "UT3 Necris Vehicles (experimental)" + Description = "Replaces UT2004 vehicles with versions similar to their UT3 Necris counterparts. This is just a preview, they are not yet ready for prime time." + GroupName = "VehicleArena" + //RemoteRole=ROLE_SimulatedProxy //GE: Needed for Interactions. + //bAlwaysRelevant=true //GE: Needed for Interactions. +} diff --git a/Classes/MutUT3Vehicles.uc b/Classes/MutUT3Vehicles.uc new file mode 100644 index 0000000..3191f9e --- /dev/null +++ b/Classes/MutUT3Vehicles.uc @@ -0,0 +1,127 @@ +/* + * Copyright © 2008 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class MutUT3Vehicles extends Mutator; + +//var bool bHasInteraction; //GE: True if a player owns an Interaction object + +/** +Modifies vehicle factories that originally spawn Onslaught vehicles to spawn +the corresponding UT3 vehicles instead. +*/ +function bool CheckReplacement(Actor Other, out byte bSuperRelevant) +{ + local SVehicleFactory Factory; + + if (SVehicleFactory(Other) != None) { + Factory = SVehicleFactory(Other); + switch (Factory.VehicleClass) { + case class'ONSMobileAssaultStation': + Factory.VehicleClass = class'UT3Leviathan'; + break; + case class'ONSAttackCraft': + Factory.VehicleClass = class'UT3Raptor'; + break; + + + case class'ONSArtillery': + Factory.VehicleClass = class'UT3HellfireSPMA'; + break; + case class'ONSDualAttackCraft': + Factory.VehicleClass = class'UT3Cicada'; + break; + case class'ONSShockTank': + Factory.VehicleClass = class'UT3Paladin'; + break; + case class'ONSRV': + Factory.VehicleClass = class'UT3Scorpion'; + break; + case class'ONSHoverTank': + Factory.VehicleClass = class'UT3Goliath'; + break; + case class'ONSHoverBike': + Factory.VehicleClass = class'UT3Manta'; + break; + case class'ONSPRV': + Factory.VehicleClass = class'UT3Hellbender'; + break; + } + } + return Super.CheckReplacement(Other, bSuperRelevant); +} + +/* +=========== +GE: Spawn an Interaction. UT3 vehicles tend to use special keys, and this is +a great way of replicating such behavioiur. See UT3Scorpion for a use example. +GEm: No they don't, they use Rise and KDriverLeave you dummy +=========== +*/ + +/*simulated function Tick(float DeltaTime) +{ + local PlayerController PC; + + //UEWiki: If the player has an interaction already, exit function. + if (bHasInteraction) + Return; + PC = Level.GetLocalPlayerController(); + + //UEWiki: Run a check to see whether this mutator should create an interaction for the player + if ( PC != None && !PC.PlayerReplicationInfo.bIsSpectator ) //TODO !!GE: if PC.Pawn.IsA('UT3Scorpion') + { + // PC.Player.InteractionMaster.AddInteraction("UT3Style.UT3ScorpionInteraction", PC.Player); //UEWiki: Create the interaction + bHasInteraction = True; //UEWiki: Set the variable so this lot isn't called again + } +}*/ + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + FriendlyName = "UT3 Vehicles" + Description = "Replaces UT2004 vehicles with versions similar to their UT3 Axon counterparts." + GroupName = "VehicleArena" + //RemoteRole=ROLE_SimulatedProxy //GE: Needed for Interactions. + //bAlwaysRelevant=true //GE: Needed for Interactions. +} diff --git a/Classes/Mut_UT3Fury.uc b/Classes/Mut_UT3Fury.uc~ similarity index 86% rename from Classes/Mut_UT3Fury.uc rename to Classes/Mut_UT3Fury.uc~ index b77e941..7fd124f 100644 --- a/Classes/Mut_UT3Fury.uc +++ b/Classes/Mut_UT3Fury.uc~ @@ -2,6 +2,7 @@ // UT3 Fury Mutator // Credits: 100GPing100(José Luís) // Copytight José Luís, 2012 +// Copyright GreatEmerald, 2014 // Contact: zeluis.100@gmail.com //============================================================ class Mut_UT3Fury extends Mutator; @@ -11,9 +12,9 @@ function bool CheckReplacement(Actor Other, out byte bSuperRelevant) if (SVehicleFactory(Other) != None) { if (SVehicleFactory(Other).VehicleClass == Class'ONSAttackCraft') - SVehicleFactory(Other).VehicleClass = Class'UT3Fury.UT3Fury'; + SVehicleFactory(Other).VehicleClass = Class'UT3Fury'; } - + return Super.CheckReplacement(Other, bSuperRelevant); } @@ -23,7 +24,7 @@ DefaultProperties GroupName="Raptor"; FriendlyName="UT3 Fury"; Description="This mutator replaces the Raptor with the Fury from UT3." - + // Misc. bAlwaysRelevant=true; RemoteRole=ROLE_SimulatedProxy; diff --git a/Classes/Mut_UT3Goliath.uc b/Classes/Mut_UT3Goliath.uc~ similarity index 100% rename from Classes/Mut_UT3Goliath.uc rename to Classes/Mut_UT3Goliath.uc~ diff --git a/Classes/Mut_UT3Hellbender.uc b/Classes/Mut_UT3Hellbender.uc~ similarity index 100% rename from Classes/Mut_UT3Hellbender.uc rename to Classes/Mut_UT3Hellbender.uc~ diff --git a/Classes/Mut_UT3Manta.uc b/Classes/Mut_UT3Manta.uc~ similarity index 100% rename from Classes/Mut_UT3Manta.uc rename to Classes/Mut_UT3Manta.uc~ diff --git a/Classes/Mut_UT3Nemesis.uc b/Classes/Mut_UT3Nemesis.uc~ similarity index 100% rename from Classes/Mut_UT3Nemesis.uc rename to Classes/Mut_UT3Nemesis.uc~ diff --git a/Classes/Mut_UT3Nightshade.uc b/Classes/Mut_UT3Nightshade.uc~ similarity index 86% rename from Classes/Mut_UT3Nightshade.uc rename to Classes/Mut_UT3Nightshade.uc~ index af14cc1..0d533e0 100644 --- a/Classes/Mut_UT3Nightshade.uc +++ b/Classes/Mut_UT3Nightshade.uc~ @@ -2,6 +2,7 @@ // UT3 Nightshade Mutator // Credits: 100GPing100(José Luís) // Copytight José Luís, 2012 +// Copyright GreatEmerald, 2014 // Contact: zeluis.100@gmail.com //============================================================ class Mut_UT3Nightshade extends Mutator; @@ -11,10 +12,10 @@ function bool CheckReplacement(Actor Other, out byte bSuperRelevant) if (SVehicleFactory(Other) != None) { if (SVehicleFactory(Other).VehicleClass == Class'ONSRV') - SVehicleFactory(Other).VehicleClass = Class'UT3Nightshade.UT3Nightshade'; + SVehicleFactory(Other).VehicleClass = Class'UT3Nightshade'; //SVehicleFactory(Other).VehicleClass = Class'UT3Nightshade.UT3Nightshade'; } - + return Super.CheckReplacement(Other, bSuperRelevant); } @@ -24,9 +25,9 @@ DefaultProperties GroupName="Scorpion"; FriendlyName="UT3 Nightshade"; Description="This mutator replaces the Scorpion with the Nightshade from UT3." - + // Misc. bAlwaysRelevant=true; RemoteRole=ROLE_SimulatedProxy; bAddToServerPackages=true; -} \ No newline at end of file +} diff --git a/Classes/Mut_UT3Paladin.uc b/Classes/Mut_UT3Paladin.uc~ similarity index 100% rename from Classes/Mut_UT3Paladin.uc rename to Classes/Mut_UT3Paladin.uc~ diff --git a/Classes/Mut_UT3Raptor.uc b/Classes/Mut_UT3Raptor.uc~ similarity index 100% rename from Classes/Mut_UT3Raptor.uc rename to Classes/Mut_UT3Raptor.uc~ diff --git a/Classes/Mut_UT3SPMA.uc b/Classes/Mut_UT3SPMA.uc~ similarity index 100% rename from Classes/Mut_UT3SPMA.uc rename to Classes/Mut_UT3SPMA.uc~ diff --git a/Classes/Mut_UT3Scorpion.uc b/Classes/Mut_UT3Scorpion.uc~ similarity index 100% rename from Classes/Mut_UT3Scorpion.uc rename to Classes/Mut_UT3Scorpion.uc~ diff --git a/Classes/Mut_UT3StealthBender.uc b/Classes/Mut_UT3StealthBender.uc~ similarity index 100% rename from Classes/Mut_UT3StealthBender.uc rename to Classes/Mut_UT3StealthBender.uc~ diff --git a/Classes/Mut_UT3Viper.uc b/Classes/Mut_UT3Viper.uc~ similarity index 86% rename from Classes/Mut_UT3Viper.uc rename to Classes/Mut_UT3Viper.uc~ index 9b0ab63..d8d3a7a 100644 --- a/Classes/Mut_UT3Viper.uc +++ b/Classes/Mut_UT3Viper.uc~ @@ -2,6 +2,7 @@ // UT3 Viper Mutator // Credits: 100GPing100(José Luís) // Copytight José Luís, 2012 +// Copyright GreatEmerald, 2014 // Contact: zeluis.100@gmail.com //============================================================ class Mut_UT3Viper @@ -12,9 +13,9 @@ function bool CheckReplacement(Actor Other, out byte bSuperRelevant) if (SVehicleFactory(Other) != None) { if (SVehicleFactory(Other).VehicleClass == class'ONSHoverBike') - SVehicleFactory(Other).VehicleClass = class'UT3Viper.UT3Viper'; + SVehicleFactory(Other).VehicleClass = class'UT3Viper'; } - + return Super.CheckReplacement(Other, bSuperRelevant); } @@ -24,7 +25,7 @@ DefaultProperties GroupName="Manta"; FriendlyName="UT3 Viper"; Description="This mutator replaces the Manta with the Viper from UT3." - + // Misc. bAlwaysRelevant=true; RemoteRole=ROLE_SimulatedProxy; diff --git a/Classes/Proj_ViperBolt.uc b/Classes/Proj_ViperBolt.uc deleted file mode 100644 index 2aa09a6..0000000 --- a/Classes/Proj_ViperBolt.uc +++ /dev/null @@ -1,82 +0,0 @@ -//============================================================ -// UT3 Viper Weapon's Projectile -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class Proj_ViperBolt extends ONSPlasmaProjectile; - -#exec audio import group=Sounds file=..\Sounds\UT3Viper\ProjImpact.wav - -/* Sound played on impact and explosion. */ -var Sound ExplosionSound; -/* Number of times it can bounce before exploding. */ -var int Bounces; - - -simulated event HitWall(vector HitNormal, Actor HitWall) -{ - if (HitWall.bCanBeDamaged) { - Explode(Location, HitNormal); - } - - SetPhysics(PHYS_Falling); - if (Bounces > 0) { - PlaySound(ExplosionSound); - Velocity = 0.8 * (Velocity - 2.0 * HitNormal * (Velocity dot HitNormal)); - SetRotation(rotator(Velocity)); - Acceleration = AccelerationMagnitude * Normal(Velocity); - --Bounces; - } else { - Explode(Location, HitNormal); - } -} - -simulated function Explode(vector HitLocation, vector HitNormal) -{ - if (EffectIsRelevant(Location, false)) { - Spawn(HitEffectClass,,, HitLocation + HitNormal * 5, rotator(-HitNormal)); - } - - PlaySound(ExplosionSound); - - Destroy(); -} - -simulated function ProcessTouch(Actor Other, vector HitLocation) -{ - if (Other != Instigator && (Vehicle(Instigator) == None || Vehicle(Instigator).Driver != Other)) - { - TextToSpeech("TAKE THAT!", 1.0); - Other.TakeDamage(Damage, Instigator, HitLocation, Normal(Velocity) * MomentumTransfer, MyDamageType); - Explode(HitLocation, Normal(HitLocation-Other.Location)); - } -} - - -DefaultProperties -{ - // Movement. - Speed=750.0; - MaxSpeed=7000; - AccelerationMagnitude=16000.0; - Bounces=3; - - // Damage. - Damage=36; - DamageRadius=0; - MomentumTransfer=4000; - //MyDamageType=class'UT3Viper.DmgType_ViperBolt'; - - // Sound. - ExplosionSound=Sound'UT3Viper.Sounds.ProjImpact'; - - // Misc. - LifeSpan=1.6; - bBounce=true; - bFixedRotationDir=true; - - // Parent (to be changed). - HitEffectClass=class'Onslaught.ONSPlasmaHitPurple'; - PlasmaEffectClass=class'Onslaught.ONSPurplePlasmaSmallFireEffect'; -} diff --git a/Classes/ProjectileTrailEmitter.uc b/Classes/ProjectileTrailEmitter.uc new file mode 100644 index 0000000..2fdc862 --- /dev/null +++ b/Classes/ProjectileTrailEmitter.uc @@ -0,0 +1,67 @@ +/****************************************************************************** +ProjectileTrailEmitter + +Creation date: 2009-02-18 15:08 +Latest change: $Id$ +Copyright (c) 2009, Wormbo +******************************************************************************/ + +class ProjectileTrailEmitter extends Emitter notplaceable; + + +//============================================================================= +// Properties +//============================================================================= + +struct TVelocitySpawnInfo { +var int EmitterIndex; +var float ParticlesPerUU; +var float _Remainder; +}; + +var() array VelocitySpawnInfo; + +var float SpawnTime; + + +simulated function PostBeginPlay() +{ +SpawnTime = Level.TimeSeconds; +SetBase(Owner); +} + + +simulated function Tick(float DeltaTime) +{ +local int i; +local float LocDiff, NumParticles; + +if (VelocitySpawnInfo.Length > 0 && OldLocation != Location) { +LocDiff = VSize(Location - OldLocation); +do { +if (Level.TimeSeconds - SpawnTime > Emitters[VelocitySpawnInfo[i].EmitterIndex].InitialDelayRange.Min) { +NumParticles = VelocitySpawnInfo[i]._Remainder + LocDiff * VelocitySpawnInfo[i].ParticlesPerUU; +VelocitySpawnInfo[i]._Remainder = NumParticles - int(NumParticles); +Emitters[VelocitySpawnInfo[i].EmitterIndex].SpawnParticle(int(NumParticles)); +} +} until (++i == VelocitySpawnInfo.Length); +} +} + +simulated function Kill() +{ +// prevent spawning additional +VelocitySpawnInfo.Length = 0; +Super.Kill(); +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ +bNoDelete = False +bHardAttach = True +} diff --git a/Classes/Shield.uc b/Classes/Shield.uc deleted file mode 100644 index 766e30d..0000000 --- a/Classes/Shield.uc +++ /dev/null @@ -1,54 +0,0 @@ -//============================================================ -// Shield (The shield generated by the Shield Generator). -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class Shield extends Actor; - -#exec audio import group=ShieldSounds file=..\Sounds\UT3Nightshade\Shield\Shield_Ambient.wav -#exec audio import group=ShieldSounds file=..\Sounds\UT3Nightshade\Shield\Shield_Hit.wav - -/* How much health the shield currently has. */ -var int Health; -/* The mine that is producing this shield. */ -var DeployableMine BaseMine; -/* */ -var Sound HitSnd; - -event TakeDamage(int DamageAmount, Pawn Instigator, vector HitLocation, vector Momentum, class DamageType) -{ - Super.TakeDamage(DamageAmount, Instigator, HitLocation, Momentum, DamageType); - - Health -= DamageAmount; - PlaySound(HitSnd, SLOT_None, 1.5); - - if (Health <= 0) - BaseMine.Destroy(); -} - -DefaultProperties -{ - // Looks. - StaticMesh = StaticMesh'UT3NightshadeSM.Shield'; - DrawType = DT_StaticMesh; - DrawScale = 5.0; - Rotation = (Roll=0); - - // Collision. - bCollideActors = true; - bBlockActors = false; - bBlockZeroExtentTraces = true; - //bBlockNonZeroExtentTraces = false; - bProjTarget = true; - bActorShadows = false; - - // Damage. - Health = 4000; - - // Sound. - AmbientSound = Sound'UT3Nightshade.ShieldSounds.Shield_Ambient'; - HitSnd = Sound'UT3Nightshade.ShieldSounds.Shield_Hit'; - SoundRadius = 250; - SoundVolume = 128; -} diff --git a/Classes/ShieldObject.uc b/Classes/ShieldObject.uc deleted file mode 100644 index 6c43620..0000000 --- a/Classes/ShieldObject.uc +++ /dev/null @@ -1,13 +0,0 @@ -//============================================================ -// Mine object (object that happears in the Nightshade's arm) -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class ShieldObject extends Actor; - -DefaultProperties -{ - Mesh = SkeletalMesh'UT3NightshadeAnims.ShieldMine'; - DrawType = DT_Mesh; -} \ No newline at end of file diff --git a/Classes/SpiderMine.uc b/Classes/SpiderMine.uc deleted file mode 100644 index ff49adf..0000000 --- a/Classes/SpiderMine.uc +++ /dev/null @@ -1,158 +0,0 @@ -//============================================================ -// Spider Mine (spawns spiders to kill close enemies). -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class SpiderMine extends DeployableMine; - - -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\SpiderMine_Active01.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\SpiderMine_Active02.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\SpiderMine_Active03.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\SpiderMine_Drop.wav - - -/* Max range for detecting enemies. */ -var float DetectionRange; -/* */ -var int AvailableMines; -/* */ -var int DeployedMines; -/* */ -var array ActivateSnd; -/* */ -var Sound DropSnd; - - -event Landed(vector HitNormal) -{ - Super.Landed(HitNormal); - SetTimer(0.5, false); - if (Team == 0) - Level.Game.BroadCast(self, "red", 'Say'); - else if (Team == 1) - Level.Game.BroadCast(self, "blue", 'Say'); - else - Level.Game.BroadCast(self, Team, 'Say'); -} -function Deploy() -{ - Super.Deploy(); - PlayAnim('Deploy', 1, 0); -} -function SpawnMine(Pawn Target, vector TargetDir) -{ - // ONSMineProjectile. - local Spider Mine; - local Vector X,Y,Z; - - if (AvailableMines > 0) - { - PlaySound(ActivateSnd[Rand(4) - 1], SLOT_None, 1.0); - GetAxes(Rotation, X,Y,Z); - Mine = Spawn(Class'Spider',,, Location + 25*Z); - if (Mine == None) - { - Mine = Spawn(Class'Spider',,, Location + Vect(0,0, 10)); - } - Mine.Lifeline = self; - Mine.InstigatorController = Instigator.Controller; - Mine.TeamNum = Team; - Mine.TargetPawn = Target; - Mine.KeepTargetExtraRange = FMax(0.f, DetectionRange - Mine.DetectionRange); - Mine.TossZ = 300.0; - Mine.Init(TargetDir); - AvailableMines--; - DeployedMines++; - } -} -function CheckForEnemies() -{ - local Pawn P; - local bool spawnedmine; - - if (Controller != None) - { - if (Controller.Pawn != None) - Instigator = Controller.Pawn; - } - else - { - // Noone to get the kills. - Destroy(); - return; - } - - if (Team != Controller.PlayerReplicationInfo.Team.TeamIndex && Controller.PlayerReplicationInfo.Team != None) - { - // Deployable and controller are not off the same team - // and the controller has no Team info. - Destroy(); - return; - } - - if (AvailableMines + DeployedMines <= 0) - { - // UT3: Out of mines. - // @100GPing100: won't ever be true since the addition - // will allways be the start count of mines. - - // @100GPing100: as I said, it's never true. - Destroy(); - return; - } - - if (!bDeleteMe) - { - spawnedmine = false; - foreach RadiusActors(class'Pawn', P, DetectionRange, Location) - { - if (Vehicle(P) != None) - { - if (Vehicle(P).GetTeamNum() != Team && Vehicle(P).Driver != None && Vehicle(P).Health > 0 && FastTrace(Vehicle(P).Location, Location)) - { - SpawnMine(P, Normal(P.Location - Location)); - SpawnedMine = true; - break; // Only spawn one spider at a time. - } - } - else if (P.GetTeamNum() != Team && P.Health > 0 && FastTrace(P.Location, Location)) - { - SpawnMine(P, Normal(P.Location - Location)); - spawnedmine = true; - break; // Only spawn one spider at a time. - } - } - if (spawnedmine) - SetTimer(1.5, false); - else - SetTimer(0.5, false); - } -} -event Timer() -{ - CheckForEnemies(); -} - - -DefaultProperties -{ - // Looks. - Mesh=SkeletalMesh'UT3NightshadeAnims.SpiderMine'; - DrawType=DT_Mesh; - - // Damage. - DetectionRange=1500.0; - AvailableMines=15; - - // Sound. - ActivateSnd(0) = Sound'UT3Nightshade.SpiderSounds.SpiderMine_Active01'; - ActivateSnd(1) = Sound'UT3Nightshade.SpiderSounds.SpiderMine_Active02'; - ActivateSnd(2) = Sound'UT3Nightshade.SpiderSounds.SpiderMine_Active03'; - DropSnd = Sound'UT3Nightshade.SpiderSounds.SpiderMine_Drop'; - - // Misc. - LifeSpan=150.0; - bOrientOnSlope=true; -} diff --git a/Classes/SpidermineObject.uc b/Classes/SpidermineObject.uc deleted file mode 100644 index 18e3d67..0000000 --- a/Classes/SpidermineObject.uc +++ /dev/null @@ -1,13 +0,0 @@ -//============================================================ -// Mine object (object that happears in the Nightshade's arm) -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class SpidermineObject extends Actor; - -DefaultProperties -{ - Mesh = SkeletalMesh'UT3NightshadeAnims.SpiderMine'; - DrawType = DT_Mesh; -} \ No newline at end of file diff --git a/Classes/StasisFieldObject.uc b/Classes/StasisFieldObject.uc deleted file mode 100644 index 7cc42e5..0000000 --- a/Classes/StasisFieldObject.uc +++ /dev/null @@ -1,13 +0,0 @@ -//============================================================ -// Mine object (object that happears in the Nightshade's arm) -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class StasisFieldObject extends Actor; - -DefaultProperties -{ - Mesh = SkeletalMesh'UT3NightshadeAnims.ShieldMine'; - DrawType = DT_Mesh; -} \ No newline at end of file diff --git a/Classes/UT3Cicada.uc b/Classes/UT3Cicada.uc index 83f1dc6..66ead76 100644 --- a/Classes/UT3Cicada.uc +++ b/Classes/UT3Cicada.uc @@ -1,154 +1,221 @@ -/****************************************************************************** -UT3Cicada - -Creation date: 2008-05-02 20:50 -Last change: Alpha 2 -Copyright (c) 2008 and 2009, Wormbo and GreatEmerald -******************************************************************************/ +/* + * Copyright © 2008, 2014 GreatEmerald + * Copyright © 2008-2009 Wormbo + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3Cicada extends ONSDualAttackCraft; var(Sound) sound TargetLockSound; +var() rotator TrailEffectRotation; //======================= // @100GPing100 /* Holds the name of the animation currently being played. */ var string CurrentAnim; -#exec obj load file=..\Animations\UT3CicadaAnims.ukx +#exec obj load file=..\Animations\UT3VH_Cicada_Anims.ukx #exec obj load file=..\Textures\UT3CicadaTex.utx function Tick(float DeltaTime) { - Super.Tick(DeltaTime); - - AnimateVehicle(); + Super.Tick(DeltaTime); + + AnimateVehicle(); } function AnimateVehicle() { - if (CurrentAnim == "GetIn" && !IsAnimating()) - { - LoopAnim('Idle', 1.0); - CurrentAnim = "Idle"; - } + if (CurrentAnim == "GetIn" && !IsAnimating()) + { + LoopAnim('Idle', 1.0); + CurrentAnim = "Idle"; + } } simulated function DrivingStatusChanged() { - /* Animations list: - ActiveStill [2] - GetIn [90] - GetOut [51] - Idle [201] - InActiveStill [2] - */ - Super.DrivingStatusChanged(); - if (Driver == None) - { - PlayAnim('GetOut', 1.0, 0.2); - CurrentAnim = "GetOut"; - } - else - { - PlayAnim('GetIn', 1.0); - CurrentAnim = "GetIn"; - } + + local vector RotX, RotY, RotZ; + local int i; + + super(ONSChopperCraft).DrivingStatusChanged(); + + if (bDriving && Level.NetMode != NM_DedicatedServer && !bDropDetail) + { + GetAxes(Rotation,RotX,RotY,RotZ); + + if (TrailEffects.Length == 0) + { + TrailEffects.Length = TrailEffectPositions.Length; + + for(i=0;i> Rotation) ); + TrailEffects[i].SetBase(self); + TrailEffects[i].SetRelativeRotation( TrailEffectRotation ); + } + } + } + else + { + if (Level.NetMode != NM_DedicatedServer) + { + for(i=0;i 0.4 ) - { - // Draw the Locked on Symbol - Dir = Canvas.WorldToScreen( LockedTarget ); - scale = float(Canvas.SizeX) / 1600; + if ( (Dir dot X) > 0.4 ) + { + // Draw the Locked on Symbol + Dir = Canvas.WorldToScreen( LockedTarget ); + scale = float(Canvas.SizeX) / 1600; - // new Stuff + // new Stuff - Canvas.SetDrawColor( 64,255,64,Value(SpinFade[0]) ); - CenterDraw(Canvas, SpinCircles[0], Dir.X, Dir.Y, Value(SpinScale[0])*Scale, Value(SpinScale[0])*Scale ); - Canvas.SetDrawColor(64,255,64,Value(SpinFade[1]) ); - CenterDraw(Canvas, SpinCircles[1], Dir.X, Dir.Y, Value(SpinScale[1])*Scale, Value(SpinScale[1])*Scale ); + Canvas.SetDrawColor( 64,255,64,Value(SpinFade[0]) ); + CenterDraw(Canvas, SpinCircles[0], Dir.X, Dir.Y, Value(SpinScale[0])*Scale, Value(SpinScale[0])*Scale ); + Canvas.SetDrawColor(64,255,64,Value(SpinFade[1]) ); + CenterDraw(Canvas, SpinCircles[1], Dir.X, Dir.Y, Value(SpinScale[1])*Scale, Value(SpinScale[1])*Scale ); - Canvas.SetDrawColor(128,255,128,Value(BracketFade)); - DrawBrackets(Canvas,Dir.X,Dir.Y,Scale); - DrawMissiles(Canvas,Dir.X,Dir.Y,Scale); + Canvas.SetDrawColor(128,255,128,Value(BracketFade)); + DrawBrackets(Canvas,Dir.X,Dir.Y,Scale); + DrawMissiles(Canvas,Dir.X,Dir.Y,Scale); - } - } + } + } - bLastLockType = bIsLocked; + bLastLockType = bIsLocked; - HudMissileCount.Tints[0] = H.HudColorRed; - HudMissileCount.Tints[1] = H.HudColorBlue; + HudMissileCount.Tints[0] = H.HudColorRed; + HudMissileCount.Tints[1] = H.HudColorBlue; - H.DrawSpriteWidget( Canvas, HudMissileCount ); - H.DrawSpriteWidget( Canvas, HudMissileIcon ); - HudMissileDigits.Value = ONSDualACSideGun(Weapons[0]).LoadedShotCount; - H.DrawNumericWidget(Canvas, HudMissileDigits, DigitsBig); + H.DrawSpriteWidget( Canvas, HudMissileCount ); + H.DrawSpriteWidget( Canvas, HudMissileIcon ); + HudMissileDigits.Value = ONSDualACSideGun(Weapons[0]).LoadedShotCount; + H.DrawNumericWidget(Canvas, HudMissileDigits, DigitsBig); - if (WeaponPawns[0]!=none && WeaponPawns[0].PlayerReplicationInfo!=None) - { - CoPilot = WeaponPawns[0].PlayerReplicationInfo.PlayerName; - Canvas.Font = H.GetMediumFontFor(Canvas); - Canvas.Strlen(CoPilot,xl,yl); - posy = Canvas.ClipY*0.7; - Canvas.SetPos(Canvas.ClipX-xl-5, posy); - Canvas.SetDrawColor(255,255,255,255); - Canvas.DrawText(CoPilot); + if (WeaponPawns[0]!=none && WeaponPawns[0].PlayerReplicationInfo!=None) + { + CoPilot = WeaponPawns[0].PlayerReplicationInfo.PlayerName; + Canvas.Font = H.GetMediumFontFor(Canvas); + Canvas.Strlen(CoPilot,xl,yl); + posy = Canvas.ClipY*0.7; + Canvas.SetPos(Canvas.ClipX-xl-5, posy); + Canvas.SetDrawColor(255,255,255,255); + Canvas.DrawText(CoPilot); - Canvas.Font = H.GetConsoleFont(Canvas); + Canvas.Font = H.GetConsoleFont(Canvas); Canvas.StrLen(CoPilotLabel,xl,yl); Canvas.SetPos(Canvas.ClipX-xl-5,posy-5-yl); - Canvas.SetDrawColor(160,160,160,255); - Canvas.DrawText(CoPilotLabel); - } + Canvas.SetDrawColor(160,160,160,255); + Canvas.DrawText(CoPilotLabel); + } } @@ -158,40 +225,75 @@ simulated function DrawHUD(Canvas Canvas) //GE: Lock-on sound defaultproperties { - //======================= - // @100GPing100 - VehiclePositionString = "in a UT3 Cicada"; - - Mesh = SkeletalMesh'UT3CicadaAnims.Cicada'; - RedSkin = Shader'UT3CicadaTex.CicadaSkin'; - BlueSkin = Shader'UT3CicadaTex.CicadaSkinBlue'; - - DriverWeapons(0)=(WeaponClass=class'UT3CicadaMissileLauncher',WeaponBone=Rt_Gun_Pitch); - DriverWeapons(1)=(WeaponClass=class'UT3CicadaMissileLauncher',WeaponBone=Lt_Gun_Pitch); - PassengerWeapons(0)=(WeaponPawnClass=Class'UT3CicadaTurretPawn',WeaponBone="GatlingGunAttach") - // @100GPing100 - //==========END========== - VehicleNameString = "UT3 Cicada" - - GroundSpeed=2000 - CollisionHeight=70.000000 - //DriverWeapons(0)=(WeaponClass=class'UT3CicadaMissileLauncher',WeaponBone=RightRLAttach); - //DriverWeapons(1)=(WeaponClass=class'UT3CicadaMissileLauncher',WeaponBone=LeftRLAttach); - TargetLockSound=sound'UT3Vehicles.Cicada.Cicada_TargetLock01' - IdleSound=Sound'UT3Vehicles.Cicada.Cicada_EngineLoop02' - StartUpSound=Sound'UT3Vehicles.Cicada.Cicada_Start01' - ShutDownSound=Sound'UT3Vehicles.Cicada.Cicada_Stop01'//8/10 - ExplosionSounds(0)=Sound'UT3Vehicles.Cicada.Cicada_Explode02' - ExplosionSounds(1)=Sound'UT3Vehicles.Cicada.Cicada_Explode02' - ExplosionSounds(2)=Sound'UT3Vehicles.Cicada.Cicada_Explode02' - ExplosionSounds(3)=Sound'UT3Vehicles.Cicada.Cicada_Explode02' - ExplosionSounds(4)=Sound'UT3Vehicles.Cicada.Cicada_Explode02' - ImpactDamageSounds(0)=Sound'UT3Vehicles.Cicada.Cicada_Collide' - ImpactDamageSounds(1)=Sound'UT3Vehicles.Cicada.Cicada_Collide' - ImpactDamageSounds(2)=Sound'UT3Vehicles.Cicada.Cicada_Collide' - ImpactDamageSounds(3)=Sound'UT3Vehicles.Cicada.Cicada_Collide' - ImpactDamageSounds(4)=Sound'UT3Vehicles.Cicada.Cicada_Collide' - ImpactDamageSounds(5)=Sound'UT3Vehicles.Cicada.Cicada_Collide' - ImpactDamageSounds(6)=Sound'UT3Vehicles.Cicada.Cicada_Collide' - //PassengerWeapons(0)=(WeaponPawnClass=Class'UT3CicadaTurretPawn',WeaponBone="GatlingGunAttach") + //======================= + // @100GPing100 + VehiclePositionString = "in a UT3 Cicada"; + + Mesh = SkeletalMesh'UT3VH_Cicada_Anims.VH_Cicada_Anims'; + RedSkin = Shader'UT3CicadaTex.CicadaSkin'; + BlueSkin = Shader'UT3CicadaTex.CicadaSkinBlue'; + + DriverWeapons(0)=(WeaponClass=class'UT3CicadaMissileLauncher',WeaponBone=Rt_Gun_Yaw); + DriverWeapons(1)=(WeaponClass=class'UT3CicadaMissileLauncherLeft',WeaponBone=Lt_Gun_Yaw); + PassengerWeapons(0)=(WeaponPawnClass=Class'UT3CicadaTurretPawn',WeaponBone=MainTurret_Yaw) + // @100GPing100 + //==========END========== + VehicleNameString = "UT3 Cicada" + + GroundSpeed=1600 + MaxRandForce=2.0 + RandForceInterval=0.95 + RollTorqueMax=60 //100 + RollTorqueStrafeFactor=130 //100 + RollTorqueTurnFactor=250 //750 + RollDamping=100.0 //30.0 + PitchTorqueFactor=50.0 //200.0 + PitchTorqueMax=20.0 //35.0 + TurnTorqueFactor=600.0 + TurnTorqueMax=220.0 //200.0 + TurnDamping=65.0 //50.0 + MaxYawRate=1.8 //1.5 + MaxRiseForce=130.0 //200 + UpDamping=0.08 //0.05 + MaxStrafeForce=45.0 //65.0 + LatDamping=0.08 //0.05 + MaxThrustForce=80.0 //80.0 + LongDamping=0.8 //0.3 + CollisionHeight=70.000000 + //DriverWeapons(0)=(WeaponClass=class'UT3CicadaMissileLauncher',WeaponBone=RightRLAttach); + //DriverWeapons(1)=(WeaponClass=class'UT3CicadaMissileLauncher',WeaponBone=LeftRLAttach); + TargetLockSound=sound'UT3A_Vehicle_Cicada.Sounds.A_Vehicle_Cicada_TargetLock01' + IdleSound=Sound'UT3A_Vehicle_Cicada.Sounds.A_Vehicle_Cicada_EngineLoop02' + StartUpSound=Sound'UT3A_Vehicle_Cicada.Sounds.A_Vehicle_Cicada_Start01' + ShutDownSound=Sound'UT3A_Vehicle_Cicada.Sounds.A_Vehicle_Cicada_Stop01'//8/10 + ImpactDamageMult = 0.00003 //0.0003 + DamagedEffectHealthSmokeFactor=0.65 //0.5 + DamagedEffectHealthFireFactor=0.40 //0.25 + DamagedEffectFireDamagePerSec=2.0 //0.75 + ExplosionSounds=() + ExplosionSounds(0)=Sound'UT3A_Vehicle_Cicada.Sounds.A_Vehicle_Cicada_Explode02' + ImpactDamageSounds=() + ImpactDamageSounds(0)=Sound'UT3A_Vehicle_Cicada.SoundCues.A_Vehicle_Cicada_Collide' + //PassengerWeapons(0)=(WeaponPawnClass=Class'UT3CicadaTurretPawn',WeaponBone="GatlingGunAttach") + + ExitPositions(0)=(X=80,Y=-200,Z=25) + ExitPositions(1)=(X=80,Y=200,Z=25) + ExitPositions(2)=(X=-220,Y=0,Z=25) + + TrailEffectRotation=(Yaw=32768) + TrailEffectPositions(0)=(X=-40,Y=-33,Z=90) //(X=-53,Y=-33,Z=63) + TrailEffectPositions(1)=(X=-40,Y=33,Z=90) + + MomentumMult=0.400000 //? + + HeadlightCoronaOffset(0)=(X=185,Y=0,Z=50.5) + HeadlightCoronaOffset(1)=(X=-29,Y=-0,Z=-36.5) + HeadlightCoronaMaterial=Material'EmitterTextures.Flares.EFlareOY' + HeadlightCoronaMaxSize=45 + + HeadlightProjectorOffset=(X=142.0,Y=0,Z=-10.5) //(X=82.5,Y=0,Z=55.5) + HeadlightProjectorRotation=(Yaw=0,Pitch=-1000,Roll=0) + HeadlightProjectorMaterial=Texture'VMVehicles-TX.NewPRVGroup.PRVProjector' + HeadlightProjectorScale=0.40 //0.65 + } diff --git a/Classes/UT3CicadaMissileLauncher.uc b/Classes/UT3CicadaMissileLauncher.uc index 6e50fdf..d2c950a 100644 --- a/Classes/UT3CicadaMissileLauncher.uc +++ b/Classes/UT3CicadaMissileLauncher.uc @@ -1,8 +1,42 @@ -//----------------------------------------------------------- -// UT3 Cicada Missile Launcher -// Last change: Alpha 2 -// 2009, GreatEmerald -//----------------------------------------------------------- +/* + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + class UT3CicadaMissileLauncher extends ONSDualACSideGun; var(Sound) sound LoadSound; @@ -140,13 +174,23 @@ function Projectile SpawnProjectile(class ProjClass, bool bAltFire) } -DefaultProperties +defaultproperties { FireInterval=0.25 AltFireInterval=0.5 ProjectileClass=class'UT3CicadaRocket' AltFireProjectileClass=class'UT3CicadaRocket' - LoadSound=sound'UT3Vehicles.Cicada.Cicada_MissleLoad01' - FireSoundClass=Sound'UT3Vehicles.Cicada.Cicada_MissleEject01' - AltFireSoundClass=Sound'UT3Vehicles.Cicada.Cicada_MissleEject01' + LoadSound=sound'UT3A_Vehicle_Cicada.Sounds.A_Vehicle_Cicada_MissleLoad01' + FireSoundClass=Sound'UT3A_Vehicle_Cicada.SoundCues.A_Vehicle_Cicada_Fire' + AltFireSoundClass=Sound'UT3A_Vehicle_Cicada.Sounds.A_Vehicle_Cicada_MissleEject01' + Mesh = SkeletalMesh'UT3VH_Cicada_Anims.VH_Cicada_RightSideGun' + RedSkin = Shader'UT3CicadaTex.CicadaSkin' + BlueSkin = Shader'UT3CicadaTex.CicadaSkinBlue' + PitchBone = Rt_Gun_Pitch + YawBone = Rt_Gun_Yaw + WeaponFireAttachmentBone = Rt_Gun_Pitch + RotationsPerSecond = 0.5 + YawStartConstraint=-5000 + YawEndConstraint=5000 + bInstantRotation = false } diff --git a/Classes/UT3CicadaMissileLauncherLeft.uc b/Classes/UT3CicadaMissileLauncherLeft.uc new file mode 100644 index 0000000..1a94e32 --- /dev/null +++ b/Classes/UT3CicadaMissileLauncherLeft.uc @@ -0,0 +1,48 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3CicadaMissileLauncherLeft extends UT3CicadaMissileLauncher; + +defaultproperties +{ + Mesh = SkeletalMesh'UT3VH_Cicada_Anims.VH_Cicada_LeftSideGun' + PitchBone = Lt_Gun_Pitch + YawBone = Lt_Gun_Yaw + WeaponFireAttachmentBone = Lt_Gun_Pitch +} diff --git a/Classes/UT3CicadaRocket.uc b/Classes/UT3CicadaRocket.uc index 0db5c90..7970b9c 100644 --- a/Classes/UT3CicadaRocket.uc +++ b/Classes/UT3CicadaRocket.uc @@ -1,8 +1,42 @@ -//----------------------------------------------------------- -// UT3 Cicada Rocket, primary fire projectile -// Last change: Alpha 2 -// 2009, GreatEmerald -//----------------------------------------------------------- +/* + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + class UT3CicadaRocket extends ONSDualACRocket; simulated function Timer() //GE: Change the sound volume to something bearable @@ -74,5 +108,5 @@ DefaultProperties MomentumTransfer=40000.000000 DamageRadius=220.000000 KillRange=2000.000000 - IgniteSound=Sound'UT3Vehicles.Cicada.Cicada_Fire' + IgniteSound=Sound'UT3A_Vehicle_Cicada.Sounds.A_Vehicle_Cicada_MissleIgnite01' } diff --git a/Classes/UT3CicadaTurret.uc b/Classes/UT3CicadaTurret.uc index 232a144..f697628 100644 --- a/Classes/UT3CicadaTurret.uc +++ b/Classes/UT3CicadaTurret.uc @@ -1,16 +1,57 @@ -//----------------------------------------------------------- -// UT3CicadaTurret.uc -// Last change: Alpha 2 -// 2009, GreatEmerald -//----------------------------------------------------------- +/* + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + class UT3CicadaTurret extends ONSDualACGatlingGun; DefaultProperties { - BeamEffectClass(0)=Class'UT3CicadaTurretFire' - BeamEffectClass(1)=Class'UT3CicadaTurretFire' + BeamEffectClass(0) = class'UT3CicadaTurretFire' + BeamEffectClass(1) = class'UT3CicadaTurretFire' + + FireSoundClass = Sound'UT3A_Vehicle_Cicada.SoundCues.A_Vehicle_Cicada_TurretFire' + FireSoundVolume = 3.0 //GE: Again it's a FLOAT!! + //FireForce="" - FireSoundClass=sound'UT3Vehicles.Cicada.Cicada_TurretFire' - FireSoundVolume=3.000000 //GE: Again it's a FLOAT!! - //FireForce="" + Mesh = SkeletalMesh'UT3VH_Cicada_Anims.VH_Cicada_MainTurret' + RedSkin = Shader'UT3CicadaTex.CicadaSkin' + BlueSkin = Shader'UT3CicadaTex.CicadaSkinBlue' + PitchBone = MainTurret_Pitch + YawBone = MainTurret_Yaw + WeaponFireAttachmentBone = MainTurret_Pitch } diff --git a/Classes/UT3CicadaTurretFire.uc b/Classes/UT3CicadaTurretFire.uc index b1b57c4..a886321 100644 --- a/Classes/UT3CicadaTurretFire.uc +++ b/Classes/UT3CicadaTurretFire.uc @@ -1,8 +1,42 @@ -//----------------------------------------------------------- -// UT3CicadaTurretFire.uc -// Last change: Alpha 2 -// 2009, GreatEmerald -//----------------------------------------------------------- +/* + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + class UT3CicadaTurretFire extends ONSTurretBeamEffect; //GE: ONSBellyTurretFire is borked. var(Sound) sound TurretFireSound; @@ -18,7 +52,7 @@ simulated function PostNetBeginPlay() DefaultProperties { - TurretFireSound=sound'UT3Vehicles.Cicada.Cicada_TurretFire' + TurretFireSound=sound'UT3A_Vehicle_Cicada.SoundCues.A_Vehicle_Cicada_TurretFire' Begin Object Class=BeamEmitter Name=BeamEmitter0 BeamDistanceRange=(Min=512.000000,Max=512.000000) DetermineEndPointBy=PTEP_Distance diff --git a/Classes/UT3CicadaTurretPawn.uc b/Classes/UT3CicadaTurretPawn.uc index 56b97e5..3113c7c 100644 --- a/Classes/UT3CicadaTurretPawn.uc +++ b/Classes/UT3CicadaTurretPawn.uc @@ -1,12 +1,46 @@ -//----------------------------------------------------------- -// UT3CicadaTurretPawn.uc -// Last Change: Alpha 2 -// 2009, GreatEmerald -//----------------------------------------------------------- +/* + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3CicadaTurretPawn extends ONSDualACGatlingGunPawn; -DefaultProperties +defaultproperties { - GunClass=Class'UT3CicadaTurret' - VehicleNameString="UT3 Cicada Laser Turret" + GunClass = class'UT3CicadaTurret' + VehicleNameString = "UT3 Cicada Laser Turret" + CameraBone = "MainTurret_Pitch" } diff --git a/Classes/UT3DeployMessage.uc b/Classes/UT3DeployMessage.uc new file mode 100644 index 0000000..101f197 --- /dev/null +++ b/Classes/UT3DeployMessage.uc @@ -0,0 +1,38 @@ +/****************************************************************************** +UT3DeployMessage + +Creation date: 2009-02-09 11:03 +Last change: $Id$ +Copyright (c) 2009, Wormbo +******************************************************************************/ + +class UT3DeployMessage extends CriticalEventPlus; + + +var localized string DeployMessages[3]; + + +static function string GetString(optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject) +{ + if (Switch < 0 || Switch > ArrayCount(default.DeployMessages)) + return ""; + + return default.DeployMessages[Switch]; +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + DeployMessages[0] = "Cannot deploy while moving." + DeployMessages[1] = "Cannot deploy while wheels are unstable." + DeployMessages[2] = "Press [FIRE] to deploy camera." + + bIsUnique = False + bIsPartiallyUnique = True + DrawColor = (R=255,G=255,B=128,A=255) + StackMode = SM_Down +} diff --git a/Classes/UT3DeployableEnergyShield.uc b/Classes/UT3DeployableEnergyShield.uc new file mode 100644 index 0000000..9713fe1 --- /dev/null +++ b/Classes/UT3DeployableEnergyShield.uc @@ -0,0 +1,89 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3DeployableEnergyShield extends UT3DeployableMine; + +#exec audio import group=ShieldSounds file=../UT3Vehicles/Sounds/UT3Nightshade/Shield/Shield_Open.wav +#exec audio import group=ShieldSounds file=../UT3Vehicles/Sounds/UT3Nightshade/Shield/Shield_Close.wav + +/* */ +var UT3EnergyShield ShieldActor; +/* */ +var Sound OpenSnd; +/* */ +var Sound CloseSnd; + +simulated function Deploy() +{ + Super.Deploy(); + + PlayAnim('Deploy'); + PlaySound(OpenSnd, SLOT_None); + + ShieldActor = Spawn(class'UT3EnergyShield', self,, Location); + ShieldActor.SetCollision(true, false); + ShieldActor.BaseMine = self; + bCollideWorld = false; +} +simulated event Destroyed() +{ + Super.Destroyed(); + ShieldActor.Destroy(); + + if (Role == ROLE_Authority) + { + PlaySound(CloseSnd, SLOT_None); + } +} + +DefaultProperties +{ + Mesh = SkeletalMesh'UT3NightshadeAnims.ShieldMine'; + DrawType = DT_Mesh; + + bHardAttach = true; + bBlockActors = false; + bAlwaysRelevant = true; + LifeSpan = 90.0; + + // Sound. + OpenSnd = Sound'Shield_Open'; + CloseSnd = Sound'Shield_Close'; +} diff --git a/Classes/UT3DeployableMine.uc b/Classes/UT3DeployableMine.uc new file mode 100644 index 0000000..7f6fa6c --- /dev/null +++ b/Classes/UT3DeployableMine.uc @@ -0,0 +1,122 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3DeployableMine extends Actor; + +/* The deployer's controller. */ +var Controller Controller; +/* Indicates wether or not we've deployed. */ +var bool bDeployed; +/* The team of the deployable. */ +var byte Team; + + +replication +{ + reliable if (Role == ROLE_Authority && bNetDirty) + bDeployed, Team; +} + + +function PostBeginPlay() +{ + Super.PostBeginPlay(); + + if (Instigator != None) + { + Controller = Instigator.Controller; + Team = Controller.PlayerReplicationInfo.Team.TeamIndex; + } +} +simulated function Deploy() +{ + bDeployed = true; +} +event Landed(vector HitNormal) +{ + // We want to deploy after we land. + Deploy(); + bCollideWorld=false; + SetCollision(false, false, false); +} +static function bool DeployablesNearby(Actor MyActor, vector StartLocation, float CheckRadius) +{ + local float Dist; + local UT3DeployableMine DeployedActor; + + if (MyActor.Instigator == None) + return true; + + foreach MyActor.DynamicActors(class'UT3DeployableMine', DeployedActor) + { + Dist = VSize(DeployedActor.Location - StartLocation); + if (Dist < CheckRadius) + { + if (UT3DeployableMine(MyActor) != None && DeployedActor.Team == UT3DeployableMine(MyActor).Team) + return true; + else if (Pawn(MyActor) != None && DeployedActor.Team == Pawn(MyActor).Controller.PlayerReplicationInfo.Team.TeamIndex) + return true; + } + } + + return false; +} + + +DefaultProperties +{ + // Looks. + StaticMesh=StaticMesh'2k4ChargerMeshes.ChargerMeshes.HealthChargerMESH-DS'; + DrawType=DT_StaticMesh; + + // Collision. + bCollideWorld=true; + bCollideActors=true; + bBlockActors=true; + CollisionHeight = 0; + + // Network. + bReplicateInstigator=true; + bReplicateAnimations=true; + RemoteRole=ROLE_SimulatedProxy; + + // Movement. + Physics=PHYS_Falling; +} diff --git a/Classes/UT3DeployableSlowVolume.uc b/Classes/UT3DeployableSlowVolume.uc new file mode 100644 index 0000000..1493661 --- /dev/null +++ b/Classes/UT3DeployableSlowVolume.uc @@ -0,0 +1,68 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3DeployableSlowVolume extends UT3DeployableMine; + +/* */ +var UT3SlowVolume OwnedVolume; + +function Deploy() +{ + local rotator rot; + + Super.Deploy(); + + OwnedVolume = Spawn(class'UT3SlowVolume', Instigator,, Location, Rotation); + OwnedVolume.MineBase = self; + + rot = Rotation; + rot.Pitch = 0; + rot.Roll = 0; + + SetRotation(rot); + OwnedVolume.SetRotation(rot); +} + +event Destroyed() +{ + if (OwnedVolume != None) + OwnedVolume.Destroy(); + + Super.Destroyed(); +} diff --git a/Classes/UT3DmgType_LeviathanRocket.uc b/Classes/UT3DmgType_LeviathanRocket.uc new file mode 100644 index 0000000..f10ac3c --- /dev/null +++ b/Classes/UT3DmgType_LeviathanRocket.uc @@ -0,0 +1,68 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3DmgType_LeviathanRocket extends VehicleDamageType; + + +static function GetHitEffects(out class HitEffects[4], int VictimHealth ) +{ + HitEffects[0] = class'HitSmoke'; + + if( VictimHealth <= 0 ) + HitEffects[1] = class'HitFlameBig'; + else if ( FRand() < 0.8 ) + HitEffects[1] = class'HitFlame'; +} + +defaultproperties +{ + DeathString="%k rained fire down upon %o." + MaleSuicide="%o blew up." + FemaleSuicide="%o blew up." + + VehicleClass=class'UT3LeviathanTurretRocket' + bDetonatesGoop=true + KDamageImpulse=20000 + VehicleMomentumScaling=2.0 + VehicleDamageScaling=1.5 + bThrowRagdoll=true + GibPerterbation=0.15 + bFlaming=true + bDelayedDamage=true +} diff --git a/Classes/UT3DmgType_LeviathanShockBall.uc b/Classes/UT3DmgType_LeviathanShockBall.uc new file mode 100644 index 0000000..603c72c --- /dev/null +++ b/Classes/UT3DmgType_LeviathanShockBall.uc @@ -0,0 +1,51 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3DmgType_LeviathanShockBall extends DamTypePRVCombo; + +defaultproperties +{ + DeathString="%k electrified %o." + MaleSuicide="%o recieved too large of a shock." + FemaleSuicide="%o recieved too large of a shock." + + VehicleMomentumScaling=0.25 + VehicleDamageScaling=0.25 + VehicleClass=class'UT3LeviathanTurretShock' +} diff --git a/Classes/UT3DmgType_MantaPlasma.uc b/Classes/UT3DmgType_MantaPlasma.uc new file mode 100644 index 0000000..2021ae7 --- /dev/null +++ b/Classes/UT3DmgType_MantaPlasma.uc @@ -0,0 +1,51 @@ +/* + * Copyright © 2014 GreatEmerald + * Copyright © 2017 HellDragon + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3DmgType_MantaPlasma extends DamTypeHoverBikePlasma; + +defaultproperties +{ + DeathString="%k's Manta eviscerated %o with hot plasma." + MaleSuicide="%o fried himself with his own plasma blast." + FemaleSuicide="%o fried herself with her own plasma blast." + VehicleDamageScaling=0.7 + VehicleMomentumScaling=1.0 + VehicleClass=class'UT3Manta' +} diff --git a/Classes/UT3DmgType_SelfDestruct.uc b/Classes/UT3DmgType_SelfDestruct.uc new file mode 100644 index 0000000..92aedad --- /dev/null +++ b/Classes/UT3DmgType_SelfDestruct.uc @@ -0,0 +1,63 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3DmgType_SelfDestruct extends VehicleDamageType + abstract; + + +static function IncrementKills (Controller KillerRI) +{ + super.IncrementKills(KillerRI); +} + + +DefaultProperties +{ + // Strings. + DeathString="%k stung %o with a Viper self-destruct."; + MaleSuicide="%o stung himself with his own Viper self-destruct." + FemaleSuicide="%o stung herself with her own Viper self-destruct." + + // Misc. + VehicleClass=Class'UT3Viper'; + bDelayedDamage=true; + bDetonatesGoop=true; + FlashFog=(X=700.0); +} diff --git a/Classes/UT3DmgType_ViperBolt.uc b/Classes/UT3DmgType_ViperBolt.uc new file mode 100644 index 0000000..02b8d3c --- /dev/null +++ b/Classes/UT3DmgType_ViperBolt.uc @@ -0,0 +1,58 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3DmgType_ViperBolt extends WeaponDamageType + abstract; + +DefaultProperties +{ + // Strings. + DeathString="%k's Viper eviscerated %o with hot plasma."; + MaleSuicide="%o fried himself with his own plasma."; + FemaleSuicide="%o fried herself with her own plasma."; + + // Vehicle. + VehicleMomentumScaling=1.0; + VehicleDamageScaling=0.7; + + // Misc. + WeaponClass=class'UT3Weap_ViperGun'; + bCausesBlood=false; +} diff --git a/Classes/UT3EMPDisabler.uc b/Classes/UT3EMPDisabler.uc new file mode 100644 index 0000000..9950831 --- /dev/null +++ b/Classes/UT3EMPDisabler.uc @@ -0,0 +1,64 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3EMPDisabler extends Inventory; + +/* */ +var byte Team; + +function Destroyed() +{ + local Vehicle V; + + V = Vehicle(Owner); + + if (V != None) + { + V.Team = Team; + V.bTeamLocked = false; + } + + Super.Destroyed(); +} + +DefaultProperties +{ + // UTVehicle.DisabledTime; + LifeSpan = 20.0; +} diff --git a/Classes/UT3EMPMine.uc b/Classes/UT3EMPMine.uc new file mode 100644 index 0000000..e790581 --- /dev/null +++ b/Classes/UT3EMPMine.uc @@ -0,0 +1,143 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3EMPMine extends UT3DeployableMine; + +#exec audio import group=EMPSounds file=../UT3Vehicles/Sounds/UT3Nightshade/EMPMine/EMP_Drop.wav +#exec audio import group=EMPSounds file=../UT3Vehicles/Sounds/UT3Nightshade/EMPMine/EMP_Shock.wav + +/* */ +var float EMPRadius; +/* */ +var Sound DropSnd; +/* */ +var Sound ShockSnd; + +event Landed(vector HitNormal) +{ + local vector HitLocation, TraceHitNormal; + local Actor HitActor; + + Super.Landed(HitNormal); + + //Trace(HitLocation, HitNormal, TraceEnd, Location, true) + HitActor = Trace(HitLocation, TraceHitNormal, Location - vect(0,0,10), Location, true); + + if (Vehicle(HitActor) != None) + LifeSpan = FMin(LifeSpan, 30.0); + + if (!bDeleteMe) + SetTimer(0.1, true); +} +simulated function Deploy() +{ + Super.Deploy(); + PlaySound(DropSnd, SLOT_None); + PlayAnim('Deploy'); +} +function CheckEMP() +{ + local Vehicle V; + local Controller C, NextC; + local bool bActivated; + + C = Level.ControllerList; + while (C != None) + { + NextC = C.NextController; + + V = Vehicle(C.Pawn); + //if (C.Pawn != None && Vehicle(C.Pawn) != None && Vehicle(C.Pawn).Health > 0 && Vehicle(C.Pawn).Driver != None && C.GetTeamNum() != Team && VSize(C.Pawn.Location - Location) < EMPRadius && FastTrace(Location, C.Pawn.Location)) + if (V != None && V.Health > 0 && V.Driver != None && C.GetTeamNum() != Team && VSize(V.Location - Location) < EMPRadius && FastTrace(Location, V.Location)) + { + //V.EjectDriver(); + V.KDriverLeave(true); + + // 254 = EMP'ed team. + if (V.Team != 254) + { + PlaySound(ShockSnd, SLOT_None); + DisableVehicle(V); + bActivated = true; + } + } + + C = NextC; + } + + if (bActivated) + { + MakeNoise(1.0); + // PlayEffect()? + } +} +function DisableVehicle(Vehicle V) +{ + local UT3EMPDisabler Disabler; + + Disabler = Spawn(class'UT3EMPDisabler',,, Location); + Disabler.Team = V.Team; + + V.Team = 254; + V.bTeamLocked = true; + + Disabler.GiveTo(V); +} +event Timer() +{ + CheckEMP(); +} + +DefaultProperties +{ + EMPRadius = 500.0; + + Mesh = SkeletalMesh'UT3NightshadeAnims.EMPMine'; + DrawType = DT_Mesh; + + bCollideActors = false; + bBlockActors = false; + bBlockKarma = false; + + LifeSpan = 60.0; + + // Sound. + DropSnd = Sound'EMP_Drop'; + ShockSnd = Sound'EMP_Shock'; +} diff --git a/Classes/UT3EMPObject.uc b/Classes/UT3EMPObject.uc new file mode 100644 index 0000000..94ece38 --- /dev/null +++ b/Classes/UT3EMPObject.uc @@ -0,0 +1,47 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3EMPObject extends Actor; + +DefaultProperties +{ + Mesh = SkeletalMesh'UT3NightshadeAnims.EMPMine'; + DrawType = DT_Mesh; +} diff --git a/Classes/UT3Emitter_ViperDust.uc b/Classes/UT3Emitter_ViperDust.uc new file mode 100644 index 0000000..f40184b --- /dev/null +++ b/Classes/UT3Emitter_ViperDust.uc @@ -0,0 +1,79 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3Emitter_ViperDust extends ONSHoverBikeHoverDust; + +simulated function UpdateHoverDust(bool bActive, float HoverHeight) +{ + local float Force; + + Force = 1 - HoverHeight; + + if(!bActive) + { + Emitters[0].ParticlesPerSecond = 0; + Emitters[0].InitialParticlesPerSecond = 0; + Emitters[1].Disabled = true; + return; + } + else + { + Emitters[0].ParticlesPerSecond = 5; // 100 + Emitters[0].InitialParticlesPerSecond = 5; // 100 + Emitters[0].AllParticlesDead = false; + //Emitters[1].Disabled = (Level.DetailMode == DM_Low); + Emitters[1].Disabled = true; + } + + // Dust + Emitters[0].StartVelocityRadialRange.Min = -325 + (Force * -100); // -650 + (Force * -100) + Emitters[0].StartVelocityRadialRange.Max = Emitters[0].StartVelocityRadialRange.Min - 100; + + Emitters[0].StartLocationPolarRange.Z.Min = 10 + (HoverHeight * 30); + Emitters[0].StartLocationPolarRange.Z.Max = Emitters[0].StartLocationPolarRange.Z.Min; +} + +simulated function SetDustColor(color DustColor) +{ + Super.SetDustColor(DustColor); + + // Reduce opacity. + Emitters[0].ColorScale[1].Color.A = 200; + Emitters[0].ColorScale[2].Color.A = 200; +} diff --git a/Classes/UT3EnergyShield.uc b/Classes/UT3EnergyShield.uc new file mode 100644 index 0000000..4501f49 --- /dev/null +++ b/Classes/UT3EnergyShield.uc @@ -0,0 +1,88 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3EnergyShield extends Actor; + +#exec audio import group=ShieldSounds file=../UT3Vehicles/Sounds/UT3Nightshade/Shield/Shield_Ambient.wav +#exec audio import group=ShieldSounds file=../UT3Vehicles/Sounds/UT3Nightshade/Shield/Shield_Hit.wav + +/* How much health the shield currently has. */ +var int Health; +/* The mine that is producing this shield. */ +var UT3DeployableMine BaseMine; +/* */ +var Sound HitSnd; + +event TakeDamage(int DamageAmount, Pawn Instigator, vector HitLocation, vector Momentum, class DamageType) +{ + Super.TakeDamage(DamageAmount, Instigator, HitLocation, Momentum, DamageType); + + Health -= DamageAmount; + PlaySound(HitSnd, SLOT_None, 1.5); + + if (Health <= 0) + BaseMine.Destroy(); +} + +DefaultProperties +{ + // Looks. + StaticMesh = StaticMesh'UT3NightshadeSM.Shield'; + DrawType = DT_StaticMesh; + DrawScale = 5.0; + Rotation = (Roll=0); + + // Collision. + bCollideActors = true; + bBlockActors = false; + bBlockZeroExtentTraces = true; + //bBlockNonZeroExtentTraces = false; + bProjTarget = true; + bActorShadows = false; + + // Damage. + Health = 4000; + + // Sound. + AmbientSound = Sound'Shield_Ambient'; + HitSnd = Sound'Shield_Hit'; + SoundRadius = 250; + SoundVolume = 128; +} diff --git a/Classes/UT3Goliath.uc b/Classes/UT3Goliath.uc index 12bd4d8..61f031d 100644 --- a/Classes/UT3Goliath.uc +++ b/Classes/UT3Goliath.uc @@ -1,97 +1,173 @@ -/****************************************************************************** -UT3Goliath - -Creation date: 2008-05-02 20:50 -Last change: $Id$ -Copyright (c) 2008, Wormbo -Copyright (c) 2012, 100GPing100 (visuals + fixed sounds) -******************************************************************************/ +/* + * Copyright © 2008 Wormbo + * Copyright © 2012, 2017 Luís 'zeluisping' Guimarães + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3Goliath extends ONSHoverTank; -//===================== -// @100GPing100 -#exec obj load file=..\Animations\UT3GoliathAnims.ukx -#exec obj load file=..\Textures\UT3GoliathTex.utx +#exec obj load file=../Animations/UT3GoliathAnims.ukx +#exec obj load file=../Textures/UT3GoliathTex.utx + + +//var(ONSWheeledCraft) float ChassisTorqueScale; doesn't work yet + -#exec audio import group=Sounds file=..\Sounds\UT3Goliath\Engine.wav -#exec audio import group=Sounds file=..\Sounds\UT3Goliath\EngineStart.wav -#exec audio import group=Sounds file=..\Sounds\UT3Goliath\EngineStop.wav -#exec audio import group=Sounds file=..\Sounds\UT3Goliath\Impact.wav -#exec audio import group=Sounds file=..\Sounds\UT3Goliath\Explode.wav +function Tick(float DeltaTime) { + local KarmaParamsRBFull KP; + KP = KarmaParamsRBFull(KParams); + + if (Throttle == 0) { + KP.KLinearDamping = 1; + } else { + KP.KLinearDamping = 0; + } + + super.Tick(DeltaTime); +} simulated function SetupTreads() { - LeftTreadPanner = VariableTexPanner(Level.ObjectPool.AllocateObject(class'VariableTexPanner')); - if ( LeftTreadPanner != None ) - { - LeftTreadPanner.Material = Skins[1]; - //LeftTreadPanner.PanDirection = rot(0, 16384, 0); - LeftTreadPanner.PanDirection = rot(0,-16384,0); - LeftTreadPanner.PanRate = 0.0; - Skins[1] = LeftTreadPanner; - } - RightTreadPanner = VariableTexPanner(Level.ObjectPool.AllocateObject(class'VariableTexPanner')); - if ( RightTreadPanner != None ) - { - RightTreadPanner.Material = Skins[2]; - //RightTreadPanner.PanDirection = rot(0, 16384, 0); - RightTreadPanner.PanDirection = rot(0,-16384,0); - RightTreadPanner.PanRate = 0.0; - Skins[2] = RightTreadPanner; - } - local a; + LeftTreadPanner = VariableTexPanner(Level.ObjectPool.AllocateObject(class'VariableTexPanner')); + if ( LeftTreadPanner != None ) + { + LeftTreadPanner.Material = Skins[1]; + //LeftTreadPanner.PanDirection = rot(0, 16384, 0); + LeftTreadPanner.PanDirection = rot(0,-16384,0); + LeftTreadPanner.PanRate = 0.0; + Skins[1] = LeftTreadPanner; + } + RightTreadPanner = VariableTexPanner(Level.ObjectPool.AllocateObject(class'VariableTexPanner')); + if ( RightTreadPanner != None ) + { + RightTreadPanner.Material = Skins[2]; + //RightTreadPanner.PanDirection = rot(0, 16384, 0); + RightTreadPanner.PanDirection = rot(0,-16384,0); + RightTreadPanner.PanRate = 0.0; + Skins[2] = RightTreadPanner; + } + //local a; } -// @100GPing100 -//=========END========= - //============================================================================= // Default values //============================================================================= - defaultproperties { - //=============== - // @100GPing100 - Mesh = SkeletalMesh'UT3GoliathAnims.Goliath'; - RedSkin = Shader'UT3GoliathTex.Goliath.GoliathSkin'; - BlueSkin = Shader'UT3GoliathTex.Goliath.GoliathSkinBlue'; - - Skins(1) = Shader'UT3GoliathTex.GoliathWheels.GoliathWheelsSkin'; - Skins(2) = Shader'UT3GoliathTex.GoliathWheels.GoliathWheelsSkin'; - - DriverWeapons(0)=(WeaponClass=class'UT3GoliathCannon',WeaponBone=Chassis) - PassengerWeapons(0)=(WeaponPawnClass=class'UT3GoliathTurretPawn',WeaponBone=Object10) - - IdleSound = Sound'UT3Goliath.Sounds.Engine'; - StartUpSound = Sound'UT3Goliath.Sounds.EngineStart'; - ShutDownSound = Sound'UT3Goliath.Sounds.EngineStop'; - - ImpactDamageSounds(0) = Sound'UT3Goliath.Sounds.Impact'; - ImpactDamageSounds(1) = Sound'UT3Goliath.Sounds.Impact'; - ImpactDamageSounds(2) = Sound'UT3Goliath.Sounds.Impact'; - ImpactDamageSounds(3) = Sound'UT3Goliath.Sounds.Impact'; - ImpactDamageSounds(4) = Sound'UT3Goliath.Sounds.Impact'; - ImpactDamageSounds(5) = Sound'UT3Goliath.Sounds.Impact'; - ImpactDamageSounds(6) = Sound'UT3Goliath.Sounds.Impact'; - ExplosionSounds(0) = Sound'UT3Goliath.Sounds.Explode'; - ExplosionSounds(1) = Sound'UT3Goliath.Sounds.Explode'; - ExplosionSounds(2) = Sound'UT3Goliath.Sounds.Explode'; - ExplosionSounds(3) = Sound'UT3Goliath.Sounds.Explode'; - ExplosionSounds(4) = Sound'UT3Goliath.Sounds.Explode'; - - TreadVelocityScale = 146.25; // Based on the new MaxThrust value: (65/200)*450 - // @100GPing100 - //======END====== - - - VehicleNameString = "UT3 Goliath" - MaxGroundSpeed=600.0 - GroundSpeed=500 - SoundVolume=255 - MaxThrust=200.000000//GE: was 65, maybe the tank is too fast now? + Mesh=SkeletalMesh'UT3GoliathAnims.Goliath'; + RedSkin=Shader'UT3GoliathTex.Goliath.GoliathSkin'; + BlueSkin=Shader'UT3GoliathTex.Goliath.GoliathSkinBlue'; + + Skins(1)=Shader'UT3GoliathTex.GoliathWheels.GoliathWheelsSkin'; + Skins(2)=Shader'UT3GoliathTex.GoliathWheels.GoliathWheelsSkin'; + + DriverWeapons(0)=(WeaponClass=class'UT3GoliathCannon',WeaponBone=Chassis) + PassengerWeapons(0)=(WeaponPawnClass=class'UT3GoliathTurretPawn',WeaponBone=Object10) + + Health=900 + HealthMax=900 + + IdleSound=Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_EngineLoop01RealTreadsMix'; + //IdleSound = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_EngineLoop01'; + StartUpSound=Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Start01'; + ShutDownSound=Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Stop01'; + DamagedEffectHealthSmokeFactor=0.65 //0.5 + DamagedEffectHealthFireFactor=0.40 //0.25 + DamagedEffectFireDamagePerSec=2.0 //0.75 + ImpactDamageSounds=(); + ImpactDamageSounds(0)=Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Collide01'; + ExplosionSounds=(); + ExplosionSounds(0)=Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Explode01'; + + TreadVelocityScale = 12.0; + + VehicleNameString="UT3 Goliath" + MaxGroundSpeed=900.0 //600.0 + GroundSpeed=520 //500 + MaxAirSpeed=900.0 //5000.0 + MaxSteerTorque=70.0 + ForwardDampFactor=0.13 + //ChassisTorqueScale=5.0 compiles but is ignored in-game + SoundVolume=255 + MaxThrust=80.0 //GE val 200.000000//GE: was 65, maybe the tank is too fast now? + MaxDesireability=1.25 + + MomentumMult=0.1 //0.3 + + Begin Object Class=KarmaParamsRBFull Name=KParams0 + KStartEnabled=True + KFriction=0.5 + KLinearDamping=0 + KAngularDamping=0 + bKNonSphericalInertia=False + bHighDetailOnly=False + bClientOnly=False + bKDoubleTickRate=True + bKStayUpright=True + bKAllowRotate=True + kMaxSpeed=900.0 //800 + KInertiaTensor(0)=1.3 + KInertiaTensor(1)=0.0 + KInertiaTensor(2)=0.0 + KInertiaTensor(3)=4.0 + KInertiaTensor(4)=0.0 + KInertiaTensor(5)=4.5 + KCOMOffset=(X=0.0,Y=0.0,Z=0.0) + bDestroyOnWorldPenetrate=True + bDoSafetime=True + Name="KParams0" + End Object + KParams=KarmaParams'KParams0' + + ExitPositions(0)=(X=0,Y=-200,Z=30) + ExitPositions(1)=(X=0,Y=200,Z=30) + + HeadlightCoronaOffset(0)=(X=167,Y=99.5,Z=34) + HeadlightCoronaOffset(1)=(X=167,Y=-99.5,Z=34) + HeadlightCoronaMaterial=Material'EmitterTextures.Flares.EFlareOY' + HeadlightCoronaMaxSize=115 //95 looks good to me as well + + HeadlightProjectorOffset=(X=167,Y=0,Z=34) + HeadlightProjectorRotation=(Yaw=0,Pitch=-1500,Roll=0) + //HeadlightProjectorMaterial=Texture'VMVehicles-TX.HoverTankGroup.TankProjector' + HeadlightProjectorMaterial=Texture'VMVehicles-TX.NewPRVGroup.PRVProjector' + HeadlightProjectorScale=0.80 } diff --git a/Classes/UT3GoliathCannon.uc b/Classes/UT3GoliathCannon.uc index 430f7a2..20a02f2 100644 --- a/Classes/UT3GoliathCannon.uc +++ b/Classes/UT3GoliathCannon.uc @@ -3,16 +3,10 @@ // Go over to the Projectile. // GreatEmerald, 2008 // Copyright (c) 2012, 100GPing100 (visuals + fixed sounds) +// Copyright (c) 2014, GreatEmerald //----------------------------------------------------------- class UT3GoliathCannon extends ONSHoverTankCannon; -//===================== -// @100GPing100 -#exec audio import group=Sounds file=..\Sounds\UT3Goliath\Fire.wav -#exec audio import group=Sounds file=..\Sounds\UT3Goliath\Reload.wav -// @100GPing100 -//=========END========= - var() sound ReloadSoundClass; function Projectile SpawnProjectile(class ProjClass, bool bAltFire) @@ -87,15 +81,15 @@ DefaultProperties Mesh = SkeletalMesh'UT3GoliathAnims.GoliathCannon'; RedSkin = Shader'UT3GoliathTex.Goliath.GoliathSkin'; BlueSkin = Shader'UT3GoliathTex.Goliath.GoliathSkinBlue'; - + YawBone = "Object01"; PitchBone = "Object09"; WeaponFireAttachmentBone = "Object08"; - - FireSoundClass = Sound'UT3Goliath.Sounds.Fire'; - ReloadSoundClass = Sound'UT3Goliath.Sounds.Reload'; + + FireSoundClass = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Fire01'; + ReloadSoundClass = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Reload02'; // @100GPing100 //======END====== - + ProjectileClass=class'UT3GoliathProjectile' } diff --git a/Classes/UT3GoliathProjectile.uc b/Classes/UT3GoliathProjectile.uc index 9ae7ac6..5e9f0a3 100644 --- a/Classes/UT3GoliathProjectile.uc +++ b/Classes/UT3GoliathProjectile.uc @@ -2,7 +2,6 @@ // UT3GoliathProjectile.uc // Yeap, it's here. // GreatEmerald, 2008 -// Copyright (c) 2012, 100GPing100 (visuals + fixed sounds) //----------------------------------------------------------- class UT3GoliathProjectile extends ONSRocketProjectile; diff --git a/Classes/UT3GoliathTurret.uc b/Classes/UT3GoliathTurret.uc index 521b8c1..111214c 100644 --- a/Classes/UT3GoliathTurret.uc +++ b/Classes/UT3GoliathTurret.uc @@ -1,14 +1,11 @@ //----------------------------------------------------------- // UT3GoliathTurret.uc // I don't think the sounds will initially work... -// GreatEmerald, 2008 (almost 2009) +// GreatEmerald, 2008, 2014 // Copyright (c) 2012, 100GPing100 (visuals + fixed sounds) //----------------------------------------------------------- class UT3GoliathTurret extends ONSTankSecondaryTurret; -// @100GPing100 -#exec audio import group=Sounds file=..\Sounds\UT3Goliath\MachineGunFire.wav - DefaultProperties { //=============== @@ -16,16 +13,16 @@ DefaultProperties Mesh = SkeletalMesh'UT3GoliathAnims.GoliathMachineGun'; RedSkin = Shader'UT3GoliathTex.Goliath.GoliathSkin'; BlueSkin = Shader'UT3GoliathTex.Goliath.GoliathSkinBlue'; - + YawBone = "Object10"; PitchBone = "Object03"; WeaponFireAttachmentBone = "Object02"; - - FireSoundClass = Sound'UT3Goliath.Sounds.MachineGunFire'; + + FireSoundClass = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_TurretFire03'; // @100GPing100 //======END====== - - + + Spread=0.03 DamageMin=18 DamageMax=18 diff --git a/Classes/UT3GoliathTurretPawn.uc b/Classes/UT3GoliathTurretPawn.uc index aa4ac40..982f1df 100644 --- a/Classes/UT3GoliathTurretPawn.uc +++ b/Classes/UT3GoliathTurretPawn.uc @@ -2,7 +2,6 @@ // UT3GoliathTurretPawn.uc // That small turret mounted on top of Goliaths // GreatEmerald, 2008 (almost 2009) -// Copyright (c) 2012, 100GPing100 (visuals + fixed sounds) //----------------------------------------------------------- class UT3GoliathTurretPawn extends ONSTankSecondaryTurretPawn; diff --git a/Classes/UT3HBShockBall.uc b/Classes/UT3HBShockBall.uc index e585ddf..ab6a2b2 100644 --- a/Classes/UT3HBShockBall.uc +++ b/Classes/UT3HBShockBall.uc @@ -1,14 +1,17 @@ -//============================================================================== -// UT3HBShockBall.uc -// This is an improvement. -// 2008, GreatEmerald -//============================================================================== - -class UT3HBShockBall extends ONSSkyMine; - -defaultproperties -{ - ComboSound=Sound'UT3Weapons.ShockRifle.ShockCombo' - Speed=1400.000000 - MaxSpeed=1400.000000 -} +//============================================================================== +// UT3HBShockBall.uc +// This is an improvement. +// 2008, GreatEmerald +//============================================================================== + +class UT3HBShockBall extends ONSSkyMine; + +defaultproperties +{ + //Speed=1100.000000 + //MaxSpeed=1100.000000 + Speed=1400.000000 + MaxSpeed=1400.000000 + ComboSound=Sound'UT3Weapons.ShockRifle.ShockCombo' +} + diff --git a/Classes/UT3HUDItem.uc b/Classes/UT3HUDItem.uc new file mode 100644 index 0000000..9da43a8 --- /dev/null +++ b/Classes/UT3HUDItem.uc @@ -0,0 +1,58 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3HUDItem extends Actor; + +/* The color to drawn the image with. */ +var Color DrawColor; +/* Position of where the image will be drawn. */ +var float PosX, PosY; +/* The image that will be drawn */ +var Texture Icon; +/* The scale that the image will be drawn with. */ +var float Scale; + +DefaultProperties +{ + DrawColor = (R=255,G=255,B=255,A=255); + PosX = 0.0; + PosY = 0.0; + Scale = 1.0; +} diff --git a/Classes/UT3Hellbender.uc b/Classes/UT3Hellbender.uc index bed9517..2c8e817 100644 --- a/Classes/UT3Hellbender.uc +++ b/Classes/UT3Hellbender.uc @@ -1,12 +1,48 @@ -/****************************************************************************** -UT3Hellbender - -Creation date: 2008-05-02 20:51 -Last change: $Id$ -Copyright (c) 2008 and 2009, Wormbo and GreatEmerald -******************************************************************************/ +/* + * Copyright © 2008, 2014 GreatEmerald + * Copyright © 2008-2009 Wormbo + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3Hellbender extends ONSPRV; + +var float OldWheelPitch[4]; +//var float DebugFloat; + //This is a great example of how to get rid of a passenger seat. function VehicleFire(bool bWasAltFire) //This is to remove the horn each time you fire @@ -166,6 +202,121 @@ simulated function PostNetBeginPlay() TeamChanged(); } +simulated function Tick(float DeltaTime) +{ + Super.Tick(DeltaTime); + + CloneBoneRotation('Rt_Rear_Suspension', 'Rt_Rear_Tire', 0); + CloneBoneRotation('Lt_Rear_Suspension', 'Lt_Rear_Tire', 1); + /*DebugFloat += DeltaTime; + if (DebugFloat > 1.0) + { + CloneBoneRotation('Rt_Front_Suspension', 'Rt_Front_Tire', 2, true); + DebugFloat = 0; + } + else*/ + CloneBoneRotation('Rt_Front_Suspension', 'Rt_Front_Tire', 2); + CloneBoneRotation('Lt_Front_Suspension', 'Lt_Front_Tire', 3); +} + +simulated function CloneBoneRotation(name BoneToSet, name BoneToCopy, byte i, optional bool bLog) +{ + local rotator NewRotation; + + NewRotation = GetBoneRotation(BoneToSet); + NewRotation.Pitch = OldWheelPitch[i]-NewRotation.Pitch; + NewRotation.Roll = 0; + NewRotation.Yaw = 0; + SetBoneRotation(BoneToSet, NewRotation); + //if (bLog) + // Instigator.ClientMessage(self@"CloneBoneRotation:"@GetBoneRotation(BoneToSet)); + OldWheelPitch[i] = NewRotation.Pitch; +} + +function DriverLeft() +{ + GoToState(''); + PlayAnim('GetOut', 1.0, 0.1); + + Super.DriverLeft(); +} + +event PostBeginPlay() +{ + PlayAnim('InActiveIdle', 1.0, 0.0); + + super.PostBeginPlay(); +} + +event KDriverEnter(Pawn P) +{ + GoToState('Idle'); + + super.KDriverEnter(P); +} + +simulated state Idle +{ + Begin: + PlayAnim('GetIn', 1.0, 0.0); + FinishAnim(); + LoopAnim('Idle', 1.0, 0.0); +} + +// GEm: Just for wheel squealing, this disables license plate names too +simulated event DrivingStatusChanged() +{ + local int i; + local Coords WheelCoords; + + Super(ONSVehicle).DrivingStatusChanged(); + + if (bDriving && Level.NetMode != NM_DedicatedServer && !bDropDetail) + { + Dust.length = Wheels.length; + for(i=0; i> Rotation)); + Dust[i].SetBase(self); + Dust[i].SetDirtColor( Level.DustColor ); + } + + if(bMakeBrakeLights) + { + for(i=0; i<2; i++) + if (BrakeLight[i] == None) + { + BrakeLight[i] = spawn(class'ONSBrakelightCorona', self,, Location + (BrakeLightOffset[i] >> Rotation) ); + BrakeLight[i].SetBase(self); + BrakeLight[i].SetRelativeRotation( rot(0,32768,0) ); // Point lights backwards. + BrakeLight[i].Skins[0] = BrakeLightMaterial; + } + } + } + else + { + if (Level.NetMode != NM_DedicatedServer) + { + for(i=0; i 0 && Level.TimeSeconds - LastDeployAttempt > 0.1) { - if (bBotDeploy) { - Throttle = 0; - Steering = 0; - Rise = 1; // handbrake to quickly slow down - } - ServerToggleDeploy(); - if (bBotDeploy && LastDeployStartTime == Level.TimeSeconds) { - bBotDeploy = False; - Rise = 0; - } - LastDeployAttempt = Level.TimeSeconds; - } - if (Level.NetMode != NM_DedicatedServer && Driver != None && DeployState != DS_Undeployed) { - // override brake lights - for (i = 0; i < 2; ++i) { - if (BrakeLight[i] != None) - BrakeLight[i].UpdateBrakelightState(0, 1); - } - } - if (IsLocallyControlled() && IsHumanControlled() && Level.TimeSeconds - LastDeployCheckTime > 0.25) { - // check if can be deployed - bDrawCanDeployTooltip = DeployState == DS_Undeployed && Driver != None && CanDeploy(True); - LastDeployCheckTime = Level.TimeSeconds; - } - - if (MortarCamera != None) { - // mouse view aiming for SPMA camera - bCustomAiming = True; - bAltFocalPoint = true; // for bots - - if (IsLocallyControlled() && IsHumanControlled()) { - if (!MortarCamera.bShotDown && PlayerController(Controller).ViewTarget != MortarCamera) { - PlayerController(Controller).SetViewTarget(MortarCamera); - PlayerController(Controller).bBehindView = False; - PlayerController(Controller).ClientSetBehindView(False); - } - - CustomAim = UT3HellfireSPMACannon(Weapons[ActiveWeapon]).TargetRotation; - - if (bJustDeployed || Level.TimeSeconds - ClientUpdateTime > 0.0222 && CustomAim != LastAim) { - ClientUpdateTime = Level.TimeSeconds; - ServerAim((CustomAim.Yaw & 0xffff) | (CustomAim.Pitch << 16)); - LastAim = CustomAim; - bJustDeployed = false; - } - } - else { - if (IsLocallyControlled() && !IsHumanControlled()) { - // AI-controlled - if (Controller.Target != None) { - if (MortarCamera.bDeployed) { - if ( ShootTarget(Controller.Target) != None ) - ObjectiveTarget = DestroyableObjective(Controller.Target.Owner); - else - ObjectiveTarget = DestroyableObjective(Controller.Target); - } - if (ObjectiveTarget != None && !ObjectiveTarget.LegitimateTargetOf(Bot(Controller)) || !Weapons[ActiveWeapon].CanAttack(ObjectiveTarget)) { - MortarCamera.ShotDown(); - Weapons[ActiveWeapon].FireCountDown = Weapons[ActiveWeapon].AltFireInterval; - } - - AltFocalPoint = Weapons[ActiveWeapon].Location + vector(CustomAim) * Weapons[ActiveWeapon].MaxRange(); - Controller.Focus = None; - } - else { - // no target, retry later - bAltFocalPoint = false; - MortarCamera.ShotDown(); - Weapons[ActiveWeapon].FireCountDown = Weapons[ActiveWeapon].AltFireInterval; - } - } - CustomAim = CannonAim; - } - Throttle = 0.0; - Steering = 0.0; - } - else { - bCustomAiming = False; - if (PlayerController(Controller) != None) { - if (PlayerController(Controller).ViewTarget == MortarCamera) - PlayerController(Controller).SetViewTarget(Self); - if (PlayerController(Controller).ViewTarget == Self && PlayerController(Controller).bBehindView != PointOfView()) { - PlayerController(Controller).bBehindView = PointOfView(); - PlayerController(Controller).ClientSetBehindView(PointOfView()); - } - } - else if (IsDeployed() && AIController(Controller) != None) { - bAltFocalPoint = true; - bCustomAiming = true; - if (Controller.Target != None) - CustomAim.Yaw = rotator(Controller.Target.Location - Location).Yaw; - CustomAim.Pitch = 8192; // 45 degrees up, to fire camera in the target's general direction - AltFocalPoint = Weapons[ActiveWeapon].Location + vector(CustomAim) * Weapons[ActiveWeapon].MaxRange(); - Controller.Focus = None; - } - else { - bAltFocalPoint = false; - } - } + local DestroyableObjective ObjectiveTarget; + local int i; + + Super(ONSWheeledCraft).Tick(DeltaTime); + + if (bBotDeploy || Role == ROLE_Authority && IsHumanControlled() && Rise > 0 && Level.TimeSeconds - LastDeployAttempt > 0.1) + { + if (bBotDeploy) + { + Throttle = 0; + Steering = 0; + Rise = 1; // handbrake to quickly slow down + } + ServerToggleDeploy(); + if (bBotDeploy && LastDeployStartTime == Level.TimeSeconds) + { + bBotDeploy = False; + Rise = 0; + } + LastDeployAttempt = Level.TimeSeconds; + } + if (Level.NetMode != NM_DedicatedServer) + { + if (Driver != None && DeployState != DS_Undeployed) + { + // override brake lights + for (i = 0; i < 2; ++i) + { + if (BrakeLight[i] != None) + BrakeLight[i].UpdateBrakelightState(0, 1); + } + + TreadPanner.PanRate = 0.0; + } + else + { + // GEm: Stop wheels from rotating (saves performance by piggy-backing as an else code, woo) + FixFenderRotation('RtFrontFender', 'RtFrontTire', 0); + FixFenderRotation('LtFrontFender', 'LtFrontTire', 1); + + CopyTreadRotationLeft(); + CopyTreadRotationRight(); + + if (TreadPanner != None) + { + TreadPanner.PanRate = VSize(Velocity) / TreadVelocityScale; + if (Velocity Dot Vector(Rotation) < 0) + TreadPanner.PanRate = -1 * TreadPanner.PanRate; + } + } + } + if (IsLocallyControlled() && IsHumanControlled() && Level.TimeSeconds - LastDeployCheckTime > 0.25) + { + // check if can be deployed + bDrawCanDeployTooltip = DeployState == DS_Undeployed && Driver != None && CanDeploy(True); + LastDeployCheckTime = Level.TimeSeconds; + } + + if (MortarCamera != None) + { + // mouse view aiming for SPMA camera + bCustomAiming = True; + bAltFocalPoint = true; // for bots + + if (IsLocallyControlled() && IsHumanControlled()) + { + if (!MortarCamera.bShotDown + && PlayerController(Controller) != None && PlayerController(Controller).ViewTarget != MortarCamera) + { + PlayerController(Controller).SetViewTarget(MortarCamera); + PlayerController(Controller).bBehindView = False; + PlayerController(Controller).ClientSetBehindView(False); + } + + CustomAim = UT3HellfireSPMACannon(Weapons[ActiveWeapon]).TargetRotation; + + if (bJustDeployed || Level.TimeSeconds - ClientUpdateTime > 0.0222 && CustomAim != LastAim) + { + ClientUpdateTime = Level.TimeSeconds; + ServerAim((CustomAim.Yaw & 0xffff) | (CustomAim.Pitch << 16)); + LastAim = CustomAim; + bJustDeployed = false; + } + } + else + { + if (IsLocallyControlled() && !IsHumanControlled()) + { + // AI-controlled + if (Controller != None && Controller.Target != None) + { + if (MortarCamera.bDeployed) + { + if ( ShootTarget(Controller.Target) != None ) + ObjectiveTarget = DestroyableObjective(Controller.Target.Owner); + else + ObjectiveTarget = DestroyableObjective(Controller.Target); + } + if (ObjectiveTarget != None && (!ObjectiveTarget.LegitimateTargetOf(Bot(Controller)) || !Weapons[ActiveWeapon].CanAttack(ObjectiveTarget))) + { + //log(self@Instigator.Controller.GetTeamNum()@"Tick: Camera disabled: ObjectiveTarget"@ObjectiveTarget@!ObjectiveTarget.LegitimateTargetOf(Bot(Controller))@"(and see CanAttack above)"); + MortarCamera.ShotDown(); + Weapons[ActiveWeapon].FireCountDown = Weapons[ActiveWeapon].AltFireInterval; + } + + AltFocalPoint = Weapons[ActiveWeapon].Location + vector(CustomAim) * Weapons[ActiveWeapon].MaxRange(); + Controller.Focus = None; + } + else + { + // no target, retry later + // GEm: Rather wait around a bit, the cannon watchdog will decide to move eventually if we continue not having targets + //log(self@Instigator.Controller.GetTeamNum()@"Tick: Camera disabled: No targets"); + bAltFocalPoint = false; + //MortarCamera.ShotDown(); + //Weapons[ActiveWeapon].FireCountDown = Weapons[ActiveWeapon].AltFireInterval; + } + } + CustomAim = CannonAim; + } + Throttle = 0.0; + Steering = 0.0; + } + else + { + bCustomAiming = False; + if (PlayerController(Controller) != None) { + if (PlayerController(Controller).ViewTarget == MortarCamera) + PlayerController(Controller).SetViewTarget(Self); + if (PlayerController(Controller).ViewTarget == Self && PlayerController(Controller).bBehindView != PointOfView()) { + PlayerController(Controller).bBehindView = PointOfView(); + PlayerController(Controller).ClientSetBehindView(PointOfView()); + } + } + else if (IsDeployed() && AIController(Controller) != None) + { + bAltFocalPoint = true; + bCustomAiming = true; + if (Controller.Target != None) + CustomAim.Yaw = rotator(Controller.Target.Location - Location).Yaw; + CustomAim.Pitch = 8192; // 45 degrees up, to fire camera in the target's general direction + AltFocalPoint = Weapons[ActiveWeapon].Location + vector(CustomAim) * Weapons[ActiveWeapon].MaxRange(); + Controller.Focus = None; + } + else + { + bAltFocalPoint = false; + } + } } +simulated function FixFenderRotation(name BoneToSet, name BoneToCopy, byte i) +{ + local rotator NewRotation; + + // GEm: Still acts weirdly, unfortunately. + NewRotation = GetBoneRotation(BoneToSet); + NewRotation.Pitch = OldWheelPitch[i]-NewRotation.Pitch; + NewRotation.Roll = 32768; + NewRotation.Yaw = 32768; + SetBoneRotation(BoneToSet, NewRotation); + OldWheelPitch[i] = NewRotation.Pitch; +} -function ServerAim(int NewYaw) +// GEm: Could also copy location, but GetBoneCoords gives absolute, SetBoneLocation takes relative +simulated function CopyTreadRotationLeft() { - CustomAim.Yaw = NewYaw & 0xffff; - CustomAim.Pitch = NewYaw >>> 16; - CustomAim.Roll = 0; - CannonAim = CustomAim; + local rotator NewRotation; + + NewRotation = GetBoneRotation('LtTread_Wheel3'); + SetBoneDirection('LtTread_Wheel1', NewRotation, , , 1); + SetBoneDirection('LtTread_Wheel2', NewRotation, , , 1); + SetBoneDirection('LtTread_Wheel4', NewRotation, , , 1); } +simulated function CopyTreadRotationRight() +{ + local rotator NewRotation; -function bool CanAttack(Actor Other) + NewRotation = GetBoneRotation('RtTread_Wheel3'); + SetBoneDirection('RtTread_Wheel1', NewRotation, , , 1); + SetBoneDirection('RtTread_Wheel2', NewRotation, , , 1); + SetBoneDirection('RtTread_Wheel4', NewRotation, , , 1); +} + +function ServerAim(int NewYaw) { - local Pawn P; + CustomAim.Yaw = NewYaw & 0xffff; + CustomAim.Pitch = NewYaw >>> 16; + CustomAim.Roll = 0; + CannonAim = CustomAim; +} - // if far away or objective, check if can hit with deployed artillery - if (DeployState == DS_Undeployed && (Controller.PlayerReplicationInfo.Team == None || Controller.PlayerReplicationInfo.Team.Size > 1) && VSize(Other.Location - Location) > 1000.0 && (VSize(Velocity) > MaxDeploySpeed || CanDeploy()) && (Other.IsA('Pawn') || Other.IsA('GameObjective'))) - { - P = Pawn(Other); - if ((P == None || P.bStationary || (!P.bCanFly && VSize(Other.Location - Location) > 5000.0)) && Weapons[1].CanAttack(Other)) { - bBotDeploy = True; - return true; - } - } - return Super.CanAttack(Other); +function bool CanAttack(Actor Other) +{ + local Pawn P; + local bool bResult; + + // if far away or objective, check if can hit with deployed artillery + if (DeployState == DS_Undeployed && (Controller.PlayerReplicationInfo.Team == None || Controller.PlayerReplicationInfo.Team.Size > 1) && VSize(Other.Location - Location) > 1000.0 && (VSize(Velocity) > MaxDeploySpeed || CanDeploy()) && (Other.IsA('Pawn') || Other.IsA('GameObjective'))) + { + P = Pawn(Other); + if ((P == None || P.bStationary || (!P.bCanFly && VSize(Other.Location - Location) > 5000.0)) && Weapons[1].CanAttack(Other)) { + BotTarget = Other; + bBotDeploy = True; + return true; + } + } + + bResult = Super.CanAttack(Other); + /*if (ActiveWeapon == 1) + log(self@Weapons[ActiveWeapon]@"CanAttack"@Other@bResult@"Bot orders"@Bot(Instigator.Controller).GoalString);*/ + return bResult; } function ShouldTargetMissile(Projectile P) { - if (Health < 200 && Bot(Controller) != None && Level.Game.GameDifficulty > RandRange(4, 8) && VSize(P.Location - Location) < VSize(P.Velocity)) { - // not much health left, so get out to avoid getting killed - KDriverLeave(false); - TeamUseTime = Level.TimeSeconds + 4; - return; - } - - // otherwise maybe try shooting down incoming AVRiLs if not deployed - if (DeployState == DS_Undeployed) - Super(ONSWheeledCraft).ShouldTargetMissile(P); + if (Health < 200 && Bot(Controller) != None && Level.Game.GameDifficulty > RandRange(4, 8) && VSize(P.Location - Location) < VSize(P.Velocity)) { + // not much health left, so get out to avoid getting killed + KDriverLeave(false); + TeamUseTime = Level.TimeSeconds + 4; + return; + } + + // otherwise maybe try shooting down incoming AVRiLs if not deployed + if (DeployState == DS_Undeployed) + Super(ONSWheeledCraft).ShouldTargetMissile(P); } @@ -247,343 +357,462 @@ Check whether the SPMA can be deployed. */ simulated function bool CanDeploy(optional bool bNoMessage) { - local int i; - local bool bOneUnstable; - - if (VSize(Velocity) > MaxDeploySpeed) { - if (!bNoMessage && PlayerController(Controller) != None) - PlayerController(Controller).ReceiveLocalizedMessage(class'UT3DeployMessage', 0); - return false; - } - - if (IsFiring()) - return false; - - Rise = 0; - for (i = 0; i < Wheels.Length; i++) { - if (!Wheels[i].bWheelOnGround) { - if (!bOneUnstable) { - // ignore if just one of the six wheels is unstable - bOneUnstable = True; - continue; - } - if (!bNoMessage && PlayerController(Controller) != None) - PlayerController(Controller).ReceiveLocalizedMessage(class'UT3DeployMessage', 1); - return false; - } - } - return true; + local int i; + local bool bOneUnstable; + + if (VSize(Velocity) > MaxDeploySpeed) { + if (!bNoMessage && PlayerController(Controller) != None) + PlayerController(Controller).ReceiveLocalizedMessage(class'UT3DeployMessage', 0); + return false; + } + + if (IsFiring()) + return false; + + Rise = 0; + for (i = 0; i < Wheels.Length; i++) { + if (!Wheels[i].bWheelOnGround) { + if (!bOneUnstable) { + // ignore if just one of the six wheels is unstable + bOneUnstable = True; + continue; + } + if (!bNoMessage && PlayerController(Controller) != None) + PlayerController(Controller).ReceiveLocalizedMessage(class'UT3DeployMessage', 1); + return false; + } + } + return true; } function bool IsDeployed() { - return DeployState == DS_Deployed; + return DeployState == DS_Deployed; } function ServerToggleDeploy() { - if (CanDeploy()) { - GotoState('Deploying'); - } + if (CanDeploy()) + GotoState('Deploying'); } function ChangeDeployState(EDeployState NewState) { - DeployState = NewState; - Level.NetUpdateTime = Level.TimeSeconds - 1; - DeployStateChanged(); + DeployState = NewState; + Level.NetUpdateTime = Level.TimeSeconds - 1; + DeployStateChanged(); } simulated function PostNetReceive() { - Super.PostNetReceive(); - - if (LastDeployState != DeployState) { - LastDeployState = DeployState; - DeployStateChanged(); - } + Super.PostNetReceive(); + + if (LastDeployState != DeployState) + { + LastDeployState = DeployState; + DeployStateChanged(); + } } simulated function DeployStateChanged() { - switch (DeployState) { - case DS_Deploying: - LastDeployStartTime = Level.TimeSeconds; - SetVehicleDeployed(); - if (DeploySound != None) - PlaySound(DeploySound, SLOT_Misc, 1.0); - break; - - case DS_Deployed: - break; - - case DS_UnDeploying: - LastDeployStartTime = Level.TimeSeconds; - SetVehicleUndeploying(); - if (UndeploySound != None) - PlaySound(UndeploySound, SLOT_Misc, 1.0); - break; - - case DS_Undeployed: - SetVehicleUnDeployed(); - break; - } + switch (DeployState) + { + case DS_Deploying: + LastDeployStartTime = Level.TimeSeconds; + SetVehicleDeployed(); + if (DeploySound != None) + PlaySound(DeploySound, SLOT_Misc, 1.0); + break; + + case DS_Deployed: + BotRetryTarget(); + break; + + case DS_UnDeploying: + LastDeployStartTime = Level.TimeSeconds; + SetVehicleUndeploying(); + if (UndeploySound != None) + PlaySound(UndeploySound, SLOT_Misc, 1.0); + break; + + case DS_Undeployed: + SetVehicleUnDeployed(); + break; + } } simulated function SetVehicleDeployed() { - local int i; - - // play shutdown sound - if (Driver != None && ShutdownSound != None) - PlaySound(ShutdownSound, SLOT_None, 1.0); - if (AmbientSound != None) - AmbientSound = None; - - // HACK: don't play engine sounds when entering/leaving while deployed - IdleSound = None; - StartupSound = None; - ShutdownSound = None; - - // make immobile - SetPhysics(PHYS_None); - SetBase(None); // Ensure we are not hooked on something (eg another vehicle) - bStationary = true; - bMovable = false; - bCannotBeBased = true; - SetActiveWeapon(1); - Weapons[1].bForceCenterAim = False; - Weapons[1].FireCountdown = DeployTime; - - // stop wheels and dirt effects - for (i = 0; i < Wheels.Length; ++i) { - Wheels[i].SpinVel = 0.0; - Wheels[i].SlipVel = 0.0; - } + local int i; + + // play shutdown sound + if (Driver != None && ShutdownSound != None) + PlaySound(ShutdownSound, SLOT_None, 1.0); + if (AmbientSound != None) + AmbientSound = None; + + // HACK: don't play engine sounds when entering/leaving while deployed + IdleSound = None; + StartupSound = None; + ShutdownSound = None; + + // make immobile + SetPhysics(PHYS_None); + SetBase(None); // Ensure we are not hooked on something (eg another vehicle) + bStationary = true; + bMovable = false; + bCannotBeBased = true; + SetActiveWeapon(1); + Weapons[1].bForceCenterAim = False; + Weapons[1].FireCountdown = DeployTime; + + // stop wheels and dirt effects + for (i = 0; i < Wheels.Length; ++i) { + Wheels[i].SpinVel = 0.0; + Wheels[i].SlipVel = 0.0; + } } simulated function SetVehicleUndeployed() { - // restore engine sounds after undeplocing - IdleSound = default.IdleSound; - StartupSound = default.StartupSound; - ShutdownSound = default.ShutdownSound; - - if (Driver != None && Health > 0) { - // play startup sounds - AmbientSound = IdleSound; - if (StartupSound != None) - PlaySound(StartupSound, SLOT_None, 1.0); - } - - // restore mobility - bCannotBeBased = false; - bStationary = false; - bMovable = true; - SetPhysics(PHYS_Karma); - SetActiveWeapon(0); + // restore engine sounds after undeplocing + IdleSound = default.IdleSound; + StartupSound = default.StartupSound; + ShutdownSound = default.ShutdownSound; + + if (Driver != None && Health > 0) { + // play startup sounds + AmbientSound = IdleSound; + if (StartupSound != None) + PlaySound(StartupSound, SLOT_None, 1.0); + } + + // restore mobility + bCannotBeBased = false; + bStationary = false; + bMovable = true; + SetPhysics(PHYS_Karma); + SetActiveWeapon(0); } simulated function SetVehicleUndeploying() { - Weapons[1].bForceCenterAim = True; - if (MortarCamera != None) - MortarCamera.ShotDown(); + Weapons[1].bForceCenterAim = True; + //log(self@Instigator.Controller.GetTeamNum()@"SetVehicleUndeploying: Camera disabled"@MortarCamera); + if (MortarCamera != None) + MortarCamera.ShotDown(); +} + +function BotRetryTarget() +{ + local Bot B; + + if (Instigator == None) + return; + + B = Bot(Instigator.Controller); + + if (B == None) + return; + + if (BotTarget != None && CanAttack(BotTarget)) + { + //log(self@Instigator.Controller.GetTeamNum()@"BotRetryTarget: resuming firing at"@BotTarget); + ChooseFireAt(BotTarget); + } + else if (B.Enemy != None && CanAttack(B.Enemy)) + { + //log(self@Instigator.Controller.GetTeamNum()@"BotRetryTarget: Lost orginal target, but found new:"@B.Enemy); + ChooseFireAt(B.Enemy); + } + else + { + //log(self@Instigator.Controller.GetTeamNum()@"BotRetryTarget: Lost target, welp, that was wasted time..."); + bBotDeploy = true; + } + } function int LimitPitch(int Pitch) { - if (MortarCamera != None) - return Clamp(Pitch, -16384, 16383); - - return Super(ONSWheeledCraft).LimitPitch(Pitch); + if (MortarCamera != None) + return Clamp(Pitch, -16384, 16383); + + return Super(ONSWheeledCraft).LimitPitch(Pitch); } function VehicleFire(bool bWasAltFire) { - if (MortarCamera != None && (bWasAltFire || !MortarCamera.bDeployed && !MortarCamera.bShotDown)) { - bWasAltFire = True; - if (!MortarCamera.bDeployed) { - if (AIController(Instigator.Controller) != None) - return; - - MortarCamera.Deploy(); - CustomAim = Weapons[ActiveWeapon].WeaponFireRotation; - Weapons[ActiveWeapon].FireCountdown = Weapons[ActiveWeapon].AltFireInterval; - return; - } - else if (AIController(Instigator.Controller) != None) { - bWasAltFire = false; - } - else { - MortarCamera.ShotDown(); - return; - } - } - Super(ONSWheeledCraft).VehicleFire(bWasAltFire); + if (MortarCamera != None && (bWasAltFire || !MortarCamera.bDeployed && !MortarCamera.bShotDown)) { + bWasAltFire = True; + if (!MortarCamera.bDeployed) { + if (AIController(Instigator.Controller) != None) + return; + + MortarCamera.Deploy(); + CustomAim = Weapons[ActiveWeapon].WeaponFireRotation; + Weapons[ActiveWeapon].FireCountdown = Weapons[ActiveWeapon].AltFireInterval; + return; + } + else if (AIController(Instigator.Controller) != None) { + bWasAltFire = false; + } + else { + //log(self@Instigator.Controller.GetTeamNum()@"VehicleFire: No AI controller, Camera disabled"); + MortarCamera.ShotDown(); + return; + } + } + Super(ONSWheeledCraft).VehicleFire(bWasAltFire); } simulated function PrevWeapon() { - Super(ONSWheeledCraft).PrevWeapon(); // skip ONSArtillery implementation + Super(ONSWheeledCraft).PrevWeapon(); // skip ONSArtillery implementation } simulated function NextWeapon() { - Super(ONSWheeledCraft).NextWeapon(); // skip ONSArtillery implementation + Super(ONSWheeledCraft).NextWeapon(); // skip ONSArtillery implementation } event ApplyFireImpulse(bool bAltFire) { - Super(ONSWheeledCraft).ApplyFireImpulse(bAltFire); // skip ONSArtillery implementation + Super(ONSWheeledCraft).ApplyFireImpulse(bAltFire); // skip ONSArtillery implementation } function Died(Controller Killer, class damageType, vector HitLocation) { - bMovable = True; - SetPhysics(PHYS_Karma); // ONSVehicle expects PHYS_Karma when dying - if (MortarCamera != None) - MortarCamera.ShotDown(); - - Super.Died(Killer, damageType, HitLocation); + bMovable = True; + SetPhysics(PHYS_Karma); // ONSVehicle expects PHYS_Karma when dying + //log(self@Instigator.Controller.GetTeamNum()@"Died: Camera disabled"@MortarCamera); + if (MortarCamera != None) + MortarCamera.ShotDown(); + + Super.Died(Killer, damageType, HitLocation); } state Deployed { - function MayUndeploy() - { - ServerToggleDeploy(); - } - - function ServerToggleDeploy() - { - if (!IsFiring()) - GotoState('Undeploying'); - } - - /** - Makes sure the wheels are still on stable ground, otherwise undeploys. - */ - function CheckStability() - { - local int i, Count; - local vector WheelLoc, XAxis, YAxis, ZAxis, HL, HN; - - GetAxes(Rotation, XAxis, YAxis, ZAxis); - - for (i = 0; i < Wheels.Length && Count <= 1; i++) { - WheelLoc = Location + (Wheels[i].WheelPosition >> Rotation); - if (Trace(HL, HN, WheelLoc - (ZAxis * (Wheels[i].WheelRadius + Wheels[i].SuspensionTravel)), WheelLoc, false, vect(1,1,1)) == None) - Count++; - } - if (Count > 1) { - // unstable! - SetPhysics(PHYS_Karma); - GotoState('UnDeploying'); - return; - } - } - - function BeginState() - { - ChangeDeployState(DS_Deployed); - if (Role == ROLE_Authority) - SetTimer(1.0, true); // start checking stability - } - - function EndState() - { - SetTimer(0.0, false); - } + function MayUndeploy() + { + ServerToggleDeploy(); + } + + function ServerToggleDeploy() + { + if (!IsFiring()) + GotoState('Undeploying'); + } + + /** + Makes sure the wheels are still on stable ground, otherwise undeploys. + */ + function CheckStability() + { + local int i, Count; + local vector WheelLoc, XAxis, YAxis, ZAxis, HL, HN; + + GetAxes(Rotation, XAxis, YAxis, ZAxis); + + for (i = 0; i < Wheels.Length && Count <= 1; i++) { + WheelLoc = Location + (Wheels[i].WheelPosition >> Rotation); + if (Trace(HL, HN, WheelLoc - (ZAxis * (Wheels[i].WheelRadius + Wheels[i].SuspensionTravel)), WheelLoc, false, vect(1,1,1)) == None) + Count++; + } + if (Count > 1) { + // unstable! + SetPhysics(PHYS_Karma); + GotoState('UnDeploying'); + return; + } + } + + function BeginState() + { + ChangeDeployState(DS_Deployed); + if (Role == ROLE_Authority) + SetTimer(1.0, true); // start checking stability + } + + function EndState() + { + SetTimer(0.0, false); + } } state UnDeploying { - ignores ServerToggleDeploy; - - function BeginState() - { - /* 100GPing100 BEGIN */ - PlayAnim('UnDeploying', 1.0, 0.1); - /* 100GPing100 END */ - SetTimer(UnDeployTime, False); - ChangeDeployState(DS_UnDeploying); - } - - function Timer() - { - ChangeDeployState(DS_UnDeployed); - GotoState(''); - } + ignores ServerToggleDeploy; + + function BeginState() + { + /* 100GPing100 BEGIN */ + PlayAnim('UnDeploying', 1.0, 0.1); + /* 100GPing100 END */ + SetTimer(UnDeployTime, False); + ChangeDeployState(DS_UnDeploying); + } + + function Timer() + { + ChangeDeployState(DS_UnDeployed); + GotoState(''); + } } state Deploying { - ignores ServerToggleDeploy; - - function BeginState() - { - /* 100GPing100 BEGIN */ - PlayAnim('Deploying', 1.0, 0.1); - /* 100GPing100 END */ - SetTimer(DeployTime, False); - ChangeDeployState(DS_Deploying); - } - - function Timer() - { - GotoState('Deployed'); - } + ignores ServerToggleDeploy; + + function BeginState() + { + /* 100GPing100 BEGIN */ + PlayAnim('Deploying', 1.0, 0.1); + /* 100GPing100 END */ + SetTimer(DeployTime, False); + ChangeDeployState(DS_Deploying); + } + + function Timer() + { + GotoState('Deployed'); + } } simulated event Destroyed() { - if (MortarCamera != None) - MortarCamera.ShotDown(); + //log(self@Instigator.Controller.GetTeamNum()@"Destroyed: Camera disabled"@MortarCamera); + if (MortarCamera != None) + MortarCamera.ShotDown(); - Super(ONSWheeledCraft).Destroyed(); + if (TreadPanner != None ) + { + Level.ObjectPool.FreeObject(TreadPanner); + TreadPanner = None; + } + + Super(ONSWheeledCraft).Destroyed(); } function DriverLeft() { - if (MortarCamera != None) - MortarCamera.ShotDown(); - - /* 100GPing100 BEGIN */ - PlayAnim('GetOut', 1.0, 0.1); - /* 100GPing100 END */ - - Super(ONSWheeledCraft).DriverLeft(); + //log(self@"DriverLeft: Camera disabled"@MortarCamera); + if (MortarCamera != None) + MortarCamera.ShotDown(); + + /* 100GPing100 BEGIN */ + PlayAnim('GetOut', 1.0, 0.1); + /* 100GPing100 END */ + + Super(ONSWheeledCraft).DriverLeft(); } /* 100GPing100 BEGIN */ event PostBeginPlay() { - PlayAnim('InActiveStill', 1.0, 0.0); - - super.PostBeginPlay(); + PlayAnim('InActiveStill', 1.0, 0.0); + + if ( Level.NetMode != NM_DedicatedServer ) + SetupTreads(); + + super.PostBeginPlay(); +} + +simulated function SetupTreads() +{ + TreadPanner = VariableTexPanner(Level.ObjectPool.AllocateObject(class'VariableTexPanner')); + if (TreadPanner != None) + { + TreadPanner.Material = Skins[1]; + TreadPanner.PanDirection = rot(0, 16384, 0); + TreadPanner.PanRate = 0.0; + Skins[1] = TreadPanner; + } +} + +simulated event DrivingStatusChanged() +{ + Super.DrivingStatusChanged(); + + if (!bDriving && TreadPanner != None) + TreadPanner.PanRate = 0.0; } event KDriverEnter(Pawn P) { - PlayAnim('GetIn', 1.0, 0.0); - - super.KDriverEnter(P); + PlayAnim('GetIn', 1.0, 0.0); + + super.KDriverEnter(P); } /* 100GPing100 END */ +simulated event SVehicleUpdateParams() +{ + local int i; + + Super(ONSVehicle).SVehicleUpdateParams(); + + for(i=0; i> Rotation) ); + BrakeLight[i].SetBase(self); + BrakeLight[i].SetRelativeRotation( rot(0,32768,0) ); + BrakeLight[i].Skins[0] = BrakeLightMaterial; + } + } + } +} + +function TakeDamage(int Damage, Pawn instigatedBy, Vector Hitlocation, Vector Momentum, class DamageType) +{ //Make sure you don't hurt yourself with a combo + if (InstigatedBy != self || DamageType == VehicleDrowningDamType) + Super.TakeDamage(Damage, instigatedBy, Hitlocation, Momentum, damageType); +} + +/*function ChooseFireAt(Actor A) +{ + if (ActiveWeapon == 1) + log(self@Instigator.Controller.GetTeamNum()@"ChooseFireAt"@A); + Super.ChooseFireAt(A); +}*/ + //============================================================================= // Default values @@ -591,133 +820,184 @@ event KDriverEnter(Pawn P) defaultproperties { + Health = 800 + HealthMax = 800 + /* 100GPing100 BEGIN */ - - Mesh = SkeletalMesh'UT3SPMAAnims.SPMA'; + + Mesh = SkeletalMesh'UT3VH_SPMA_Anims.SK_VH_SPMA'; RedSkin = Shader'UT3SPMATex.Body.RedSkin'; BlueSkin = Shader'UT3SPMATex.Body.BlueSkin'; - + Skins(1) = Shader'UT3SPMATex.Threads.ThreadsSkin' + FlagBone = 'Body'; - - DriverWeapons = (); - DriverWeapons(0) = (WeaponClass=class'UT3HellfireSPMASideGun',WeaponBone=body); - DriverWeapons(1) = (WeaponClass=class'UT3HellfireSPMACannon',WeaponBone=MainTurret_Yaw); - - Wheels = (); - Begin Object Class=SVehicleWheel Name=LWheel1 - BoneName="LtFrontTire" - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - BoneOffset=(X=0.0,Y=0.0,Z=0.0) - WheelRadius=40 - bPoweredWheel=True - bHandbrakeWheel=True - SteerType=VST_Steered - SupportBoneName="LtFrontTire" - SupportBoneAxis=AXIS_X - End Object - Wheels(0)=SVehicleWheel'LWheel1' - - Begin Object Class=SVehicleWheel Name=LWheel2 - BoneName="LtTread_Wheel2" - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - BoneOffset=(X=0.0,Y=0.0,Z=0.0) - WheelRadius=21 - bPoweredWheel=True - bHandbrakeWheel=True - SteerType=VST_Fixed - SupportBoneName="LtTread_MIdStrut" - SupportBoneAxis=AXIS_X - End Object - Wheels(1)=SVehicleWheel'LWheel2' - - Begin Object Class=SVehicleWheel Name=LWheel3 - BoneName="LtTread_Wheel3" - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - BoneOffset=(X=0.0,Y=0.0,Z=0.0) - WheelRadius=21 - bPoweredWheel=True - bHandbrakeWheel=True - SteerType=VST_Fixed - SupportBoneName="LtTread_MIdStrut" - SupportBoneAxis=AXIS_X - End Object - Wheels(2)=SVehicleWheel'LWheel3' - + + DriverWeapons = (); + DriverWeapons(0) = (WeaponClass=class'UT3HellfireSPMASideGun',WeaponBone="SecondaryTurret_YawLift"); + DriverWeapons(1) = (WeaponClass=class'UT3HellfireSPMACannon',WeaponBone="MainTurret_Yaw"); + + Wheels = (); + Begin Object Class=SVehicleWheel Name=LWheel1 + BoneName="LtFrontTire" + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + BoneOffset=(X=0.0,Y=-17.0,Z=0.0) + WheelRadius=40 + bPoweredWheel=True + bHandbrakeWheel=True + SteerType=VST_Steered + End Object + Wheels(0)=SVehicleWheel'LWheel1' + + Begin Object Class=SVehicleWheel Name=LWheel2 + BoneName="LtTread_Wheel3" + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + BoneOffset=(X=30.0,Y=15.0,Z=18.0) // GEm: Or Y is 4/15, Z is 5/18 (more truthful but not symmetric) + WheelRadius=40 + bPoweredWheel=True + bHandbrakeWheel=True + bTrackWheel=True + bLeftTrack=True + SuspensionTravel=10.0 + SuspensionMaxRenderTravel=0.0 + SuspensionOffset=0.0 + SteerType=VST_Fixed + End Object + Wheels(1)=SVehicleWheel'LWheel2' + + Begin Object Class=SVehicleWheel Name=RWheel2 + BoneName="RtTread_Wheel3" + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + BoneOffset=(X=30.0,Y=-15.0,Z=18.0) + WheelRadius=40 + bPoweredWheel=True + bHandbrakeWheel=True + bTrackWheel=True + SuspensionTravel=10.0 + SuspensionMaxRenderTravel=0.0 + SuspensionOffset=0.0 + SteerType=VST_Fixed + End Object + Wheels(2)=SVehicleWheel'RWheel2' + Begin Object Class=SVehicleWheel Name=RWheel1 - BoneName="RtFrontTire" - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - BoneOffset=(X=0.0,Y=0.0,Z=0.0) - WheelRadius=40 - bPoweredWheel=True - bHandbrakeWheel=True - SteerType=VST_Steered - SupportBoneName="RtFrontTire" - SupportBoneAxis=AXIS_X - End Object - Wheels(3)=SVehicleWheel'RWheel1' + BoneName="RtFrontTire" + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + BoneOffset=(X=0.0,Y=17.0,Z=0.0) + WheelRadius=40 + bPoweredWheel=True + bHandbrakeWheel=True + SteerType=VST_Steered + End Object + Wheels(3)=SVehicleWheel'RWheel1' + + /* 100GPing100 END */ + + VehiclePositionString="in a Hellfire SPMA" + VehicleNameString = "UT3 Hellfire SPMA" + + DeployIconCoords = (X1=2,Y1=371,X2=124,Y2=115) + + PassengerWeapons = () + FireImpulse = (X=0) // sidegun shouldn't recoil and main cannon is fired when deployed + bAllowViewChange = false // who would want to use it 1st-person anyway + + GroundSpeed = 650.0 + + bStasis = False // would interfer with aiming when deployed + + bNetNotify = True + DeployState = DS_Undeployed + LastDeployState = DS_Undeployed + + MaxDeploySpeed = 100.0 + DeployTime = 2.1 + UndeployTime = 2.0 + DeploySound = Sound'UT3SPMA.SPMADeploy' + UndeploySound = Sound'UT3SPMA.SPMADeploy' + + SoundVolume = 255 + SoundRadius = 300 + IdleSound = Sound'UT3SPMA.SPMAEngineIdle' + StartUpSound = Sound'UT3SPMA.SPMAEngineStart' + ShutDownSound = Sound'UT3SPMA.SPMAEngineStop' + DamagedEffectHealthSmokeFactor=0.65 //0.5 + DamagedEffectHealthFireFactor=0.40 //0.25 + DamagedEffectFireDamagePerSec=2.0 //0.75 + ImpactDamageSounds(0) = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Collide01'; + ImpactDamageSounds(1) = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Collide01'; + ImpactDamageSounds(2) = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Collide01'; + ImpactDamageSounds(3) = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Collide01'; + ImpactDamageSounds(4) = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Collide01'; + ImpactDamageSounds(5) = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Collide01'; + ImpactDamageSounds(6) = Sound'UT3A_Vehicle_Goliath.Sounds.A_Vehicle_Goliath_Collide01'; + ExplosionSounds(0) = Sound'UT3SPMA.A_Vehicle_SPMA_Explode01'; + ExplosionSounds(1) = Sound'UT3SPMA.A_Vehicle_SPMA_Explode01'; + ExplosionSounds(2) = Sound'UT3SPMA.A_Vehicle_SPMA_Explode01'; + ExplosionSounds(3) = Sound'UT3SPMA.A_Vehicle_SPMA_Explode01'; + ExplosionSounds(4) = Sound'UT3SPMA.A_Vehicle_SPMA_Explode01'; + bDrawDriverInTP = false + DriverDamageMult = 0.0 + TreadVelocityScale = 30.0 + + ChassisTorqueScale=1.2 //1.25 + MaxBrakeTorque=25.0 //20.0 + SteerSpeed=70 //110 + TurnDamping=50 //35 + HandbrakeThresh=9000000 + MinBrakeFriction=6.5 //4.0 + EngineBrakeRPMScale=0.008 + TransRatio=0.18 + ChangeUpPoint=105000 - Begin Object Class=SVehicleWheel Name=RWheel2 - BoneName="RtTread_Wheel2" - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - BoneOffset=(X=0.0,Y=0.0,Z=0.0) - WheelRadius=21 - bPoweredWheel=True - bHandbrakeWheel=True - SteerType=VST_Fixed - SupportBoneName="RtTread_MIdStrut" - SupportBoneAxis=AXIS_X - End Object - Wheels(4)=SVehicleWheel'RWheel2' - - Begin Object Class=SVehicleWheel Name=RWheel3 - BoneName="RtTread_Wheel3" - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - BoneOffset=(X=0.0,Y=0.0,Z=0.0) - WheelRadius=21 - bPoweredWheel=True - bHandbrakeWheel=True - SteerType=VST_Fixed - SupportBoneName="RtTread_MIdStrut" - SupportBoneAxis=AXIS_X - End Object - Wheels(5)=SVehicleWheel'RWheel3' + MomentumMult=0.1 //2.0 + bDoStuntInfo=False //true - /* 100GPing100 END */ + Begin Object Class=KarmaParamsRBFull Name=KParams0 + KStartEnabled=True + KFriction=0.5 + KLinearDamping=0.05 + KAngularDamping=0.05 + KImpactThreshold=500 + KMaxSpeed=1000 + bKNonSphericalInertia=True + bHighDetailOnly=False + bClientOnly=False + bKDoubleTickRate=True + KInertiaTensor(0)=1.0 + KInertiaTensor(1)=0.0 + KInertiaTensor(2)=0.0 + KInertiaTensor(3)=3.0 + KInertiaTensor(4)=0.0 + KInertiaTensor(5)=3.5 + KCOMOffset=(X=1.5,Y=0.0,Z=-0.5) + bDestroyOnWorldPenetrate=True + bDoSafetime=True + Name="KParams0" + End Object + KParams=KarmaParams'KParams0' + + ExitPositions(0)=(X=50,Y=-165,Z=30) + ExitPositions(1)=(X=50,Y=165,Z=30) + ExitPositions(2)=(X=50,Y=-165,Z=-30) + ExitPositions(3)=(X=50,Y=165,Z=-30) + + //HeadlightCoronaOffset(0)=(X=213,Y=85,Z=43) //(X=195,Y=85,Z=70) + //HeadlightCoronaOffset(1)=(X=213,Y=-85,Z=43) //(X=195,Y=-85,Z=70) + //HeadlightCoronaMaterial=Material'EmitterTextures.Flares.EFlareOY' + //HeadlightCoronaMaxSize=75 + HeadlightCoronaMaterial=None + + //HeadlightProjectorOffset=(X=290,Y=0,Z=40) + //HeadlightProjectorRotation=(Yaw=0,Pitch=-1500,Roll=0) + //HeadlightProjectorMaterial=Texture'VMVehicles-TX.NewPRVGroup.PRVProjector' + //HeadlightProjectorScale=0.65 + HeadlightProjectorMaterial=None - VehiclePositionString="in a Hellfire SPMA" - VehicleNameString = "UT3 Hellfire SPMA" - - DeployIconCoords = (X1=2,Y1=371,X2=124,Y2=115) - - //DriverWeapons(0) = (WeaponClass=class'UT3HellfireSPMASideGun',WeaponBone=SideGunAttach); - //DriverWeapons(1) = (WeaponClass=class'UT3HellfireSPMACannon',WeaponBone=CannonAttach); - PassengerWeapons = () - FireImpulse = (X=0) // sidegun shouldn't recoil and main cannon is fired when deployed - bAllowViewChange = false // who would want to use it 1st-person anyway - - GroundSpeed = 650.0 - - bStasis = False // would interfer with aiming when deployed - - bNetNotify = True - DeployState = DS_Undeployed - LastDeployState = DS_Undeployed - - MaxDeploySpeed = 100.0 - DeployTime = 2.1 - UndeployTime = 2.0 - DeploySound = Sound'SPMADeploy' - UndeploySound = Sound'SPMADeploy' - - SoundVolume = 255 - SoundRadius = 300 - IdleSound = Sound'SPMAEngineIdle' - StartUpSound = Sound'SPMAEngineStart' - ShutDownSound = Sound'SPMAEngineStop' + BrakeLightOffset(0)=(X=-145,Y=37,Z=55) + BrakeLightOffset(1)=(X=-145,Y=-37,Z=55) + BrakeLightMaterial=Material'EpicParticles.FlickerFlare' } diff --git a/Classes/UT3HellfireSPMAAirExplosion.uc b/Classes/UT3HellfireSPMAAirExplosion.uc index c1eb4a7..88562f5 100644 --- a/Classes/UT3HellfireSPMAAirExplosion.uc +++ b/Classes/UT3HellfireSPMAAirExplosion.uc @@ -1,125 +1,125 @@ -/****************************************************************************** -UT3HellfireSPMAAirExplosion - -Creation date: 2009-02-24 19:22 -Last change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ - -class UT3HellfireSPMAAirExplosion extends Emitter; - - -//============================================================================= -// Imports -//============================================================================= - -#exec obj load file=StaticMeshes/include/UT3SPMAEffects.usx package=UT3Style.SPMAEffects -#exec obj load file=VMParticleTextures.utx - - -//============================================================================= -// Default values -//============================================================================= - -defaultproperties -{ - Begin Object Class=MeshEmitter Name=FlashMesh - StaticMesh=StaticMesh'SPMAAirExplosionMesh' - RespawnDeadParticles=False - SpinParticles=True - UseSizeScale=True - UseRegularSizeScale=False - AutomaticInitialSpawning=False - CoordinateSystem=PTCS_Relative - MaxParticles=1 - UseRotationFrom=PTRS_Actor - StartSpinRange=(Z=(Max=1.0)) - SizeScale(1)=(RelativeTime=0.15,RelativeSize=2.0) - SizeScale(2)=(RelativeTime=1.0) - StartSizeRange=(X=(Min=0.18,Max=1.8),Y=(Min=2.4,Max=2.4),Z=(Min=2.4,Max=2.4)) - InitialParticlesPerSecond=1000.0 - SecondsBeforeInactive=0.0 - LifetimeRange=(Min=0.225,Max=0.225) - End Object - Emitters()=MeshEmitter'FlashMesh' - - Begin Object Class=SpriteEmitter Name=ExplosionSprite - FadeOut=True - RespawnDeadParticles=False - SpinParticles=True - UseSizeScale=True - UseRegularSizeScale=False - UniformSize=True - AutomaticInitialSpawning=False - BlendBetweenSubdivisions=True - AddVelocityFromOwner=True - MaxParticles=3 - StartLocationRange=(X=(Min=-10.0,Max=3.0),Y=(Min=-2.0,Max=2.0),Z=(Min=-2.0,Max=2.0)) - UseRotationFrom=PTRS_Actor - SpinsPerSecondRange=(X=(Min=-0.05,Max=0.05)) - StartSpinRange=(X=(Max=1.0)) - SizeScale(1)=(RelativeTime=0.225,RelativeSize=4.0) - SizeScale(2)=(RelativeTime=1.0,RelativeSize=3.0) - StartSizeRange=(X=(Min=40.0,Max=50.0)) - InitialParticlesPerSecond=50.0 - DrawStyle=PTDS_Brighten - Texture=Texture'VMParticleTextures.VehicleExplosions.VMExp2_framesANIM' - TextureUSubdivisions=4 - TextureVSubdivisions=4 - SecondsBeforeInactive=0.0 - LifetimeRange=(Min=0.525,Max=0.8) - AddVelocityMultiplierRange=(X=(Min=0.03,Max=0.03),Y=(Min=0.03,Max=0.03),Z=(Min=0.03,Max=0.03)) - End Object - Emitters(1)=SpriteEmitter'ExplosionSprite' - - Begin Object Class=SpriteEmitter Name=GlowSprite - FadeOut=True - RespawnDeadParticles=False - SpinParticles=True - UseSizeScale=True - UseRegularSizeScale=False - UniformSize=True - AutomaticInitialSpawning=False - MaxParticles=1 - StartSpinRange=(X=(Max=1.0)) - SizeScale()=(RelativeSize=1.0) - SizeScale(1)=(RelativeTime=0.3,RelativeSize=2.5) - SizeScale(2)=(RelativeTime=1.0,RelativeSize=0.8) - StartSizeRange=(X=(Min=100.0,Max=100.0)) - InitialParticlesPerSecond=1000.0 - DrawStyle=PTDS_Brighten - Texture=Texture'XEffects.GoldGlow' - SecondsBeforeInactive=0.0 - LifetimeRange=(Min=0.6,Max=0.6) - End Object - Emitters(2)=SpriteEmitter'GlowSprite' - - Begin Object Class=SpriteEmitter Name=Sparks - UseDirectionAs=PTDU_Up - UseColorScale=True - RespawnDeadParticles=False - UseSizeScale=True - UseRegularSizeScale=False - AutomaticInitialSpawning=False - Acceleration=(Z=-1000.0) - ColorScale()=(RelativeTime=0.44,Color=(B=192,G=192,R=255,A=255)) - ColorScale(1)=(RelativeTime=1.0) - FadeOutStartTime=0.44 - MaxParticles=15 - SizeScale()=(RelativeSize=8.0) - SizeScale(1)=(RelativeTime=0.25,RelativeSize=2.25) - SizeScale(2)=(RelativeTime=1.0,RelativeSize=0.2) - StartSizeRange=(X=(Min=0.5,Max=10.0),Y=(Min=3.0,Max=10.0),Z=(Min=0.5,Max=10.0)) - InitialParticlesPerSecond=1000.0 - DrawStyle=PTDS_Brighten - Texture=Texture'SPMASpark' - SecondsBeforeInactive=0.0 - LifetimeRange=(Min=0.4,Max=1.0) - StartVelocityRange=(X=(Min=200.0,Max=700.0),Y=(Min=-200.0,Max=200.0),Z=(Min=-200.0,Max=200.0)) - End Object - Emitters(3)=SpriteEmitter'Sparks' - - AmbientGlow=64 - bNoDelete=False - AutoDestroy=True -} +/****************************************************************************** +UT3HellfireSPMAAirExplosion + +Creation date: 2009-02-24 19:22 +Last change: $Id$ +Copyright (c) 2009, 2013 Wormbo, GreatEmerald +******************************************************************************/ + +class UT3HellfireSPMAAirExplosion extends Emitter; + + +//============================================================================= +// Imports +//============================================================================= + +#exec obj load file=UT3SPMAEffects.usx +#exec obj load file=VMParticleTextures.utx + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + Begin Object Class=MeshEmitter Name=FlashMesh + StaticMesh=StaticMesh'SPMAAirExplosionMesh' + RespawnDeadParticles=False + SpinParticles=True + UseSizeScale=True + UseRegularSizeScale=False + AutomaticInitialSpawning=False + CoordinateSystem=PTCS_Relative + MaxParticles=1 + UseRotationFrom=PTRS_Actor + StartSpinRange=(Z=(Max=1.0)) + SizeScale(1)=(RelativeTime=0.15,RelativeSize=2.0) + SizeScale(2)=(RelativeTime=1.0) + StartSizeRange=(X=(Min=0.18,Max=1.8),Y=(Min=2.4,Max=2.4),Z=(Min=2.4,Max=2.4)) + InitialParticlesPerSecond=1000.0 + SecondsBeforeInactive=0.0 + LifetimeRange=(Min=0.225,Max=0.225) + End Object + Emitters()=MeshEmitter'FlashMesh' + + Begin Object Class=SpriteEmitter Name=ExplosionSprite + FadeOut=True + RespawnDeadParticles=False + SpinParticles=True + UseSizeScale=True + UseRegularSizeScale=False + UniformSize=True + AutomaticInitialSpawning=False + BlendBetweenSubdivisions=True + AddVelocityFromOwner=True + MaxParticles=3 + StartLocationRange=(X=(Min=-10.0,Max=3.0),Y=(Min=-2.0,Max=2.0),Z=(Min=-2.0,Max=2.0)) + UseRotationFrom=PTRS_Actor + SpinsPerSecondRange=(X=(Min=-0.05,Max=0.05)) + StartSpinRange=(X=(Max=1.0)) + SizeScale(1)=(RelativeTime=0.225,RelativeSize=4.0) + SizeScale(2)=(RelativeTime=1.0,RelativeSize=3.0) + StartSizeRange=(X=(Min=40.0,Max=50.0)) + InitialParticlesPerSecond=50.0 + DrawStyle=PTDS_Brighten + Texture=Texture'VMParticleTextures.VehicleExplosions.VMExp2_framesANIM' + TextureUSubdivisions=4 + TextureVSubdivisions=4 + SecondsBeforeInactive=0.0 + LifetimeRange=(Min=0.525,Max=0.8) + AddVelocityMultiplierRange=(X=(Min=0.03,Max=0.03),Y=(Min=0.03,Max=0.03),Z=(Min=0.03,Max=0.03)) + End Object + Emitters(1)=SpriteEmitter'ExplosionSprite' + + Begin Object Class=SpriteEmitter Name=GlowSprite + FadeOut=True + RespawnDeadParticles=False + SpinParticles=True + UseSizeScale=True + UseRegularSizeScale=False + UniformSize=True + AutomaticInitialSpawning=False + MaxParticles=1 + StartSpinRange=(X=(Max=1.0)) + SizeScale()=(RelativeSize=1.0) + SizeScale(1)=(RelativeTime=0.3,RelativeSize=2.5) + SizeScale(2)=(RelativeTime=1.0,RelativeSize=0.8) + StartSizeRange=(X=(Min=100.0,Max=100.0)) + InitialParticlesPerSecond=1000.0 + DrawStyle=PTDS_Brighten + Texture=Texture'XEffects.GoldGlow' + SecondsBeforeInactive=0.0 + LifetimeRange=(Min=0.6,Max=0.6) + End Object + Emitters(2)=SpriteEmitter'GlowSprite' + + Begin Object Class=SpriteEmitter Name=Sparks + UseDirectionAs=PTDU_Up + UseColorScale=True + RespawnDeadParticles=False + UseSizeScale=True + UseRegularSizeScale=False + AutomaticInitialSpawning=False + Acceleration=(Z=-1000.0) + ColorScale()=(RelativeTime=0.44,Color=(B=192,G=192,R=255,A=255)) + ColorScale(1)=(RelativeTime=1.0) + FadeOutStartTime=0.44 + MaxParticles=15 + SizeScale()=(RelativeSize=8.0) + SizeScale(1)=(RelativeTime=0.25,RelativeSize=2.25) + SizeScale(2)=(RelativeTime=1.0,RelativeSize=0.2) + StartSizeRange=(X=(Min=0.5,Max=10.0),Y=(Min=3.0,Max=10.0),Z=(Min=0.5,Max=10.0)) + InitialParticlesPerSecond=1000.0 + DrawStyle=PTDS_Brighten + Texture=Texture'SPMASpark' + SecondsBeforeInactive=0.0 + LifetimeRange=(Min=0.4,Max=1.0) + StartVelocityRange=(X=(Min=200.0,Max=700.0),Y=(Min=-200.0,Max=200.0),Z=(Min=-200.0,Max=200.0)) + End Object + Emitters(3)=SpriteEmitter'Sparks' + + AmbientGlow=64 + bNoDelete=False + AutoDestroy=True +} diff --git a/Classes/UT3HellfireSPMACamera.uc b/Classes/UT3HellfireSPMACamera.uc index 8c0b9f6..704cb58 100644 --- a/Classes/UT3HellfireSPMACamera.uc +++ b/Classes/UT3HellfireSPMACamera.uc @@ -1,293 +1,342 @@ -/****************************************************************************** -UT3HellfireSPMACamera - -Creation date: 2009-02-12 22:53 -Last change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ - -class UT3HellfireSPMACamera extends ONSMortarCamera; - - -/** Camera view offset scale. Interpolated to 0 while deploying. */ -var float CVScale; - -/** Maximum target trace range from camera. */ -var float MaxTargetRange; - -var Sound DeploySound, DeployedAmbientSound; - -var bool bTargetOutOfRange; - -/** Player's aiming target location. */ -var vector TargetLocation, TargetNormal; - -var float NextAIDeployCheck; - - -var UT3HellfireSPMATrajectory Trajectory; - - -function BeginPlay() -{ - // set up deploy check/message - NextAIDeployCheck = Level.TimeSeconds + 1; - SetTimer(0.25, false); -} - -simulated function Destroyed() -{ - if (Trajectory != None) - Trajectory.Destroy(); - - Super.Destroyed(); -} - - -// unused by camera -function StartTimer(float Fuse); - -// send deployment hint -function Timer() -{ - if (Instigator != None && PlayerController(Instigator.Controller) != None && PlayerController(Instigator.Controller).ViewTarget == Self) { - PlayerController(Instigator.Controller).ReceiveLocalizedMessage(class'ONSOnslaughtMessage', 34); - } -} - -function bool IsStationary() -{ - return bDeployed; -} - -function Deploy() -{ - AnnounceTargetTime = Level.TimeSeconds + 1.5; - DeployCamera(); -} - - -simulated function DeployCamera() -{ - if (bShotDown) { - // can't deploy if already disconnected - return; - } - bDeployed = True; - Velocity = vect(0,0,0); - SetPhysics(PHYS_Projectile); - bOrientToVelocity = False; - DesiredRotation = rot(-16384,0,0); - RotationRate = rot(16384,16384,16384); - bRotateToDesired = True; - PlaySound(DeploySound); - AmbientSound = DeployedAmbientSound; - PlayAnim('Deploy', 1.0, 0.0); - if (Trajectory == None) - Trajectory = Spawn(class'UT3HellfireSPMATrajectory', Self, '', Location); -} - - -simulated event EndedRotation() -{ - bRotateToDesired = False; - RotationRate = rot(0,0,0); -} - - -simulated function Tick(float DeltaTime) -{ - local vector HitLocation, HitNormal; - - if (bShotDown || UT3HellfireSPMA(Instigator) == None || UT3HellfireSPMA(Instigator).Driver == None) { - if (!bShotDown) - ShotDown(); - Disable('Tick'); - return; - } - - if (!bDeployed) { - TargetLocation = Location; - } - else { - if (CVScale > 0) { - CVScale -= DeltaTime * 0.8; - if (CVScale <= 0) - CVScale = 0; - if (CVScale < 0.25 && !bOwnerNoSee) - bOwnerNoSee = true; - } - if (Instigator.IsLocallyControlled() && Instigator.IsHumanControlled()) { - if (Trace(HitLocation, HitNormal, Location + vector(Instigator.Controller.Rotation) * MaxTargetRange,, True) == None) { - HitLocation = Location + vector(Instigator.Controller.Rotation) * MaxTargetRange; - HitNormal = vect(0,0,1); - } - else { - HitLocation += HitNormal * 50.0; - } - UpdateTargetLocation(HitLocation, HitNormal); - UT3HellfireSPMACannon(Owner).PredictTarget(); - - if (Trajectory != None) { - if (UT3HellfireSPMACannon(Owner).bCanHitTarget && UT3HellfireSPMACannon(Owner).FireCountdown <= 0 && vector(UT3HellfireSPMACannon(Owner).WeaponFireRotation) dot vector(UT3HellfireSPMACannon(Owner).TargetRotation) > 0.99) - Trajectory.UpdateTrajectory(True, UT3HellfireSPMACannon(Owner).WeaponFireLocation, vector(UT3HellfireSPMACannon(Owner).WeaponFireRotation) * Lerp(UT3HellfireSPMACannon(Owner).WeaponCharge, UT3HellfireSPMACannon(Owner).MinSpeed, UT3HellfireSPMACannon(Owner).MaxSpeed), -PhysicsVolume.Gravity.Z, Region.Zone.KillZ); - else - Trajectory.UpdateTrajectory(False); - } - } - } - - if (Role < ROLE_Authority) - return; - // following code is serverside-only - - if (!bDeployed) { - if (Instigator != None && AIController(Instigator.Controller) != None && NextAIDeployCheck <= Level.TimeSeconds) { - if (Instigator.Controller.Target != None && FastTrace(Instigator.Controller.Target.Location)) { - Deploy(); - } - else { - NextAIDeployCheck = Level.TimeSeconds + 0.1; - } - } - } - else if (Level.TimeSeconds > AnnounceTargetTime) { - AnnounceTargetTime = Level.TimeSeconds + 1.5; - ShowSelf(True); - } -} - - -// obsolete -function SetTarget(vector loc); - -simulated function UpdateTargetLocation(vector NewTargetLocation, vector NewTargetNormal) -{ - local vector X, Y; - - TargetLocation = NewTargetLocation; - TargetNormal = NewTargetNormal; - - if (TargetBeam == None) { - TargetBeam = Spawn(class'UT3HellfireSPMATargetReticle', self,, Location, rot(0,0,0)); - TargetBeam.ArtilleryLocation = Instigator.Location; - } - if (TargetBeam != None) { - TargetBeam.SetLocation(TargetLocation); - - // reticle StaticMesh uses TargetNormal as Z direction - Y = Normal(TargetNormal Cross (TargetLocation - Instigator.Location)); - X = -(TargetNormal Cross Y); - TargetBeam.SetRotation(OrthoRotation(X, Y, TargetNormal)); - } -} - - -/** -Reveal the camera to enemy bots, giving them a chance to target it. -*/ -function ShowSelf(bool bCheckFOV) -{ - local Controller C; - local Bot B; - - if (!bShotDown) { - for (C = Level.ControllerList; C != None; C = C.NextController) { - B = Bot(C); - if (B != None && !B.SameTeamAs(Instigator.Controller) && B.Pawn != None && !B.Pawn.IsFiring() && (B.Enemy == None || B.Enemy == Instigator || B.Skill > 2.0 + 2.0 * FRand() && !B.EnemyVisible()) && (!bCheckFOV || Normal(B.FocalPoint - B.Pawn.Location) dot (Location - B.Pawn.Location) > B.Pawn.PeripheralVision) && B.LineOfSightTo(self)) { - // give B a chance to shoot at me - B.GoalString = "Destroy Mortar Camera"; - B.Target = self; - B.SwitchToBestWeapon(); - if (B.Pawn.CanAttack(self)) { - B.DoRangedAttackOn(self); - if (FRand() < 0.5) - break; - } - } - } - } -} - -// non-tick part of UT3 CalcCamera() -simulated function bool SpecialCalcView(out Actor ViewActor, out vector CameraLocation, out rotator CameraRotation, bool bBehindView) -{ - local vector HitNormal, HitLocation; - - ViewActor = Self; - - CameraLocation = Location + ((MortarCameraOffset * CVScale) >> CameraRotation); - if (Trace(HitLocation, HitNormal, CameraLocation, Location, false, vect(12,12,12)) != None) - CameraLocation = HitLocation; - - return True; -} - - -simulated function ShotDown() -{ - if (Instigator != None && PlayerController(Instigator.Controller) != None && PlayerController(Instigator.Controller).ViewTarget == Self) { - if (Instigator.Controller.Pawn != None) { - PlayerController(Instigator.Controller).bBehindView = Instigator.Controller.Pawn.PointOfView(); - PlayerController(Instigator.Controller).SetViewTarget(Instigator.Controller.Pawn); - } - else { - PlayerController(Instigator.Controller).bBehindView = False; - PlayerController(Instigator.Controller).SetViewTarget(Instigator.Controller); - } - } - - if (TargetBeam != None) - TargetBeam.Destroy(); - - if (Trajectory != None) - Trajectory.Destroy(); - - Super.ShotDown(); - bShotDown = True; -} - - -/** -Slightly modified verion of ONSMortarCamera::PostNetReceive() to account for -bDeployed reverting to False when shot down or manually disconnected. -*/ -simulated function PostNetReceive() -{ - Super(ONSMortarShell).PostNetReceive(); - - if (bDeployed != bLastDeployed) { - bLastDeployed = bDeployed; - if (bDeployed) - DeployCamera(); - } - - if (bShotDown != bLastShotDown) { - bLastShotDown = bShotDown; - if (bShotDown) - ShotDown(); - } - - if (RealLocation != LastRealLocation) { - SetLocation(RealLocation); - LastRealLocation = RealLocation; - } -} - - -//============================================================================= -// Default values -//============================================================================= - -defaultproperties -{ - MortarCameraOffset = (X=-256.0,Z=128.0) - CVScale = 1.0 - MaxTargetRange = 10240.0 - Speed = 4000.0 - - ImpactSound = Sound'SPMAShellFragmentExplode' - bOrientToVelocity = True - bAlwaysRelevant = True - TransientSoundRadius = 500.0 -} +/* + * Copyright © 2009 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3HellfireSPMACamera extends ONSMortarCamera; + + +/** Camera view offset scale. Interpolated to 0 while deploying. */ +var float CVScale; + +/** Maximum target trace range from camera. */ +var float MaxTargetRange; + +var Sound DeploySound, DeployedAmbientSound; + +var bool bTargetOutOfRange; + +/** Player's aiming target location. */ +var vector TargetLocation, TargetNormal; + +var float NextAIDeployCheck; + + +var UT3HellfireSPMATrajectory Trajectory; + + +function BeginPlay() +{ + // set up deploy check/message + NextAIDeployCheck = Level.TimeSeconds + 1; + SetTimer(0.25, false); +} + +simulated function Destroyed() +{ + if (Trajectory != None) + Trajectory.Destroy(); + + //log(self@Instigator.Controller.GetTeamNum()@"Destroyed"); + Super.Destroyed(); +} + + +// unused by camera +function StartTimer(float Fuse); + +// send deployment hint +function Timer() +{ + if (Instigator != None && PlayerController(Instigator.Controller) != None && PlayerController(Instigator.Controller).ViewTarget == Self) { + PlayerController(Instigator.Controller).ReceiveLocalizedMessage(class'ONSOnslaughtMessage', 34); + } +} + +function bool IsStationary() +{ + return bDeployed; +} + +function Deploy() +{ + AnnounceTargetTime = Level.TimeSeconds + 1.5; + DeployCamera(); +} + + +simulated function DeployCamera() +{ + if (bShotDown) { + // can't deploy if already disconnected + //log(self@Instigator.Controller.GetTeamNum()@"DeployCamera: Trying to deploy but already shot down"); + return; + } + bDeployed = True; + Velocity = vect(0,0,0); + SetPhysics(PHYS_Projectile); + bOrientToVelocity = False; + DesiredRotation = rot(-16384,0,0); + RotationRate = rot(16384,16384,16384); + bRotateToDesired = True; + PlaySound(DeploySound); + AmbientSound = DeployedAmbientSound; + PlayAnim('Deploy', 1.0, 0.0); + if (Trajectory == None) + Trajectory = Spawn(class'UT3HellfireSPMATrajectory', Self, '', Location); +} + + +simulated event EndedRotation() +{ + bRotateToDesired = False; + RotationRate = rot(0,0,0); +} + + +simulated function Tick(float DeltaTime) +{ + local vector HitLocation, HitNormal; + + if (bShotDown || UT3HellfireSPMA(Instigator) == None || UT3HellfireSPMA(Instigator).Driver == None) { + //log(self@Instigator.Controller.GetTeamNum()@"Tick: shooting down"@!bShotDown@"because Instigator"@UT3HellfireSPMA(Instigator)@"Driver"@UT3HellfireSPMA(Instigator).Driver); + if (!bShotDown) + ShotDown(); + Disable('Tick'); + return; + } + + if (!bDeployed) { + TargetLocation = Location; + } + else { + if (CVScale > 0) { + CVScale -= DeltaTime * 0.8; + if (CVScale <= 0) + CVScale = 0; + if (CVScale < 0.25 && !bOwnerNoSee) + bOwnerNoSee = true; + } + if (Instigator.IsLocallyControlled() && Instigator.IsHumanControlled()) { + if (Trace(HitLocation, HitNormal, Location + vector(Instigator.Controller.Rotation) * MaxTargetRange,, True) == None) { + HitLocation = Location + vector(Instigator.Controller.Rotation) * MaxTargetRange; + HitNormal = vect(0,0,1); + } + else { + HitLocation += HitNormal * 50.0; + } + UpdateTargetLocation(HitLocation, HitNormal); + UT3HellfireSPMACannon(Owner).PredictTarget(); + + if (Trajectory != None) { + if (UT3HellfireSPMACannon(Owner).bCanHitTarget && UT3HellfireSPMACannon(Owner).FireCountdown <= 0 + && vector(UT3HellfireSPMACannon(Owner).WeaponFireRotation) dot vector(UT3HellfireSPMACannon(Owner).TargetRotation) > 0.99) + Trajectory.UpdateTrajectory(True, UT3HellfireSPMACannon(Owner).WeaponFireLocation, + vector(UT3HellfireSPMACannon(Owner).WeaponFireRotation) * Lerp(UT3HellfireSPMACannon(Owner).WeaponCharge, + UT3HellfireSPMACannon(Owner).MinSpeed, UT3HellfireSPMACannon(Owner).MaxSpeed), + -PhysicsVolume.Gravity.Z, Region.Zone.KillZ); + else + Trajectory.UpdateTrajectory(False); + } + } + } + + if (Role < ROLE_Authority) + return; + // following code is serverside-only + + if (!bDeployed) { + if (Instigator != None && AIController(Instigator.Controller) != None && NextAIDeployCheck <= Level.TimeSeconds) { + //log(self@"Tick: AI is testing camera!"); + if (Instigator.Controller.Target != None && FastTrace(Instigator.Controller.Target.Location)) { + //log(self@"Tick: deploying camera!"); + Deploy(); + } + else { + NextAIDeployCheck = Level.TimeSeconds + 0.1; + } + } + } + else if (Level.TimeSeconds > AnnounceTargetTime) { + AnnounceTargetTime = Level.TimeSeconds + 1.5; + ShowSelf(True); + } +} + + +// obsolete +function SetTarget(vector loc); + +simulated function UpdateTargetLocation(vector NewTargetLocation, vector NewTargetNormal) +{ + local vector X, Y; + + TargetLocation = NewTargetLocation; + TargetNormal = NewTargetNormal; + + if (TargetBeam == None) { + TargetBeam = Spawn(class'UT3HellfireSPMATargetReticle', self,, Location, rot(0,0,0)); + TargetBeam.ArtilleryLocation = Instigator.Location; + } + if (TargetBeam != None) { + TargetBeam.SetLocation(TargetLocation); + + // reticle StaticMesh uses TargetNormal as Z direction + Y = Normal(TargetNormal Cross (TargetLocation - Instigator.Location)); + X = -(TargetNormal Cross Y); + TargetBeam.SetRotation(OrthoRotation(X, Y, TargetNormal)); + } +} + + +/** +Reveal the camera to enemy bots, giving them a chance to target it. +*/ +function ShowSelf(bool bCheckFOV) +{ + local Controller C; + local Bot B; + + if (!bShotDown) { + for (C = Level.ControllerList; C != None; C = C.NextController) { + B = Bot(C); + if (B != None && !B.SameTeamAs(Instigator.Controller) && B.Pawn != None && !B.Pawn.IsFiring() && (B.Enemy == None || B.Enemy == Instigator || B.Skill > 2.0 + 2.0 * FRand() && !B.EnemyVisible()) && (!bCheckFOV || Normal(B.FocalPoint - B.Pawn.Location) dot (Location - B.Pawn.Location) > B.Pawn.PeripheralVision) && B.LineOfSightTo(self)) { + // give B a chance to shoot at me + B.GoalString = "Destroy Mortar Camera"; + B.Target = self; + B.SwitchToBestWeapon(); + if (B.Pawn.CanAttack(self)) { + B.DoRangedAttackOn(self); + if (FRand() < 0.5) + break; + } + } + } + } +} + +// non-tick part of UT3 CalcCamera() +simulated function bool SpecialCalcView(out Actor ViewActor, out vector CameraLocation, out rotator CameraRotation, bool bBehindView) +{ + local vector HitNormal, HitLocation; + + ViewActor = Self; + + CameraLocation = Location + ((MortarCameraOffset * CVScale) >> CameraRotation); + if (Trace(HitLocation, HitNormal, CameraLocation, Location, false, vect(12,12,12)) != None) + CameraLocation = HitLocation; + + return True; +} + + +simulated function ShotDown() +{ + //log(self@Instigator.Controller.GetTeamNum()@"ShotDown"); + if (Instigator != None && PlayerController(Instigator.Controller) != None && PlayerController(Instigator.Controller).ViewTarget == Self) { + if (Instigator.Controller.Pawn != None) { + PlayerController(Instigator.Controller).bBehindView = Instigator.Controller.Pawn.PointOfView(); + PlayerController(Instigator.Controller).SetViewTarget(Instigator.Controller.Pawn); + } + else { + PlayerController(Instigator.Controller).bBehindView = False; + PlayerController(Instigator.Controller).SetViewTarget(Instigator.Controller); + } + } + + if (TargetBeam != None) + TargetBeam.Destroy(); + + if (Trajectory != None) + Trajectory.Destroy(); + + Super.ShotDown(); + bShotDown = True; +} + + +/** +Slightly modified verion of ONSMortarCamera::PostNetReceive() to account for +bDeployed reverting to False when shot down or manually disconnected. +*/ +simulated function PostNetReceive() +{ + Super(ONSMortarShell).PostNetReceive(); + + if (bDeployed != bLastDeployed) { + bLastDeployed = bDeployed; + if (bDeployed) + DeployCamera(); + } + + if (bShotDown != bLastShotDown) { + bLastShotDown = bShotDown; + if (bShotDown) + ShotDown(); + } + + if (RealLocation != LastRealLocation) { + SetLocation(RealLocation); + LastRealLocation = RealLocation; + } +} + +// GEm: DEBUG +/*function TakeDamage(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, class damageType) +{ + log(self@Instigator.Controller.GetTeamNum()@"TakeDamage from"@instigatedBy); + Super.TakeDamage(Damage, instigatedBy, hitlocation, momentum, damageType); +}*/ + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + MortarCameraOffset = (X=-256.0,Z=128.0) + CVScale = 1.0 + MaxTargetRange = 10240.0 + Speed = 4000.0 + DrawScale=0.3 + AmbientSound = Sound'UT3SPMA.SPMACameraAmbient' + ImpactSound = Sound'UT3SPMA.SPMAShellFragmentExplode' + bOrientToVelocity = True + bAlwaysRelevant = True + TransientSoundRadius = 500.0 +} diff --git a/Classes/UT3HellfireSPMACannon.uc b/Classes/UT3HellfireSPMACannon.uc index 5502cd9..a8f8c5d 100644 --- a/Classes/UT3HellfireSPMACannon.uc +++ b/Classes/UT3HellfireSPMACannon.uc @@ -1,426 +1,525 @@ -/****************************************************************************** -UT3HellfireSPMACannon - -Creation date: 2009-02-09 16:18 -Latest change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ - -class UT3HellfireSPMACannon extends ONSArtilleryCannon; - - -var Sound DistantFireSound, ReadyToFireSound; -var color TrajectoryLineColor; - -/** -Last time CanAttack() returned a positive result. -Used to undeploy if no targets for bots. -*/ -var float LastCanAttackTime; - -var rotator TargetRotation; - -var bool bCanFire; - - -/** -Filter fire attempts so player needs to launch and deploy a camera first. -*/ -event bool AttemptFire(Controller C, bool bAltFire) -{ - if (MortarCamera == None || MortarCamera.bShotDown) { - // always fire camera first - return Super(ONSWeapon).AttemptFire(C, True); - } - else if (!bAltFire && MortarCamera.bDeployed) { - // fire shell if camera is deployed - return Super(ONSWeapon).AttemptFire(C, False); - } -} - - -function Tick(float DeltaTime) -{ - if (!bCanFire && FireCountdown <= 0) { - bCanFire = True; - if (Instigator != None && PlayerController(Instigator.Controller) != None) - PlayerController(Instigator.Controller).ClientPlaySound(ReadyToFireSound, true, 0.5); - } - else if (bCanFire && FireCountdown > AltFireInterval) { - bCanFire = False; - } -} - - -/** -Returns whether the target offset is reachable, assuming clear shot. -Outputs the fire rotation that will get the shot to the desired target area. -*/ -simulated function bool GetFireDirection(vector TargetLocation, out rotator FireRotation, out float FireSpeedFactor) -{ - local float dxy, dz, g; - local float vXY, vZ, bestV, thisV; - local float bestVXY, bestVZ; - local vector /*PitchBoneOrigin, YawBoneOrigin, FireOffset,*/ TargetDirection; - - /* FIXME: predict WeaponFireLocation for target direction - // approximate fire start for target direction - YawBoneOrigin = GetBoneCoords(YawBone).Origin; - FireOffset = WeaponFireLocation - YawBoneOrigin; - FireOffset = (FireOffset >> rot(0,-1,0) * WeaponFireRotation.Yaw) >> rot(0,1,0) * rotator(TargetLocation - YawBoneOrigin).Yaw; - */ - TargetDirection = TargetLocation - WeaponFireLocation; - g = Instigator.PhysicsVolume.Gravity.Z; - dz = TargetDirection.Z; - TargetDirection.Z = 0; - dxy = VSize(TargetDirection); - - bestVXY = MinSpeed; - bestVZ = dz * bestVXY / dxy - 0.5 * g * dxy / bestVXY; - bestV = Sqrt(Square(bestVXY) + Square(bestVZ)); - - for (vXY = bestVXY + 200; vXY <= MaxSpeed; vXY += 200) { - vZ = dz * vXY / dxy - 0.5 * g * dxy / vXY; - thisV = Sqrt(Square(vXY) + Square(vZ)); - if (thisV < bestV) { - bestVXY = vXY; - bestVZ = vZ; - bestV = thisV; - } - } - - TargetDirection = Normal(TargetDirection) * bestVXY; - TargetDirection.Z = bestVZ; - FireRotation = rotator(TargetDirection); - FireSpeedFactor = FClamp((bestV - MinSpeed) / (MaxSpeed - MinSpeed), 0.0, 1.0); - - return bestV <= MaxSpeed; -} - - -simulated function bool TestTrajectory(vector TargetLocation, rotator FireRotation, bool bTraceToGround, optional out vector HitLocation) -{ - local vector x0, v0, gHalf, LastLoc, NextLoc; - local float tMax, t; - local vector HitNormal; - - x0 = WeaponFireLocation; //GetBoneCoords(PitchBone).Origin; - v0 = Lerp(WeaponCharge, MinSpeed, MaxSpeed) * vector(FireRotation); - gHalf = 0.5 * Instigator.PhysicsVolume.Gravity; - tMax = VSize((TargetLocation - x0) * vect(1,1,0)) / VSize(v0 * vect(1,1,0)); - - LastLoc = x0; - for (t = TargetPredictionTimeStep; LastLoc.Z > Level.KillZ && (bTraceToGround || t < tMax); t += TargetPredictionTimeStep) { - NextLoc = x0 + v0 * t + gHalf * Square(t); - if (Trace(HitLocation, HitNormal, NextLoc, LastLoc, true, vect(0,0,0)) != None) - return VSize(HitLocation - TargetLocation) < FMax(100.0, 0.001 * VSize(x0 - TargetLocation)); - - LastLoc = NextLoc; - } - if (t > tMax) { - if (Trace(HitLocation, HitNormal, TargetLocation, LastLoc, true, vect(0,0,0)) == None) - HitLocation = TargetLocation; - } - else { - HitLocation = LastLoc; - } - return true; -} - - -simulated function PredictTarget() -{ - local float Vel2D, Dist2D, NewWeaponCharge; - - if (UT3HellfireSPMACamera(MortarCamera) == None || !MortarCamera.bDeployed || AIController(Instigator.Controller) != None) - return; - - CalcWeaponFire(); - if (Instigator.IsLocallyControlled()) { - PredictedTargetLocation = UT3HellfireSPMACamera(MortarCamera).TargetLocation; - bCanHitTarget = GetFireDirection(PredictedTargetLocation, TargetRotation, NewWeaponCharge); - SetWeaponCharge(NewWeaponCharge); - if (bCanHitTarget || UT3HellfireSPMACamera(MortarCamera).bTargetOutOfRange) { - bCanHitTarget = TestTrajectory(PredictedTargetLocation, TargetRotation, UT3HellfireSPMACamera(MortarCamera).bTargetOutOfRange, PredictedTargetLocation) && bCanHitTarget; - } - MortarCamera.SetReticleStatus(bCanHitTarget); - Vel2D = VSize(vector(TargetRotation) * vect(1,1,0)) * Lerp(WeaponCharge, MinSpeed, MaxSpeed); - Dist2D = VSize((PredictedTargetLocation - WeaponFireLocation) * vect(1,1,0)); - PredicatedTimeToImpact = Dist2D / Vel2D; - } - else { - // predict target location based on fire parameters send by client - PredictTargetLocation(Lerp(WeaponCharge, MinSpeed, MaxSpeed), vector(UT3HellfireSPMA(Instigator).CustomAim)); - } -} - - -function PredictTargetLocation(float Speed, vector Direction) -{ - local vector x0, v0, gHalf, LastLoc, NextLoc; - local float t, Vel2D, Dist2D; - local vector HitNormal; - - x0 = WeaponFireLocation; - v0 = Speed * Direction; - gHalf = 0.5 * Instigator.PhysicsVolume.Gravity; - - LastLoc = x0; - for (t = TargetPredictionTimeStep; LastLoc.Z > Level.KillZ; t += TargetPredictionTimeStep) { - NextLoc = x0 + v0 * t + gHalf * Square(t); - if (Trace(LastLoc, HitNormal, NextLoc, LastLoc, true, vect(0,0,0)) != None) - break; - - LastLoc = NextLoc; - } - // LastLoc now is the impact location - - PredictedTargetLocation = LastLoc; - Vel2D = VSize(v0 * vect(1,1,0)); - Dist2D = VSize((PredictedTargetLocation - x0) * vect(1,1,0)); - PredicatedTimeToImpact = Dist2D / Vel2D; -} - - -function bool CanAttack(Actor Other) -{ - local Bot B; - local bool bResult; - local rotator FireRotation; - - if (Instigator == None || Other == None) - return false; - - B = Bot(Instigator.Controller); - if (B != None && Level.TimeSeconds - UT3HellfireSPMA(Instigator).StartDrivingTime < 1) - return false; - - if (!Other.IsStationary() && (VSize(Other.Velocity) > 1000 || Pawn(Other) != None && Pawn(Other).GroundSpeed > 1000)) - return false; // too fast, could probably attack but likely wouldn't hit - - CalcWeaponFire(); - bResult = GetFireDirection(Other.Location, FireRotation, WeaponCharge); // can assign WeaponCharge directly for bots - if (bResult && MortarCamera != None) { - // make sure can really see enemy via camera... - if (!FastTrace(Other.Location, MortarCamera.Location)) - bResult = False; - // ...and shot trajectory is not obstructed - else if (!TestTrajectory(Other.Location, FireRotation, false)) - bResult = False; - } - - if (bResult) { - UT3HellfireSPMA(Instigator).CannonAim = FireRotation; - LastCanAttackTime = Level.TimeSeconds; - } - else if (Level.TimeSeconds - LastCanAttackTime > 5.0 && B != None && !B.Squad.IsDefending(B) && UT3HellfireSPMA(Instigator).IsDeployed()) { - // no good targets and bot doesn't defend, undeploy - UT3HellfireSPMA(Instigator).bBotDeploy = True; - } - return bResult; -} - - -function byte BestMode() -{ - return 0; -} - - -function AllowCameraLaunch() -{ - Super.AllowCameraLaunch(); - - if (Instigator != None && PlayerController(Instigator.Controller) != None && PlayerController(Instigator.Controller).ViewTarget == MortarCamera) { - PlayerController(Instigator.Controller).SetViewTarget(Instigator); - } - MortarCamera = None; -} - - -simulated event OwnerEffects() -{ - if (UT3HellfireSPMA(Instigator).DeployState != DS_Deployed || MortarCamera != None && (bIsAltFire || !MortarCamera.bDeployed && !MortarCamera.bShotDown)) - return; // no owner effects, just deploying/disconnecting the camera - - if (MortarCamera == None) - bIsAltFire = True; // no camera, always alt fire - - if (!bIsRepeatingFF) { - if (bIsAltFire) - ClientPlayForceFeedback(AltFireForce); - else - ClientPlayForceFeedback(FireForce); - } - ShakeView(); - - if (Role < ROLE_Authority) { - if (bIsAltFire) - FireCountdown = AltFireInterval; - else - FireCountdown = FireInterval; - - AimLockReleaseTime = Level.TimeSeconds + FireCountdown * FireIntervalAimLock; - - FlashMuzzleFlash(); - - if (AmbientEffectEmitter != None) - AmbientEffectEmitter.SetEmitterStatus(true); - - // Play firing noise - if (!bAmbientFireSound) { - if (bIsAltFire) - PlaySound(AltFireSoundClass, SLOT_None, FireSoundVolume/255.0,, AltFireSoundRadius,, false); - else - PlaySound(FireSoundClass, SLOT_None, FireSoundVolume/255.0,, FireSoundRadius,, true); // primary fire always heard from camera! - } - } -} - - -function Projectile SpawnProjectile(class ProjClass, bool bAltFire) -{ - local Projectile P; - local vector StartLocation, HitLocation, HitNormal, Extent, TargetLoc; - local ONSIncomingShellSound ShellSoundMarker; - local Controller C; - local bool bFailed; - - for (C = Level.ControllerList; C != None; C = C.nextController) { - if (PlayerController(C) != None) - PlayerController(C).ClientPlaySound(Sound'DistantBooms.DistantSPMA', true, 1); - } - if (AIController(Instigator.Controller) != None) { - if (Instigator.Controller.Target == None) { - if ( Instigator.Controller.Enemy != None ) - TargetLoc = Instigator.Controller.Enemy.Location; - else - TargetLoc = Instigator.Controller.FocalPoint; - } - else - TargetLoc = Instigator.Controller.Target.Location; - - if (!bAltFire && ((MortarCamera == None) || MortarCamera.bShotDown) - && ((VSize(TargetLoc - WeaponFireLocation) > 4000) || !Instigator.Controller.LineOfSightTo(Instigator.Controller.Target)) ) - { - ProjClass = AltFireProjectileClass; - bAltFire = true; - } - } - else if (!Instigator.IsLocallyControlled()) - PredictTarget(); - - if (bDoOffsetTrace) { - Extent = ProjClass.default.CollisionRadius * vect(1,1,0); - Extent.Z = ProjClass.default.CollisionHeight; - if (!Owner.TraceThisActor(HitLocation, HitNormal, WeaponFireLocation, WeaponFireLocation + vector(WeaponFireRotation) * (Owner.CollisionRadius * 1.5), Extent)) - StartLocation = HitLocation; - else - StartLocation = WeaponFireLocation + vector(WeaponFireRotation) * (ProjClass.default.CollisionRadius * 1.1); - } - else - StartLocation = WeaponFireLocation; - - P = Spawn(ProjClass, self,, StartLocation, WeaponFireRotation); - - if (P != None) { - if (AIController(Instigator.Controller) == None) { - if (bAltFire) - WeaponCharge = 1.0; - P.Velocity = vector(WeaponFireRotation) * Lerp(WeaponCharge, MinSpeed, MaxSpeed); - } - else - { - if (ONSMortarCamera(P) != None) { - P.Velocity = SetMuzzleVelocity(StartLocation, TargetLoc,0.25); - ONSMortarCamera(P).TargetZ = TargetLoc.Z; - } - else - P.Velocity = SetMuzzleVelocity(StartLocation, TargetLoc,0.5); - WeaponFireRotation = Rotator(P.Velocity); - ONSArtillery(Owner).bAltFocalPoint = true; - ONSArtillery(Owner).AltFocalPoint = StartLocation + P.Velocity; - } - if (ONSMortarCamera(P) == None) { - if (MortarCamera != None) { - ONSMortarShell(P).StartTimer(FMax(0.6 * PredicatedTimeToImpact, 0.85 * PredicatedTimeToImpact - 0.7)); - ShellSoundMarker = Spawn(class'UT3HellfireSPMAIncomingSound',,, PredictedTargetLocation + vect(0,0,400)); - ShellSoundMarker.StartTimer(PredicatedTimeToImpact); - } - else - P.LifeSpan = 2.0; - } - - FlashMuzzleFlash(); - - // Play firing noise - if (bAltFire) { - if (bAmbientAltFireSound) - AmbientSound = AltFireSoundClass; - else - PlayOwnedSound(AltFireSoundClass, SLOT_None, FireSoundVolume/255.0,, AltFireSoundRadius,, false); - } - else { - if (bAmbientFireSound) - AmbientSound = FireSoundClass; - else - PlayOwnedSound(FireSoundClass, SLOT_None, FireSoundVolume/255.0,, FireSoundRadius,, true); // primary fire heard from camera - } - - if (ONSMortarCamera(P) != None) { - CameraAttempts = 0; - LastCameraLaunch = Level.TimeSeconds; - MortarCamera = ONSMortarCamera(P); - if (ONSArtillery(Owner) != None) - ONSArtillery(Owner).MortarCamera = MortarCamera; - } - else - MortarShell = ONSMortarShell(P); - } - else if ( AIController(Instigator.Controller) != None ) - { - bFailed = ONSMortarCamera(P) == None; - if ( !bFailed ) - { - // allow 2 tries - CameraAttempts++; - bFailed = ( CameraAttempts > 1 ); - } - - if (bFailed) { - CameraAttempts = 0; - LastCameraLaunch = Level.TimeSeconds; - if (MortarCamera != None) - MortarCamera.ShotDown(); - } - } - return P; -} - - -simulated function float ChargeBar() -{ - return FClamp(1.0 - (FireCountDown / FireInterval), 0.001, 0.999); -} - - -//============================================================================= -// Default values -//============================================================================= - -defaultproperties -{ - bForceCenterAim = True // rotation is initially disabled - PitchUpLimit = 16000 - WeaponFireOffset = 0.0 - RotationsPerSecond = 1.0 - - DistantFireSound = Sound'DistantBooms.DistantSPMA' - ReadyToFireSound = Sound'WeaponSounds.BaseGunTech.BSeekLost1' - FireSoundClass = Sound'SPMACannonFire' - FireInterval = 3.5 - AltFireSoundClass = Sound'SPMACannonFire' - AltFireInterval = 1.5 - ProjectileClass = class'UT3HellfireSPMAShell' - AltFireProjectileClass = class'UT3HellfireSPMACamera' -} +/* + * Copyright © 2009 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3HellfireSPMACannon extends ONSArtilleryCannon; + + +var Sound DistantFireSound, ReadyToFireSound; +var color TrajectoryLineColor; + +/** +Last time CanAttack() returned a positive result. +Used to undeploy if no targets for bots. +*/ +var float LastCanAttackTime; + +var rotator TargetRotation; + +var bool bCanFire; + +var Projectile LastProjectile; + + +/** + Filter fire attempts so player needs to launch and deploy a camera first. + */ +event bool AttemptFire(Controller C, bool bAltFire) +{ + //log(self@"AttemptFire by"@C@C.GetTeamNum()@bAltFire@"and MortarCamera"@MortarCamera); + if (MortarCamera == None || MortarCamera.bShotDown) { + // always fire camera first + return Super(ONSWeapon).AttemptFire(C, True); + } + else if (!bAltFire && MortarCamera.bDeployed) { + // fire shell if camera is deployed + return Super(ONSWeapon).AttemptFire(C, False); + } +} + + +function Tick(float DeltaTime) +{ + if (!bCanFire && FireCountdown <= 0) { + bCanFire = True; + if (Instigator != None && PlayerController(Instigator.Controller) != None) + PlayerController(Instigator.Controller).ClientPlaySound(ReadyToFireSound, true, 0.5); + } + else if (bCanFire && FireCountdown > AltFireInterval) { + bCanFire = False; + } + + // GEm: Watchdog, makes sure to undeploy if there are no targets + if (LastCanAttackTime > 0.0 && Level.TimeSeconds - LastCanAttackTime > 5.0){ + //log(self@Instigator.Controller.GetTeamNum()@"Tick: Watchdog attempt to undeploy"); + BotTryUndeploy(); + LastCanAttackTime = Level.TimeSeconds;} +} + + +/** + Returns whether the target offset is reachable, assuming clear shot. + Outputs the fire rotation that will get the shot to the desired target area. + */ +simulated function bool GetFireDirection(vector TargetLocation, out rotator FireRotation, out float FireSpeedFactor) +{ + local float dxy, dz, g; + local float vXY, vZ, bestV, thisV; + local float bestVXY, bestVZ; + local vector /*PitchBoneOrigin, YawBoneOrigin, FireOffset,*/ TargetDirection; + + /* FIXME: predict WeaponFireLocation for target direction + // approximate fire start for target direction + YawBoneOrigin = GetBoneCoords(YawBone).Origin; + FireOffset = WeaponFireLocation - YawBoneOrigin; + FireOffset = (FireOffset >> rot(0,-1,0) * WeaponFireRotation.Yaw) >> rot(0,1,0) * rotator(TargetLocation - YawBoneOrigin).Yaw; + */ + TargetDirection = TargetLocation - WeaponFireLocation; + g = Instigator.PhysicsVolume.Gravity.Z; + dz = TargetDirection.Z; + TargetDirection.Z = 0; + dxy = VSize(TargetDirection); + + bestVXY = MinSpeed; + bestVZ = dz * bestVXY / dxy - 0.5 * g * dxy / bestVXY; + bestV = Sqrt(Square(bestVXY) + Square(bestVZ)); + + for (vXY = bestVXY + 200; vXY <= MaxSpeed; vXY += 200) { + vZ = dz * vXY / dxy - 0.5 * g * dxy / vXY; + thisV = Sqrt(Square(vXY) + Square(vZ)); + if (thisV < bestV) { + bestVXY = vXY; + bestVZ = vZ; + bestV = thisV; + } + } + + TargetDirection = Normal(TargetDirection) * bestVXY; + TargetDirection.Z = bestVZ; + FireRotation = rotator(TargetDirection); + FireSpeedFactor = FClamp((bestV - MinSpeed) / (MaxSpeed - MinSpeed), 0.0, 1.0); + + return bestV <= MaxSpeed; +} + + +simulated function bool TestTrajectory(vector TargetLocation, rotator FireRotation, bool bTraceToGround, optional out vector HitLocation) +{ + local vector x0, v0, gHalf, LastLoc, NextLoc; + local float tMax, t; + local vector HitNormal; + + x0 = WeaponFireLocation; //GetBoneCoords(PitchBone).Origin; + v0 = Lerp(WeaponCharge, MinSpeed, MaxSpeed) * vector(FireRotation); + gHalf = 0.5 * Instigator.PhysicsVolume.Gravity; + tMax = VSize((TargetLocation - x0) * vect(1,1,0)) / VSize(v0 * vect(1,1,0)); + + LastLoc = x0; + for (t = TargetPredictionTimeStep; LastLoc.Z > Level.KillZ && (bTraceToGround || t < tMax); t += TargetPredictionTimeStep) { + NextLoc = x0 + v0 * t + gHalf * Square(t); + if (Trace(HitLocation, HitNormal, NextLoc, LastLoc, true, vect(0,0,0)) != None) + return VSize(HitLocation - TargetLocation) < FMax(100.0, 0.001 * VSize(x0 - TargetLocation)); + + LastLoc = NextLoc; + } + if (t > tMax) { + if (Trace(HitLocation, HitNormal, TargetLocation, LastLoc, true, vect(0,0,0)) == None) + HitLocation = TargetLocation; + } + else { + HitLocation = LastLoc; + } + return true; +} + + +simulated function PredictTarget() +{ + local float Vel2D, Dist2D, NewWeaponCharge; + + if (UT3HellfireSPMACamera(MortarCamera) == None || !MortarCamera.bDeployed || AIController(Instigator.Controller) != None) + return; + + CalcWeaponFire(); + if (Instigator.IsLocallyControlled()) { + PredictedTargetLocation = UT3HellfireSPMACamera(MortarCamera).TargetLocation; + bCanHitTarget = GetFireDirection(PredictedTargetLocation, TargetRotation, NewWeaponCharge); + SetWeaponCharge(NewWeaponCharge); + if (bCanHitTarget || UT3HellfireSPMACamera(MortarCamera).bTargetOutOfRange) { + bCanHitTarget = TestTrajectory(PredictedTargetLocation, TargetRotation, UT3HellfireSPMACamera(MortarCamera).bTargetOutOfRange, PredictedTargetLocation) && bCanHitTarget; + } + MortarCamera.SetReticleStatus(bCanHitTarget); + Vel2D = VSize(vector(TargetRotation) * vect(1,1,0)) * Lerp(WeaponCharge, MinSpeed, MaxSpeed); + Dist2D = VSize((PredictedTargetLocation - WeaponFireLocation) * vect(1,1,0)); + PredicatedTimeToImpact = Dist2D / Vel2D; + } + else { + // predict target location based on fire parameters send by client + PredictTargetLocation(Lerp(WeaponCharge, MinSpeed, MaxSpeed), vector(UT3HellfireSPMA(Instigator).CustomAim)); + } +} + + +function PredictTargetLocation(float Speed, vector Direction) +{ + local vector x0, v0, gHalf, LastLoc, NextLoc; + local float t, Vel2D, Dist2D; + local vector HitNormal; + + x0 = WeaponFireLocation; + v0 = Speed * Direction; + gHalf = 0.5 * Instigator.PhysicsVolume.Gravity; + + LastLoc = x0; + for (t = TargetPredictionTimeStep; LastLoc.Z > Level.KillZ; t += TargetPredictionTimeStep) { + NextLoc = x0 + v0 * t + gHalf * Square(t); + if (Trace(LastLoc, HitNormal, NextLoc, LastLoc, true, vect(0,0,0)) != None) + break; + + LastLoc = NextLoc; + } + // LastLoc now is the impact location + + PredictedTargetLocation = LastLoc; + Vel2D = VSize(v0 * vect(1,1,0)); + Dist2D = VSize((PredictedTargetLocation - x0) * vect(1,1,0)); + PredicatedTimeToImpact = Dist2D / Vel2D; +} + + +function bool CanAttack(Actor Other) +{ + local Bot B; + local bool bResult; + local rotator FireRotation; + + //log(self@Instigator.Controller.GetTeamNum()@"CanAttack"@Other$": --------"); + + B = Bot(Instigator.Controller); + + //log("Bot mission:"@B.GoalString); + + if (Instigator == None || B == None){ + //log("FALSE, no instigator!"); + return false;} + + if (Other == None) + { + //log("SCREW IT, we lost targets"); + BotTryUndeploy(); + return false; + } + + if (B != None && Level.TimeSeconds - UT3HellfireSPMA(Instigator).StartDrivingTime < 1){ + //log("FALSE, just started driving!"); + BotTryUndeploy(); + return false;} + + if (!Other.IsStationary() && (VSize(Other.Velocity) > 1000 || Pawn(Other) != None && Pawn(Other).GroundSpeed > 1000)){ + //log("FALSE, target is too fast!"); + BotTryUndeploy(); + return false;} // too fast, could probably attack but likely wouldn't hit + + CalcWeaponFire(); + bResult = GetFireDirection(Other.Location, FireRotation, WeaponCharge); // can assign WeaponCharge directly for bots + //log("There is line of sight:"@bResult); + if (bResult && MortarCamera != None) { + //log("Camera already deployed... Ha, as if!"); + // make sure can really see enemy via camera... + if (!FastTrace(Other.Location, MortarCamera.Location)){ + //log("FALSE, there is actually no line of sight!"); + bResult = False;} + // ...and shot trajectory is not obstructed + else if (!TestTrajectory(Other.Location, FireRotation, false)){ + //log("FALSE, there is line of sight but something is blocking it!"); + bResult = False;} + } + + if (bResult) { + //log("TRUE, all good and prepare to fire!"); + UT3HellfireSPMA(Instigator).CannonAim = FireRotation; + LastCanAttackTime = Level.TimeSeconds; + } + else + BotTryUndeploy(); + //log(self@Instigator.Controller.GetTeamNum()@"---------- CanAttack"@bResult); + return bResult; +} + +function BotTryUndeploy(optional bool bForce) +{ + local Bot B; + + B = Bot(Instigator.Controller); + + //log(self@Instigator.Controller.GetTeamNum()@"BotTryUndeploy: Enemy"@B.Enemy); + + if ((bForce || Level.TimeSeconds - LastCanAttackTime > 5.0) && B != None && (bForce || !B.Squad.IsDefending(B)) + && UT3HellfireSPMA(Instigator) != None && UT3HellfireSPMA(Instigator).IsDeployed()) + { + UT3HellfireSPMA(Instigator).bBotDeploy = True; + LastCanAttackTime = Level.TimeSeconds; + //log(self@Instigator.Controller.GetTeamNum()@"BotTryUndeploy successful"); + } +} + +function byte BestMode() +{ + return 0; +} + + +function AllowCameraLaunch() +{ + //Super.AllowCameraLaunch(); + LastCameraLaunch = Level.TimeSeconds - CameraLaunchWait; + + if (Instigator != None && PlayerController(Instigator.Controller) != None && PlayerController(Instigator.Controller).ViewTarget == MortarCamera) { + PlayerController(Instigator.Controller).SetViewTarget(Instigator); + } + //log(self@Instigator.Controller.GetTeamNum()@"AllowCameraLaunch: camera destroyed at"@Level.TimeSeconds); + MortarCamera = None; +} + + +simulated event OwnerEffects() +{ + if (UT3HellfireSPMA(Instigator).DeployState != DS_Deployed || MortarCamera != None && (bIsAltFire || !MortarCamera.bDeployed && !MortarCamera.bShotDown)) + return; // no owner effects, just deploying/disconnecting the camera + + if (MortarCamera == None) + bIsAltFire = True; // no camera, always alt fire + + if (!bIsRepeatingFF) { + if (bIsAltFire) + ClientPlayForceFeedback(AltFireForce); + else + ClientPlayForceFeedback(FireForce); + } + ShakeView(); + + if (Role < ROLE_Authority) { + if (bIsAltFire) + FireCountdown = AltFireInterval; + else + FireCountdown = FireInterval; + + AimLockReleaseTime = Level.TimeSeconds + FireCountdown * FireIntervalAimLock; + + FlashMuzzleFlash(); + + if (AmbientEffectEmitter != None) + AmbientEffectEmitter.SetEmitterStatus(true); + + // Play firing noise + if (!bAmbientFireSound) { + if (bIsAltFire) + PlaySound(AltFireSoundClass, SLOT_None, FireSoundVolume/255.0,, AltFireSoundRadius,, false); + else + PlaySound(FireSoundClass, SLOT_None, FireSoundVolume/255.0,, FireSoundRadius,, true); // primary fire always heard from camera! + } + } +} + + +function Projectile SpawnProjectile(class ProjClass, bool bAltFire) +{ + local Projectile P; + local vector StartLocation, HitLocation, HitNormal, Extent, TargetLoc; + local ONSIncomingShellSound ShellSoundMarker; + local Controller C; + local bool bFailed; + + for (C = Level.ControllerList; C != None; C = C.nextController) { + if (PlayerController(C) != None) + PlayerController(C).ClientPlaySound(Sound'DistantBooms.DistantSPMA', true, 1); + } + if (AIController(Instigator.Controller) != None) { + if (Instigator.Controller.Target == None) { + if ( Instigator.Controller.Enemy != None ) + TargetLoc = Instigator.Controller.Enemy.Location; + else + TargetLoc = Instigator.Controller.FocalPoint; + } + else + TargetLoc = Instigator.Controller.Target.Location; + + if (!bAltFire && ((MortarCamera == None) || MortarCamera.bShotDown) + && ((VSize(TargetLoc - WeaponFireLocation) > 4000) || !Instigator.Controller.LineOfSightTo(Instigator.Controller.Target)) ) + { + ProjClass = AltFireProjectileClass; + bAltFire = true; + } + } + else if (!Instigator.IsLocallyControlled()) + PredictTarget(); + + if (bDoOffsetTrace) { + Extent = ProjClass.default.CollisionRadius * vect(1,1,0); + Extent.Z = ProjClass.default.CollisionHeight; + if (!Owner.TraceThisActor(HitLocation, HitNormal, WeaponFireLocation, WeaponFireLocation + vector(WeaponFireRotation) * (Owner.CollisionRadius * 1.5), Extent)) + StartLocation = HitLocation; + else + StartLocation = WeaponFireLocation + vector(WeaponFireRotation) * (ProjClass.default.CollisionRadius * 1.1); + } + else + StartLocation = WeaponFireLocation; + + P = Spawn(ProjClass, self,, StartLocation, WeaponFireRotation); + + if (P != None) { + if (AIController(Instigator.Controller) == None) { + if (bAltFire) + WeaponCharge = 1.0; + P.Velocity = vector(WeaponFireRotation) * Lerp(WeaponCharge, MinSpeed, MaxSpeed); + } + else + { + LastProjectile = P; + if (ONSMortarCamera(P) != None) { + P.Velocity = SetMuzzleVelocity(StartLocation, TargetLoc,0.25); + ONSMortarCamera(P).TargetZ = TargetLoc.Z; + } + else + P.Velocity = SetMuzzleVelocity(StartLocation, TargetLoc,0.5); + WeaponFireRotation = Rotator(P.Velocity); + ONSArtillery(Owner).bAltFocalPoint = true; + ONSArtillery(Owner).AltFocalPoint = StartLocation + P.Velocity; + PredictTargetLocation(VSize(P.Velocity), vector(WeaponFireRotation)); + } + if (ONSMortarCamera(P) == None) { + //log(self@Instigator.Controller.GetTeamNum()@"SpawnProjectile: priming shell"@P@"with my camera"@MortarCamera@"Landing in"@PredicatedTimeToImpact); + if (MortarCamera != None) { + ONSMortarShell(P).StartTimer(FMax(0.6 * PredicatedTimeToImpact, 0.85 * PredicatedTimeToImpact - 0.7)); + ShellSoundMarker = Spawn(class'UT3HellfireSPMAIncomingSound',,, PredictedTargetLocation + vect(0,0,400)); + ShellSoundMarker.StartTimer(PredicatedTimeToImpact); + LastCanAttackTime = Level.TimeSeconds; + } + else + P.LifeSpan = 2.0; + } + + FlashMuzzleFlash(); + + // Play firing noise + if (bAltFire) { + if (bAmbientAltFireSound) + AmbientSound = AltFireSoundClass; + else + PlayOwnedSound(AltFireSoundClass, SLOT_None, FireSoundVolume/255.0,, AltFireSoundRadius,, false); + } + else { + if (bAmbientFireSound) + AmbientSound = FireSoundClass; + else + PlayOwnedSound(FireSoundClass, SLOT_None, FireSoundVolume/255.0,, FireSoundRadius,, true); // primary fire heard from camera + } + + if (ONSMortarCamera(P) != None) { + CameraAttempts = 0; + LastCameraLaunch = Level.TimeSeconds; + MortarCamera = ONSMortarCamera(P); + //log(self@Instigator.Controller.GetTeamNum()@"SpawnProjectile: fired a camera"@MortarCamera@LastCameraLaunch); + if (ONSArtillery(Owner) != None) + ONSArtillery(Owner).MortarCamera = MortarCamera; + } + else + MortarShell = ONSMortarShell(P); + } + if (AIController(Instigator.Controller) != None) + { + // GEm: If we failed to spawn a camera or are firing cameras in a row (enemies keep shooting them down or they run into trees) + if (P == None || (ONSMortarCamera(P) != None && ONSMortarCamera(LastProjectile) != None)) + bFailed = true; + // GEm: This is actually based on code from the original class. You know what fails? That code. Very much. + if ( bFailed ) + { + // allow 3 tries + CameraAttempts++; + bFailed = ( CameraAttempts > 2 ); + } + + if (bFailed) + { + CameraAttempts = 0; + LastCameraLaunch = Level.TimeSeconds; + //log(self@Instigator.Controller.GetTeamNum()@"SpawnProjectile: Camera disabled due to too many attempts"); + /*if (MortarCamera != None) + MortarCamera.ShotDown();*/ + BotTryUndeploy(true); + } + } + return P; +} + + +simulated function float ChargeBar() +{ + return FClamp(1.0 - (FireCountDown / FireInterval), 0.001, 0.999); +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + bForceCenterAim = True // rotation is initially disabled + PitchUpLimit = 16000 + WeaponFireOffset = 0.0 + RotationsPerSecond = 1.0 + + DistantFireSound = Sound'DistantBooms.DistantSPMA' + ReadyToFireSound = Sound'WeaponSounds.BaseGunTech.BSeekLost1' + FireSoundClass = Sound'UT3SPMA.SPMACannonFire' + FireInterval = 3.5 + AltFireSoundClass = Sound'UT3SPMA.SPMACannonFire' + AltFireInterval = 1.5 + ProjectileClass = class'UT3HellfireSPMAShell' + AltFireProjectileClass = class'UT3HellfireSPMACamera' + RotateSound=sound'UT3SPMA.SPMACannonRotate' + + Mesh = SkeletalMesh'UT3VH_SPMA_Anims.SPMA_MainTurret' + RedSkin = Shader'UT3SPMATex.Body.RedSkin' + BlueSkin = Shader'UT3SPMATex.Body.BlueSkin' + YawBone = "MainTurret_Yaw" + PitchBone = "MainTurret_Pitch" + WeaponFireAttachmentBone = "MainTurret_Tip" +} diff --git a/Classes/UT3HellfireSPMAChildTrail.uc b/Classes/UT3HellfireSPMAChildTrail.uc index d6c411e..ce6d313 100644 --- a/Classes/UT3HellfireSPMAChildTrail.uc +++ b/Classes/UT3HellfireSPMAChildTrail.uc @@ -1,25 +1,25 @@ -/****************************************************************************** -UT3HellfireSPMAChildTrail - -Creation date: 2009-02-23 23:02 -Last change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ - -class UT3HellfireSPMAChildTrail extends FlakTrail; - - -//============================================================================= -// Default values -//============================================================================= - -defaultproperties -{ - mLifeRange(0) = 0.5 - mLifeRange(1) = 0.5 - mSizeRange(0) = 11.0 - mSizeRange(1) = 11.0 - - mColorRange(0) = (G=20,B=10) - mColorRange(1) = (G=20,B=10) -} +/****************************************************************************** +UT3HellfireSPMAChildTrail + +Creation date: 2009-02-23 23:02 +Last change: $Id$ +Copyright (c) 2009, Wormbo +******************************************************************************/ + +class UT3HellfireSPMAChildTrail extends FlakTrail; + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + mLifeRange(0) = 0.5 + mLifeRange(1) = 0.5 + mSizeRange(0) = 11.0 + mSizeRange(1) = 11.0 + + mColorRange(0) = (G=20,B=10) + mColorRange(1) = (G=20,B=10) +} diff --git a/Classes/UT3HellfireSPMAIncomingSound.uc b/Classes/UT3HellfireSPMAIncomingSound.uc index 9774f4a..9f362b3 100644 --- a/Classes/UT3HellfireSPMAIncomingSound.uc +++ b/Classes/UT3HellfireSPMAIncomingSound.uc @@ -1,29 +1,29 @@ -/****************************************************************************** -UT3HellfireSPMAIncomingSound - -Creation date: 2009-02-13 21:21 -Last change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ - -class UT3HellfireSPMAIncomingSound extends ONSIncomingShellSound; - - -function StartTimer(float TimeToImpact) -{ - if (TimeToImpact > SoundLength) - SetTimer(TimeToImpact - SoundLength, false); - else - Destroy(); -} - - -//============================================================================= -// Default values -//============================================================================= - -defaultproperties -{ - SoundLength = 3.5 - ShellSound = Sound'SPMAShellIncoming' -} +/****************************************************************************** +UT3HellfireSPMAIncomingSound + +Creation date: 2009-02-13 21:21 +Last change: $Id$ +Copyright (c) 2009, Wormbo +******************************************************************************/ + +class UT3HellfireSPMAIncomingSound extends ONSIncomingShellSound; + + +function StartTimer(float TimeToImpact) +{ + if (TimeToImpact > SoundLength) + SetTimer(TimeToImpact - SoundLength, false); + else + Destroy(); +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + SoundLength = 3.5 + ShellSound = Sound'UT3SPMA.SPMAShellIncoming' +} diff --git a/Classes/UT3HellfireSPMAShell.uc b/Classes/UT3HellfireSPMAShell.uc index d91c237..c966d25 100644 --- a/Classes/UT3HellfireSPMAShell.uc +++ b/Classes/UT3HellfireSPMAShell.uc @@ -1,146 +1,178 @@ -/****************************************************************************** -UT3HellfireSPMAShell - -Creation date: 2009-02-13 13:31 -Last change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ - -class UT3HellfireSPMAShell extends ONSMortarShell; - - -var Sound AirExplosionSound; -var class ChildProjectileClass; -var float SpreadFactor; -var Emitter SmokeTrail; - -// flight correction hack -var float t0, v0, h0, g0; - - -simulated function PostBeginPlay() -{ - Super(Projectile).PostBeginPlay(); - - if (Level.NetMode != NM_DedicatedServer) - SmokeTrail = Spawn(class'UT3HellfireSPMAShellTrail', self); -} - - -/*simulated function Tick(float DeltaTime) -{ - local float t, h; - - Super.Tick(DeltaTime); - - // flight correction hack - if (t0 == 0) { - t0 = Level.TimeSeconds; - v0 = Velocity.Z; - h0 = Location.Z; - g0 = PhysicsVolume.Gravity.Z; - } - if (g0 != PhysicsVolume.Gravity.Z || PhysicsVolume.bWaterVolume) { - // no longer correct trajectory after gravity/water change - g0 = 0; - return; - } - t = Level.TimeSeconds - t0; - - h = h0 + v0 * t + 0.5 * g0 * Square(t); - if (h > Location.Z /*|| h < Location.Z - 50*/) { - log ("Correcting:"@t@h@Location.Z); - Velocity.Z += (h - Location.Z); - } -}*/ - - -simulated function Destroyed() -{ - if (SmokeTrail != None) - SmokeTrail.Kill(); - SmokeTrail = None; - Super.Destroyed(); -} - -simulated function Timer() -{ - local int i, j; - local Projectile Child; - local float Mag; - local vector CurrentVelocity; - - if (Level.NetMode != NM_DedicatedServer) - Spawn(class'ONSArtilleryShellSplit', self, , Location, Rotation); - - CurrentVelocity = 0.85 * Velocity; - - // one shell in each of 9 zones - for (i = -1; i < 2; i++) { - for (j= -1; j < 2; j++) { - if (Abs(i) + Abs(j) > 1) - Mag = 0.7; - else - Mag = 1.0; - Child = Spawn(ChildProjectileClass, self,, Location); - if (Child != None) { - Child.Velocity = CurrentVelocity; - Child.Velocity.X += RandRange(0.3, 1.0) * Mag * i * SpreadFactor; - Child.Velocity.Y += RandRange(0.3, 1.0) * Mag * j * SpreadFactor; - Child.Velocity.Z = Child.Velocity.Z + SpreadFactor * (FRand() - 0.5); - Child.InstigatorController = InstigatorController; - } - } - } - ExplodeInAir(); -} - - -simulated function SpawnEffects(vector HitLocation, vector HitNormal) -{ - local PlayerController PC; - - PlaySound(ImpactSound, SLOT_None, 2.0); - if (EffectIsRelevant(Location, false)) { - PC = Level.GetLocalPlayerController(); - if (PC.ViewTarget != None && VSize(PC.ViewTarget.Location - Location) < 3000) - Spawn(ExplosionEffectClass,,, HitLocation + HitNormal * 16); - Spawn(ExplosionEffectClass,,, HitLocation + HitNormal * 16); - if (ExplosionDecal != None && Level.NetMode != NM_DedicatedServer) - Spawn(ExplosionDecal, self,, HitLocation, rotator(-HitNormal)); - } -} - - -simulated function ExplodeInAir() -{ - bExploded = true; - PlaySound(AirExplosionSound, SLOT_None, 2.0); - if (Level.NetMode != NM_DedicatedServer) - Spawn(AirExplosionEffectClass); - - Explode(Location, Location - Instigator.Location); - Destroy(); -} - - - -//============================================================================= -// Default values -//============================================================================= - -defaultproperties -{ - AirExplosionSound = Sound'SPMAShellBreakingExplode' - ImpactSound = Sound'SPMAShellFragmentExplode' - AmbientSound = None - LifeSpan = 8.0 - - TransientSoundRadius = 500.0 - - ChildProjectileClass = class'UT3HellfireSPMAShellChild' - SpreadFactor = 400.0 - - ExplosionEffectClass = class'UT3HellfireSPMAAirExplosion' - AirExplosionEffectClass = class'UT3HellfireSPMAAirExplosion' -} +/* + * Copyright © 2009 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3HellfireSPMAShell extends ONSMortarShell; + + +var Sound AirExplosionSound; +var class ChildProjectileClass; +var float SpreadFactor; +var Emitter SmokeTrail; + +// flight correction hack +var float t0, v0, h0, g0; + + +simulated function PostBeginPlay() +{ + Super(Projectile).PostBeginPlay(); + + if (Level.NetMode != NM_DedicatedServer) + SmokeTrail = Spawn(class'UT3HellfireSPMAShellTrail', self); +} + + +/*simulated function Tick(float DeltaTime) +{ + local float t, h; + + Super.Tick(DeltaTime); + + // flight correction hack + if (t0 == 0) { + t0 = Level.TimeSeconds; + v0 = Velocity.Z; + h0 = Location.Z; + g0 = PhysicsVolume.Gravity.Z; + } + if (g0 != PhysicsVolume.Gravity.Z || PhysicsVolume.bWaterVolume) { + // no longer correct trajectory after gravity/water change + g0 = 0; + return; + } + t = Level.TimeSeconds - t0; + + h = h0 + v0 * t + 0.5 * g0 * Square(t); + if (h > Location.Z /*|| h < Location.Z - 50*/) { + log ("Correcting:"@t@h@Location.Z); + Velocity.Z += (h - Location.Z); + } +}*/ + + +simulated function Destroyed() +{ + if (SmokeTrail != None) + SmokeTrail.Kill(); + SmokeTrail = None; + Super.Destroyed(); +} + +simulated function Timer() +{ + local int i, j; + local Projectile Child; + local float Mag; + local vector CurrentVelocity; + + if (Level.NetMode != NM_DedicatedServer) + Spawn(class'ONSArtilleryShellSplit', self, , Location, Rotation); + + CurrentVelocity = 0.85 * Velocity; + + // one shell in each of 9 zones + for (i = -1; i < 2; i++) { + for (j= -1; j < 2; j++) { + if (Abs(i) + Abs(j) > 1) + Mag = 0.7; + else + Mag = 1.0; + Child = Spawn(ChildProjectileClass, self,, Location); + if (Child != None) { + Child.Velocity = CurrentVelocity; + Child.Velocity.X += RandRange(0.3, 1.0) * Mag * i * SpreadFactor; + Child.Velocity.Y += RandRange(0.3, 1.0) * Mag * j * SpreadFactor; + Child.Velocity.Z = Child.Velocity.Z + SpreadFactor * (FRand() - 0.5); + Child.InstigatorController = InstigatorController; + } + } + } + ExplodeInAir(); +} + + +simulated function SpawnEffects(vector HitLocation, vector HitNormal) +{ + local PlayerController PC; + + PlaySound(ImpactSound, SLOT_None, 2.0); + if (EffectIsRelevant(Location, false)) { + PC = Level.GetLocalPlayerController(); + if (PC.ViewTarget != None && VSize(PC.ViewTarget.Location - Location) < 3000) + Spawn(ExplosionEffectClass,,, HitLocation + HitNormal * 16); + Spawn(ExplosionEffectClass,,, HitLocation + HitNormal * 16); + if (ExplosionDecal != None && Level.NetMode != NM_DedicatedServer) + Spawn(ExplosionDecal, self,, HitLocation, rotator(-HitNormal)); + } +} + + +simulated function ExplodeInAir() +{ + bExploded = true; + PlaySound(AirExplosionSound, SLOT_None, 2.0); + if (Level.NetMode != NM_DedicatedServer) + Spawn(AirExplosionEffectClass); + + Explode(Location, vect(0,0,0)); + Destroy(); +} + + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + AirExplosionSound = Sound'UT3SPMA.SPMAShellBreakingExplode' + ImpactSound = Sound'UT3SPMA.SPMAShellFragmentExplode' + AmbientSound = None + LifeSpan = 8.0 + + TransientSoundRadius = 500.0 + + ChildProjectileClass = class'UT3HellfireSPMAShellChild' + SpreadFactor = 400.0 + + ExplosionEffectClass = class'UT3HellfireSPMAAirExplosion' + AirExplosionEffectClass = class'UT3HellfireSPMAAirExplosion' +} diff --git a/Classes/UT3HellfireSPMAShellChild.uc b/Classes/UT3HellfireSPMAShellChild.uc index 73444a0..3056855 100644 --- a/Classes/UT3HellfireSPMAShellChild.uc +++ b/Classes/UT3HellfireSPMAShellChild.uc @@ -1,62 +1,105 @@ -/****************************************************************************** -UT3HellfireSPMAShellChild - -Creation date: 2009-02-13 13:31 -Last change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ - -class UT3HellfireSPMAShellChild extends ONSArtilleryShellSmall; - - -simulated function PostBeginPlay() -{ - local Rotator R; - local PlayerController PC; - - if (!PhysicsVolume.bWaterVolume && Level.NetMode != NM_DedicatedServer) { - PC = Level.GetLocalPlayerController(); - if (PC.ViewTarget != None && VSize(PC.ViewTarget.Location - Location) < 6000) - Trail = Spawn(class'UT3HellfireSPMAChildTrail', self); - Glow = Spawn(class'FlakGlow', self); - } - - Super(Projectile).PostBeginPlay(); - R = Rotation; - R.Roll = 32768; - SetRotation(R); -} - - -simulated function SpawnEffects(vector HitLocation, vector HitNormal) -{ - local PlayerController PC; - - PlaySound(ImpactSound, SLOT_None, 2.0); - if (EffectIsRelevant(Location, false)) { - PC = Level.GetLocalPlayerController(); - if (PC.ViewTarget != None && VSize(PC.ViewTarget.Location - Location) < 3000) - Spawn(ExplosionEffectClass,,, HitLocation + HitNormal * 16); - Spawn(ExplosionEffectClass,,, HitLocation + HitNormal * 16); - if (ExplosionDecal != None && Level.NetMode != NM_DedicatedServer) - Spawn(ExplosionDecal, self,, HitLocation, rotator(-HitNormal)); - } -} - - -//============================================================================= -// Default values -//============================================================================= - -defaultproperties -{ - Damage = 220.0 - DamageRadius = 500.0 - - ImpactSound = Sound'SPMAShellFragmentExplode' - AmbientSound = None - TransientSoundRadius = 500.0 - - ExplosionEffectClass = class'UT3HellfireSPMAAirExplosion' - AirExplosionEffectClass = class'UT3HellfireSPMAAirExplosion' -} +/* + * Copyright © 2009 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3HellfireSPMAShellChild extends ONSArtilleryShellSmall; + + +simulated function PostBeginPlay() +{ + local Rotator R; + local PlayerController PC; + + if (!PhysicsVolume.bWaterVolume && Level.NetMode != NM_DedicatedServer) { + PC = Level.GetLocalPlayerController(); + if (PC.ViewTarget != None && VSize(PC.ViewTarget.Location - Location) < 6000) + Trail = Spawn(class'UT3HellfireSPMAChildTrail', self); + Glow = Spawn(class'FlakGlow', self); + } + + Super(Projectile).PostBeginPlay(); + R = Rotation; + R.Roll = 32768; + SetRotation(R); +} + + +simulated function SpawnEffects(vector HitLocation, vector HitNormal) +{ + local PlayerController PC; + + PlaySound(ImpactSound, SLOT_None, 2.0); + if (EffectIsRelevant(Location, false)) { + PC = Level.GetLocalPlayerController(); + if (PC.ViewTarget != None && VSize(PC.ViewTarget.Location - Location) < 3000) + Spawn(ExplosionEffectClass,,, HitLocation + HitNormal * 16); + Spawn(ExplosionEffectClass,,, HitLocation + HitNormal * 16); + if (ExplosionDecal != None && Level.NetMode != NM_DedicatedServer) + Spawn(ExplosionDecal, self,, HitLocation, rotator(-HitNormal)); + } +} + +simulated function ExplodeInAir() +{ + bExploded = true; + PlaySound(sound'ONSBPSounds.Artillery.ShellFragmentExplode', SLOT_None, 2.0); + if ( Level.NetMode != NM_DedicatedServer ) + spawn(AirExplosionEffectClass); + + Explode(Location, vect(0,0,0)); + Destroy(); +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + Damage = 220.0 + DamageRadius = 500.0 + + ImpactSound = Sound'UT3SPMA.SPMAShellFragmentExplode' + AmbientSound = None + TransientSoundRadius = 500.0 + + ExplosionEffectClass = class'UT3HellfireSPMAAirExplosion' + AirExplosionEffectClass = class'UT3HellfireSPMAAirExplosion' +} diff --git a/Classes/UT3HellfireSPMAShellTrail.uc b/Classes/UT3HellfireSPMAShellTrail.uc index d609877..71e9a28 100644 --- a/Classes/UT3HellfireSPMAShellTrail.uc +++ b/Classes/UT3HellfireSPMAShellTrail.uc @@ -13,7 +13,7 @@ class UT3HellfireSPMAShellTrail extends ProjectileTrailEmitter; // Imports //============================================================================= -#exec texture import file=..\UT3Style\Textures\include\SPMASmoke.dds +#exec texture import file=..\UT3Vehicles\Textures\SPMASmoke.dds //============================================================================= diff --git a/Classes/UT3HellfireSPMAShockBall.uc b/Classes/UT3HellfireSPMAShockBall.uc index b4de80e..a08587e 100644 --- a/Classes/UT3HellfireSPMAShockBall.uc +++ b/Classes/UT3HellfireSPMAShockBall.uc @@ -1,18 +1,18 @@ -/****************************************************************************** -UT3SPMAShockBall - -Creation date: 2009-02-10 13:32 -Latest change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ - -class UT3HellfireSPMAShockBall extends UT3HBShockBall; - - -//============================================================================= -// Default values -//============================================================================= - -defaultproperties -{ -} +/****************************************************************************** +UT3SPMAShockBall + +Creation date: 2009-02-10 13:32 +Latest change: $Id$ +Copyright (c) 2009, Wormbo +******************************************************************************/ + +class UT3HellfireSPMAShockBall extends UT3HBShockBall; + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ +} diff --git a/Classes/UT3HellfireSPMASideGun.uc b/Classes/UT3HellfireSPMASideGun.uc index 590106a..9c8f37c 100644 --- a/Classes/UT3HellfireSPMASideGun.uc +++ b/Classes/UT3HellfireSPMASideGun.uc @@ -1,10 +1,42 @@ -/****************************************************************************** -UT3HellfireSPMASideGun - -Creation date: 2009-02-09 16:10 -Latest change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ +/* + * Copyright © 2009 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3HellfireSPMASideGun extends ONSArtillerySideGun; @@ -14,7 +46,7 @@ class UT3HellfireSPMASideGun extends ONSArtillerySideGun; //============================================================================= /* 100GPing100 BEGIN */ -function CalcWeaponFire() +/*function CalcWeaponFire() { local UT3HellfireSPMA HellFire; local coords WeaponBoneCoords; @@ -25,13 +57,13 @@ function CalcWeaponFire() // Calculate fire offset in world space WeaponBoneCoords = HellFire.GetBoneCoords(WeaponFireAttachmentBone); CurrentFireOffset = (WeaponFireOffset * vect(1,0,0)) + (DualFireOffset * vect(0,1,0)); - + // Calculate rotation of the gun WeaponFireRotation = rotator(vector(CurrentAim) >> Rotation); - + // Calculate exact fire location WeaponFireLocation = WeaponBoneCoords.Origin + (CurrentFireOffset >> WeaponFireRotation); - + // Adjust fire rotation taking dual offset into account if (bDualIndependantTargeting) WeaponFireRotation = rotator(CurrentHitLocation - WeaponFireLocation); @@ -44,13 +76,13 @@ function CalcWeaponFire() simulated function InitEffects() { local UT3HellfireSPMA HellFire; - + HellFire = UT3HellfireSPMA(Owner); if (HellFire != none) { // don't even spawn on server if (Level.NetMode == NM_DedicatedServer) return; - + if ( (FlashEmitterClass != None) && (FlashEmitter == None) ) { FlashEmitter = Spawn(FlashEmitterClass); @@ -59,10 +91,10 @@ simulated function InitEffects() FlashEmitter.SetBase(self); else HellFire.AttachToBone(FlashEmitter, WeaponFireAttachmentBone); - + FlashEmitter.SetRelativeLocation(WeaponFireOffset * vect(1,0,0)); } - + if (AmbientEffectEmitterClass != none && AmbientEffectEmitter == None) { AmbientEffectEmitter = spawn(AmbientEffectEmitterClass, self,, WeaponFireLocation, WeaponFireRotation); @@ -70,7 +102,7 @@ simulated function InitEffects() AmbientEffectEmitter.SetBase(self); else HellFire.AttachToBone(AmbientEffectEmitter, WeaponFireAttachmentBone); - + AmbientEffectEmitter.SetRelativeLocation(WeaponFireOffset * vect(1,0,0)); } } else { @@ -83,33 +115,32 @@ event Tick(float DeltaTime) { local UT3HellfireSPMA HellFire; local Rotator rot; - + super.Tick(DeltaTime); - + HellFire = UT3HellfireSPMA(Owner); if (HellFire != none) { //CalcBoneRotation(); rot.Yaw = -CurrentAim.Yaw; HellFire.SetBoneRotation('SecondaryTurret_YawLift', rot); - + rot.Yaw = 0; SetRotation(rot); } -} +}*/ /* 100GPing100 END */ defaultproperties { - /* 100GPing100 BEGIN */ - //Mesh = SkeletalMesh'UT3SPMAAnims.SPMA'; - - YawBone = 'SecondaryTurret_YawLift'; - //PitchBone = 'SecondaryTurret_Pitch'; - WeaponFireAttachmentBone = 'SecondaryTurret_Barrel'; - //GunnerAttachmentBone = 'SecondaryTurret_YawLift'; - /* 100GPing100 END */ - - FireSoundClass = Sound'HellbenderFire' - AltFireSoundClass = Sound'HellbenderAltFire' - ProjectileClass = class'UT3HellfireSPMAShockBall' + Mesh = SkeletalMesh'UT3VH_SPMA_Anims.SPMA_SecondaryTurret' + RedSkin = Shader'UT3SPMATex.Body.RedSkin' + BlueSkin = Shader'UT3SPMATex.Body.BlueSkin' + YawBone = "SecondaryTurret_YawLift" + PitchBone = "SecondaryTurret_Pitch" + WeaponFireAttachmentBone = "SecondaryTurret_Tip" + GunnerAttachmentBone = "SecondaryTurret_YawLift" + + FireSoundClass = Sound'UT3A_Vehicle_Hellbender.Sounds.A_Vehicle_Hellbender_BallFire01' + AltFireSoundClass = Sound'UT3A_Vehicle_Hellbender.Sounds.A_Vehicle_Hellbender_BeamFire01' + ProjectileClass = class'UT3HellfireSPMAShockBall' } diff --git a/Classes/UT3HellfireSPMATargetReticle.uc b/Classes/UT3HellfireSPMATargetReticle.uc index f524ed3..ea848fb 100644 --- a/Classes/UT3HellfireSPMATargetReticle.uc +++ b/Classes/UT3HellfireSPMATargetReticle.uc @@ -1,74 +1,74 @@ -/****************************************************************************** -UT3HellfireSPMATargetReticle - -Creation date: 2009-02-17 15:58 -Latest change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ - -class UT3HellfireSPMATargetReticle extends ONSMortarTargetBeam; - - -//============================================================================= -// Imports -//============================================================================= - -#exec obj load file=StaticMeshes/include/UT3SPMAReticle.usx package=UT3Style.SPMAReticle - - -//============================================================================= -// Properties -//============================================================================= - -var float ReachableInitScale, ReachableScale, UnreachableScale; -var StaticMesh ReachableMesh, UnreachableMesh; - - -// controlled directly by camera -function Tick(float DeltaTime) -{ - // TODO: draw arc here? -} - - -function SetStatus(bool bActivated) -{ - if (bReticleActivated != bActivated) { - bReticleActivated = bActivated; - if (bReticleActivated) { - SetTimer(0.3, false); - SetStaticMesh(ReachableMesh); - SetDrawScale(ReachableInitScale); - } - else { - SetTimer(0.0, false); - SetStaticMesh(UnreachableMesh); - SetDrawScale(UnreachableScale); - } - } -} - - -function Timer() -{ - SetDrawScale(ReachableScale); -} - - -//============================================================================= -// Default values -//============================================================================= - -defaultproperties -{ - DrawScale3D = (X=1,Y=1,Z=1) - DrawScale = 1.0 - StaticMesh = StaticMesh'SPMAReticle' - - ReachableInitScale = 1.25 - ReachableScale = 1.0 - UnreachableScale = 0.8 - ReachableMesh = StaticMesh'SPMAReticleLock' - UnreachableMesh = StaticMesh'SPMAReticle' - bReticleActivated = False -} +/****************************************************************************** +UT3HellfireSPMATargetReticle + +Creation date: 2009-02-17 15:58 +Latest change: $Id$ +Copyright (c) 2009, 2013 Wormbo, GreatEmerald +******************************************************************************/ + +class UT3HellfireSPMATargetReticle extends ONSMortarTargetBeam; + + +//============================================================================= +// Imports +//============================================================================= + +#exec obj load file=UT3SPMAReticle.usx + + +//============================================================================= +// Properties +//============================================================================= + +var float ReachableInitScale, ReachableScale, UnreachableScale; +var StaticMesh ReachableMesh, UnreachableMesh; + + +// controlled directly by camera +function Tick(float DeltaTime) +{ + // TODO: draw arc here? +} + + +function SetStatus(bool bActivated) +{ + if (bReticleActivated != bActivated) { + bReticleActivated = bActivated; + if (bReticleActivated) { + SetTimer(0.3, false); + SetStaticMesh(ReachableMesh); + SetDrawScale(ReachableInitScale); + } + else { + SetTimer(0.0, false); + SetStaticMesh(UnreachableMesh); + SetDrawScale(UnreachableScale); + } + } +} + + +function Timer() +{ + SetDrawScale(ReachableScale); +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + DrawScale3D = (X=1,Y=1,Z=1) + DrawScale = 1.0 + StaticMesh = StaticMesh'SPMAReticle' + + ReachableInitScale = 1.25 + ReachableScale = 1.0 + UnreachableScale = 0.8 + ReachableMesh = StaticMesh'SPMAReticleLock' + UnreachableMesh = StaticMesh'SPMAReticle' + bReticleActivated = False +} diff --git a/Classes/UT3HellfireSPMATrajectory.uc b/Classes/UT3HellfireSPMATrajectory.uc index f34e536..579b679 100644 --- a/Classes/UT3HellfireSPMATrajectory.uc +++ b/Classes/UT3HellfireSPMATrajectory.uc @@ -1,105 +1,105 @@ -/****************************************************************************** -UT3HellfireSPMATrajectory - -SPMA trajectory arc. -Thanks to Switch (Gunreal - http://www.gunreal.com) who provided example code -for manipulating beam emitters to achive this effect. - -Creation date: 2009-02-25 20:59 -Last change: $Id$ -Copyright (c) 2009, Wormbo -******************************************************************************/ - -class UT3HellfireSPMATrajectory extends Emitter; - - -//============================================================================= -// Imports -//============================================================================= - -#exec obj load file=EpicParticles.utx - - -/** -Spawn the initial trajectory beam particle. -*/ -function PostBeginPlay() -{ - Emitters[0].SpawnParticle(1); - Emitters[1].SpawnParticle(1); -} - - -/** -Update the trajectory arc according to the given parameters. -*/ -function UpdateTrajectory(bool bVisible, optional vector StartLocation, optional vector StartVelocity, optional float Gravity, optional float MinZ) -{ - local float tMax, tDelta, t; - local BeamEmitter Arc; - local int i; - - Emitters[0].Disabled = !bVisible; - - // check if we need the bounding box hack - if (bVisible && Normal(StartVelocity).Z > 0) { - // need to calculate apex point (actually only apex height) - Emitters[1].Disabled = False; - Emitters[1].Particles[0].Location = StartLocation; - Emitters[1].Particles[0].Location.Z -= 0.5 * Square(StartVelocity.Z) / Gravity; - } - else { - // horizontal or downward initial velocity, so no hack required - Emitters[1].Disabled = True; - } - - if (!bVisible) - return; - - Arc = BeamEmitter(Emitters[0]); - - tMax = (StartVelocity.Z + Sqrt(Square(StartVelocity.Z) + 2 * Gravity * (StartLocation.Z - MinZ))) / Gravity; - tDelta = tMax / (Arc.HighFrequencyPoints - 1); - - Arc.HFPoints[0].Location = StartLocation; - for (i = 1; i < Arc.HighFrequencyPoints; ++i) { - t += tDelta; - Arc.HFPoints[i].Location = StartLocation + StartVelocity * t - vect(0,0,0.5) * Gravity * Square(t); - } -} - - -//============================================================================= -// Default values -//============================================================================= - -defaultproperties -{ - // the trajectory arc - Begin Object Class=BeamEmitter Name=Trajectory - MaxParticles = 1 - AutomaticInitialSpawning = False - LifetimeRange = (Min=999999.0,Max=999999.0) - StartSizeRange = (X=(Min=5.0,Max=5.0)) - HighFrequencyPoints = 50 - CoordinateSystem = PTCS_Absolute - DetermineEndPointBy = PTEP_Offset - Texture = Texture'EpicParticles.Beams.DanGradient' - AlphaTest = False // DanGradient has an alpha value of 0 and would otherwise be invisible - ColorMultiplierRange = (X=(Min=0.75,Max=0.75),Z=(Min=0.5,Max=0.5)) - Opacity = 0.75 - End Object - Emitters(0) = Trajectory - - // invisible particle placed at the trajectory apex to extend the rendering bounding box - Begin Object Class=SpriteEmitter Name=BoundingBoxHack - MaxParticles = 1 - AutomaticInitialSpawning = False - LifetimeRange = (Min=999999.0,Max=999999.0) - StartSizeRange = (X=(Min=0.0,Max=0.0)) // so it's not actually visible - CoordinateSystem = PTCS_Absolute - End Object - Emitters(1) = BoundingBoxHack - - bNoDelete = False -} +/****************************************************************************** +UT3HellfireSPMATrajectory + +SPMA trajectory arc. +Thanks to Switch (Gunreal - http://www.gunreal.com) who provided example code +for manipulating beam emitters to achive this effect. + +Creation date: 2009-02-25 20:59 +Last change: $Id$ +Copyright (c) 2009, Wormbo +******************************************************************************/ + +class UT3HellfireSPMATrajectory extends Emitter; + + +//============================================================================= +// Imports +//============================================================================= + +#exec obj load file=EpicParticles.utx + + +/** +Spawn the initial trajectory beam particle. +*/ +function PostBeginPlay() +{ + Emitters[0].SpawnParticle(1); + Emitters[1].SpawnParticle(1); +} + + +/** +Update the trajectory arc according to the given parameters. +*/ +function UpdateTrajectory(bool bVisible, optional vector StartLocation, optional vector StartVelocity, optional float Gravity, optional float MinZ) +{ + local float tMax, tDelta, t; + local BeamEmitter Arc; + local int i; + + Emitters[0].Disabled = !bVisible; + + // check if we need the bounding box hack + if (bVisible && Normal(StartVelocity).Z > 0) { + // need to calculate apex point (actually only apex height) + Emitters[1].Disabled = False; + Emitters[1].Particles[0].Location = StartLocation; + Emitters[1].Particles[0].Location.Z -= 0.5 * Square(StartVelocity.Z) / Gravity; + } + else { + // horizontal or downward initial velocity, so no hack required + Emitters[1].Disabled = True; + } + + if (!bVisible) + return; + + Arc = BeamEmitter(Emitters[0]); + + tMax = (StartVelocity.Z + Sqrt(Square(StartVelocity.Z) + 2 * Gravity * (StartLocation.Z - MinZ))) / Gravity; + tDelta = tMax / (Arc.HighFrequencyPoints - 1); + + Arc.HFPoints[0].Location = StartLocation; + for (i = 1; i < Arc.HighFrequencyPoints; ++i) { + t += tDelta; + Arc.HFPoints[i].Location = StartLocation + StartVelocity * t - vect(0,0,0.5) * Gravity * Square(t); + } +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + // the trajectory arc + Begin Object Class=BeamEmitter Name=Trajectory + MaxParticles = 1 + AutomaticInitialSpawning = False + LifetimeRange = (Min=999999.0,Max=999999.0) + StartSizeRange = (X=(Min=5.0,Max=5.0)) + HighFrequencyPoints = 50 + CoordinateSystem = PTCS_Absolute + DetermineEndPointBy = PTEP_Offset + Texture = Texture'EpicParticles.Beams.DanGradient' + AlphaTest = False // DanGradient has an alpha value of 0 and would otherwise be invisible + ColorMultiplierRange = (X=(Min=0.75,Max=0.75),Z=(Min=0.5,Max=0.5)) + Opacity = 0.75 + End Object + Emitters(0) = Trajectory + + // invisible particle placed at the trajectory apex to extend the rendering bounding box + Begin Object Class=SpriteEmitter Name=BoundingBoxHack + MaxParticles = 1 + AutomaticInitialSpawning = False + LifetimeRange = (Min=999999.0,Max=999999.0) + StartSizeRange = (X=(Min=0.0,Max=0.0)) // so it's not actually visible + CoordinateSystem = PTCS_Absolute + End Object + Emitters(1) = BoundingBoxHack + + bNoDelete = False +} diff --git a/Classes/UT3Hoverboard.uc b/Classes/UT3Hoverboard.uc new file mode 100644 index 0000000..52f8a9a --- /dev/null +++ b/Classes/UT3Hoverboard.uc @@ -0,0 +1,1084 @@ +/* + * Copyright © 2008 Wail of Suicide + * Based on the Locust Hoverboard by gel + * Additional thanks to ChaosUT2 Team for help figuring out Player collision + * while on driving, Monarch, and LordSimeon for assistance on driver positioning + * + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ +//// NEW Maybe try this for the Animations file +//#exec MESH MODELIMPORT MESH=TankVictimMesh MODELFILE=models\tank_victim.PSK RIGID=1 + + +#exec OBJ LOAD FILE=StaticMeshes\EONSLocustSM.usx +#exec OBJ LOAD FILE=Animations\EONSLocustA.ukx +#exec OBJ LOAD FILE=Textures\EONSLocustTex.utx + +#exec OBJ LOAD FILE=..\Sounds\ONSVehicleSounds-S.uax +#exec OBJ LOAD FILE=..\textures\EpicParticles.utx +#exec OBJ LOAD FILE=..\StaticMeshes\ONSWeapons-SM.usx +#exec OBJ LOAD FILE=..\textures\VMVehicles-TX.utx + +class UT3Hoverboard extends ONSHoverCraft; + +var() float MaxPitchSpeed; + +var() float JumpDuration; +var() float JumpForceMag; +var float JumpCountdown; +var float JumpDelay, LastJumpTime; + +var() float DuckDuration; +var() float DuckForceMag; +var float DuckCountdown; + +var() array BikeDustOffset; +var() float BikeDustTraceDistance; + +var() Sound JumpSound; +var() Sound AltFireSound; +var() Sound WaterDisruptSound; + +// Force Feedback +var() string JumpForce; + +var array BikeDust; +var array BikeDustLastNormal; + +var bool DoBikeJump; +var bool OldDoBikeJump; + +var bool DoBikeDuck; +var bool OldDoBikeDuck; +var bool bHoldingDuck; +var bool bOverWater; +var bool bWasOverWater; + +// Variables below by gel +var() array BikeDustOffsetTemp; +var int jumpMult; // Multiplier for the jump (int b/c i don't know how to compare floats accurately) +var bool bDuckReleased; + +//Other +var bool bAttachedDriver; +var int DriverHealth; + +Var rotator ArmDriveL,ArmDriveR; +Var rotator ForeArmDriveL, ForeArmDriveR; + +var () class TrailClass[2]; +var Emitter TrailEmitter[2]; +var () Vector TrailOffset[2]; +var () Rotator TrailRotOffset[2]; + +var() float MaxGroundSpeed, MaxWaterSpeed; +var float MaxMovementSpeed; +var float OldVelocityZ; +var vector EnterVelocity; +var float WaterCounter; + +var class LastDamageType; +var vector LastHitLocation; + +//================================================== + + +replication +{ + reliable if (bNetDirty && Role == ROLE_Authority) + DoBikeJump, DriverHealth; +} + + +// AI hint +function bool FastVehicle() +{ + return true; +} + + +function ShouldTargetMissile(Projectile P) +{ + if ( (Bot(Controller) != None) + && (Level.Game.GameDifficulty > 4 + 4*FRand()) + && (VSize(P.Location - Location) < VSize(P.Velocity)) ) + { + KDriverLeave(false); + TeamUseTime = Level.TimeSeconds + 4; + return; + } + Super.ShouldTargetMissile(P); +} + + +function bool TooCloseToAttack(Actor Other) +{ + if ( xPawn(Other) != None ) + return true; + return super.TooCloseToAttack(Other); +} + + +function Pawn CheckForHeadShot(Vector loc, Vector ray, float AdditionalScale) +{ + local vector X, Y, Z, newray; + + GetAxes(Rotation,X,Y,Z); + + if (Driver != None) + { + // Remove the Z component of the ray + newray = ray; + newray.Z = 0; + if (abs(newray dot X) < 0.7 && Driver.IsHeadShot(loc, ray, AdditionalScale)) + return Driver; + } + + return None; +} + + +simulated function Destroyed() +{ + local int i; + + if (Level.NetMode != NM_DedicatedServer) + { + for (i = 0; i < BikeDust.Length; i++) + BikeDust[i].Destroy(); + + BikeDust.Length = 0; + + if (TrailEmitter[0] != None) + TrailEmitter[0].Destroy(); + if (TrailEmitter[1] != None) + TrailEmitter[1].Destroy(); + } + + Super.Destroyed(); +} + + +simulated function DestroyAppearance() +{ + local int i; + + if (Level.NetMode != NM_DedicatedServer) + { + for (i = 0; i < BikeDust.Length; i++) + BikeDust[i].Destroy(); + + BikeDust.Length = 0; + + if (TrailEmitter[0] != None) + TrailEmitter[0].Destroy(); + if (TrailEmitter[1] != None) + TrailEmitter[1].Destroy(); + } + + Super.DestroyAppearance(); +} + + +function bool Dodge(eDoubleClickDir DoubleClickMove) +{ + Rise = 1; + ServerPlayHorn(1); + return true; +} + + +function ChooseFireAt(Actor A) +{ + if (Pawn(A) != None && Vehicle(A) == None && Controller.LineOfSightTo(A)) + { + if (!bWeaponIsAltFiring) + AltFire(0); + } + else if (bWeaponIsAltFiring) + VehicleCeaseFire(true); +} + + +simulated event DrivingStatusChanged() +{ + local int i; + + Super.DrivingStatusChanged(); + + if (bDriving && Level.NetMode != NM_DedicatedServer && BikeDust.Length == 0 && !bDropDetail) + { + BikeDust.Length = BikeDustOffset.Length; + BikeDustLastNormal.Length = BikeDustOffset.Length; + + for (i=0; i> Rotation) ); + BikeDust[i].SetDustColor( Level.DustColor ); + BikeDustLastNormal[i] = vect(0,0,1); + } + + // Create trail emitters. + if (TrailEmitter[0] == None) + { + TrailEmitter[0] = spawn(TrailClass[Team], self,, Location + (TrailOffset[0] >> Rotation) ); + TrailEmitter[0].SetBase(self); + TrailEmitter[0].SetRelativeRotation(TrailRotOffset[0]); + } + if (TrailEmitter[1] == None) + { + TrailEmitter[1] = spawn(TrailClass[Team], self,, Location + (TrailOffset[1] >> Rotation) ); + TrailEmitter[1].SetBase(self); + TrailEmitter[1].SetRelativeRotation(TrailRotOffset[1]); + } + } + else + { + if (Level.NetMode != NM_DedicatedServer) + { + for(i=0; i 0.1/HoverPenScale) + bOverWater = false; + kp = KarmaParams(KParams); + for(i=0;i= MaxMovementSpeed) + MaxThrustForce = 0.0; + else + MaxThrustForce = default.MaxThrustForce; + // GEm: Needs to play some nice animation + if (OldVelocityZ < Velocity.Z-(0.5 * MaxFallSpeed)) + TakeFallingDamage(); + OldVelocityZ = Velocity.Z; + + JumpCountdown -= DeltaTime; + + CheckJumpDuck(); + + if (DoBikeJump != OldDoBikeJump) + { + JumpCountdown = JumpDuration; + OldDoBikeJump = DoBikeJump; + if ( (Controller != Level.GetLocalPlayerController()) && EffectIsRelevant(Location,false) ) + { + JumpEffect = Spawn(class'EONSLocustJumpEffect'); + JumpEffect.SetBase(Self); + ClientPlayForceFeedback(JumpForce); + } + } + + if ( Level.NetMode != NM_DedicatedServer ) + { + EnginePitch = 64.0 + VSize(Velocity)/MaxPitchSpeed * 64.0; + SoundPitch = FClamp(EnginePitch, 64, 128); + + if (TrailEmitter[0] != None && TrailEmitter[1] != None) + { + MyVelocity = Normal(Velocity) dot Normal(vector(Rotation)); + if (MyVelocity > 0) + Multiplier = -1; + if (MyVelocity < 0) + Multiplier = 1; + + MyRotator.Pitch=(16384 + (Multiplier * VSize(Velocity)/MaxPitchSpeed * 8192)); + + TrailEmitter[0].SetRelativeRotation(MyRotator); + TrailEmitter[1].SetRelativeRotation(MyRotator); + } + + if( !bDropDetail ) + { + for(i=0; i> Rotation); + TraceEnd = TraceStart - ( BikeDustTraceDistance * vect(0,0,1) ); + + HitActor = Trace(HitLocation, HitNormal, TraceEnd, TraceStart, true); + + if(HitActor == None) + { + BikeDust[i].UpdateHoverDust(false, 0); + } + else + { + HitDist = VSize(HitLocation - TraceStart); + + BikeDust[i].SetLocation( HitLocation + 10*HitNormal); + + BikeDustLastNormal[i] = Normal( 3*BikeDustLastNormal[i] + HitNormal ); + BikeDust[i].SetRotation( Rotator(BikeDustLastNormal[i]) ); + + BikeDust[i].UpdateHoverDust(!bOverWater, HitDist/BikeDustTraceDistance); + + // If dust is just turning on, set OldLocation to current Location to avoid spawn interpolation. + if(!BikeDust[i].bDustActive) + BikeDust[i].OldLocation = BikeDust[i].Location; + + if (bOverWater) + BikeDust[i].bDustActive = false; + else + BikeDust[i].bDustActive = true; + } + } + } + } //--End if Level.NetMode + + // Spin Attack - Removed + + if (Driver != None && Driver.Health > 0 && DriverHealth > Driver.Health) + { + if (DriverHealth >= Driver.Health+10){ + //log(self@"Tick: Health watchdog eject when old health"@DriverHealth@"new health"@Driver.Health); + EjectDriver();} + DriverHealth = Driver.Health; + } +} + +function TakeFallingDamage() +{ + local float Shake, EffectiveSpeed; + + if (OldVelocityZ < -0.5 * MaxFallSpeed) + { + if ( Role == ROLE_Authority ) + { + MakeNoise(1.0); + if (OldVelocityZ < -1 * MaxFallSpeed) + { + EffectiveSpeed = OldVelocityZ; + if ( TouchingWaterVolume() ) + EffectiveSpeed = FMin(0, EffectiveSpeed + 100); + if ( EffectiveSpeed < -1 * MaxFallSpeed ) + TakeDamage(-100 * (EffectiveSpeed + MaxFallSpeed)/MaxFallSpeed, None, Location, vect(0,0,0), class'Fell'); + } + } + if ( Controller != None ) + { + Shake = FMin(1, -1 * OldVelocityZ/MaxFallSpeed); + Controller.DamageShake(Shake); + } + } + else if (OldVelocityZ < -1.4 * JumpZ) + MakeNoise(0.5); +} + +simulated function float ChargeBar() +{ + // Clamp to 0.999 so charge bar doesn't blink when maxed + if (Level.TimeSeconds - JumpDelay < LastJumpTime) + return (FMin((Level.TimeSeconds - LastJumpTime) / JumpDelay, 0.999)); + else + return 0.999; +} + + +simulated function CheckJumpDuck() +{ + local KarmaParams KP; + local Emitter JumpEffect; + local bool bOnGround; + local int i; + + KP = KarmaParams(KParams); + + // Can only start a jump when in contact with the ground. + bOnGround = false; + for (i=0; i 0 && !bHoldingDuck) || (Rise >= 0 && bDuckReleased)) + && Level.TimeSeconds - JumpDelay >= LastJumpTime) + { + PlaySound(JumpSound,,1.0); + + if (Role == ROLE_Authority) + DoBikeJump = !DoBikeJump; + + if (Level.NetMode != NM_DedicatedServer) + { + JumpEffect = Spawn(class'EONSLocustJumpEffect'); + JumpEffect.SetBase(Self); + ClientPlayForceFeedback(JumpForce); + } + + if ( AIController(Controller) != None ) + Rise = 0; + + LastJumpTime = Level.TimeSeconds; + bDuckReleased = false; + } + else if (Rise < 0 && bOnGround) + { + if (!bHoldingDuck) + { + bHoldingDuck = true; + DriveAnim = 'Crouch'; + Driver.LoopAnim(DriveAnim, , 0.25); + Driver.SetCollisionSize(Driver.default.CollisionRadius, Driver.CrouchHeight); + } + + bDuckReleased = false; + jumpMult += 15; + + if (jumpMult > 1500) + { + jumpMult = 1500; + } + } + else if (DuckCountdown <= 0.0 && Rise < 0) + { + if (!bHoldingDuck) + { + bHoldingDuck = True; + + DriveAnim = 'Crouch'; + Driver.LoopAnim(DriveAnim, , 0.25); + Driver.SetCollisionSize(Driver.default.CollisionRadius, Driver.CrouchHeight); + + if ( AIController(Controller) != None ) + Rise = 0; + + JumpCountdown = 0.0; // Stops any jumping that was going on. + } + } + else + { + if (bOnGround && bHoldingDuck + && Driver.SetCollisionSize(Driver.default.CollisionRadius, Driver.default.CollisionHeight)) + { + bHoldingDuck = False; + bDuckReleased = true; + DriveAnim = default.DriveAnim; + Driver.LoopAnim(DriveAnim, , 0.25); + } + } +} + +// GEm: Also needs some repulsor visual effect +simulated function GoOnWater() +{ + MaxMovementSpeed = MaxWaterSpeed; + PlaySound(WaterDisruptSound, , 1.0); +} + +simulated function GoOffWater() +{ + MaxMovementSpeed = MaxGroundSpeed; +} + + +simulated function KApplyForce(out vector Force, out vector Torque) +{ + Super.KApplyForce(Force, Torque); + + if (bDriving && JumpCountdown > 0.0) + { + Force += vect(0,0,1) * JumpForceMag; + } + if (VSize(EnterVelocity) != 0.0) + { + Force += EnterVelocity; + EnterVelocity = vect(0.0,0.0,0.0); + } +} + +//================================================== + +event TakeDamage (int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, class DamageType) +{ + //Don't take damage from Avrils, this is a hack because we basically don't want Avrils locking on hoverboards in the first place + //Unfortunately the only way we can handle that is by replacing the Avril, and there's no guarantee all mappers will use a modified Avril + //if (DamageType == class'DamTypeONSAVRiLRocket') + //{ + // Damage *= 0; + // Momentum *= 0; + //} + local Pawn OldPawn; + + //log(self@"TakeDamage: Health"@Driver.Health@"Damage"@Damage@"Instigator"@EventInstigator@"Momentum"@Momentum@"Damage Type"@DamageType); + + OldPawn = Driver; + + // GEm: Take momentum but not damage + Super.TakeDamage(0, EventInstigator, HitLocation, Momentum, DamageType); + + //Eject driver after suffering any damage. + if (Controller != None && Driver != None) + { + if (!Controller.bGodMode && (EventInstigator == None || (EventInstigator.GetTeamNum() != Driver.GetTeamNum() || EventInstigator == Driver)) + && Damage > 0 ) + { + if (EventInstigator != None && EventInstigator.GetTeamNum() != Driver.GetTeamNum() + && Damage < Driver.Health) // GEm: Don't bother ejecting if the driver's dead meat anyway + { + EjectDriver(); + OldPawn.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType); + } + else + Driver.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType); + LastDamageType = DamageType; + LastHitLocation = HitLocation; + } + } +} + + +event Bump(actor Other) +{ + if (xPawn(Other) != None) + Velocity = vect(0,0,0); +} + + +event Touch( Actor Other ) +{ + if ( xPawn(Other) != none ) + Velocity = vect(0,0,0); +} + + +function KDriverEnter (Pawn P) +{ + EnterVelocity = P.Velocity; + + Super.KDriverEnter(P); // calls the normal function + + SetCollision(true, true); + + DriverHealth = P.Health; + BikeDustOffsetTemp[0] = BikeDustOffset[0]; + BikeDustOffsetTemp[1] = BikeDustOffset[1]; + + // Tweaks so players can be damaged while on the board + Driver.SetCollision(true,false,false); + Driver.bCanPickupInventory=false; +} + + +function bool KDriverLeave (bool bForceLeave) +{ + DriverHealth = 0; + if (Driver != None) // GEm: Prevent exploits + Driver.SetCollisionSize(Driver.default.CollisionRadius, Driver.default.CollisionHeight); + + if (Driver != None) + Driver.bCanPickupInventory=Driver.default.bCanPickupInventory; + + if ( PlayerReplicationInfo != None && PlayerReplicationInfo.HasFlag != None) + Driver.HoldFlag(PlayerReplicationInfo.HasFlag); + + if (Driver != None) + Driver.Velocity = Velocity; + + return Super.KDriverLeave(bForceLeave); +} + +function DriverLeft() +{ + Super.DriverLeft(); + Destroy(); +} + + +function DriverDied() +{ + if (Driver != None) + Driver.bCanPickupInventory=Driver.default.bCanPickupInventory; + if ( PlayerReplicationInfo != None && PlayerReplicationInfo.HasFlag != None) + PlayerReplicationInfo.HasFlag.Drop(0.5 * Velocity); + + Super.DriverDied(); + + Destroy(); +} + + +simulated event StartDriving(Vehicle V) +{ + Super.StartDriving(V); + V.AttachDriver( Self ); +} + + +//If we have a Karma impact, eject +event KImpact(actor Other, vector Pos, vector ImpactVel, vector ImpactNorm) +{ + if (Role == ROLE_Authority) + { + ImpactInfo.Other = Other; + ImpactInfo.Pos = Pos; + ImpactInfo.ImpactVel = ImpactVel; + ImpactInfo.ImpactNorm = ImpactNorm; + ImpactInfo.ImpactAccel = KParams.KAcceleration; + ImpactTicksLeft = ImpactDamageTicks; + + // if we hit a solid object going too fast eject the driver + if ( Other != None && !ClassIsChildOf(Other.class, class'TerrainInfo') && Vsize(ImpactVel) > 8000){ //2000 + //log(self@"KImpact: Ejecting due to impact, health"@Driver.Health); + EjectDriver();} + } +} + + +// New Eject +function EjectDriver() +{ + local Pawn OldPawn; + local vector EjectVel; + //local UT3HoverboardRagdolliser HR; + local UT3RagdollInventory RI; + + OldPawn = Driver; + + KDriverLeave( true ); + + if ( OldPawn == None ) + return; + + EjectVel = Velocity; + OldPawn.Velocity = Velocity; + + /*HR = Spawn(class'UT3HoverboardRagdolliser', OldPawn); + if (HR != None) + HR.Ragdollise(LastDamageType, LastHitLocation);*/ + + if (xPawn(OldPawn) != None) + OldPawn.PlaySound(xPawn(OldPawn).GetSound(EST_LandGrunt), SLOT_Interact); + + RI = UT3RagdollInventory(OldPawn.FindInventoryType(class'UT3RagdollInventory')); + if (RI != None) + RI.StartRagdoll(class'UT3RagdollInventory'.default.FeignDeathLimit, true); +} + +// GEm: Don't do any damage on dying +function VehicleExplosion(vector MomentumNormal, float PercentMomentum); + +function AltFire(optional float F) +{ + MaxYawRate = 0.1; + PlaySound(AltFireSound, , 1.0); + bWeaponIsAltFiring = true; +} + +function VehicleCeaseFire(bool bWasAltFire) +{ + Super.VehicleCeaseFire(bWasAltFire); + + if (bWasAltFire) + { + MaxYawRate = default.MaxYawRate; + bWeaponIsAltFiring = false; + } +} + +//================================================== + + +simulated function AttachDriver(Pawn P) +{ + Super.AttachDriver(P); + bAttachedDriver=true; + + //Arms + //LeftArm + ArmDriveL.Yaw=5000; //9000; + ArmDriveL.Pitch=-4000; + P.SetBoneRotation('Bip01 L UpperArm',ArmDriveL); + ForeArmDriveL.Yaw=10000; //3000; + ForeArmDriveL.Roll=-7000; //32678; + P.SetBoneRotation('Bip01 L ForeArm',ForeArmDriveL); + //RightArm + ArmDriveR.Yaw=4000; //9000; + ArmDriveR.Pitch=-2000; //6000; + P.SetBoneRotation('Bip01 R UpperArm',ArmDriveR); + ForeArmDriveR.Yaw=11000; //3000; + ForeArmDriveR.Pitch=1000; //3000; + P.SetBoneRotation('Bip01 R ForeArm',ForeArmDriveR); +} + +simulated function DetachDriver(Pawn P) +{ + P.SetBoneRotation('Bip01 Head'); + P.SetBoneRotation('Bip01 Spine'); + P.SetBoneRotation('Bip01 Spine1'); + P.SetBoneRotation('Bip01 Spine2'); + P.SetBoneRotation('Bip01 L Clavicle'); + P.SetBoneRotation('Bip01 R Clavicle'); + P.SetBoneRotation('Bip01 L UpperArm'); + P.SetBoneRotation('Bip01 R UpperArm'); + P.SetBoneRotation('Bip01 L ForeArm'); + P.SetBoneRotation('Bip01 R ForeArm'); + P.SetBoneRotation('Bip01 L Thigh'); + P.SetBoneRotation('Bip01 R Thigh'); + P.SetBoneRotation('Bip01 L Calf'); + P.SetBoneRotation('Bip01 R Calf'); + + bAttachedDriver=false; + Super.DetachDriver(P); +} + + +//================================================== + + +static function StaticPrecache(LevelInfo L) +{ + Super.StaticPrecache(L); + + L.AddPrecacheStaticMesh(StaticMesh'UT3HoverboardSM'); + L.AddPrecacheStaticMesh(StaticMesh'AW-2004Particles.Debris.Veh_Debris2'); + L.AddPrecacheStaticMesh(StaticMesh'AW-2004Particles.Debris.Veh_Debris1'); + L.AddPrecacheStaticMesh(StaticMesh'ONSWeapons-SM.PC_MantaJumpBlast'); + + L.AddPrecacheMaterial(Material'ExplosionTex.Framed.exp2_frames'); + L.AddPrecacheMaterial(Material'ExplosionTex.Framed.exp1_frames'); + L.AddPrecacheMaterial(Material'ExplosionTex.Framed.we1_frames'); + L.AddPrecacheMaterial(Material'AW-2004Particles.Fire.MuchSmoke1'); + L.AddPrecacheMaterial(Material'AW-2004Particles.Fire.NapalmSpot'); + L.AddPrecacheMaterial(Material'EpicParticles.Fire.SprayFire1'); + L.AddPrecacheMaterial(Material'WeaponSkins.Skins.RocketTex0'); + L.AddPrecacheMaterial(Material'AW-2004Particles.Energy.JumpDuck'); + L.AddPrecacheMaterial(Material'AW-2004Particles.Energy.AirBlast'); + L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.GrenExpl'); + L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.SmokePanels2'); + L.AddPrecacheMaterial(Material'Engine.GRADIENT_Fade'); + +} + +simulated function UpdatePrecacheStaticMeshes() +{ + Level.AddPrecacheStaticMesh(StaticMesh'UT3HoverboardSM'); + Level.AddPrecacheStaticMesh(StaticMesh'AW-2004Particles.Debris.Veh_Debris2'); + Level.AddPrecacheStaticMesh(StaticMesh'AW-2004Particles.Debris.Veh_Debris1'); + Level.AddPrecacheStaticMesh(StaticMesh'ONSWeapons-SM.PC_MantaJumpBlast'); + Super.UpdatePrecacheStaticMeshes(); +} + +simulated function UpdatePrecacheMaterials() +{ + Level.AddPrecacheMaterial(Material'ExplosionTex.Framed.exp2_frames'); + Level.AddPrecacheMaterial(Material'ExplosionTex.Framed.exp1_frames'); + Level.AddPrecacheMaterial(Material'ExplosionTex.Framed.we1_frames'); + Level.AddPrecacheMaterial(Material'AW-2004Particles.Fire.MuchSmoke1'); + Level.AddPrecacheMaterial(Material'AW-2004Particles.Fire.NapalmSpot'); + Level.AddPrecacheMaterial(Material'EpicParticles.Fire.SprayFire1'); + Level.AddPrecacheMaterial(Material'WeaponSkins.Skins.RocketTex0'); + Level.AddPrecacheMaterial(Material'AW-2004Particles.Energy.JumpDuck'); + Level.AddPrecacheMaterial(Material'VMVehicles-TX.RVGroup.RVbladesSHAD'); + Level.AddPrecacheMaterial(Material'VMVehicles-TX.HoverBikeGroup.NewHoverCraftNOcolor'); + Level.AddPrecacheMaterial(Material'AW-2004Particles.Energy.AirBlast'); + Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.GrenExpl'); + Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.SmokePanels2'); + Level.AddPrecacheMaterial(Material'Engine.GRADIENT_Fade'); + + Super.UpdatePrecacheMaterials(); +} + +//================================================== + +defaultproperties +{ + VehiclePositionString="on a hoverboard" + VehicleNameString="UT3 Hoverboard" + + Mesh=Mesh'UT3Hoverboard' + DrawScale3D=(X=1.2,Y=1.2,Z=1.2) + Skins(0)=Material'EONSLocustTex.UT3HoverboardGrey' + RedSkin=Material'EONSLocustTex.UT3HoverboardGrey' + BlueSkin=Material'EONSLocustTex.UT3HoverboardGrey' + + TrailClass(0)=class'EONSLocustThrusterEffectRed' + TrailClass(1)=class'EONSLocustThrusterEffectBlue' + TrailOffset(0)=(X=25.000000,Y=0.000000,Z=2.000000) + TrailOffset(1)=(X=-25.000000,Y=0.000000,Z=6.000000) + TrailRotOffset(0)=(Pitch=15000) //Pitch=16384 + TrailRotOffset(1)=(Pitch=15000) + + DriveAnim="Idle_Biggun" + DrivePos=(X=0.000000,Y=0.000000,Z=61.000000) + DriveRot=(Yaw=6000) + + HealthMax=1.000000 + Health=1 + LinkHealMult=1.000000 + + DriverDamageMult=1.0 + MomentumMult=2.0 + CollisionHeight=1.0 + MinRunOverSpeed=100000 + + DestroyedVehicleMesh=StaticMesh'EONSLocustSM.UT3HoverboardSM' + DestructionEffectClass=class'Onslaught.ONSSmallVehicleExplosionEffect' + DisintegrationEffectClass=class'Onslaught.ONSVehicleExplosionEffect' + DisintegrationHealth=-25 + + HornSounds(0)=Sound'ONSVehicleSounds-S.Horns.Horn02' + HornSounds(1)=Sound'ONSVehicleSounds-S.Horns.La_Cucharacha_Horn' + + // GEm: Should make sure none of the below ever happen + //RanOverDamageType=class'DamTypeEONSLocustHeadshot' + //CrushedDamageType=class'DamTypeEONSLocustPancake' + + IdleSound=Sound'UT3A_Vehicle_Hoverboard.WAV.A_Vehicle_HoverBoard_Engine01' + StartUpSound=Sound'UT3A_Vehicle_Hoverboard.SoundCues.A_Vehicle_Hoverboard_EngineStartCue' + ShutDownSound=Sound'UT3A_Vehicle_Hoverboard.SoundCues.A_Vehicle_HoverBoard_EngineStopCue' + JumpSound=Sound'UT3A_Vehicle_Hoverboard.SoundCues.A_Vehicle_HoverBoard_JumpCue' + AltFireSound=Sound'UT3A_Vehicle_Hoverboard.WAV.A_Vehicle_Hoverboard_GrappleFail01' + WaterDisruptSound=Sound'UT3A_Vehicle_Hoverboard.WAV.A_Vehicle_Hoverboard_WaterDisrupt01' + MaxPitchSpeed=1200.000000 + SoundVolume=255 + SoundRadius=600.000000 + + StartUpForce="HoverBikeStartUp" + ShutDownForce="HoverBikeShutDown" + JumpForce="HoverBikeJump" + + FPCamPos=(Z=50.000000) + + //Normal + TPCamDistance=250.000000 //NOTE: Be sure TO DELETE THIS LINE from USER.INI as it overrides this value and wil be re-added to the ini as soon as you use the vehicle, all this does here is make it the starting distance + TPCamLookat=(X=10.000000,Z=0.000000) + TPCamWorldOffset=(Z=140.000000) + + //Gears or Outsider Style + //TPCamDistance=150.000000 + //TPCamLookat=(X=0.000000,Y=40.000000,Z=0.000000) //Gears Style, more Y is needed for a true Gears style, 40 is more Outsider + //TPCamWorldOffset=(Z=100.000000) + + //Aerial View + //TPCamDistance=200.000000 + //TPCamLookat=(X=-10.000000,Z=0.000000) + //TPCamWorldOffset=(Z=50.000000) + + bShowDamageOverlay=True + bDrawDriverInTP=True + bDrawMeshInFP=True + bTurnInPlace=True + bScriptedRise=True + bHasAltFire=False + bCanStrafe=false + bShowChargingBar=True + bCanFlip=True + bDriverCollideActors=True + + MaxViewYaw=16000 + MaxViewPitch=16000 + + ExitPositions(0)=(Z=60.000000) + ExitPositions(1)=(Z=60.000000) + ExitPositions(2)=(Z=60.000000) + ExitPositions(3)=(Z=60.000000) + ExitPositions(4)=(Z=60.000000) + ExitPositions(5)=(Z=60.000000) + ExitPositions(6)=(Z=60.000000) + ExitPositions(7)=(Z=60.000000) + + EntryPosition=(X=0,Y=0,Z=0) + EntryRadius=140.0 + + ThrusterOffsets(0)=(X=50.000000,Z=10.000000) + ThrusterOffsets(1)=(X=-50.000000,Z=10.000000) + ThrusterOffsets(2)=(Z=0.000000) + + BikeDustOffset(0)=(X=30.000000,Z=10.000000) + BikeDustOffset(1)=(X=-30.000000,Z=10.000000) + BikeDustTraceDistance=100.000000 + + HoverSoftness=0.0 // GEm: Controls amortisation. We don't need that at all. + HoverPenScale=2.0 // GEm: Controls how well the board follows land curves. High values create "bounciness". + HoverCheckDist=50.0 + + UprightStiffness=400.000000 + UprightDamping=300.000000 + + MaxThrustForce=40.000000 //20.000 + LongDamping=0.020000 + + MaxStrafeForce=2.000000 + LatDamping=0.100000 + + TurnTorqueFactor=1000.000000 + TurnTorqueMax=150.000000 //50 + TurnDamping=30.000000 //15, 30.000 + MaxYawRate=12.000000 //6, 3.5 + + PitchTorqueFactor=250.000000 + PitchTorqueMax=10.000000 + PitchDamping=30.000000 + + RollTorqueTurnFactor=550.000000 + RollTorqueStrafeFactor=400.000000 + RollTorqueMax=15.000000 + RollDamping=10.000000 + + StopThreshold=200.000000 + VehicleMass=1.5 //2.0 + + JumpDuration=0.100000 + JumpForceMag=160.0 + JumpDelay=1.000000 + + // + + ImpactDamageSounds=() + ImpactDamageSounds(0) = Sound'UT3A_Vehicle_Hoverboard.WAV.A_Vehicle_Hoverboard_Collide01' + ImpactDamageSounds(1) = Sound'UT3A_Vehicle_Hoverboard.WAV.A_Vehicle_Hoverboard_Collide02' + + NoEntryTexture=Texture'HUDContent.NoEntry' + TeamBeaconTexture=Texture'ONSInterface-TX.HealthBar' + TeamBeaconBorderMaterial=Material'InterfaceContent.BorderBoxD' + + StolenAnnouncement=None // + StolenSound=None //sound'ONSVehicleSounds-S.CarAlarm01' + + CrosshairColor=(R=0,G=255,B=0,A=255) + CrosshairX=32 + CrosshairY=32 + CrosshairTexture=Texture'ONSInterface-TX.MineLayerReticle' //Texture'ONSInterface-TX.tankBarrelAligned' + VehicleIcon=(Material=Texture'AS_FX_TX.HUD.TrackedVehicleIcon',X=0,Y=0,SizeX=64,SizeY=64) + + bTeamLocked=False + bZeroPCRotOnEntry=false + bSetPCRotOnPossess=false + bSpecialHUD=True + + // + + DestructionLinearMomentum=(Min=62000.000000,Max=100000.000000) + DestructionAngularMomentum=(Min=25.000000,Max=75.000000) + DamagedEffectScale=0.500000 + DamagedEffectOffset=(X=28.000000,Y=-10.000000,Z=10.000000) + ImpactDamageMult=0.00008 + + jumpMult=1000 + bDuckReleased=false + + bDriverHoldsFlag=true + bCanCarryFlag=true + FlagBone="trail2" + FlagOffset=(Z=45.000000) + FlagRotation=(Yaw=32768) + + ObjectiveGetOutDist=10.000000 + bTraceWater=True + MaxDesireability=0.5 + + MeleeRange=-200.000000 + GroundSpeed=700.000000 + + MaxGroundSpeed=900.0 + MaxWaterSpeed=300.0 + MaxMovementSpeed=900.0 + + Begin Object Class=KarmaParamsRBFull Name=KParams0 + kMaxSpeed=12000.0 // GEm: Around 3000 is the falling speed off the Torlan tower, 1200 is the fall damage threshold + KInertiaTensor(0)=1.300000 + KInertiaTensor(3)=3.000000 + KInertiaTensor(5)=3.500000 + KLinearDamping=0.150000 + KAngularDamping=0.000000 + KStartEnabled=True + bHighDetailOnly=False + bClientOnly=False + bKDoubleTickRate=True + bKStayUpright=True + bKAllowRotate=True + bDestroyOnWorldPenetrate=True + bDoSafetime=True + KFriction=0.500000 + KImpactThreshold=700.000000 + End Object + KParams=KarmaParamsRBFull'KParams0' + + bEjectDriver = true + + bBlockActors = false // GEm: This is so we don't instantly die, KDriverEnter unsets this +} diff --git a/Classes/UT3HoverboardInteraction.uc b/Classes/UT3HoverboardInteraction.uc new file mode 100644 index 0000000..40e834f --- /dev/null +++ b/Classes/UT3HoverboardInteraction.uc @@ -0,0 +1,116 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3HoverboardInteraction extends Interaction; + +var float LastCallTime; + +function bool KeyEvent(EInputKey Key, EInputAction Action, FLOAT Delta ) +{ + local array Keys; + local int i; + local Pawn LocalPawn; + local Vehicle NewHoverboard; + + LocalPawn = ViewportOwner.Actor.Pawn; + Keys = GetKeyBindNum("SwitchWeapon 10", ViewportOwner.Actor); + for (i = 0; i < Keys.length; i++) + { + if (Action == IST_Press && Key == Keys[i] && RagdollMadnessPawn(LocalPawn) == None + && LocalPawn != None && LocalPawn.Health > 0) + { + if (Vehicle(LocalPawn) == None && !LocalPawn.PhysicsVolume.bWaterVolume + && ViewportOwner.Actor.Level.TimeSeconds > LastCallTime + 1.0) + { + // GEm: Spawn a hoverboard and autoenter it + NewHoverboard = LocalPawn.Spawn(class'UT3Hoverboard'); + if (NewHoverboard != None) + NewHoverboard.TryToDrive(LocalPawn); + } + else if (UT3Hoverboard(LocalPawn) != None) + { + UT3Hoverboard(LocalPawn).KDriverLeave(false); + LastCallTime = ViewportOwner.Actor.Level.TimeSeconds; + } + } + } + + return false; +} + +static function array GetKeyBindNum( string Cmd, PlayerController Ref ) +{ + local string BindStr; + local array Bindings; + local array Results; + local int i, idx, Key; + + if ( Ref == None || Cmd == "" ) + return Results; + + BindStr = Ref.ConsoleCommand("BINDINGTOKEY" @ "\"" $ Cmd $ "\""); + if ( BindStr != "" ) + { + Split(BindStr, ",", Bindings); + if ( Bindings.Length > 0 ) + { + for ( i = 0; i < Bindings.Length; i++ ) + { + Key = int(Ref.ConsoleCommand("KEYNUMBER"@Bindings[i])); + if (Key != -1) + { + Results[idx] = EInputKey(Key); + idx++; + } + } + } + } + + return Results; +} + +function NotifyLevelChange() +{ + Master.RemoveInteraction(self); +} + +defaultproperties +{ + bActive = true +} diff --git a/Classes/UT3HoverboardRagdolliser.uc b/Classes/UT3HoverboardRagdolliser.uc new file mode 100644 index 0000000..372f795 --- /dev/null +++ b/Classes/UT3HoverboardRagdolliser.uc @@ -0,0 +1,117 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3HoverboardRagdolliser extends ReplicationInfo; + +var Pawn Puppet; +var Pawn NewPawn; + +simulated function Ragdollise(class DamType, vector HitLoc) +{ + if (Pawn(Owner) != None) + Puppet = Pawn(Owner); + else + Destroy(); // GEm: If we don't have a puppet to ragdollise, life has no purpose + + //if (Puppet.Controller != None) + // Puppet.Controller.ClientDying(DamType, HitLoc); + //Puppet.ShouldCrouch(true); + if (xPawn(Puppet) != None) + xPawn(Puppet).PlayDyingAnimation(DamType, HitLoc); + if (PlayerController(Puppet.Controller) != None) + PlayerController(Puppet.Controller).BehindView(true); +} + +simulated function Destroyed() +{ + local Controller Puppeteer; + + if (Puppet == None) + { + Super.Destroyed(); + return; + } + + //Puppet.ShouldCrouch(false); + + Puppeteer = Puppet.Controller; + + + + + if ( Puppeteer.PawnClass != None ) + NewPawn = Spawn(Puppeteer.PawnClass,,,Puppet.Location,Puppet.Rotation); + + if( NewPawn==None ) + { + NewPawn = Spawn(Level.Game.GetDefaultPlayerClass(Puppeteer),,,Puppet.Location,Puppet.Rotation); + } + if ( NewPawn == None ) + { + warn("UT3HoverboardRagdolliser: Could not spawn player of type "$Puppeteer.PawnClass); + Puppeteer.GotoState('Dead'); + if ( PlayerController(Puppeteer) != None ) + PlayerController(Puppeteer).ClientGotoState('Dead','Begin'); + return; + } + NewPawn.Anchor = Puppet.Anchor; + NewPawn.LastStartSpot = Puppet.LastStartSpot; + NewPawn.LastStartTime = Puppet.LastStartTime; + NewPawn.Inventory = Puppet.Inventory; + + if (Puppeteer != None) + Puppeteer.UnPossess(); + Puppeteer.Possess(NewPawn); + + Puppeteer.ClientSetRotation(NewPawn.Rotation); + if (PlayerController(Puppet.Controller) != None) + { + //PlayerController(Puppet.Controller).Restart(); + //PlayerController(Puppet.Controller).BehindView(false); + //PlayerController(Puppet.Controller).EnterStartState(); + } + //Puppet.DropToGround(); + //Puppet.SetAnimAction(Puppet.IdleWeaponAnim); + Puppet.Destroy(); +} + +defaultproperties +{ + LifeSpan = 2.0 +} diff --git a/Classes/UT3Inv_Ejection.uc b/Classes/UT3Inv_Ejection.uc new file mode 100644 index 0000000..9f773f3 --- /dev/null +++ b/Classes/UT3Inv_Ejection.uc @@ -0,0 +1,49 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3Inv_Ejection extends Armor; + +DefaultProperties +{ + ProtectionType=Class'UT3DmgType_SelfDestruct'; + AbsorptionPriority=99; + Charge=30; + LifeSpan=10.0; +} diff --git a/Classes/UT3Inv_SelfDestruct.uc b/Classes/UT3Inv_SelfDestruct.uc new file mode 100644 index 0000000..197d640 --- /dev/null +++ b/Classes/UT3Inv_SelfDestruct.uc @@ -0,0 +1,50 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3Inv_SelfDestruct extends Armor; + +DefaultProperties +{ + ProtectionType=Class'UT3DmgType_SelfDestruct'; + ArmorAbsorption=100; + AbsorptionPriority=100; + Charge=400; + LifeSpan=1.0; +} diff --git a/Classes/UT3Leviathan.uc b/Classes/UT3Leviathan.uc new file mode 100644 index 0000000..24fc2c6 --- /dev/null +++ b/Classes/UT3Leviathan.uc @@ -0,0 +1,593 @@ +/* + * Copyright © 2007, 2009 Wormbo + * Copyright © 2007, 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3Leviathan extends ONSMobileAssaultStation; + + +//============================================================================= +// Variables +//============================================================================= + +var bool bBotDeploy; // delayed bot deploy flag +var float /*LastDeployStartTime,*/ LastDeployCheckTime, LastDeployAttempt; +var bool bDrawCanDeployTooltip; +var() float MaxDeploySpeed; +var IntBox DeployIconCoords; + +var float OldWheelPitch[2]; + +var Material RedSkinB[2], BlueSkinB[2]; + +replication +{ + reliable if (Role < ROLE_Authority) + ServerToggleDeploy; +} + +simulated function PostBeginPlay() +{ + PlayAnim('InActiveStill', 1.0, 0.0); + super.PostBeginPlay(); +} + +simulated function Tick(float DeltaTime) +{ + Super.Tick(DeltaTime); + + if (bBotDeploy || Role == ROLE_Authority && IsHumanControlled() && Rise > 0 && Level.TimeSeconds - LastDeployAttempt > 0.1) + { + if (bBotDeploy) + { + Throttle = 0; + Steering = 0; + Rise = 1; // handbrake to quickly slow down + } + ServerToggleDeploy(); + /*if (bBotDeploy && LastDeployStartTime == Level.TimeSeconds) + { + bBotDeploy = False; + Rise = 0; + }*/ + LastDeployAttempt = Level.TimeSeconds; + } + if (IsLocallyControlled() && IsHumanControlled() && Level.TimeSeconds - LastDeployCheckTime > 0.25) + { + // check if can be deployed + bDrawCanDeployTooltip = IsInState('Undeployed') && Driver != None && CanDeploy(True); + LastDeployCheckTime = Level.TimeSeconds; + } + if (Level.NetMode != NM_DedicatedServer && IsInState('Undeployed')) + { + // GEm: Stop wheels from rotating + FixFenderRotation('Rt_Front_Foot', 'Rt_Front_Tire', 0); + FixFenderRotation('Lt_Front_Foot', 'Lt_Front_Tire', 1); + } +} + +simulated function FixFenderRotation(name BoneToSet, name BoneToCopy, byte i) +{ + local rotator NewRotation; + + // GEm: Still acts weirdly, unfortunately (like the SPMA) + NewRotation = GetBoneRotation(BoneToSet); + NewRotation.Pitch = OldWheelPitch[i]-NewRotation.Pitch; + NewRotation.Roll = 32768; + NewRotation.Yaw = 32768; + SetBoneRotation(BoneToSet, NewRotation); + OldWheelPitch[i] = NewRotation.Pitch; +} + +function ServerToggleDeploy() +{ + if (CanDeploy()) + { + bBotDeploy = false; + Rise = 0; + GotoState('Deploying'); + } + else if (IsHumanControlled()) + { + bBotDeploy = false; + Rise = 0; + } +} + +simulated function bool CanDeploy(optional bool bNoMessage) +{ + local int i; + local bool bOneUnstable; + + if (VSize(Velocity) > MaxDeploySpeed) + { + if (!bNoMessage && PlayerController(Controller) != None) + PlayerController(Controller).ReceiveLocalizedMessage(class'UT3DeployMessage', 0); + return false; + } + + if (IsFiring()) + return false; + + Rise = 0; + for (i = 0; i < Wheels.Length; i++) + { + if (!Wheels[i].bWheelOnGround) + { + if (!bOneUnstable) + { + // ignore if just one of the six wheels is unstable + bOneUnstable = True; + continue; + } + if (!bNoMessage && PlayerController(Controller) != None) + PlayerController(Controller).ReceiveLocalizedMessage(class'UT3DeployMessage', 1); + return false; + } + } + return true; +} + +simulated function DrawHUD(Canvas C) +{ + local PlayerController PC; + + Super.DrawHUD(C); + + // don't draw if we are dead, scoreboard is visible, etc + PC = PlayerController(Controller); + if (Health < 1 || PC == None || PC.myHUD == None || PC.MyHUD.bShowScoreboard || !IsInState('Undeployed')) + return; + + // draw deploy tooltip + if (bDrawCanDeployTooltip) + class'UT3HudOverlay'.static.DrawToolTip(C, PC, "Jump", C.ClipX * 0.5, C.ClipY * 0.92, DeployIconCoords); +} + +// GEm: Disable beeping on alt fire (beep on rise instead) +function VehicleFire(bool bWasAltFire) +{ + Super(ONSWheeledCraft).VehicleFire(bWasAltFire); +} + +// GEm: Enable zooming on alt fire +function AltFire(optional float F) +{ + local PlayerController PC; + + PC = PlayerController(Controller); + if (PC == None) + return; + + bWeaponIsAltFiring = true; + PC.ToggleZoomWithMax(0.5); +} + +function ClientVehicleCeaseFire(bool bWasAltFire) +{ + local PlayerController PC; + + if (!bWasAltFire) + { + Super.ClientVehicleCeaseFire(bWasAltFire); + return; + } + + PC = PlayerController(Controller); + if (PC == None) + return; + + bWeaponIsAltFiring = false; + PC.StopZoom(); +} + +simulated function ClientKDriverLeave(PlayerController PC) +{ + Super.ClientKDriverLeave(PC); + + bWeaponIsAltFiring = false; + PC.EndZoom(); +} + +auto state UnDeployed +{ + function Deploy() + { + bBotDeploy = true; + } + + function ChooseFireAt(Actor A) + { + local Bot B; + + B = Bot(Controller); + if ( B == None || B.Squad == None || ONSPowerCore(B.Squad.SquadObjective) == None ) + { + Fire(0); + return; + } + + if (ONSPowerCore(B.Squad.SquadObjective).LegitimateTargetOf(B) && CanAttack(B.Squad.SquadObjective)) + bBotDeploy = true; + else + Fire(0); + } + + function VehicleFire(bool bWasAltFire) + { + if (!bWasAltFire) + bWeaponIsFiring = True; + } +} + +state Deploying +{ + ignores ServerToggleDeploy, Fire; + +Begin: + if (Controller != None) + { + //LastDeployStartTime = Level.TimeSeconds; + StopWeaponFiring(); + SetPhysics(PHYS_None); + ServerPhysics = PHYS_None; + bMovable = False; + bStationary = True; + PlaySound(DeploySound, SLOT_None, TransientSoundVolume*3.0,, TransientSoundRadius/2.0,, false); + if (PlayerController(Controller) != None) + { + if (PlayerController(Controller).bEnableGUIForceFeedback) + PlayerController(Controller).ClientPlayForceFeedback(DeployForce); + } + PlayAnim('Deploying'); + Weapons[1].PlayAnim('Deploying'); + Sleep(8.333333); + Weapons[1].bForceCenterAim = False; + SetActiveWeapon(1); + bWeaponisFiring = false; //so bots don't immediately fire until the gun has a chance to move + TPCamLookat = DeployedTPCamLookat; + TPCamWorldOffset = DeployedTPCamWorldOffset; + FPCamPos = DeployedFPCamPos; + bEnableProximityViewShake = False; + bDeployed = True; + GotoState('Deployed'); + } +} + +state Deployed +{ + function MayUndeploy() + { + ServerToggleDeploy(); + } + + function ServerToggleDeploy() + { + if (!bWeaponIsFiring && !UT3LeviathanPrimaryWeapon(Weapons[1]).bCurrentlyFiring) + GotoState('Undeploying'); + } + + function bool IsDeployed() + { + return true; + } + + function VehicleFire(bool bWasAltFire) + { + if (!bWasAltFire) + bWeaponIsFiring = True; + } +} + +state UnDeploying +{ + ignores ServerToggleDeploy, Fire; + +Begin: + if (Controller != None) + { + //LastDeployStartTime = Level.TimeSeconds; + StopWeaponFiring(); + PlaySound(HideSound, SLOT_None, TransientSoundVolume*3.0,, TransientSoundRadius/2.0,, false); + if (PlayerController(Controller) != None) + { + if (PlayerController(Controller).bEnableGUIForceFeedback) + PlayerController(Controller).ClientPlayForceFeedback(HideForce); + } + Weapons[1].bForceCenterAim = True; + Weapons[1].PlayAnim('UnDeploying'); + PlayAnim('UnDeploying'); + Sleep(6.666666); + bMovable = True; + SetPhysics(PHYS_Karma); + ServerPhysics = PHYS_Karma; + bStationary = False; + SetActiveWeapon(0); + TPCamLookat = UnDeployedTPCamLookat; + TPCamWorldOffset = UnDeployedTPCamWorldOffset; + FPCamPos = UnDeployedFPCamPos; + bEnableProximityViewShake = True; + bDeployed = False; + GotoState('UnDeployed'); + } +} + +simulated event TeamChanged() +{ + local int i; + + Super(SVehicle).TeamChanged(); + + if (Team == 0 && RedSkin != None) + { + Skins[0] = RedSkin; + Skins[1] = RedSkinB[0]; + Skins[2] = RedSkinB[1]; + Skins[3] = RedSkinB[1]; + Skins[4] = RedSkinB[1]; + Skins[5] = RedSkinB[1]; + } + else if (Team == 1 && BlueSkin != None) + { + Skins[0] = BlueSkin; + Skins[1] = BlueSkinB[0]; + Skins[2] = BlueSkinB[1]; + Skins[3] = BlueSkinB[1]; + Skins[4] = BlueSkinB[1]; + Skins[5] = BlueSkinB[1]; + } + + if (Level.NetMode != NM_DedicatedServer && Team <= 2 && SpawnOverlay[0] != None && SpawnOverlay[1] != None) + SetOverlayMaterial(SpawnOverlay[Team], 1.5, True); + + for (i = 0; i < Weapons.Length; i++) + Weapons[i].SetTeam(Team); + + if (Level.NetMode != NM_DedicatedServer) + { + for(i = 0; i < HeadlightCorona.Length; i++) + HeadlightCorona[i].ChangeTeamTint(Team); + } +} + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + VehicleNameString = "UT3 Leviathan" + + Health = 6500 + + DriverWeapons(0) = (WeaponClass=class'UT3LeviathanDriverWeapon',WeaponBone="DriverTurretYaw") + DriverWeapons(1)=(WeaponClass=class'UT3LeviathanPrimaryWeapon',WeaponBone="Base"); + + PassengerWeapons(0) = (WeaponPawnClass=class'UT3LeviathanTurretBeam',WeaponBone="LT_Front_TurretYaw") + PassengerWeapons(1) = (WeaponPawnClass=class'UT3LeviathanTurretRocket',WeaponBone="RT_Front_TurretYaw") + PassengerWeapons(2) = (WeaponPawnClass=class'UT3LeviathanTurretStinger',WeaponBone="LT_Rear_TurretYaw") + PassengerWeapons(3) = (WeaponPawnClass=class'UT3LeviathanTurretShock',WeaponBone="RT_Rear_TurretYaw") + + CollisionHeight=100.0 + GroundSpeed=600 + LSDFactor=1.000000 + ChassisTorqueScale=0.200000 + MaxSteerAngleCurve=(Points=((OutVal=30.000000),(InVal=1500.000000,OutVal=20.000000))) + SteerSpeed=50.000000 + //EngineBrakeFactor=0.020000 + MaxBrakeTorque=8.000000 + //StopThreshold=500.000000 + WheelSuspensionOffset=25.0 + + Begin Object Class=KarmaParamsRBFull Name=KParams0 + KStartEnabled=True + KFriction=0.5 + KLinearDamping=0.05 + KAngularDamping=0.05 + KImpactThreshold=500 + bKNonSphericalInertia=True + bHighDetailOnly=False + bClientOnly=False + bKDoubleTickRate=True + KInertiaTensor(0)=1.260000 + KInertiaTensor(1)=0 + KInertiaTensor(2)=0 + KInertiaTensor(3)=3.099998 + KInertiaTensor(4)=0 + KInertiaTensor(5)=4.499996 + KMaxSpeed=850.0 //UT2004 def 650 + KCOMOffset=(X=0,Y=0,Z=0) + bDestroyOnWorldPenetrate=True + bDoSafetime=True + Name="KParams0" + End Object + KParams=KarmaParams'KParams0' + + Mesh = SkeletalMesh'UT3VH_Leviathan_Anims.SK_VH_Leviathan' + // GEm: TODO: Two skins! + RedSkin = Shader'UT3LeviathanTex.Levi1.LeviathanSkin1' + BlueSkin = Shader'UT3LeviathanTex.Levi1.LeviathanSkin1Blue' + RedSkinB(0) = Shader'UT3LeviathanTex.Levi2.LeviathanSkin2' + BlueSkinB(0) = Shader'UT3LeviathanTex.Levi2.LeviathanSkin2Blue' + RedSkinB(1) = Shader'UT3LeviathanTex.LeviTurret.TurretSkin' + BlueSkinB(1) = Shader'UT3LeviathanTex.LeviTurret.TurretSkinBlue' + + Begin Object Class=SVehicleWheel Name=RtRWheel + BoneName="Rt_Rear_Tire" + BoneOffset=(X=0.0,Y=40.0,Z=0.0) + WheelRadius=90 + SuspensionTravel=40 + bPoweredWheel=true + //SteerFactor=0.0 + //LongSlipFactor=12000 + SteerType=VST_Fixed + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + End Object + Wheels(0) = SVehicleWheel'RtRWheel' + + Begin Object Class=SVehicleWheel Name=LtRWheel + BoneName="Lt_Rear_Tire" + BoneOffset=(X=0.0,Y=-40.0,Z=0) + WheelRadius=90 + SuspensionTravel=40 + bPoweredWheel=true + //SteerFactor=0.0 + //LongSlipFactor=12000 + SteerType=VST_Fixed + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + End Object + Wheels(1) = SVehicleWheel'LtRWheel' + + Begin Object Class=SVehicleWheel Name=RtMWheel + BoneName="Rt_Mid_Tire" + BoneOffset=(X=0.0,Y=40.0,Z=0) + WheelRadius=90 + SuspensionTravel=40 + bPoweredWheel=true + //SteerFactor=0.0 + //LongSlipFactor=12000 + SteerType=VST_Fixed + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + End Object + Wheels(2) = SVehicleWheel'RtMWheel' + + Begin Object Class=SVehicleWheel Name=LtMWheel + BoneName="Lt_Mid_Tire" + BoneOffset=(X=0.0,Y=-40.0,Z=0) + WheelRadius=90 + SuspensionTravel=40 + bPoweredWheel=true + //SteerFactor=0.0 + //LongSlipFactor=12000 + SteerType=VST_Fixed + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + End Object + Wheels(3) = SVehicleWheel'LtMWheel' + + Begin Object Class=SVehicleWheel Name=RtFWheel + BoneName="Rt_Front_Tire" + BoneOffset=(X=0.0,Y=130.0,Z=-10.0) + WheelRadius=100 + SuspensionTravel=40 + bPoweredWheel=true + //SteerFactor=1.0 + //LongSlipFactor=12000 + SteerType=VST_Steered + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + End Object + Wheels(4) = SVehicleWheel'RtFWheel' + + Begin Object Class=SVehicleWheel Name=LtFWheel + BoneName="Lt_Front_Tire" + BoneOffset=(X=0.0,Y=-130,Z=-10.0) + WheelRadius=100 + SuspensionTravel=40 + bPoweredWheel=true + //SteerFactor=1.0 + //LongSlipFactor=12000 + SteerType=VST_Steered + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + End Object + Wheels(5) = SVehicleWheel'LtFWheel' + + /*Begin Object Class=SVehicleWheel Name=CenterWheel //fake wheel to help prevent getting stuck + BoneName="Body" + BoneOffset=(X=-30.0,Y=0.0,Z=-50.0) + WheelRadius=75 + SuspensionTravel=200 + bPoweredWheel=true + //SteerFactor=0.0 + //LongSlipFactor=12000 + SteerType=VST_Fixed + End Object + Wheels(6) = SVehicleWheel'CenterWheel'*/ + + DeploySound = Sound'UT3A_Vehicle_Leviathan.Sounds.A_Vehicle_Leviathan_Deploy01' + HideSound = Sound'UT3A_Vehicle_Leviathan.Sounds.A_Vehicle_Leviathan_Deploy01' + IdleSound = Sound'UT3A_Vehicle_Leviathan.Sounds.A_Vehicle_Leviathan_EngineIdle' + StartUpSound = Sound'UT3A_Vehicle_Leviathan.Sounds.A_Vehicle_Leviathan_EngineStart' + ShutDownSound = Sound'UT3A_Vehicle_Leviathan.Sounds.A_Vehicle_Leviathan_EngineStop' + ImpactDamageMult = 0.00003 //0.0003 + DamagedEffectHealthSmokeFactor=0.90 //0.5 + DamagedEffectHealthFireFactor=0.80 //0.25 + DamagedEffectFireDamagePerSec=2.0 //0.75 + ImpactDamageSounds = () + ImpactDamageSounds(0) = Sound'UT3A_Vehicle_Leviathan.Sounds.A_Vehicle_Leviathan_Collide01' + ExplosionSounds = () + ExplosionSounds(0) = Sound'UT3A_Vehicle_Leviathan.Sounds.A_Vehicle_Leviathan_Explode' + + ExitPositions(0)=(X=90,Y=-320,Z=15) + ExitPositions(1)=(X=90,Y=320,Z=15) + ExitPositions(2)=(X=90,Y=-320,Z=-15) + ExitPositions(3)=(X=90,Y=320,Z=-15) + + MomentumMult=0.0001 + + MaxDeploySpeed = 15.0 + DeployIconCoords = (X1=0,Y1=670,X2=154,Y2=96) + + TPCamLookat=(X=-160,Y=0,Z=200) //(X=-200,Y=0,Z=300) def UT2004 + UnDeployedTPCamLookat=(X=-160,Y=0,Z=200) + UnDeployedTPCamWorldOffset=(X=0,Y=0,Z=200) + DeployedTPCamWorldOffset=(X=-60,Y=0,Z=470) //(X=0,Y=0,Z=800) def UT2004 + DeployedTPCamLookat=(X=-60,Y=90,Z=0) //(X=100,Y=0,Z=0) + + FPCamPos=(X=70,Y=0,Z=260) + UnDeployedFPCamPos=(X=70,Y=0,Z=260) + DeployedFPCamPos=(X=-160,Y=0,Z=380) + + HeadlightCoronaOffset(0)=(X=254,Y=70.5,Z=170) + HeadlightCoronaOffset(1)=(X=254,Y=-70.5,Z=170) + HeadlightCoronaOffset(2)=(X=254,Y=58,Z=170) + HeadlightCoronaOffset(3)=(X=254,Y=-58,Z=170) + HeadlightCoronaMaterial=Material'EmitterTextures.Flares.EFlareOY' + HeadlightCoronaMaxSize=50 + + HeadlightProjectorOffset=(X=254.0,Y=0,Z=165) + HeadlightProjectorRotation=(Yaw=0,Pitch=-1000,Roll=0) + HeadlightProjectorMaterial=Texture'VMVehicles-TX.RVGroup.RVProjector' + HeadlightProjectorScale=0.16 + + //HeadlightCoronaMaterial = None +} diff --git a/Classes/UT3LeviathanBolt.uc b/Classes/UT3LeviathanBolt.uc new file mode 100644 index 0000000..136ab5c --- /dev/null +++ b/Classes/UT3LeviathanBolt.uc @@ -0,0 +1,40 @@ +/****************************************************************************** +UT3LeviathanBolt + +Creation date: 2007-12-30 18:58 +Last change: $Id$ +Copyright (c) 2007, Wormbo +******************************************************************************/ + +class UT3LeviathanBolt extends ONSMASRocketProjectile; + + +var float AccelRate; + + +simulated function PostNetBeginPlay() +{ + Acceleration = AccelRate * Normal(Velocity); +} + + +function Timer(); + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + Speed=1200 + MaxSpeed=3500 + AccelRate=20000.0 + + Damage=100 + DamageRadius=300 + MomentumTransfer=4000 + + DrawType = DT_StaticMesh + StaticMesh = StaticMesh'WeaponStaticMesh.FlakChunk' +} diff --git a/Classes/UT3LeviathanDriverWeapon.uc b/Classes/UT3LeviathanDriverWeapon.uc new file mode 100644 index 0000000..3902c79 --- /dev/null +++ b/Classes/UT3LeviathanDriverWeapon.uc @@ -0,0 +1,131 @@ +/* + * Copyright © 2007 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanDriverWeapon extends ONSMASRocketPack; + +// GEm: This uses skin 1, not 0 +simulated function SetTeam(byte T) +{ + Team = T; + if (T == 0 && RedSkin != None) + { + Skins[1] = RedSkin; + RepSkin = RedSkin; + } + else if (T == 1 && BlueSkin != None) + { + Skins[1] = BlueSkin; + RepSkin = BlueSkin; + } +} + +// GEm: Add a weapon offset +simulated function InitEffects() +{ + // don't even spawn on server + if (Level.NetMode == NM_DedicatedServer) + return; + + if ( (FlashEmitterClass != None) && (FlashEmitter == None) ) + { + FlashEmitter = Spawn(FlashEmitterClass); + FlashEmitter.SetDrawScale(DrawScale); + if (WeaponFireAttachmentBone == '') + FlashEmitter.SetBase(self); + else + AttachToBone(FlashEmitter, WeaponFireAttachmentBone); + + FlashEmitter.SetRelativeLocation(WeaponFireOffset * vect(1,0,0) + WeaponOffset); + } + + if (AmbientEffectEmitterClass != none && AmbientEffectEmitter == None) + { + AmbientEffectEmitter = spawn(AmbientEffectEmitterClass, self,, WeaponFireLocation, WeaponFireRotation); + if (WeaponFireAttachmentBone == '') + AmbientEffectEmitter.SetBase(self); + else + AttachToBone(AmbientEffectEmitter, WeaponFireAttachmentBone); + + AmbientEffectEmitter.SetRelativeLocation(WeaponFireOffset * vect(1,0,0) + WeaponOffset); + } +} + +simulated function CalcWeaponFire() +{ + local coords WeaponBoneCoords; + local vector CurrentFireOffset; + + // Calculate fire offset in world space + WeaponBoneCoords = GetBoneCoords(WeaponFireAttachmentBone); + CurrentFireOffset = (WeaponFireOffset * vect(1,0,0)) + (DualFireOffset * vect(0,1,0)) + WeaponOffset; + + // Calculate rotation of the gun + WeaponFireRotation = rotator(vector(CurrentAim) >> Rotation); + + // Calculate exact fire location + WeaponFireLocation = WeaponBoneCoords.Origin + (CurrentFireOffset >> WeaponFireRotation); + + // Adjust fire rotation taking dual offset into account + if (bDualIndependantTargeting) + WeaponFireRotation = rotator(CurrentHitLocation - WeaponFireLocation); +} + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + ProjectileClass = Class'UT3LeviathanBolt' + FireInterval = 0.3 + DrawScale = 0.6 + //RelativeLocation = (Z=-10) + + Mesh = SkeletalMesh'UT3VH_Leviathan_Anims.LeviathanDriverTurretOnly' + RedSkin = Shader'UT3LeviathanTex.Levi2.LeviathanSkin2' + BlueSkin = Shader'UT3LeviathanTex.Levi2.LeviathanSkin2Blue' + YawBone = "DriverTurretYaw" + PitchBone = "DriverTurretPitch" + WeaponFireAttachmentBone = "DriverTurret_Tip" + DualFireOffset = 6.0 + WeaponOffset = (X=0.0,Y=-6.0,Z=0.0) + + FireSoundClass = Sound'UT3A_Vehicle_Leviathan.SoundCues.A_Vehicle_Leviathan_TurretFire' +} diff --git a/Classes/UT3LeviathanPrimaryWeapon.uc b/Classes/UT3LeviathanPrimaryWeapon.uc new file mode 100644 index 0000000..e3c1ea7 --- /dev/null +++ b/Classes/UT3LeviathanPrimaryWeapon.uc @@ -0,0 +1,98 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanPrimaryWeapon extends ONSMASCannon; + +var bool bCurrentlyFiring; + +var Material RedSkinB, BlueSkinB; + +simulated state InstantFireMode +{ +ImplodeExplode: + bCurrentlyFiring = true; + Sleep(0.8); + if (Level.NetMode != NM_DedicatedServer) + Spawn(class'ONSMASCannonImplosionEffect',,, GHitLocation, rotator(GHitNormal)); + Sleep(2.3); + Explosion(DamageRadius*0.125); + Sleep(0.5); + Explosion(DamageRadius*0.300); + Sleep(0.2); + Explosion(DamageRadius*0.475); + Sleep(0.2); + Explosion(DamageRadius*0.650); + Sleep(0.2); + Explosion(DamageRadius*0.825); + Sleep(0.2); + Explosion(DamageRadius*1.000); + bCurrentlyFiring = false; +} + +simulated function SetTeam(byte T) +{ + Team = T; + if (T == 0 && RedSkin != None) + { + Skins[0] = RedSkin; + Skins[1] = RedSkinB; + // GEm: TODO: Replication + RepSkin = RedSkin; + } + else if (T == 1 && BlueSkin != None) + { + Skins[0] = BlueSkin; + Skins[1] = BlueSkinB; + RepSkin = BlueSkin; + } +} + +defaultproperties +{ + FireSoundClass = Sound'UT3A_Vehicle_Leviathan.Sounds.A_Vehicle_Leviathan_CannonFire01' + + Mesh = SkeletalMesh'UT3VH_Leviathan_Anims.Leviathan_MainTurreta' + RedSkin = Shader'UT3LeviathanTex.Levi1.LeviathanSkin1' + BlueSkin = Shader'UT3LeviathanTex.Levi1.LeviathanSkin1Blue' + RedSkinB = Shader'UT3LeviathanTex.Levi2.LeviathanSkin2' + BlueSkinB = Shader'UT3LeviathanTex.Levi2.LeviathanSkin2Blue' + YawBone = "MainTurretYaw" + PitchBone = "MainTurretPitch" + WeaponFireAttachmentBone = "MainTurretPitch" +} diff --git a/Classes/UT3LeviathanRocket.uc b/Classes/UT3LeviathanRocket.uc new file mode 100644 index 0000000..d58452f --- /dev/null +++ b/Classes/UT3LeviathanRocket.uc @@ -0,0 +1,56 @@ +/* + * Copyright © 2007 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanRocket extends UT3RocketProj; //GE: From RocketProj to UT3RocketProj + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + Damage = 80.0 + DamageRadius = 180.0 + Speed = 5000.0 + MaxSpeed = 5000.0 + MomentumTransfer=50000.000000 + MyDamageType = class'UT3DmgType_LeviathanRocket' +} diff --git a/Classes/UT3LeviathanShield.uc b/Classes/UT3LeviathanShield.uc new file mode 100644 index 0000000..312a617 --- /dev/null +++ b/Classes/UT3LeviathanShield.uc @@ -0,0 +1,62 @@ +/****************************************************************************** +UT3LeviathanShield + +Creation date: 2007-12-30 13:23 +Last change: $Id$ +Copyright (c) 2007, Wormbo +******************************************************************************/ + +class UT3LeviathanShield extends ONSShockTankShield; + + +function TakeDamage(int Dam, Pawn instigatedBy, Vector hitlocation, Vector momentum, class damageType) +{ + if (UT3LeviathanTurretWeapon(Owner) != None) + UT3LeviathanTurretWeapon(Owner).NotifyShieldHit(); +} + + +simulated function SpawnHitEffect(byte TeamNum) +{ + if (Level.NetMode != NM_DedicatedServer) { + if (ShockShieldEffect != None) { + if (TeamNum == 1) + ShockShieldHitEffect = Spawn(class'UT3LeviathanShieldHitEffectBlue', self); + else + ShockShieldHitEffect = Spawn(class'UT3LeviathanShieldHitEffectRed', self); + } + + if (ShockShieldHitEffect != None && Owner != None && UT3LeviathanTurretWeapon(Owner) != None) + Owner.AttachToBone(ShockShieldEffect, UT3LeviathanTurretWeapon(Owner).ShieldAttachmentBone); + } +} + + +simulated function ActivateShield(byte TeamNum) +{ + SetCollision(True, False, False); + + if (Level.NetMode != NM_DedicatedServer) { + if (ShockShieldEffect == None) { + if (TeamNum == 1) + ShockShieldEffect = Spawn(class'UT3LeviathanShieldEffectBlue', self); + else + ShockShieldEffect = Spawn(class'UT3LeviathanShieldEffectRed', self); + + PlaySound(Sound'ONSBPSounds.ShockTank.ShieldActivate', SLOT_None, 2.0); + } + + if (ShockShieldEffect != None && Owner != None && UT3LeviathanTurretWeapon(Owner) != None) + Owner.AttachToBone(ShockShieldEffect, UT3LeviathanTurretWeapon(Owner).ShieldAttachmentBone); + } +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + DrawScale3D = (X=0.6,Y=0.75,Z=1.0) +} diff --git a/Classes/UT3LeviathanShieldEffectBlue.uc b/Classes/UT3LeviathanShieldEffectBlue.uc new file mode 100644 index 0000000..f8b3551 --- /dev/null +++ b/Classes/UT3LeviathanShieldEffectBlue.uc @@ -0,0 +1,30 @@ +//----------------------------------------------------------- +// +//----------------------------------------------------------- +class UT3LeviathanShieldEffectBlue extends Emitter; + +#exec OBJ LOAD FILE="..\Textures\AW-2004Particles.utx" +#exec OBJ LOAD FILE="..\Textures\AW-2k4XP.utx" + +DefaultProperties +{ + Begin Object Class=MeshEmitter Name=MeshEmitter18 + StaticMesh=StaticMesh'AW-2k4XP.Weapons.ShockShield2' + UseParticleColor=True + UseColorScale=True + AutomaticInitialSpawning=False + ColorScale(0)=(Color=(B=255,G=64,R=64)) + ColorScale(1)=(RelativeTime=1.0,Color=(B=255,G=64,R=64)) + CoordinateSystem=PTCS_Relative + MaxParticles=1 + UniformSize=false + StartSizeRange=(X=(Min=0.6,Max=0.6),Y=(Min=0.75,Max=0.75),Z=(Min=1.0,Max=1.0)) + InitialParticlesPerSecond=5000.0 + LifetimeRange=(Min=0.1,Max=0.1) + End Object + Emitters(0)=MeshEmitter'MeshEmitter18' + + bNoDelete=false + AmbientGlow=254 + bHardAttach=true +} diff --git a/Classes/UT3LeviathanShieldEffectRed.uc b/Classes/UT3LeviathanShieldEffectRed.uc new file mode 100644 index 0000000..1aaad09 --- /dev/null +++ b/Classes/UT3LeviathanShieldEffectRed.uc @@ -0,0 +1,30 @@ +//----------------------------------------------------------- +// +//----------------------------------------------------------- +class UT3LeviathanShieldEffectRed extends Emitter; + +#exec OBJ LOAD FILE="..\Textures\AW-2004Particles.utx" +#exec OBJ LOAD FILE="..\Textures\AW-2k4XP.utx" + +DefaultProperties +{ + Begin Object Class=MeshEmitter Name=MeshEmitter18 + StaticMesh=StaticMesh'AW-2k4XP.Weapons.ShockShield2' + UseParticleColor=True + UseColorScale=True + AutomaticInitialSpawning=False + ColorScale(0)=(Color=(B=64,G=64,R=255)) + ColorScale(1)=(RelativeTime=1.0,Color=(B=64,G=64,R=255)) + CoordinateSystem=PTCS_Relative + MaxParticles=1 + UniformSize=false + StartSizeRange=(X=(Min=0.6,Max=0.6),Y=(Min=0.75,Max=0.75),Z=(Min=1.0,Max=1.0)) + InitialParticlesPerSecond=5000.0 + LifetimeRange=(Min=0.1,Max=0.1) + End Object + Emitters(0)=MeshEmitter'MeshEmitter18' + + bNoDelete=false + AmbientGlow=254 + bHardAttach=true +} diff --git a/Classes/UT3LeviathanShieldHitEffectBlue.uc b/Classes/UT3LeviathanShieldHitEffectBlue.uc new file mode 100644 index 0000000..46cd0b2 --- /dev/null +++ b/Classes/UT3LeviathanShieldHitEffectBlue.uc @@ -0,0 +1,31 @@ +//----------------------------------------------------------- +// +//----------------------------------------------------------- +class UT3LeviathanShieldHitEffectBlue extends Emitter; + +#exec OBJ LOAD FILE="..\Textures\AW-2004Particles.utx" +#exec OBJ LOAD FILE="..\Textures\AW-2k4XP.utx" + +DefaultProperties +{ + Begin Object Class=MeshEmitter Name=MeshEmitter2 + StaticMesh=StaticMesh'AW-2k4XP.Weapons.ShockShield' + UseParticleColor=True + UseColorScale=True + RespawnDeadParticles=False + AutomaticInitialSpawning=False + ColorScale(0)=(Color=(B=255,G=80,R=80)) + ColorScale(1)=(RelativeTime=1.0) + CoordinateSystem=PTCS_Relative + MaxParticles=1 + UniformSize=false + StartSizeRange=(X=(Min=0.6,Max=0.6),Y=(Min=0.75,Max=0.75),Z=(Min=1.0,Max=1.0)) + InitialParticlesPerSecond=5000.0 + LifetimeRange=(Min=0.2,Max=0.2) + End Object + Emitters(0)=MeshEmitter'MeshEmitter2' + + bNoDelete=False + AutoDestroy=True + AmbientGlow=254 +} diff --git a/Classes/UT3LeviathanShieldHitEffectRed.uc b/Classes/UT3LeviathanShieldHitEffectRed.uc new file mode 100644 index 0000000..b6ac9c6 --- /dev/null +++ b/Classes/UT3LeviathanShieldHitEffectRed.uc @@ -0,0 +1,31 @@ +//----------------------------------------------------------- +// +//----------------------------------------------------------- +class UT3LeviathanShieldHitEffectRed extends Emitter; + +#exec OBJ LOAD FILE="..\Textures\AW-2004Particles.utx" +#exec OBJ LOAD FILE="..\Textures\AW-2k4XP.utx" + +DefaultProperties +{ + Begin Object Class=MeshEmitter Name=MeshEmitter2 + StaticMesh=StaticMesh'AW-2k4XP.Weapons.ShockShield' + UseParticleColor=True + UseColorScale=True + RespawnDeadParticles=False + AutomaticInitialSpawning=False + ColorScale(0)=(Color=(B=70,G=70,R=255)) + ColorScale(1)=(RelativeTime=1.0) + CoordinateSystem=PTCS_Relative + MaxParticles=1 + UniformSize=false + StartSizeRange=(X=(Min=0.6,Max=0.6),Y=(Min=0.75,Max=0.75),Z=(Min=1.0,Max=1.0)) + InitialParticlesPerSecond=5000.0 + LifetimeRange=(Min=0.2,Max=0.2) + End Object + Emitters(0)=MeshEmitter'MeshEmitter2' + + bNoDelete=False + AutoDestroy=True + AmbientGlow=254 +} diff --git a/Classes/UT3LeviathanShockBall.uc b/Classes/UT3LeviathanShockBall.uc new file mode 100644 index 0000000..6a0d326 --- /dev/null +++ b/Classes/UT3LeviathanShockBall.uc @@ -0,0 +1,112 @@ +/* + * Copyright © 2007, 2009 Wormbo + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanShockBall extends ShockProjectile; + + +//============================================================================= +// Variables +//============================================================================= + +var bool bCanHitShields; + + +simulated function Explode(vector HitLocation, vector HitNormal) +{ + SuperExplosion(); +} + + +simulated function ProcessTouch (Actor Other, vector HitLocation) +{ + if (bCanHitShields || UT3LeviathanShield(Other) == None) { + Super.ProcessTouch(Other, HitLocation); + } +} + + +simulated function Timer() +{ + bCanHitShields = True; +} + + +function SuperExplosion() +{ + local Actor HitActor, ExpFX; + local vector HitLocation, HitNormal; + + HurtRadius(ComboDamage, DamageRadius, MyDamageType, MomentumTransfer, Location); + + ExpFX = Spawn(class'ONSPRVComboEffect'); + if (Level.NetMode == NM_DedicatedServer) { + if (ExpFX != None) + ExpFX.LifeSpan = 0.25; + } + else if (EffectIsRelevant(Location,false)) { + HitActor = Trace(HitLocation, HitNormal, Location - vect(0,0,120), Location,false); + if (HitActor != None) + Spawn(class'ComboDecal', self,, HitLocation, rotator(vect(0,0,-1))); + } + PlaySound(ComboSound, SLOT_None, 1.0,, 800); + DestroyTrails(); + Destroy(); +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + Speed = 1500.0 + MaxSpeed = 1500.0 + Damage = 45.0 //120.0 + DamageRadius = 128.0 //300.0 + ComboDamage = 120.0 //215 + ComboSound=Sound'UT3Weapons.ShockRifle.ShockCombo' + MomentumTransfer=70000.0 + MyDamageType=class'UT3DmgType_LeviathanShockBall' + + AmbientSound=Sound'UT3Weapons.ShockRifle.ShockRifleAltAmb' + ImpactSound=Sound'UT3Weapons.ShockRifle.ShockBallImpact' + LifeSpan=8.000000 +} diff --git a/Classes/UT3LeviathanTurret.uc b/Classes/UT3LeviathanTurret.uc new file mode 100644 index 0000000..96467e9 --- /dev/null +++ b/Classes/UT3LeviathanTurret.uc @@ -0,0 +1,214 @@ +/* + * Copyright © 2007 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanTurret extends ONSMASSideGunPawn abstract; + +#exec OBJ LOAD FILE="..\Sounds\UT3A_Vehicle_Leviathan.uax" + +//============================================================================= +// Properties +//============================================================================= + +var float ShieldDuration; +var float ShieldRecharge; + + +//============================================================================= +// Variables +//============================================================================= + +var float ShieldAvailableTime; + +var name EnterAnim, LeaveAnim, ArmBone; + + +/** +Best mode is always primary. Shield activation is handled separately for bots. +*/ +function byte BestMode() +{ + return 0; +} + +/* +/** +React to incoming AVRiLs. +*/ +function ShouldTargetMissile(Projectile P) +{ + local vector ; + + if (Bot(Controller) != None && Bot(Controller).Skill >= 3.0) { + GetAxes(VehicleBase.Rotation, X, Y, Z); + } +} +*/ + + +/** +Shield charge bar fill percentage. +*/ +simulated function float ChargeBar() +{ + if (UT3LeviathanTurretWeapon(Gun) != None && !bHasAltFire) { + if (UT3LeviathanTurretWeapon(Gun).bShieldActive) + return FClamp(1.0 - TimerCounter / ShieldDuration, 0.0, 0.999); + else + return FClamp(1.0 - (ShieldAvailableTime - Level.TimeSeconds) / ShieldRecharge, 0.0, 0.999); + } + return 0; +} + + +/** +Activate shield on alt-fire. +*/ +function AltFire(optional float F) +{ + if (!bHasAltFire) { + ActivateShield(); + } + else { + Super.AltFire(F); + } +} + + +/** +Deactivate the shield and set its recharge delay. +*/ +function ActivateShield() +{ + if (UT3LeviathanTurretWeapon(Gun) != None && Level.TimeSeconds >= ShieldAvailableTime) { + ShieldAvailableTime = Level.TimeSeconds + ShieldDuration + ShieldRecharge; + SetTimer(ShieldDuration, false); + UT3LeviathanTurretWeapon(Gun).ActivateShield(); + } +} + + +/** +Deactivate the shield and set its recharge delay. +*/ +function DeactivateShield() +{ + if (UT3LeviathanTurretWeapon(Gun) != None && UT3LeviathanTurretWeapon(Gun).bShieldActive) { + ShieldAvailableTime = Level.TimeSeconds + ShieldRecharge; + UT3LeviathanTurretWeapon(Gun).DeactivateShield(); + } +} + + +/** +Deactivate shield after its time runs out. +*/ +function Timer() +{ + DeactivateShield(); +} + + +function DriverLeft() +{ + DeactivateShield(); +} + +function KDriverEnter(Pawn P) +{ + local int AnimSlot; + + Super.KDriverEnter(P); + + // GEm: Desyncs due to rotation, perhaps the turret bone should be connected to Base + if (UT3LeviathanTurretWeapon(Gun) != None) + { + AnimSlot = UT3LeviathanTurretWeapon(Gun).SkinSlot-1; + VehicleBase.AnimBlendParams(AnimSlot, 1.0, , , ArmBone); + VehicleBase.PlayAnim(EnterAnim, 1.0, 0.0, AnimSlot); + PlaySound(Sound'UT3A_Vehicle_Leviathan.Sounds.A_Vehicle_Leviathan_TurretActivate', SLOT_None, 2.0); + } +} + +function bool KDriverLeave(bool bForceLeave) +{ + local bool bResult; + local int AnimSlot; + + bResult = Super.KDriverLeave(bForceLeave); + if (bResult && UT3LeviathanTurretWeapon(Gun) != None) + { + AnimSlot = UT3LeviathanTurretWeapon(Gun).SkinSlot-1; + VehicleBase.AnimBlendParams(AnimSlot, 1.0, , , ArmBone); + VehicleBase.PlayAnim(LeaveAnim, 1.0, 0.0, AnimSlot); + PlaySound(Sound'UT3A_Vehicle_Leviathan.Sounds.A_Vehicle_Leviathan_TurretDeactivate', SLOT_None, 2.0); + } + + return bResult; +} + +/*simulated function PostBeginPlay() +{ + // GEm: The following puts the weapons too close to the base vehicle... + UT3LeviathanTurretWeapon(Gun).PlayAnim('InActiveStill', 1.0, 0.0); + super.PostBeginPlay(); +}*/ + +simulated function vector GetCameraLocationStart() +{ + if (Gun != None) + return Gun.GetBoneCoords(Gun.WeaponFireAttachmentBone).Origin; + else + return Super.GetCameraLocationStart(); +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + bShowChargingBar = True + bHasAltFire = False + ShieldDuration = 4.0 + ShieldRecharge = 5.0 + bDrawDriverInTP = true + DrivePos = (X=-2.5,Y=0.0,Z=64.0) //(X=-7.0,Y=0.0,Z=65.0) +} diff --git a/Classes/UT3LeviathanTurretBeam.uc b/Classes/UT3LeviathanTurretBeam.uc new file mode 100644 index 0000000..1fe774a --- /dev/null +++ b/Classes/UT3LeviathanTurretBeam.uc @@ -0,0 +1,69 @@ +/* + * Copyright © 2007 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanTurretBeam extends UT3LeviathanTurret; + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + GunClass=class'UT3LeviathanTurretWeaponBeam' + VehiclePositionString="in a Leviathan beam turret" + VehicleNameString="Leviathan Beam Turret" + + EnterAnim = "lt_front_turret_deplying" + LeaveAnim = "lt_front_turret_undeplyed" + ArmBone = "Lt_Front_TurretArm1" + //CameraBone = "Lt_Front_Turret_Barrel" + CameraBone = "LT_Front_TurretPitch" + + ExitPositions(0)=(X=400,Y=-320,Z=140) + ExitPositions(1)=(X=500,Y=-80,Z=140) + ExitPositions(2)=(X=400,Y=-320,Z=100) + ExitPositions(3)=(X=500,Y=-80,Z=100) + + FPCamPos=(X=50,Y=0,Z=30) + TPCamLookAt=(X=-10,Y=0,Z=-30) + TPCamWorldOffset=(X=0.0,Y=0.0,Z=60.0) + TPCamDistance=30 +} diff --git a/Classes/UT3LeviathanTurretRocket.uc b/Classes/UT3LeviathanTurretRocket.uc new file mode 100644 index 0000000..d527a08 --- /dev/null +++ b/Classes/UT3LeviathanTurretRocket.uc @@ -0,0 +1,70 @@ +/* + * Copyright © 2007 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanTurretRocket extends UT3LeviathanTurret; + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + GunClass=class'UT3LeviathanTurretWeaponRocket' + VehiclePositionString="in a Leviathan rocket turret" + VehicleNameString="Leviathan Rocket Turret" + + EnterAnim = "rt_front_turret_deplying" + LeaveAnim = "rt_front_turret_undeplyed" + ArmBone = "Rt_Front_TurretArm1" + CameraBone = "RT_Front_TurretPitch" + //CameraBone = "Rt_Front_Turret_BarrelLt" + //TPCamWorldOffset = (X=-40.0,Y=-80.0,Z=100.0) + + ExitPositions(0)=(X=400,Y=320,Z=140) + ExitPositions(1)=(X=500,Y=80,Z=140) + ExitPositions(2)=(X=400,Y=320,Z=100) + ExitPositions(3)=(X=500,Y=80,Z=100) + + FPCamPos=(X=50,Y=0,Z=40) + TPCamLookAt=(X=0,Y=0,Z=-20) + TPCamWorldOffset=(X=0.0,Y=0.0,Z=60.0) + TPCamDistance=30 +} diff --git a/Classes/UT3LeviathanTurretShock.uc b/Classes/UT3LeviathanTurretShock.uc new file mode 100644 index 0000000..829d225 --- /dev/null +++ b/Classes/UT3LeviathanTurretShock.uc @@ -0,0 +1,70 @@ +/* + * Copyright © 2007 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanTurretShock extends UT3LeviathanTurret; + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + GunClass=class'UT3LeviathanTurretWeaponShock' + VehiclePositionString="in a Leviathan shock turret" + VehicleNameString="Leviathan Shock Turret" + + EnterAnim = "rt_rear_turret_deplying" + LeaveAnim = "rt_rear_turret_undeplyed" + ArmBone = "Rt_Rear_TurretArm1" + CameraBone = "RT_Rear_TurretPitch" + //CameraBone = "Rt_Rear_Turret_Barrel" + //TPCamWorldOffset = (X=40.0,Y=80.0,Z=100.0) + + ExitPositions(0)=(X=-380,Y=300,Z=140) + ExitPositions(1)=(X=-500,Y=80,Z=140) + ExitPositions(2)=(X=-380,Y=300,Z=100) + ExitPositions(3)=(X=-500,Y=80,Z=100) + + FPCamPos=(X=50,Y=0,Z=30) + TPCamLookAt=(X=0,Y=0,Z=-20) + TPCamWorldOffset=(X=0.0,Y=0.0,Z=90.0) + TPCamDistance=30 +} diff --git a/Classes/UT3LeviathanTurretStinger.uc b/Classes/UT3LeviathanTurretStinger.uc new file mode 100644 index 0000000..f8e048d --- /dev/null +++ b/Classes/UT3LeviathanTurretStinger.uc @@ -0,0 +1,70 @@ +/* + * Copyright © 2007 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanTurretStinger extends UT3LeviathanTurret; + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + GunClass=class'UT3LeviathanTurretWeaponMinigun' + VehiclePositionString="in a Leviathan Stinger turret" + VehicleNameString="Leviathan Stinger Turret" + + EnterAnim = "lt_rear_turret_deplying" + LeaveAnim = "lt_rear_turret_undeplyed" + ArmBone = "Lt_Rear_TurretArm1" + CameraBone = "LT_Rear_TurretPitch" + //CameraBone = "Lt_Rear_Turret_Barrel" + //TPCamWorldOffset = (X=40.0,Y=80.0,Z=100.0) + + ExitPositions(0)=(X=-380,Y=-320,Z=140) + ExitPositions(1)=(X=-500,Y=-80,Z=140) + ExitPositions(2)=(X=-380,Y=-320,Z=100) + ExitPositions(3)=(X=-500,Y=-80,Z=100) + + FPCamPos=(X=50,Y=0,Z=30) + TPCamLookAt=(X=0,Y=0,Z=-30) + TPCamWorldOffset=(X=0.0,Y=0.0,Z=80.0) + TPCamDistance=30 +} diff --git a/Classes/UT3LeviathanTurretWeapon.uc b/Classes/UT3LeviathanTurretWeapon.uc new file mode 100644 index 0000000..28604bf --- /dev/null +++ b/Classes/UT3LeviathanTurretWeapon.uc @@ -0,0 +1,164 @@ +/* + * Copyright © 2007 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanTurretWeapon extends ONSMASSideGun; + + +//============================================================================= +// Properties +//============================================================================= + +var name ShieldAttachmentBone; + + +//============================================================================= +// Variables +//============================================================================= + +var UT3LeviathanShield Shield; +var bool bShieldActive, bLastShieldActive; +var byte ShieldHitCount, LastShieldHitCount; + +var byte SkinSlot; + + +//============================================================================= +// Replication +//============================================================================= + +replication +{ + reliable if (True) + bShieldActive, ShieldHitCount; +} + + +simulated function PostNetBeginPlay() +{ + Super.PostNetBeginPlay(); + + Shield = Spawn(class'UT3LeviathanShield', self); + + if (Shield != None) + AttachToBone(Shield, ShieldAttachmentBone); +} + + +simulated function PostNetReceive() +{ + Super.PostNetReceive(); + + if (bShieldActive != bLastShieldActive) { + if (bShieldActive) + ActivateShield(); + else + DeactivateShield(); + + bLastShieldActive = bShieldActive; + } + + if (Shield != None && ShieldHitCount != LastShieldHitCount) { + Shield.SpawnHitEffect(Team); + + LastShieldHitCount = ShieldHitCount; + } +} + + +simulated function ActivateShield() +{ + bShieldActive = True; + if (Shield != None) + Shield.ActivateShield(Team); +} + + +simulated function DeactivateShield() +{ + bShieldActive = False; + if (Shield != None) + Shield.DeactivateShield(); +} + + +function NotifyShieldHit() +{ + ShieldHitCount++; + if (Shield != None) + Shield.SpawnHitEffect(Team); +} + + +simulated function Destroyed() +{ + if (Shield != None) + Shield.Destroy(); + + Super.Destroyed(); +} + +simulated function SetTeam(byte T) +{ + Team = T; + if (T == 0 && RedSkin != None) + { + Skins[SkinSlot] = RedSkin; + RepSkin = RedSkin; + } + else if (T == 1 && BlueSkin != None) + { + Skins[SkinSlot] = BlueSkin; + RepSkin = BlueSkin; + } +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + bNetNotify = True + + WeaponFireOffset = 40.0 + ShieldAttachmentBone = Object84 + PitchDownLimit=55000 +} diff --git a/Classes/UT3LeviathanTurretWeaponBeam.uc b/Classes/UT3LeviathanTurretWeaponBeam.uc new file mode 100644 index 0000000..917f068 --- /dev/null +++ b/Classes/UT3LeviathanTurretWeaponBeam.uc @@ -0,0 +1,164 @@ +/* + * Copyright © 2007 Wormbo + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanTurretWeaponBeam extends UT3LeviathanTurretWeapon; + +#exec obj load file=ONSWeapons-A.ukx +#exec obj load file=TurretParticles.utx + +var class BeamEffectClass[2]; + +static function StaticPrecache(LevelInfo L) +{ + L.AddPrecacheMaterial(Material'TurretParticles.Beams.TurretBeam5'); + L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.PlasmaMuzzleBlue'); + L.AddPrecacheMaterial(Material'EpicParticles.Flares.SoftFlare'); + L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.PlasmaStar2'); + L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.SmokePanels1'); + L.AddPrecacheMaterial(Material'XEffectMat.shock_flare_a'); + L.AddPrecacheMaterial(Material'XEffectMat.Shock_ring_b'); + L.AddPrecacheMaterial(Material'XEffectMat.Shock.shock_mark_heat'); + L.AddPrecacheMaterial(Material'XEffectMat.shock_core'); +} + +simulated function UpdatePrecacheMaterials() +{ + Level.AddPrecacheMaterial(Material'TurretParticles.Beams.TurretBeam5'); + Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.PlasmaMuzzleBlue'); + Level.AddPrecacheMaterial(Material'EpicParticles.Flares.SoftFlare'); + Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.PlasmaStar2'); + Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.SmokePanels1'); + Level.AddPrecacheMaterial(Material'XEffectMat.shock_flare_a'); + Level.AddPrecacheMaterial(Material'XEffectMat.Shock_ring_b'); + Level.AddPrecacheMaterial(Material'XEffectMat.Shock.shock_mark_heat'); + Level.AddPrecacheMaterial(Material'XEffectMat.shock_core'); + + Super.UpdatePrecacheMaterials(); +} + + +function TraceFire(Vector Start, Rotator Dir) +{ + local Vector X, End, HitLocation, HitNormal; + local Actor Other; + local int Damage; + + X = Vector(Dir); + End = Start + TraceRange * X; + + //skip past vehicle driver + if (ONSVehicle(Instigator) != None && ONSVehicle(Instigator).Driver != None) { + ONSVehicle(Instigator).Driver.bBlockZeroExtentTraces = False; + Other = Trace(HitLocation, HitNormal, End, Start, True); + ONSVehicle(Instigator).Driver.bBlockZeroExtentTraces = true; + } + else + Other = Trace(HitLocation, HitNormal, End, Start, True); + + if (Other != None) { + if (!Other.bWorldGeometry) { + Damage = (DamageMin + Rand(DamageMax - DamageMin)); + Other.TakeDamage(Damage, Instigator, HitLocation, Momentum * X, DamageType); + HitNormal = vect(0,0,0); + } + } + else { + HitLocation = End; + HitNormal = Vect(0,0,0); + } + + HitCount++; + LastHitLocation = HitLocation; + SpawnHitEffects(Other, HitLocation, HitNormal); +} + +state InstantFireMode +{ + simulated function SpawnHitEffects(actor HitActor, vector HitLocation, vector HitNormal) + { + local ONSTurretBeamEffect Beam; + + if (Level.NetMode != NM_DedicatedServer) { + if (Role < ROLE_Authority) { + CalcWeaponFire(); + DualFireOffset *= -1; + } + + Beam = Spawn(BeamEffectClass[Team],,, WeaponFireLocation, rotator(HitLocation - WeaponFireLocation)); + BeamEmitter(Beam.Emitters[0]).BeamDistanceRange.Min = VSize(WeaponFireLocation - HitLocation); + BeamEmitter(Beam.Emitters[0]).BeamDistanceRange.Max = VSize(WeaponFireLocation - HitLocation); + BeamEmitter(Beam.Emitters[1]).BeamDistanceRange.Min = VSize(WeaponFireLocation - HitLocation); + BeamEmitter(Beam.Emitters[1]).BeamDistanceRange.Max = VSize(WeaponFireLocation - HitLocation); + Beam.SpawnEffects(HitLocation, HitNormal); + } + } +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + bInstantFire = True + DamageMin = 35 + DamageMax = 35 + Spread(0) = 0 + Momentum = 60000.0 + DamageType = class'DamTypeTurretBeam' + FireInterval = 0.3 + + FireSoundClass = Sound'UT3Weapons.ShockRifle.ShockRiflePrimary' + + BeamEffectClass(0) = class'ONSTurretBeamEffect' + BeamEffectClass(1) = class'ONSTurretBeamEffectBlue' + + Mesh = SkeletalMesh'UT3VH_Leviathan_Anims.Leviathan_LeftFrontTurret' + RedSkin = Shader'UT3LeviathanTex.LeviTurret.TurretSkin' + BlueSkin = Shader'UT3LeviathanTex.LeviTurret.TurretSkinBlue' + SkinSlot = 3 + PitchBone = "LT_Front_TurretPitch" + YawBone = "LT_Front_TurretYaw" + WeaponFireAttachmentBone = "Lt_Front_Turret_Barrel" + GunnerAttachmentBone = "LT_Front_TurretPitch" + ShieldAttachmentBone = "Lt_Front_Turret_Barrel" + DualFireOffset = 14.0 +} diff --git a/Classes/UT3LeviathanTurretWeaponMinigun.uc b/Classes/UT3LeviathanTurretWeaponMinigun.uc new file mode 100644 index 0000000..cd57e50 --- /dev/null +++ b/Classes/UT3LeviathanTurretWeaponMinigun.uc @@ -0,0 +1,174 @@ +/* + * Copyright © 2007, 2009 Wormbo + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanTurretWeaponMinigun extends UT3LeviathanTurretWeapon; + + +var class mTracerClass; +var() editinline Emitter mTracer; +var() float mTracerInterval; +var() float mTracerPullback; +var() float mTracerMinDistance; +var() float mTracerSpeed; +var float mLastTracerTime; + +static function StaticPrecache(LevelInfo L) +{ + L.AddPrecacheMaterial(Material'VMparticleTextures.TankFiringP.CloudParticleOrangeBMPtex'); + L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.TracerShot'); +} + +simulated function UpdatePrecacheMaterials() +{ + Level.AddPrecacheMaterial(Material'VMparticleTextures.TankFiringP.CloudParticleOrangeBMPtex'); + Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.TracerShot'); + + Super.UpdatePrecacheMaterials(); +} + +function byte BestMode() +{ + return 0; +} + +simulated function Destroyed() +{ + if (mTracer != None) + mTracer.Destroy(); + + Super.Destroyed(); +} + +simulated function UpdateTracer() +{ + local vector SpawnDir, SpawnVel; + local float hitDist; + + if (Level.NetMode == NM_DedicatedServer) + return; + + if (mTracer == None) + { + mTracer = Spawn(mTracerClass); + } + + if (Level.bDropDetail || Level.DetailMode == DM_Low) + mTracerInterval = 2 * Default.mTracerInterval; + else + mTracerInterval = Default.mTracerInterval; + + if (mTracer != None && Level.TimeSeconds > mLastTracerTime + mTracerInterval) + { + mTracer.SetLocation(WeaponFireLocation); + + hitDist = VSize(LastHitLocation - WeaponFireLocation) - mTracerPullback; + + if (Instigator != None && Instigator.IsLocallyControlled()) + SpawnDir = vector(WeaponFireRotation); + else + SpawnDir = Normal(LastHitLocation - WeaponFireLocation); + + if(hitDist > mTracerMinDistance) + { + SpawnVel = SpawnDir * mTracerSpeed; + + mTracer.Emitters[0].StartVelocityRange.X.Min = SpawnVel.X; + mTracer.Emitters[0].StartVelocityRange.X.Max = SpawnVel.X; + mTracer.Emitters[0].StartVelocityRange.Y.Min = SpawnVel.Y; + mTracer.Emitters[0].StartVelocityRange.Y.Max = SpawnVel.Y; + mTracer.Emitters[0].StartVelocityRange.Z.Min = SpawnVel.Z; + mTracer.Emitters[0].StartVelocityRange.Z.Max = SpawnVel.Z; + + mTracer.Emitters[0].LifetimeRange.Min = hitDist / mTracerSpeed; + mTracer.Emitters[0].LifetimeRange.Max = mTracer.Emitters[0].LifetimeRange.Min; + + mTracer.SpawnParticle(1); + } + + mLastTracerTime = Level.TimeSeconds; + } +} + +simulated function FlashMuzzleFlash() +{ + Super.FlashMuzzleFlash(); + + if (Role < ROLE_Authority) + DualFireOffset *= -1; + + UpdateTracer(); +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + bInstantFire = True + Spread = 0.0675 + DamageMin = 40 + DamageMax = 40 + DamageType = class'DamTypeONSChainGun' + FireInterval = 0.1 + + FireSoundClass = Sound'UT3Weapons2.Stinger.StingerPrimaryAmb' + bAmbientFireSound=True + + mTracerInterval=0.06 + mTracerClass=class'XEffects.NewTracer' + mTracerPullback=150.0 + mTracerMinDistance=0.0 + mTracerSpeed=15000.0 + + AIInfo(0)=(bInstantHit=true,AimError=750) + + Mesh = SkeletalMesh'UT3VH_Leviathan_Anims.Leviathan_LeftRearTurret' + RedSkin = Shader'UT3LeviathanTex.LeviTurret.TurretSkin' + BlueSkin = Shader'UT3LeviathanTex.LeviTurret.TurretSkinBlue' + SkinSlot = 2 + PitchBone = "LT_Rear_TurretPitch" + YawBone = "LT_Rear_TurretYaw" + WeaponFireAttachmentBone = "Lt_Rear_Turret_Barrel" + GunnerAttachmentBone = "LT_Rear_TurretPitch" + ShieldAttachmentBone = "Lt_Rear_Turret_Barrel" + DualFireOffset = 0.0 +} diff --git a/Classes/UT3LeviathanTurretWeaponRocket.uc b/Classes/UT3LeviathanTurretWeaponRocket.uc new file mode 100644 index 0000000..cae1eb3 --- /dev/null +++ b/Classes/UT3LeviathanTurretWeaponRocket.uc @@ -0,0 +1,130 @@ +/* + * Copyright © 2007, 2009 Wormbo + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanTurretWeaponRocket extends UT3LeviathanTurretWeapon; + + +//============================================================================= +// Imports +//============================================================================= + +#exec obj load file=WeaponSounds.uax + + +//============================================================================= +// Properties +//============================================================================= + +var int RocketBurstSize; +var float RocketBurstInterval; + + +//============================================================================= +// Variables +//============================================================================= + +var int RemainingRockets; +var Controller FireController; + + +state ProjectileFireMode +{ + function Fire(Controller C) + { + RemainingRockets = RocketBurstSize; + ActuallyFire(); + } + + function Timer() + { + // begin copy/paste from AttemptFire() + CalcWeaponFire(); + if (bCorrectAim) + WeaponFireRotation = AdjustAim(false); + if (Spread > 0) + WeaponFireRotation = rotator(vector(WeaponFireRotation) + VRand() * FRand() * Spread); + + DualFireOffset *= -1; + Instigator.MakeNoise(1.0); + // end copy/paste from AttemptFire() + + ActuallyFire(); + } + + function ActuallyFire() + { + if (Instigator != None && Instigator.Controller != None) { + RemainingRockets--; + } + else { + RemainingRockets = 0; + return; + } + SpawnProjectile(ProjectileClass, false); + + if (RemainingRockets > 0) + SetTimer(RocketBurstInterval, false); + } +} + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + ProjectileClass = Class'UT3LeviathanRocket' + FireSoundClass = Sound'UT3Weapons2.RocketLauncher.RocketLauncherFire' + RocketBurstSize = 4 + RocketBurstInterval = 0.15 + FireInterval = 2.0 + + Mesh = SkeletalMesh'UT3VH_Leviathan_Anims.Leviathan_RightFrontTurret' + RedSkin = Shader'UT3LeviathanTex.LeviTurret.TurretSkin' + BlueSkin = Shader'UT3LeviathanTex.LeviTurret.TurretSkinBlue' + SkinSlot = 5 + PitchBone = "RT_Front_TurretPitch" + YawBone = "RT_Front_TurretYaw" + WeaponFireAttachmentBone = "Rt_Front_Turret_BarrelLt" + GunnerAttachmentBone = "RT_Front_TurretPitch" + ShieldAttachmentBone = "Rt_Front_Turret_BarrelLt" + DualFireOffset = 0.0 +} diff --git a/Classes/UT3LeviathanTurretWeaponShock.uc b/Classes/UT3LeviathanTurretWeaponShock.uc new file mode 100644 index 0000000..06f0b05 --- /dev/null +++ b/Classes/UT3LeviathanTurretWeaponShock.uc @@ -0,0 +1,71 @@ +/* + * Copyright © 2007, 2009 Wormbo + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3LeviathanTurretWeaponShock extends UT3LeviathanTurretWeapon; + + +//============================================================================= +// Imports +//============================================================================= + +#exec obj load file=ONSVehicleSounds-S.uax + + +//============================================================================= +// Default values +//============================================================================= + +defaultproperties +{ + ProjectileClass = class'UT3LeviathanShockBall' + FireSoundClass = Sound'UT3Weapons.ShockRifle.ShockRifleAlt' + FireInterval = 0.5 + + Mesh = SkeletalMesh'UT3VH_Leviathan_Anims.Leviathan_RightRearTurret' + RedSkin = Shader'UT3LeviathanTex.LeviTurret.TurretSkin' + BlueSkin = Shader'UT3LeviathanTex.LeviTurret.TurretSkinBlue' + SkinSlot = 4 + PitchBone = "RT_Rear_TurretPitch" + YawBone = "RT_Rear_TurretYaw" + WeaponFireAttachmentBone = "Rt_Rear_Turret_Barrel" + GunnerAttachmentBone = "RT_Rear_TurretPitch" + ShieldAttachmentBone = "Rt_Rear_Turret_Barrel" + DualFireOffset = 0.0 +} diff --git a/Classes/UT3Manta.uc b/Classes/UT3Manta.uc index f85087d..56bd0d7 100644 --- a/Classes/UT3Manta.uc +++ b/Classes/UT3Manta.uc @@ -1,11 +1,43 @@ -/****************************************************************************** -UT3Manta - -Creation date: 2008-05-02 20:50 -Last change: $Id$ -Copyright (c) 2008, Wormbo and GreatEmerald -Copyright (c) 2012, 100GPing100 -******************************************************************************/ +/* + * Copyright © 2008 Wormbo + * Copyright © 2012 100GPing100 + * Copyright © 2008, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3Manta extends ONSHoverBike; @@ -14,18 +46,8 @@ var Emitter DuckEffect; //=============== // @100GPing100 /* Load the packages. */ -#exec obj load file=..\Animations\UT3MantaAnims.ukx -#exec obj load file=..\Textures\UT3MantaTex.utx - -/* Import all the sounds. */ -#exec audio import group=Sounds file=..\Sounds\UT3Manta\Engine.wav -#exec audio import group=Sounds file=..\Sounds\UT3Manta\EngineStart.wav -#exec audio import group=Sounds file=..\Sounds\UT3Manta\EngineStop.wav -#exec audio import group=Sounds file=..\Sounds\UT3Manta\Jump.wav -#exec audio import group=Sounds file=..\Sounds\UT3Manta\Duck.wav -#exec audio import group=Sounds file=..\Sounds\UT3Manta\Impact01.wav -#exec audio import group=Sounds file=..\Sounds\UT3Manta\Impact02.wav -#exec audio import group=Sounds file=..\Sounds\UT3Manta\Explode.wav +#exec obj load file=../Animations/UT3MantaAnims.ukx +#exec obj load file=../Textures/UT3MantaTex.utx /* The spining blades. */ var array Blades; @@ -35,15 +57,15 @@ var array Blades; // function PostBeginPlay() { - Super.PostBeginPlay(); - - // Spawn the blades and attach them to the manta. - Blades[0] = Spawn(class'UT3MantaBlade'); - AttachToBone(Blades[0], 'Blade_rt'); - Blades[1] = Spawn(class'UT3MantaBlade'); - AttachToBone(Blades[1], 'Blade_lt'); - - ToggleBlades(false); + Super.PostBeginPlay(); + + // Spawn the blades and attach them to the manta. + Blades[0] = Spawn(class'UT3MantaBlade'); + AttachToBone(Blades[0], 'Blade_rt'); + Blades[1] = Spawn(class'UT3MantaBlade'); + AttachToBone(Blades[1], 'Blade_lt'); + + ToggleBlades(false); } // @@ -51,14 +73,14 @@ function PostBeginPlay() // function DrivingStatusChanged() { - Super.DrivingStatusChanged(); - - ToggleBlades(Driver != None); - - if (Driver == None) // The default value is set by the mutator. - bCanBeBaseForPawns = default.bCanBeBaseForPawns; - else - bCanBeBaseForPawns = false; + Super.DrivingStatusChanged(); + + ToggleBlades(Driver != None); + + if (Driver == None) // The default value is set by the mutator. + bCanBeBaseForPawns = default.bCanBeBaseForPawns; + else + bCanBeBaseForPawns = false; } // @@ -66,9 +88,9 @@ function DrivingStatusChanged() // function Tick(float DeltaTime) { - if (Driver != None) // Just in case. - Ailerons(DeltaTime); - EmeraldTick(DeltaTime); // Renamed it. + if (Driver != None) // Just in case. + Ailerons(DeltaTime); + EmeraldTick(DeltaTime); // Renamed it. } // @@ -76,13 +98,16 @@ function Tick(float DeltaTime) // function ToggleBlades(bool OnOff) { - if (OnOff) { // On. - Blades[0].Skins[0] = Blades[0].BladesOnTex; - Blades[1].Skins[0] = Blades[1].BladesOnTex; - } else { // Off. - Blades[0].Skins[0] = Blades[0].BladesOffTex; - Blades[1].Skins[0] = Blades[1].BladesOffTex; - } + if (Blades.length < 2 || Blades[0] == None || Blades[1] == None) + return; + + if (OnOff) { // On. + Blades[0].Skins[0] = Blades[0].BladesOnTex; + Blades[1].Skins[0] = Blades[1].BladesOnTex; + } else { // Off. + Blades[0].Skins[0] = Blades[0].BladesOffTex; + Blades[1].Skins[0] = Blades[1].BladesOffTex; + } } // @@ -90,21 +115,21 @@ function ToggleBlades(bool OnOff) // function Ailerons(float DeltaTime) { - // 45º = 8192 RUU - local Rotator AileronsRotation; - - // 1000 = The velocity at wich the angle is of 45º - AileronsRotation.Pitch = 8192 * (Velocity.Z / 1000) - Rotation.Pitch; - AileronsRotation.Yaw = 0; - AileronsRotation.Roll = 0; - - if (AileronsRotation.Pitch > 8192) - AileronsRotation.Pitch = 8192; - else if (AileronsRotation.Pitch < -8192) - AileronsRotation.Pitch = -8192; - - SetBoneRotation('Aileron_Rt', AileronsRotation, 0, 1); - SetBoneRotation('Aileron_Lt', AileronsRotation, 0, 1); + // 45° = 8192 RUU + local Rotator AileronsRotation; + + // 1000 = The velocity at wich the angle is of 45º + AileronsRotation.Pitch = 8192 * (Velocity.Z / 1000) - Rotation.Pitch; + AileronsRotation.Yaw = 0; + AileronsRotation.Roll = 0; + + if (AileronsRotation.Pitch > 8192) + AileronsRotation.Pitch = 8192; + else if (AileronsRotation.Pitch < -8192) + AileronsRotation.Pitch = -8192; + + SetBoneRotation('Aileron_Rt', AileronsRotation, 0, 1); + SetBoneRotation('Aileron_Lt', AileronsRotation, 0, 1); } // @@ -112,10 +137,10 @@ function Ailerons(float DeltaTime) // function Destroyed() { - Blades[0].Destroy(); - Blades[1].Destroy(); - - Super.Destroyed(); + Blades[0].Destroy(); + Blades[1].Destroy(); + + Super.Destroyed(); } // @100GPing100 //======END====== @@ -143,7 +168,7 @@ simulated function CheckJumpDuck() PlaySound(JumpSound,,1.0); if (Role == ROLE_Authority) - DoBikeJump = !DoBikeJump; + DoBikeJump = !DoBikeJump; if(Level.NetMode != NM_DedicatedServer) { @@ -178,14 +203,14 @@ simulated function CheckJumpDuck() } } else - bHoldingDuck = False; + bHoldingDuck = False; } simulated function EmeraldTick(float DeltaTime) { - Super.Tick(DeltaTime); - if (!bHoldingDuck && DuckEffect!=None) { - DuckEffect.Destroy(); +Super.Tick(DeltaTime); +if (!bHoldingDuck && DuckEffect!=None) { + DuckEffect.Destroy(); } } @@ -195,59 +220,61 @@ simulated function EmeraldTick(float DeltaTime) defaultproperties { - //=============== - // @100GPing100 - // Looks. - Mesh = SkeletalMesh'UT3MantaAnims.Manta'; - RedSkin = Shader'UT3MantaTex.MantaSkin'; - BlueSkin = Shader'UT3MantaTex.MantaSkinBlue'; - DrivePos = (X=-70,Y=0.0,Z=55.0); - - // Damage. - DriverWeapons(0)=(WeaponClass=class'UT3MantaPlasmaGun',WeaponBone=barrel_rt); - - // Strings. - VehiclePositionString = "in a UT3 Manta"; - - // Movement. - MaxPitchSpeed = 2000; - HoverCheckDist = 155; - AirControl = 1.5; - - // Sounds. - IdleSound = Sound'UT3Manta.Sounds.Engine'; - StartUpSound = Sound'UT3Manta.Sounds.EngineStart'; - ShutDownSound = Sound'UT3Manta.Sounds.EngineStop'; - JumpSound = Sound'UT3Manta.Sounds.Jump'; - DuckSound = Sound'UT3Manta.Sounds.Duck'; - ImpactDamageSounds(0) = Sound'UT3Manta.Sounds.Impact01'; - ImpactDamageSounds(1) = Sound'UT3Manta.Sounds.Impact02'; - ImpactDamageSounds(2) = Sound'UT3Manta.Sounds.Impact01'; - ImpactDamageSounds(3) = Sound'UT3Manta.Sounds.Impact02'; - ImpactDamageSounds(4) = Sound'UT3Manta.Sounds.Impact01'; - ImpactDamageSounds(5) = Sound'UT3Manta.Sounds.Impact02'; - ImpactDamageSounds(6) = Sound'UT3Manta.Sounds.Impact01'; - ExplosionSounds(0) = Sound'UT3Manta.Sounds.Explode'; - ExplosionSounds(1) = Sound'UT3Manta.Sounds.Explode'; - ExplosionSounds(2) = Sound'UT3Manta.Sounds.Explode'; - ExplosionSounds(3) = Sound'UT3Manta.Sounds.Explode'; - ExplosionSounds(4) = Sound'UT3Manta.Sounds.Explode'; - // @100GPing100 - //======END====== - - - VehicleNameString = "UT3 Manta" - - MaxYawRate=3.0 + //=============== + // @100GPing100 + // Looks. + Mesh = SkeletalMesh'UT3MantaAnims.Manta'; + RedSkin = Shader'UT3MantaTex.MantaSkin'; + BlueSkin = Shader'UT3MantaTex.MantaSkinBlue'; + DrivePos = (X=-67,Y=0.0,Z=64.0); //DrivePos = (X=-70,Y=0.0,Z=50.0) + + // Damage. + DriverWeapons(0)=(WeaponClass=class'UT3MantaPlasmaGun',WeaponBone=barrel_rt); + + // Strings. + VehiclePositionString = "in a UT3 Manta"; + + // Movement. + GroundSpeed = 1500 //UT2004 default is 2000 UT3 default is 1500 + MaxPitchSpeed = 2000; + HoverCheckDist = 155; + AirControl = 1.5; + + // Sounds. + IdleSound = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_EngineLoop01'; + StartUpSound = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Start01'; + ShutDownSound = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Stop01'; + JumpSound = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Jump'; + DuckSound = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Crouch'; + ImpactDamageSounds(0) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Collide01'; + ImpactDamageSounds(1) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Collide02'; + ImpactDamageSounds(2) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Collide01'; + ImpactDamageSounds(3) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Collide02'; + ImpactDamageSounds(4) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Collide01'; + ImpactDamageSounds(5) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Collide02'; + ImpactDamageSounds(6) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Collide01'; + ExplosionSounds(0) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Explode01'; + ExplosionSounds(1) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Explode01'; + ExplosionSounds(2) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Explode01'; + ExplosionSounds(3) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Explode01'; + ExplosionSounds(4) = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Explode01'; + // @100GPing100 + //======END====== + + + VehicleNameString = "UT3 Manta" + + MaxYawRate=5.0 //3.0 + TurnTorqueMax=180.0 UprightStiffness=450.000000 //The manual says it doesn't do anything - UprightDamping=20.000000 //The manual says it doesn't do anything - PitchTorqueMax=9.0 //18 is a bit too over the top //13.5 as well - RollTorqueMax=25.0 - /*DriverWeapons(0)=(WeaponClass=class'UT3MantaPlasmaGun',WeaponBone=PlasmaGunAttachment); - IdleSound=sound'UT3Manta.Sounds.Engine'; - StartUpSound=sound'UT3Vehicles.Manta.MantaEnter' - ShutDownSound=sound'UT3Vehicles.Manta.MantaLeave' - JumpSound=sound'UT3Vehicles.Manta.MantaJump' - DuckSound=sound'UT3Vehicles.Manta.MantaDuck'*/ + UprightDamping=20.000000 //The manual says it doesn't do anything + PitchTorqueMax=9.0 //18 is a bit too over the top //13.5 as well + RollTorqueMax=25.0 HornSounds(1)=sound'ONSVehicleSounds-S.Horns.LaCuchachaHorn' + + EntryRadius = 160.0 + + HeadlightCoronaOffset=() + HeadlightCoronaOffset(0)=(X=40.0,Y=0.0,Z=-30.0) + HeadlightCoronaMaterial=Material'EmitterTextures.Flares.EFlareOY' } diff --git a/Classes/UT3MantaPlasmaGun.uc b/Classes/UT3MantaPlasmaGun.uc index 2212c67..08470bd 100644 --- a/Classes/UT3MantaPlasmaGun.uc +++ b/Classes/UT3MantaPlasmaGun.uc @@ -1,14 +1,44 @@ -//----------------------------------------------------------------------------- -// UT3MantaPlasmaGun.uc -// Sounds increased by 25%... -// GreatEmerald, 2008 -//----------------------------------------------------------------------------- +/* + * Copyright © 2008, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3MantaPlasmaGun extends ONSHoverBikePlasmaGun; -// @100GPing100 -#exec audio import group=Sounds file=..\Sounds\UT3Manta\Fire.wav - function float SuggestAttackStyle() { local xBot B; @@ -22,12 +52,69 @@ function float SuggestAttackStyle() return 0.2; } +// GEm: Add a weapon offset +simulated function InitEffects() +{ + // don't even spawn on server + if (Level.NetMode == NM_DedicatedServer) + return; + + if ( (FlashEmitterClass != None) && (FlashEmitter == None) ) + { + FlashEmitter = Spawn(FlashEmitterClass); + FlashEmitter.SetDrawScale(DrawScale); + if (WeaponFireAttachmentBone == '') + FlashEmitter.SetBase(self); + else + AttachToBone(FlashEmitter, WeaponFireAttachmentBone); + + FlashEmitter.SetRelativeLocation(WeaponFireOffset * vect(1,0,0) + WeaponOffset); + } + + if (AmbientEffectEmitterClass != none && AmbientEffectEmitter == None) + { + AmbientEffectEmitter = spawn(AmbientEffectEmitterClass, self,, WeaponFireLocation, WeaponFireRotation); + if (WeaponFireAttachmentBone == '') + AmbientEffectEmitter.SetBase(self); + else + AttachToBone(AmbientEffectEmitter, WeaponFireAttachmentBone); + + AmbientEffectEmitter.SetRelativeLocation(WeaponFireOffset * vect(1,0,0) + WeaponOffset); + } +} + +simulated function CalcWeaponFire() +{ + local coords WeaponBoneCoords; + local vector CurrentFireOffset; + + // Calculate fire offset in world space + WeaponBoneCoords = GetBoneCoords(WeaponFireAttachmentBone); + CurrentFireOffset = (WeaponFireOffset * vect(1,0,0)) + (DualFireOffset * vect(0,1,0)) + WeaponOffset; + + // Calculate rotation of the gun + WeaponFireRotation = rotator(vector(CurrentAim) >> Rotation); + + // Calculate exact fire location + WeaponFireLocation = WeaponBoneCoords.Origin + (CurrentFireOffset >> WeaponFireRotation); + + // Adjust fire rotation taking dual offset into account + if (bDualIndependantTargeting) + WeaponFireRotation = rotator(CurrentHitLocation - WeaponFireLocation); +} + defaultproperties { - // @100GPing100 - FireSoundClass = Sound'UT3Manta.Sounds.Fire'; - - //FireSoundClass=sound'UT3Vehicles.Manta.MantaFire' - TransientSoundVolume=0.4 - ProjectileClass=class'UT3MantaPlasmaProjectile' + // @100GPing100 + FireSoundClass = Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Fire01'; + + //FireSoundClass=sound'UT3Vehicles.Manta.MantaFire' + TransientSoundVolume=0.4 + ProjectileClass=class'UT3MantaPlasmaProjectile' + + DualFireOffset = 17.0 + WeaponOffset = (X=0.0,Y=-17.0,Z=2.0) + + PitchUpLimit=5000 + PitchDownLimit=57000 } diff --git a/Classes/UT3MantaPlasmaProjectile.uc b/Classes/UT3MantaPlasmaProjectile.uc index 4b0808b..9c170d3 100644 --- a/Classes/UT3MantaPlasmaProjectile.uc +++ b/Classes/UT3MantaPlasmaProjectile.uc @@ -1,14 +1,115 @@ -//----------------------------------------------------------------------------- -// UT3MantaPlasmaProjectile.uc -// This Manta is more deadly than ever. -// GreatEmerald, 2008 -//----------------------------------------------------------------------------- +/* + * Copyright © 2008, 2014 GreatEmerald + * Copyright © 2017, HellDragon + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3MantaPlasmaProjectile extends ONSHoverBikePlasmaProjectile; +// GEm: Don't hurt the instigator, but only applicable if we have radius +/*simulated function HurtRadius( float DamageAmount, float DamageRadius, class DamageType, float Momentum, vector HitLocation ) +{ + local actor Victims; + local float damageScale, dist; + local vector dir; + + if ( bHurtEntry ) + return; + + bHurtEntry = true; + foreach VisibleCollidingActors( class 'Actor', Victims, DamageRadius, HitLocation ) + { + // don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag + if ((Victims != self) && (Victims != Instigator) && (Hurtwall != Victims) + && (Victims.Role == ROLE_Authority) && !Victims.IsA('FluidSurfaceInfo')) + { + dir = Victims.Location - HitLocation; + dist = FMax(1,VSize(dir)); + dir = dir/dist; + damageScale = 1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius); + if ( Instigator == None || Instigator.Controller == None ) + Victims.SetDelayedDamageInstigatorController( InstigatorController ); + if ( Victims == LastTouched ) + LastTouched = None; + Victims.TakeDamage + ( + damageScale * DamageAmount, + Instigator, + Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, + (damageScale * Momentum * dir), + DamageType + ); + if (Vehicle(Victims) != None && Vehicle(Victims).Health > 0) + Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation); + + } + } + if ( (LastTouched != None) && (LastTouched != self) && (LastTouched.Role == ROLE_Authority) && !LastTouched.IsA('FluidSurfaceInfo') ) + { + Victims = LastTouched; + LastTouched = None; + dir = Victims.Location - HitLocation; + dist = FMax(1,VSize(dir)); + dir = dir/dist; + damageScale = FMax(Victims.CollisionRadius/(Victims.CollisionRadius + Victims.CollisionHeight),1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius)); + if ( Instigator == None || Instigator.Controller == None ) + Victims.SetDelayedDamageInstigatorController(InstigatorController); + Victims.TakeDamage + ( + damageScale * DamageAmount, + Instigator, + Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, + (damageScale * Momentum * dir), + DamageType + ); + if (Vehicle(Victims) != None && Vehicle(Victims).Health > 0) + Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation); + } + + bHurtEntry = false; +}*/ + defaultproperties { - Damage=36.000000 - MomentumTransfer=4000.000000 - LifeSpan=1.600000 + Speed=2000 + MaxSpeed=7000 + Damage = 36.0 + DamageRadius = 0.0 + MomentumTransfer = 20000.000000 //4000.0 + LifeSpan = 1.6 + MyDamageType=Class'UT3Vehicles.UT3DmgType_MantaPlasma' } diff --git a/Classes/UT3Nemesis.uc b/Classes/UT3Nemesis.uc~ similarity index 100% rename from Classes/UT3Nemesis.uc rename to Classes/UT3Nemesis.uc~ diff --git a/Classes/UT3Nightshade.uc b/Classes/UT3Nightshade.uc index e7eeace..44115fb 100644 --- a/Classes/UT3Nightshade.uc +++ b/Classes/UT3Nightshade.uc @@ -1,25 +1,49 @@ -//============================================================ -// UT3 Nightshade -// Credits: 100GPing100(José Luís) -// Copyright José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + class UT3Nightshade extends ONSHoverBike; // Load packages. -#exec obj load file=..\Textures\UT3NightShadeTex.utx -#exec obj load file=..\Animations\UT3NightShadeAnims.ukx -// Import sounds. -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\Engine.wav -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\EngineStart.wav -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\EngineStop.wav -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\ArmExtend.wav -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\ArmRetract.wav -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\SwitchDeployable.wav -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\DropItem.wav -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\Impact01.wav -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\Impact02.wav +#exec obj load file=../Textures/UT3NightShadeTex.utx +#exec obj load file=../Animations/UT3NightShadeAnims.ukx /* The ammount of normal speed to have when cloaked. */ @@ -44,7 +68,7 @@ var Sound DeploySnd; /* Sound played when undeploying. */ var Sound UndeploySnd; /* Mines deployed. */ -var array Mines; +var array Mines; /* Max speed when not cloaked. */ var float MaxVisibleSpeed; /* The radius to check for deployables. */ @@ -54,7 +78,7 @@ var float DeployCheckDistance; /* The currently selected mine. 0 = none, 1 = SpiderMine, 2 = SlowVolume, 3 = EMPMine, 4 = ShieldMine */ var byte SelectedMine; /* The items to be displayed on the HUD. */ -var array HUDItems; +var array HUDItems; /* Only used once to initialize the position of the menu items. */ var bool bItemsInitialized; /* Sound played when a new deployable is selected. */ @@ -79,17 +103,17 @@ simulated function CheckJumpDuck() // Select a mine if we don't have one selected already. if (SelectedMine == 0) SelectNextMine(); - + ArmMine = Spawn(MineObjectClasses[SelectedMine - 1], Driver,, Location); AttachToBone(ArmMine, 'Object'); - + Cloak(false); - + CurrentState = VS_Deploying; PlaySound(DeploySnd, SLOT_None); PlayAnim('ArmExtend', 1.6, 0.2); CurrentAnim = "ArmExtend"; - + // Do not allow to move or rotate. MaxThrustForce = 0.0; MaxStrafeForce = 0.0; @@ -117,16 +141,16 @@ function bool bOnWater() for(i = 0; i < KarmaParams(KParams).Repulsors.Length; i++) if (KarmaParams(KParams).Repulsors[i].bRepulsorOnWater) return true; - + return false; } function bool NoObstacle() { local vector HitLocation, HitNormal, TraceEnd, Direction; - + Direction = -Vector(Rotation); TraceEnd = Location - vect(0,0,5) + Direction * DeployCheckDistance; - + if (Trace(HitLocation, HitNormal, TraceEnd, Location, true) == None) return true; else @@ -145,18 +169,18 @@ function ShowMessage(byte Type, int Switch) } function bool CheckNearby() { - return !(class'DeployableMine'.static.DeployablesNearby(self, Location, DeployCheckRadius)); + return !(class'UT3DeployableMine'.static.DeployablesNearby(self, Location, DeployCheckRadius)); } function bool IsOnGround() { local KarmaParams KP; local int i; - + KP = KarmaParams(KParams); for(i=0; i SpawnClass, @@ -188,48 +212,48 @@ function Fire(optional float F) optional Object.Rotator SpawnRotation)*/ if (Mines[0] == None && SelectedMine == 1) { - Mines[0] = Spawn(Class'SpiderMine', Driver,, ArmMine.Location); + Mines[0] = Spawn(Class'UT3SpiderMineTrap', Driver,, ArmMine.Location); PlaySound(DropItemSnd); - + if (!bHasAmmo(1)) SelectNextMine(); } else if (Mines[1] == None && SelectedMine == 1) { - Mines[1] = Spawn(Class'SpiderMine', Driver,, ArmMine.Location); + Mines[1] = Spawn(Class'UT3SpiderMineTrap', Driver,, ArmMine.Location); PlaySound(DropItemSnd); - + if (!bHasAmmo(1)) SelectNextMine(); } else if (Mines[2] == None && SelectedMine == 2) { ShowMessage(0, 4); // "Only in next beta (have a shield :D)" - Mines[2] = Spawn(Class'EnergyShield', Driver,, ArmMine.Location); + Mines[2] = Spawn(Class'UT3DeployableEnergyShield', Driver,, ArmMine.Location); PlaySound(DropItemSnd); - + if (!bHasAmmo(2)) SelectNextMine(); } else if (Mines[3] == None && SelectedMine == 3) { - Mines[3] = Spawn(Class'EMPMine', Driver,, ArmMine.Location); + Mines[3] = Spawn(Class'UT3EMPMine', Driver,, ArmMine.Location); PlaySound(DropItemSnd); - + if (!bHasAmmo(3)) SelectNextMine(); } else if (Mines[4] == None && SelectedMine == 4) { - Mines[4] = Spawn(Class'EnergyShield', Driver,, ArmMine.Location); + Mines[4] = Spawn(Class'UT3DeployableEnergyShield', Driver,, ArmMine.Location); PlaySound(DropItemSnd); - + if (!bHasAmmo(4)) SelectNextMine(); } - + ArmMine.Destroy(); - + // Undeploy. CurrentState = VS_Undeploying; PlaySound(UndeploySnd, SLOT_None); @@ -244,7 +268,7 @@ function Tick(float DeltaTime) // If we have ammo available and we have no mine selected, select one right away! if (bHasAmmo(0) && SelectedMine == 0) SelectNextMine(); - + CheckState(); super.Tick(DeltaTime); } @@ -311,26 +335,26 @@ simulated event DrivingStatusChanged() { // Do not call it in ONSHoverBike because of the dust effects. Super(ONSHoverCraft).DrivingStatusChanged(); - + if (Driver == None) { if (ArmMine != None) ArmMine.Destroy(); - + MaxThrustForce = Default.MaxThrustForce; MaxStrafeForce = Default.MaxStrafeForce; TurnTorqueMax = Default.TurnTorqueMax; Cloak(false); - + PlayAnim('Idle', 1, 0.7); CurrentAnim = "Idle"; CurrentState = VS_Undeployed; - + // Reset these. PitchTorqueMax = Default.PitchTorqueMax; TurnTorqueMax = Default.TurnTorqueMax; RollTorqueMax = Default.RollTorqueMax; - + KarmaParamsRBFull(KParams).KMaxSpeed = MaxVisibleSpeed; } else @@ -340,7 +364,7 @@ simulated event DrivingStatusChanged() Cloak(true); CurrentState = VS_Cloaked; } - + if (Role == ROLE_Authority) { if (Bot(Controller) != None || AIController(Controller) != None) @@ -355,24 +379,24 @@ Begin: // Prevents driver from firing. CurrentAnim = "ArmRetract"; CurrentState = VS_Deploying; - + // Undeploy. PlaySound(UndeploySnd, SLOT_None); PlayAnim('ArmRetract', 4.8, 0.2); - + // Wait for the animation to end. FinishAnim(); - + // Update mine object. if (ArmMine != None) ArmMine.Destroy(); ArmMine = Spawn(MineObjectClasses[SelectedMine - 1], Driver,, Location); AttachToBone(ArmMine, 'Object'); - + // Deploy. PlaySound(DeploySnd, SLOT_None); PlayAnim('ArmExtend', 1.6, 0.2); - + // Will change it back to VS_Deployed in CheckState(). CurrentAnim = "ArmExtend"; } @@ -390,7 +414,7 @@ simulated function NextWeapon() break; } SelectedMine = 2; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 1); // "Stasis Field" break; case 2: @@ -401,7 +425,7 @@ simulated function NextWeapon() break; } SelectedMine = 3; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 2); // "EMP" break; case 3: @@ -412,7 +436,7 @@ simulated function NextWeapon() break; } SelectedMine = 4; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 3); // "Shield Generator" break; case 4: @@ -423,7 +447,7 @@ simulated function NextWeapon() break; } SelectedMine = 1; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 0); // "Spidermine Trap" break; } @@ -446,7 +470,7 @@ simulated function PrevWeapon() break; } SelectedMine = 4; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 3); // "Shield Generator" break; case 2: @@ -457,7 +481,7 @@ simulated function PrevWeapon() break; } SelectedMine = 1; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 0); // "Spidermine Trap" break; case 3: @@ -468,7 +492,7 @@ simulated function PrevWeapon() break; } SelectedMine = 2; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 1); // "Stasis Field" break; case 4: @@ -479,7 +503,7 @@ simulated function PrevWeapon() break; } SelectedMine = 3; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 2); // "EMP" break; } @@ -502,7 +526,7 @@ simulated function SwitchWeapon(byte F) break; } SelectedMine = 1; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 0); // "Spidermine Trap" break; case 2: @@ -513,7 +537,7 @@ simulated function SwitchWeapon(byte F) break; } SelectedMine = 2; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 1); // "Stasis Field" break; case 3: @@ -524,7 +548,7 @@ simulated function SwitchWeapon(byte F) break; } SelectedMine = 3; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 2); // "EMP" break; case 4: @@ -535,7 +559,7 @@ simulated function SwitchWeapon(byte F) break; } SelectedMine = 4; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 3); // "Shield Generator" break; } @@ -581,7 +605,7 @@ function SelectNextMine() SelectedMine = 4; else SelectedMine = 0; - + switch (SelectedMine) { case 1: @@ -604,7 +628,7 @@ function SelectNextMine() function DrawHUD(Canvas Canvas) { local int i; - + // Do not draw the HUD on bots. if (Bot(Controller) != None || AIController(Controller) != None) return; @@ -622,7 +646,7 @@ function DrawHUD(Canvas Canvas) HUDItems[3].PosY = Canvas.ClipY * 0.90; bItemsInitialized = true; } - + if (SelectedMine != 0) { // Draw the selected mine with normal colours. @@ -660,7 +684,7 @@ function CheckAICloak() { local Bot b; local AIController AI; - + b = Bot(Controller); AI = AIController(Controller); if (b != None || AI != None) @@ -678,21 +702,21 @@ function bool BotDropDeployable() if (CurrentState == VS_Undeployed || CurrentState == VS_Cloaked) { Cloak(false); - + // Select a mine if we don't have one selected already. if (SelectedMine == 0) SelectNextMine(); - + ArmMine = Spawn(MineObjectClasses[SelectedMine - 1], Driver,, Location); AttachToBone(ArmMine, 'Object'); - + Cloak(false); - + CurrentState = VS_Deploying; PlaySound(DeploySnd, SLOT_None); PlayAnim('ArmExtend', 1.6, 0.2); CurrentAnim = "ArmExtend"; - + // Do not allow to move or rotate. MaxThrustForce = 0.0; MaxStrafeForce = 0.0; @@ -703,16 +727,16 @@ function bool BotDropDeployable() { LastDropAttemptTime = Level.TimeSeconds; Fire(0); - + CurrentState = VS_Undeploying; PlaySound(UndeploySnd, SLOT_None); PlayAnim('ArmRetract', 4.8, 0.2); CurrentAnim = "ArmRetract"; - + if (ArmMine != None) ArmMine.Destroy(); } - + return false; } function bool ShouldDropDeployable() @@ -720,16 +744,16 @@ function bool ShouldDropDeployable() local Bot b; local vector EnemyDir; local GameObjective O; - + SelectNextMine(); - + if (CurrentState == VS_Deployed) { BotDropDeployable(); return true; } - - + + b = Bot(Controller); if (b != None && Level.TimeSeconds - LastDropAttemptTime > 7.0) { @@ -738,7 +762,7 @@ function bool ShouldDropDeployable() LastDropAttemptTime = Level.TimeSeconds; return false; } - + if (b.Enemy == None) { EnemyDir = b.Enemy.Location - Location; @@ -807,7 +831,7 @@ DefaultProperties // Strings. VehiclePositionString = "in a UT3 Nightshade"; VehicleNameString = "UT3 Nightshade"; - + // Looks. Mesh = SkeletalMesh'UT3NightshadeAnims.Nightshade'; RedSkin = Shader'UT3NightshadeTex.Nightshader.NightshadeSkin'; @@ -817,38 +841,38 @@ DefaultProperties HeadlightCoronaMaxSize = 0.0; BikeDustTraceDistance = 0.0; bAdjustDriversHead = false; - MineObjectClasses(0) = class'SpidermineObject'; - MineObjectClasses(1) = class'StasisFieldObject'; - MineObjectClasses(2) = class'EMPObject'; - MineObjectClasses(3) = class'ShieldObject'; - + MineObjectClasses(0) = class'UT3SpiderMineObject'; + MineObjectClasses(1) = class'UT3StasisFieldObject'; + MineObjectClasses(2) = class'UT3EMPObject'; + MineObjectClasses(3) = class'UT3ShieldObject'; + // HUD. bShowChargingBar = false; - Begin Object Class=HUDItem Name=HUDSpidermineTrap + Begin Object Class=UT3HUDItem Name=HUDSpidermineTrap DrawColor = (R=128,G=128,B=128,A=255); Icon = Texture'UT3NightshadeTex.SpiderMine.Icon_SpiderMineTrap'; Scale = 0.5; End Object HUDItems(0) = HUDSpidermineTrap - Begin Object Class=HUDItem Name=HUDStasisField + Begin Object Class=UT3HUDItem Name=HUDStasisField DrawColor = (R=128,G=128,B=128,A=255); Icon = Texture'UT3NightshadeTex.SlowField.Icon_SlowFieldGenerator'; Scale = 0.5; End Object HUDItems(1) = HUDStasisField - Begin Object Class=HUDItem Name=HUDEMP + Begin Object Class=UT3HUDItem Name=HUDEMP DrawColor = (R=128,G=128,B=128,A=255); Icon = Texture'UT3NightshadeTex.EMPMine.Icon_EMPMine'; Scale = 0.5; End Object HUDItems(2) = HUDEMP - Begin Object Class=HUDItem Name=HUDShield + Begin Object Class=UT3HUDItem Name=HUDShield DrawColor = (R=128,G=128,B=128,A=255); Icon = Texture'UT3NightshadeTex.ShieldGenerator.Icon_ShieldGenerator'; Scale = 0.5; End Object HUDItems(3) = HUDShield - + // Damage. //DriverWeapons(0) = (WeaponClass=Class'Onslaught.ONSHoverBikePlasmaGun',WeaponBone="Turret_Pitch") DriverWeapons(0) = (WeaponClass=Class'Weap_UT3Nightshade',WeaponBone="Base"); @@ -862,24 +886,24 @@ DefaultProperties Mines(2) = none; Mines(3) = none; Mines(4) = none; - + // Sound. - IdleSound = Sound'UT3Nightshade.Sounds.Engine'; - StartUpSound = Sound'UT3Nightshade.Sounds.EngineStart'; - ShutDownSound = Sound'UT3Nightshade.Sounds.EngineStop'; - DeploySnd = Sound'UT3Nightshade.Sounds.ArmExtend'; - UndeploySnd = Sound'UT3Nightshade.Sounds.ArmRetract'; - SwitchDeployableSnd = Sound'UT3Nightshade.Sounds.SwitchDeployable'; - DropItemSnd = Sound'UT3Nightshade.Sounds.DropItem'; + IdleSound = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_EngineLoop01'; + StartUpSound = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_EngineStart01'; + ShutDownSound = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_EngineStop01'; + DeploySnd = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_ArmsExtend01'; + UndeploySnd = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_ArmsRetract01'; + SwitchDeployableSnd = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_SwitchDeployables'; + DropItemSnd = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_DropItem02'; MaxPitchSpeed = 1250; // 1000 - ImpactDamageSounds(0) = Sound'UT3Nightshade.Sounds.Impact01'; - ImpactDamageSounds(1) = Sound'UT3Nightshade.Sounds.Impact02'; - ImpactDamageSounds(2) = Sound'UT3Nightshade.Sounds.Impact01'; - ImpactDamageSounds(3) = Sound'UT3Nightshade.Sounds.Impact02'; - ImpactDamageSounds(4) = Sound'UT3Nightshade.Sounds.Impact01'; - ImpactDamageSounds(5) = Sound'UT3Nightshade.Sounds.Impact02'; - ImpactDamageSounds(6) = Sound'UT3Nightshade.Sounds.Impact01'; - + ImpactDamageSounds(0) = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_Impact01'; + ImpactDamageSounds(1) = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_Impact02'; + ImpactDamageSounds(2) = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_Impact01'; + ImpactDamageSounds(3) = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_Impact02'; + ImpactDamageSounds(4) = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_Impact01'; + ImpactDamageSounds(5) = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_Impact02'; + ImpactDamageSounds(6) = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_Impact01'; + // Movement. MaxThrustForce = 15.0; MaxStrafeForce = 15.0; @@ -910,15 +934,15 @@ DefaultProperties KMaxSpeed = MaxVisibleSpeed End Object KParams = KParams0; - + // AI. ObjectiveGetOutDist = 750.0; MaxDesireability = 0.5; - + // Checks. DeployCheckRadius = 1800.0; // 1440000.0 DeployCheckDistance = 375.0; // 375.0 - + // Misc. EntryRadius = 200.0; // 140.0 } diff --git a/Classes/UT3NightshadeBeamEffect.uc b/Classes/UT3NightshadeBeamEffect.uc new file mode 100644 index 0000000..0621173 --- /dev/null +++ b/Classes/UT3NightshadeBeamEffect.uc @@ -0,0 +1,46 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3NightshadeBeamEffect extends LinkBeamEffect; + +simulated function SetBeamLocation() +{ + // Only set the location, we get BeamStart from the nightshade. + SetLocation(StartEffect); +} diff --git a/Classes/UT3Paladin.uc b/Classes/UT3Paladin.uc index 29d7f53..807fa92 100644 --- a/Classes/UT3Paladin.uc +++ b/Classes/UT3Paladin.uc @@ -1,204 +1,273 @@ -/****************************************************************************** -UT3Paladin - -Creation date: 2008-05-02 20:51 -Last change since: Alpha 2 -Copyright (c) 2008, 2009, Wormbo and GreatEmerald -Copyright (c) 2012, José Luís '100GPing100' -******************************************************************************/ +/* + * Copyright © 2008-2009 Wormbo + * Copyright © 2008-2009, 2014 GreatEmerald + * Copyright © 2012, 2017 Luís 'zeluisping' Guimarães + * Copyright © 2017 HellDragon-HK + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ -/* NOTE: (by 100GPing100) +/* NOTE: (by zeluisping) * To increase the ground speed increase the radius of the * wheels. And make the BoneOffset's z component equal to * (WheelRadius - 30). - * + * * The real radius of the wheels is 30. */ class UT3Paladin extends ONSShockTank; -//=============== -// @100GPing100 -#exec obj load file=..\Animations\UT3PaladinAnims.ukx -#exec obj load file=..\Textures\UT3PaladinTex.utx -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\Engine.wav -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\EngineStart.wav -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\EngineStop.wav -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\Impact.wav -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\Explode0.wav -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\Explode1.wav -// @100GPing100 -//======END====== +#exec obj load file=../Animations/UT3PaladinAnims.ukx +#exec obj load file=../Textures/UT3PaladinTex.utx +#exec obj load file=../Sounds/UT3A_Vehicle_Paladin.uax //============================================================================= // Default values //============================================================================= - defaultproperties { - //=============== - // @100GPing100 - Mesh = SkeletalMesh'UT3PaladinAnims.Paladin'; - RedSkin = Shader'UT3PaladinTex.Paladin.PaladinSkin'; - BlueSkin = Shader'UT3PaladinTex.Paladin.PaladinSkinBlue'; - - DriverWeapons(0)=(WeaponClass=class'UT3PaladinCannon',WeaponBone=Body); - - FPCamPos = (X=-30,Y=0,Z=120); - FPCamViewOffset = (X=-100,Y=0,Z=0); - TPCamWorldOffset = (X=0,Y=0,Z=200); - TPCamDistance = 575; - - VehiclePositionString = "in a UT3 Paladin"; - SteerBoneName="Body" - - // Sound. - IdleSound = Sound'UT3Paladin.Sounds.Engine'; - StartUpSound = Sound'UT3Paladin.Sounds.EngineStart'; - ShutDownSound = Sound'UT3Paladin.Sounds.EngineStop'; - ExplosionSounds(0) = Sound'UT3Paladin.Sounds.Explode0'; - ExplosionSounds(1) = Sound'UT3Paladin.Sounds.Explode1'; - ExplosionSounds(2) = Sound'UT3Paladin.Sounds.Explode0'; - ExplosionSounds(3) = Sound'UT3Paladin.Sounds.Explode1'; - ExplosionSounds(4) = Sound'UT3Paladin.Sounds.Explode0'; - ImpactDamageSounds(0) = Sound'UT3Paladin.Sounds.Impact'; - ImpactDamageSounds(1) = Sound'UT3Paladin.Sounds.Impact'; - ImpactDamageSounds(2) = Sound'UT3Paladin.Sounds.Impact'; - ImpactDamageSounds(3) = Sound'UT3Paladin.Sounds.Impact'; - ImpactDamageSounds(4) = Sound'UT3Paladin.Sounds.Impact'; - ImpactDamageSounds(5) = Sound'UT3Paladin.Sounds.Impact'; - ImpactDamageSounds(6) = Sound'UT3Paladin.Sounds.Impact'; - - //HornSounds(0)=sound'ONSBPSounds.ShockTank.PaladinHorn' - //HornSounds(1)=sound'ONSVehicleSounds-S.Dixie_Horn' - - BaseEyeheight = 40; - Eyeheight = 40; - - Begin Object Class=SVehicleWheel Name=RWheel1 - BoneName = "RtTire01"; - SupportBoneName = "RtSuspension01"; - BoneOffset = (X=0.0,Y=35,Z=30.0); - SuspensionTravel = 60.0; - bPoweredWheel = true; - WheelRadius = 60; - - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - SupportBoneAxis=AXIS_X - SteerType=VST_Steered - End Object - Begin Object Class=SVehicleWheel Name=RWheel2 - BoneName = "RtTire02"; - SupportBoneName = "RtSuspension02"; - BoneOffset = (X=0.0,Y=35.0,Z=30.0); - SuspensionTravel = 60.0; - bPoweredWheel = true; - WheelRadius = 60; - - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - SupportBoneAxis=AXIS_X - SteerType=VST_Fixed - End Object - Begin Object Class=SVehicleWheel Name=RWheel3 - BoneName = "RtTire03"; - SupportBoneName = "RtSuspension03"; - BoneOffset = (X=0.0,Y=35.0,Z=30.0); - SuspensionTravel = 60.0; - bPoweredWheel = true; - WheelRadius = 60; - - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - SupportBoneAxis=AXIS_X - SteerType=VST_Fixed - End Object - Begin Object Class=SVehicleWheel Name=RWheel4 - BoneName = "RtTire04"; - SupportBoneName = "RtSuspension04"; - BoneOffset = (X=0.0,Y=35.0,Z=30.0); - SuspensionTravel = 60.0; - bPoweredWheel = true; - WheelRadius = 60; - - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - SupportBoneAxis=AXIS_X - SteerType=VST_Inverted - End Object - Begin Object Class=SVehicleWheel Name=LWheel1 - BoneName = "LtTire01"; - SupportBoneName = "LtSuspension01"; - BoneOffset = (X=0.0,Y=-35.0,Z=30.0); - SuspensionTravel = 60.0; - bPoweredWheel = true; - WheelRadius = 60; - - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - SupportBoneAxis=AXIS_X - SteerType=VST_Steered - End Object - Begin Object Class=SVehicleWheel Name=LWheel2 - BoneName = "LtTire02"; - SupportBoneName = "LtSuspension02"; - BoneOffset = (X=0.0,Y=-35.0,Z=30.0); - SuspensionTravel = 60.0; - bPoweredWheel = true; - WheelRadius = 60; - - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - SupportBoneAxis=AXIS_X - SteerType=VST_Fixed - End Object - Begin Object Class=SVehicleWheel Name=LWheel3 - BoneName = "LtTire03"; - SupportBoneName = "LtSuspension03"; - BoneOffset=(X=0.0,Y=-35.0,Z=30.0) - SuspensionTravel = 60.0; - bPoweredWheel = true; - WheelRadius = 60; - - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - SupportBoneAxis=AXIS_X - SteerType=VST_Fixed - End Object - Begin Object Class=SVehicleWheel Name=LWheel4 - BoneName = "LtTire04"; - SupportBoneName = "LtSuspension04"; - BoneOffset = (X=0.0,Y=-35.0,Z=30.0); - SuspensionTravel = 60.0; - bPoweredWheel = true; - WheelRadius = 60; - - BoneRollAxis=AXIS_Y - BoneSteerAxis=AXIS_Z - SupportBoneAxis=AXIS_X - SteerType=VST_Inverted - End Object - Wheels(0) = RWheel1; - Wheels(1) = RWheel2; - Wheels(2) = RWheel3; - Wheels(3) = RWheel4; - Wheels(4) = LWheel1; - Wheels(5) = LWheel2; - Wheels(6) = LWheel3; - Wheels(7) = LWheel4; - // @100GPing100 - //======END====== - - VehicleNameString = "UT3 Paladin" //GE: UT3 Paladin... - SteerSpeed=90 //Is steered more easily - ChassisTorqueScale=0.1 //Has a lower... setting of some kind - MaxBrakeTorque=75.000000 //And another, but this time higher - MaxSteerAngleCurve=(Points=((OutVal=20.000000),(InVal=700.000000,OutVal=15.000000)))//Again steered more easily - //EngineBrakeFactor=0.100000 //This makes it extremely easy to flip and have an accident - WheelInertia=0.750000 //Has more inertia - //GroundSpeed=1000.000000 //Is faster, GroundSpeed == deprecated? - //DriverWeapons(0)=(WeaponClass=class'UT3PaladinCannon',WeaponBone=CannonAttach);//Has a better shield + Mesh=SkeletalMesh'UT3PaladinAnims.Paladin'; + RedSkin=Shader'UT3PaladinTex.Paladin.PaladinSkin'; + BlueSkin=Shader'UT3PaladinTex.Paladin.PaladinSkinBlue'; + + DriverWeapons(0)=(WeaponClass=class'UT3PaladinCannon',WeaponBone="Turret_Yaw"); + + FPCamPos=(X=-30,Y=0,Z=120); + FPCamViewOffset=(X=-100,Y=0,Z=0); + TPCamWorldOffset=(X=0,Y=0,Z=200); + TPCamDistance=575; + + VehiclePositionString="in a UT3 Paladin"; + SteerBoneName="Body" + + // Sound. + IdleSound=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_EngineLoop01'; + StartUpSound=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Start01'; + ShutDownSound=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Stop01'; + DamagedEffectHealthSmokeFactor=0.65 //0.5 + DamagedEffectHealthFireFactor=0.37 //0.25 + DamagedEffectFireDamagePerSec=0.95 //0.75 + ExplosionSounds(0)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Explode01'; + ExplosionSounds(1)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Explode01'; + ExplosionSounds(2)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Explode01'; + ExplosionSounds(3)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Explode01'; + ExplosionSounds(4)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Explode01'; + ImpactDamageSounds(0)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Collide01'; + ImpactDamageSounds(1)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Collide01'; + ImpactDamageSounds(2)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Collide01'; + ImpactDamageSounds(3)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Collide01'; + ImpactDamageSounds(4)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Collide01'; + ImpactDamageSounds(5)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Collide01'; + ImpactDamageSounds(6)=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Collide01'; + + //HornSounds(0)=sound'ONSBPSounds.ShockTank.PaladinHorn' + //HornSounds(1)=sound'ONSVehicleSounds-S.Dixie_Horn' + + BaseEyeheight=40; + Eyeheight=40; + + Begin Object Class=SVehicleWheel Name=RWheel1 + BoneName="RtTire01"; + SupportBoneName="RtSuspension01"; + BoneOffset=(X=0.0,Y=35,Z=30.0); + SuspensionTravel=60.0; + bPoweredWheel=true; + WheelRadius=60; + + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + SupportBoneAxis=AXIS_X + SteerType=VST_Steered + End Object + Begin Object Class=SVehicleWheel Name=RWheel2 + BoneName="RtTire02"; + SupportBoneName="RtSuspension02"; + BoneOffset=(X=0.0,Y=35.0,Z=30.0); + SuspensionTravel=60.0; + bPoweredWheel=true; + WheelRadius=60; + + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + SupportBoneAxis=AXIS_X + SteerType=VST_Steered + End Object + Begin Object Class=SVehicleWheel Name=RWheel3 + BoneName="RtTire03"; + SupportBoneName="RtSuspension03"; + BoneOffset=(X=0.0,Y=35.0,Z=30.0); + SuspensionTravel=60.0; + bPoweredWheel=true; + WheelRadius=60; + + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + SupportBoneAxis=AXIS_X + SteerType=VST_Inverted + End Object + Begin Object Class=SVehicleWheel Name=RWheel4 + BoneName="RtTire04"; + SupportBoneName="RtSuspension04"; + BoneOffset=(X=0.0,Y=35.0,Z=30.0); + SuspensionTravel=60.0; + bPoweredWheel=true; + WheelRadius=60; + + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + SupportBoneAxis=AXIS_X + SteerType=VST_Inverted + End Object + Begin Object Class=SVehicleWheel Name=LWheel1 + BoneName="LtTire01"; + SupportBoneName="LtSuspension01"; + BoneOffset=(X=0.0,Y=-35.0,Z=30.0); + SuspensionTravel=60.0; + bPoweredWheel=true; + WheelRadius=60; + + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + SupportBoneAxis=AXIS_X + SteerType=VST_Steered + End Object + Begin Object Class=SVehicleWheel Name=LWheel2 + BoneName="LtTire02"; + SupportBoneName="LtSuspension02"; + BoneOffset=(X=0.0,Y=-35.0,Z=30.0); + SuspensionTravel=60.0; + bPoweredWheel=true; + WheelRadius=60; + + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + SupportBoneAxis=AXIS_X + SteerType=VST_Steered + End Object + Begin Object Class=SVehicleWheel Name=LWheel3 + BoneName="LtTire03"; + SupportBoneName="LtSuspension03"; + BoneOffset=(X=0.0,Y=-35.0,Z=30.0) + SuspensionTravel=60.0; + bPoweredWheel=true; + WheelRadius=60; + + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + SupportBoneAxis=AXIS_X + SteerType=VST_Inverted + End Object + Begin Object Class=SVehicleWheel Name=LWheel4 + BoneName="LtTire04"; + SupportBoneName="LtSuspension04"; + BoneOffset=(X=0.0,Y=-35.0,Z=30.0); + SuspensionTravel=60.0; + bPoweredWheel=true; + WheelRadius=60; + + BoneRollAxis=AXIS_Y + BoneSteerAxis=AXIS_Z + SupportBoneAxis=AXIS_X + SteerType=VST_Inverted + End Object + Wheels(0)=RWheel1; + Wheels(1)=RWheel2; + Wheels(2)=RWheel3; + Wheels(3)=RWheel4; + Wheels(4)=LWheel1; + Wheels(5)=LWheel2; + Wheels(6)=LWheel3; + Wheels(7)=LWheel4; + + VehicleNameString="UT3 Paladin" //GE: UT3 Paladin... + ImpactDamageMult=0.0003 + SteerSpeed=82 // Is steered more easily + ChassisTorqueScale=0.18 // Has a lower... setting of some kind + MinBrakeFriction=4.2 + MaxBrakeTorque=75.000000 // And another, but this time higher + MaxSteerAngleCurve=(Points=((OutVal=20.000000),(InVal=700.000000,OutVal=15.000000))) // Again, steered more easily +// EngineBrakeFactor=0.100000 // This makes it extremely easy to flip and have an accident + WheelInertia=0.750000 // Has more inertia + + GroundSpeed=700.000000 //Is faster, GroundSpeed == deprecated? + //DriverWeapons(0)=(WeaponClass=class'UT3PaladinCannon',WeaponBone=CannonAttach); // Has a better shield + + TurnDamping=25 //35 + TransRatio=0.030 //0.03 + ChangeUpPoint=2600 //2000 + + MomentumMult=0.1 //0.8 + + ExitPositions(0)=(X=0,Y=-250,Z=30) + ExitPositions(1)=(X=0,Y=250,Z=30) + ExitPositions(2)=(X=0,Y=-250,Z=-30) + ExitPositions(3)=(X=0,Y=250,Z=-30) + + Begin Object Class=KarmaParamsRBFull Name=KParams0 + KStartEnabled=True + KFriction=0.5 + KLinearDamping=0.05 + KAngularDamping=0.05 + KImpactThreshold=700 + KMaxSpeed=1200 + bKNonSphericalInertia=True + bHighDetailOnly=False + bClientOnly=False + bKDoubleTickRate=True + KInertiaTensor(0)=1.0 + KInertiaTensor(1)=0.0 + KInertiaTensor(2)=0.0 + KInertiaTensor(3)=3.0 + KInertiaTensor(4)=0.0 + KInertiaTensor(5)=3.0 + KCOMOffset=(X=-0.25,Y=0.0,Z=-1.35) + bDestroyOnWorldPenetrate=True + bDoSafetime=True + Name="KParams0" + End Object + KParams=KarmaParams'KParams0' + + HeadlightCoronaOffset(0)=(X=215.0,Y=34.5,Z=8.0) + HeadlightCoronaMaterial=Material'EmitterTextures.Flares.EFlareOY' + HeadlightCoronaMaxSize=92 + + HeadlightProjectorOffset=(X=200,Y=10,Z=8.0) + HeadlightProjectorRotation=(Yaw=0,Pitch=-1000,Roll=0) + HeadlightProjectorMaterial=Texture'VMVehicles-TX.NewPRVGroup.PRVProjector' + HeadlightProjectorScale=0.05 } diff --git a/Classes/UT3PaladinCannon.uc b/Classes/UT3PaladinCannon.uc index 5581000..744ff41 100644 --- a/Classes/UT3PaladinCannon.uc +++ b/Classes/UT3PaladinCannon.uc @@ -1,13 +1,45 @@ -//----------------------------------------------------------- -// UT3PaladinCannon.uc -// The main Paladin gun. -// Last change: Alpha 2 -// By GreatEmerald, 2009 -//----------------------------------------------------------- -class UT3PaladinCannon extends ONSShockTankCannon; +/* + * Copyright © 2009, 2014 GreatEmerald + * Copyright © 2012, 2017 Luís 'zeluisping' Guimarães + * Copyright © 2017 HellDragon-HK + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\Fire.wav -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\FireImpact.wav +class UT3PaladinCannon extends ONSShockTankCannon; /* Name of the shield's pitch bone. */ var name ShieldPitchBone; @@ -19,17 +51,15 @@ function ProximityExplosion() //Instant shock combo local Emitter ComboHit; ComboHit = Spawn(class'ONSShockTankShieldComboHit', self); - if ( Level.NetMode == NM_DedicatedServer ) - { - ComboHit.LifeSpan = 0.6; - } + if ( Level.NetMode == NM_DedicatedServer ) + { + ComboHit.LifeSpan = 0.6; + } AttachToBone(ComboHit, PitchBone); // @100GPing100: Changed bone name. ComboHit.SetRelativeLocation(vect(300,0,0)); SetTimer(0.1, false); } -//=============== -// @100GPing100 simulated function PostNetBeginPlay() { Super(ONSWeapon).PostNetBeginPlay(); @@ -38,7 +68,7 @@ simulated function PostNetBeginPlay() if (ShockShield != None) //AttachToBone(ShockShield, 'ElectroGun'); - AttachToBone(ShockShield, ShieldPitchBone); + AttachToBone(ShockShield, ShieldPitchBone); } function Timer() @@ -50,115 +80,112 @@ function Timer() function Tick(float DeltaTime) { - local Rotator Aim, NewAim, AimRotatorWorld, rot; - local float YawDelta, PitchDelta; - local vector AimVectorWorld, AimVectorLocal; - - Super.Tick(DeltaTime); - - // Apply pitch rotation to the shield arm too. - if (bForceCenterAim) - Aim = rot(0,0,0); - else - { - AimVectorWorld = CurrentHitLocation - WeaponFireLocation; - AimVectorWorld = Normal(AimVectorWorld); - AimRotatorWorld = Rotator(AimVectorWorld); - AimVectorLocal = AimVectorWorld >> Rotation; - Aim = Rotator(AimVectorLocal); - } - - NewAim.Yaw = 0; - NewAim.Pitch = 0; - NewAim.Roll = 0; - - YawDelta = ShortestAngularDelta(Aim.Yaw, CurrentAim.Yaw); - PitchDelta = ShortestAngularDelta(Aim.Pitch, CurrentAim.Pitch); - - NewAim = SmoothRotate(YawDelta, PitchDelta, CurrentAim, RotationsPerSecond, DeltaTime); - - rot.Pitch = -NewAim.Pitch; - rot.Yaw = 0; - rot.Roll = 0; - - SetBoneRotation(ShieldPitchBone, rot, 0, 1); + local Rotator Aim, NewAim, AimRotatorWorld, rot; + local float YawDelta, PitchDelta; + local vector AimVectorWorld, AimVectorLocal; + + Super.Tick(DeltaTime); + + // Apply pitch rotation to the shield arm too. + if (bForceCenterAim) + Aim = rot(0,0,0); + else + { + AimVectorWorld = CurrentHitLocation - WeaponFireLocation; + AimVectorWorld = Normal(AimVectorWorld); + AimRotatorWorld = Rotator(AimVectorWorld); + AimVectorLocal = AimVectorWorld >> Rotation; + Aim = Rotator(AimVectorLocal); + } + + NewAim.Yaw = 0; + NewAim.Pitch = 0; + NewAim.Roll = 0; + + YawDelta = ShortestAngularDelta(Aim.Yaw, CurrentAim.Yaw); + PitchDelta = ShortestAngularDelta(Aim.Pitch, CurrentAim.Pitch); + + NewAim = SmoothRotate(YawDelta, PitchDelta, CurrentAim, RotationsPerSecond, DeltaTime); + + rot.Pitch = -NewAim.Pitch; + rot.Yaw = 0; + rot.Roll = 0; + + SetBoneRotation(ShieldPitchBone, rot, 0, 1); } state ProjectileFireMode { - function Fire(Controller C) - { - Super.Fire(C); - - PlayAnim('Fire'); - } + function Fire(Controller C) + { + Super.Fire(C); + + PlayAnim('Fire'); + } } // From ONSWeapon.cpp function float ShortestAngularDelta(float EndAngle, float StartAngle) { - local float DeltaCW, DeltaCCW; - - DeltaCW = CWAngularDelta(EndAngle, StartAngle); - DeltaCCW = CCWAngularDelta(EndAngle, StartAngle); - - if (DeltaCW < 32768) - return DeltaCW; - else - return DeltaCCW; + local float DeltaCW, DeltaCCW; + + DeltaCW = CWAngularDelta(EndAngle, StartAngle); + DeltaCCW = CCWAngularDelta(EndAngle, StartAngle); + + if (DeltaCW < 32768) + return DeltaCW; + else + return DeltaCCW; } function float CCWAngularDelta(float EndAngle, float StartAngle) { - return -(ClampAngle(StartAngle - EndAngle)); + return -(ClampAngle(StartAngle - EndAngle)); } function float CWAngularDelta(float EndAngle, float StartAngle) { - return ClampAngle(EndAngle - StartAngle); + return ClampAngle(EndAngle - StartAngle); } function float ClampAngle(float Angle) { - //return (float)((int)Angle & 65536); - return Clamp(Angle, 0, 65536); + //return (float)((int)Angle & 65536); + return Clamp(Angle, 0, 65536); } function rotator SmoothRotate(float YawDelta, float PitchDelta, rotator CurrentRotation, float RPS, float deltaSeconds) { - local float AngularDistance; - local Rotator Aim; - - AngularDistance = ClampAngle(deltaSeconds * RPS * 65536); - - Aim.Yaw = CurrentRotation.Yaw + Clamp(YawDelta, -AngularDistance, AngularDistance); - Aim.Pitch = CurrentRotation.Pitch + Clamp(PitchDelta, -AngularDistance, AngularDistance); - Aim.Roll = 0; - - return Aim; + local float AngularDistance; + local Rotator Aim; + + AngularDistance = ClampAngle(deltaSeconds * RPS * 65536); + + Aim.Yaw = CurrentRotation.Yaw + Clamp(YawDelta, -AngularDistance, AngularDistance); + Aim.Pitch = CurrentRotation.Pitch + Clamp(PitchDelta, -AngularDistance, AngularDistance); + Aim.Roll = 0; + + return Aim; } -// @100GPing100 -//======END====== -DefaultProperties +defaultproperties { - //=============== - // @100GPing100 - Mesh = SkeletalMesh'UT3PaladinAnims.PaladinCannon'; - RedSkin = Shader'UT3PaladinTex.Paladin.PaladinSkin'; - BlueSkin = Shader'UT3PaladinTex.Paladin.PaladinSkinBlue'; - - FireSoundClass = Sound'UT3Paladin.Sounds.Fire'; - FireImpact = Sound'UT3Paladin.Sounds.FireImpact'; + Mesh=SkeletalMesh'UT3VH_Paladin_Anims.PaladinWeaponOnly'; + RedSkin=Shader'UT3PaladinTex.Paladin.PaladinSkin'; + BlueSkin=Shader'UT3PaladinTex.Paladin.PaladinSkinBlue'; + + FireSoundClass=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_Fire01'; + FireImpact=Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_FireImpact01'; //RotateSound=sound'ONSBPSounds.ShockTank.TurretHorizontal' - - YawBone=Turret_Yaw - PitchBone=Cannon_Pitch - ShieldPitchBone=Shield_Pitch - WeaponFireAttachmentBone=CannonBarrel - // @100GPing100 - //======END====== - - - MaxShieldHealth=1200.000000 //GE: Exact Copy-Paste of the UT3 code - MaxDelayTime=2.500000 //Increased - ShieldRechargeRate=350.000000 //Decreased - CurrentShieldHealth=1200.000000//Maximum Shield health is lower, but current is higher - ProjectileClass=class'UT3PaladinProjectile' + RotationsPerSecond=0.68 //0.18 + PitchUpLimit=9900 + PitchDownLimit=57500 + + YawBone=Turret_Yaw + PitchBone=Cannon_Pitch + ShieldPitchBone=Shield_Pitch + WeaponFireAttachmentBone=CannonBarrel + + + MaxShieldHealth=1200.000000 //GE: Exact Copy-Paste of the UT3 code + MaxDelayTime=2.500000 //Increased + ShieldRechargeRate=350.000000 //Decreased + CurrentShieldHealth=1200.000000//Maximum Shield health is lower, but current is higher + ProjectileClass=class'UT3PaladinProjectile' } diff --git a/Classes/UT3PaladinProjectile.uc b/Classes/UT3PaladinProjectile.uc index 54655f3..267dabd 100644 --- a/Classes/UT3PaladinProjectile.uc +++ b/Classes/UT3PaladinProjectile.uc @@ -8,7 +8,8 @@ class UT3PaladinProjectile extends ONSShockTankProjectile; DefaultProperties { - Damage=200.000000 //GE: Everything increased!! - DamageRadius=450.000000 - MomentumTransfer=200000.000000 + Damage=200.000000 //GE: Everything increased!! + DamageRadius=450.000000 + MomentumTransfer=200000.000000 + ComboSound=sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_ComboExplosion01' } diff --git a/Classes/UT3PaladinShield.uc b/Classes/UT3PaladinShield.uc index 7d3eeea..f2caa13 100644 --- a/Classes/UT3PaladinShield.uc +++ b/Classes/UT3PaladinShield.uc @@ -1,13 +1,44 @@ -//============================================================ -// UT3 Paladin Shield -// Copyright (c) 2012, José Luís '100GPing100' -// Contact: zeluis.100@gmail.com -//============================================================ -class UT3PaladinShield extends ONSShockTankShield; +/* + * Copyright © 2014 GreatEmerald + * Copyright © 2012 Luís 'zeluisping' Guimarães + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\ShieldActivate.wav -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\ShieldDeactivate.wav -#exec audio import group=Sounds file=..\Sounds\UT3Paladin\ShieldAmbient.wav +class UT3PaladinShield extends ONSShockTankShield; /* Sound played when the shield is actiavted. */ var Sound ShieldActivateSound; @@ -51,7 +82,7 @@ simulated function ActivateShield(byte TeamNum) if (ShockShieldEffect != None && Owner != None && ONSShockTankCannon(Owner) != None) Owner.AttachToBone(ShockShieldEffect, 'Shield_Pitch'); } - + AmbientSound = ShieldAmbientSound; } @@ -66,13 +97,13 @@ simulated function DeactivateShield() if (Level.NetMode != NM_DedicatedServer) PlaySound(ShieldDeactivateSound, SLOT_None, 2.0); } - + AmbientSound = None; } DefaultProperties { - ShieldActivateSound = Sound'UT3Paladin.Sounds.ShieldActivate'; - ShieldDeactivateSound = Sound'UT3Paladin.Sounds.ShieldDeactivate'; - ShieldAmbientSound = Sound'UT3Paladin.Sounds.ShieldAmbient'; + ShieldActivateSound = Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_ShieldActivate01'; + ShieldDeactivateSound = Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_ShieldOff01'; + ShieldAmbientSound = Sound'UT3A_Vehicle_Paladin.Sounds.A_Vehicle_Paladin_ShieldAmbient01'; } diff --git a/Classes/UT3Proj_ViperBolt.uc b/Classes/UT3Proj_ViperBolt.uc new file mode 100644 index 0000000..2d479a8 --- /dev/null +++ b/Classes/UT3Proj_ViperBolt.uc @@ -0,0 +1,113 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3Proj_ViperBolt extends ONSPlasmaProjectile; + +/* Sound played on impact and explosion. */ +var Sound ExplosionSound; +/* Number of times it can bounce before exploding. */ +var int Bounces; + + +simulated event HitWall(vector HitNormal, Actor HitWall) +{ + if (HitWall.bCanBeDamaged) { + Explode(Location, HitNormal); + } + + SetPhysics(PHYS_Falling); + if (Bounces > 0) { + PlaySound(ExplosionSound); + Velocity = 0.8 * (Velocity - 2.0 * HitNormal * (Velocity dot HitNormal)); + SetRotation(rotator(Velocity)); + Acceleration = AccelerationMagnitude * Normal(Velocity); + --Bounces; + } else { + Explode(Location, HitNormal); + } +} + +simulated function Explode(vector HitLocation, vector HitNormal) +{ + if (EffectIsRelevant(Location, false)) { + Spawn(HitEffectClass,,, HitLocation + HitNormal * 5, rotator(-HitNormal)); + } + + PlaySound(ExplosionSound); + + Destroy(); +} + +simulated function ProcessTouch(Actor Other, vector HitLocation) +{ + if (Other != Instigator && (Vehicle(Instigator) == None || Vehicle(Instigator).Driver != Other)) + { + Other.TakeDamage(Damage, Instigator, HitLocation, Normal(Velocity) * MomentumTransfer, MyDamageType); + Explode(HitLocation, Normal(HitLocation-Other.Location)); + } +} + + +DefaultProperties +{ + // Movement. + Speed=750.0; + MaxSpeed=7000; + AccelerationMagnitude=16000.0; + Bounces=3; + + // Damage. + Damage=36; + DamageRadius=0; + MomentumTransfer=4000; + //MyDamageType=class'DmgType_ViperBolt'; + + // Sound. + ExplosionSound=Sound'UT3A_Vehicle_Viper.Sounds.A_Vehicle_Viper_PrimaryFireImpact'; + + // Misc. + LifeSpan=1.6; + bBounce=true; + bFixedRotationDir=true; + + // Parent (to be changed). + HitEffectClass=class'Onslaught.ONSPlasmaHitPurple'; + PlasmaEffectClass=class'Onslaught.ONSPurplePlasmaSmallFireEffect'; +} diff --git a/Classes/UT3RagdollDummy.uc b/Classes/UT3RagdollDummy.uc new file mode 100644 index 0000000..0e30d74 --- /dev/null +++ b/Classes/UT3RagdollDummy.uc @@ -0,0 +1,63 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3RagdollDummy extends RagdollMadnessPawn; + +function Touch(Actor Other) +{ + Super(Pawn).Touch(Other); +} + +/*function Died (Controller Killer, Class DamageType, Vector HitLocation) +{ + log(self@"Died:"@Killer@DamageType@HitLocation@Physics@Controller@MyPawn); + Super.Died(Killer, DamageType, HitLocation); +} + +simulated function Destroyed () +{ + log(self@"Destroyed:"@Physics@Controller@MyPawn@MyPawn.Physics@MyPawn.Health@Level.TimeSeconds); + Super.Destroyed(); +}*/ + +defaultproperties +{ + RagdollHitKOTime = 0.0 + bHeadView = false +} diff --git a/Classes/UT3RagdollInventory.uc b/Classes/UT3RagdollInventory.uc new file mode 100644 index 0000000..1428b4e --- /dev/null +++ b/Classes/UT3RagdollInventory.uc @@ -0,0 +1,182 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3RagdollInventory extends RagdollInventory; + +simulated function StartRagdoll(float Duration, bool bForced) +{ + + local KarmaParamsSkel SkelParams; + local String RagSkelName; + local Controller C; + local PlayerController PC; + local xPawn P; + local vector PawnVel; + + + //log(self@"StartRagdoll: Start, DummyPawn"@DummyPawn@"Instigator"@Instigator@Instigator.Physics@Level.TimeSeconds); + if(Instigator.Health <= 0) + { + Destroy(); + return; + } + if(!bRagdolling) + { + P = xPawn(Instigator); + if(Instigator.DrivenVehicle != none) + Instigator.DrivenVehicle.KDriverLeave(true); + + Instigator.bOwnerNoSee = false; //just to update pawn's mesh so that it is turned in the right direction + Instigator.SetTwistLook(0,0); + + if(bPlayDeathSound) + Instigator.PlayDyingSound(); + C = Instigator.Controller; + if(C != none) + { + PC = PlayerController(C); + if(PC != none) + bLastBehindView = PC.bBehindView; + DummyPawn = Spawn(class'UT3RagdollDummy',Instigator,,Instigator.Location); + DummyPawn.MyPawn = Instigator; + DummyPawn.SetRotation(Instigator.Rotation); + //DummyPawn.SetOwner(Instigator); + //Instigator.AttachToBone(DummyPawn, 'righthand'); + C.UnPossess(); + Instigator.SetOwner(C); + C.Possess(DummyPawn); + Instigator.PlayerReplicationInfo = C.PlayerReplicationInfo; + if(PC != None && !class'UT3RagdollDummy'.default.bHeadView && !bLastBehindView) + PC.ToggleBehindView(); //Check after DummyPawn is possessed + } + C = none; + + if(P.RagdollOverride != "") + RagSkelName = P.RagdollOverride; + else + RagSkelName = P.Species.static.GetRagSkelName(P.GetMeshName()); + Instigator.KMakeRagdollAvailable(); + Instigator.bReplicateAnimations = false; + + if (!KIsRagdollAvailable()) + { + bRagdolling = true; + EndRagdoll(); + return; + } + skelParams = KarmaParamsSkel(Instigator.KParams); + skelParams.KSkeleton = RagSkelName; + PawnVel = Instigator.Velocity; + if(Instigator.Base != none) + PawnVel += Instigator.Base.Velocity; + skelParams.KStartLinVel = PawnVel; + //Instigator.KParams = skelParams; + + Instigator.KSetBlockKarma(true); + + Instigator.SetPhysics(PHYS_KarmaRagdoll); + + skelParams.bKImportantRagdoll = true; + + if (P.WeaponAttachment != None && WeaponMode != WM_Nothing) + { + if (bForced && WeaponMode == WM_Drop) + Instigator.TossWeapon(Vector(Instigator.Rotation)*250); + P.WeaponAttachment.Hide(true); + } + } + bRagdolling = true; + bForcedRagdoll = bForced; + if(Duration > 0.0) + RagdollTime = Level.TimeSeconds + Duration; + LastToggleTime = Level.TimeSeconds; + Instigator.bCanTeleport = false; + //log(self@"StartRagdoll: End, DummyPawn"@DummyPawn@DummyPawn.Physics@"Instigator"@Instigator@Instigator.Physics); + Enable('Tick'); + + for (C=Level.ControllerList;C!=None;C=C.NextController) + { + if(C != none && C.Enemy == Instigator) + C.Enemy = none; + } +} + +/*function Tick(float DeltaTime) +{ + if (bRagdolling && (DummyPawn == None || Instigator.Physics != PHYS_KarmaRagdoll)) + { + log(self@"Tick: We have lost the ragdoll! Bail out!!!"@DummyPawn==None@DummyPawn.Physics@Instigator@Instigator.Physics); + bForcedRagdoll = false; + EndRagdoll(); // GEm: This disables Tick, too + return; + } + Super.Tick(DeltaTime); +} + +function bool EndRagdoll() +{ + log(self@"EndRagdoll: DummyPawn"@DummyPawn@DummyPawn.Physics@"Instigator"@Instigator@Instigator.Physics); + return Super.EndRagdoll(); +}*/ + +function Destroyed() +{ + if ( DummyPawn != None ) + { + if (Instigator.Health > 0) + { + // GEm: Inventory is killed due to parent pawn getting axed in Karma's Excessive Joint Error. Needs a rewrite to fix. + warn(self@"Destroyed: Karma killed the ragdoll and took the player with it!"); + bForcedRagdoll = false; + EndRagdoll(); + } + DummyPawn.Destroy(); + } + Super(Inventory).Destroyed(); +} + +defaultproperties +{ + FeignDeathLimit = 1.0 + bPlayDeathSound = false + LandDamageScale = 0.0 + bNoWallDamage = true + bWaitForLowVel = true + WeaponMode = WM_Hide +} diff --git a/Classes/UT3Raptor.uc b/Classes/UT3Raptor.uc index 60cfdb6..dc1367a 100644 --- a/Classes/UT3Raptor.uc +++ b/Classes/UT3Raptor.uc @@ -1,27 +1,51 @@ -/****************************************************************************** -UT3Raptor - -Creation date: 2008-05-02 20:34 -Last change: Alpha 2 -Copyright (c) 2008 and 2009, Wormbo and GreatEmerald -Copyright (c) 2012 100GPing100 -******************************************************************************/ +/* + * Copyright © 2008-2009 Wormbo + * Copyright © 2008-2009, 2014 GreatEmerald + * Copyright © 2012 100GPing100 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3Raptor extends ONSAttackCraft; //=========================== // @100GPing100 -#exec obj load file=..\Animations\UT3RaptorAnims.ukx -#exec obj load file=..\Textures\UT3RaptorTex.utx - -#exec audio import group=Sounds file=..\Sounds\UT3Raptor\Engine.wav -#exec audio import group=Sounds file=..\Sounds\UT3Raptor\EngineStart.wav -#exec audio import group=Sounds file=..\Sounds\UT3Raptor\EngineStop.wav -#exec audio import group=Sounds file=..\Sounds\UT3Raptor\Impact01.wav -#exec audio import group=Sounds file=..\Sounds\UT3Raptor\Impact02.wav -#exec audio import group=Sounds file=..\Sounds\UT3Raptor\Explode.wav - +#exec obj load file=../Animations/UT3VH_Raptor_Anims.ukx +#exec obj load file=../Textures/UT3RaptorTex.utx /* Wing's rotation rate. */ var float WingsRPS; @@ -30,17 +54,28 @@ var Rotator WingsRotation; /* Current rudders' rotation. */ var Rotator RuddersRotation; +var int RudderYawContraint; + // // Called when spawned. // event PostBeginPlay() { - WingsRotation = rot(16384,0,0); - - SetBoneRotation('Rt_Wing', WingsRotation, 0, 1); - SetBoneRotation('Lft_Wing', WingsRotation, 0, 1); - - Super.PostBeginPlay(); + WingsRotation = rot(16384,0,0); + + SetBoneRotation('Rt_Wing', WingsRotation, 0, 1); + SetBoneRotation('Lft_Wing', WingsRotation, 0, 1); + + Super.PostBeginPlay(); +} + +simulated function PostNetBeginPlay() +{ + Super.PostNetBeginPlay(); + + if (Role == ROLE_Authority) + if (Weapons.Length == 2 && ONSLinkableWeapon(Weapons[0]) != None) + ONSLinkableWeapon(Weapons[0]).ChildWeapon = Weapons[1]; } // @@ -48,9 +83,9 @@ event PostBeginPlay() // function bool KDriverLeave(bool bForceLeave) { - SetTimer(0.05, true); - - return super.KDriverLeave(bForceLeave); + SetTimer(0.05, true); + + return super.KDriverLeave(bForceLeave); } // @@ -58,21 +93,21 @@ function bool KDriverLeave(bool bForceLeave) // event Timer() { - if (WingsRotation.Pitch < 16384) - { - WingsRotation.Pitch += WingsRPS * 0.05 * 100; - if (WingsRotation.Pitch > 16384) - { - WingsRotation.Pitch = 16384; - SetTimer(0, false); - } - } - - WingsRotation.Yaw = 0; - WingsRotation.Roll = 0; - - SetBoneRotation('Rt_Wing', WingsRotation, 0, 1); - SetBoneRotation('Lft_Wing', WingsRotation, 0, 1); + if (WingsRotation.Pitch < 16384) + { + WingsRotation.Pitch += WingsRPS * 0.05 * 100; + if (WingsRotation.Pitch > 16384) + { + WingsRotation.Pitch = 16384; + SetTimer(0, false); + } + } + + WingsRotation.Yaw = 0; + WingsRotation.Roll = 0; + + SetBoneRotation('Rt_Wing', WingsRotation, 0, 1); + SetBoneRotation('Lft_Wing', WingsRotation, 0, 1); } // @@ -80,11 +115,11 @@ event Timer() // function Tick(float DeltaTime) { - Super.Tick(DeltaTime); - - Wings(DeltaTime); - Rudders(DeltaTime); - Guns(); + Super.Tick(DeltaTime); + + Wings(DeltaTime); + Rudders(DeltaTime); + Guns(); } // @@ -92,31 +127,31 @@ function Tick(float DeltaTime) // function Wings(float DeltaTime) { - // 90º = 16384 RUU - if (OutputThrust > 0 && WingsRotation.Pitch < 16384) - { - WingsRotation.Pitch += WingsRPS * DeltaTime * 100; - if (WingsRotation.Pitch > 16384) - WingsRotation.Pitch = 16384; - } - else if (OutputThrust == 0 && WingsRotation.Pitch > 0) - { - WingsRotation.Pitch -= WingsRPS * DeltaTime * 100; - if (WingsRotation.Pitch < 0) - WingsRotation.Pitch = 0; - } - else if (OutputThrust < 0 && WingsRotation.Pitch > 0) - { - WingsRotation.Pitch -= WingsRPS * 2 * DeltaTime * 100; - if (WingsRotation.Pitch < 0) - WingsRotation.Pitch = 0; - } - - WingsRotation.Yaw = 0; - WingsRotation.Roll = 0; - - SetBoneRotation('Rt_Wing', WingsRotation, 0, 1); - SetBoneRotation('Lft_Wing', WingsRotation, 0, 1); + // 90° = 16384 RUU + if (OutputThrust > 0 && WingsRotation.Pitch < 16384) + { + WingsRotation.Pitch += WingsRPS * DeltaTime * 100; + if (WingsRotation.Pitch > 16384) + WingsRotation.Pitch = 16384; + } + else if (OutputThrust == 0 && WingsRotation.Pitch > 0) + { + WingsRotation.Pitch -= WingsRPS * DeltaTime * 100; + if (WingsRotation.Pitch < 0) + WingsRotation.Pitch = 0; + } + else if (OutputThrust < 0 && WingsRotation.Pitch > 0) + { + WingsRotation.Pitch -= WingsRPS * 2 * DeltaTime * 100; + if (WingsRotation.Pitch < 0) + WingsRotation.Pitch = 0; + } + + WingsRotation.Yaw = 0; + WingsRotation.Roll = 0; + + SetBoneRotation('Rt_Wing', WingsRotation, 0, 1); + SetBoneRotation('Lft_Wing', WingsRotation, 0, 1); } // @@ -124,47 +159,46 @@ function Wings(float DeltaTime) // function Rudders(float DeltaTime) { - // 30º ~= 5461 RUU - local Rotator NewRotation, NewDriverYaw; - - // Normalize Rotation and DriverViewYaw or we get weird values.. - SetRotation(Normalize(Rotation)); - NewDriverYaw.Yaw = DriverViewYaw; - DriverViewYaw = Normalize(NewDriverYaw).Yaw; - - // 3000 = The angle at which the angle of the rudders is of 30º - NewRotation.Yaw = 5461 * (Rotation.Yaw - DriverViewYaw) / 3000; - - // Limit the angle. - if (NewRotation.Yaw > 5461) - NewRotation.Yaw = 5461; - else if (NewRotation.Yaw < -5461) - NewRotation.Yaw = -5461; - - // Update rudders' rotation. - if (NewRotation.Yaw > 1000 || NewRotation.Yaw < -1000) - RuddersRotation.Yaw += 182 * DeltaTime * NewRotation.Yaw / 100; - else - { - // Not turning. - if (RuddersRotation.Yaw > 200) - RuddersRotation.Yaw -= 182 * DeltaTime * 30; - else if (RuddersRotation.Yaw < -200) - RuddersRotation.Yaw += 182 * DeltaTime * 30; - } - - // Limit the current angle. - if (RuddersRotation.Yaw > 5461) - RuddersRotation.Yaw = 5461; - else if (RuddersRotation.Yaw < -5461) - RuddersRotation.Yaw = -5461; - - RuddersRotation.Roll = 0; - RuddersRotation.Pitch = 0; - - // Apply the new rotation. - SetBoneRotation('Rudder_Rt', RuddersRotation, 0, 1); - SetBoneRotation('Rudder_left', RuddersRotation, 0, 1); + local Rotator NewRotation, NewDriverYaw; + + // Normalize Rotation and DriverViewYaw or we get weird values.. + SetRotation(Normalize(Rotation)); + NewDriverYaw.Yaw = DriverViewYaw; + DriverViewYaw = Normalize(NewDriverYaw).Yaw; + + // 3000 = The angle at which the angle of the rudders is of 30° + NewRotation.Yaw = RudderYawContraint * (Rotation.Yaw - DriverViewYaw) / 3000; + + // Limit the angle. + if (NewRotation.Yaw > RudderYawContraint) + NewRotation.Yaw = RudderYawContraint; + else if (NewRotation.Yaw < -RudderYawContraint) + NewRotation.Yaw = -RudderYawContraint; + + // Update rudders' rotation. + if (NewRotation.Yaw > 1000 || NewRotation.Yaw < -1000) + RuddersRotation.Yaw += 182 * DeltaTime * NewRotation.Yaw / 100; + else + { + // Not turning. + if (RuddersRotation.Yaw > 200) + RuddersRotation.Yaw -= 182 * DeltaTime * 30; + else if (RuddersRotation.Yaw < -200) + RuddersRotation.Yaw += 182 * DeltaTime * 30; + } + + // Limit the current angle. + if (RuddersRotation.Yaw > RudderYawContraint) + RuddersRotation.Yaw = RudderYawContraint; + else if (RuddersRotation.Yaw < -RudderYawContraint) + RuddersRotation.Yaw = -RudderYawContraint; + + RuddersRotation.Roll = 0; + RuddersRotation.Pitch = 0; + + // Apply the new rotation. + SetBoneRotation('Rudder_Rt', RuddersRotation, 0, 1); + SetBoneRotation('Rudder_left', RuddersRotation, 0, 1); } // @@ -172,12 +206,12 @@ function Rudders(float DeltaTime) // function Guns() { - local Rotator GunsRotation; - - GunsRotation.Pitch = -DriverViewPitch; - - SetBoneRotation('rt_gun', GunsRotation, 0, 1); - SetBoneRotation('left_gun', GunsRotation, 0, 1); + local Rotator GunsRotation; + + GunsRotation.Pitch = -DriverViewPitch; + + SetBoneRotation('rt_gun', GunsRotation, 0, 1); + SetBoneRotation('left_gun', GunsRotation, 0, 1); } // @@ -186,60 +220,60 @@ function Guns() // function Died(Controller Killer, class DmgType, Vector HitLocation) { - local int i; - - if (Level.NetMode != NM_DedicatedServer) - { - for (i = 0; i < TrailEffects.Length; i++) - TrailEffects[i].Destroy(); - TrailEffects.Length = 0; - } - Super(ONSChopperCraft).Died(Killer, DmgType, HitLocation); + local int i; + + if (Level.NetMode != NM_DedicatedServer) + { + for (i = 0; i < TrailEffects.Length; i++) + TrailEffects[i].Destroy(); + TrailEffects.Length = 0; + } + Super(ONSChopperCraft).Died(Killer, DmgType, HitLocation); } simulated function Destroyed() { - local int i; - - if (Level.NetMode != NM_DedicatedServer) - { - for (i = 0; i < TrailEffects.Length; i++) - TrailEffects[i].Destroy(); - TrailEffects.Length = 0; - } - Super(ONSChopperCraft).Destroyed(); + local int i; + + if (Level.NetMode != NM_DedicatedServer) + { + for (i = 0; i < TrailEffects.Length; i++) + TrailEffects[i].Destroy(); + TrailEffects.Length = 0; + } + Super(ONSChopperCraft).Destroyed(); } simulated event DrivingStatusChanged() { - local int i; - - if (bDriving && Level.NetMode != NM_DedicatedServer && !bDropDetail) - { + local int i; + + if (bDriving && Level.NetMode != NM_DedicatedServer && !bDropDetail) + { if (TrailEffects.Length == 0) { TrailEffects.Length = TrailEffectPositions.Length; - for(i=0;i> Rotation) ); - TrailEffects[i].SetBase(self); + for(i=0;i> Rotation) ); + TrailEffects[i].SetBase(self); TrailEffects[i].SetRelativeRotation( rot(0,32768,0) ); } - } + } } } else { if (Level.NetMode != NM_DedicatedServer) - { - for(i=0;i DamageType, float Momentum, vector HitLocation ) { - Damage=20.000000 //GE: We're weaker! Hooray! - AccelerationMagnitude=20000 //GE: And slower! - MomentumTransfer=4000.000000 - LifeSpan=1.600000 + local actor Victims; + local float damageScale, dist; + local vector dir; + + if ( bHurtEntry ) + return; + + bHurtEntry = true; + foreach VisibleCollidingActors( class 'Actor', Victims, DamageRadius, HitLocation ) + { + // don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag + if ((Victims != self) && (Victims != Instigator) && (Hurtwall != Victims) + && (Victims.Role == ROLE_Authority) && !Victims.IsA('FluidSurfaceInfo')) + { + dir = Victims.Location - HitLocation; + dist = FMax(1,VSize(dir)); + dir = dir/dist; + damageScale = 1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius); + if ( Instigator == None || Instigator.Controller == None ) + Victims.SetDelayedDamageInstigatorController( InstigatorController ); + if ( Victims == LastTouched ) + LastTouched = None; + Victims.TakeDamage + ( + damageScale * DamageAmount, + Instigator, + Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, + (damageScale * Momentum * dir), + DamageType + ); + if (Vehicle(Victims) != None && Vehicle(Victims).Health > 0) + Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation); + + } + } + if ( (LastTouched != None) && (LastTouched != self) && (LastTouched.Role == ROLE_Authority) && !LastTouched.IsA('FluidSurfaceInfo') ) + { + Victims = LastTouched; + LastTouched = None; + dir = Victims.Location - HitLocation; + dist = FMax(1,VSize(dir)); + dir = dir/dist; + damageScale = FMax(Victims.CollisionRadius/(Victims.CollisionRadius + Victims.CollisionHeight),1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius)); + if ( Instigator == None || Instigator.Controller == None ) + Victims.SetDelayedDamageInstigatorController(InstigatorController); + Victims.TakeDamage + ( + damageScale * DamageAmount, + Instigator, + Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, + (damageScale * Momentum * dir), + DamageType + ); + if (Vehicle(Victims) != None && Vehicle(Victims).Health > 0) + Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation); + } + + bHurtEntry = false; +}*/ + +defaultproperties +{ + Damage = 20.0 //GE: We're weaker! Hooray! + AccelerationMagnitude = 20000 //GE: And slower! + MomentumTransfer = 4000.0 + LifeSpan = 1.6 } diff --git a/Classes/UT3RaptorProjRed.uc b/Classes/UT3RaptorProjRed.uc index b46726d..1f82538 100644 --- a/Classes/UT3RaptorProjRed.uc +++ b/Classes/UT3RaptorProjRed.uc @@ -1,15 +1,110 @@ -//----------------------------------------------------------- -// UT3RaptorProjRed.uc -// UT3 Raptor Red Plasma Bolt -// Last Change: Alpha 2 -// GreatEmerald, 2009 -//----------------------------------------------------------- +/* + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3RaptorProjRed extends ONSAttackCraftPlasmaProjectileRed; -DefaultProperties +// GEm: Don't hurt the instigator? It does hurt, but as if the radius was super small +/*simulated function HurtRadius( float DamageAmount, float DamageRadius, class DamageType, float Momentum, vector HitLocation ) { - Damage=20.000000 //GE: We're weaker! Hooray! - AccelerationMagnitude=20000 //GE: And slower! - MomentumTransfer=4000.000000 - LifeSpan=1.600000 + local actor Victims; + local float damageScale, dist; + local vector dir; + + if ( bHurtEntry ) + return; + + bHurtEntry = true; + foreach VisibleCollidingActors( class 'Actor', Victims, DamageRadius, HitLocation ) + { + // don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag + if ((Victims != self) && (Victims != Instigator) && (Hurtwall != Victims) + && (Victims.Role == ROLE_Authority) && !Victims.IsA('FluidSurfaceInfo')) + { + dir = Victims.Location - HitLocation; + dist = FMax(1,VSize(dir)); + dir = dir/dist; + damageScale = 1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius); + if ( Instigator == None || Instigator.Controller == None ) + Victims.SetDelayedDamageInstigatorController( InstigatorController ); + if ( Victims == LastTouched ) + LastTouched = None; + Victims.TakeDamage + ( + damageScale * DamageAmount, + Instigator, + Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, + (damageScale * Momentum * dir), + DamageType + ); + if (Vehicle(Victims) != None && Vehicle(Victims).Health > 0) + Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation); + + } + } + if ( (LastTouched != None) && (LastTouched != self) && (LastTouched.Role == ROLE_Authority) && !LastTouched.IsA('FluidSurfaceInfo') ) + { + Victims = LastTouched; + LastTouched = None; + dir = Victims.Location - HitLocation; + dist = FMax(1,VSize(dir)); + dir = dir/dist; + damageScale = FMax(Victims.CollisionRadius/(Victims.CollisionRadius + Victims.CollisionHeight),1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius)); + if ( Instigator == None || Instigator.Controller == None ) + Victims.SetDelayedDamageInstigatorController(InstigatorController); + Victims.TakeDamage + ( + damageScale * DamageAmount, + Instigator, + Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, + (damageScale * Momentum * dir), + DamageType + ); + if (Vehicle(Victims) != None && Vehicle(Victims).Health > 0) + Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, InstigatorController, DamageType, Momentum, HitLocation); + } + + bHurtEntry = false; +}*/ + +defaultproperties +{ + Damage = 20.0 //GE: We're weaker! Hooray! + AccelerationMagnitude = 20000 //GE: And slower! + MomentumTransfer = 4000.0 + LifeSpan = 1.6 } diff --git a/Classes/UT3RaptorWeapon.uc b/Classes/UT3RaptorWeapon.uc index 379c8ab..cb905e0 100644 --- a/Classes/UT3RaptorWeapon.uc +++ b/Classes/UT3RaptorWeapon.uc @@ -1,15 +1,66 @@ -/****************************************************************************** -UT3RaptorWeapon +/* + * Copyright © 2008-2009 Wormbo + * Copyright © 2008-2009, 2014 GreatEmerald + * Copyright © 2012 100GPing100 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ -Creation date: 2008-05-02 20:34 -Last change: Alpha 2 -Copyright (c) 2008 and 2009, Wormbo and GreatEmerald -Copyright (c) 2012 100GPing100 -******************************************************************************/ - -class UT3RaptorWeapon extends ONSAttackCraftGun; +class UT3RaptorWeapon extends ONSLinkableWeapon; var(Sound) Sound HomingSound; +var bool bSkipFire; // GEm: Last shot was from this gun, let the other gun fire now + +var class TeamProjectileClasses[2]; +var float MinAim; + +function byte BestMode() +{ + local bot B; + + B = Bot(Instigator.Controller); + if ( B == None ) + return 0; + + if ( (Vehicle(B.Enemy) != None) + && (B.Enemy.bCanFly || B.Enemy.IsA('ONSHoverCraft')) && (FRand() < 0.3 + 0.1 * B.Skill) ) + return 1; + else + return 0; +} state ProjectileFireMode { @@ -60,14 +111,128 @@ state ProjectileFireMode } } -//=========================== -// @100GPing100 -#exec audio import group=Sounds file=..\Sounds\UT3Raptor\Fire.wav -#exec audio import group=Sounds file=..\Sounds\UT3Raptor\FireRocket.wav -#exec audio import group=Sounds file=..\Sounds\UT3Raptor\LockOn.wav -// @100GPing100 -//============EDN============ +event bool AttemptFire(Controller C, bool bAltFire) +{ + local bool bResult; + + if(Role != ROLE_Authority || bForceCenterAim) + return False; + + //Instigator.ClientMessage(self@"AttemptFire"@FireCountdown@bAltFire); + /*if (bSkipFire) + { + bSkipFire = false; + //Instigator.ClientMessage(self@"AttemptFire: Skipping"); + if (ChildWeapon != None) + return ChildWeapon.AttemptFire(C, bAltFire); + return false; + } + else + bSkipFire = true;*/ + //Instigator.ClientMessage(self@"AttemptFire: Firing"); + if (bSkipFire && UT3RaptorWeapon(ChildWeapon) != None) + { + bSkipFire = false; + bResult = UT3RaptorWeapon(ChildWeapon).ChildAttemptFire(C, bAltFire, FireCountdown); + if (FireCountdown <= 0 && bAltFire) + FireCountdown = AltFireInterval; + else if (FireCountdown <= 0) + FireCountdown = FireInterval; + return bResult; + } + else if (!bSkipFire) + bSkipFire = true; + + if (FireCountdown <= 0) + { + CalcWeaponFire(); + if (bCorrectAim) + WeaponFireRotation = AdjustAim(bAltFire); + if (Spread > 0) + WeaponFireRotation = rotator(vector(WeaponFireRotation) + VRand()*FRand()*Spread); + + //DualFireOffset *= -1; + + Instigator.MakeNoise(1.0); + if (bAltFire) + { + FireCountdown = AltFireInterval; + AltFire(C); + } + else + { + FireCountdown = FireInterval; + //Instigator.ClientMessage(self@"Fire"); + Fire(C); + } + AimLockReleaseTime = Level.TimeSeconds + FireCountdown * FireIntervalAimLock; + + /*if (ChildWeapon != None) + UT3RaptorWeapon(ChildWeapon).bSkipFire = false; + ChildWeapon.AttemptFire(C, bAltFire);*/ + + return True; + } + + return False; +} + +function bool ChildAttemptFire(Controller C, bool bAltFire, float RealCountdown) +{ + if (RealCountdown <= 0) + { + CalcWeaponFire(); + if (bCorrectAim) + WeaponFireRotation = AdjustAim(bAltFire); + if (Spread > 0) + WeaponFireRotation = rotator(vector(WeaponFireRotation) + VRand()*FRand()*Spread); + + //DualFireOffset *= -1; + Instigator.MakeNoise(1.0); + if (bAltFire) + AltFire(C); + else + Fire(C); + AimLockReleaseTime = Level.TimeSeconds + FireCountdown * FireIntervalAimLock; + + return True; + } + + return False; +} + +simulated function CalcWeaponFire() +{ + local coords WeaponBoneCoords; + local vector CurrentFireOffset; + local float DualFireHack; + + // GEm: Because I have no clue why both weapons fire from the same point + DualFireHack = DualFireOffset * (int(UT3RaptorWeapon(ChildWeapon) != None) * 2 - 1); + + // Calculate fire offset in world space + WeaponBoneCoords = GetBoneCoords(WeaponFireAttachmentBone); + CurrentFireOffset = (WeaponFireOffset * vect(1,0,0)) + (DualFireHack * vect(0,1,0)); + + // Calculate rotation of the gun + WeaponFireRotation = rotator(vector(CurrentAim) >> Rotation); + + // Calculate exact fire location + WeaponFireLocation = WeaponBoneCoords.Origin + (CurrentFireOffset >> WeaponFireRotation); + + // Adjust fire rotation taking dual offset into account + //if (bDualIndependantTargeting) + WeaponFireRotation.Pitch = rotator(CurrentHitLocation - WeaponFireLocation).Pitch; + + //local vector LogVec; + //Super.CalcWeaponFire(); + //LogVec = WeaponBoneCoords.Origin; + /*log(self@"CalcWeaponFire: WeaponBoneCoords" + @WeaponBoneCoords.Origin + @"WeaponFireLocation" + @WeaponFireLocation);*/ +} //============================================================================= // Default values @@ -75,25 +240,35 @@ state ProjectileFireMode defaultproperties { - //=========================== - // @100GPing100 - FireSoundClass = Sound'UT3Raptor.Sounds.Fire'; - AltFireSoundClass = Sound'UT3Raptor.Sounds.FireRocket'; - HomingSound = Sound'UT3Raptor.Sounds.LockOn'; - WeaponFireAttachmentBone = 'Fuselage'; - WeaponFireOffset = 150; - DualFireOffset = 35; - // @100GPing100 - //============EDN============ - FireInterval = 0.2 - AltFireInterval = 1.2 - ProjectileClass=class'UT3RaptorProjRed' + //=========================== + // @100GPing100 + FireSoundClass = Sound'UT3A_Vehicle_Raptor.Sounds.A_Vehicle_Raptor_Fire01'; + AltFireSoundClass = Sound'UT3A_Vehicle_Raptor.Sounds.A_Vehicle_Raptor_AltFire01_Dup'; + HomingSound = Sound'UT3A_Vehicle_Cicada.Sounds.A_Vehicle_Cicada_TargetLock01'; + Mesh = SkeletalMesh'UT3VH_Raptor_Anims.RaptorRightGunOnly' + RedSkin = Shader'UT3RaptorTex.RaptorSkin' + BlueSkin = Shader'UT3RaptorTex.RaptorSkinBlue' + PitchBone = 'rt_gun' + YawBone = 'rt_gun' + WeaponFireAttachmentBone = 'rt_gun'; + WeaponFireOffset = 115.0 //95.0 + DualFireOffset = 37.0 //15.0 + // @100GPing100 + //============EDN============ + FireInterval = 0.2 + AltFireInterval = 1.2 + ProjectileClass=class'UT3RaptorProjRed' TeamProjectileClasses(0)=class'UT3RaptorProjRed' TeamProjectileClasses(1)=class'UT3RaptorProjBlue' - RotationsPerSecond=0.11 //GE: Maybe too low? + RotationsPerSecond=0.51 //GE: Maybe too low? MinAim=0.930 AltFireProjectileClass=class'UT3RaptorRocket' //HomingSound=Sound'UT3Weapons2.Generic.LockOn' //FireSoundClass=sound'UT3Vehicles.RAPTOR.RaptorFire' //AltFireSoundClass=sound'UT3Vehicles.RAPTOR.RaptorAltFire' + PitchUpLimit = 18000 + PitchDownLimit = 49153 + //YawEndConstraint = 49153 + YawStartConstraint=-5000 + YawEndConstraint=5000 } diff --git a/Classes/UT3RaptorWeaponLeft.uc b/Classes/UT3RaptorWeaponLeft.uc new file mode 100644 index 0000000..2860d4d --- /dev/null +++ b/Classes/UT3RaptorWeaponLeft.uc @@ -0,0 +1,49 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3RaptorWeaponLeft extends UT3RaptorWeapon; + +defaultproperties +{ + bSkipFire = true //GEm: Essential, this lets the right gun fire first + Mesh = SkeletalMesh'UT3VH_Raptor_Anims.RaptorLeftGunOnly' + PitchBone = 'left_gun' + YawBone = 'left_gun' + WeaponFireAttachmentBone = 'left_gun'; +} diff --git a/Classes/UT3Scorpion.uc b/Classes/UT3Scorpion.uc index 2ac1ce1..346453b 100644 --- a/Classes/UT3Scorpion.uc +++ b/Classes/UT3Scorpion.uc @@ -1,54 +1,90 @@ -/****************************************************************************** -UT3Scorpion - -Creation date: 2008-05-02 20:51 -Since Alpha 2 -Copyright (c) 2008 and 2009, Wormbo and GreatEmerald -Copyright (c) 2012, 100GPing100 -******************************************************************************/ +/* + * Copyright © 2008, 2014 GreatEmerald + * Copyright © 2008-2009 Wormbo + * Copyright © 2012 100GPing100 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ class UT3Scorpion extends EONSScorpion; var IntBox BoostIconCoords, EjectIconCoords; -var float LastBoostAttempt; +var float LastBoostAttempt, SpeedAtBoost; +var() float MinEjectSpeed; +var int AirBoost; event KImpact(actor other, vector pos, vector impactVel, vector impactNorm) //Modified so we would have control over when we detonate { - if (bPrimed) - { - bImminentDestruction = true; + if (bPrimed) + { + bImminentDestruction = true; // if (Other != None && Other.IsA('ONSPRV')) // ImpactVel = vect(0,0,0); - Super(ONSRV).KImpact(Other, Pos, ImpactVel, ImpactNorm); - } - if (VSize(impactVel) > 1000 && bImminentDestruction) - { - ImpactVel /= 100; - if (Other != None && Other.IsA('ONSPRV')) - ImpactVel = vect(0,0,0); - SuperEjectDriver(); - HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location); - TakeDamage(SelfDestructDamage*3, Self, Location, vect(0,0,0), SelfDestructDamageType); - Super(ONSRV).KImpact(Other, Pos, ImpactVel, ImpactNorm); - } + Super(ONSRV).KImpact(Other, Pos, ImpactVel, ImpactNorm); + } + if (VSize(impactVel) > MinEjectSpeed && bImminentDestruction) + { + ImpactVel /= 100; + if (Other != None && Other.IsA('ONSPRV')) + ImpactVel = vect(0,0,0); + SuperEjectDriver(); + HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location); + TakeDamage(SelfDestructDamage*3, Self, Location, vect(0,0,0), SelfDestructDamageType); + Super(ONSRV).KImpact(Other, Pos, ImpactVel, ImpactNorm); + } } simulated function DrawHUD(Canvas C) { - local PlayerController PC; - - Super.DrawHUD(C); - - // don't draw if we are dead, scoreboard is visible, etc - PC = PlayerController(Controller); - if (Health < 1 || PC == None || PC.myHUD == None || PC.MyHUD.bShowScoreboard ) - return; - - // draw tooltips - /*if (BoostCount > 0 && !bBoost) //GE: BoostCount > 0 == bReadyToBoost ;) - class'UT3HudOverlay'.static.DrawToolTip(C, PC, "Jump", C.ClipX*0.5, C.ClipY * 0.92, BoostIconCoords); - else - class'UT3HudOverlay'.static.DrawToolTip(C, PC, "Jump", C.ClipX*0.5, C.ClipY * 0.92, EjectIconCoords);*/ + local PlayerController PC; + + Super.DrawHUD(C); + + // don't draw if we are dead, scoreboard is visible, etc + PC = PlayerController(Controller); + if (Health < 1 || PC == None || PC.myHUD == None || PC.MyHUD.bShowScoreboard + || VSize(Velocity) <= 0) + return; + + // draw tooltips + // GEm: FIXME: UT3HudOverlay should be in UT3HUD.u (used by both UT3Style and UT3Vehicles) + if (Gear > 1 && BoostCount > 0 && !bBoost) //GE: BoostCount > 0 == bReadyToBoost ;) + class'UT3HudOverlay'.static.DrawToolTip(C, PC, "Jump", C.ClipX*0.5, C.ClipY * 0.92, BoostIconCoords); + else if (bBoost && (Velocity dot Vector(Rotation)) >= MinEjectSpeed) + class'UT3HudOverlay'.static.DrawToolTip(C, PC, "Use", C.ClipX*0.5, C.ClipY * 0.92, EjectIconCoords); } simulated function Tick(float DT) @@ -59,62 +95,61 @@ simulated function Tick(float DT) Super(ONSWheeledCraft).Tick(DT); - if (Role == ROLE_Authority && IsHumanControlled() && Rise > 0 && Level.TimeSeconds - LastBoostAttempt > 1) - { - Boost(); - LastBoostAttempt = Level.TimeSeconds; - } - - //If bImminentDestruction, then we have already primed the detonator and hit something - We detonate here because detonating in KImpact seemed to cause General Protection Faults in some circumstances - if (bImminentDestruction) - { - GoToState('Ejecting'); //GE: Eject + delay + explosion - return; - } - - //If bAfterburnersOn and boost state don't agree - if (bBoost != bAfterburnersOn) - { - // it means we need to change the state of the vehicle (bAfterburnersOn) - // to match the desired state (bBoost) - EnableAfterburners(bBoost); // show/hide afterburner smoke - - // if we just enabled afterburners, set the timer - // to turn them off after set time has expired - if (bBoost) - { - SetTimer(BoostTime, false); - } - } - - if (Role == ROLE_Authority) - { - // Afterburners recharge after the change in time exceeds the specified charge duration - BoostRechargeCounter+=DT; - if (BoostRechargeCounter > BoostRechargeTime) - { - if (BoostCount < 1) - { - BoostCount++; - if( PlayerController(Controller) != None) - { - PlayerController(Controller).ClientPlaySound(BoostReadySound,,,SLOT_Misc); - } - //PlaySound(BoostReadySound, SLOT_Misc,128); + if (Role == ROLE_Authority && IsHumanControlled() && Rise > 0 + && Level.TimeSeconds - LastBoostAttempt > 1 && Gear > 1) + { + Boost(); + LastBoostAttempt = Level.TimeSeconds; + } + + //If bImminentDestruction, then we have already primed the detonator and hit something - We detonate here because detonating in KImpact seemed to cause General Protection Faults in some circumstances + if (bImminentDestruction) + { + GoToState('Ejecting'); //GE: Eject + delay + explosion + return; + } + + //If bAfterburnersOn and boost state don't agree + if (bBoost != bAfterburnersOn) + { + // it means we need to change the state of the vehicle (bAfterburnersOn) + // to match the desired state (bBoost) + EnableAfterburners(bBoost); // show/hide afterburner smoke + + // if we just enabled afterburners, set the timer + // to turn them off after set time has expired + if (bBoost) + { + SetTimer(BoostTime, false); + } + } + + if (Role == ROLE_Authority) + { + // Afterburners recharge after the change in time exceeds the specified charge duration + BoostRechargeCounter+=DT; + if (BoostRechargeCounter > BoostRechargeTime) + { + if (BoostCount < 1) + { + BoostCount++; + if( PlayerController(Controller) != None) + PlayerController(Controller).ClientPlaySound(BoostReadySound,,,SLOT_Misc); + //PlaySound(BoostReadySound, SLOT_Misc,128); + } + BoostRechargeCounter = 0; } - BoostRechargeCounter = 0; - } - } - //======================= - // @100GPing100 - // Left Blade Arm System + } + //======================= + // @100GPing100 + // Left Blade Arm System if (Role == ROLE_Authority && bWeaponIsAltFiring && !bLeftArmBroke) { //ArmBaseCoords = GetBoneCoords('CarLShoulder'); //ArmTipCoords = GetBoneCoords('LeftBladeDummy'); - ArmBaseCoords = GetBoneCoords('Blade_L1'); - ArmTipCoords = GetBoneCoords('Blade_L2'); - ArmTipCoords.Origin += vect(0,50,0) >> Rotation; + ArmBaseCoords = GetBoneCoords('Blade_L1'); + ArmTipCoords = GetBoneCoords('Blade_L2'); + ArmTipCoords.Origin += vect(0,50,0) >> Rotation; Victim = Trace(HitLocation, HitNormal, ArmTipCoords.Origin, ArmBaseCoords.Origin); if (Victim != None && Victim.bBlockActors) @@ -126,7 +161,7 @@ simulated function Tick(float DT) bLeftArmBroke = True; bClientLeftArmBroke = True; BladeBreakOff(4, 'Blade_L2', class'ONSRVLeftBladeBreakOffEffect'); - // We use slot 4 here because slots 0-3 can be used by BigWheels mutator. + // We use slot 4 here because slots 0-3 can be used by BigWheels mutator. } } } @@ -142,9 +177,9 @@ simulated function Tick(float DT) { //ArmBaseCoords = GetBoneCoords('CarRShoulder'); //ArmTipCoords = GetBoneCoords('RightBladeDummy'); - ArmBaseCoords = GetBoneCoords('Blade_R1'); - ArmTipCoords = GetBoneCoords('Blade_R2'); - ArmTipCoords.Origin += vect(0,50,0) >> Rotation; + ArmBaseCoords = GetBoneCoords('Blade_R1'); + ArmTipCoords = GetBoneCoords('Blade_R2'); + ArmTipCoords.Origin += vect(0,50,0) >> Rotation; Victim = Trace(HitLocation, HitNormal, ArmTipCoords.Origin, ArmBaseCoords.Origin); if (Victim != None && Victim.bBlockActors) @@ -165,64 +200,65 @@ simulated function Tick(float DT) bClientRightArmBroke = False; BladeBreakOff(5, 'Blade_R2', class'ONSRVRightBladeBreakOffEffect'); } - // @100GPing100 - //==========END========== + // @100GPing100 + //==========END========== } simulated state Ejecting { Begin: - SuperEjectDriver(); - Sleep(1.0); - HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location); - TakeDamage(SelfDestructDamage*3, Self, Location, vect(0,0,0), SelfDestructDamageType); + SuperEjectDriver(); + Sleep(1.0); + HurtRadius(SelfDestructDamage, SelfDestructDamageRadius, SelfDestructDamageType, SelfDestructMomentum, Location); + TakeDamage(SelfDestructDamage*3, Self, Location, vect(0,0,0), SelfDestructDamageType); } event Touch(actor Other) { if (Other.IsA('Vehicle')) { - Super.Touch(Other); - if (bPrimed) - { - bImminentDestruction = true; - } + Super.Touch(Other); + if (bPrimed) + bImminentDestruction = true; } } function Boost() { - //If we're already boosting, then prime the detonator - /*if (bBoost) - { - bImminentDestruction = true; - PlaySound(BoostReadySound, SLOT_Misc, 128,,,160); - }*/ - - // If we have a boost ready and we're not currently using it - //log("UT3: Entering Boost!"); - //log("UT3: BoostRechargeTime: "@BoostRechargeTime); - //log("UT3: BoostRechargeCounter: "@BoostRechargeCounter); + //If we're already boosting, then prime the detonator + /*if (bBoost) + { + bImminentDestruction = true; + PlaySound(BoostReadySound, SLOT_Misc, 128,,,160); + }*/ + + // If we have a boost ready and we're not currently using it + //log("UT3: Entering Boost!"); + //log("UT3: BoostRechargeTime: "@BoostRechargeTime); + //log("UT3: BoostRechargeCounter: "@BoostRechargeCounter); if (BoostCount > 0 && !bBoost) - { - //log("UT3: Boosting!"); - BoostRechargeCounter=0; - PlaySound(BoostSound, SLOT_Misc, 128,,,64); //Boost sound Pitch 160 - bBoost = true; - BoostCount--; - } - else { - //log("UT3: Kamikadze!"); - bImminentDestruction = true; - PlaySound(BoostReadySound, SLOT_Misc, 128,,,160); - } + { + //log("UT3: Boosting!"); + BoostRechargeCounter=0; + PlaySound(BoostSound, SLOT_Misc, 128,,,64); //Boost sound Pitch 160 + bBoost = true; + BoostCount--; + SpeedAtBoost = Velocity dot Vector(Rotation); + AirBoost = int(!bVehicleOnGround); + } + /*else if ((Velocity dot Vector(Rotation)) >= MinEjectSpeed) + { + //log("UT3: Kamikadze!"); + bImminentDestruction = true; + PlaySound(BoostReadySound, SLOT_Misc, 128,,,160); + }*/ } /*function VehicleFire(bool bWasAltFire) { - if (bWasAltFire) - { - Boost(); - } + if (bWasAltFire) + { + Boost(); + } else Super(ONSWheeledCraft).VehicleFire(bWasAltFire); //So we wouldn't shoot when boosting }*/ @@ -231,7 +267,7 @@ function VehicleFire(bool bWasAltFire) { if (bWasAltFire) { - // Boost(); + // Boost(); PlayAnim('Blades_out'); if (!bLeftArmBroke || !bRightArmBroke) { @@ -246,7 +282,7 @@ function VehicleFire(bool bWasAltFire) function AltFire(optional float F) { - //avoid sending altfire to weapon + //avoid sending altfire to weapon Super(Vehicle).AltFire(F); } @@ -288,10 +324,220 @@ function VehicleCeaseFire(bool bWasAltFire) Super.VehicleCeaseFire(bWasAltFire); } -//======================= -// @100GPing100 -// @100GPing100 -//==========END========== +function SuperEjectDriver() +{ + local Pawn OldPawn; + local Vector EjectVel; + + OldPawn = Driver; + KDriverLeave(True); + if (OldPawn == None) + return; + + EjectVel = VRand(); + EjectVel.Z = 0.0; + EjectVel = (Normal(EjectVel) * 0.2 + vect(0.00,0.00,1.00)) * EjectMomentum; + OldPawn.Velocity = EjectVel; + OldPawn.SpawnTime = Level.TimeSeconds; + OldPawn.PlayTeleportEffect(False,False); +} + +function bool KDriverLeave(bool bForceLeave) +{ + if (Role == ROLE_Authority && IsHumanControlled() && !bForceLeave && bBoost + && (Velocity dot Vector(Rotation) >= MinEjectSpeed)) + { + bImminentDestruction = true; + PlaySound(BoostReadySound, SLOT_Misc, 128,,,160); + return false; + } + return Super.KDriverLeave(bForceLeave); +} + +// GEm: Don't hurt the instigator +simulated function HurtRadius( float DamageAmount, float DamageRadius, class DamageType, float Momentum, vector HitLocation ) +{ + local actor Victims; + local float damageScale, dist; + local vector dir; + + if( bHurtEntry ) + return; + + bHurtEntry = true; + foreach VisibleCollidingActors( class 'Actor', Victims, DamageRadius, HitLocation ) + { + // don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag + if( (Victims != self) && (Victims != Instigator) && (Victims.Role == ROLE_Authority) && (!Victims.IsA('FluidSurfaceInfo')) ) + { + dir = Victims.Location - HitLocation; + dist = FMax(1,VSize(dir)); + dir = dir/dist; + damageScale = 1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius); + Victims.TakeDamage + ( + damageScale * DamageAmount, + Instigator, + Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, + (damageScale * Momentum * dir), + DamageType + ); + if (Instigator != None && Vehicle(Victims) != None && Vehicle(Victims).Health > 0) + Vehicle(Victims).DriverRadiusDamage(DamageAmount, DamageRadius, Instigator.Controller, DamageType, Momentum, HitLocation); + } + } + bHurtEntry = false; +} + +// GEm: Take 150% damage while boosting, 200% damage while detonating +// GEm: TODO: Add Denied! announcement +function TakeDamage (int Damage, Pawn instigatedBy, Vector HitLocation, Vector Momentum, Class DamageType) +{ + if ( bBoost && (instigatedBy != None) && (instigatedBy != self) ) + { + if (Driver == None) + Damage *= 2.0; + else + Damage *= 1.5; + } + Super(ONSRV).TakeDamage(Damage,instigatedBy,HitLocation,Momentum,DamageType); +} + +simulated function EnableAfterburners(bool bEnable) +{ + if (bEnable) + { + SteerSpeed *= 0.2; + if (Level.NetMode != NM_DedicatedServer) + { + AnimBlendParams(1, 1.0, , , 'Booster_Main2'); + PlayAnim('boosters_out', 1.0, 0.0, 1); + Afterburner[0] = Spawn(AfterburnerClass[Team],self,,Location + (AfterburnerOffset[0] >> Rotation)); + Afterburner[0].SetBase(self); + Afterburner[0].SetRelativeRotation(AfterburnerRotOffset[0]); + Afterburner[1] = Spawn(AfterburnerClass[Team],self,,Location + (AfterburnerOffset[1] >> Rotation)); + Afterburner[1].SetBase(self); + Afterburner[1].SetRelativeRotation(AfterburnerRotOffset[1]); + } + } + else + { + SteerSpeed /= 0.2; + if (Level.NetMode != NM_DedicatedServer) + { + if (Afterburner[0] != None) + { + Afterburner[0].Destroy(); + } + if (Afterburner[1] != None) + { + Afterburner[1].Destroy(); + } + AnimBlendParams(1, 1.0, , , 'Booster_Main2'); + PlayAnim('boosters_in', 1.0, 0.0, 1); + } + } + bAfterburnersOn = bEnable; +} + +simulated event KApplyForce(out Vector Force, out Vector Torque) +{ + Super(ONSRV).KApplyForce(Force, Torque); + // GEm: In UT3 it boosts in the air as well, but increasing force causes antigrav in UT2004 + if (bBoost && (bVehicleOnGround || AirBoost > 0)) + { + Force += Vector(Rotation); + Force += Normal(Force) * FMax(BoostForce * FMin(SpeedAtBoost/700.0, 1.0), 1.0); + if (AirBoost > 0) + AirBoost++; + if (AirBoost > 6) + AirBoost = 0; + } +} + +function DriverLeft() +{ + GoToState(''); + PlayAnim('hatch_open', 1.0, 0.1); + + Super.DriverLeft(); +} + +event PostBeginPlay() +{ + PlayAnim('hatch_open_Idle', 1.0, 0.0); + + super.PostBeginPlay(); +} + +event KDriverEnter(Pawn P) +{ + GoToState('Idle'); + + super.KDriverEnter(P); +} + +simulated state Idle +{ + Begin: + PlayAnim('hatch_close', 1.0, 0.0); + FinishAnim(); + LoopAnim('Idle', 1.0, 0.0); +} + +// GEm: Gosh darn it Epic and your hardcoded classes +simulated event DrivingStatusChanged() +{ + local int i; + local Coords WheelCoords; + + Super(ONSVehicle).DrivingStatusChanged(); + + if (bDriving && Level.NetMode != NM_DedicatedServer && !bDropDetail) + { + Dust.length = Wheels.length; + for(i=0; i> Rotation)); + Dust[i].SetBase(self); + Dust[i].SetDirtColor( Level.DustColor ); + } + + if(bMakeBrakeLights) + { + for(i=0; i<2; i++) + if (BrakeLight[i] == None) + { + BrakeLight[i] = spawn(class'ONSBrakelightCorona', self,, Location + (BrakeLightOffset[i] >> Rotation) ); + BrakeLight[i].SetBase(self); + BrakeLight[i].SetRelativeRotation( rot(0,32768,0) ); // Point lights backwards. + BrakeLight[i].Skins[0] = BrakeLightMaterial; + } + } + } + else + { + if (Level.NetMode != NM_DedicatedServer) + { + for(i=0; i ProjectileEffectClass2; @@ -88,7 +122,7 @@ simulated function ProcessTouch (Actor Other, vector HitLocation) //GE: For refl } } -/*simulated function Timer() //GE: This function gives us some odd warnings +simulated function Timer() //GE: This function gives us some odd warnings { //local Vehicle Other; local Controller C, NextC; @@ -102,52 +136,58 @@ simulated function ProcessTouch (Actor Other, vector HitLocation) //GE: For refl //Instead of using ForEach VisibleCollidingActors, lets traverse the Controller List, it may be faster //ForEach VisibleCollidingActors(class'Vehicle',Other,FlyingDamageRadius) while (C != None) { - NextC = C.NextController; - - //If the controller's pawn is a vehicle (that isn't the vehicle shooting this projectile) of a certain type, - //isn't dead, isn't on our team, is within the range of being struck, and has a clear path to being zapped - //then zap it. - if ( C.Pawn != None && Vehicle(C.Pawn) != None && C.Pawn != Instigator && C.Pawn.Health > 0 && !C.SameTeamAs(Instigator.Controller) && VSize(C.Pawn.Location - Self.Location) < FlyingDamageRadius && FastTrace(C.Pawn.Location, Self.Location) && (Vehicle(C.Pawn).IsA('ONSHoverBike') || Vehicle(C.Pawn).IsA('ONSAttackCraft') || Vehicle(C.Pawn).IsA('ONSDualAttackCraft') || Vehicle(C.Pawn).IsA('ONSHoverCraft') ) ) - { - if ( Role == ROLE_Authority ) - { - if (C.Pawn.Health < 100 && C.Pawn.Health > 25) - { - TempDamage = Max(1,(C.Pawn.Health - 25)); - C.Pawn.TakeDamage( TempDamage, Instigator, C.Pawn.Location, Normal(Location-C.Pawn.Location), MyDamageType); - Vehicle(C.Pawn).DriverRadiusDamage( (TempDamage/3)+Rand(10), DamageRadius, Instigator.Controller, MyDamageType, MomentumTransfer, (C.Pawn.Location + VRand()*30) ); //We may need to change Hitlocation to Other.Location - Vehicle(C.Pawn).EjectDriver(); - bZap = true; - } - else - { - C.Pawn.TakeDamage(Damage, Instigator, C.Pawn.Location, Normal(Location-C.Pawn.Location), MyDamageType); - Vehicle(C.Pawn).DriverRadiusDamage( (Damage/3)+Rand(10), DamageRadius, Instigator.Controller, MyDamageType, MomentumTransfer, C.Pawn.Location ); - bZap = true; - } - - //Log("Applying damage to nearby vehicle: "$(FlyingDamageRadius-(VSize(Location-Other.Location))) * Default.FlyingDamage/FlyingDamageRadius); - } - - //Once this projectile has zapped something, draw the zap and then the projectile goes away. - if (bZap) - { - HitEmitter = spawn(HitEmitterClass,,, Self.Location, rotator(C.Pawn.Location - Self.Location)); - if (HitEmitter != None) - HitEmitter.mSpawnVecA = C.Pawn.Location; - C.Pawn.PlaySound(ImpactSound,,4*TransientSoundVolume); - Self.Destroy(); - } - } - - C = NextC; - } - - if (Velocity.Z > -1000) - { - Velocity.Z -= 60; - } -} */ + NextC = C.NextController; + + //If the controller's pawn is a vehicle (that isn't the vehicle shooting this projectile) of a certain type, + //isn't dead, isn't on our team, is within the range of being struck, and has a clear path to being zapped + //then zap it. + if ( C.Pawn != None && Vehicle(C.Pawn) != None && Instigator != None && C.Pawn != Instigator && C.Pawn.Health > 0 && !C.SameTeamAs(Instigator.Controller) && VSize(C.Pawn.Location - Location) < FlyingDamageRadius && FastTrace(C.Pawn.Location, Location) && (Vehicle(C.Pawn).IsA('ONSHoverBike') || Vehicle(C.Pawn).IsA('ONSAttackCraft') || Vehicle(C.Pawn).IsA('ONSDualAttackCraft') || Vehicle(C.Pawn).IsA('ONSHoverCraft') ) ) + { + if ( Role == ROLE_Authority ) + { + if (C.Pawn.Health < 100 && C.Pawn.Health > 25) + { + TempDamage = Max(1,(C.Pawn.Health - 25)); + C.Pawn.TakeDamage( TempDamage, Instigator, C.Pawn.Location, Normal(Location-C.Pawn.Location), MyDamageType); + if (C.Pawn != None) + Vehicle(C.Pawn).DriverRadiusDamage( (TempDamage/3)+Rand(10), DamageRadius, Instigator.Controller, MyDamageType, MomentumTransfer, (C.Pawn.Location + VRand()*30) ); //We may need to change Hitlocation to Other.Location + if (C.Pawn != None) + Vehicle(C.Pawn).EjectDriver(); + bZap = true; + } + else + { + C.Pawn.TakeDamage(Damage, Instigator, C.Pawn.Location, Normal(Location-C.Pawn.Location), MyDamageType); + if (C.Pawn != None) + Vehicle(C.Pawn).DriverRadiusDamage( (Damage/3)+Rand(10), DamageRadius, Instigator.Controller, MyDamageType, MomentumTransfer, C.Pawn.Location ); + bZap = true; + } + + //Log("Applying damage to nearby vehicle: "$(FlyingDamageRadius-(VSize(Location-Other.Location))) * Default.FlyingDamage/FlyingDamageRadius); + } + + //Once this projectile has zapped something, draw the zap and then the projectile goes away. + if (bZap) + { + HitEmitter = spawn(HitEmitterClass,,, Location, rotator(C.Pawn.Location - Location)); + if (C.Pawn != None) + { + if (HitEmitter != None) + HitEmitter.mSpawnVecA = C.Pawn.Location; + C.Pawn.PlaySound(ImpactSound,,4*TransientSoundVolume); + } + Destroy(); + } + } + + C = NextC; + } + + if (Velocity.Z > -1000) + { + Velocity.Z -= 60; + } +} DefaultProperties { @@ -161,8 +201,9 @@ DefaultProperties CollisionHeight=30 CollisionRadius=30 ForceScale=10.0 - AmbientSound=Sound'UT3Vehicles.SCORPION.ScorpionBallAmb' - ImpactSound=Sound'UT3Weapons2.BioRifle.BioRifleExplode' + //AmbientSound=Sound'UT3Vehicles.SCORPION.ScorpionBallAmb' + AmbientSound=None + ImpactSound=Sound'UT3Weapons2.BioRifle.BioRifleExplode' // GEm: FIXME, should not depend on UT3Weapons2 MyDamageType=class'UT3ScorpionBallDamage' ExplosionEmitterClass=class'ONSPlasmaHitBlue' } diff --git a/Classes/UT3ScorpionBallRed.uc b/Classes/UT3ScorpionBallRed.uc index 9f61006..d07f81c 100644 --- a/Classes/UT3ScorpionBallRed.uc +++ b/Classes/UT3ScorpionBallRed.uc @@ -1,8 +1,42 @@ -//----------------------------------------------------------- -// UT3ScorpionBallRed.uc -// A nice-looking red ball. -// 2009, GreatEmerald -//----------------------------------------------------------- +/* + * Copyright © 2009, 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + class UT3ScorpionBallRed extends EONSScorpionEnergyProjectileRed; var class ProjectileEffectClass2; @@ -88,7 +122,7 @@ simulated function ProcessTouch (Actor Other, vector HitLocation) //GE: For refl } } -/*simulated function Timer() //GE: This function gives us some odd warnings +simulated function Timer() //GE: This function gives us some odd warnings { //local Vehicle Other; local Controller C, NextC; @@ -102,52 +136,58 @@ simulated function ProcessTouch (Actor Other, vector HitLocation) //GE: For refl //Instead of using ForEach VisibleCollidingActors, lets traverse the Controller List, it may be faster //ForEach VisibleCollidingActors(class'Vehicle',Other,FlyingDamageRadius) while (C != None) { - NextC = C.NextController; - - //If the controller's pawn is a vehicle (that isn't the vehicle shooting this projectile) of a certain type, - //isn't dead, isn't on our team, is within the range of being struck, and has a clear path to being zapped - //then zap it. - if ( C.Pawn != None && Vehicle(C.Pawn) != None && C.Pawn != Instigator && C.Pawn.Health > 0 && !C.SameTeamAs(Instigator.Controller) && VSize(C.Pawn.Location - Self.Location) < FlyingDamageRadius && FastTrace(C.Pawn.Location, Self.Location) && (Vehicle(C.Pawn).IsA('ONSHoverBike') || Vehicle(C.Pawn).IsA('ONSAttackCraft') || Vehicle(C.Pawn).IsA('ONSDualAttackCraft') || Vehicle(C.Pawn).IsA('ONSHoverCraft') ) ) - { - if ( Role == ROLE_Authority ) - { - if (C.Pawn.Health < 100 && C.Pawn.Health > 25) - { - TempDamage = Max(1,(C.Pawn.Health - 25)); - C.Pawn.TakeDamage( TempDamage, Instigator, C.Pawn.Location, Normal(Location-C.Pawn.Location), MyDamageType); - Vehicle(C.Pawn).DriverRadiusDamage( (TempDamage/3)+Rand(10), DamageRadius, Instigator.Controller, MyDamageType, MomentumTransfer, (C.Pawn.Location + VRand()*30) ); //We may need to change Hitlocation to Other.Location - Vehicle(C.Pawn).EjectDriver(); - bZap = true; - } - else - { - C.Pawn.TakeDamage(Damage, Instigator, C.Pawn.Location, Normal(Location-C.Pawn.Location), MyDamageType); - Vehicle(C.Pawn).DriverRadiusDamage( (Damage/3)+Rand(10), DamageRadius, Instigator.Controller, MyDamageType, MomentumTransfer, C.Pawn.Location ); - bZap = true; - } - - //Log("Applying damage to nearby vehicle: "$(FlyingDamageRadius-(VSize(Location-Other.Location))) * Default.FlyingDamage/FlyingDamageRadius); - } - - //Once this projectile has zapped something, draw the zap and then the projectile goes away. - if (bZap) - { - HitEmitter = spawn(HitEmitterClass,,, Self.Location, rotator(C.Pawn.Location - Self.Location)); - if (HitEmitter != None) - HitEmitter.mSpawnVecA = C.Pawn.Location; - C.Pawn.PlaySound(ImpactSound,,4*TransientSoundVolume); - Self.Destroy(); - } - } - - C = NextC; - } - - if (Velocity.Z > -1000) - { - Velocity.Z -= 60; - } -} */ + NextC = C.NextController; + + //If the controller's pawn is a vehicle (that isn't the vehicle shooting this projectile) of a certain type, + //isn't dead, isn't on our team, is within the range of being struck, and has a clear path to being zapped + //then zap it. + if ( C.Pawn != None && Vehicle(C.Pawn) != None && Instigator != None && C.Pawn != Instigator && C.Pawn.Health > 0 && !C.SameTeamAs(Instigator.Controller) && VSize(C.Pawn.Location - Location) < FlyingDamageRadius && FastTrace(C.Pawn.Location, Location) && (Vehicle(C.Pawn).IsA('ONSHoverBike') || Vehicle(C.Pawn).IsA('ONSAttackCraft') || Vehicle(C.Pawn).IsA('ONSDualAttackCraft') || Vehicle(C.Pawn).IsA('ONSHoverCraft') ) ) + { + if ( Role == ROLE_Authority ) + { + if (C.Pawn.Health < 100 && C.Pawn.Health > 25) + { + TempDamage = Max(1,(C.Pawn.Health - 25)); + C.Pawn.TakeDamage( TempDamage, Instigator, C.Pawn.Location, Normal(Location-C.Pawn.Location), MyDamageType); + if (C.Pawn != None) + Vehicle(C.Pawn).DriverRadiusDamage( (TempDamage/3)+Rand(10), DamageRadius, Instigator.Controller, MyDamageType, MomentumTransfer, (C.Pawn.Location + VRand()*30) ); //We may need to change Hitlocation to Other.Location + if (C.Pawn != None) + Vehicle(C.Pawn).EjectDriver(); + bZap = true; + } + else + { + C.Pawn.TakeDamage(Damage, Instigator, C.Pawn.Location, Normal(Location-C.Pawn.Location), MyDamageType); + if (C.Pawn != None) + Vehicle(C.Pawn).DriverRadiusDamage( (Damage/3)+Rand(10), DamageRadius, Instigator.Controller, MyDamageType, MomentumTransfer, C.Pawn.Location ); + bZap = true; + } + + //Log("Applying damage to nearby vehicle: "$(FlyingDamageRadius-(VSize(Location-Other.Location))) * Default.FlyingDamage/FlyingDamageRadius); + } + + //Once this projectile has zapped something, draw the zap and then the projectile goes away. + if (bZap) + { + HitEmitter = spawn(HitEmitterClass,,, Location, rotator(C.Pawn.Location - Location)); + if (C.Pawn != None) + { + if (HitEmitter != None) + HitEmitter.mSpawnVecA = C.Pawn.Location; + C.Pawn.PlaySound(ImpactSound,,4*TransientSoundVolume); + } + Destroy(); + } + } + + C = NextC; + } + + if (Velocity.Z > -1000) + { + Velocity.Z -= 60; + } +} DefaultProperties { @@ -161,7 +201,8 @@ DefaultProperties CollisionHeight=30 CollisionRadius=30 ForceScale=10.0 - AmbientSound=Sound'UT3Vehicles.SCORPION.ScorpionBallAmb' - ImpactSound=Sound'UT3Weapons2.BioRifle.BioRifleExplode' + //AmbientSound=Sound'UT3Vehicles.SCORPION.ScorpionBallAmb' + AmbientSound=None + ImpactSound=Sound'UT3Weapons2.BioRifle.BioRifleExplode' // GEm: FIXME, should not depend on UT3Weapons2 MyDamageType=class'UT3ScorpionBallDamage' } diff --git a/Classes/UT3ScorpionInteraction.uc b/Classes/UT3ScorpionInteraction.uc deleted file mode 100644 index 7875d04..0000000 --- a/Classes/UT3ScorpionInteraction.uc +++ /dev/null @@ -1,25 +0,0 @@ -//----------------------------------------------------------- -// UT3ScorpionInteraction.uc -// A 1337 way of speeding up and jumping out of the Scorpion -// 2009, GreatEmerald -//----------------------------------------------------------- -class UT3ScorpionInteraction extends Interaction; - -//UNDONE !!GE: test to know if we actually record a key press. - -function bool KeyEvent(EInputKey Key, EInputAction Action, FLOAT Delta ) -{ - if (Action == IST_Press) - ViewportOwner.Actor.ClientMessage("Key PRESSED:" @ Key);//GE: We need it to return IK_Space or 32 - //GE: First space for boost, the second for kamikaze - - return false; -} - -//TODO !!GE: How to replicate this to the actual Scorpion code? -//GE: UT3Scorpion.GoToState('Ejecting'); or more likely UT3Scorpion.Boost - -DefaultProperties -{ - bActive=true -} diff --git a/Classes/UT3ScorpionTurret.uc b/Classes/UT3ScorpionTurret.uc index 184a03b..d84ff9f 100644 --- a/Classes/UT3ScorpionTurret.uc +++ b/Classes/UT3ScorpionTurret.uc @@ -1,9 +1,43 @@ -//----------------------------------------------------------- -// UT3ScorpionTurret.uc -// A great elecroball launcher. -// 2009, GreatEmerald -// Copyright (c) 2012, 100GPing100 -//----------------------------------------------------------- +/* + * Copyright © 2009, 2014 GreatEmerald + * Copyright © 2012 100GPing100 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + class UT3ScorpionTurret extends EONSScorpionProjectileLauncher; simulated function float MaxRange() //GE: Makes bots look further @@ -13,23 +47,25 @@ simulated function float MaxRange() //GE: Makes bots look further return AimTraceRange; } -DefaultProperties +defaultproperties { - //======================= - // @100GPing100 - Mesh = SkeletalMesh'UT3ScorpionAnims.Scorpion_Turret'; - RedSkin = Shader'UT3ScorpionTex.ScorpionSkin'; - BlueSkin = Shader'UT3ScorpionTex.ScorpionSkinBlue'; - - YawBone = "gun_rotate"; - PitchBone = "gun_rotate"; - WeaponFireAttachmentBone = "gun_rotate"; - // @100GPing100 - //==========END========== + //======================= + // @100GPing100 + Mesh = SkeletalMesh'UT3VH_Scorpion_Anims.ScorpionGunOnly'; + RedSkin = Shader'UT3ScorpionTex.ScorpionSkin'; + BlueSkin = Shader'UT3ScorpionTex.ScorpionSkinBlue'; + + YawBone = "gun_rotate"; + PitchBone = "gun_rotate"; + WeaponFireAttachmentBone = "gun_tip"; + // @100GPing100 + //==========END========== - ProjectileClass=Class'UT3ScorpionBallRed' - TeamProjectileClasses(0)=class'UT3ScorpionBallRed' - TeamProjectileClasses(1)=class'UT3ScorpionBallBlue' - FireSoundClass=Sound'UT3Vehicles.SCORPION.ScorpionFire' - AIInfo(0)=(aimerror=650.000000,bTrySplash=True,bLeadTarget=True) + ProjectileClass=Class'UT3ScorpionBallRed' + TeamProjectileClasses(0)=class'UT3ScorpionBallRed' + TeamProjectileClasses(1)=class'UT3ScorpionBallBlue' + FireSoundClass=Sound'UT3A_Vehicle_Scorpion.Sounds.A_Vehicle_Scorpion_AltFire01' + AIInfo(0)=(aimerror=650.000000,bTrySplash=True,bLeadTarget=True) + PitchUpLimit=9600 + PitchDownLimit=60000 } diff --git a/Classes/UT3ShieldObject.uc b/Classes/UT3ShieldObject.uc new file mode 100644 index 0000000..599323d --- /dev/null +++ b/Classes/UT3ShieldObject.uc @@ -0,0 +1,47 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3ShieldObject extends Actor; + +DefaultProperties +{ + Mesh = SkeletalMesh'UT3NightshadeAnims.ShieldMine'; + DrawType = DT_Mesh; +} diff --git a/Classes/SlowVolume.uc b/Classes/UT3SlowVolume.uc similarity index 54% rename from Classes/SlowVolume.uc rename to Classes/UT3SlowVolume.uc index 81e2d34..9b05359 100644 --- a/Classes/SlowVolume.uc +++ b/Classes/UT3SlowVolume.uc @@ -1,4 +1,43 @@ -class SlowVolume extends Actor; +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3SlowVolume extends Actor; /* General speed scaling factor. */ var float ScalingFactor; @@ -7,7 +46,7 @@ var float ProjectileScalingFactor; /* How much life a pawn inside of the stasis drains to it. */ var float PawnLifeDrainPerSec; /* The mine base. */ -var DeployableMine MineBase; +var UT3DeployableMine MineBase; /* The list of the currently slowed pawns. */ var array SlowedPawns; @@ -15,18 +54,18 @@ var array SlowedPawns; simulated event Destroyed() { Super.Destroyed(); - + if (Role == ROLE_Authority) { //PlaySound(DestroySound); } - + MineBase.Destroy(); } simulated function SlowPawn(Pawn Other) { local SVehicle V; - + Level.Game.BroadCast(self, "SlowingPawn.", 'Say'); V = SVehicle(Other); if (V != None) @@ -40,7 +79,7 @@ simulated function SlowPawn(Pawn Other) simulated function RestorePawn(Pawn Other) { local SVehicle V; - + Level.Game.BroadCast(self, "RestoringPawn.", 'Say'); V = SVehicle(Other); if (V != None) @@ -56,7 +95,7 @@ function Tick(float DeltaTime) local Pawn P; local int i; local bool bFound; - + // Check if all slowedpawns are still inside. for (i = 0; i < SlowedPawns.Length; i++) { @@ -75,7 +114,7 @@ function Tick(float DeltaTime) SlowedPawns[i] = none; } } - + // Check for new pawns. foreach TouchingActors(class'Pawn', P) { @@ -98,7 +137,7 @@ function Tick(float DeltaTime) function AddPawn(Pawn P) { local int i; - + while (true) { if (SlowedPawns[i] == None) @@ -115,10 +154,10 @@ DefaultProperties // Looks. StaticMesh = StaticMesh'UT3NightshadeSM.SlowVolumeCube'; DrawType = DT_StaticMesh; - + // Misc. LifeSpan = 180.0; - + // Collision. bProjTarget = true; bCollideActors = true; @@ -126,13 +165,13 @@ DefaultProperties bStatic = false; bNoDelete = false; bHidden = false; - + // Vars. ScalingFactor = 0.2; ProjectileScalingFactor = 0.125; PawnLifeDrainPerSec = 3.0; //Gravity = (X=0,Y=0,Z=-190); - + // Network. RemoteRole = ROLE_Authority; bNetInitialRotation = true; diff --git a/Classes/Spider.uc b/Classes/UT3SpiderMine.uc similarity index 78% rename from Classes/Spider.uc rename to Classes/UT3SpiderMine.uc index a345bb1..6c15a89 100644 --- a/Classes/Spider.uc +++ b/Classes/UT3SpiderMine.uc @@ -1,21 +1,55 @@ -//============================================================ -// Spider (spiders that spawn with the Spidermine Trap). -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class Spider extends Projectile; - - -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\Spider_Explode01.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\Spider_Explode02.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\Spider_Explode03.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\Spider_Attack01.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\Spider_Attack02.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\Spider_Attack03.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\Spider_Walk01.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\Spider_Walk02.wav -#exec audio import group=SpiderSounds file=..\Sounds\UT3Nightshade\SpiderMine\Spider_Walk03.wav +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3SpiderMine extends Projectile; + + +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/Spider_Explode01.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/Spider_Explode02.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/Spider_Explode03.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/Spider_Attack01.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/Spider_Attack02.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/Spider_Attack03.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/Spider_Walk01.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/Spider_Walk02.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/Spider_Walk03.wav var float DetectionTimer; // check target every this many seconds @@ -37,7 +71,7 @@ var int TargetLocFuzz; /** the UTSpiderMineTrap that this mine is bound to. If it becomes None, the mine will blow itself up * The mine will return to it if it has nothing to do */ -var SpiderMine Lifeline; +var UT3SpiderMineTrap Lifeline; /** mine starts returning to its trap (if it has one) after this many seconds of inactivity */ var float ReturnToTrapDelay; @@ -119,7 +153,7 @@ simulated event TornOff() simulated function ProcessTouch(Actor Other, Vector HitNormal) { ImpactedActor = Other; - if (Spider(Other) != None) + if (UT3SpiderMine(Other) != None) { if ( Other.Instigator != Instigator ) Explode(Location, HitNormal); @@ -133,7 +167,7 @@ simulated function ProcessTouch(Actor Other, Vector HitNormal) } else if (Other.bCanBeDamaged && Other.Base != self) Explode(Location, HitNormal); - + ImpactedActor = None; } @@ -268,7 +302,7 @@ auto state Flying SetPhysics(PHYS_Falling); Lifespan = 6.0; } - + simulated function EndState() { Lifespan = 0.0; @@ -353,7 +387,7 @@ simulated state OnGround ReturnToTrapEnabled = false; LifeSpan = 0.0; } - + function Tick(float DeltaTime) { if (ReturnToTrapEnabled && DeltaTime - ReturnToTrapTime >= ReturnToTrapDelay) @@ -399,7 +433,7 @@ simulated state Scurrying //Play a nice screeching sound (not in WarnTarget because its meant only for on the 'jump') PlaySound(AttackScreechSnd[Rand(4) - 1], SLOT_None, 1.0); - + WarnTarget(); } else @@ -458,7 +492,7 @@ simulated function Explode(vector HitLocation, vector HitNormal) { Attached[i].TakeDamage(Damage, InstigatorController.Pawn, Attached[i].Location, vect(0,0,0), MyDamageType); } - + //Super.Explode(HitLocation, HitNormal); // From UT:'Projectile'.Explode: if (Damage > 0 && DamageRadius > 0) @@ -742,20 +776,20 @@ defaultproperties bBounce=True bHardAttach=True - + Mesh=SkeletalMesh'UT3NightshadeAnims.Spider_1P'; CollisionRadius=10.000000 CollisionHeight=10.000000 bBlockKarma=True - + // Sound. - ExplosionSnd(0) = Sound'UT3Nightshade.SpiderSounds.Spider_Explode01'; - ExplosionSnd(1) = Sound'UT3Nightshade.SpiderSounds.Spider_Explode02'; - ExplosionSnd(2) = Sound'UT3Nightshade.SpiderSounds.Spider_Explode03'; - AttackScreechSnd(0) = Sound'UT3Nightshade.SpiderSounds.Spider_Attack01'; - AttackScreechSnd(1) = Sound'UT3Nightshade.SpiderSounds.Spider_Attack02'; - AttackScreechSnd(2) = Sound'UT3Nightshade.SpiderSounds.Spider_Attack03'; - WalkingSnd(0) = Sound'UT3Nightshade.SpiderSounds.Spider_Walk01'; - WalkingSnd(1) = Sound'UT3Nightshade.SpiderSounds.Spider_Walk02'; - WalkingSnd(2) = Sound'UT3Nightshade.SpiderSounds.Spider_Walk03'; + ExplosionSnd(0) = Sound'Spider_Explode01'; + ExplosionSnd(1) = Sound'Spider_Explode02'; + ExplosionSnd(2) = Sound'Spider_Explode03'; + AttackScreechSnd(0) = Sound'Spider_Attack01'; + AttackScreechSnd(1) = Sound'Spider_Attack02'; + AttackScreechSnd(2) = Sound'Spider_Attack03'; + WalkingSnd(0) = Sound'Spider_Walk01'; + WalkingSnd(1) = Sound'Spider_Walk02'; + WalkingSnd(2) = Sound'Spider_Walk03'; } diff --git a/Classes/UT3SpiderMineObject.uc b/Classes/UT3SpiderMineObject.uc new file mode 100644 index 0000000..95c1f97 --- /dev/null +++ b/Classes/UT3SpiderMineObject.uc @@ -0,0 +1,47 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3SpiderMineObject extends Actor; + +DefaultProperties +{ + Mesh = SkeletalMesh'UT3NightshadeAnims.SpiderMine'; + DrawType = DT_Mesh; +} diff --git a/Classes/UT3SpiderMineTrap.uc b/Classes/UT3SpiderMineTrap.uc new file mode 100644 index 0000000..ff2a309 --- /dev/null +++ b/Classes/UT3SpiderMineTrap.uc @@ -0,0 +1,192 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3SpiderMineTrap extends UT3DeployableMine; + + +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active01.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active02.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active03.wav +#exec audio import group=SpiderSounds file=../UT3Vehicles/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Drop.wav + + +/* Max range for detecting enemies. */ +var float DetectionRange; +/* */ +var int AvailableMines; +/* */ +var int DeployedMines; +/* */ +var array ActivateSnd; +/* */ +var Sound DropSnd; + + +event Landed(vector HitNormal) +{ + Super.Landed(HitNormal); + SetTimer(0.5, false); + if (Team == 0) + Level.Game.BroadCast(self, "red", 'Say'); + else if (Team == 1) + Level.Game.BroadCast(self, "blue", 'Say'); + else + Level.Game.BroadCast(self, Team, 'Say'); +} +function Deploy() +{ + Super.Deploy(); + PlayAnim('Deploy', 1, 0); +} +function SpawnMine(Pawn Target, vector TargetDir) +{ + // ONSMineProjectile. + local UT3SpiderMine Mine; + local Vector X,Y,Z; + + if (AvailableMines > 0) + { + PlaySound(ActivateSnd[Rand(4) - 1], SLOT_None, 1.0); + GetAxes(Rotation, X,Y,Z); + Mine = Spawn(Class'UT3SpiderMine',,, Location + 25*Z); + if (Mine == None) + { + Mine = Spawn(Class'UT3SpiderMine',,, Location + Vect(0,0, 10)); + } + Mine.Lifeline = self; + Mine.InstigatorController = Instigator.Controller; + Mine.TeamNum = Team; + Mine.TargetPawn = Target; + Mine.KeepTargetExtraRange = FMax(0.f, DetectionRange - Mine.DetectionRange); + Mine.TossZ = 300.0; + Mine.Init(TargetDir); + AvailableMines--; + DeployedMines++; + } +} +function CheckForEnemies() +{ + local Pawn P; + local bool spawnedmine; + + if (Controller != None) + { + if (Controller.Pawn != None) + Instigator = Controller.Pawn; + } + else + { + // Noone to get the kills. + Destroy(); + return; + } + + if (Team != Controller.PlayerReplicationInfo.Team.TeamIndex && Controller.PlayerReplicationInfo.Team != None) + { + // Deployable and controller are not off the same team + // and the controller has no Team info. + Destroy(); + return; + } + + if (AvailableMines + DeployedMines <= 0) + { + // UT3: Out of mines. + // @100GPing100: won't ever be true since the addition + // will allways be the start count of mines. + + // @100GPing100: as I said, it's never true. + Destroy(); + return; + } + + if (!bDeleteMe) + { + spawnedmine = false; + foreach RadiusActors(class'Pawn', P, DetectionRange, Location) + { + if (Vehicle(P) != None) + { + if (Vehicle(P).GetTeamNum() != Team && Vehicle(P).Driver != None && Vehicle(P).Health > 0 && FastTrace(Vehicle(P).Location, Location)) + { + SpawnMine(P, Normal(P.Location - Location)); + SpawnedMine = true; + break; // Only spawn one spider at a time. + } + } + else if (P.GetTeamNum() != Team && P.Health > 0 && FastTrace(P.Location, Location)) + { + SpawnMine(P, Normal(P.Location - Location)); + spawnedmine = true; + break; // Only spawn one spider at a time. + } + } + if (spawnedmine) + SetTimer(1.5, false); + else + SetTimer(0.5, false); + } +} +event Timer() +{ + CheckForEnemies(); +} + + +DefaultProperties +{ + // Looks. + Mesh=SkeletalMesh'UT3NightshadeAnims.SpiderMine'; + DrawType=DT_Mesh; + + // Damage. + DetectionRange=1500.0; + AvailableMines=15; + + // Sound. + ActivateSnd(0) = Sound'SpiderMine_Active01'; + ActivateSnd(1) = Sound'SpiderMine_Active02'; + ActivateSnd(2) = Sound'SpiderMine_Active03'; + DropSnd = Sound'SpiderMine_Drop'; + + // Misc. + LifeSpan=150.0; + bOrientOnSlope=true; +} diff --git a/Classes/UT3StasisFieldObject.uc b/Classes/UT3StasisFieldObject.uc new file mode 100644 index 0000000..5e1d8f9 --- /dev/null +++ b/Classes/UT3StasisFieldObject.uc @@ -0,0 +1,47 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3StasisFieldObject extends Actor; + +DefaultProperties +{ + Mesh = SkeletalMesh'UT3NightshadeAnims.ShieldMine'; + DrawType = DT_Mesh; +} diff --git a/Classes/UT3StealthBender.uc b/Classes/UT3StealthBender.uc index 14ebe4e..ea0aa17 100644 --- a/Classes/UT3StealthBender.uc +++ b/Classes/UT3StealthBender.uc @@ -1,8 +1,43 @@ -//============================================================ -// UT3 StealthBender Mutator -// Contact: zeluis.100@gmail.com -// Copyright José Luís '100GPing100', 2012 -//============================================================ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + class UT3StealthBender extends ONSWheeledCraft; // Load packages. @@ -31,7 +66,7 @@ var Sound DeploySnd; /* Sound played when undeploying. */ var Sound UndeploySnd; /* Mines deployed. */ -var array Mines; +var array Mines; /* The radius to check for deployables. */ var float DeployCheckRadius; /* The min distance, to the back, to be from an obstacle to deploy. */ @@ -39,7 +74,7 @@ var float DeployCheckDistance; /* The currently selected mine. 0 = none, 1 = SpiderMine, 2 = SlowVolume, 3 = EMPMine, 4 = ShieldMine */ var byte SelectedMine; /* The items to be displayed on the HUD. */ -var array HUDItems; +var array HUDItems; /* Only used once to initialize the position of the menu items. */ var bool bItemsInitialized; /* Sound played when a new deployable is selected. */ @@ -65,17 +100,17 @@ simulated function CheckJump() // Select a mine if we don't have one selected already. if (SelectedMine == 0) SelectNextMine(); - + ArmMine = Spawn(MineObjectClasses[SelectedMine - 1], Driver,, Location); AttachToBone(ArmMine, 'ArmWrist'); - + Cloak(false); - + CurrentState = VS_Deploying; PlaySound(DeploySnd, SLOT_None); PlayAnim('ArmExtend', 1.6, 0.2); CurrentAnim = "ArmExtend"; - + // Do not allow to move or rotate. GroundSpeed = 0; //KarmaParamsRBFull(KParams).KMaxSpeed = 0.0; @@ -105,7 +140,7 @@ function bool bOnWater() for(i = 0; i < KarmaParams(KParams).Repulsors.Length; i++) if (KarmaParams(KParams).Repulsors[i].bRepulsorOnWater) return true; - + return false; } @@ -115,10 +150,10 @@ function bool bOnWater() function bool NoObstacle() { local vector HitLocation, HitNormal, TraceEnd, Direction; - + Direction = -Vector(Rotation); TraceEnd = Location - vect(0,0,5) + Direction * DeployCheckDistance; - + if (Trace(HitLocation, HitNormal, TraceEnd, Location, true) == None) return true; else @@ -145,7 +180,7 @@ function ShowMessage(byte Type, int Switch) // function bool CheckNearby() { - return !(class'DeployableMine'.static.DeployablesNearby(self, Location, DeployCheckRadius)); + return !(class'UT3DeployableMine'.static.DeployablesNearby(self, Location, DeployCheckRadius)); } // @@ -155,12 +190,12 @@ function bool IsOnGround() { local KarmaParams KP; local int i; - + KP = KarmaParams(KParams); for(i=0; i SpawnClass, @@ -200,48 +235,48 @@ function Fire(optional float F) optional Object.Rotator SpawnRotation)*/ if (Mines[0] == None && SelectedMine == 1) { - Mines[0] = Spawn(Class'SpiderMine', Driver,, ArmMine.Location); + Mines[0] = Spawn(Class'UT3SpiderMineTrap', Driver,, ArmMine.Location); PlaySound(DropItemSnd); - + if (!bHasAmmo(1)) SelectNextMine(); } else if (Mines[1] == None && SelectedMine == 1) { - Mines[1] = Spawn(Class'SpiderMine', Driver,, ArmMine.Location); + Mines[1] = Spawn(Class'UT3SpiderMineTrap', Driver,, ArmMine.Location); PlaySound(DropItemSnd); - + if (!bHasAmmo(1)) SelectNextMine(); } else if (Mines[2] == None && SelectedMine == 2) { ShowMessage(0, 4); // "Only in next beta (have a shield :D)" - Mines[2] = Spawn(Class'EnergyShield', Driver,, ArmMine.Location); + Mines[2] = Spawn(Class'UT3DeployableEnergyShield', Driver,, ArmMine.Location); PlaySound(DropItemSnd); - + if (!bHasAmmo(2)) SelectNextMine(); } else if (Mines[3] == None && SelectedMine == 3) { - Mines[3] = Spawn(Class'EMPMine', Driver,, ArmMine.Location); + Mines[3] = Spawn(Class'UT3EMPMine', Driver,, ArmMine.Location); PlaySound(DropItemSnd); - + if (!bHasAmmo(3)) SelectNextMine(); } else if (Mines[4] == None && SelectedMine == 4) { - Mines[4] = Spawn(Class'EnergyShield', Driver,, ArmMine.Location); + Mines[4] = Spawn(Class'UT3DeployableEnergyShield', Driver,, ArmMine.Location); PlaySound(DropItemSnd); - + if (!bHasAmmo(4)) SelectNextMine(); } - + ArmMine.Destroy(); - + // Undeploy. CurrentState = VS_Undeploying; PlaySound(UndeploySnd, SLOT_None); @@ -260,7 +295,7 @@ function Tick(float DeltaTime) // If we have ammo available and we have no mine selected, select one right away! if (bHasAmmo(0) && SelectedMine == 0) SelectNextMine(); - + CheckJump(); CheckState(); super.Tick(DeltaTime); @@ -313,7 +348,7 @@ function Cloak(bool OnOff) } Visibility = Default.Visibility; bDrawVehicleShadow = true; - + GroundSpeed = Default.GroundSpeed; //KarmaParamsRBFull(KParams).KMaxSpeed = Default.GroundSpeed; } @@ -333,19 +368,19 @@ simulated event DrivingStatusChanged() { // Do not call it in ONSHoverBike because of the dust effects. Super(ONSHoverCraft).DrivingStatusChanged(); - + if (Driver == None) { if (ArmMine != None) ArmMine.Destroy(); - + GroundSpeed = Default.GroundSpeed; Cloak(false); - + PlayAnim('Idle', 1, 0.7); CurrentAnim = "Idle"; CurrentState = VS_Undeployed; - + GroundSpeed = Default.GroundSpeed; //KarmaParamsRBFull(KParams).KMaxSpeed = Default.GroundSpeed; } @@ -356,7 +391,7 @@ simulated event DrivingStatusChanged() Cloak(true); CurrentState = VS_Cloaked; } - + if (Role == ROLE_Authority) { if (Bot(Controller) != None || AIController(Controller) != None) @@ -371,24 +406,24 @@ Begin: // Prevents driver from firing. CurrentAnim = "ArmRetract"; CurrentState = VS_Deploying; - + // Undeploy. PlaySound(UndeploySnd, SLOT_None); PlayAnim('ArmRetract', 4.8, 0.2); - + // Wait for the animation to end. FinishAnim(); - + // Update mine object. if (ArmMine != None) ArmMine.Destroy(); ArmMine = Spawn(MineObjectClasses[SelectedMine - 1], Driver,, Location); AttachToBone(ArmMine, 'Object'); - + // Deploy. PlaySound(DeploySnd, SLOT_None); PlayAnim('ArmExtend', 1.6, 0.2); - + // Will change it back to VS_Deployed in CheckState(). CurrentAnim = "ArmExtend"; } @@ -406,7 +441,7 @@ simulated function NextWeapon() break; } SelectedMine = 2; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 1); // "Stasis Field" break; case 2: @@ -417,7 +452,7 @@ simulated function NextWeapon() break; } SelectedMine = 3; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 2); // "EMP" break; case 3: @@ -428,7 +463,7 @@ simulated function NextWeapon() break; } SelectedMine = 4; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 3); // "Shield Generator" break; case 4: @@ -439,7 +474,7 @@ simulated function NextWeapon() break; } SelectedMine = 1; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 0); // "Spidermine Trap" break; } @@ -462,7 +497,7 @@ simulated function PrevWeapon() break; } SelectedMine = 4; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 3); // "Shield Generator" break; case 2: @@ -473,7 +508,7 @@ simulated function PrevWeapon() break; } SelectedMine = 1; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 0); // "Spidermine Trap" break; case 3: @@ -484,7 +519,7 @@ simulated function PrevWeapon() break; } SelectedMine = 2; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 1); // "Stasis Field" break; case 4: @@ -495,7 +530,7 @@ simulated function PrevWeapon() break; } SelectedMine = 3; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 2); // "EMP" break; } @@ -518,7 +553,7 @@ simulated function SwitchWeapon(byte F) break; } SelectedMine = 1; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 0); // "Spidermine Trap" break; case 2: @@ -529,7 +564,7 @@ simulated function SwitchWeapon(byte F) break; } SelectedMine = 2; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 1); // "Stasis Field" break; case 3: @@ -540,7 +575,7 @@ simulated function SwitchWeapon(byte F) break; } SelectedMine = 3; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 2); // "EMP" break; case 4: @@ -551,7 +586,7 @@ simulated function SwitchWeapon(byte F) break; } SelectedMine = 4; - PlaySound(Sound'UT3Nightshade.Sounds.SwitchDeployable', SLOT_None); + PlaySound(SwitchDeployableSnd, SLOT_None); ShowMessage(1, 3); // "Shield Generator" break; } @@ -597,7 +632,7 @@ function SelectNextMine() SelectedMine = 4; else SelectedMine = 0; - + switch (SelectedMine) { case 1: @@ -620,7 +655,7 @@ function SelectNextMine() function DrawHUD(Canvas Canvas) { local int i; - + // Do not draw the HUD on bots. if (Bot(Controller) != None || AIController(Controller) != None) return; @@ -638,7 +673,7 @@ function DrawHUD(Canvas Canvas) HUDItems[3].PosY = Canvas.ClipY * 0.90; bItemsInitialized = true; } - + if (SelectedMine != 0) { // Draw the selected mine with normal colours. @@ -676,7 +711,7 @@ function CheckAICloak() { local Bot b; local AIController AI; - + b = Bot(Controller); AI = AIController(Controller); if (b != None || AI != None) @@ -694,21 +729,21 @@ function bool BotDropDeployable() if (CurrentState == VS_Undeployed || CurrentState == VS_Cloaked) { Cloak(false); - + // Select a mine if we don't have one selected already. if (SelectedMine == 0) SelectNextMine(); - + ArmMine = Spawn(MineObjectClasses[SelectedMine - 1], Driver,, Location); AttachToBone(ArmMine, 'Object'); - + Cloak(false); - + CurrentState = VS_Deploying; PlaySound(DeploySnd, SLOT_None); PlayAnim('ArmExtend', 1.6, 0.2); CurrentAnim = "ArmExtend"; - + // Do not allow to move or rotate. GroundSpeed = 0; //KarmaParamsRBFull(KParams).KMaxSpeed = 0.0; @@ -717,16 +752,16 @@ function bool BotDropDeployable() { LastDropAttemptTime = Level.TimeSeconds; Fire(0); - + CurrentState = VS_Undeploying; PlaySound(UndeploySnd, SLOT_None); PlayAnim('ArmRetract', 4.8, 0.2); CurrentAnim = "ArmRetract"; - + if (ArmMine != None) ArmMine.Destroy(); } - + return false; } function bool ShouldDropDeployable() @@ -734,16 +769,16 @@ function bool ShouldDropDeployable() local Bot b; local vector EnemyDir; local GameObjective O; - + SelectNextMine(); - + if (CurrentState == VS_Deployed) { BotDropDeployable(); return true; } - - + + b = Bot(Controller); if (b != None && Level.TimeSeconds - LastDropAttemptTime > 7.0) { @@ -752,7 +787,7 @@ function bool ShouldDropDeployable() LastDropAttemptTime = Level.TimeSeconds; return false; } - + if (b.Enemy == None) { EnemyDir = b.Enemy.Location - Location; @@ -827,37 +862,37 @@ DefaultProperties CloakedSkin = FinalBlend'XEffectMat.Combos.InvisOverlayFB'; bDrawDriverInTP = false; bAdjustDriversHead = false; - MineObjectClasses(0) = class'SpidermineObject'; - MineObjectClasses(1) = class'StasisFieldObject'; - MineObjectClasses(2) = class'EMPObject'; - MineObjectClasses(3) = class'ShieldObject'; - + MineObjectClasses(0) = class'UT3SpiderMineObject'; + MineObjectClasses(1) = class'UT3StasisFieldObject'; + MineObjectClasses(2) = class'UT3EMPObject'; + MineObjectClasses(3) = class'UT3ShieldObject'; + // HUD. - Begin Object Class=HUDItem Name=HUDSpidermineTrap + Begin Object Class=UT3HUDItem Name=HUDSpidermineTrap DrawColor = (R=128,G=128,B=128,A=255); Icon = Texture'UT3NightshadeTex.SpiderMine.Icon_SpiderMineTrap'; Scale = 0.5; End Object HUDItems(0) = HUDSpidermineTrap - Begin Object Class=HUDItem Name=HUDStasisField + Begin Object Class=UT3HUDItem Name=HUDStasisField DrawColor = (R=128,G=128,B=128,A=255); Icon = Texture'UT3NightshadeTex.SlowField.Icon_SlowFieldGenerator'; Scale = 0.5; End Object HUDItems(1) = HUDStasisField - Begin Object Class=HUDItem Name=HUDEMP + Begin Object Class=UT3HUDItem Name=HUDEMP DrawColor = (R=128,G=128,B=128,A=255); Icon = Texture'UT3NightshadeTex.EMPMine.Icon_EMPMine'; Scale = 0.5; End Object HUDItems(2) = HUDEMP - Begin Object Class=HUDItem Name=HUDShield + Begin Object Class=UT3HUDItem Name=HUDShield DrawColor = (R=128,G=128,B=128,A=255); Icon = Texture'UT3NightshadeTex.ShieldGenerator.Icon_ShieldGenerator'; Scale = 0.5; End Object HUDItems(3) = HUDShield - + // Damage. DriverWeapons(0) = (WeaponClass=Class'Onslaught.ONSHoverBikePlasmaGun',WeaponBone="SecondaryTurretBarrel") Health = 600; @@ -870,11 +905,11 @@ DefaultProperties Mines(2) = none; Mines(3) = none; Mines(4) = none; - + // Checks. DeployCheckRadius = 1800.0; DeployCheckDistance = 375.0; - + // Movement. CloakedSpeedModifier = 0.45; @@ -1092,5 +1127,7 @@ DefaultProperties ObjectiveGetOutDist=1500.0 bCanDoTrickJumps=true + + SwitchDeployableSnd = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_SwitchDeployables' } diff --git a/Classes/UT3Viper.uc b/Classes/UT3Viper.uc index 9ceddfa..e6b7b32 100644 --- a/Classes/UT3Viper.uc +++ b/Classes/UT3Viper.uc @@ -1,9 +1,43 @@ -//============================================================ -// UT3 Viper (NecrisManta) -// Copyright (c) José Luís '100GPing100' 2012-2013 -// Contact: zeluis.100@gmail.com -// Website: http://www.100gping100.com/ -//============================================================ +/* + * Copyright © 2012-2013 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + class UT3Viper extends ONSHoverBike; // Load packages. @@ -11,17 +45,6 @@ class UT3Viper extends ONSHoverBike; #exec OBJ LOAD FILE=../Textures/UT3ViperTex.utx #exec OBJ LOAD FILE=../StaticMeshes/UT3ViperSM.usx -// Import sounds. -#exec audio import group=Sounds file=../Sounds/UT3Viper/Eject.wav -#exec audio import group=Sounds file=../Sounds/UT3Viper/EjectReady.wav -#exec audio import group=Sounds file=../Sounds/UT3Viper/Engine.wav -#exec audio import group=Sounds file=../Sounds/UT3Viper/EnterVehicle.wav -#exec audio import group=Sounds file=../Sounds/UT3Viper/ExitVehicle.wav -#exec audio import group=Sounds file=../Sounds/UT3Viper/Explode.wav -#exec audio import group=Sounds file=../Sounds/UT3Viper/Impact.wav -#exec audio import group=Sounds file=../Sounds/UT3Viper/Jump.wav -#exec audio import group=Sounds file=../Sounds/UT3Viper/SelfDestruct.wav - /* Time, in seconds, that the driver has to activate the self-destruct. */ var int SelfDestructWindow; @@ -102,17 +125,17 @@ simulated state SelfDestruct { Other.TakeDamage(600, OldDriver, Other.Location, 200000 * Normal(Velocity), DmgType_SelfDestruct); SelfDestructExplode(); - + TextToSpeech("Bullseye!", 1.0); - + // @TODO: Maybe add "Bullseye!"? } - + event Timer() { SelfDestructExplode(); } - + event Tick(float DeltaTime) { } @@ -120,7 +143,7 @@ Begin: EjectDriver(); bEjected = true; PlaySound(SelfDestructSnd, SLOT_None, 1.5, true); - + SetTimer(SelfDestructForceDuration, false); /*Sleep(SelfDestructForceDuration); SelfDestructExplode();*/ @@ -140,32 +163,32 @@ function EjectDriver() { local Pawn OldPawn; local Vector EjectVel; - local Inv_SelfDestruct SelfDestructInv; - local Inv_Ejection EjectionInv; - + local UT3Inv_SelfDestruct SelfDestructInv; + local UT3Inv_Ejection EjectionInv; + LoopAnim('jumpidle', 0.8, 0.5); - + OldPawn = Driver; - + KDriverLeave(true); bEjected = true; - + if (OldPawn == none) { return; } - + EjectVel = VRand(); EjectVel.Z = 0; EjectVel = (Normal(EjectVel) * 0.2 + Vect(0,0,1)) * EjectMomentum; - + OldPawn.Velocity = EjectVel; - + PlaySound(DriverEjectSnd, SLOT_None, 1.0, true); - + // Do not take self destruct damage - SelfDestructInv = Spawn(class'Inv_SelfDestruct', OldPawn,,, Rot(0,0,0)); + SelfDestructInv = Spawn(class'UT3Inv_SelfDestruct', OldPawn,,, Rot(0,0,0)); SelfDestructInv.GiveTo(OldPawn); - EjectionInv = Spawn(class'Inv_Ejection', OldPawn,,, Rot(0,0,0)); + EjectionInv = Spawn(class'UT3Inv_Ejection', OldPawn,,, Rot(0,0,0)); EjectionInv.GiveTo(OldPawn); } //=============================== @@ -175,12 +198,12 @@ function EjectDriver() simulated function KApplyForce(out Vector Force, out Vector Torque) { super.KApplyForce(Force, Torque); - + if (bDriving && JumpCountdown > 0.0) { // jump Force += Vect(0,0,1) * JumpForceMag; PlayAnim('JumpStart', 1.2, 0.15); CurrentAnim = "JumpStart"; - + if (KGetActorGravScale() == GlidingGravScale) { // Do not jump too much. Force += vect(0,0,-0.5) * Mass * GlidingGravScale; @@ -190,7 +213,7 @@ simulated function KApplyForce(out Vector Force, out Vector Torque) if (KGetActorGravScale() == GlidingGravScale) // Do not jump too much. Force += vect(0,0,-0.5) * Mass * GlidingGravScale; */ - + if (bEjected) { if (bGotBoostDir == false) { // only calculate 'BoostDir' once @@ -204,18 +227,18 @@ simulated function KApplyForce(out Vector Force, out Vector Torque) function vector GetBoostForce() { local Rotator AimRotation; - + AimRotation.Pitch = Weapons[0].CurrentAim.Pitch; AimRotation.Yaw = Rotation.Yaw; AimRotation.Roll = Rotation.Roll; - + return vector(AimRotation) * BoostForce; } simulated function CheckJumpDuck() { local Emitter JumpEffect; - + if (JumpCountdown <= 0.0 && (Rise > 0 || bWeaponIsAltFiring) && Level.TimeSeconds - JumpDelay >= LastJumpTime && TraceJump(JumpTraceDist)) { bJumped = true; PlaySound(JumpSound, SLOT_Misc, 1.0, true); @@ -241,7 +264,7 @@ simulated function CheckJumpDuck() function AltFire(optional float F) { super(Vehicle).AltFire(F); - + if (bSelfDestructReady && Level.TimeSeconds - SelfDestructStartTime <= SelfDestructWindow) { GoToState('SelfDestruct'); } @@ -250,23 +273,23 @@ function AltFire(optional float F) simulated event DrivingStatusChanged() { local int i; - + super(ONSHoverCraft).DrivingStatusChanged(); - + if (Driver == none && !bEjected) { PlayAnim('InactiveIdle', 0.8, 0.5); CurrentAnim = "InactiveIdle"; } else if (Driver == none && bEjected) { Enable('Tick'); } - + if (bDriving && Level.NetMode != NM_DedicatedServer && BikeDust.Length == 0 && bDropDetail == false) { BikeDust.Length = BikeDustOffset.Length; BikeDustLastNormal.Length = BikeDustOffset.Length; - + for (i = 0; i < BikeDust.Length; i++) { if (BikeDust[i] == none) { - BikeDust[i] = Spawn(class'Emitter_ViperDust', self,, Location + (BikeDustOffset[i] >> Rotation)); + BikeDust[i] = Spawn(class'UT3Emitter_ViperDust', self,, Location + (BikeDustOffset[i] >> Rotation)); BikeDust[i].SetDustColor(Level.DustColor); BikeDustLastNormal[i] = Vect(0,0,1); } @@ -276,13 +299,13 @@ simulated event DrivingStatusChanged() for (i = 0; i < BikeDust.Length; i++) { BikeDust[i].Destroy(); } - + BikeDust.Length = 0; } - + JumpCountDown = 0.0; } - + if (bDriving) { bCanBeBaseForPawns = false; } else { @@ -293,14 +316,14 @@ simulated event DrivingStatusChanged() function UsedBy(Pawn user) { local bool bSuccess; - + if (Driver != none) { return; } - + // Enter vehicle code bSuccess = TryToDrive(User); - + if (bSuccess) { LoopAnim('SlowIdle', 0.8, 0.5); CurrentAnim = "SlowIdle"; @@ -313,14 +336,14 @@ simulated function Tick(float DeltaTime) Animate(); CheckGliding(); } - + if (bJumped == true && Level.TimeSeconds - JumpDelay >= LastJumpTime && TraceJump(JumpTraceDist)) { bJumped = false; } - + if (bSelfDestructReady == false && bJumped == true && bStoppedRise == false && (Rise > 0 || bWeaponIsAltFiring)) { RiseTime += DeltaTime; - + if (RiseTime >= 1.1) { RiseTime = 0.0; bSelfDestructReady = true; @@ -332,14 +355,14 @@ simulated function Tick(float DeltaTime) bSelfDestructReady = false; bStoppedRise = false; } - + if (bJumped == false) { // If we're on ground, these get reset. bStoppedRise = false; bSelfDestructReady = false; RiseTime = 0.0; } - + super.Tick(DeltaTime); } @@ -372,10 +395,10 @@ function Animate() { */ local bool bIsOnGround; local bool bIsAnimating; - + bIsOnGround = IsOnGround(); bIsAnimating = IsAnimating(); - + if ((Rise > 0 || bWeaponIsAltFiring) && CurrentAnim != "JumpIdle" && TraceJump(JumpTraceDist) == false) { LoopAnim('JumpIdle', 1, 0.5); CurrentAnim = "JumpIdle"; @@ -428,14 +451,14 @@ function bool IsOnGround() { local KarmaParams KP; local int i; - + KP = KarmaParams(KParams); for (i = 0; i < KP.Repulsors.Length; i++) { if (KP.Repulsors[i] != none && KP.Repulsors[i].bRepulsorInContact == true) { return true; } } - + return false; } @@ -444,13 +467,13 @@ function bool TraceJump(int TraceDist) local Vector HitLocation, HitNormal; local Vector TraceEnd, TraceStart; local Actor HitActor; - + TraceStart = Location; TraceEnd = TraceStart; TraceEnd.Z -= TraceDist; - + HitActor = Trace(HitLocation, HitNormal, TraceEnd, TraceStart, true); - + return (HitActor != none); } @@ -464,10 +487,10 @@ event Touch(Actor Other) if (bEjected == true) { Other.TakeDamage(600, OldDriver, Other.Location, 200000 * Normal(Velocity), DmgType_SelfDestruct); SelfDestructExplode(); - + // @TODO: Maybe add "Bullseye!"? } - + super.Touch(Other); } @@ -476,9 +499,9 @@ event TakeDamage(int Damage, Pawn EventInstigator, vector HitLocation, vector Mo if (bEjected) { Damage = Damage * 2; } - + // @TODO: Maybe add "Last Second Saved!"? - + super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType); } @@ -495,7 +518,7 @@ function ChooseFireAt(Actor A) && VSize(Controller.FocalPoint - Location) <= 500) { GoToState('BotSelfDestruct'); } - + if (Controller.LineOfSightTo(Controller.Focus)) { Fire(0); } @@ -507,21 +530,21 @@ state BotSelfDestruct function BeginState() { local Emitter JumpEffect; - + PlaySound(JumpSound, SLOT_Misc, 1.0, true); - + if (Role == ROLE_Authority) { DoBikeJump = !DoBikeJump; } - + if (Level.NetMode != NM_DedicatedServer) { JumpEffect = Spawn(class'ONSHoverBikeJumpEffect'); JumpEffect.SetBase(Self); } - + Rise = 0; } - + // Perform the self destruct here. Begin: Sleep(TimeToRiseForSelfDestruct + 0.1); @@ -541,19 +564,19 @@ DefaultProperties HeadlightCoronaMaxSize=0.0; BikeDustOffset(0)=(X=50.00,Y=0.0,Z=10.0) BikeDustOffset(1)=(X=-25.0,Y=0.0,Z=10.0) - + // Weapons. - DriverWeapons(0)=(WeaponClass=Class'UT3Viper.Weap_ViperGun',WeaponBone="FrontBody") - - + DriverWeapons(0)=(WeaponClass=Class'UT3Weap_ViperGun',WeaponBone="FrontBody") + + // Health Health=200; HealthMax=200; - + // Strings. VehiclePositionString="in a UT3 Viper"; VehicleNameString="UT3 Viper"; - + // Movement GroundSpeed=1000.0; AirSpeed=2400.0; @@ -568,41 +591,33 @@ DefaultProperties GlideMaxStrafeForce = 1.0; NormalMaxThrustForce = 27.0; NormalMaxStrafeForce = 20.0; - + // Sound. - IdleSound=Sound'UT3Viper.Sounds.Engine'; - StartUpSound=Sound'UT3Viper.Sounds.EnterVehicle'; - ShutDownSound=Sound'UT3Viper.Sounds.ExitVehicle'; - JumpSound=Sound'UT3Viper.Sounds.Jump'; - DriverEjectSnd=Sound'UT3Viper.Sounds.Eject'; - EjectReadySnd=Sound'UT3Viper.Sounds.EjectReady'; - SelfDestructSnd=Sound'UT3Viper.Sounds.SelfDestruct'; - ExplosionSounds(0)=Sound'UT3Viper.Sounds.Explode'; - ExplosionSounds(1)=Sound'UT3Viper.Sounds.Explode'; - ExplosionSounds(2)=Sound'UT3Viper.Sounds.Explode'; - ExplosionSounds(3)=Sound'UT3Viper.Sounds.Explode'; - ExplosionSounds(4)=Sound'UT3Viper.Sounds.Explode'; - ImpactDamageSounds(0)=Sound'UT3Viper.Sounds.Impact'; - ImpactDamageSounds(1)=Sound'UT3Viper.Sounds.Impact'; - ImpactDamageSounds(2)=Sound'UT3Viper.Sounds.Impact'; - ImpactDamageSounds(3)=Sound'UT3Viper.Sounds.Impact'; - ImpactDamageSounds(4)=Sound'UT3Viper.Sounds.Impact'; - ImpactDamageSounds(5)=Sound'UT3Viper.Sounds.Impact'; - ImpactDamageSounds(6)=Sound'UT3Viper.Sounds.Impact'; + IdleSound=Sound'UT3A_Vehicle_Viper.Sounds.A_Vehicle_Viper_EngineLoop'; + StartUpSound=Sound'UT3A_Vehicle_Viper.Sounds.A_Vehicle_Viper_Start'; + ShutDownSound=Sound'UT3A_Vehicle_Viper.Sounds.A_Vehicle_Viper_Stop'; + JumpSound=Sound'UT3A_Vehicle_Manta.Sounds.A_Vehicle_Manta_Jump'; + DriverEjectSnd=Sound'UT3A_Vehicle_Scorpion.Sounds.A_Vehicle_Scorpion_Eject01'; + EjectReadySnd=Sound'UT3A_Vehicle_Scorpion.Sounds.A_Vehicle_Scorpion_EjectReadyBeep'; + SelfDestructSnd=Sound'UT3A_Vehicle_Viper.Sounds.A_Vehicle_Viper_SelfDestruct'; + ExplosionSounds=() + ExplosionSounds(0)=Sound'UT3A_Vehicle_Viper.Sounds.A_Vehicle_Viper_Explosion'; + ImpactDamageSounds=(); + ImpactDamageSounds(0)=Sound'UT3A_Vehicle_Viper.Sounds.A_Vehicle_Viper_Collision'; MaxPitchSpeed=1000; SoundVolume=200; SoundRadius=900; - + // SelfDestruct. SelfDestructWindow = 3; SelfDestructForceDuration = 1; - DmgType_SelfDestruct = Class'UT3Viper.DmgType_SelfDestruct' + DmgType_SelfDestruct = Class'UT3DmgType_SelfDestruct' SelfDestructDamage = 800; SelfDestructRadius = 600; SelfDestructMomentum = 200000; BoostForce = 500; // 200 TimeToRiseForSelfDestruct = 1.1; - + // Misc. bCanBeBaseForPawns = true; CollisionHeight=50; @@ -613,18 +628,18 @@ DefaultProperties LinkHealMult=0.35; MeleeRange=-100.0; HoverCheckDist=100; // 150 - + TurnDamping=55; TurnTorqueFactor=750.0; TurnTorqueMax=1000.0; MaxYawRate=150.0; - + RollTorqueTurnFactor=200.0; RollTorqueStrafeFactor=65.0; RollTorqueMax=200.0; RollDamping=20; - + UpDamping=0.0; - + PitchTorqueMax=35.0; } diff --git a/Classes/UT3Weap_ViperGun.uc b/Classes/UT3Weap_ViperGun.uc new file mode 100644 index 0000000..128b310 --- /dev/null +++ b/Classes/UT3Weap_ViperGun.uc @@ -0,0 +1,66 @@ +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3Weap_ViperGun extends ONSWeapon; + +DefaultProperties +{ + // Looks && Classes. + Mesh=Mesh'ONSWeapons-A.PlasmaGun'; + ProjectileClass=Class'UT3Proj_ViperBolt'; + + // Sound. + FireSoundClass=Sound'UT3A_Vehicle_Viper.Sounds.A_Vehicle_Viper_PrimaryFire'; + //RotateSound=Sound'UT3A_Vehicle_Viper.Sounds.Rotate01'; + AmbientSoundScaling=0.5; + + // Aim + FireInterval=0.2; + PitchDownLimit=57000; // 60000 + YawBone=Rt_Front_TopFin; + PitchBone=Rt_Front_TopFin; + WeaponFireAttachmentBone=Rt_ShieldArm3_Damage; + + // AI. + AIInfo(0)=ONSWeaponAIInfo(bTrySplash=false, bLeadTarget=true, bInstantHit=false, AimError=750.0); + + // ForceFeedback. + FireForce="HoverBikeFire"; +} diff --git a/Classes/UT3WheelSlipEffect.uc b/Classes/UT3WheelSlipEffect.uc new file mode 100644 index 0000000..6c6887a --- /dev/null +++ b/Classes/UT3WheelSlipEffect.uc @@ -0,0 +1,86 @@ +/* + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ + +class UT3WheelSlipEffect extends ONSDirtSlipEffect; + +simulated function UpdateDust(SVehicleWheel t, float DustSlipRate, float DustSlipThresh) +{ + local float SpritePPS, MeshPPS; + + //Log("Material:"$t.GroundMaterial$" OnGround:"$t.bTireOnGround); + + // If wheel is on ground, and slipping above threshold.. + if(t.bWheelOnGround && t.SlipVel > DustSlipThresh) + { + SpritePPS = FMin(DustSlipRate * (t.SlipVel - DustSlipThresh), MaxSpritePPS); + + Emitters[0].ParticlesPerSecond = SpritePPS; + Emitters[0].InitialParticlesPerSecond = SpritePPS; + Emitters[0].AllParticlesDead = false; + + MeshPPS = FMin(DustSlipRate * (t.SlipVel - DustSlipThresh), MaxMeshPPS); + + Emitters[1].ParticlesPerSecond = MeshPPS; + Emitters[1].InitialParticlesPerSecond = MeshPPS; + Emitters[1].AllParticlesDead = false; + + // GEm: Looks like SoundGroups and AmbientSound don't mix + /*SoundVolume = MeshPPS/float(MaxMeshPPS)*255.0; + if (AmbientSound == None) + AmbientSound = DirtSlipSound;*/ + + if (t.SlipVel > DustSlipThresh*3.0) + PlaySound(DirtSlipSound, SLOT_Interact, MeshPPS/float(MaxMeshPPS)*2.0, , SoundRadius); + } + else // ..otherwise, switch off. + { + Emitters[0].ParticlesPerSecond = 0; + Emitters[0].InitialParticlesPerSecond = 0; + + Emitters[1].ParticlesPerSecond = 0; + Emitters[1].InitialParticlesPerSecond = 0; + + //AmbientSound = None; + } +} + +defaultproperties +{ + DirtSlipSound = Sound'UT3A_Vehicle_Scorpion.SoundCues.A_Vehicle_Scorpion_Slide' +} diff --git a/Classes/Weap_UT3Nightshade.uc b/Classes/Weap_UT3Nightshade.uc index c12d222..6de19c3 100644 --- a/Classes/Weap_UT3Nightshade.uc +++ b/Classes/Weap_UT3Nightshade.uc @@ -1,15 +1,44 @@ -//============================================================ -// UT3 Nightshade -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class Weap_UT3Nightshade extends ONSWeapon; - +/* + * Copyright © 2012 100GPing100 + * Copyright © 2014 GreatEmerald + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * (1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * (2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimers in + * the documentation and/or other materials provided with the + * distribution. + * + * (3) The name of the author may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * (4) The use, modification and redistribution of this software must + * be made in compliance with the additional terms and restrictions + * provided by the Unreal Tournament 2004 End User License Agreement. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * This software is not supported by Atari, S.A., Epic Games, Inc. or any + * of such parties' affiliates and subsidiaries. + */ -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\FireStart.wav -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\Fire.wav -#exec audio import group=Sounds file=..\Sounds\UT3Nightshade\FireEnd.wav +class Weap_UT3Nightshade extends ONSWeapon; /* The beam effect. */ @@ -66,27 +95,27 @@ state InstantFireMode { local Vector HitLocation, HitNormal, TraceStart, TraceEnd; local Actor HitActor; - + if (!bIsFiring) { bIsFiring = true; - + PlaySound(FireStart, SLOT_None); - + TraceStart = WeaponFireLocation; TraceEnd = TraceStart + Vector(CurrentAim + Rotation) * TraceRange; HitActor = Trace(HitLocation, HitNormal, TraceEnd, TraceStart, true); - + // Spawm the beam, the rest is done in Tick. if (Beam != None) Beam.Destroy(); - Beam = Spawn(class'Beam', Instigator); - + Beam = Spawn(class'UT3NightshadeBeamEffect', Instigator); + if (Team == 1) Beam.LinkColor = 2; // Blue. else Beam.LinkColor = 1; // Red. - + UpdateBeam(); } } @@ -94,12 +123,12 @@ state InstantFireMode { local Vector HitLocation, HitNormal, TraceStart, TraceEnd; local Actor HitActor; - + // @TODO: Change the trace info on the other functions. TraceStart = WeaponFireLocation; TraceEnd = TraceStart + Vector(CurrentAim + Rotation) * TraceRange; HitActor = Trace(HitLocation, HitNormal, TraceEnd, TraceStart, true); - + Beam.StartEffect = TraceStart; if (HitActor != None) { @@ -119,21 +148,21 @@ state InstantFireMode if (bIsFiring) { FlashMuzzleFlash(); - + if (AmbientEffectEmitter != None) { AmbientEffectEmitter.SetEmitterStatus(true); } - + // Play firing noise if (bAmbientFireSound) AmbientSound = FireSoundClass; else PlayOwnedSound(FireSoundClass, SLOT_None, FireSoundVolume/255.0,, FireSoundRadius, FireSoundPitch, False); - + // Increase SavedDamage. SavedDamage += Damage * DeltaTime; - + UpdateBeam(); ProcessBeam(); } @@ -143,13 +172,13 @@ state InstantFireMode local Vector HitLocation, HitNormal, TraceStart, TraceEnd; local Actor HitActor; local int DamageAmount; - + TraceStart = WeaponFireLocation; TraceEnd = TraceStart + Vector(CurrentAim + Rotation) * TraceRange; HitActor = Trace(HitLocation, HitNormal, TraceEnd, TraceStart, true); - + DamageAmount = int(SavedDamage); - + // We didn't hit anything, but were still linked, so unlink. if (HitActor == None && LinkedTo != None) BreakLink(); @@ -178,7 +207,7 @@ state InstantFireMode LinkedTo = DestroyableObjective(HitActor); else if (HitActor.IsA('ONSPowerNodeShield') && DestroyableObjective(HitActor.Owner) != None && DestroyableObjective(HitActor.Owner).TeamLink(Team)) LinkedTo = DestroyableObjective(HitActor.Owner); - + // If we didn't link to anything, deal damage. if (HitActor != None && LinkedTo == None && DamageAmount >= MinimumDamage) { @@ -197,13 +226,13 @@ state InstantFireMode function CeaseFire(Controller C) { Super.CeaseFire(C); - + PlaySound(FireEnd, SLOT_None); - + // Destroy the beam. if (Beam != None) Beam.Destroy(); - + bIsFiring = false; } @@ -213,17 +242,17 @@ DefaultProperties Mesh = SkeletalMesh'UT3NightshadeAnims.NightshadeWeap'; RedSkin = Shader'UT3NightshadeTex.Nightshader.NightshadeSkin'; BlueSkin = Shader'UT3NightshadeTex.Nightshader.NightshadeSkinBlue'; - + // Bones. YawBone = "Turret_Yaw"; PitchBone = "Turret_Pitch"; WeaponFireAttachmentBone = "Turret_Pitch"; - + // Fire offset/speed. FireInterval = 0.0; AltFireInterval = 0.0; WeaponFireOffset = 5.0; - + // Damage/Aim. bInstantFire = true; TraceRange = 900; @@ -231,16 +260,16 @@ DefaultProperties Momentum = 50000.0; Damage = 120; MinimumDamage = 5.0; - + // Sound. - FireStart = Sound'UT3Nightshade.Sounds.FireStart'; - FireSoundClass = Sound'UT3Nightshade.Sounds.Fire'; - FireEnd = Sound'UT3Nightshade.Sounds.FireEnd;'; + FireStart = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_FireStart01'; + FireSoundClass = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_FireLoop01'; + FireEnd = Sound'UT3A_Vehicle_Nightshade.Sounds.A_Vehicle_Nightshade_FireStop01'; bAmbientFireSound = true; - + // Force feedback. FireForce = "LinkActivated"; - + // AI. AIInfo(0)=(bLeadTarget=True,bInstantHit=True,AimError=100,bTrySplash=False,bTossed=False,bLeadTarget=True,bFireOnRelease=False,RefireRate=0.0) } diff --git a/Classes/Weap_ViperGun.uc b/Classes/Weap_ViperGun.uc deleted file mode 100644 index 21a9d57..0000000 --- a/Classes/Weap_ViperGun.uc +++ /dev/null @@ -1,35 +0,0 @@ -//============================================================ -// UT3 Viper's Weapon -// Credits: 100GPing100(José Luís) -// Copytight José Luís, 2012 -// Contact: zeluis.100@gmail.com -//============================================================ -class Weap_ViperGun extends ONSWeapon; - -#exec audio import group=Sounds file=..\Sounds\UT3Viper\Fire.wav -#exec audio import group=Sounds file=..\Sounds\UT3Viper\Rotate01.wav - -DefaultProperties -{ - // Looks && Classes. - Mesh=Mesh'ONSWeapons-A.PlasmaGun'; - ProjectileClass=Class'UT3Viper.Proj_ViperBolt'; - - // Sound. - FireSoundClass=Sound'UT3Viper.Sounds.Fire'; - RotateSound=Sound'UT3Viper.Sounds.Rotate01'; - AmbientSoundScaling=0.5; - - // Aim - FireInterval=0.2; - PitchDownLimit=57000; // 60000 - YawBone=Rt_Front_TopFin; - PitchBone=Rt_Front_TopFin; - WeaponFireAttachmentBone=Rt_ShieldArm3_Damage; - - // AI. - AIInfo(0)=ONSWeaponAIInfo(bTrySplash=false, bLeadTarget=true, bInstantHit=false, AimError=750.0); - - // ForceFeedback. - FireForce="HoverBikeFire"; -} diff --git a/LICENSE.TXT b/LICENSE.TXT index 3f0ed2e..d95e06a 100644 --- a/LICENSE.TXT +++ b/LICENSE.TXT @@ -1,4 +1,4 @@ -Copyright © 2008-2010, 2013 GreatEmerald +Copyright © 2008-2010, 2013, 2014 GreatEmerald Copyright © 2007-2009 Wormbo Copyright © 2010 100GPing100 diff --git a/README.md b/README.md index a89ede7..86e6dab 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,17 @@ UT3Vehicles =========== The vehicles portion of the UT3Style mod for Unreal Tournament 2004. + +## How to compile + +* Clone this git repository into the `UT2004` folder. +* If not already, copy or link the contents of `Animations`, `Sounds`, `StaticMeshes`, `Textures` and `System` to their respective folders in `UT2004`. You also need to have the `UT3Common` package. +* Add to your `UT2004.ini` these lines, after the other `EditPackages` lines: +```ini +EditPackages=RagdollMadness +EditPackages=EONS-Scorpion_BETA3 +EditPackages=UT3Common +EditPackages=UT3Vehicles +``` +* (Re)move the `UT2004/System/UT3Vehicles.u` file. +* Run `ucc.exe make` from the command prompt, this should create a `UT3Vehicles.u` file in `UT2004/System`. diff --git a/Sounds/UT3A_Vehicle_Cicada.uax b/Sounds/UT3A_Vehicle_Cicada.uax new file mode 100644 index 0000000..e1a26cb Binary files /dev/null and b/Sounds/UT3A_Vehicle_Cicada.uax differ diff --git a/Sounds/UT3A_Vehicle_Goliath.uax b/Sounds/UT3A_Vehicle_Goliath.uax new file mode 100644 index 0000000..ea28353 Binary files /dev/null and b/Sounds/UT3A_Vehicle_Goliath.uax differ diff --git a/Sounds/UT3A_Vehicle_Hellbender.uax b/Sounds/UT3A_Vehicle_Hellbender.uax new file mode 100644 index 0000000..cee0407 Binary files /dev/null and b/Sounds/UT3A_Vehicle_Hellbender.uax differ diff --git a/Sounds/UT3A_Vehicle_Hoverboard.uax b/Sounds/UT3A_Vehicle_Hoverboard.uax new file mode 100644 index 0000000..527734a Binary files /dev/null and b/Sounds/UT3A_Vehicle_Hoverboard.uax differ diff --git a/Sounds/UT3A_Vehicle_Leviathan.uax b/Sounds/UT3A_Vehicle_Leviathan.uax new file mode 100644 index 0000000..06a4d13 Binary files /dev/null and b/Sounds/UT3A_Vehicle_Leviathan.uax differ diff --git a/Sounds/UT3A_Vehicle_Manta.uax b/Sounds/UT3A_Vehicle_Manta.uax new file mode 100644 index 0000000..187b0af Binary files /dev/null and b/Sounds/UT3A_Vehicle_Manta.uax differ diff --git a/Sounds/UT3A_Vehicle_Nightshade.uax b/Sounds/UT3A_Vehicle_Nightshade.uax new file mode 100644 index 0000000..6b03ea5 Binary files /dev/null and b/Sounds/UT3A_Vehicle_Nightshade.uax differ diff --git a/Sounds/UT3A_Vehicle_Paladin.uax b/Sounds/UT3A_Vehicle_Paladin.uax new file mode 100644 index 0000000..de9f815 Binary files /dev/null and b/Sounds/UT3A_Vehicle_Paladin.uax differ diff --git a/Sounds/UT3A_Vehicle_Raptor.uax b/Sounds/UT3A_Vehicle_Raptor.uax new file mode 100644 index 0000000..a342f50 Binary files /dev/null and b/Sounds/UT3A_Vehicle_Raptor.uax differ diff --git a/Sounds/UT3A_Vehicle_Scorpion.uax b/Sounds/UT3A_Vehicle_Scorpion.uax new file mode 100644 index 0000000..2b5ee60 Binary files /dev/null and b/Sounds/UT3A_Vehicle_Scorpion.uax differ diff --git a/Sounds/UT3A_Vehicle_Viper.uax b/Sounds/UT3A_Vehicle_Viper.uax new file mode 100644 index 0000000..937d643 Binary files /dev/null and b/Sounds/UT3A_Vehicle_Viper.uax differ diff --git a/Sounds/UT3Nightshade/EMPMine/EMP_Drop.wav b/Sounds/UT3Nightshade/EMPMine/EMP_Drop.wav new file mode 100644 index 0000000..95bdcda Binary files /dev/null and b/Sounds/UT3Nightshade/EMPMine/EMP_Drop.wav differ diff --git a/Sounds/UT3Nightshade/EMPMine/EMP_Shock.wav b/Sounds/UT3Nightshade/EMPMine/EMP_Shock.wav new file mode 100644 index 0000000..a768aa6 Binary files /dev/null and b/Sounds/UT3Nightshade/EMPMine/EMP_Shock.wav differ diff --git a/Sounds/UT3Nightshade/Shield/Shield_Ambient.wav b/Sounds/UT3Nightshade/Shield/Shield_Ambient.wav new file mode 100644 index 0000000..654b617 Binary files /dev/null and b/Sounds/UT3Nightshade/Shield/Shield_Ambient.wav differ diff --git a/Sounds/UT3Nightshade/Shield/Shield_Close.wav b/Sounds/UT3Nightshade/Shield/Shield_Close.wav new file mode 100644 index 0000000..91d8020 Binary files /dev/null and b/Sounds/UT3Nightshade/Shield/Shield_Close.wav differ diff --git a/Sounds/UT3Nightshade/Shield/Shield_Hit.wav b/Sounds/UT3Nightshade/Shield/Shield_Hit.wav new file mode 100644 index 0000000..f22ae4a Binary files /dev/null and b/Sounds/UT3Nightshade/Shield/Shield_Hit.wav differ diff --git a/Sounds/UT3Nightshade/Shield/Shield_Open.wav b/Sounds/UT3Nightshade/Shield/Shield_Open.wav new file mode 100644 index 0000000..6d8b96c Binary files /dev/null and b/Sounds/UT3Nightshade/Shield/Shield_Open.wav differ diff --git a/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Close.wav b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Close.wav new file mode 100644 index 0000000..d795169 Binary files /dev/null and b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Close.wav differ diff --git a/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Enter.wav b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Enter.wav new file mode 100644 index 0000000..f3f98bd Binary files /dev/null and b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Enter.wav differ diff --git a/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Exit.wav b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Exit.wav new file mode 100644 index 0000000..c737fd9 Binary files /dev/null and b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Exit.wav differ diff --git a/Sounds/UT3Nightshade/SlowVolume/SlowVolume_InsideAmbient.wav b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_InsideAmbient.wav new file mode 100644 index 0000000..f48ffc4 Binary files /dev/null and b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_InsideAmbient.wav differ diff --git a/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Open.wav b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Open.wav new file mode 100644 index 0000000..bb8a340 Binary files /dev/null and b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_Open.wav differ diff --git a/Sounds/UT3Nightshade/SlowVolume/SlowVolume_OutsideAmbient.wav b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_OutsideAmbient.wav new file mode 100644 index 0000000..2f722c5 Binary files /dev/null and b/Sounds/UT3Nightshade/SlowVolume/SlowVolume_OutsideAmbient.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active01.wav b/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active01.wav new file mode 100644 index 0000000..47e3f8e Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active01.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active02.wav b/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active02.wav new file mode 100644 index 0000000..68b217c Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active02.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active03.wav b/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active03.wav new file mode 100644 index 0000000..340b943 Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Active03.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Drop.wav b/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Drop.wav new file mode 100644 index 0000000..8454a91 Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/SpiderMine_Drop.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_Attack01.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_Attack01.wav new file mode 100644 index 0000000..97a462b Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_Attack01.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_Attack02.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_Attack02.wav new file mode 100644 index 0000000..27b7be6 Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_Attack02.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_Attack03.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_Attack03.wav new file mode 100644 index 0000000..ec14af9 Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_Attack03.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_DrillHuman.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_DrillHuman.wav new file mode 100644 index 0000000..9c7e06d Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_DrillHuman.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_DrillRobot.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_DrillRobot.wav new file mode 100644 index 0000000..d803916 Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_DrillRobot.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_Explode01.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_Explode01.wav new file mode 100644 index 0000000..8388b63 Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_Explode01.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_Explode02.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_Explode02.wav new file mode 100644 index 0000000..bb9bfb2 Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_Explode02.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_Explode03.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_Explode03.wav new file mode 100644 index 0000000..9a8f066 Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_Explode03.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_Walk01.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_Walk01.wav new file mode 100644 index 0000000..7a1a32c Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_Walk01.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_Walk02.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_Walk02.wav new file mode 100644 index 0000000..fb50eee Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_Walk02.wav differ diff --git a/Sounds/UT3Nightshade/SpiderMine/Spider_Walk03.wav b/Sounds/UT3Nightshade/SpiderMine/Spider_Walk03.wav new file mode 100644 index 0000000..85df946 Binary files /dev/null and b/Sounds/UT3Nightshade/SpiderMine/Spider_Walk03.wav differ diff --git a/Sounds/UT3SPMA.uax b/Sounds/UT3SPMA.uax new file mode 100644 index 0000000..6a1c7b1 Binary files /dev/null and b/Sounds/UT3SPMA.uax differ diff --git a/Sounds/note.txt b/Sounds/note.txt new file mode 100644 index 0000000..402d982 --- /dev/null +++ b/Sounds/note.txt @@ -0,0 +1 @@ +GEm: We also need UT3Weapons and UT3Weapons2 from UT3Style, but I don't want to duplicate entries diff --git a/StaticMeshes/EONSLocustSM.usx b/StaticMeshes/EONSLocustSM.usx new file mode 100644 index 0000000..7ac77a8 Binary files /dev/null and b/StaticMeshes/EONSLocustSM.usx differ diff --git a/StaticMeshes/UT3GoliathSM.usx b/StaticMeshes/UT3GoliathSM.usx new file mode 100644 index 0000000..47bd705 Binary files /dev/null and b/StaticMeshes/UT3GoliathSM.usx differ diff --git a/StaticMeshes/UT3MantaSM.usx b/StaticMeshes/UT3MantaSM.usx new file mode 100644 index 0000000..1012015 Binary files /dev/null and b/StaticMeshes/UT3MantaSM.usx differ diff --git a/StaticMeshes/UT3NightshadeSM.usx b/StaticMeshes/UT3NightshadeSM.usx new file mode 100644 index 0000000..3a30689 Binary files /dev/null and b/StaticMeshes/UT3NightshadeSM.usx differ diff --git a/StaticMeshes/UT3PaladinSM.usx b/StaticMeshes/UT3PaladinSM.usx new file mode 100644 index 0000000..d81e799 Binary files /dev/null and b/StaticMeshes/UT3PaladinSM.usx differ diff --git a/StaticMeshes/UT3SPMAEffects.usx b/StaticMeshes/UT3SPMAEffects.usx new file mode 100644 index 0000000..1a13e06 Binary files /dev/null and b/StaticMeshes/UT3SPMAEffects.usx differ diff --git a/StaticMeshes/UT3SPMAReticle.usx b/StaticMeshes/UT3SPMAReticle.usx new file mode 100644 index 0000000..0d5efab Binary files /dev/null and b/StaticMeshes/UT3SPMAReticle.usx differ diff --git a/StaticMeshes/UT3ScorpionSM.usx b/StaticMeshes/UT3ScorpionSM.usx new file mode 100644 index 0000000..f29199c Binary files /dev/null and b/StaticMeshes/UT3ScorpionSM.usx differ diff --git a/StaticMeshes/UT3ViperSM.usx b/StaticMeshes/UT3ViperSM.usx new file mode 100644 index 0000000..b054f53 Binary files /dev/null and b/StaticMeshes/UT3ViperSM.usx differ diff --git a/System/EONS-Scorpion_BETA3.u b/System/EONS-Scorpion_BETA3.u new file mode 100644 index 0000000..2c51d5d Binary files /dev/null and b/System/EONS-Scorpion_BETA3.u differ diff --git a/System/EONS-Scorpion_BETA3.ucl b/System/EONS-Scorpion_BETA3.ucl new file mode 100644 index 0000000..b2f5a22 --- /dev/null +++ b/System/EONS-Scorpion_BETA3.ucl @@ -0,0 +1,2 @@ +Vehicle=(ClassName=EONS-Scorpion_BETA3.EONSScorpion,FriendlyName=EONS-Scorpion_BETA3.EONSScorpion.VehicleNameString,FallbackName="EONS Scorpion",FallbackDesc="EONS Scorpion") +Vehicle=(ClassName=EONS-Scorpion_BETA3.EONSStrider,FriendlyName=EONS-Scorpion_BETA3.EONSStrider.VehicleNameString,FallbackName="EONS Strider",FallbackDesc="EONS Strider") \ No newline at end of file diff --git a/System/RagdollMadness.int b/System/RagdollMadness.int new file mode 100644 index 0000000..1f5378a --- /dev/null +++ b/System/RagdollMadness.int @@ -0,0 +1,2 @@ +[Public] +Object=(Class=Class,MetaClass=Xinterface.GUIUserKeyBinding,Name=RagdollMadness.RagdollMadnessbinding) \ No newline at end of file diff --git a/System/RagdollMadness.u b/System/RagdollMadness.u new file mode 100644 index 0000000..945a448 Binary files /dev/null and b/System/RagdollMadness.u differ diff --git a/System/RagdollMadness.ucl b/System/RagdollMadness.ucl new file mode 100644 index 0000000..cb90a1d --- /dev/null +++ b/System/RagdollMadness.ucl @@ -0,0 +1,5 @@ +Mutator=(ClassName=RagdollMadness.FDMut,GroupName=RM Base,IconMaterialName=MutatorArt.nosym,FriendlyName=RagdollMadness.FDMut.FriendlyName,Description=RagdollMadness.FDMut.Description,FriendlyName=RagdollMadness.FDMut.FriendlyName,FallbackName="Ragdoll Madness: Base mutator",FallbackDesc="Just gives the feign death and player ragdolling features. ||| Scripted by Kognefaure, with the help of Foxpaw's Karma ragdoll injury system (Unrealwiki.com)") +Mutator=(ClassName=RagdollMadness.HardBodyMut,GroupName=RMHarpoons,IconMaterialName=MutatorArt.nosym,FriendlyName=RagdollMadness.HardBodyMut.FriendlyName,Description=RagdollMadness.HardBodyMut.Description,FriendlyName=RagdollMadness.HardBodyMut.FriendlyName,FallbackName="Ragdoll Madness: Harpoons BETA",FallbackDesc="Gives the ability to place harpoon traps. | Once a trap detects a player, it fires a harpoon at him. If it hits, the player gets impaled and is tracted toward the trap. The player will be dropped a few times before being released (as long as he has survived...). | You cannot destroy a trap, but some weapons can enhance them with special features. || Scripted by Kognefaure") +Mutator=(ClassName=RagdollMadness.RagdollPhysicsMut,GroupName=Ragdoll Physics mut,IconMaterialName=MutatorArt.nosym,FriendlyName=RagdollMadness.RagdollPhysicsMut.FriendlyName,Description=RagdollMadness.RagdollPhysicsMut.Description,FriendlyName=RagdollMadness.RagdollPhysicsMut.FriendlyName,FallbackName="Ragdoll madness: Physics",FallbackDesc="Just customize lots of properties linked to the physics of ragdolls simulation ||| Scripted by Kognefaure") +Mutator=(ClassName=RagdollMadness.WeedsMut,GroupName=Weeds mutator,IconMaterialName=MutatorArt.nosym,FriendlyName=RagdollMadness.WeedsMut.FriendlyName,Description=RagdollMadness.WeedsMut.Description,FriendlyName=RagdollMadness.WeedsMut.FriendlyName,FallbackName="Ragdoll Madness: Softies!",FallbackDesc="The players can't stand pain and fall down when they are badly hit. |A player falls down when the sum of the damages he gets are higher than the Fall Down Damage property. This sum reduces over time. ||| Scripted by Kognefaure") +Weapon=(ClassName=RagdollMadness.RagdollMadness_TrapWeapon,PickupClassName=XWeapons.Transpickup,AttachmentClassName=XWeapons.TransAttachment,FriendlyName=RagdollMadness.RagdollMadness_TrapWeapon.ItemName,Description=RagdollMadness.RagdollMadness_TrapWeapon.Description,FallbackName="Harpoon trap",FallbackDesc="Harpoon trap") \ No newline at end of file diff --git a/TODO.TXT b/TODO.TXT new file mode 100644 index 0000000..76b77c9 --- /dev/null +++ b/TODO.TXT @@ -0,0 +1,21 @@ +* Cicada: Mesh parts do not animate +* Raptor: No landing sequence +* Paladin, SPMA: Weird physics when running into one +* Paladin: Add static mesh collision (or more boxes) ++ Check materials +* Leviathan: Create a collision mesh +* Scorpion: Add a Denied! announcement +* Scorpion: Make AI use self-destruct +* Hoverboard: Make the dummy roll around and the pawn collide to counter Karma's Excessive Joint Error +* Hoverboard: Make AI use them +* Hoverboard: Add more animations +* Hoverboard: Add towing +* Hoverboard: Test on blue +* Hoverboard: Low-FPS situations over water don't work well (get better way to check for being over water?) +* SPMA: Defenders love throwing cameras instead of shells +* SPMA: Weird collision +* SPMA: The AI is a bit too good at what it does (aim fuzziness + longer delays?) +* SPMA: Multi-camera watchguard doesn't seem to work as well as it should +* SPMA: Check animations when deployed and exiting +* SPMA: Weird AVRIL lock-on point and collision + diff --git a/Textures/EONSLocustTex.utx b/Textures/EONSLocustTex.utx new file mode 100644 index 0000000..adec27c Binary files /dev/null and b/Textures/EONSLocustTex.utx differ diff --git a/Textures/SPMASmoke.dds b/Textures/SPMASmoke.dds new file mode 100644 index 0000000..e78d2b6 Binary files /dev/null and b/Textures/SPMASmoke.dds differ diff --git a/Textures/UT3CicadaTex.utx b/Textures/UT3CicadaTex.utx new file mode 100644 index 0000000..eb38936 Binary files /dev/null and b/Textures/UT3CicadaTex.utx differ diff --git a/Textures/UT3FuryTex.utx b/Textures/UT3FuryTex.utx new file mode 100644 index 0000000..4b15ae4 Binary files /dev/null and b/Textures/UT3FuryTex.utx differ diff --git a/Textures/UT3GoliathTex.utx b/Textures/UT3GoliathTex.utx new file mode 100644 index 0000000..a1c6232 Binary files /dev/null and b/Textures/UT3GoliathTex.utx differ diff --git a/Textures/UT3HellbenderTex.utx b/Textures/UT3HellbenderTex.utx new file mode 100644 index 0000000..014e7b8 Binary files /dev/null and b/Textures/UT3HellbenderTex.utx differ diff --git a/Textures/UT3LeviathanTex.utx b/Textures/UT3LeviathanTex.utx new file mode 100644 index 0000000..ce5b41b Binary files /dev/null and b/Textures/UT3LeviathanTex.utx differ diff --git a/Textures/UT3MantaTex.utx b/Textures/UT3MantaTex.utx new file mode 100644 index 0000000..ca43ecf Binary files /dev/null and b/Textures/UT3MantaTex.utx differ diff --git a/Textures/UT3NemesisTex.utx b/Textures/UT3NemesisTex.utx new file mode 100644 index 0000000..8f4e60b Binary files /dev/null and b/Textures/UT3NemesisTex.utx differ diff --git a/Textures/UT3NightShadeTex.utx b/Textures/UT3NightShadeTex.utx new file mode 100644 index 0000000..891c6e9 Binary files /dev/null and b/Textures/UT3NightShadeTex.utx differ diff --git a/Textures/UT3PaladinTex.utx b/Textures/UT3PaladinTex.utx new file mode 100644 index 0000000..13932cd Binary files /dev/null and b/Textures/UT3PaladinTex.utx differ diff --git a/Textures/UT3RaptorTex.utx b/Textures/UT3RaptorTex.utx new file mode 100644 index 0000000..dcf07bb Binary files /dev/null and b/Textures/UT3RaptorTex.utx differ diff --git a/Textures/UT3SPMATex.utx b/Textures/UT3SPMATex.utx new file mode 100644 index 0000000..b096d1a Binary files /dev/null and b/Textures/UT3SPMATex.utx differ diff --git a/Textures/UT3ScorpionTex.utx b/Textures/UT3ScorpionTex.utx new file mode 100644 index 0000000..d95de37 Binary files /dev/null and b/Textures/UT3ScorpionTex.utx differ diff --git a/Textures/UT3StealthBenderTex.utx b/Textures/UT3StealthBenderTex.utx new file mode 100644 index 0000000..86e06cb Binary files /dev/null and b/Textures/UT3StealthBenderTex.utx differ diff --git a/Textures/UT3ViperTex.utx b/Textures/UT3ViperTex.utx new file mode 100644 index 0000000..ec2e768 Binary files /dev/null and b/Textures/UT3ViperTex.utx differ diff --git a/Textures/Unused/UT3DarkWalker.utx b/Textures/Unused/UT3DarkWalker.utx new file mode 100644 index 0000000..836c4cc Binary files /dev/null and b/Textures/Unused/UT3DarkWalker.utx differ diff --git a/Textures/Unused/UT3ScavengerTex.utx b/Textures/Unused/UT3ScavengerTex.utx new file mode 100644 index 0000000..1d64e5a Binary files /dev/null and b/Textures/Unused/UT3ScavengerTex.utx differ diff --git a/Textures/Unused/UT3ViperTex - 24.july.2013.utx b/Textures/Unused/UT3ViperTex - 24.july.2013.utx new file mode 100644 index 0000000..2c28b4e Binary files /dev/null and b/Textures/Unused/UT3ViperTex - 24.july.2013.utx differ diff --git a/Textures/Unused/UT3ViperTex_.utx b/Textures/Unused/UT3ViperTex_.utx new file mode 100644 index 0000000..78bbb4c Binary files /dev/null and b/Textures/Unused/UT3ViperTex_.utx differ