Fixed BO2 DevBlock Bug

This commit is contained in:
InfinityLoader 2023-10-28 00:17:17 -04:00
parent fbfff3c275
commit 1a9be4df02
597 changed files with 21918 additions and 12941 deletions

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 2
* Decompile Time: 2 ms
* Timestamp: 10/27/2023 2:59:42 AM
* Decompile Time: 133 ms
* Timestamp: 10/28/2023 12:10:19 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 2
* Decompile Time: 5 ms
* Timestamp: 10/27/2023 2:59:42 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:19 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 3
* Decompile Time: 3 ms
* Timestamp: 10/27/2023 2:59:42 AM
* Decompile Time: 2 ms
* Timestamp: 10/28/2023 12:10:19 AM
*******************************************************************/
#include codescripts/character;

View File

@ -5,7 +5,7 @@
* Platform: PC
* Function Count: 1
* Decompile Time: 2 ms
* Timestamp: 10/27/2023 2:59:42 AM
* Timestamp: 10/28/2023 12:10:20 AM
*******************************************************************/
//Function Number: 1
@ -18,11 +18,15 @@ main()
if(IsDefined(self))
{
/#
if(IsDefined(self.classname))
{
if(self.classname == "trigger_once" || self.classname == "trigger_radius" || self.classname == "trigger_multiple")
{
println("");
println("*** trigger debug: delete.gsc is deleting trigger with ent#: " + self getentitynumber() + " at origin: " + self.origin);
println("");
self.classname == "trigger_once" || self.classname == "trigger_radius" || self.classname == "trigger_multiple"
IsDefined(self.classname)
}
}
#/
self delete();
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 3
* Decompile Time: 1 ms
* Timestamp: 10/27/2023 2:59:43 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:20 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 124
* Decompile Time: 113 ms
* Timestamp: 10/27/2023 2:59:43 AM
* Decompile Time: 21 ms
* Timestamp: 10/28/2023 12:10:20 AM
*******************************************************************/
//Function Number: 1
@ -385,14 +385,11 @@ vector_compare(vec1,vec2)
draw_debug_line(start,end,timer)
{
/#
i = 0;
for(;;)
for(i = 0;i < timer * 20;i++)
{
line(start,end,(1,1,0.5));
wait(0.05);
i++;
}
i < timer * 20
#/
}
@ -863,8 +860,8 @@ flag_delete(flagname)
{
/#
println("flag_delete() called on flag that does not exist: " + flagname);
#/
}
#/
}
//Function Number: 51
@ -889,9 +886,8 @@ flag_init(flagname,val,b_is_trigger)
{
/#
assert(!IsDefined(level.flag[flagname]),"Attempt to reinitialize existing flag: " + flagname);
#/
}
#/
if(IsDefined(val) && val)
{
level.flag[flagname] = 1;
@ -1473,11 +1469,11 @@ trigger_use(str_name,str_key,ent,b_assert)
{
/#
assertmsg("trigger not found: " + str_name + " key: " + str_key);
}
#/
return;
}
}
}
else
{
e_trig = self;
@ -1567,13 +1563,27 @@ init_trigger_flags()
//Function Number: 83
is_look_trigger(trig)
{
return IsDefined(trig) ? trig has_spawnflag(256) && !(!IsDefined(trig.classname) && !IsDefined("trigger_damage")) || IsDefined(trig.classname) && IsDefined("trigger_damage") && trig.classname == "trigger_damage" : 0;
if(IsDefined(trig))
{
}
else
{
}
return 0;
}
//Function Number: 84
is_trigger_once(trig)
{
return IsDefined(trig) ? trig has_spawnflag(1024) || (!IsDefined(self.classname) && !IsDefined("trigger_once")) || IsDefined(self.classname) && IsDefined("trigger_once") && self.classname == "trigger_once" : 0;
if(IsDefined(trig))
{
}
else
{
}
return 0;
}
//Function Number: 85
@ -1742,11 +1752,14 @@ fileprint_chk(file,str)
{
/#
level.fileprintlinecount++;
if(level.fileprintlinecount > 400)
{
wait(0.05);
level.fileprintlinecount++;
level.fileprintlinecount = 0;
}
fprintln(file,str);
level.fileprintlinecount > 400
#/
}
@ -1765,11 +1778,14 @@ fileprint_map_header(binclude_blank_worldspawn)
fileprint_chk(level.fileprint,"iwmap 4");
fileprint_chk(level.fileprint,"\"000_Global\" flags active");
fileprint_chk(level.fileprint,"\"The Map\" flags");
if(!(binclude_blank_worldspawn))
{
return;
}
fileprint_map_entity_start();
fileprint_map_keypairprint("classname","worldspawn");
fileprint_map_entity_end();
binclude_blank_worldspawn
#/
}
@ -1824,6 +1840,8 @@ fileprint_end()
assert(!IsDefined(level.fileprint_entitystart));
#/
saved = closefile(level.fileprint);
if(saved != 1)
{
println("-----------------------------------");
println(" ");
println("file write failure");
@ -1844,9 +1862,10 @@ fileprint_end()
println(" ");
println("-----------------------------------");
println("File not saved( see console.log for info ) ");
}
level.fileprint = undefined;
level.fileprint_filename = undefined;
saved != 1
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 7
* Decompile Time: 33 ms
* Timestamp: 10/27/2023 3:01:09 AM
* Decompile Time: 2 ms
* Timestamp: 10/28/2023 12:10:49 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -5,5 +5,5 @@
* Platform: PC
* Function Count: 0
* Decompile Time: 0 ms
* Timestamp: 10/27/2023 3:01:10 AM
* Timestamp: 10/28/2023 12:10:49 AM
*******************************************************************/

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 14
* Decompile Time: 105 ms
* Timestamp: 10/27/2023 3:01:10 AM
* Decompile Time: 8 ms
* Timestamp: 10/28/2023 12:10:50 AM
*******************************************************************/
#include common_scripts/utility;
@ -15,13 +15,41 @@
main()
{
/#
if(GetDvar(#"5E997AE") == "" || GetDvar(#"5E997AE") == "0")
{
setdvar("scr_art_tweak",0);
}
if(GetDvar(#"628ADECB") == "")
{
setdvar("scr_dof_enable","1");
}
if(GetDvar(#"69E20811") == "")
{
setdvar("scr_cinematic_autofocus","1");
}
if(GetDvar(#"FE68F88A") == "" && IsDefined(level.script))
{
setdvar("scr_art_visionfile",level.script);
}
if(GetDvar(#"628768B6") == "")
{
setdvar("debug_reflection","0");
}
if(GetDvar(#"33E24970") == "")
{
setdvar("debug_reflection_matte","0");
}
if(GetDvar(#"C450CB50") == "")
{
setdvar("debug_color_pallete","0");
}
precachemodel("test_sphere_lambert");
precachemodel("test_macbeth_chart");
precachemodel("test_macbeth_chart_unlit");
@ -29,13 +57,6 @@ main()
level thread debug_reflection();
level thread debug_reflection_matte();
level thread debug_color_pallete();
GetDvar(#"C450CB50") == ""
GetDvar(#"33E24970") == ""
GetDvar(#"628768B6") == ""
GetDvar(#"FE68F88A") == "" && IsDefined(level.script)
GetDvar(#"69E20811") == ""
GetDvar(#"628ADECB") == ""
GetDvar(#"5E997AE") == "" || GetDvar(#"5E997AE") == "0"
#/
if(!(IsDefined(level.dofdefault)))
{
@ -61,9 +82,12 @@ GetDvar(#"5E997AE") == "" || GetDvar(#"5E997AE") == "0"
artfxprintln(file,string)
{
/#
if(file == -1)
{
return;
}
fprintln(file,string);
file == -1
#/
}
@ -120,11 +144,19 @@ setfogsliders()
tweakart()
{
/#
if(!(IsDefined(level.tweakfile)))
{
level.tweakfile = 0;
}
if(GetDvar(#"829C0FDB") == "")
{
setdvar("scr_fog_exp_halfplane","500");
setdvar("scr_fog_exp_halfheight","500");
setdvar("scr_fog_nearplane","0");
setdvar("scr_fog_baseheight","0");
}
setdvar("scr_fog_fraction","1.0");
setdvar("scr_art_dump","0");
setdvar("scr_art_sun_fog_dir_set","0");
@ -139,11 +171,14 @@ tweakart()
tweak_toggle = 1;
for(;;)
{
for(;;)
while(GetDvarInt(#"5E997AE") == 0)
{
tweak_toggle = 1;
wait(0.05);
}
if(tweak_toggle)
{
tweak_toggle = 0;
fogsettings = getfogsettings();
setdvar("scr_fog_nearplane",fogsettings[0]);
@ -160,6 +195,8 @@ tweakart()
setdvar("scr_sun_fog_start_angle",fogsettings[14]);
setdvar("scr_sun_fog_end_angle",fogsettings[15]);
setdvar("scr_fog_max_opacity",fogsettings[16]);
}
level.fogexphalfplane = GetDvarFloat(#"B59305FE");
level.fogexphalfheight = GetDvarFloat(#"54D01B47");
level.fognearplane = GetDvarFloat(#"5C40223D");
@ -174,6 +211,8 @@ tweakart()
level.sunstartangle = GetDvarFloat(#"ECC36390");
level.sunendangle = GetDvarFloat(#"FA1301D9");
level.fogmaxopacity = GetDvarFloat(#"81EA8425");
if(GetDvarInt(#"9EF57A6C"))
{
setdvar("scr_art_sun_fog_dir_set","0");
println("Setting sun fog direction to facing of player");
players = get_players();
@ -182,21 +221,29 @@ tweakart()
level.fogsundir[0] = dir[0];
level.fogsundir[1] = dir[1];
level.fogsundir[2] = dir[2];
}
fovslidercheck();
dumpsettings();
if(!(GetDvarInt(#"DBBD8F3B")))
{
if(!(IsDefined(level.fogsundir)))
{
level.fogsundir = [];
level.fogsundir[0] = 1;
level.fogsundir[1] = 0;
level.fogsundir[2] = 0;
}
setvolfog(level.fognearplane,level.fogexphalfplane,level.fogexphalfheight,level.fogbaseheight,level.fogcolorred,level.fogcolorgreen,level.fogcolorblue,level.fogcolorscale,level.sunfogcolorred,level.sunfogcolorgreen,level.sunfogcolorblue,level.fogsundir[0],level.fogsundir[1],level.fogsundir[2],level.sunstartangle,level.sunendangle,0,level.fogmaxopacity);
}
else
{
setexpfog(100000000,100000001,0,0,0,0);
}
wait(0.1);
}
(GetDvarInt(#"9EF57A6C")) ? GetDvarInt(#"DBBD8F3B") : IsDefined(level.fogsundir)
tweak_toggle
GetDvarInt(#"5E997AE") == 0
GetDvar(#"829C0FDB") == ""
IsDefined(level.tweakfile)
#/
}
@ -244,6 +291,8 @@ fovslidercheck()
dumpsettings()
{
/#
if(GetDvar(#"D1996D68") != "0")
{
println("\tstart_dist = " + level.fognearplane + ";");
println("\thalf_dist = " + level.fogexphalfplane + ";");
println("\thalf_height = " + level.fogexphalfheight + ";");
@ -267,7 +316,7 @@ dumpsettings()
println("\t\tsun_col_r, sun_col_g, sun_col_b, sun_dir_x, sun_dir_y, sun_dir_z, sun_start_ang, ");
println("\t\tsun_stop_ang, time, max_fog_opacity);");
setdvar("scr_art_dump","0");
GetDvar(#"D1996D68") != "0"
}
#/
}
@ -276,31 +325,41 @@ debug_reflection()
{
/#
level.debug_reflection = 0;
for(;;)
while(1)
{
wait(0.1);
if((GetDvar(#"628768B6") == "2" && level.debug_reflection != 2) || GetDvar(#"628768B6") == "3" && level.debug_reflection != 3)
{
remove_reflection_objects();
if(GetDvar(#"628768B6") == "2")
{
create_reflection_objects();
level.debug_reflection = 2;
continue;
}
create_reflection_objects();
create_reflection_object();
level.debug_reflection = 3;
continue;
}
if(GetDvar(#"628768B6") == "1" && level.debug_reflection != 1)
{
setdvar("debug_reflection_matte","0");
setdvar("debug_color_pallete","0");
remove_reflection_objects();
create_reflection_object();
level.debug_reflection = 1;
continue;
}
if(GetDvar(#"628768B6") == "0" && level.debug_reflection != 0)
{
remove_reflection_objects();
level.debug_reflection = 0;
}
GetDvar(#"628768B6") == "0" && level.debug_reflection != 0
GetDvar(#"628768B6") == "1" && level.debug_reflection != 1
GetDvar(#"628768B6") == "2"
(GetDvar(#"628768B6") == "2" && level.debug_reflection != 2) || GetDvar(#"628768B6") == "3" && level.debug_reflection != 3
1
}
#/
}
@ -308,18 +367,23 @@ GetDvar(#"628768B6") == "2"
remove_reflection_objects()
{
/#
i = 0;
for(;;)
if((level.debug_reflection == 2 || level.debug_reflection == 3) && IsDefined(level.debug_reflection_objects))
{
for(i = 0;i < level.debug_reflection_objects.size;i++)
{
level.debug_reflection_objects[i] delete();
i++;
}
level.debug_reflection_objects = undefined;
}
if(level.debug_reflection == 1 || level.debug_reflection == 3 || level.debug_reflection_matte == 1 || level.debug_color_pallete == 1 || level.debug_color_pallete == 2)
{
if(IsDefined(level.debug_reflectionobject))
{
level.debug_reflectionobject delete();
IsDefined(level.debug_reflectionobject)
level.debug_reflection == 1 || level.debug_reflection == 3 || level.debug_reflection_matte == 1 || level.debug_color_pallete == 1 || level.debug_color_pallete == 2
i < level.debug_reflection_objects.size
(level.debug_reflection == 2 || level.debug_reflection == 3) && IsDefined(level.debug_reflection_objects)
}
}
#/
}
@ -328,14 +392,11 @@ create_reflection_objects()
{
/#
reflection_locs = getreflectionlocs();
i = 0;
for(;;)
for(i = 0;i < reflection_locs.size;i++)
{
level.debug_reflection_objects[i] = spawn("script_model",reflection_locs[i]);
level.debug_reflection_objects[i] setmodel("test_sphere_silver");
i++;
}
i < reflection_locs.size
#/
}
@ -348,7 +409,11 @@ create_reflection_object(model)
}
/#
if(IsDefined(level.debug_reflectionobject))
{
level.debug_reflectionobject delete();
}
players = get_players();
player = players[0];
level.debug_reflectionobject = spawn("script_model",100 + VectorScale(AnglesToForward(player.angles)));
@ -356,9 +421,6 @@ create_reflection_object(model)
level.debug_reflectionobject.origin = 100 + VectorScale(AnglesToForward(player getplayerangles()));
level.debug_reflectionobject linkto(player);
thread debug_reflection_buttons();
player geteye()
player geteye()
IsDefined(level.debug_reflectionobject)
#/
}
@ -371,13 +433,29 @@ debug_reflection_buttons()
level.debug_reflectionobject endon("death");
offset = 100;
lastoffset = offset;
for(;;)
while(GetDvar(#"628768B6") == "1" || GetDvar(#"628768B6") == "3" || GetDvar(#"33E24970") == "1" || GetDvar(#"C450CB50") == "1" || GetDvar(#"C450CB50") == "2")
{
players = get_players();
if(players[0] buttonpressed("BUTTON_X"))
{
offset = offset + 50;
}
if(players[0] buttonpressed("BUTTON_Y"))
{
offset = offset - 50;
}
if(offset > 1000)
{
offset = 1000;
}
if(offset < 64)
{
offset = 64;
}
level.debug_reflectionobject unlink();
level.debug_reflectionobject.origin = offset + VectorScale(AnglesToForward(players[0] getplayerangles()));
temp_angles = VectorToAngles(players[0].origin - level.debug_reflectionobject.origin);
@ -385,15 +463,11 @@ debug_reflection_buttons()
lastoffset = offset;
line(level.debug_reflectionobject.origin,getreflectionorigin(level.debug_reflectionobject.origin),(1,0,0),1,1);
wait(0.05);
if(IsDefined(level.debug_reflectionobject))
{
level.debug_reflectionobject linkto(players[0]);
}
IsDefined(level.debug_reflectionobject)
players[0] geteye()
offset < 64
offset > 1000
players[0] buttonpressed("BUTTON_Y")
players[0] buttonpressed("BUTTON_X")
GetDvar(#"628768B6") == "1" || GetDvar(#"628768B6") == "3" || GetDvar(#"33E24970") == "1" || GetDvar(#"C450CB50") == "1" || GetDvar(#"C450CB50") == "2"
}
#/
}
@ -402,21 +476,25 @@ debug_reflection_matte()
{
/#
level.debug_reflection_matte = 0;
for(;;)
while(1)
{
wait(0.1);
if(GetDvar(#"33E24970") == "1" && level.debug_reflection_matte != 1)
{
setdvar("debug_reflection","0");
setdvar("debug_color_pallete","0");
remove_reflection_objects();
create_reflection_object("test_sphere_lambert");
level.debug_reflection_matte = 1;
continue;
}
if(GetDvar(#"33E24970") == "0" && level.debug_reflection_matte != 0)
{
remove_reflection_objects();
level.debug_reflection_matte = 0;
}
GetDvar(#"33E24970") == "0" && level.debug_reflection_matte != 0
GetDvar(#"33E24970") == "1" && level.debug_reflection_matte != 1
1
}
#/
}
@ -425,25 +503,32 @@ debug_color_pallete()
{
/#
level.debug_color_pallete = 0;
for(;;)
while(1)
{
wait(0.1);
if(GetDvar(#"C450CB50") == "1" && level.debug_color_pallete != 1)
{
setdvar("debug_reflection","0");
setdvar("debug_reflection_matte","0");
remove_reflection_objects();
create_reflection_object("test_macbeth_chart");
level.debug_color_pallete = 1;
continue;
}
if(GetDvar(#"C450CB50") == "2" && level.debug_color_pallete != 2)
{
remove_reflection_objects();
create_reflection_object("test_macbeth_chart_unlit");
level.debug_color_pallete = 2;
continue;
}
if(GetDvar(#"C450CB50") == "0" && level.debug_color_pallete != 0)
{
remove_reflection_objects();
level.debug_color_pallete = 0;
}
GetDvar(#"C450CB50") == "0" && level.debug_color_pallete != 0
GetDvar(#"C450CB50") == "2" && level.debug_color_pallete != 2
GetDvar(#"C450CB50") == "1" && level.debug_color_pallete != 1
1
}
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 9
* Decompile Time: 40 ms
* Timestamp: 10/27/2023 3:01:11 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:50 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 11
* Decompile Time: 46 ms
* Timestamp: 10/27/2023 3:01:11 AM
* Decompile Time: 7 ms
* Timestamp: 10/28/2023 12:10:50 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 8
* Decompile Time: 14 ms
* Timestamp: 10/27/2023 3:01:12 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:51 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 10
* Decompile Time: 50 ms
* Timestamp: 10/27/2023 3:01:12 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:51 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 21
* Decompile Time: 92 ms
* Timestamp: 10/27/2023 3:01:13 AM
* Decompile Time: 15 ms
* Timestamp: 10/28/2023 12:10:51 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 2
* Decompile Time: 5 ms
* Timestamp: 10/27/2023 3:01:13 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:51 AM
*******************************************************************/
#include maps/mp/_utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 87
* Decompile Time: 299 ms
* Timestamp: 10/27/2023 3:01:15 AM
* Decompile Time: 43 ms
* Timestamp: 10/28/2023 12:10:52 AM
*******************************************************************/
#include common_scripts/utility;
@ -77,8 +77,10 @@ addflyswatterstat(weapon,aircraft)
canprocesschallenges()
{
/#
if(getdvarintdefault("scr_debug_challenges",0))
{
return 1;
getdvarintdefault("scr_debug_challenges",0)
}
#/
if(level.rankedmatch || level.wagermatch)
{

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 2
* Decompile Time: 10 ms
* Timestamp: 10/27/2023 3:01:15 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:52 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 98
* Decompile Time: 474 ms
* Timestamp: 10/27/2023 3:01:17 AM
* Decompile Time: 66 ms
* Timestamp: 10/28/2023 12:10:53 AM
*******************************************************************/
#include common_scripts/utility;
@ -176,10 +176,9 @@ fx_init()
delete_arrays_in_sp();
/#
println("We\'re not in MP!");
}
}
#/
}
}
for(i = 0;i < level.createfxent.size;i++)
{
ent = level.createfxent[i];
@ -345,9 +344,14 @@ createfxlogic()
filename = level.cfx_server_scriptdata + level.script + "_fx.gsc";
file = openfile(filename,"append");
level.write_error = "";
if(file == -1)
{
level.write_error = filename;
}
else
{
closefile(file);
Stack-Empty ? Stack-Empty : file == -1
}
#/
level.createfxhudelements = [];
level.createfx_hudelements = 100;
@ -837,8 +841,7 @@ manipulate_createfx_ents(highlightedent,leftclick,leftheld,ctrlheld,colors,right
offset = level.createfx_manipulate_offset;
level.createfx_manipulate_offset = level.createfx_manipulate_offset + 1 % print_frames;
i = offset;
while(i < level.createfxent.size)
for(i = offset;i < level.createfxent.size;i = i + print_frames)
{
ent = level.createfxent[i];
if(!(ent.drawn))
@ -864,12 +867,10 @@ manipulate_createfx_ents(highlightedent,leftclick,leftheld,ctrlheld,colors,right
printup = (0,0,15 * scale);
/#
print3d(ent.v["origin"] + printright + printup,ent.v["fxid"],colors[ent.v["type"]][colorindex],ent.textalpha,scale,print_frames);
}
}
#/
}
}
i = Stack-Empty ? ent.v["fxid"].size * -2.93 * scale : i + print_frames;
}
if(IsDefined(highlightedent))
{
@ -925,10 +926,10 @@ manipulate_createfx_ents(highlightedent,leftclick,leftheld,ctrlheld,colors,right
printup = (0,0,15 * scale);
/#
print3d(highlightedent.v["origin"] + printright + printup,highlightedent.v["fxid"],colors[highlightedent.v["type"]][colorindex],highlightedent.textalpha,scale,1);
}
}
#/
}
}
}
//Function Number: 10
clear_settable_fx()
@ -1495,55 +1496,214 @@ set_anglemod_move_vector()
/#
ctrlheld = button_is_held("ctrl","BUTTON_LSHLDR");
players = get_players();
if(level.is_camera_on == 1)
{
newmovement = players[0] getnormalizedmovement();
dolly_movement = players[0] getnormalizedcameramovement();
if(newmovement[1] <= -0.3)
{
level.selectedrotate_yaw = level.selectedrotate_yaw - 1;
}
else if(newmovement[1] >= 0.3)
{
level.selectedrotate_yaw = level.selectedrotate_yaw + 1;
}
else if(buttondown("kp_leftarrow","DPAD_LEFT"))
{
if(level.selectedrotate_yaw < 0)
{
level.selectedrotate_yaw = 0;
}
level.selectedrotate_yaw = level.selectedrotate_yaw + 0.1;
}
else if(buttondown("kp_rightarrow","DPAD_RIGHT"))
{
if(level.selectedrotate_yaw > 0)
{
level.selectedrotate_yaw = 0;
}
level.selectedrotate_yaw = level.selectedrotate_yaw - 0.1;
}
else
{
level.selectedrotate_yaw = 0;
}
if(dolly_movement[0] <= -0.2)
{
level.selectedrotate_pitch = level.selectedrotate_pitch + 1;
}
else if(dolly_movement[0] >= 0.2)
{
level.selectedrotate_pitch = level.selectedrotate_pitch - 1;
}
else if(buttondown("kp_uparrow","DPAD_UP"))
{
if(level.selectedrotate_pitch < 0)
{
level.selectedrotate_pitch = 0;
}
level.selectedrotate_pitch = level.selectedrotate_pitch + 0.1;
}
else if(buttondown("kp_downarrow","DPAD_DOWN"))
{
if(level.selectedrotate_pitch > 0)
{
level.selectedrotate_pitch = 0;
}
level.selectedrotate_pitch = level.selectedrotate_pitch - 0.1;
}
else
{
level.selectedrotate_pitch = 0;
}
if(buttondown("BUTTON_Y"))
{
if(level.selectedrotate_roll < 0)
{
level.selectedrotate_roll = 0;
}
level.selectedrotate_roll = level.selectedrotate_roll + 0.1;
}
else if(buttondown("BUTTON_B"))
{
if(level.selectedrotate_roll > 0)
{
level.selectedrotate_roll = 0;
}
level.selectedrotate_roll = level.selectedrotate_roll - 0.1;
}
else
{
level.selectedrotate_roll = 0;
}
}
else
{
if(buttondown("kp_uparrow","DPAD_UP"))
{
if(level.selectedrotate_pitch < 0)
{
level.selectedrotate_pitch = 0;
}
if(ctrlheld)
{
level.selectedrotate_pitch = 0.1;
wait(0.05);
}
else
{
level.selectedrotate_pitch = level.selectedrotate_pitch + 1;
}
}
else if(buttondown("kp_downarrow","DPAD_DOWN"))
{
if(level.selectedrotate_pitch > 0)
{
level.selectedrotate_pitch = 0;
}
if(ctrlheld)
{
level.selectedrotate_pitch = -1 * 0.1;
wait(0.05);
}
else
{
level.selectedrotate_pitch = level.selectedrotate_pitch - 1;
}
}
else
{
level.selectedrotate_pitch = 0;
}
if(buttondown("kp_leftarrow","DPAD_LEFT"))
{
if(level.selectedrotate_yaw < 0)
{
level.selectedrotate_yaw = 0;
}
if(ctrlheld)
{
level.selectedrotate_yaw = 0.1;
wait(0.05);
}
else
{
level.selectedrotate_yaw = level.selectedrotate_yaw + 1;
}
}
else if(buttondown("kp_rightarrow","DPAD_RIGHT"))
{
if(level.selectedrotate_yaw > 0)
{
level.selectedrotate_yaw = 0;
}
if(ctrlheld)
{
level.selectedrotate_yaw = -1 * 0.1;
wait(0.05);
}
else
{
level.selectedrotate_yaw = level.selectedrotate_yaw - 1;
}
}
else
{
level.selectedrotate_yaw = 0;
}
if(buttondown("BUTTON_Y"))
{
if(level.selectedrotate_roll < 0)
{
level.selectedrotate_roll = 0;
}
if(ctrlheld)
{
level.selectedrotate_roll = 0.1;
wait(0.05);
}
else
{
level.selectedrotate_roll = level.selectedrotate_roll + 1;
}
}
else if(buttondown("BUTTON_B"))
{
if(level.selectedrotate_roll > 0)
{
level.selectedrotate_roll = 0;
}
if(ctrlheld)
{
level.selectedrotate_roll = -1 * 0.1;
wait(0.05);
}
else
{
level.selectedrotate_roll = level.selectedrotate_roll - 1;
}
}
else
{
level.selectedrotate_roll = 0;
Stack-Empty ? Stack-Empty : (Stack-Empty ? Stack-Empty : ((Stack-Empty ? Stack-Empty : ((Stack-Empty ? Stack-Empty : (((Stack-Empty ? Stack-Empty : ((Stack-Empty ? Stack-Empty : ((level.is_camera_on == 1) ? newmovement[1] <= -0.3 : ((newmovement[1] >= 0.3) ? buttondown("kp_leftarrow","DPAD_LEFT") : ((level.selectedrotate_yaw < 0) ? buttondown("kp_rightarrow","DPAD_RIGHT") : level.selectedrotate_yaw > 0)))) ? dolly_movement[0] <= -0.2 : ((dolly_movement[0] >= 0.2) ? buttondown("kp_uparrow","DPAD_UP") : ((level.selectedrotate_pitch < 0) ? buttondown("kp_downarrow","DPAD_DOWN") : level.selectedrotate_pitch > 0)))) ? buttondown("BUTTON_Y") : ((level.selectedrotate_roll < 0) ? buttondown("BUTTON_B") : level.selectedrotate_roll > 0)) ? ((buttondown("kp_uparrow","DPAD_UP")) ? level.selectedrotate_pitch < 0 : ctrlheld) : ((buttondown("kp_downarrow","DPAD_DOWN")) ? level.selectedrotate_pitch > 0 : ctrlheld))) ? ((buttondown("kp_leftarrow","DPAD_LEFT")) ? level.selectedrotate_yaw < 0 : ctrlheld) : ((buttondown("kp_rightarrow","DPAD_RIGHT")) ? level.selectedrotate_yaw > 0 : ctrlheld))) ? ((buttondown("BUTTON_Y")) ? level.selectedrotate_roll < 0 : ctrlheld) : ((buttondown("BUTTON_B")) ? level.selectedrotate_roll > 0 : ctrlheld)))
}
}
#/
}
@ -1551,9 +1711,12 @@ Stack-Empty ? Stack-Empty : (Stack-Empty ? Stack-Empty : ((Stack-Empty ? Stack-E
cfxprintln(file,string)
{
/#
if(file == -1)
{
return;
}
fprintln(file,string);
file == -1
#/
}
@ -1582,77 +1745,162 @@ generate_fx_log(type,autosave)
{
/#
autosave = IsDefined(autosave);
if(type == "server")
{
if(!(autosave))
{
filename = level.cfx_server_scriptdata + level.script + "_fx.gsc";
}
else
{
filename = level.cfx_server_scriptdata + "backup.gsc";
}
call_loop = level.cfx_server_loop;
call_oneshot = level.cfx_server_oneshot;
call_exploder = level.cfx_server_exploder;
call_loopsound = level.cfx_server_loopsound;
}
else if(type == "client")
{
if(!(autosave))
{
filename = level.cfx_client_scriptdata + level.script + "_fx.csc";
}
else
{
filename = level.cfx_client_scriptdata + "backup.csc";
}
call_loop = level.cfx_client_loop;
call_oneshot = level.cfx_client_oneshot;
call_exploder = level.cfx_client_exploder;
call_loopsound = level.cfx_client_loopsound;
}
else
{
println("^1Error: Improper type in generate_fx_log()");
return;
}
file = openfile(filename,"write");
if(file == -1)
{
level.write_error = filename;
if(type == "server")
{
return 1;
}
else if(type == "client")
{
return 2;
}
else
{
return 3;
}
}
else
{
cfxprintln(file,"//_createfx generated. Do not touch!!");
cfxprintln(file,"main()");
cfxprintln(file,"{");
p = 0;
for(;;)
for(p = 0;p < level.createfxent.size;p++)
{
ent = level.createfxent[p];
origin = [];
angles = [];
i = 0;
for(;;)
for(i = 0;i < 3;i++)
{
origin[i] = ent.v["origin"][i];
angles[i] = ent.v["angles"][i];
if(origin[i] < 0.1 && origin[i] > 0.1 * -1)
{
origin[i] = 0;
angles[i] = 0;
i++;
}
if(angles[i] < 0.1 && angles[i] > 0.1 * -1)
{
angles[i] = 0;
}
}
ent.v["origin"] = (origin[0],origin[1],origin[2]);
ent.v["angles"] = (angles[0],angles[1],angles[2]);
p++;
}
if(!(autosave))
{
println(" *** CREATING EFFECT, COPY THESE LINES TO ",level.script,"_fx.gsc *** ");
}
cfxprintln(file,"// CreateFX entities placed: " + level.createfxent.size - level.non_fx_ents);
breather = 0;
if(autosave)
{
breather_pause = 1;
}
else
{
breather_pause = 5;
i = 0;
for(;;)
}
for(i = 0;i < level.createfxent.size;i++)
{
e = level.createfxent[i];
/#
assert(IsDefined(e.v["type"]),"effect at origin " + e.v["origin"] + " has no type");
#/
if(IsDefined(e.model))
{
}
else if(e.v["fxid"] == "No FX")
{
}
else
{
output_name = "\t";
output_props = "\t";
ent_type = e.v["type"];
if(ent_type == "loopfx")
{
output_name = output_name + "ent = " + call_loop + "( \" + e.v["fxid"] + "\" );";
}
if(ent_type == "oneshotfx")
{
output_name = output_name + "ent = " + call_oneshot + "( \" + e.v["fxid"] + "\" );";
}
if(ent_type == "exploder")
{
output_name = output_name + "ent = " + call_exploder + "( \" + e.v["fxid"] + "\" );";
}
if(ent_type == "soundfx")
{
output_name = output_name + "ent = " + call_loopsound + "();";
}
output_props = output_props + get_fx_options(e);
cfxprintln(file,output_name);
cfxprintln(file,output_props);
cfxprintln(file,"\t");
breather++;
if(breather >= breather_pause)
{
wait(0.05);
breather = 0;
i++;
}
}
}
if(level.bscriptgened)
{
script_gen_dump_addline(level.cfx_server_scriptgendump,level.script + "_fx");
[[ level.cfx_func_script_gen_dump ]]();
}
cfxprintln(file,"}");
saved = closefile(file);
/#
@ -1660,14 +1908,7 @@ generate_fx_log(type,autosave)
#/
println("CreateFX entities placed: " + level.createfxent.size - level.non_fx_ents);
return 0;
(e.v["fxid"] == "No FX") ? (ent_type == "loopfx" ? ent_type == "oneshotfx" : ((ent_type == "exploder") ? ent_type == "soundfx" : breather >= breather_pause)) : level.bscriptgened
IsDefined(e.model)
i < level.createfxent.size
(angles[i] < 0.1 && angles[i] > 0.1 * -1) ? autosave : autosave
origin[i] < 0.1 && origin[i] > 0.1 * -1
i < 3
p < level.createfxent.size
Stack-Empty ? (Stack-Empty ? Stack-Empty : (Stack-Empty ? Stack-Empty : ((Stack-Empty ? type == "server" : autosave) ? type == "client" : autosave))) : (file == -1 ? type == "server" : type == "client")
}
#/
}
@ -2421,8 +2662,10 @@ draw_distance()
maxdist = GetDvarInt(#"94DFBE78");
maxdistsqr = maxdist * maxdist;
/#
if(flag("createfx_saving"))
{
println("Waiting for createfx to save...");
flag("createfx_saving")
}
#/
flag_waitopen("createfx_saving");
for(i = 0;i < level.createfxent.size;i++)
@ -2550,9 +2793,8 @@ createfx_emergency_backup()
{
/#
println("^5#### CREATEFX EMERGENCY BACKUP END ####");
#/
}
#/
flag_clear("createfx_saving");
}
@ -2786,31 +3028,31 @@ print_ambient_fx_inventory()
ent_list = [];
fx_list_count = [];
println("\n\n^2INVENTORY OF AMBIENT EFFECTS: ");
i = 0;
for(;;)
for(i = 0;i < level.createfxent.size;i++)
{
ent_list[i] = level.createfxent[i].v["fxid"];
i++;
}
i = 0;
for(;;)
for(i = 0;i < fx_list.size;i++)
{
count = 0;
j = 0;
for(;;)
for(j = 0;j < ent_list.size;j++)
{
if(fx_list[i] == ent_list[j])
{
count++;
ent_list[j] = "";
j++;
}
}
fx_list_count[i] = count;
i++;
}
i = 0;
for(;;)
for(i = 0;i < fx_list_count.size - 1;i++)
{
j = i + 1;
for(;;)
for(j = i + 1;j < fx_list_count.size;j++)
{
if(fx_list_count[j] < fx_list_count[i])
{
temp_count = fx_list_count[i];
temp_id = fx_list[i];
@ -2818,36 +3060,30 @@ print_ambient_fx_inventory()
fx_list[i] = fx_list[j];
fx_list_count[j] = temp_count;
fx_list[j] = temp_id;
j++;
}
i++;
}
i = 0;
for(;;)
}
for(i = 0;i < fx_list_count.size;i++)
{
switch(fx_list_count[i])
{
case "0":
print("^1");
break;
case "1":
print("^3");
break;
default:
break;
}
print(fx_list_count[i] + "\t" + fx_list[i] + "\n");
i++;
}
print("\n");
i < fx_list_count.size
fx_list_count[j] < fx_list_count[i]
j < fx_list_count.size
i < fx_list_count.size - 1
fx_list[i] == ent_list[j]
j < ent_list.size
i < fx_list.size
i < level.createfxent.size
#/
}
@ -2884,8 +3120,12 @@ handle_camera()
level notify("new_camera");
level endon("new_camera");
movement = (0,0,0);
if(!(IsDefined(level.camera)))
{
level.camera = spawn("script_origin",(0,0,0));
level.camera setmodel("tag_origin");
}
players = get_players();
players[0] playerlinktodelta(level.camera,"tag_origin",1,0,0,0,0,1);
players[0] disableweapons();
@ -2901,58 +3141,116 @@ handle_camera()
b_changes_z = 0;
b_changes_y = 0;
test_string = "";
for(;;)
while(1)
{
for(;;)
if(level.camera_snapto > 0)
{
if(level.stick_camera)
{
originoffset = VectorScale(level.cameravec);
temp_offset = 60 + VectorScale((0,0,-1));
anglesoffset = VectorToAngles(temp_offset);
if(level.camera_prev_snapto == level.camera_snapto)
{
players = get_players();
newmovement = players[0] getnormalizedmovement();
dolly_movement = players[0] getnormalizedcameramovement();
if(button_is_held("BUTTON_LTRIG") || button_is_held("BUTTON_RTRIG"))
{
continue;
}
if(newmovement[1] <= -0.4)
{
n_y_vector = n_y_vector + -0.2;
b_changes_y = 1;
}
else if(newmovement[1] >= 0.4)
{
n_y_vector = n_y_vector + 0.2;
b_changes_y = 1;
}
else
{
b_changes_y = 0;
}
if(newmovement[0] <= -0.4)
{
n_x_vector = n_x_vector + -0.4;
b_changes_x = 1;
}
else if(newmovement[0] >= 0.4)
{
n_x_vector = n_x_vector + 0.4;
b_changes_x = 1;
}
else
{
b_changes_x = 0;
}
if(dolly_movement[0] <= -0.4)
{
zoom_level = zoom_level + 30;
b_changes_z = 1;
}
else if(dolly_movement[0] >= 0.4)
{
zoom_level = zoom_level + -30;
b_changes_z = 1;
}
else
{
b_changes_z = 0;
}
if(b_changes_z || b_changes_x || b_changes_y)
{
newmovement = (n_x_vector,n_y_vector,newmovement[2]);
movement = (0,0,0);
movement = 1 - 0.8 + VectorScale(newmovement);
tilt = max(0,10 + movement[0] * 160);
level.cameravec = (cos(movement[1] * 180) * zoom_level,sin(movement[1] * 180) * zoom_level,tilt);
iprintln(level.cameravec[0] + " " + level.cameravec[1] + " " + level.cameravec[2]);
}
}
else
{
level.camera_prev_snapto = level.camera_snapto;
}
if(IsDefined(level.current_select_ent))
{
originoffset = VectorScale(level.cameravec);
temp_offset = 60 + VectorScale((0,0,-1));
anglesoffset = VectorToAngles(temp_offset);
if(!(IsDefined(model)))
{
model = spawn("script_origin",level.current_select_ent.v["origin"]);
model setmodel("tag_origin");
}
if(model.origin != level.current_select_ent.v["origin"])
{
model.origin = level.current_select_ent.v["origin"];
}
level.camera linkto(model,"tag_origin",level.cameravec,anglesoffset);
break;
wait(0.05);
}
wait(0.05);
continue;
}
else
{
level.camera unlink();
}
}
wait(0.05);
}
originoffset ? IsDefined(model) : model.origin != level.current_select_ent.v["origin"]
-1
IsDefined(level.current_select_ent)
(b_changes_z || b_changes_x || b_changes_y) ? 0.8 : VectorScale(movement)
1 ? level.camera_snapto > 0 : ((level.stick_camera ? -1 : ((originoffset ? level.camera_prev_snapto == level.camera_snapto : ((button_is_held("BUTTON_LTRIG") || button_is_held("BUTTON_RTRIG")) ? newmovement[1] <= -0.4 : newmovement[1] >= 0.4)) ? newmovement[0] <= -0.4 : newmovement[0] >= 0.4)) ? dolly_movement[0] <= -0.4 : dolly_movement[0] >= 0.4)
IsDefined(level.camera)
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 35
* Decompile Time: 129 ms
* Timestamp: 10/27/2023 3:01:17 AM
* Decompile Time: 18 ms
* Timestamp: 10/28/2023 12:10:53 AM
*******************************************************************/
#include common_scripts/utility;
@ -33,61 +33,136 @@ setmenu(name)
create_fx_menu()
{
/#
if(button_is_clicked("escape","x"))
{
exit_menu();
return;
}
if(menu("creation"))
{
if(button_is_clicked("1"))
{
setmenu("create_oneshot");
draw_effects_list();
return;
}
if(button_is_clicked("2"))
{
setmenu("create_loopfx");
draw_effects_list();
return;
}
if(button_is_clicked("3"))
{
setmenu("create_exploder");
draw_effects_list();
return;
}
if(button_is_clicked("4"))
{
setmenu("create_loopsound");
ent = createloopsound();
finish_creating_entity(ent);
setmenu("none");
return;
}
}
if(menu("create_oneshot") || menu("create_loopfx") || menu("create_exploder") || menu("change_fxid"))
{
if(button_is_clicked("rightarrow"))
{
increment_list_offset();
draw_effects_list();
}
if(button_is_clicked("leftarrow"))
{
decrement_list_offset();
draw_effects_list();
}
menu_fx_creation();
}
else if(menu("none"))
{
menu_change_selected_fx();
if(entities_are_selected())
{
display_fx_info(get_last_selected_entity());
if(button_is_clicked("a"))
{
clear_settable_fx();
setmenu("add_options");
}
}
}
else if(menu("add_options"))
{
if(!(entities_are_selected()))
{
clear_fx_hudelements();
setmenu("none");
return;
}
display_fx_add_options(get_last_selected_entity());
if(button_is_clicked("rightarrow"))
{
increment_list_offset();
}
if(button_is_clicked("leftarrow"))
{
decrement_list_offset();
}
}
else if(menu("jump_to_effect"))
{
if(button_is_clicked("rightarrow"))
{
increment_list_offset();
draw_effects_list("Select effect to jump to:");
}
if(button_is_clicked("leftarrow"))
{
decrement_list_offset();
draw_effects_list("Select effect to jump to:");
}
jump_to_effect();
}
else if(menu("select_by_property"))
{
menu_selection();
if(button_is_clicked("rightarrow"))
{
increment_list_offset();
}
if(button_is_clicked("leftarrow"))
{
decrement_list_offset();
}
}
else if(menu("change_type"))
{
if(!(entities_are_selected()))
{
clear_fx_hudelements();
setmenu("none");
return;
}
else
{
menu_fx_type();
(button_is_clicked("a")) ? menu("add_options") : ((entities_are_selected()) ? button_is_clicked("rightarrow") : ((button_is_clicked("leftarrow")) ? menu("jump_to_effect") : ((button_is_clicked("rightarrow")) ? button_is_clicked("leftarrow") : ((menu("select_by_property")) ? button_is_clicked("rightarrow") : ((button_is_clicked("leftarrow")) ? menu("change_type") : entities_are_selected())))))
entities_are_selected()
menu("none")
button_is_clicked("leftarrow")
button_is_clicked("rightarrow")
menu("create_oneshot") || menu("create_loopfx") || menu("create_exploder") || menu("change_fxid")
button_is_clicked("4")
button_is_clicked("3")
button_is_clicked("2")
button_is_clicked("1")
menu("creation")
button_is_clicked("escape","x")
}
}
#/
}
@ -117,46 +192,76 @@ menu_fx_creation()
count = 0;
picked_fx = undefined;
keys = get_level_ambient_fx();
i = level.effect_list_offset;
for(;;)
for(i = level.effect_list_offset;i < keys.size;i++)
{
count = count + 1;
button_to_check = count;
if(button_to_check == 10)
{
button_to_check = 0;
}
if(button_is_clicked(button_to_check + "") && !button_is_held("f"))
{
picked_fx = keys[i];
break;
i++;
}
if(count > level.effect_list_offset_max)
{
break;
}
}
if(!(IsDefined(picked_fx)))
{
return;
}
if(menu("change_fxid"))
{
apply_option_to_selected_fx(get_option("fxid"),picked_fx);
level.effect_list_offset = 0;
clear_fx_hudelements();
setmenu("none");
return;
}
ent = undefined;
if(menu("create_loopfx"))
{
ent = createloopeffect(picked_fx);
}
if(menu("create_oneshot"))
{
ent = createoneshoteffect(picked_fx);
delay_min = GetDvarInt(#"72501C7");
delay_max = GetDvarInt(#"A6DCBA49");
if(delay_min > delay_max)
{
temp = delay_min;
delay_min = delay_max;
delay_max = temp;
}
ent.v["delay"] = randomintrange(delay_min,delay_max);
}
if(menu("create_exploder"))
{
ent = createexploder(picked_fx);
}
finish_creating_entity(ent);
if(level.cfx_last_action != "none")
{
store_undo_state("edit",level.selected_fx_ents);
}
store_undo_state("add",level.createfxent[level.createfxent.size - 1]);
level.cfx_last_action = "none";
setmenu("none");
level.cfx_last_action != "none"
menu("create_exploder")
delay_min > delay_max
menu("create_oneshot")
menu("create_loopfx")
menu("change_fxid")
IsDefined(picked_fx)
(button_to_check == 10) ? button_is_clicked(button_to_check + "") && !button_is_held("f") : count > level.effect_list_offset_max
i < keys.size
#/
}
@ -173,7 +278,6 @@ finish_creating_entity(ent)
select_last_entity("skip_undo");
move_selection_to_cursor("skip_undo");
update_selected_entities();
ent.v["origin"]
#/
}
@ -181,21 +285,33 @@ ent.v["origin"]
change_effect_to_oneshot(ent)
{
/#
if(ent.v["type"] == "oneshotfx")
{
return;
}
if(ent.v["type"] == "exploder")
{
ent.v["exploder"] = undefined;
ent.v["exploder_type"] = undefined;
ent.v["soundalias"] = undefined;
}
if(!IsDefined(ent.v["delay"]) || ent.v["delay"] == 0)
{
delay_min = GetDvarInt(#"72501C7");
delay_max = GetDvarInt(#"A6DCBA49");
if(delay_min > delay_max)
{
temp = delay_min;
delay_min = delay_max;
delay_max = temp;
}
ent.v["delay"] = randomintrange(delay_min,delay_max);
}
ent.v["type"] = "oneshotfx";
delay_min > delay_max
!IsDefined(ent.v["delay"]) || ent.v["delay"] == 0
ent.v["type"] == "exploder"
ent.v["type"] == "oneshotfx"
#/
}
@ -203,15 +319,24 @@ ent.v["type"] == "oneshotfx"
change_effect_to_loop(ent)
{
/#
if(ent.v["type"] == "loopfx")
{
return;
}
if(ent.v["type"] == "exploder")
{
ent.v["exploder"] = undefined;
ent.v["exploder_type"] = undefined;
ent.v["soundalias"] = undefined;
}
if(!IsDefined(ent.v["delay"]) || ent.v["delay"] <= 0)
{
ent.v["delay"] = 1;
}
ent.v["type"] = "loopfx";
!IsDefined(ent.v["delay"]) || ent.v["delay"] <= 0
ent.v["type"] == "exploder"
ent.v["type"] == "loopfx"
#/
}
@ -219,13 +344,19 @@ ent.v["type"] == "loopfx"
change_effect_to_exploder(ent)
{
/#
if(ent.v["type"] == "exploder")
{
return;
}
ent.v["type"] = "exploder";
if(!IsDefined(ent.v["delay"]) || ent.v["delay"] < 0)
{
ent.v["delay"] = 0;
}
ent.v["exploder"] = 1;
ent.v["exploder_type"] = "normal";
!IsDefined(ent.v["delay"]) || ent.v["delay"] < 0
ent.v["type"] == "exploder"
#/
}
@ -235,26 +366,27 @@ change_ent_type(newtype)
/#
store_undo_state("edit",level.selected_fx_ents);
level.cfx_last_action = "ent_type";
i = 0;
for(;;)
if(newtype == "oneshotfx")
{
for(i = 0;i < level.selected_fx_ents.size;i++)
{
change_effect_to_oneshot(level.selected_fx_ents[i]);
i++;
}
i = 0;
for(;;)
}
else if(newtype == "loopfx")
{
for(i = 0;i < level.selected_fx_ents.size;i++)
{
change_effect_to_loop(level.selected_fx_ents[i]);
i++;
}
i = 0;
for(;;)
}
else if(newtype == "exploder")
{
for(i = 0;i < level.selected_fx_ents.size;i++)
{
change_effect_to_exploder(level.selected_fx_ents[i]);
i++;
}
(i < level.selected_fx_ents.size) ? newtype == "loopfx" : ((i < level.selected_fx_ents.size) ? newtype == "exploder" : i < level.selected_fx_ents.size)
newtype == "oneshotfx"
}
#/
}
@ -329,23 +461,48 @@ entities_are_selected()
menu_change_selected_fx()
{
/#
if(!(level.selected_fx_ents.size))
{
return;
}
count = 0;
drawncount = 0;
ent = get_last_selected_ent();
i = 0;
for(;;)
for(i = 0;i < level.createfx_options.size;i++)
{
option = level.createfx_options[i];
if(!(IsDefined(ent.v[option["name"]])))
{
}
else
{
count++;
if(count < level.effect_list_offset)
{
}
else
{
drawncount++;
button_to_check = drawncount;
if(button_to_check == 10)
{
button_to_check = 0;
}
if(button_is_clicked(button_to_check + "") && !button_is_held("f"))
{
prepare_option_for_change(option,drawncount);
break;
i++;
}
(level.selected_fx_ents.size) ? i < level.createfx_options.size : ((IsDefined(ent.v[option["name"]])) ? count < level.effect_list_offset : ((button_to_check == 10) ? button_is_clicked(button_to_check + "") && !button_is_held("f") : drawncount > level.effect_list_offset_max))
if(drawncount > level.effect_list_offset_max)
{
break;
}
}
}
}
#/
}
@ -353,17 +510,23 @@ menu_change_selected_fx()
prepare_option_for_change(option,drawncount)
{
/#
if(option["name"] == "fxid")
{
setmenu("change_fxid");
draw_effects_list();
return;
}
if(option["name"] == "type")
{
setmenu("change_type");
return;
}
level.createfx_inputlocked = 1;
set_option_index(option["name"]);
setdvar("fx","nil");
level.createfxhudelements[drawncount + 1][0].color = (1,1,0);
option["name"] == "type"
option["name"] == "fxid"
#/
}
@ -371,22 +534,44 @@ option["name"] == "fxid"
menu_fx_option_set()
{
/#
if(GetDvar(#"5977E3") == "nil")
{
return;
}
option = get_selected_option();
setting = undefined;
if(option["type"] == "string")
{
setting = GetDvar(#"5977E3");
}
if(option["type"] == "int")
{
setting = GetDvarInt(#"5977E3");
}
if(option["type"] == "float")
{
setting = GetDvarFloat(#"5977E3");
}
if(option["type"] == "vector")
{
setting = GetDvar(#"5977E3");
temparray = strtok(setting," ");
if(temparray.size == 3)
{
setting = (float(temparray[0]),float(temparray[1]),float(temparray[2]));
}
else
{
clear_settable_fx();
return;
}
}
apply_option_to_selected_fx(option,setting);
(option["type"] == "float") ? option["type"] == "vector" : temparray.size == 3
option["type"] == "int"
option["type"] == "string"
GetDvar(#"5977E3") == "nil"
#/
}
@ -400,15 +585,26 @@ menu_fx_type()
set_fx_hudelement(" (2) Looped");
set_fx_hudelement(" (3) Exploder");
set_fx_hudelement("(x) Exit >");
if(button_is_clicked("1") && !button_is_held("f"))
{
change_ent_type("oneshotfx");
setmenu("none");
}
else if(button_is_clicked("2") && !button_is_held("f"))
{
change_ent_type("loopfx");
setmenu("none");
}
else if(button_is_clicked("3") && !button_is_held("f"))
{
change_ent_type("exploder");
setmenu("none");
}
if(menu("none"))
{
update_selected_entities();
menu("none")
Stack-Empty ? Stack-Empty : ((button_is_clicked("1") && !button_is_held("f")) ? button_is_clicked("2") && !button_is_held("f") : button_is_clicked("3") && !button_is_held("f"))
}
#/
}
@ -421,28 +617,54 @@ menu_selection()
drawncount = 0;
option_number = 0;
ent = level.selected_fx_ents[level.selected_fx_ents.size - 1];
if(level.selected_fx_ents.size < 1)
{
set_fx_hudelement("No ent is selected.");
i = level.effect_list_offset;
for(;;)
}
else
{
for(i = level.effect_list_offset;i < level.createfx_options.size;i++)
{
if(drawncount > level.effect_list_offset_max)
{
break;
}
if(drawncount > ent.v.size)
{
break;
}
prop_name = level.createfx_options[i]["name"];
option_number = drawncount + 1;
if(IsDefined(ent.v[prop_name]))
{
if(button_is_clicked(option_number + "") && !button_is_held("f"))
{
level.cfx_selected_prop = prop_name;
menunone();
level.effect_list_offset = 0;
return;
}
prop_desc = level.createfx_options[i]["description"];
set_fx_hudelement(option_number + ". " + prop_desc + ": " + ent.v[prop_name]);
drawncount++;
i++;
}
else
{
}
}
}
if(drawncount > level.effect_list_offset_max)
{
pages = ceil(ent.v.size / level.effect_list_offset_max);
current_page = level.effect_list_offset / level.effect_list_offset_max + 1;
set_fx_hudelement("(<-) Page " + current_page + " of " + pages + " (->)");
}
set_fx_hudelement("(x) Exit >");
drawncount > level.effect_list_offset_max
Stack-Empty ? level.selected_fx_ents.size < 1 : ((i < level.createfx_options.size) ? drawncount > level.effect_list_offset_max : ((drawncount > ent.v.size) ? IsDefined(ent.v[prop_name]) : button_is_clicked(option_number + "") && !button_is_held("f")))
#/
}
@ -450,20 +672,23 @@ Stack-Empty ? level.selected_fx_ents.size < 1 : ((i < level.createfx_options.siz
apply_option_to_selected_fx(option,setting)
{
/#
if(level.cfx_last_action != option["name"])
{
store_undo_state("edit",level.selected_fx_ents);
level.cfx_last_action = option["name"];
i = 0;
for(;;)
}
for(i = 0;i < level.selected_fx_ents.size;i++)
{
ent = level.selected_fx_ents[i];
if(mask(option["mask"],ent.v["type"]))
{
ent.v[option["name"]] = setting;
i++;
}
}
update_selected_entities();
clear_settable_fx();
mask(option["mask"],ent.v["type"])
i < level.selected_fx_ents.size
level.cfx_last_action != option["name"]
#/
}
@ -471,14 +696,17 @@ level.cfx_last_action != option["name"]
set_option_index(name)
{
/#
i = 0;
for(;;)
for(i = 0;i < level.createfx_options.size;i++)
{
if(level.createfx_options[i]["name"] != name)
{
}
else
{
level.selected_fx_option_index = i;
return;
i++;
}
Stack-Empty ? i < level.createfx_options.size : level.createfx_options[i]["name"] != name
}
#/
}
@ -516,14 +744,13 @@ addoption(type,name,description,defaultsetting,mask)
get_option(name)
{
/#
i = 0;
for(;;)
for(i = 0;i < level.createfx_options.size;i++)
{
if(level.createfx_options[i]["name"] == name)
{
return level.createfx_options[i];
i++;
}
level.createfx_options[i]["name"] == name
i < level.createfx_options.size
}
#/
}
@ -531,34 +758,64 @@ i < level.createfx_options.size
display_fx_info(ent)
{
/#
if(!(menu("none")))
{
return;
}
clear_fx_hudelements();
if(!(level.createfx_draw_enabled))
{
return;
}
set_fx_hudelement("Selected: " + level.selected_fx_ents.size + " Distance: " + get_distance_from_ent(ent));
level.createfxhudelements[0][0].color = (1,1,0);
set_fx_hudelement("Name: " + ent.v["fxid"]);
if(entities_are_selected())
{
count = 0;
drawncount = 0;
i = 0;
for(;;)
for(i = 0;i < level.createfx_options.size;i++)
{
option = level.createfx_options[i];
if(!(IsDefined(ent.v[option["name"]])))
{
}
else
{
count++;
if(count < level.effect_list_offset)
{
}
else
{
drawncount++;
set_fx_hudelement(drawncount + ". " + option["description"] + ": " + ent.v[option["name"]]);
if(drawncount > level.effect_list_offset_max)
{
more = 1;
break;
i++;
}
}
}
}
if(count > level.effect_list_offset_max)
{
pages = ceil(level.createfx_options.size / level.effect_list_offset_max);
current_page = level.effect_list_offset / level.effect_list_offset_max + 1;
set_fx_hudelement("(<-) Page " + current_page + " of " + pages + " (->)");
}
set_fx_hudelement("(a) Add >");
set_fx_hudelement("(x) Exit >");
}
else
{
set_fx_hudelement("Origin: " + ent.v["origin"]);
set_fx_hudelement("Angles: " + ent.v["angles"]);
(level.createfx_draw_enabled) ? ((entities_are_selected()) ? i < level.createfx_options.size : ((IsDefined(ent.v[option["name"]])) ? count < level.effect_list_offset : drawncount > level.effect_list_offset_max)) : count > level.effect_list_offset_max
menu("none")
}
#/
}
@ -580,27 +837,58 @@ display_fx_add_options(ent)
set_fx_hudelement("Angles: " + ent.v["angles"]);
count = 0;
drawncount = 0;
if(level.effect_list_offset >= level.createfx_options.size)
{
level.effect_list_offset = 0;
i = 0;
for(;;)
}
for(i = 0;i < level.createfx_options.size;i++)
{
option = level.createfx_options[i];
if(IsDefined(ent.v[option["name"]]))
{
}
else if(!(mask(option["mask"],ent.v["type"])))
{
}
else
{
count++;
if(count < level.effect_list_offset)
{
}
else if(drawncount >= level.effect_list_offset_max)
{
}
else
{
drawncount++;
button_to_check = drawncount;
if(button_to_check == 10)
{
button_to_check = 0;
}
if(button_is_clicked(button_to_check + "") && !button_is_held("f"))
{
add_option_to_selected_entities(option);
menunone();
return;
set_fx_hudelement(button_to_check + ". " + option["description"]);
i++;
}
set_fx_hudelement(button_to_check + ". " + option["description"]);
}
}
}
if(count > level.effect_list_offset_max)
{
pages = ceil(level.createfx_options.size / level.effect_list_offset_max);
current_page = level.effect_list_offset / level.effect_list_offset_max + 1;
set_fx_hudelement("(<-) Page " + current_page + " of " + pages + " (->)");
}
set_fx_hudelement("(x) Exit >");
count > level.effect_list_offset_max
Stack-Empty ? level.effect_list_offset >= level.createfx_options.size : ((i < level.createfx_options.size) ? IsDefined(ent.v[option["name"]]) : ((mask(option["mask"],ent.v["type"])) ? count < level.effect_list_offset : ((drawncount >= level.effect_list_offset_max) ? button_to_check == 10 : button_is_clicked(button_to_check + "") && !button_is_held("f"))))
#/
}
@ -608,15 +896,14 @@ Stack-Empty ? level.effect_list_offset >= level.createfx_options.size : ((i < le
add_option_to_selected_entities(option)
{
/#
i = 0;
for(;;)
for(i = 0;i < level.selected_fx_ents.size;i++)
{
ent = level.selected_fx_ents[i];
if(mask(option["mask"],ent.v["type"]))
{
ent.v[option["name"]] = option["default"];
i++;
}
mask(option["mask"],ent.v["type"])
i < level.selected_fx_ents.size
}
#/
}
@ -635,29 +922,41 @@ draw_effects_list(title)
{
/#
clear_fx_hudelements();
if(!(IsDefined(title)))
{
title = "Pick an effect:";
}
set_fx_hudelement(title);
count = 0;
more = 0;
keys = get_level_ambient_fx();
if(level.effect_list_offset >= keys.size)
{
level.effect_list_offset = 0;
}
else if(level.effect_list_offset < 0)
{
level.effect_list_offset = int(floor(keys.size / level.effect_list_offset_max) * level.effect_list_offset_max);
i = level.effect_list_offset;
for(;;)
}
for(i = level.effect_list_offset;i < keys.size;i++)
{
count = count + 1;
set_fx_hudelement(count + ". " + keys[i]);
if(count >= level.effect_list_offset_max)
{
more = 1;
break;
i++;
}
}
if(keys.size > level.effect_list_offset_max)
{
pages = ceil(keys.size / level.effect_list_offset_max);
current_page = level.effect_list_offset / level.effect_list_offset_max + 1;
set_fx_hudelement("(<-) Page " + current_page + " of " + pages + " (->)");
keys.size > level.effect_list_offset_max
count >= level.effect_list_offset_max
i < keys.size
IsDefined(title) ? level.effect_list_offset >= keys.size : level.effect_list_offset < 0
}
#/
}
@ -684,27 +983,47 @@ jump_to_effect()
count = 0;
picked_fxid = undefined;
keys = get_level_ambient_fx();
i = level.effect_list_offset;
for(;;)
for(i = level.effect_list_offset;i < keys.size;i++)
{
count = count + 1;
button_to_check = count;
if(button_to_check == 10)
{
button_to_check = 0;
}
if(button_is_clicked(button_to_check + "") && !button_is_held("f"))
{
picked_fxid = keys[i];
break;
i++;
}
if(count > level.effect_list_offset_max)
{
break;
}
}
if(!(IsDefined(picked_fxid)))
{
return;
}
clear_entity_selection();
ent = get_next_ent_with_same_id(-1,picked_fxid);
if(IsDefined(ent))
{
level.cfx_next_ent = ent;
move_player_to_next_same_effect(1);
}
else
{
iprintln("Effect " + picked_fxid + " has not been placed.");
}
level.effect_list_offset = 0;
clear_fx_hudelements();
setmenu("none");
((button_to_check == 10) ? button_is_clicked(button_to_check + "") && !button_is_held("f") : count > level.effect_list_offset_max) ? IsDefined(picked_fxid) : IsDefined(ent)
i < keys.size
#/
}
@ -712,22 +1031,27 @@ i < keys.size
get_level_ambient_fx()
{
/#
if(!(IsDefined(level._effect_keys)))
{
keys = getarraykeys(level._effect);
level._effect_keys = [];
k = 0;
i = 0;
for(;;)
for(i = 0;i < keys.size;i++)
{
if(issubstr(keys[i],"fx_"))
{
level._effect_keys[k] = keys[i];
k++;
i++;
}
}
if(level._effect_keys.size == 0)
{
level._effect_keys = keys;
}
}
return level._effect_keys;
level._effect_keys.size == 0
issubstr(keys[i],"fx_")
i < keys.size
IsDefined(level._effect_keys)
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 20
* Decompile Time: 88 ms
* Timestamp: 10/27/2023 3:01:18 AM
* Decompile Time: 4 ms
* Timestamp: 10/28/2023 12:10:53 AM
*******************************************************************/
#include common_scripts/utility;
@ -509,16 +509,26 @@ array_drop(array)
debug_print_ent_array(array,name)
{
/#
if(IsDefined(name))
{
println("Printing out " + name);
}
else
{
println("Printing out some array");
i = 0;
for(;;)
}
for(i = 0;i < array.size;i++)
{
if(!(IsDefined(array[i])))
{
println("" + i + ": deleted effect");
println("" + i + ": uniqueid: " + array[i].uniqueid + " fxid: " + array[i].v["fxid"]);
i++;
}
(Stack-Empty ? Stack-Empty : IsDefined(name)) ? i < array.size : IsDefined(array[i])
else
{
println("" + i + ": uniqueid: " + array[i].uniqueid + " fxid: " + array[i].v["fxid"]);
}
}
#/
}
@ -527,20 +537,41 @@ debug_print_latest_state(type)
{
/#
println("^3Saving " + type + " state");
if(type == "undo")
{
if(!(IsDefined(level.cfx_undo_states[level.cfx_undo_states.size - 1])))
{
println("There are no undo states.");
return;
}
state = level.cfx_undo_states[level.cfx_undo_states.size - 1];
size = level.cfx_undo_states.size - 1;
}
else if(type == "redo")
{
if(!(IsDefined(level.cfx_redo_states[level.cfx_redo_states.size - 1])))
{
println("There are no redo states.");
return;
}
state = level.cfx_redo_states[level.cfx_redo_states.size - 1];
size = level.cfx_redo_states.size - 1;
}
else
{
if(!(IsDefined(level.cfx_limbo_state)))
{
println("There is no limbo state.");
return;
}
state = level.cfx_limbo_state;
size = 0;
}
println("State " + size + " - " + state.operation + ": " + state.last_action);
debug_print_ent_array(state.ent_array,"save state ent_array");
type == "undo" ? IsDefined(level.cfx_undo_states[level.cfx_undo_states.size - 1]) : (type == "redo" ? IsDefined(level.cfx_redo_states[level.cfx_redo_states.size - 1]) : IsDefined(level.cfx_limbo_state))
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 23
* Decompile Time: 87 ms
* Timestamp: 10/27/2023 3:01:19 AM
* Decompile Time: 10 ms
* Timestamp: 10/28/2023 12:10:53 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 3
* Decompile Time: 18 ms
* Timestamp: 10/27/2023 3:01:19 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:54 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 21
* Decompile Time: 85 ms
* Timestamp: 10/27/2023 3:01:20 AM
* Decompile Time: 5 ms
* Timestamp: 10/28/2023 12:10:54 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 1 ms
* Timestamp: 10/27/2023 3:01:20 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:54 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 10
* Decompile Time: 22 ms
* Timestamp: 10/27/2023 3:01:20 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:55 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 7
* Decompile Time: 24 ms
* Timestamp: 10/27/2023 3:01:21 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:55 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 2
* Decompile Time: 3 ms
* Timestamp: 10/27/2023 3:01:21 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:55 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 10
* Decompile Time: 26 ms
* Timestamp: 10/27/2023 3:01:21 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:55 AM
*******************************************************************/
#include maps/mp/_utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 31
* Decompile Time: 85 ms
* Timestamp: 10/27/2023 3:01:22 AM
* Decompile Time: 8 ms
* Timestamp: 10/28/2023 12:10:56 AM
*******************************************************************/
#include common_scripts/utility;
@ -16,6 +16,8 @@
print_org(fxcommand,fxid,fxpos,waittime)
{
/#
if(GetDvar(#"F49A52C") == "1")
{
println("{");
println("\"origin\" \" + fxpos[0] + " " + fxpos[1] + " " + fxpos[2] + "\");
println("\"classname\" \"script_model\");
@ -24,7 +26,7 @@ print_org(fxcommand,fxid,fxpos,waittime)
println("\"script_fxid\" \" + fxid + "\");
println("\"script_delay\" \" + waittime + "\");
println("}");
GetDvar(#"F49A52C") == "1"
}
#/
}
@ -415,18 +417,36 @@ setup_fx()
script_print_fx()
{
/#
if(!IsDefined(self.script_fxid) || !IsDefined(self.script_fxcommand) || !IsDefined(self.script_delay))
{
println("Effect at origin ",self.origin," doesn\'t have script_fxid/script_fxcommand/script_delay");
self delete();
return;
}
if(IsDefined(self.target))
{
org = getent(self.target,"targetname").origin;
}
else
{
org = "undefined";
}
if(self.script_fxcommand == "OneShotfx")
{
println("mapsmp_fx::OneShotfx(\" + self.script_fxid + "\", " + self.origin + ", " + self.script_delay + ", " + org + ");");
}
if(self.script_fxcommand == "loopfx")
{
println("mapsmp_fx::LoopFx(\" + self.script_fxid + "\", " + self.origin + ", " + self.script_delay + ", " + org + ");");
}
if(self.script_fxcommand == "loopsound")
{
println("mapsmp_fx::LoopSound(\" + self.script_fxid + "\", " + self.origin + ", " + self.script_delay + ", " + org + ");");
self.script_fxcommand == "loopsound"
self.script_fxcommand == "loopfx"
self.script_fxcommand == "OneShotfx"
Stack-Empty ? !IsDefined(self.script_fxid) || !IsDefined(self.script_fxcommand) || !IsDefined(self.script_delay) : IsDefined(self.target)
}
#/
}

View File

@ -5,7 +5,7 @@
* Platform: PC
* Function Count: 1
* Decompile Time: 0 ms
* Timestamp: 10/27/2023 3:01:22 AM
* Timestamp: 10/28/2023 12:10:56 AM
*******************************************************************/
#using_animtree( "fxanim_props" );

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 22
* Decompile Time: 74 ms
* Timestamp: 10/27/2023 3:01:23 AM
* Decompile Time: 3 ms
* Timestamp: 10/28/2023 12:10:56 AM
*******************************************************************/
#include maps/mp/_utility;
@ -134,9 +134,8 @@ teamscorelimitcheck(rulescorepercent)
/#
updatedebughud(3,"Score Percentage Left: ",int(minscorepercentageleft));
#/
}
#/
return 1;
}
@ -442,14 +441,17 @@ updatedebughud(hudindex,text,value)
level.sessionadverthud_1a_text = text;
level.sessionadverthud_1b_text = value;
break;
case "2":
level.sessionadverthud_2a_text = text;
level.sessionadverthud_2b_text = value;
break;
case "3":
level.sessionadverthud_3a_text = text;
level.sessionadverthud_3b_text = value;
break;
case "4":
level.sessionadverthud_4a_text = text;
level.sessionadverthud_4b_text = value;
@ -481,16 +483,24 @@ sessionadvertismentupdatedebughud()
level.sessionadverthud_3b_text = "";
level.sessionadverthud_4a_text = "";
level.sessionadverthud_4b_text = "";
for(;;)
{
for(;;)
while(1)
{
wait(1);
showdebughud = getdvarintdefault("sessionAdvertShowDebugHud",0);
level.sessionadverthud_0_text = "Session is advertised";
if(level.sessionadvertstatus == 0)
{
level.sessionadverthud_0_text = "Session is not advertised";
host = gethostplayer();
}
if(!IsDefined(sessionadverthud_0) && showdebughud != 0)
{
host = gethostplayer();
if(!(IsDefined(host)))
{
continue;
}
sessionadverthud_0 = host sessionadvertismentcreatedebughud(0,0);
sessionadverthud_1a = host sessionadvertismentcreatedebughud(1,-20);
sessionadverthud_1b = host sessionadvertismentcreatedebughud(1,0);
@ -504,6 +514,12 @@ sessionadvertismentupdatedebughud()
sessionadverthud_1b.color = VectorScale((0,1,0));
sessionadverthud_2a.color = VectorScale((0,1,0));
sessionadverthud_2b.color = VectorScale((0,1,0));
}
if(IsDefined(sessionadverthud_0))
{
if(showdebughud == 0)
{
sessionadverthud_0 destroy();
sessionadverthud_1a destroy();
sessionadverthud_1b destroy();
@ -523,31 +539,42 @@ sessionadvertismentupdatedebughud()
sessionadverthud_4a = undefined;
sessionadverthud_4b = undefined;
continue;
}
if(level.sessionadvertstatus == 1)
{
sessionadverthud_0.color = (1,1,1);
}
else
{
sessionadverthud_0.color = VectorScale((1,0,0));
}
sessionadverthud_0 settext(level.sessionadverthud_0_text);
if(level.sessionadverthud_1a_text != "")
{
sessionadverthud_1a settext(level.sessionadverthud_1a_text);
sessionadverthud_1b setvalue(level.sessionadverthud_1b_text);
}
if(level.sessionadverthud_2a_text != "")
{
sessionadverthud_2a settext(level.sessionadverthud_2a_text);
sessionadverthud_2b setvalue(level.sessionadverthud_2b_text);
}
if(level.sessionadverthud_3a_text != "")
{
sessionadverthud_3a settext(level.sessionadverthud_3a_text);
sessionadverthud_3b setvalue(level.sessionadverthud_3b_text);
}
if(level.sessionadverthud_4a_text != "")
{
sessionadverthud_4a settext(level.sessionadverthud_4a_text);
sessionadverthud_4b setvalue(level.sessionadverthud_4b_text);
}
level.sessionadverthud_4a_text != ""
level.sessionadverthud_3a_text != ""
level.sessionadverthud_2a_text != ""
level.sessionadverthud_1a_text != ""
showdebughud == 0 ? level.sessionadvertstatus == 1 : 0.9
IsDefined(sessionadverthud_0)
0.5
0.5
0.5
0.5
IsDefined(host)
!IsDefined(sessionadverthud_0) && showdebughud != 0
level.sessionadvertstatus == 0
1
}
}
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 16
* Decompile Time: 31 ms
* Timestamp: 10/27/2023 3:01:23 AM
* Decompile Time: 19 ms
* Timestamp: 10/28/2023 12:10:57 AM
*******************************************************************/
#include maps/mp/_utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 3
* Decompile Time: 20 ms
* Timestamp: 10/27/2023 3:01:24 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:57 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 23
* Decompile Time: 232 ms
* Timestamp: 10/27/2023 3:01:25 AM
* Decompile Time: 7 ms
* Timestamp: 10/28/2023 12:10:57 AM
*******************************************************************/
#include common_scripts/utility;
@ -380,9 +380,15 @@ getbesthackertooltarget()
else
{
/#
if(GetDvar(#"4C560F97") == "1")
{
if(self iswithinhackertoolreticle(targetsall[idx]))
{
targetsvalid[targetsvalid.size] = targetsall[idx];
self iswithinhackertoolreticle(targetsall[idx])
GetDvar(#"4C560F97") == "1"
}
}
else
{
#/
if(level.teambased)
{
@ -433,6 +439,7 @@ GetDvar(#"4C560F97") == "1"
}
}
}
}
chosenent = undefined;
if(targetsvalid.size != 0)
@ -817,7 +824,7 @@ gethacktime(target)
tunables()
{
/#
for(;;)
while(1)
{
level.hackertoollostsightlimitms = weapons_get_dvar_int("scr_hackerToolLostSightLimitMs",1000);
level.hackertoollockonradius = weapons_get_dvar("scr_hackerToolLockOnRadius",20);
@ -837,6 +844,5 @@ tunables()
level.chopper_gunner_time = weapons_get_dvar_int("scr_chopper_gunner_time",7);
wait(1);
}
1
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 34
* Decompile Time: 131 ms
* Timestamp: 10/27/2023 3:01:25 AM
* Decompile Time: 6 ms
* Timestamp: 10/28/2023 12:10:58 AM
*******************************************************************/
#include common_scripts/utility;
@ -273,9 +273,15 @@ getbeststingertarget()
for(idx = 0;idx < targetsall.size;idx++)
{
/#
if(GetDvar(#"4C560F97") == "1")
{
if(self insidestingerreticlenolock(targetsall[idx]))
{
targetsvalid[targetsvalid.size] = targetsall[idx];
self insidestingerreticlenolock(targetsall[idx])
GetDvar(#"4C560F97") == "1"
}
}
else
{
#/
if(level.teambased)
{
@ -295,6 +301,7 @@ GetDvar(#"4C560F97") == "1"
}
}
}
}
if(targetsvalid.size == 0)
{

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 9
* Decompile Time: 54 ms
* Timestamp: 10/27/2023 3:01:26 AM
* Decompile Time: 4 ms
* Timestamp: 10/28/2023 12:10:58 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 10
* Decompile Time: 137 ms
* Timestamp: 10/27/2023 3:01:27 AM
* Decompile Time: 9 ms
* Timestamp: 10/28/2023 12:10:58 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 6
* Decompile Time: 7 ms
* Timestamp: 10/27/2023 3:01:27 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:59 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 1 ms
* Timestamp: 10/27/2023 3:01:28 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:59 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 11
* Decompile Time: 72 ms
* Timestamp: 10/27/2023 3:01:28 AM
* Decompile Time: 5 ms
* Timestamp: 10/28/2023 12:10:59 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 3 ms
* Timestamp: 10/27/2023 3:01:28 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:59 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 2
* Decompile Time: 4 ms
* Timestamp: 10/27/2023 3:01:29 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:11:00 AM
*******************************************************************/
#include maps/mp/_utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 1 ms
* Timestamp: 10/27/2023 3:01:29 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:11:00 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 10
* Decompile Time: 265 ms
* Timestamp: 10/27/2023 3:01:31 AM
* Decompile Time: 3 ms
* Timestamp: 10/28/2023 12:11:00 AM
*******************************************************************/
#include common_scripts/utility;
@ -71,10 +71,14 @@ init()
popupsfromconsole()
{
/#
for(;;)
while(1)
{
timeout = getdvarintdefault("scr_popuptime",1);
if(timeout == 0)
{
timeout = 1;
}
wait(timeout);
medal = getdvarintdefault("scr_popupmedal",0);
challenge = getdvarintdefault("scr_popupchallenge",0);
@ -85,80 +89,92 @@ popupsfromconsole()
gamemodemsg = getdvarintdefault("scr_gamemodeslideout",0);
teammsg = getdvarintdefault("scr_teamslideout",0);
challengeindex = getdvarintdefault("scr_challengeIndex",1);
i = 0;
for(;;)
for(i = 0;i < medal;i++)
{
level.players[0] maps/mp/_medals::codecallback_medal(4);
i++;
}
i = 0;
for(;;)
for(i = 0;i < challenge;i++)
{
level.players[0] maps/mp/gametypes/_persistence::codecallback_challengecomplete(2500,1,84,3,0,0,851);
level.players[0] maps/mp/gametypes/_persistence::codecallback_challengecomplete(500,1,22,2,0,0,533);
i++;
}
i = 0;
for(;;)
for(i = 0;i < rank;i++)
{
level.players[0] maps/mp/gametypes/_rank::codecallback_rankup(4,0,0);
i++;
}
i = 0;
for(;;)
for(i = 0;i < gun;i++)
{
level.players[0] maps/mp/gametypes/_persistence::codecallback_gunchallengecomplete(0,20,25,0);
i++;
}
i = 0;
for(;;)
for(i = 0;i < contractpass;i++)
{
level.players[0] maps/mp/gametypes/_persistence::addcontracttoqueue(12,1);
i++;
}
i = 0;
for(;;)
for(i = 0;i < contractfail;i++)
{
level.players[0] maps/mp/gametypes/_persistence::addcontracttoqueue(12,0);
i++;
}
i = 0;
for(;;)
for(i = 0;i < teammsg;i++)
{
player = level.players[0];
if(IsDefined(level.players[1]))
{
player = level.players[1];
level.players[0] displayteammessagetoall(&"KILLSTREAK_DESTROYED_HELICOPTER",player);
i++;
}
level.players[0] displayteammessagetoall(&"KILLSTREAK_DESTROYED_HELICOPTER",player);
}
reset = getdvarintdefault("scr_popupreset",1);
if(reset)
{
if(medal)
{
setdvar("scr_popupmedal",0);
}
if(challenge)
{
setdvar("scr_popupchallenge",0);
}
if(gun)
{
setdvar("scr_popupgun",0);
}
if(rank)
{
setdvar("scr_popuprank",0);
}
if(contractpass)
{
setdvar("scr_popupcontractpass",0);
}
if(contractfail)
{
setdvar("scr_popupcontractfail",0);
}
if(gamemodemsg)
{
setdvar("scr_gamemodeslideout",0);
}
if(teammsg)
{
setdvar("scr_teamslideout",0);
}
teammsg
gamemodemsg
contractfail
contractpass
rank
gun
challenge
medal
reset
IsDefined(level.players[1])
i < teammsg
i < contractfail
i < contractpass
i < gun
i < rank
i < challenge
i < medal
timeout == 0
1
}
}
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 16
* Decompile Time: 102 ms
* Timestamp: 10/27/2023 3:01:31 AM
* Decompile Time: 7 ms
* Timestamp: 10/28/2023 12:11:00 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 19
* Decompile Time: 72 ms
* Timestamp: 10/27/2023 3:01:32 AM
* Decompile Time: 4 ms
* Timestamp: 10/28/2023 12:11:01 AM
*******************************************************************/
#include common_scripts/utility;
@ -315,10 +315,12 @@ watchriotshielddeploy()
/#
assert(!IsDefined(self.riotshieldentity));
#/
if(level.gametype != "shrp")
{
/#
assert(primaries.size > 0);
}
#/
level.gametype != "shrp"
#/
shield_ent setclientfield("riotshield_state",1);
shield_ent.reconmodel setclientfield("riotshield_state",1);

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 3
* Decompile Time: 19 ms
* Timestamp: 10/27/2023 3:01:32 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:11:01 AM
*******************************************************************/
#include maps/mp/_challenges;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 22
* Decompile Time: 132 ms
* Timestamp: 10/27/2023 3:01:33 AM
* Decompile Time: 19 ms
* Timestamp: 10/28/2023 12:11:01 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 9
* Decompile Time: 40 ms
* Timestamp: 10/27/2023 3:01:34 AM
* Decompile Time: 2 ms
* Timestamp: 10/28/2023 12:11:01 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 4
* Decompile Time: 68 ms
* Timestamp: 10/27/2023 3:01:34 AM
* Decompile Time: 5 ms
* Timestamp: 10/28/2023 12:11:02 AM
*******************************************************************/
#include common_scripts/utility;
@ -31,26 +31,43 @@ script_gen_dump()
{
/#
script_gen_dump_checksaved();
if(!(level.script_gen_dump_reasons.size))
{
flag_set("scriptgen_done");
return;
}
firstrun = 0;
if(level.bscriptgened)
{
println(" ");
println(" ");
println(" ");
println("^2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
println("^3Dumping scriptgen dump for these reasons");
println("^2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
i = 0;
for(;;)
for(i = 0;i < level.script_gen_dump_reasons.size;i++)
{
if(issubstr(level.script_gen_dump_reasons[i],"nowrite"))
{
substr = getsubstr(level.script_gen_dump_reasons[i],15);
println(i + ". ) " + substr);
println(i + ". ) " + level.script_gen_dump_reasons[i]);
firstrun = 1;
i++;
}
else
{
println(i + ". ) " + level.script_gen_dump_reasons[i]);
}
if(level.script_gen_dump_reasons[i] == "First run")
{
firstrun = 1;
}
}
println("^2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
println(" ");
if(firstrun)
{
println("for First Run make sure you delete all of the vehicle precache script calls, createart calls, createfx calls( most commonly placed in maps\\" + level.script + "_fx.gsc ) ");
println(" ");
println("replace:");
@ -59,17 +76,31 @@ script_gen_dump()
println("with( don\'t forget to add this file to P4 ):");
println("maps\\scriptgen\\" + level.script + "_scriptgen::main();");
println(" ");
}
println("^2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
println(" ");
println("^2 / \\ / \\ / \\");
println("^2scroll up");
println("^2 / \\ / \\ / \\");
println(" ");
}
else
{
return;
}
filename = "scriptgen/" + level.script + "_scriptgen.gsc";
csvfilename = "zone_source/" + level.script + ".csv";
if(level.bscriptgened)
{
file = openfile(filename,"write");
}
else
{
file = 0;
}
/#
assert(file != -1,"File not writeable( check it and and restart the map ): " + filename);
#/
@ -80,82 +111,114 @@ script_gen_dump()
script_gen_dumpprintln(file,"\tlevel.script_gen_dump = [];");
script_gen_dumpprintln(file,"");
signatures = getarraykeys(level.script_gen_dump);
i = 0;
for(;;)
for(i = 0;i < signatures.size;i++)
{
if(!(issubstr(level.script_gen_dump[signatures[i]],"nowrite")))
{
script_gen_dumpprintln(file,"\t" + level.script_gen_dump[signatures[i]]);
i++;
}
i = 0;
for(;;)
}
for(i = 0;i < signatures.size;i++)
{
if(!(issubstr(level.script_gen_dump[signatures[i]],"nowrite")))
{
script_gen_dumpprintln(file,"\tlevel.script_gen_dump[ " + "\" + signatures[i] + "\" + " ] = " + "\" + signatures[i] + "\" + ";");
script_gen_dumpprintln(file,"\tlevel.script_gen_dump[ " + "\" + signatures[i] + "\" + " ] = " + "\"nowrite\" + ";");
i++;
}
else
{
script_gen_dumpprintln(file,"\tlevel.script_gen_dump[ " + "\" + signatures[i] + "\" + " ] = " + "\"nowrite\" + ";");
}
}
script_gen_dumpprintln(file,"");
keys1 = undefined;
keys2 = undefined;
if(IsDefined(level.sg_precacheanims))
{
keys1 = getarraykeys(level.sg_precacheanims);
i = 0;
for(;;)
}
if(IsDefined(keys1))
{
for(i = 0;i < keys1.size;i++)
{
script_gen_dumpprintln(file,"\tanim_precach_" + keys1[i] + "();");
i++;
}
}
script_gen_dumpprintln(file,"\tmaps\\_load::main( 1, " + level.bcsvgened + ", 1 );");
script_gen_dumpprintln(file,"}");
script_gen_dumpprintln(file,"");
if(IsDefined(level.sg_precacheanims))
{
keys1 = getarraykeys(level.sg_precacheanims);
i = 0;
for(;;)
}
if(IsDefined(keys1))
{
for(i = 0;i < keys1.size;i++)
{
script_gen_dumpprintln(file,"#using_animtree( \" + keys1[i] + "\" );");
script_gen_dumpprintln(file,"anim_precach_" + keys1[i] + "()");
script_gen_dumpprintln(file,"{");
script_gen_dumpprintln(file,"\tlevel.sg_animtree[ \" + keys1[i] + "\" ] = #animtree;");
keys2 = getarraykeys(level.sg_precacheanims[keys1[i]]);
j = 0;
for(;;)
if(IsDefined(keys2))
{
for(j = 0;j < keys2.size;j++)
{
script_gen_dumpprintln(file,"\tlevel.sg_anim[ \" + keys2[j] + "\" ] = %" + keys2[j] + ";");
j++;
}
}
script_gen_dumpprintln(file,"}");
script_gen_dumpprintln(file,"");
i++;
}
}
if(level.bscriptgened)
{
saved = closefile(file);
}
else
{
saved = 1;
}
if(level.bcsvgened)
{
csvfile = openfile(csvfilename,"write");
}
else
{
csvfile = 0;
}
/#
assert(csvfile != -1,"File not writeable( check it and and restart the map ): " + csvfilename);
#/
signatures = getarraykeys(level.script_gen_dump);
i = 0;
for(;;)
for(i = 0;i < signatures.size;i++)
{
script_gen_csvdumpprintln(csvfile,signatures[i]);
i++;
}
if(level.bcsvgened)
{
csvfilesaved = closefile(csvfile);
}
else
{
csvfilesaved = 1;
}
/#
assert(csvfilesaved == 1,"csv not saved( see above message? ): " + csvfilename);
#/
/#
assert(saved == 1,"map not saved( see above message? ): " + filename);
#/
(i < keys1.size ? (IsDefined(keys2) ? j < keys2.size : level.bscriptgened) : level.bcsvgened) ? i < signatures.size : level.bcsvgened
IsDefined(keys1)
IsDefined(level.sg_precacheanims)
i < keys1.size
IsDefined(keys1)
IsDefined(level.sg_precacheanims)
(issubstr(level.script_gen_dump[signatures[i]],"nowrite")) ? i < signatures.size : issubstr(level.script_gen_dump[signatures[i]],"nowrite")
i < signatures.size
(level.script_gen_dump_reasons.size) ? ((level.bscriptgened ? i < level.script_gen_dump_reasons.size : issubstr(level.script_gen_dump_reasons[i],"nowrite")) ? level.script_gen_dump_reasons[i] == "First run" : firstrun) : level.bscriptgened
#/
/#
assert(!level.bscriptgened,"SCRIPTGEN generated: follow instructions listed above this error in the console");
@ -164,9 +227,8 @@ i < signatures.size
{
/#
assertmsg("SCRIPTGEN updated: Rebuild fast file and run map again");
#/
}
#/
flag_set("scriptgen_done");
}
@ -275,9 +337,14 @@ script_gen_csvdumpprintln(file,signature)
}
/#
if(file == -1 || !level.bcsvgened)
{
println(string);
}
else
{
fprintln(file,string);
Stack-Empty ? Stack-Empty : file == -1 || !level.bcsvgened
}
#/
}
@ -285,8 +352,13 @@ Stack-Empty ? Stack-Empty : file == -1 || !level.bcsvgened
script_gen_dumpprintln(file,string)
{
/#
if(file == -1 || !level.bscriptgened)
{
println(string);
}
else
{
fprintln(file,string);
Stack-Empty ? Stack-Empty : file == -1 || !level.bscriptgened
}
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 10
* Decompile Time: 22 ms
* Timestamp: 10/27/2023 3:01:35 AM
* Decompile Time: 2 ms
* Timestamp: 10/28/2023 12:11:02 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 4
* Decompile Time: 6 ms
* Timestamp: 10/27/2023 3:01:35 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:11:02 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 4
* Decompile Time: 15 ms
* Timestamp: 10/27/2023 3:01:35 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:11:03 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 2
* Decompile Time: 2 ms
* Timestamp: 10/27/2023 3:01:36 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:11:03 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 19
* Decompile Time: 73 ms
* Timestamp: 10/27/2023 3:01:36 AM
* Decompile Time: 7 ms
* Timestamp: 10/28/2023 12:11:03 AM
*******************************************************************/
#include common_scripts/utility;
@ -103,8 +103,10 @@ damageeffectarea(owner,position,radius,height,killcament)
shockeffectarea = spawn("trigger_radius",position,0,radius,height);
gaseffectarea = spawn("trigger_radius",position,0,radius,height);
/#
if(GetDvarInt(#"9CB86F60"))
{
level thread drawcylinder(position,radius,height,undefined,"tabun_draw_cylinder_stop");
GetDvarInt(#"9CB86F60")
}
#/
owner thread maps/mp/killstreaks/_dogs::flash_dogs(shockeffectarea);
owner thread maps/mp/killstreaks/_dogs::flash_dogs(gaseffectarea);
@ -156,7 +158,10 @@ GetDvarInt(#"9CB86F60")
shockeffectarea delete();
gaseffectarea delete();
/#
level notify("tabun_draw_cylinder_stop",GetDvarInt(#"9CB86F60"));
if(GetDvarInt(#"9CB86F60"))
{
level notify("tabun_draw_cylinder_stop",players[i]);
}
#/
}
@ -277,10 +282,11 @@ generatelocations(position,owner)
startpos = position + onefoot;
/#
level.tabun_debug = getdvarintdefault("scr_tabun_debug",0);
if(level.tabun_debug)
{
black = VectorScale((1,1,1));
debugstar(startpos,2000,black);
0.2
level.tabun_debug
}
#/
spawnalllocs(owner,startpos);
}
@ -301,9 +307,12 @@ hitpos(start,end,color)
trace = bullettrace(start,end,0,undefined);
/#
level.tabun_debug = getdvarintdefault("scr_tabun_debug",0);
if(level.tabun_debug)
{
debugstar(trace["position"],2000,color);
}
thread debug_line(start,trace["position"],color,80);
level.tabun_debug
#/
return trace["position"];
}
@ -500,9 +509,11 @@ getcentroid(locations)
/#
level.tabun_debug = getdvarintdefault("scr_tabun_debug",0);
if(level.tabun_debug)
{
purple = (0.9,0.2,0.9);
debugstar(centroid,2000,purple);
level.tabun_debug
}
#/
return centroid;
}
@ -545,9 +556,11 @@ getcenter(locations)
center = (avgx,avgy,locations["tracePos"][0][2]);
/#
level.tabun_debug = getdvarintdefault("scr_tabun_debug",0);
if(level.tabun_debug)
{
cyan = (0.2,0.9,0.9);
debugstar(center,2000,cyan);
level.tabun_debug
}
#/
return center;
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 17
* Decompile Time: 49 ms
* Timestamp: 10/27/2023 3:01:36 AM
* Decompile Time: 12 ms
* Timestamp: 10/28/2023 12:11:03 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 9
* Decompile Time: 20 ms
* Timestamp: 10/27/2023 3:01:37 AM
* Decompile Time: 2 ms
* Timestamp: 10/28/2023 12:11:04 AM
*******************************************************************/
#include maps/mp/gametypes/_perplayer;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 2
* Decompile Time: 22 ms
* Timestamp: 10/27/2023 3:01:37 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:11:04 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 12
* Decompile Time: 47 ms
* Timestamp: 10/27/2023 3:01:38 AM
* Decompile Time: 5 ms
* Timestamp: 10/28/2023 12:11:04 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 176
* Decompile Time: 235 ms
* Timestamp: 10/27/2023 3:01:39 AM
* Decompile Time: 39 ms
* Timestamp: 10/28/2023 12:11:05 AM
*******************************************************************/
#include common_scripts/utility;
@ -78,10 +78,12 @@ error(msg)
/#
println("^c*ERROR* ",msg);
wait(0.05);
if(GetDvar(#"F49A52C") != "1")
{
/#
assertmsg("This is a forced error - attach the log file");
}
#/
GetDvar(#"F49A52C") != "1"
#/
}
@ -1195,15 +1197,36 @@ activate_exploder(num)
{
num = int(num);
/#
i = 0;
for(;;)
if(level.createfx_enabled)
{
for(i = 0;i < level.createfxent.size;i++)
{
ent = level.createfxent[i];
client_send = 0;
ent activate_individual_exploder();
i++;
if(!(IsDefined(ent)))
{
}
else if(ent.v["type"] != "exploder")
{
}
else if(!(IsDefined(ent.v["exploder"])))
{
}
else if(ent.v["exploder"] != num)
{
}
else
{
if(IsDefined(ent.v["exploder_server"]))
{
client_send = 0;
}
ent activate_individual_exploder();
}
}
return;
}
Stack-Empty ? Stack-Empty : ((level.createfx_enabled) ? i < level.createfxent.size : (IsDefined(ent) ? ent.v["type"] != "exploder" : ((IsDefined(ent.v["exploder"])) ? ent.v["exploder"] != num : IsDefined(ent.v["exploder_server"]))))
#/
client_send = 1;
if(IsDefined(level.createfxexploders[num]))
@ -1459,22 +1482,31 @@ plot_points(plotpoints,r,g,b,timer)
{
/#
lastpoint = plotpoints[0];
if(!(IsDefined(r)))
{
r = 1;
}
if(!(IsDefined(g)))
{
g = 1;
}
if(!(IsDefined(b)))
{
b = 1;
}
if(!(IsDefined(timer)))
{
timer = 0.05;
i = 1;
for(;;)
}
for(i = 1;i < plotpoints.size;i++)
{
line(lastpoint,plotpoints[i],(r,g,b),1,timer);
lastpoint = plotpoints[i];
i++;
}
i < plotpoints.size
IsDefined(timer)
IsDefined(b)
IsDefined(g)
IsDefined(r)
#/
}
@ -2249,9 +2281,12 @@ set_dvar_int_if_unset(dvar,value,reset)
drawcylinder(pos,rad,height,duration,stop_notify)
{
/#
if(!(IsDefined(duration)))
{
duration = 0;
}
level thread drawcylinder_think(pos,rad,height,duration,stop_notify);
IsDefined(duration)
#/
}
@ -2259,27 +2294,32 @@ IsDefined(duration)
drawcylinder_think(pos,rad,height,seconds,stop_notify)
{
/#
level endon(stop_notify,IsDefined(stop_notify));
if(IsDefined(stop_notify))
{
level endon(stop_notify);
}
stop_time = GetTime() + seconds * 1000;
currad = rad;
curheight = height;
for(;;)
{
if(seconds > 0 && stop_time <= GetTime())
{
return;
r = 0;
for(;;)
}
for(r = 0;r < 20;r++)
{
theta = r / 20 * 360;
theta2 = r + 1 / 20 * 360;
line(pos + (cos(theta) * currad,sin(theta) * currad,0),pos + (cos(theta2) * currad,sin(theta2) * currad,0));
line(pos + (cos(theta) * currad,sin(theta) * currad,curheight),pos + (cos(theta2) * currad,sin(theta2) * currad,curheight));
line(pos + (cos(theta) * currad,sin(theta) * currad,0),pos + (cos(theta) * currad,sin(theta) * currad,curheight));
r++;
}
wait(0.05);
}
r < 20
seconds > 0 && stop_time <= GetTime()
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 86
* Decompile Time: 187 ms
* Timestamp: 10/27/2023 3:01:39 AM
* Decompile Time: 29 ms
* Timestamp: 10/28/2023 12:11:05 AM
*******************************************************************/
#include common_scripts/utility;
@ -406,9 +406,8 @@ init_vehicle()
self.maxhealth = GetDvarInt(#"20E17551");
/#
println("No health specified for vehicle type " + self.vehicletype + "! Using default...");
#/
}
#/
self.health = self.maxhealth;
self vehicle_record_initial_values();
self init_vehicle_threads();
@ -631,14 +630,15 @@ cleanup_debug_print_t()
self endon("death");
self endon("delete");
/#
for(;;)
while(1)
{
if(IsDefined(self.debug_message) && GetDvarInt(#"AAD1512A") != 0)
{
print3d(150 + VectorScale((0,0,1)),self.origin,self.debug_message,(0,1,0),1,1);
}
wait(0.01);
}
1
IsDefined(self.debug_message) && GetDvarInt(#"AAD1512A") != 0
1
#/
}
@ -649,9 +649,9 @@ cleanup_debug_print_clearmsg_t()
self endon("death");
self endon("delete");
/#
for(;;)
while(1)
{
self waittill(1,"enter_vehicle");
self waittill("enter_vehicle");
self.debug_message = undefined;
}
#/

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 5
* Decompile Time: 14 ms
* Timestamp: 10/27/2023 2:59:46 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:23 AM
*******************************************************************/
#include common_scripts/utility;
@ -19,8 +19,11 @@ main()
self endon("killanimscript");
self setaimanimweights(0,0);
/#
if(!(debug_allow_combat()))
{
combatidle();
debug_allow_combat()
return;
}
#/
if(IsDefined(level.hostmigrationtimer))
{

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 5 ms
* Timestamp: 10/27/2023 2:59:46 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:23 AM
*******************************************************************/
#include maps/mp/animscripts/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 2
* Decompile Time: 5 ms
* Timestamp: 10/27/2023 2:59:46 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:23 AM
*******************************************************************/
#include maps/mp/animscripts/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 3
* Decompile Time: 8 ms
* Timestamp: 10/27/2023 2:59:47 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:23 AM
*******************************************************************/
#include maps/mp/animscripts/dog_move;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 5 ms
* Timestamp: 10/27/2023 2:59:47 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:23 AM
*******************************************************************/
#include maps/mp/animscripts/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 6
* Decompile Time: 20 ms
* Timestamp: 10/27/2023 2:59:47 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:24 AM
*******************************************************************/
#include maps/mp/animscripts/dog_stop;
@ -43,8 +43,10 @@ main()
self setaimanimweights(0,0);
do_movement = 1;
/#
if(!(debug_allow_movement()))
{
do_movement = 0;
debug_allow_movement()
}
#/
if(IsDefined(level.hostmigrationtimer))
{
@ -105,8 +107,10 @@ moveloop()
{
do_movement = 1;
/#
if(!(debug_allow_movement()))
{
do_movement = 0;
debug_allow_movement()
}
#/
if(IsDefined(level.hostmigrationtimer))
{
@ -172,9 +176,14 @@ stopmove()
shouldrun()
{
/#
if(GetDvarInt(#"DFB12081") != 0)
{
return 1;
}
else if(GetDvarInt(#"D5D7999B") != 0)
{
return 0;
Stack-Empty ? GetDvarInt(#"DFB12081") != 0 : GetDvarInt(#"D5D7999B") != 0
}
#/
if(IsDefined(self.enemy))
{

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 4 ms
* Timestamp: 10/27/2023 2:59:47 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:24 AM
*******************************************************************/
#include maps/mp/animscripts/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 6
* Decompile Time: 16 ms
* Timestamp: 10/27/2023 2:59:48 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:24 AM
*******************************************************************/
#include maps/mp/animscripts/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 10
* Decompile Time: 22 ms
* Timestamp: 10/27/2023 2:59:48 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:24 AM
*******************************************************************/
#include maps/mp/animscripts/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 12
* Decompile Time: 16 ms
* Timestamp: 10/27/2023 2:59:48 AM
* Decompile Time: 5 ms
* Timestamp: 10/28/2023 12:10:24 AM
*******************************************************************/
#include common_scripts/utility;
@ -39,8 +39,10 @@ growling()
handlenotetrack(note,flagname,customfunction,var1)
{
/#
if(GetDvarInt(#"6EBEB982"))
{
println("dog notetrack: " + flagname + " " + note + " " + GetTime());
GetDvarInt(#"6EBEB982")
}
#/
if(isai(self) && self.type == "dog")
{
@ -60,7 +62,8 @@ GetDvarInt(#"6EBEB982")
default:
return [[ customfunction ]](note);
return [[ customfunction ]](note,var1);
Stack-Empty ? IsDefined(customfunction) : IsDefined(var1)
IsDefined(var1)
IsDefined(customfunction)
break;
}
}

View File

@ -5,7 +5,7 @@
* Platform: PC
* Function Count: 1
* Decompile Time: 0 ms
* Timestamp: 10/27/2023 2:59:43 AM
* Timestamp: 10/28/2023 12:10:20 AM
*******************************************************************/
#include maps/mp/animscripts/traverse/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 1 ms
* Timestamp: 10/27/2023 2:59:44 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:20 AM
*******************************************************************/
#include maps/mp/animscripts/traverse/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 4 ms
* Timestamp: 10/27/2023 2:59:44 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:21 AM
*******************************************************************/
#include maps/mp/animscripts/traverse/shared;

View File

@ -5,7 +5,7 @@
* Platform: PC
* Function Count: 1
* Decompile Time: 2 ms
* Timestamp: 10/27/2023 2:59:44 AM
* Timestamp: 10/28/2023 12:10:21 AM
*******************************************************************/
#include maps/mp/animscripts/traverse/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 1 ms
* Timestamp: 10/27/2023 2:59:44 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:21 AM
*******************************************************************/
#include maps/mp/animscripts/traverse/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 1 ms
* Timestamp: 10/27/2023 2:59:45 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:21 AM
*******************************************************************/
#include maps/mp/animscripts/traverse/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 1 ms
* Timestamp: 10/27/2023 2:59:45 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:21 AM
*******************************************************************/
#include maps/mp/animscripts/traverse/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 1 ms
* Timestamp: 10/27/2023 2:59:45 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:22 AM
*******************************************************************/
#include maps/mp/animscripts/traverse/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 2 ms
* Timestamp: 10/27/2023 2:59:45 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:22 AM
*******************************************************************/
#include maps/mp/animscripts/traverse/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 8
* Decompile Time: 26 ms
* Timestamp: 10/27/2023 2:59:45 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:22 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 1
* Decompile Time: 5 ms
* Timestamp: 10/27/2023 2:59:46 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:22 AM
*******************************************************************/
#include maps/mp/animscripts/shared;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 10
* Decompile Time: 10 ms
* Timestamp: 10/27/2023 2:59:48 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:25 AM
*******************************************************************/
//Function Number: 1
@ -32,9 +32,17 @@ anim_get_dvar(dvar,def)
set_orient_mode(mode,val1)
{
/#
if(level.dog_debug_orient == self getentnum())
{
if(IsDefined(val1))
{
println("DOG: Setting orient mode: " + mode + " " + val1 + " " + GetTime());
}
else
{
println("DOG: Setting orient mode: " + mode + " " + GetTime());
Stack-Empty ? level.dog_debug_orient == self getentnum() : IsDefined(val1)
}
}
#/
if(IsDefined(val1))
{
@ -50,10 +58,15 @@ Stack-Empty ? level.dog_debug_orient == self getentnum() : IsDefined(val1)
debug_anim_print(text)
{
/#
if(level.dog_debug_anims)
{
println(text + " " + GetTime());
}
if(level.dog_debug_anims_ent == self getentnum())
{
println(text + " " + GetTime());
level.dog_debug_anims_ent == self getentnum()
level.dog_debug_anims
}
#/
}
@ -61,6 +74,8 @@ level.dog_debug_anims
debug_turn_print(text,line)
{
/#
if(level.dog_debug_turns == self getentnum())
{
duration = 200;
currentyawcolor = (1,1,1);
lookaheadyawcolor = (1,0,0);
@ -71,7 +86,7 @@ debug_turn_print(text,line)
lookaheadangles = VectorToAngles(lookaheaddir);
lookaheadyaw = AngleClamp180(lookaheadangles[1]);
println(text + " " + GetTime() + " cur: " + currentyaw + " look: " + lookaheadyaw + " desired: " + desiredyaw);
level.dog_debug_turns == self getentnum()
}
#/
}
@ -100,8 +115,12 @@ current_yaw_line_debug(duration)
currentyawcolor[1] = (1,0,1);
current_color_index = 0;
start_time = GetTime();
if(!(IsDefined(level.lastdebugheight)))
{
level.lastdebugheight = 15;
for(;;)
}
while(GetTime() - start_time < 1000)
{
pos1 = (self.origin[0],self.origin[1],self.origin[2] + level.lastdebugheight);
pos2 = current_color_index + 1 * 10 + VectorScale(AnglesToForward(self.angles));
@ -109,10 +128,15 @@ current_yaw_line_debug(duration)
current_color_index = current_color_index + 1 % currentyawcolor.size;
wait(0.05);
}
if(level.lastdebugheight == 15)
{
level.lastdebugheight = 30;
}
else
{
level.lastdebugheight = 15;
(GetTime() - start_time < 1000) ? pos1 : level.lastdebugheight == 15
IsDefined(level.lastdebugheight)
}
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 77
* Decompile Time: 215 ms
* Timestamp: 10/27/2023 2:59:49 AM
* Decompile Time: 39 ms
* Timestamp: 10/28/2023 12:10:25 AM
*******************************************************************/
#include common_scripts/utility;
@ -496,7 +496,14 @@ bot_local_think()
bot_expected_friends = GetDvarInt(#"EB92E914");
bot_expected_enemies = GetDvarInt(#"94FFF5AF");
max_players = islocalgame() ? 10 : 18;
if(islocalgame())
{
}
else
{
}
max_players = 18;
for(;;)
{
for(;;)
@ -649,18 +656,26 @@ bot_spawn()
self endon("disconnect");
/#
weapon = undefined;
if(GetDvarInt(#"98F33417") != 0)
{
player = gethostplayer();
weapon = player getcurrentweapon();
}
if(GetDvar(#"605D81B6") != "")
{
weapon = GetDvar(#"605D81B6");
}
if(IsDefined(weapon))
{
self maps/mp/gametypes/_weapons::detach_all_weapons();
self takeallweapons();
self giveweapon(weapon);
self switchtoweapon(weapon);
self setspawnweapon(weapon);
self maps/mp/teams/_teams::set_player_model(self.team,weapon);
IsDefined(weapon)
GetDvar(#"605D81B6") != ""
GetDvarInt(#"98F33417") != 0
}
#/
self bot_spawn_init();
if(IsDefined(self.bot_first_spawn))
@ -1170,15 +1185,14 @@ bot_get_enemies(on_radar)
enemies = self getenemies(1);
/#
i = 0;
for(;;)
for(i = 0;i < enemies.size;i++)
{
if(enemies[i] isinmovemode("ufo","noclip"))
{
arrayremoveindex(enemies,i);
i--;
i++;
}
enemies[i] isinmovemode("ufo","noclip")
i < enemies.size
}
#/
if(on_radar && !self bot_has_radar())
{
@ -1205,15 +1219,14 @@ bot_get_friends()
{
friends = self getfriendlies(1);
/#
i = 0;
for(;;)
for(i = 0;i < friends.size;i++)
{
if(friends[i] isinmovemode("ufo","noclip"))
{
arrayremoveindex(friends,i);
i--;
i++;
}
friends[i] isinmovemode("ufo","noclip")
i < friends.size
}
#/
return friends;
}
@ -1976,7 +1989,10 @@ bot_update_killstreak()
}
/#
GetDvarInt(#"1D5FB2EC")
if(!(GetDvarInt(#"1D5FB2EC")))
{
return;
}
#/
self.bot.update_killstreak = time + randomintrange(1000,3000);
weapons = self getweaponslist();
@ -2101,7 +2117,11 @@ bot_rccar_think()
else
{
/#
player isinmovemode("ufo","noclip")
if(player isinmovemode("ufo","noclip"))
{
}
else
{
#/
if(bot_get_difficulty() == "easy")
{
@ -2118,6 +2138,7 @@ player isinmovemode("ufo","noclip")
}
}
}
}
//Function Number: 59
bot_rccar_kill()
@ -2385,12 +2406,18 @@ gametype_void()
bot_debug_star(origin,seconds,color)
{
/#
if(!(IsDefined(seconds)))
{
seconds = 1;
}
if(!(IsDefined(color)))
{
color = (1,0,0);
}
frames = int(20 * seconds);
debugstar(origin,frames,color);
IsDefined(color)
IsDefined(seconds)
#/
}
@ -2398,12 +2425,18 @@ IsDefined(seconds)
bot_debug_circle(origin,radius,seconds,color)
{
/#
if(!(IsDefined(seconds)))
{
seconds = 1;
}
if(!(IsDefined(color)))
{
color = (1,0,0);
}
frames = int(20 * seconds);
circle(origin,radius,color,0,1,frames);
IsDefined(color)
IsDefined(seconds)
#/
}
@ -2411,14 +2444,23 @@ IsDefined(seconds)
bot_debug_box(origin,mins,maxs,yaw,seconds,color)
{
/#
if(!(IsDefined(yaw)))
{
yaw = 0;
}
if(!(IsDefined(seconds)))
{
seconds = 1;
}
if(!(IsDefined(color)))
{
color = (1,0,0);
}
frames = int(20 * seconds);
box(origin,mins,maxs,yaw,color,1,0,frames);
IsDefined(color)
IsDefined(seconds)
IsDefined(yaw)
#/
}
@ -2444,20 +2486,25 @@ bot_devgui_think()
self notify("crosshair_follow_off",GetDvarInt(#"487CD523") != 0);
setdvar("bot_AllowMovement","0");
break;
case "laststand":
setdvar("scr_forcelaststand","1");
self setperk("specialty_pistoldeath");
self setperk("specialty_finalstand");
self dodamage(self.health,self.origin);
break;
case "":
default:
reset = 0;
break;
}
if(reset)
{
setdvar("devgui_bot","");
}
reset
}
#/
}
@ -2478,11 +2525,13 @@ bot_system_devgui_think()
team = player.team;
devgui_bot_spawn(team);
break;
case "spawn_enemy":
player = gethostplayer();
team = getenemyteamwithlowestplayercount(player.team);
devgui_bot_spawn(team);
break;
case "loadout":
case "player_weapon":
players = get_players();
@ -2501,21 +2550,28 @@ bot_system_devgui_think()
player maps/mp/teams/_teams::set_player_model(player.team,weapon);
_k2692 = NextArrayKey(_a2692);
}
break;
_k2692
Stack-Empty ? IsDefined(_k2692) : player is_bot()
player is_bot()
IsDefined(_k2692)
break;
case "routes":
devgui_debug_route();
break;
case "":
default:
reset = 0;
break;
}
if(reset)
{
setdvar("devgui_bot","");
}
reset
}
#/
}
@ -2541,8 +2597,10 @@ bot_crosshair_follow()
direction_vec = (direction_vec[0] * scale,direction_vec[1] * scale,direction_vec[2] * scale);
trace = bullettrace(eye,eye + direction_vec,0,undefined);
origin = trace["position"] + (0,0,0);
if(distancesquared(self.origin,origin) > 16384)
{
}
}
distancesquared(self.origin,origin) > 16384
#/
}
@ -2556,14 +2614,20 @@ bot_debug_patrol(node1,node2)
{
self addgoal(node1,24,4,"debug_route");
self waittill("debug_route",result);
self cancelgoal("debug_route");
wait(5);
self addgoal(node2,24,4,"debug_route");
self waittill(result == "failed","debug_route",result);
if(result == "failed")
{
self cancelgoal("debug_route");
wait(5);
}
result == "failed"
self addgoal(node2,24,4,"debug_route");
self waittill("debug_route",result);
if(result == "failed")
{
self cancelgoal("debug_route");
wait(5);
}
}
#/
}
@ -2573,21 +2637,25 @@ devgui_debug_route()
/#
iprintln("Choose nodes with \'A\' or press \'B\' to cancel");
nodes = maps/mp/gametypes/_dev::dev_get_node_pair();
if(!(IsDefined(nodes)))
{
iprintln("Route Debug Cancelled");
return;
}
iprintln("Sending bots to chosen nodes");
players = get_players();
_a2804 = players;
_k2804 = FirstArrayKey(_a2804);
for(;;)
foreach(player in players)
{
if(!(player is_bot()))
{
player = _a2804[_k2804];
player notify("debug_patrol",player is_bot(),IsDefined(_k2804),IsDefined(nodes));
player thread bot_debug_patrol(nodes[0],nodes[1]);
_k2804 = NextArrayKey(_a2804);
}
_k2804
Stack-Empty ? Stack-Empty : Stack-Empty
else
{
player notify("debug_patrol");
player thread bot_debug_patrol(nodes[0],nodes[1]);
}
}
#/
}
@ -2605,13 +2673,16 @@ devgui_bot_spawn(team)
direction_vec = player.origin - trace["position"];
direction = VectorToAngles(direction_vec);
bot = addtestclient();
if(!(IsDefined(bot)))
{
println("Could not add test client");
return;
}
bot.pers["isBot"] = 1;
bot thread bot_spawn_think(team);
yaw = direction[1];
bot thread devgui_bot_spawn_think(trace["position"],yaw);
IsDefined(bot)
#/
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 65
* Decompile Time: 159 ms
* Timestamp: 10/27/2023 2:59:50 AM
* Decompile Time: 16 ms
* Timestamp: 10/28/2023 12:10:25 AM
*******************************************************************/
#include common_scripts/utility;
@ -35,10 +35,16 @@ bot_combat_think(damage,attacker,direction)
difficulty = maps/mp/bots/_bot::bot_get_difficulty();
/#
if(bot_has_enemy())
{
if(GetDvarInt(#"D3EB879"))
{
if(isplayer(self.bot.threat.entity) && !self.bot.threat.entity is_bot())
{
self bot_combat_idle();
isplayer(self.bot.threat.entity) && !self.bot.threat.entity is_bot()
GetDvarInt(#"D3EB879")
bot_has_enemy()
}
}
}
#/
sight = bot_best_enemy();
bot_select_weapon();

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 3
* Decompile Time: 7 ms
* Timestamp: 10/27/2023 2:59:50 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:25 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 12
* Decompile Time: 50 ms
* Timestamp: 10/27/2023 2:59:50 AM
* Decompile Time: 13 ms
* Timestamp: 10/28/2023 12:10:26 AM
*******************************************************************/
#include common_scripts/utility;
@ -32,9 +32,30 @@ bot_ctf_think()
{
nodes = getnodesinradius(flag_mine.curorigin,256,0,64,"any",8);
node = random(nodes);
self maps/mp/bots/_bot_combat::bot_combat_throw_proximity(cointoss() ? flag_mine.curorigin : node.origin);
self maps/mp/bots/_bot_combat::bot_combat_toss_frag(cointoss() ? flag_mine.curorigin : node.origin);
self maps/mp/bots/_bot_combat::bot_combat_toss_flash(cointoss() ? flag_mine.curorigin : node.origin);
if(cointoss())
{
}
else
{
}
self maps/mp/bots/_bot_combat::bot_combat_throw_proximity(node.origin);
if(cointoss())
{
}
else
{
}
self maps/mp/bots/_bot_combat::bot_combat_toss_frag(node.origin);
if(cointoss())
{
}
else
{
}
self maps/mp/bots/_bot_combat::bot_combat_toss_flash(node.origin);
}
}

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 11
* Decompile Time: 40 ms
* Timestamp: 10/27/2023 2:59:51 AM
* Decompile Time: 2 ms
* Timestamp: 10/28/2023 12:10:26 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 19
* Decompile Time: 57 ms
* Timestamp: 10/27/2023 2:59:51 AM
* Decompile Time: 7 ms
* Timestamp: 10/28/2023 12:10:26 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 5
* Decompile Time: 14 ms
* Timestamp: 10/27/2023 2:59:51 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:26 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 14
* Decompile Time: 33 ms
* Timestamp: 10/27/2023 2:59:52 AM
* Decompile Time: 2 ms
* Timestamp: 10/28/2023 12:10:27 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 11
* Decompile Time: 33 ms
* Timestamp: 10/27/2023 2:59:52 AM
* Decompile Time: 6 ms
* Timestamp: 10/28/2023 12:10:27 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 15
* Decompile Time: 43 ms
* Timestamp: 10/27/2023 2:59:52 AM
* Decompile Time: 5 ms
* Timestamp: 10/28/2023 12:10:27 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 11
* Decompile Time: 47 ms
* Timestamp: 10/27/2023 2:59:53 AM
* Decompile Time: 6 ms
* Timestamp: 10/28/2023 12:10:27 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 50
* Decompile Time: 95 ms
* Timestamp: 10/27/2023 2:59:53 AM
* Decompile Time: 15 ms
* Timestamp: 10/28/2023 12:10:28 AM
*******************************************************************/
#include common_scripts/utility;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 23
* Decompile Time: 15 ms
* Timestamp: 10/27/2023 2:59:53 AM
* Decompile Time: 3 ms
* Timestamp: 10/28/2023 12:10:28 AM
*******************************************************************/
#include maps/mp/_audio;

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 45
* Decompile Time: 114 ms
* Timestamp: 10/27/2023 2:59:54 AM
* Decompile Time: 15 ms
* Timestamp: 10/28/2023 12:10:28 AM
*******************************************************************/
#include common_scripts/utility;
@ -271,8 +271,8 @@ weapon_class_register(weapon,weapon_type)
{
/#
assert(0,"Weapon group info is missing from statsTable for: " + weapon_type);
#/
}
#/
}
//Function Number: 10
@ -1097,16 +1097,20 @@ cac_modified_vehicle_damage(victim,attacker,damage,meansofdeath,weapon,inflictor
{
final_damage = damage * 100 + level.cac_bulletdamage_data / 100;
/#
if(GetDvarInt(#"5ABA6445"))
{
println("Perk/> " + attacker.name + "\'s bullet damage did extra damage to vehicle");
GetDvarInt(#"5ABA6445")
}
#/
}
else if(attacker hasperk("specialty_explosivedamage") && isplayerexplosiveweapon(weapon,meansofdeath))
{
final_damage = damage * 100 + level.cac_explosivedamage_data / 100;
/#
if(GetDvarInt(#"5ABA6445"))
{
println("Perk/> " + attacker.name + "\'s explosive damage did extra damage to vehicle");
GetDvarInt(#"5ABA6445")
}
#/
}
else
@ -1115,8 +1119,10 @@ GetDvarInt(#"5ABA6445")
}
/#
if(GetDvarInt(#"5ABA6445"))
{
println("Perk/> Damage Factor: " + final_damage / old_damage + " - Pre Damage: " + old_damage + " - Post Damage: " + final_damage);
GetDvarInt(#"5ABA6445")
}
#/
return int(final_damage);
}
@ -1150,8 +1156,10 @@ cac_modified_damage(victim,attacker,damage,mod,weapon,inflictor,hitloc)
/#
debug = 0;
if(GetDvarInt(#"5ABA6445"))
{
debug = 1;
GetDvarInt(#"5ABA6445")
}
#/
final_damage = damage;
if(attacker hasperk("specialty_bulletdamage") && isprimarydamage(mod))
@ -1159,47 +1167,63 @@ GetDvarInt(#"5ABA6445")
if(victim hasperk("specialty_armorvest") && !isheaddamage(hitloc))
{
/#
if(debug)
{
println("Perk/> " + victim.name + "\'s armor countered " + attacker.name + "\'s increased bullet damage");
debug
}
#/
}
else
{
final_damage = damage * 100 + level.cac_bulletdamage_data / 100;
/#
if(debug)
{
println("Perk/> " + attacker.name + "\'s bullet damage did extra damage to " + victim.name);
debug
}
}
#/
}
}
if(victim hasperk("specialty_armorvest") && isprimarydamage(mod) && !isheaddamage(hitloc))
else if(victim hasperk("specialty_armorvest") && isprimarydamage(mod) && !isheaddamage(hitloc))
{
final_damage = damage * level.cac_armorvest_data * 0.01;
/#
if(debug)
{
println("Perk/> " + attacker.name + "\'s bullet damage did less damage to " + victim.name);
debug
}
#/
}
else if(victim hasperk("specialty_fireproof") && isfiredamage(weapon,mod))
{
final_damage = damage * 100 - level.cac_fireproof_data / 100;
/#
if(debug)
{
println("Perk/> " + attacker.name + "\'s flames did less damage to " + victim.name);
debug
}
#/
}
else if(attacker hasperk("specialty_explosivedamage") && isplayerexplosiveweapon(weapon,mod))
{
final_damage = damage * 100 + level.cac_explosivedamage_data / 100;
/#
if(debug)
{
println("Perk/> " + attacker.name + "\'s explosive damage did extra damage to " + victim.name);
debug
}
#/
}
else if(victim hasperk("specialty_flakjacket") && isexplosivedamage(weapon,mod) && !victim grenadestuck(inflictor))
{
cac_data = level.hardcoremode ? level.cac_flakjacket_hardcore_data : level.cac_flakjacket_data;
if(level.hardcoremode)
{
}
else
{
}
cac_data = level.cac_flakjacket_data;
if(level.teambased && attacker.team != victim.team)
{
victim thread maps/mp/_challenges::flakjacketprotected(weapon,attacker);
@ -1211,8 +1235,11 @@ debug
final_damage = int(damage * cac_data / 100);
/#
if(debug)
{
println("Perk/> " + victim.name + "\'s flak jacket decreased " + attacker.name + "\'s grenade damage");
debug
}
}
#/
/#
victim.cac_debug_damage_type = tolower(mod);
@ -1221,11 +1248,11 @@ debug
victim.cac_debug_location = tolower(hitloc);
victim.cac_debug_weapon = tolower(weapon);
victim.cac_debug_range = int(distance(attacker.origin,victim.origin));
if(debug)
{
println("Perk/> Damage Factor: " + final_damage / damage + " - Pre Damage: " + damage + " - Post Damage: " + final_damage);
debug
#/
}
#/
final_damage = int(final_damage);
if(final_damage < 1)
{

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 2
* Decompile Time: 1 ms
* Timestamp: 10/27/2023 2:59:54 AM
* Decompile Time: 0 ms
* Timestamp: 10/28/2023 12:10:28 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 24
* Decompile Time: 60 ms
* Timestamp: 10/27/2023 2:59:54 AM
* Decompile Time: 18 ms
* Timestamp: 10/28/2023 12:10:28 AM
*******************************************************************/
//Function Number: 1

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2
* Platform: PC
* Function Count: 6
* Decompile Time: 58 ms
* Timestamp: 10/27/2023 2:59:55 AM
* Decompile Time: 1 ms
* Timestamp: 10/28/2023 12:10:29 AM
*******************************************************************/
//Function Number: 1

Some files were not shown because too many files have changed in this diff Show More