Помогите отделить управление камерой от основного кода.

Domneriot

Новичок
Автор темы
2
0
CLEO:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread "SWOOP"
wait 1200
0391: release_textures
0390: load_txd_dictionary 'LD_BEAT'
038F: load_texture "CRING" as 10 // Load dictionary with 0390 first

:SWOOP_38
wait 0
if
   Player.Defined(0)
jf @SWOOP_38
if
0ADC:   test_cheat "WASP"
jf @SWOOP_38
9@ = Audiostream.Load("SWOOP\SWOOPCHANGE.MP3")
0665: get_actor $PLAYER_ACTOR model_to $240
Audiostream.PerformAction(9@, PLAY)
023C: load_special_actor '()SWP' as 1 // models 290-299
038B: load_requested_models
09C7: change_player 0 model_to #SPECIAL01
Model.Load($240)
038B: load_requested_models
055E: set_player $PLAYER_CHAR max_health += 10000
Actor.Health($PLAYER_ACTOR) = 10000
Actor.SetMaxHealth($PLAYER_ACTOR, 10000)
Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1)
wait 20
0A8C: write_memory 7600773 size 1 value 144 virtual_protect 1
0A8C: write_memory 7600815 size 1 value 144 virtual_protect 1
0A8C: write_memory 7600816 size 2 value 37008 virtual_protect 1
0A8C: write_memory 7612591 size 1 value 144 virtual_protect 1
0A8C: write_memory 7612646 size 1 value 144 virtual_protect 1
0A8C: write_memory 7612647 size 2 value 37008 virtual_protect 1
0489: set_actor $PLAYER_ACTOR muted 1
0629: change_integer_stat 13 to 100
062A: change_float_stat 75 to 400.0
wait 50
Audiostream.Release(9@)

:SWOOP_310
wait 0
if
80E1:   not player 0 pressed_key 15
jf @SWOOP_831
0AB1: call_scm_func @SWOOP_1326 1 $PLAYER_ACTOR 
if
   Actor.Model($PLAYER_ACTOR) == #SPECIAL02
jf @SWOOP_406
0AB1: call_scm_func @SWOOP_2284 1 $PLAYER_ACTOR 
if
82D8:   not actor $PLAYER_ACTOR current_weapon == 0
jf @SWOOP_590
048F: actor $PLAYER_ACTOR remove_weapons
jump @SWOOP_590

:SWOOP_406
07CC: set_player 0 can_enter_exit_vehicles 0
0AB1: call_scm_func @SWOOP_2689 1 1.0 1@ 2@ 3@ 
0AB1: call_scm_func @SWOOP_2522 3 1@ 2@ 3@ 10@ 11@ 
03E3: set_texture_to_be_drawn_antialiased 1
038D: draw_texture 10 position 10@ 11@ size 25.0 25.0 RGBA 255 0 0 255
03F0: enable_text_draw 0
gosub @SWOOP_627
0AB1: call_scm_func @SWOOP_4078 1 $PLAYER_ACTOR 
if
02E0:   actor $PLAYER_ACTOR firing_weapon
jf @SWOOP_548
0AB1: call_scm_func @SWOOP_2938 1 $PLAYER_ACTOR 

:SWOOP_548
if
82D8:   not actor $PLAYER_ACTOR current_weapon == 32
jf @SWOOP_590
Model.Destroy(#TEC9)
Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Tec9, 99999)
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 32

:SWOOP_590
if
0ADC:   test_cheat "N"
jf @SWOOP_310
09C7: change_player $PLAYER_CHAR model_to $240
wait 500
jump @SWOOP_38

:SWOOP_627
if or
0AB0:   key_pressed 82
   Actor.Animation($PLAYER_ACTOR) == "SAWNOFF_RELOAD"
jf @SWOOP_669
0629: change_integer_stat 13 to 100

:SWOOP_669
return
9@ = Audiostream.Load("SWOOP\SWOOPCHANGE.MP3")
Player.CanMove(0) = True
Actor.SetWalkStyle($PLAYER_ACTOR, "PLAYER")
0A8C: write_memory 6330958 size 4 value -1869574000 virtual_protect 1
0A8C: write_memory 6330962 size 2 value 37008 virtual_protect 1
0687: clear_actor $PLAYER_ACTOR task
jf @SWOOP_762

:SWOOP_762
Camera.Restore
Camera.SetBehindPlayer
07CC: set_player 0 can_enter_exit_vehicles 1
062A: change_float_stat 75 to 4000.0
Audiostream.PerformAction(9@, PLAY)
0489: set_actor $PLAYER_ACTOR muted 0
wait 50
0687: clear_actor $PLAYER_ACTOR task
0A92: create_custom_thread "SWOOP.CS" 
09C7: change_player $PLAYER_CHAR model_to $240
wait 50
0A93: end_custom_thread

:SWOOP_831
0687: clear_actor $PLAYER_ACTOR task
0AB1: call_scm_func @SWOOP_856 1 $PLAYER_ACTOR 
jump @SWOOP_310

:SWOOP_856
if
   Actor.Model(0@) == #SPECIAL01
jf @SWOOP_1105
07CC: set_player 0 can_enter_exit_vehicles 0
Camera.Restore
Camera.SetBehindPlayer
9@ = Audiostream.Load("SWOOP\SWOOPTF.MP3")
Audiostream.PerformAction(9@, PLAY)
wait 600
0669: $36 = attach_particle "TANK_FIRE" to_actor 0@ with_offset 0.0 0.0 -0.8 type 1
064F: remove_references_to_particle $36
083C: set_actor 0@ velocity_in_direction_XYZ 0.0 0.0 50.0
0687: clear_actor 0@ task
04ED: load_animation "SKATE"
038B: load_requested_models
0812: AS_actor 0@ perform_animation "TF_TRANS_END" IFP "SKATE" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB
wait 400
023C: load_special_actor '()SWW' as 2 // models 290-299
038B: load_requested_models
09C7: change_player 0 model_to #SPECIAL02
wait 200
Audiostream.Release(9@)
0296: unload_special_actor 1
04EF: release_animation "SKATE"
0687: clear_actor 0@ task
Camera.Restore
Camera.SetBehindPlayer
jump @SWOOP_1321

:SWOOP_1105
Camera.Restore
Camera.SetBehindPlayer
07CC: set_player 0 can_enter_exit_vehicles 0
0669: $36 = attach_particle "TANK_FIRE" to_actor 0@ with_offset 0.0 0.0 -0.8 type 1
064F: remove_references_to_particle $36
083C: set_actor 0@ velocity_in_direction_XYZ 0.0 0.0 20.0
0687: clear_actor 0@ task
04ED: load_animation "SKATE"
038B: load_requested_models
9@ = Audiostream.Load("SWOOP\SWOOPTF.MP3")
Audiostream.PerformAction(9@, PLAY)
0812: AS_actor 0@ perform_animation "TF_TRANS_END" IFP "SKATE" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB
wait 1500
023C: load_special_actor '()SWP' as 1 // models 290-299
038B: load_requested_models
09C7: change_player 0 model_to #SPECIAL01
wait 200
Audiostream.Release(9@)
0296: unload_special_actor 1
04EF: release_animation "SKATE"
0687: clear_actor 0@ task
Camera.Restore

:SWOOP_1321
0AB2: ret 0

:SWOOP_1326
if
   Actor.Model(0@) == #SPECIAL02
jf @SWOOP_2068
if
84EE:   not animation "SKATE" loaded
jf @SWOOP_1376
04ED: load_animation "SKATE"
038B: load_requested_models

:SWOOP_1376
0AB1: call_scm_func @SWOOP_2073 0 2@ 1@ 
083E: set_actor 0@ rotation 1@ 0.0 2@ while_in_air
0A4A: store_joystick_X_offset_to 14@ Y_offset_to 28@
if
  14@ > 2.5
jf @SWOOP_1488
0812: AS_actor 0@ perform_animation "ROBOW" IFP "SKATE" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1 // versionB
14@ = 2.5
jump @SWOOP_1560

:SWOOP_1488
if
  -2.5 > 14@
jf @SWOOP_1560
0812: AS_actor 0@ perform_animation "ROBOW" IFP "SKATE" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1 // versionB
14@ = -2.5
jump @SWOOP_1560

:SWOOP_1560
if
0AB0:   key_pressed 2
jf @SWOOP_1630
0AB1: call_scm_func @SWOOP_3106 1 $PLAYER_ACTOR 
0812: AS_actor 0@ perform_animation "IDLEW3" IFP "SKATE" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB
jump @SWOOP_1800

:SWOOP_1630
if
0AB0:   key_pressed 87
jf @SWOOP_1686
0812: AS_actor 0@ perform_animation "ROBOW" IFP "SKATE" framedelta 19.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB
jump @SWOOP_1827

:SWOOP_1686
if
0AB0:   key_pressed 83
jf @SWOOP_1742
0812: AS_actor 0@ perform_animation "ROBOW" IFP "SKATE" framedelta 19.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB
jump @SWOOP_1854

:SWOOP_1742
0812: AS_actor 0@ perform_animation "ROBOW" IFP "SKATE" framedelta 19.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB
0393: actor 0@ perform_animation "ROBOF" at 2.0 times_normal_rate
jump @SWOOP_1881

:SWOOP_1800
3@ = 60.0
4@ = 0.0
jump @SWOOP_1901

:SWOOP_1827
3@ = 30.0
4@ = 0.0
jump @SWOOP_1901

:SWOOP_1854
3@ = -20.0
4@ = 0.0
jump @SWOOP_1901

:SWOOP_1881
3@ = 0.0
4@ = 0.8

:SWOOP_1901
0819: 13@ = actor 0@ distance_from_ground
if
  2.8 > 13@
jf @SWOOP_1991
Actor.SetImmunities(0@, 1, 1, 1, 1, 1)
0812: AS_actor 0@ perform_animation "IDLEW3" IFP "SKATE" framedelta 10.0 loopA 0 lockX 0 lockY 0 lockF 0 time 500 // versionB
4@ = 20.0

:SWOOP_1991
Actor.StorePos(0@, 5@, 6@, 7@)
04C4: store_coords_to 8@ 9@ 10@ from_actor 0@ with_offset 0.0 3@ 4@
0063: 8@ -= 5@ // (float)
0063: 9@ -= 6@ // (float)
0063: 10@ -= 7@ // (float)
083C: set_actor 0@ velocity_in_direction_XYZ 8@ 9@ 10@

:SWOOP_2068
0AB2: ret 0

:SWOOP_2073
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0AA6: call_method 5327216 struct 11989032 num_params 6 pop 0 10787220 10787232 3@ 2@ 1@ 20.0 
0AB1: call_scm_func @SWOOP_2205 6 $13 $DEFAULT_WAIT_TIME $PHONE_RINGING_FLAG 1@ 2@ 3@ 5@ 
0AB1: call_scm_func @SWOOP_2249 4 $13 $DEFAULT_WAIT_TIME 1@ 2@ 4@ 
5@ += 90.0
0AB2: ret 2 4@ 5@

:SWOOP_2205
0509: 6@ = distance_between_XY 0@ 1@ and_XY 3@ 4@
0063: 2@ -= 5@ // (float)
0604: get_Z_angle_for_point 6@ 2@ store_to 7@
0AB2: ret 1 7@

:SWOOP_2249
0063: 0@ -= 2@ // (float)
0063: 1@ -= 3@ // (float)
0604: get_Z_angle_for_point 0@ 1@ store_to 4@
0AB2: ret 1 4@

:SWOOP_2284
04C4: store_coords_to 4@ 5@ 6@ from_actor 0@ with_offset 0.0 1.2 -0.3
0AB1: call_scm_func @SWOOP_2689 1 1.0 1@ 2@ 3@ 
0AB1: call_scm_func @SWOOP_2522 3 1@ 2@ 3@ 10@ 11@ 
03E3: set_texture_to_be_drawn_antialiased 1
038D: draw_texture 10 position 10@ 11@ size 25.0 25.0 RGBA 255 0 0 255
03F0: enable_text_draw 0
if
0AB0:   key_pressed 1
jf @SWOOP_2493
7@ = Audiostream.Load("SWOOP\SWOOPBLAST.MP3")
0A92: create_custom_thread "SWOOP\SWOOPSHOOT2.MP3" 4@ 5@ 6@ 1@ 2@ 3@ 
Audiostream.PerformAction(7@, PLAY)

:SWOOP_2493
0AB2: ret 0
0AB1: call_scm_func @SWOOP_2689 1 1.0 1@ 2@ 3@ 

:SWOOP_2522
0AC7: 14@ = var 0@ offset
0AC7: 15@ = var 3@ offset
0AC7: 16@ = var 6@ offset
0AC7: 17@ = var 9@ offset
0AA5: call 7392816 num_params 6 pop 6 0 0 17@ 16@ 15@ 14@ 
12@ = 640.0
13@ = 448.0
0A8D: 14@ = read_memory 12677188 size 4 virtual_protect 0
0A8D: 15@ = read_memory 12677192 size 4 virtual_protect 0
0093: 14@ = integer 14@ to_float
0093: 15@ = integer 15@ to_float
0073: 12@ /= 14@ // (float)
0073: 13@ /= 15@ // (float)
006B: 3@ *= 12@ // (float)
006B: 4@ *= 13@ // (float)
0AB2: ret 2 3@ 4@

:SWOOP_2689
4@ = 0.0

:SWOOP_2699
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 1.0 0.4
0A9F: 5@ = current_thread_pointer
5@ += 80
0A8E: 6@ = 5@ + 12 // int
0AA6: call_method 5327216 struct 11989032 num_params 6 pop 0 6@ 5@ 3@ 2@ 1@ 4@ 
if
86BD:   not no_obstacles_between 1@ 2@ 3@ and 8@ 9@ 10@ solid 1 car 1 actor 1 object 1 particle 0
jf @SWOOP_2833
jump @SWOOP_2860

:SWOOP_2833
4@ += 1.0
  4@ > 300.0
jf @SWOOP_2699

:SWOOP_2860
0@ = 0.0
1@ = 0.0
2@ = 0.0
005B: 0@ += 8@ // (float)
005B: 1@ += 9@ // (float)
005B: 2@ += 10@ // (float)
4@ = 0.0
0AB2: ret 3 0@ 1@ 2@

:SWOOP_2938
9@ = Audiostream.Load("SWOOP\SWOOPSHOOT.MP3")
0AB1: call_scm_func @SWOOP_3979 2 0@ 26 1@ 2@ 3@ 
0AB1: call_scm_func @SWOOP_2689 1 1.0 4@ 5@ 6@ 
064B: 7@ = create_particle "BLUEBLOT" at 4@ 5@ 6@ type 1
064F: remove_references_to_particle 7@
064B: 8@ = create_particle "CAMFLASH" at 1@ 2@ 3@ type 1
020C: create_explosion_with_radius 3 at 4@ 5@ 6@
064F: remove_references_to_particle 8@
0625: decrease_integer_stat 13 by 1
Audiostream.PerformAction(9@, PLAY)
0AB2: ret 0

:SWOOP_3106
066A: 14@ = attach_particle "SHOCK" to_actor 0@ with_offset 0.1 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 14@ to_actor 0@ mode 22
064F: remove_references_to_particle 14@
066A: 15@ = attach_particle "SHOCK" to_actor 0@ with_offset 0.1 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 15@ to_actor 0@ mode 32
064F: remove_references_to_particle 15@
066A: 14@ = attach_particle "SHOCK" to_actor 0@ with_offset 0.1 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 14@ to_actor 0@ mode 41
064F: remove_references_to_particle 14@
066A: 15@ = attach_particle "SHOCK" to_actor 0@ with_offset 0.1 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 15@ to_actor 0@ mode 51
064F: remove_references_to_particle 15@
066A: 14@ = attach_particle "SHOCK" to_actor 0@ with_offset 0.1 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 14@ to_actor 0@ mode 42
064F: remove_references_to_particle 14@
066A: 15@ = attach_particle "SHOCK" to_actor 0@ with_offset 0.1 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 15@ to_actor 0@ mode 52
064F: remove_references_to_particle 15@
066A: 14@ = attach_particle "SHOCK" to_actor 0@ with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 14@ to_actor 0@ mode 44
064F: remove_references_to_particle 14@
066A: 15@ = attach_particle "SHOCK" to_actor 0@ with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 15@ to_actor 0@ mode 54
064F: remove_references_to_particle 15@
066A: 14@ = attach_particle "SHOCK" to_actor 0@ with_offset -0.1 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 14@ to_actor 0@ mode 23
064F: remove_references_to_particle 14@
066A: 15@ = attach_particle "SHOCK" to_actor 0@ with_offset -0.1 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 15@ to_actor 0@ mode 33
064F: remove_references_to_particle 15@
066A: 14@ = attach_particle "SHOCK" to_actor 0@ with_offset -0.1 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 14@ to_actor 0@ mode 24
064F: remove_references_to_particle 14@
066A: 15@ = attach_particle "SHOCK" to_actor 0@ with_offset -0.1 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 15@ to_actor 0@ mode 34
064F: remove_references_to_particle 15@
066A: 14@ = attach_particle "SHOCK" to_actor 0@ with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 14@ to_actor 0@ mode 5
064F: remove_references_to_particle 14@
066A: 15@ = attach_particle "SHOCK" to_actor 0@ with_offset 0.0 0.2 0.0 rotation 0.0 0.0 0.0 type 1
0883: attach_particle 15@ to_actor 0@ mode 8
064F: remove_references_to_particle 15@
0AB2: ret 0

:SWOOP_3979
0085: 10@ = 0@ // (int)
0085: 15@ = 1@ // (int)
1@ = 0.0
2@ = 0.0
3@ = 0.0
0A96: 0@ = actor 10@ struct
0AC7: 4@ = var 1@ offset
0AA6: call_method 6160832 struct 0@ num_params 3 pop 0 1 15@ 4@ 
0AB2: ret 3 1@ 2@ 3@

:SWOOP_4078
if
   Actor.Model(0@) == #SPECIAL01
jf @SWOOP_4189
if
0AB0:   key_pressed 16
jf @SWOOP_4189
09F1: play_audio_at_actor $PLAYER_ACTOR event 1039
0AB1: call_scm_func @SWOOP_3106 1 $PLAYER_ACTOR 
04ED: load_animation "SKATE"
038B: load_requested_models
0812: AS_actor 0@ perform_animation "EV_SPRX" IFP "SKATE" framedelta 4.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1 // versionB
04EF: release_animation "SKATE"

:SWOOP_4189
0AB2: ret 0