X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=data%2Fqcsrc%2Fclient%2FMain.qc;h=84e69a5b35725edc601eeebc405c229620a27633;hb=b2df32d96df3e954d54f6e4b9bbb6c98d77ef507;hp=154ac15215b0ea5aaf89b99e736e10f601c006c3;hpb=bb1fa63d1bdd3908e4309ef4303338a25b5372be;p=voretournament%2Fvoretournament.git diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index 154ac152..84e69a5b 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -33,9 +33,8 @@ void() menu_show_error = // CSQC_Init : Called every time the CSQC code is initialized (essentially at map load) // Useful for precaching things -void() menu_sub_null = -{ -}; +float(float, float, float) menu_sub_null_float = { }; +void () menu_sub_null_void = { }; #ifdef USE_FTE float __engine_check; @@ -71,7 +70,7 @@ void CSQC_Init(void) drawfont = FONT_USER+1; menu_visible = FALSE; menu_show = menu_show_error; - menu_action = menu_sub_null; + menu_action = menu_sub_null_float; for(i = 0; i < 255; ++i) if(getplayerkey(i, "viewentity") == "") @@ -177,11 +176,17 @@ void CSQC_Init(void) get_mi_min_max_texcoords(0); // load new texcoords } + precache_pic(strcat("gfx/hud/", cvar_string("hud_style"), "/bg_radar.tga")); + precache_pic(strcat("gfx/hud/", cvar_string("hud_style"), "/fg_radar.tga")); + precache_pic(strcat("gfx/hud/", cvar_string("hud_style"), "/fg_radar_team.tga")); + mi_center = (mi_min + mi_max) * 0.5; mi_scale = mi_max - mi_min; minimapname = strzone(minimapname); WarpZone_Init(); + + draw_currentSkin = strzone(strcat("gfx/menu/", cvar_string("menu_skin"))); } // CSQC_Shutdown : Called every time the CSQC code is shutdown (changing maps, quitting, etc) @@ -547,7 +552,7 @@ void GameCommand(string msg) cvar_clientsettemp(argv(1), argv(2)); } else if(cmd == "radar") { - ons_showmap = !ons_showmap; + showmap = !showmap; } else if(cmd == "sbar_columns_set") { Cmd_Sbar_SetFields(argc); @@ -686,6 +691,8 @@ void Ent_ReadEntCS() self.healthvalue = ReadShort(); if(sf & 16) self.armorvalue = ReadShort(); + if(sf & 32) + self.eaten = ReadByte(); entcs_receiver[self.sv_entnum] = self; self.entremove = Ent_RemoveEntCS; @@ -714,7 +721,7 @@ void Ent_ReadPlayerScore() float isNew; entity o; - // damnit -.- don't want to go change every single .sv_entnum in sbar.qc AGAIN + // damnit -.- don't want to go change every single .sv_entnum in hud.qc AGAIN // (no I've never heard of M-x replace-string, sed, or anything like that) isNew = !self.owner; // workaround for DP bug n = ReadByte()-1; @@ -946,6 +953,7 @@ void(float bIsNewEntity) CSQC_Ent_Update = case ENT_CLIENT_WARPZONE: WarpZone_Read(bIsNewEntity); break; case ENT_CLIENT_WARPZONE_CAMERA: WarpZone_Camera_Read(bIsNewEntity); break; case ENT_CLIENT_TRIGGER_MUSIC: Ent_ReadTriggerMusic(); break; + case ENT_CLIENT_PORTRAIT: Ent_ReadPortrait(); break; default: error(strcat("unknown entity type in CSQC_Ent_Update: ", ftos(self.enttype), "\n")); break; @@ -963,8 +971,8 @@ void Ent_Remove() self.enttype = 0; self.classname = ""; - self.draw = menu_sub_null; - self.entremove = menu_sub_null; + self.draw = menu_sub_null_void; + self.entremove = menu_sub_null_void; // TODO possibly set more stuff to defaults } // CSQC_Ent_Remove : Called when the server requests a SSQC / CSQC entity to be removed. Essentially call remove(self) as well. @@ -1061,8 +1069,9 @@ void Ent_Init() armor_max = ReadCoord(); teamheal_max = ReadCoord(); - g_power = ReadCoord(); - g_power_reboot = ReadCoord(); + g_power = ReadShort(); + g_power_reboot = ReadShort(); + g_power_reboot_spawn = ReadByte(); if(!postinit) PostInit();