Advertisement
Guest User

TMPPlayer

a guest
Jan 30th, 2013
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class TMPPlayer extends Pawn;
  2.  
  3. // World position and movement
  4. var vector JGPosition;
  5. var Quat   JGRotation;
  6. var vector JGVelocity;
  7.  
  8. var float Throttle;
  9.  
  10. replication
  11. {
  12.   reliable if(Role < ROLE_Authority)
  13.     Throttle;
  14.  
  15.   reliable if(Role == ROLE_Authority)
  16.     JGPosition, JGRotation, JGVelocity;
  17. }
  18.  
  19. event TakeDamage( int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType)
  20. {
  21. }
  22.  
  23. event Bump(Actor other)
  24. {
  25. }
  26.  
  27. event PreBeginPlay(){
  28.  SetPhysics(PHYS_None);
  29.  JGPosition = Location;
  30.  JGRotation.X = 0;
  31.  JGRotation.Y = 0;
  32.  JGRotation.Z = 0;
  33.  JGRotation.W = 1;
  34.  Log("bNetTemporary - "@bNetTemporary);
  35.  Log("bStatic  - "@bStatic);
  36.  Log("bNoDelete - "@bNoDelete);
  37.  Log("Role - "@RemoteRole);
  38.  Log("bAlwaysRelevant  - "@bAlwaysRelevant);
  39.  Log("bHidden   - "@bHidden );
  40.  Log("bBlockPlayers   - "@bBlockPlayers );
  41. }
  42.  
  43. //simulated
  44. event Tick( float DeltaTime ){
  45.  log("Throttle:"@string(Throttle)@"Role - "@RemoteRole);
  46. }
  47.  
  48. function rotator GetRotation(){
  49.  return QuatToRotator(JGRotation);
  50. }
  51.  
  52. function float GetMass(){
  53.  return 5;
  54. }
  55.  
  56. function int GetPower(){
  57.  return 10;
  58. }
  59.  
  60. static final function Quat QuatNormalize( Quat Q )
  61. {
  62.     local float mag;
  63.  
  64.     Mag = ( Q.X*Q.X ) + ( Q.Y*Q.Y ) + ( Q.Z*Q.Z ) + ( Q.W*Q.W );
  65.     Q.X = Q.X / Mag;
  66.     Q.Y = Q.Y / Mag;
  67.     Q.Z = Q.Z / Mag;
  68.     Q.W = Q.W / Mag;
  69.  
  70.     return Q;
  71. }
  72.  
  73. defaultproperties
  74. {
  75.   bAlwaysRelevant = true
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement