Áƒ*žM@Ž&j&Ú\ž:Æ;@•ĩŽÎΞEMNoneTickPredictLocationDemoRecSpectatorMutPingCompensationPingCompensation2bAddToServerPackages ShockProjEngine UnrealPawn FriendlyNameGetLocalPlayerControllerbAlwaysRelevant MovementCore LightColorForce Collision RemoteRoleSystem Description LightingKarmaPawn GroupNameRedeemerProjectilePhysicsVolumePlayerController LevelInfo ReturnValue Velocity LocationZA ScriptTextLevelVehicleActorRoleClassPackage TextBufferCollisionRadiusCollisionHeightbCollideActorsPhysicsObjectbCollideWorld bProjTarget RotationRate FunctionVectorHealth AccelerationGravityStartLocationNetMode LocalPlayerPing HitLocation HitNormal DeltaTimeOther PrePivot ExactPingStructStructPropertyObjectPropertyFloatProperty BoolPropertyPredictedTime CheckWallsPredictedLocation ErrorDiff IntProperty BytePropertyMutator ‚ €‚†††Œ†† €0tĖŠ„š9:‡9:$š9:‡9:$ ××ÖÕ  Ļ9?,Õ  Š ‰_×Ô Š  ‰_‚š9:‡9:$‚wuaØÔ#€?á Š(×Ô#€?Ô#€?€?‘* ‰ØÃ‚— %hw[a×(×Ô#€?Ô#€?€?‘*ØE°6’333ŋāÕĢ9?,Û_āÕÛŽ‚ą6’333?š9:‡9:$×Õš™™>Õ333?Ļ … G!u7class MutPingCompensation extends Mutator; var PlayerController LocalPlayer; simulated function Tick(float DeltaTime) { local Actor A; local float Ping; if ( Level.NetMode != NM_Client ) { Disable('Tick'); return; } if ( LocalPlayer == None ) LocalPlayer = Level.GetLocalPlayerController(); if ( LocalPlayer == None ) return; else if ( LocalPlayer.IsA('DemoRecSpectator') ) { Disable('Tick'); return; } Ping = LocalPlayer.ExactPing; foreach DynamicActors(class'Actor', A) { if ( !A.IsA('Pawn') && !A.IsA('ShockProj') && !A.IsA('RedeemerProjectile') ) continue; if ( A.bProjTarget && A.Physics != PHYS_None && A.Physics != PHYS_Rotating && (A.Velocity != vect(0,0,0) || A.Acceleration != vect(0,0,0)) && A.RotationRate == rot(0,0,0) && A.bCollideActors && A.Role < ROLE_Authority && (Pawn(A) == None || Pawn(A).Health > 0) ) { if ( A.bCollideWorld && (Vehicle(A) != None || A.IsA('UnrealPawn')) ) A.PrePivot = 0.5 * (A.PrePivot + A.default.PrePivot + PredictLocation(A, Ping, 2) - A.Location); else A.PrePivot = 0.5 * (A.PrePivot + A.default.PrePivot + PredictLocation(A, Ping) - A.Location); } else if ( A.PrePivot != A.default.PrePivot ) A.PrePivot = A.default.PrePivot; } } static simulated function vector PredictLocation(Actor Other, float PredictedTime, optional int CheckWalls) { local vector StartLocation, PredictedLocation, ErrorDiff; local vector HitLocation, HitNormal; // calculate predicted location without taking level geometry into account if ( Other.Physics == PHYS_Falling || Other.Physics == PHYS_Karma ) PredictedLocation = Square(PredictedTime) * Other.PhysicsVolume.Gravity / 4 + PredictedTime * Other.Velocity + Other.Location; else { PredictedLocation = Other.Velocity * PredictedTime + Other.Location; // adjust direction for walking players if ( Other.Physics == PHYS_Walking && Other.Trace(HitLocation, HitNormal, PredictedLocation - vect(0,0,1) * VSize(Other.Velocity), PredictedLocation, False, vect(0,0,1) * Other.CollisionHeight + vect(1,1,0) * Other.CollisionRadius) != None ) PredictedLocation = HitLocation; } StartLocation = Other.Location; ErrorDiff = PredictedLocation - StartLocation; // check for walls and adjust predicted location while ( CheckWalls > 0 && Other.Trace(HitLocation, HitNormal, ErrorDiff + StartLocation, StartLocation, False, vect(0,0,1) * Other.CollisionHeight + vect(1,1,0) * Other.CollisionRadius) != None ) { // HitLocation is a point on the plane the player will most likely hit // HitNormal is that plane's normal vector ErrorDiff = PredictedLocation - HitLocation; if ( HitNormal.Z < -0.7 ) PredictedLocation -= 2 * (ErrorDiff dot HitNormal) * HitNormal; // bounce off a ceiling else PredictedLocation -= (ErrorDiff dot HitNormal) * HitNormal; // project the predicted location onto the plane // If the player can land on this plane, i.e. if this is the ground, then adjust the predicted location. // (the player will most probably not run in the same direction after landing) if ( HitNormal.Z > 0.7 && Other.Physics == PHYS_Falling ) PredictedLocation = 0.3 * PredictedLocation + 0.7 * HitLocation; // it's close enough to the real thing StartLocation = HitLocation; CheckWalls--; } return PredictedLocation; } ĸ ­"›9:–™9:$v! Br*– Rr* ooa/!v!  Ĩ/a9 ‚Ũ‚‚a/!a/!a/!1Õ‚‚‚‚‚‚‚- ›9:‡9:$›9:‡9:$@„Ú Š#Ú Ÿ#Ž ¤"-Ŗ–9:š9:$)„r.‹*—.‹Ą%|‚-—$„w.œ*a/!  „Õ?Ø×× „ „ , ‰Ō „Õ?Ø×× „ „  ‰Ú „ „ „ „10 G€€†• ˙˙˙˙˙˙˙˙€˙˙˙˙˙˙˙˙˙˙22ßōY‰•jõûW‚´–C‚´–C‚´–C”Ą‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C”k”kŒm?ŽĢŒm?ŽĢ‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‚´–C‹Ī Mˆ H Zˆ < gˆ ; t9 Aˆ 7 Nˆ I [Ž F hŽ: t› G @“ELž"4@8Q“ĸH QVŽ= Y_ˆ  e_•x r_