Homophobe

Port killcams

Aug 30th, 2019
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. finalkillcam( winner )
  2. {
  3. self endon( "disconnect" );
  4. level endon( "game_ended" );
  5. if ( waslastround() )
  6. {
  7. setmatchflag( "final_killcam", 1 );
  8. setmatchflag( "round_end_killcam", 0 );
  9. }
  10. else
  11. {
  12. setmatchflag( "final_killcam", 0 );
  13. setmatchflag( "round_end_killcam", 1 );
  14. }
  15. /#
  16. if ( getDvarInt( "scr_force_finalkillcam" ) == 1 )
  17. {
  18. setmatchflag( "final_killcam", 1 );
  19. setmatchflag( "round_end_killcam", 0 );
  20. #/
  21. }
  22. if ( level.console )
  23. {
  24. self maps/mp/gametypes/_globallogic_spawn::setthirdperson( 0 );
  25. }
  26. killcamsettings = level.finalkillcamsettings[ winner ];
  27. postdeathdelay = ( getTime() - killcamsettings.deathtime ) / 1000;
  28. predelay = postdeathdelay + killcamsettings.deathtimeoffset;
  29. camtime = calckillcamtime( killcamsettings.weapon, killcamsettings.entitystarttime, predelay, 0, undefined );
  30. postdelay = calcpostdelay();
  31. killcamoffset = camtime + predelay;
  32. killcamlength = ( camtime + postdelay ) - 0,05;
  33. killcamstarttime = getTime() - ( killcamoffset * 1000 );
  34. self notify( "begin_killcam" );
  35. self.sessionstate = "spectator";
  36. self.spectatorclient = killcamsettings.spectatorclient;
  37. self.killcamentity = -1;
  38. if ( killcamsettings.entityindex >= 0 )
  39. {
  40. self thread setkillcamentity( killcamsettings.entityindex, killcamsettings.entitystarttime - killcamstarttime - 100 );
  41. }
  42. self.killcamtargetentity = killcamsettings.targetentityindex;
  43. self.archivetime = killcamoffset;
  44. self.killcamlength = killcamlength;
  45. self.psoffsettime = killcamsettings.offsettime;
  46. _a613 = level.teams;
  47. _k613 = getFirstArrayKey( _a613 );
  48. while ( isDefined( _k613 ) )
  49. {
  50. team = _a613[ _k613 ];
  51. self allowspectateteam( team, 1 );
  52. _k613 = getNextArrayKey( _a613, _k613 );
  53. }
  54. self allowspectateteam( "freelook", 1 );
  55. self allowspectateteam( "none", 1 );
  56. self thread endedfinalkillcamcleanup();
  57. wait 0,05;
  58. if ( self.archivetime <= predelay )
  59. {
  60. self.sessionstate = "dead";
  61. self.spectatorclient = -1;
  62. self.killcamentity = -1;
  63. self.archivetime = 0;
  64. self.psoffsettime = 0;
  65. self notify( "end_killcam" );
  66. return;
  67. }
  68. self thread checkforabruptkillcamend();
  69. self.killcam = 1;
  70. if ( !self issplitscreen() )
  71. {
  72. self addkillcamtimer( camtime );
  73. }
  74. self thread waitkillcamtime();
  75. self thread waitfinalkillcamslowdown( level.finalkillcamsettings[ winner ].deathtime, killcamstarttime );
  76. self waittill( "end_killcam" );
  77. self endkillcam( 1 );
  78. setmatchflag( "final_killcam", 0 );
  79. setmatchflag( "round_end_killcam", 0 );
  80. self spawnendoffinalkillcam();
  81. }
RAW Paste Data