Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TMPPlayer extends Pawn;
- // World position and movement
- var vector JGPosition;
- var Quat JGRotation;
- var vector JGVelocity;
- var float Throttle;
- replication
- {
- reliable if(Role < ROLE_Authority)
- Throttle;
- reliable if(Role == ROLE_Authority)
- JGPosition, JGRotation, JGVelocity;
- }
- event TakeDamage( int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType)
- {
- }
- event Bump(Actor other)
- {
- }
- event PreBeginPlay(){
- SetPhysics(PHYS_None);
- JGPosition = Location;
- JGRotation.X = 0;
- JGRotation.Y = 0;
- JGRotation.Z = 0;
- JGRotation.W = 1;
- Log("bNetTemporary - "@bNetTemporary);
- Log("bStatic - "@bStatic);
- Log("bNoDelete - "@bNoDelete);
- Log("Role - "@RemoteRole);
- Log("bAlwaysRelevant - "@bAlwaysRelevant);
- Log("bHidden - "@bHidden );
- Log("bBlockPlayers - "@bBlockPlayers );
- }
- //simulated
- event Tick( float DeltaTime ){
- log("Throttle:"@string(Throttle)@"Role - "@RemoteRole);
- }
- function rotator GetRotation(){
- return QuatToRotator(JGRotation);
- }
- function float GetMass(){
- return 5;
- }
- function int GetPower(){
- return 10;
- }
- static final function Quat QuatNormalize( Quat Q )
- {
- local float mag;
- Mag = ( Q.X*Q.X ) + ( Q.Y*Q.Y ) + ( Q.Z*Q.Z ) + ( Q.W*Q.W );
- Q.X = Q.X / Mag;
- Q.Y = Q.Y / Mag;
- Q.Z = Q.Z / Mag;
- Q.W = Q.W / Mag;
- return Q;
- }
- defaultproperties
- {
- bAlwaysRelevant = true
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement