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 * Game: Call of Duty: Black Ops 2
* Platform: PC * Platform: PC
* Function Count: 2 * Function Count: 2
* Decompile Time: 2 ms * Decompile Time: 133 ms
* Timestamp: 10/27/2023 2:59:42 AM * Timestamp: 10/28/2023 12:10:19 AM
*******************************************************************/ *******************************************************************/
//Function Number: 1 //Function Number: 1

View File

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

View File

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

View File

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

View File

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

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2 * Game: Call of Duty: Black Ops 2
* Platform: PC * Platform: PC
* Function Count: 124 * Function Count: 124
* Decompile Time: 113 ms * Decompile Time: 21 ms
* Timestamp: 10/27/2023 2:59:43 AM * Timestamp: 10/28/2023 12:10:20 AM
*******************************************************************/ *******************************************************************/
//Function Number: 1 //Function Number: 1
@ -385,14 +385,11 @@ vector_compare(vec1,vec2)
draw_debug_line(start,end,timer) draw_debug_line(start,end,timer)
{ {
/# /#
i = 0; for(i = 0;i < timer * 20;i++)
for(;;)
{ {
line(start,end,(1,1,0.5)); line(start,end,(1,1,0.5));
wait(0.05); 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); println("flag_delete() called on flag that does not exist: " + flagname);
#/
} }
#/
} }
//Function Number: 51 //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); assert(!IsDefined(level.flag[flagname]),"Attempt to reinitialize existing flag: " + flagname);
#/
} }
#/
if(IsDefined(val) && val) if(IsDefined(val) && val)
{ {
level.flag[flagname] = 1; level.flag[flagname] = 1;
@ -1473,9 +1469,9 @@ trigger_use(str_name,str_key,ent,b_assert)
{ {
/# /#
assertmsg("trigger not found: " + str_name + " key: " + str_key); assertmsg("trigger not found: " + str_name + " key: " + str_key);
#/
return;
} }
#/
return;
} }
} }
else else
@ -1567,13 +1563,27 @@ init_trigger_flags()
//Function Number: 83 //Function Number: 83
is_look_trigger(trig) 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 //Function Number: 84
is_trigger_once(trig) 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 //Function Number: 85
@ -1742,11 +1752,14 @@ fileprint_chk(file,str)
{ {
/# /#
level.fileprintlinecount++; level.fileprintlinecount++;
wait(0.05); if(level.fileprintlinecount > 400)
level.fileprintlinecount++; {
level.fileprintlinecount = 0; wait(0.05);
level.fileprintlinecount++;
level.fileprintlinecount = 0;
}
fprintln(file,str); 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,"iwmap 4");
fileprint_chk(level.fileprint,"\"000_Global\" flags active"); fileprint_chk(level.fileprint,"\"000_Global\" flags active");
fileprint_chk(level.fileprint,"\"The Map\" flags"); fileprint_chk(level.fileprint,"\"The Map\" flags");
return; if(!(binclude_blank_worldspawn))
{
return;
}
fileprint_map_entity_start(); fileprint_map_entity_start();
fileprint_map_keypairprint("classname","worldspawn"); fileprint_map_keypairprint("classname","worldspawn");
fileprint_map_entity_end(); fileprint_map_entity_end();
binclude_blank_worldspawn
#/ #/
} }
@ -1824,29 +1840,32 @@ fileprint_end()
assert(!IsDefined(level.fileprint_entitystart)); assert(!IsDefined(level.fileprint_entitystart));
#/ #/
saved = closefile(level.fileprint); saved = closefile(level.fileprint);
println("-----------------------------------"); if(saved != 1)
println(" "); {
println("file write failure"); println("-----------------------------------");
println("file with name: " + level.fileprint_filename); println(" ");
println("make sure you checkout the file you are trying to save"); println("file write failure");
println("note: USE P4 Search to find the file and check that one out"); println("file with name: " + level.fileprint_filename);
println(" Do not checkin files in from the xenonoutput folder, "); println("make sure you checkout the file you are trying to save");
println(" this is junctioned to the proper directory where you need to go"); println("note: USE P4 Search to find the file and check that one out");
println("junctions looks like this"); println(" Do not checkin files in from the xenonoutput folder, ");
println(" "); println(" this is junctioned to the proper directory where you need to go");
println("..\\xenonOutput\\scriptdata\\createfx ..\\share\\raw\\maps\\createfx"); println("junctions looks like this");
println("..\\xenonOutput\\scriptdata\\createart ..\\share\\raw\\maps\\createart"); println(" ");
println("..\\xenonOutput\\scriptdata\\vision ..\\share\\raw\\vision"); println("..\\xenonOutput\\scriptdata\\createfx ..\\share\\raw\\maps\\createfx");
println("..\\xenonOutput\\scriptdata\\scriptgen ..\\share\\raw\\maps\\scriptgen"); println("..\\xenonOutput\\scriptdata\\createart ..\\share\\raw\\maps\\createart");
println("..\\xenonOutput\\scriptdata\\zone_source ..\\xenon\\zone_source"); println("..\\xenonOutput\\scriptdata\\vision ..\\share\\raw\\vision");
println("..\\xenonOutput\\accuracy ..\\share\\raw\\accuracy"); println("..\\xenonOutput\\scriptdata\\scriptgen ..\\share\\raw\\maps\\scriptgen");
println("..\\xenonOutput\\scriptdata\\map_source ..\\map_source\\xenon_export"); println("..\\xenonOutput\\scriptdata\\zone_source ..\\xenon\\zone_source");
println(" "); println("..\\xenonOutput\\accuracy ..\\share\\raw\\accuracy");
println("-----------------------------------"); println("..\\xenonOutput\\scriptdata\\map_source ..\\map_source\\xenon_export");
println("File not saved( see console.log for info ) "); println(" ");
println("-----------------------------------");
println("File not saved( see console.log for info ) ");
}
level.fileprint = undefined; level.fileprint = undefined;
level.fileprint_filename = undefined; level.fileprint_filename = undefined;
saved != 1
#/ #/
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2 * Game: Call of Duty: Black Ops 2
* Platform: PC * Platform: PC
* Function Count: 23 * Function Count: 23
* Decompile Time: 232 ms * Decompile Time: 7 ms
* Timestamp: 10/27/2023 3:01:25 AM * Timestamp: 10/28/2023 12:10:57 AM
*******************************************************************/ *******************************************************************/
#include common_scripts/utility; #include common_scripts/utility;
@ -380,55 +380,62 @@ getbesthackertooltarget()
else else
{ {
/# /#
targetsvalid[targetsvalid.size] = targetsall[idx]; if(GetDvar(#"4C560F97") == "1")
self iswithinhackertoolreticle(targetsall[idx])
GetDvar(#"4C560F97") == "1"
#/
if(level.teambased)
{ {
if(isentityhackablecarepackage(target_ent)) if(self iswithinhackertoolreticle(targetsall[idx]))
{ {
if(self iswithinhackertoolreticle(target_ent)) targetsvalid[targetsvalid.size] = targetsall[idx];
}
}
else
{
#/
if(level.teambased)
{
if(isentityhackablecarepackage(target_ent))
{
if(self iswithinhackertoolreticle(target_ent))
{
targetsvalid[targetsvalid.size] = target_ent;
}
continue;
}
if(IsDefined(target_ent.team))
{
if(target_ent.team != self.team)
{
if(self iswithinhackertoolreticle(target_ent))
{
targetsvalid[targetsvalid.size] = target_ent;
}
}
continue;
}
if(IsDefined(target_ent.owner.team))
{
if(target_ent.owner.team != self.team)
{
if(self iswithinhackertoolreticle(target_ent))
{
targetsvalid[targetsvalid.size] = target_ent;
}
}
}
}
else if(self iswithinhackertoolreticle(target_ent))
{
if(isentityhackablecarepackage(target_ent))
{ {
targetsvalid[targetsvalid.size] = target_ent; targetsvalid[targetsvalid.size] = target_ent;
} }
else if(IsDefined(target_ent.owner) && self != target_ent.owner)
continue;
}
if(IsDefined(target_ent.team))
{
if(target_ent.team != self.team)
{ {
if(self iswithinhackertoolreticle(target_ent)) targetsvalid[targetsvalid.size] = target_ent;
{
targetsvalid[targetsvalid.size] = target_ent;
}
} }
continue;
}
if(IsDefined(target_ent.owner.team))
{
if(target_ent.owner.team != self.team)
{
if(self iswithinhackertoolreticle(target_ent))
{
targetsvalid[targetsvalid.size] = target_ent;
}
}
}
}
else if(self iswithinhackertoolreticle(target_ent))
{
if(isentityhackablecarepackage(target_ent))
{
targetsvalid[targetsvalid.size] = target_ent;
}
else if(IsDefined(target_ent.owner) && self != target_ent.owner)
{
targetsvalid[targetsvalid.size] = target_ent;
} }
} }
} }
@ -817,7 +824,7 @@ gethacktime(target)
tunables() tunables()
{ {
/# /#
for(;;) while(1)
{ {
level.hackertoollostsightlimitms = weapons_get_dvar_int("scr_hackerToolLostSightLimitMs",1000); level.hackertoollostsightlimitms = weapons_get_dvar_int("scr_hackerToolLostSightLimitMs",1000);
level.hackertoollockonradius = weapons_get_dvar("scr_hackerToolLockOnRadius",20); 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); level.chopper_gunner_time = weapons_get_dvar_int("scr_chopper_gunner_time",7);
wait(1); wait(1);
} }
1
#/ #/
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,8 +4,8 @@
* Game: Call of Duty: Black Ops 2 * Game: Call of Duty: Black Ops 2
* Platform: PC * Platform: PC
* Function Count: 4 * Function Count: 4
* Decompile Time: 68 ms * Decompile Time: 5 ms
* Timestamp: 10/27/2023 3:01:34 AM * Timestamp: 10/28/2023 12:11:02 AM
*******************************************************************/ *******************************************************************/
#include common_scripts/utility; #include common_scripts/utility;
@ -31,45 +31,76 @@ script_gen_dump()
{ {
/# /#
script_gen_dump_checksaved(); script_gen_dump_checksaved();
flag_set("scriptgen_done"); if(!(level.script_gen_dump_reasons.size))
return;
firstrun = 0;
println(" ");
println(" ");
println(" ");
println("^2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
println("^3Dumping scriptgen dump for these reasons");
println("^2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
i = 0;
for(;;)
{ {
substr = getsubstr(level.script_gen_dump_reasons[i],15); flag_set("scriptgen_done");
println(i + ". ) " + substr); return;
println(i + ". ) " + level.script_gen_dump_reasons[i]);
firstrun = 1;
i++;
} }
println("^2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
println(" "); firstrun = 0;
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 ) "); if(level.bscriptgened)
println(" "); {
println("replace:"); println(" ");
println("maps\\_load::main( 1 );"); println(" ");
println(" "); println(" ");
println("with( don\'t forget to add this file to P4 ):"); println("^2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
println("maps\\scriptgen\\" + level.script + "_scriptgen::main();"); println("^3Dumping scriptgen dump for these reasons");
println(" "); println("^2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ");
println("^2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "); for(i = 0;i < level.script_gen_dump_reasons.size;i++)
println(" "); {
println("^2 / \\ / \\ / \\"); if(issubstr(level.script_gen_dump_reasons[i],"nowrite"))
println("^2scroll up"); {
println("^2 / \\ / \\ / \\"); substr = getsubstr(level.script_gen_dump_reasons[i],15);
println(" "); println(i + ". ) " + substr);
return; }
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:");
println("maps\\_load::main( 1 );");
println(" ");
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"; filename = "scriptgen/" + level.script + "_scriptgen.gsc";
csvfilename = "zone_source/" + level.script + ".csv"; csvfilename = "zone_source/" + level.script + ".csv";
file = openfile(filename,"write"); if(level.bscriptgened)
file = 0; {
file = openfile(filename,"write");
}
else
{
file = 0;
}
/# /#
assert(file != -1,"File not writeable( check it and and restart the map ): " + filename); 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,"\tlevel.script_gen_dump = [];");
script_gen_dumpprintln(file,""); script_gen_dumpprintln(file,"");
signatures = getarraykeys(level.script_gen_dump); signatures = getarraykeys(level.script_gen_dump);
i = 0; for(i = 0;i < signatures.size;i++)
for(;;)
{ {
script_gen_dumpprintln(file,"\t" + level.script_gen_dump[signatures[i]]); if(!(issubstr(level.script_gen_dump[signatures[i]],"nowrite")))
i++; {
script_gen_dumpprintln(file,"\t" + level.script_gen_dump[signatures[i]]);
}
} }
i = 0;
for(;;) for(i = 0;i < signatures.size;i++)
{ {
script_gen_dumpprintln(file,"\tlevel.script_gen_dump[ " + "\" + signatures[i] + "\" + " ] = " + "\" + signatures[i] + "\" + ";"); if(!(issubstr(level.script_gen_dump[signatures[i]],"nowrite")))
script_gen_dumpprintln(file,"\tlevel.script_gen_dump[ " + "\" + signatures[i] + "\" + " ] = " + "\"nowrite\" + ";"); {
i++; script_gen_dumpprintln(file,"\tlevel.script_gen_dump[ " + "\" + signatures[i] + "\" + " ] = " + "\" + signatures[i] + "\" + ";");
}
else
{
script_gen_dumpprintln(file,"\tlevel.script_gen_dump[ " + "\" + signatures[i] + "\" + " ] = " + "\"nowrite\" + ";");
}
} }
script_gen_dumpprintln(file,""); script_gen_dumpprintln(file,"");
keys1 = undefined; keys1 = undefined;
keys2 = undefined; keys2 = undefined;
keys1 = getarraykeys(level.sg_precacheanims); if(IsDefined(level.sg_precacheanims))
i = 0;
for(;;)
{ {
script_gen_dumpprintln(file,"\tanim_precach_" + keys1[i] + "();"); keys1 = getarraykeys(level.sg_precacheanims);
i++;
} }
if(IsDefined(keys1))
{
for(i = 0;i < keys1.size;i++)
{
script_gen_dumpprintln(file,"\tanim_precach_" + keys1[i] + "();");
}
}
script_gen_dumpprintln(file,"\tmaps\\_load::main( 1, " + level.bcsvgened + ", 1 );"); script_gen_dumpprintln(file,"\tmaps\\_load::main( 1, " + level.bcsvgened + ", 1 );");
script_gen_dumpprintln(file,"}"); script_gen_dumpprintln(file,"}");
script_gen_dumpprintln(file,""); script_gen_dumpprintln(file,"");
keys1 = getarraykeys(level.sg_precacheanims); if(IsDefined(level.sg_precacheanims))
i = 0;
for(;;)
{ {
script_gen_dumpprintln(file,"#using_animtree( \" + keys1[i] + "\" );"); keys1 = getarraykeys(level.sg_precacheanims);
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(;;)
{
script_gen_dumpprintln(file,"\tlevel.sg_anim[ \" + keys2[j] + "\" ] = %" + keys2[j] + ";");
j++;
}
script_gen_dumpprintln(file,"}");
script_gen_dumpprintln(file,"");
i++;
} }
saved = closefile(file);
saved = 1; if(IsDefined(keys1))
csvfile = openfile(csvfilename,"write"); {
csvfile = 0; 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]]);
if(IsDefined(keys2))
{
for(j = 0;j < keys2.size;j++)
{
script_gen_dumpprintln(file,"\tlevel.sg_anim[ \" + keys2[j] + "\" ] = %" + keys2[j] + ";");
}
}
script_gen_dumpprintln(file,"}");
script_gen_dumpprintln(file,"");
}
}
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); assert(csvfile != -1,"File not writeable( check it and and restart the map ): " + csvfilename);
#/ #/
signatures = getarraykeys(level.script_gen_dump); signatures = getarraykeys(level.script_gen_dump);
i = 0; for(i = 0;i < signatures.size;i++)
for(;;)
{ {
script_gen_csvdumpprintln(csvfile,signatures[i]); script_gen_csvdumpprintln(csvfile,signatures[i]);
i++;
} }
csvfilesaved = closefile(csvfile);
csvfilesaved = 1; if(level.bcsvgened)
{
csvfilesaved = closefile(csvfile);
}
else
{
csvfilesaved = 1;
}
/# /#
assert(csvfilesaved == 1,"csv not saved( see above message? ): " + csvfilename); assert(csvfilesaved == 1,"csv not saved( see above message? ): " + csvfilename);
#/ #/
/# /#
assert(saved == 1,"map not saved( see above message? ): " + filename); 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"); 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"); assertmsg("SCRIPTGEN updated: Rebuild fast file and run map again");
#/
} }
#/
flag_set("scriptgen_done"); flag_set("scriptgen_done");
} }
@ -244,7 +306,7 @@ script_gen_csvdumpprintln(file,signature)
{ {
prefix = "string"; prefix = "string";
/# /#
assertmsg("string not yet supported by scriptgen"); assertmsg("string not yet supported by scriptgen");
#/ #/
} }
else if(issubstr(signature,"turret")) else if(issubstr(signature,"turret"))
@ -275,9 +337,14 @@ script_gen_csvdumpprintln(file,signature)
} }
/# /#
println(string); if(file == -1 || !level.bcsvgened)
fprintln(file,string); {
Stack-Empty ? Stack-Empty : file == -1 || !level.bcsvgened println(string);
}
else
{
fprintln(file,string);
}
#/ #/
} }
@ -285,8 +352,13 @@ Stack-Empty ? Stack-Empty : file == -1 || !level.bcsvgened
script_gen_dumpprintln(file,string) script_gen_dumpprintln(file,string)
{ {
/# /#
println(string); if(file == -1 || !level.bscriptgened)
fprintln(file,string); {
Stack-Empty ? Stack-Empty : file == -1 || !level.bscriptgened println(string);
}
else
{
fprintln(file,string);
}
#/ #/
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,7 @@
* Platform: PC * Platform: PC
* Function Count: 1 * Function Count: 1
* Decompile Time: 0 ms * 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; #include maps/mp/animscripts/traverse/shared;

View File

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

View File

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

View File

@ -5,7 +5,7 @@
* Platform: PC * Platform: PC
* Function Count: 1 * Function Count: 1
* Decompile Time: 2 ms * 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; #include maps/mp/animscripts/traverse/shared;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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