Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. package RocketLeague{
  2. function WheeledVehicleData::onCollision(%this, %obj, %col, %vec, %speed)
  3. {
  4. %name2 = %col.getdatablock();
  5. %name2 = %name2.getname();
  6. %vecx = getwords(%vec, 0);
  7. %vecy = getwords(%vec, 1);
  8. %vecz = getwords(%vec, 2);
  9. %vecxinv = VectorScale(%vecx, -1);
  10. %vecyinv = VectorScale(%vecy, -1);
  11.  
  12. if(%name2 $= "BallVehicle"){
  13. if(!%obj.isRLCooldown){
  14. %obj.isRLCooldown = 1;
  15. %newvec = %vecxinv SPC %vecyinv SPC %vecz + 2;
  16. %col.setvelocity(vectorAdd(%speed * 2, %newvec SPC "2"));
  17. schedule(1000,0,%obj.isRLCooldown = 0);
  18. }
  19.  
  20. }
  21. Parent::onCollision(%this, %obj, %col, %vec, %speed);
  22. }
  23. };
  24. activatepackage(RocketLeague);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement