X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2FMain.qc;h=9ed7d92e3630a5c6e115c3c044ba98390f7b8fd7;hb=fe8c7510919a64ff76afde8eb94bbb29bf293c3b;hp=14a213ef2756f8a70dc91749f9fb19d1ce114fae;hpb=cdab827c3bb824ae263c1add2b551d76f524ef77;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 14a213ef2..9ed7d92e3 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -148,23 +148,6 @@ void CSQC_Init(void) } Tuba_Precache(); -#ifdef UID - { - // find the user ID - string uid; - registercvar("_cl_userid", "", CVAR_SAVE); - uid = cvar_string("_cl_userid"); - if(strlen(uid) < 16) - { - uid = ""; - for(i = 0; i < 4; ++i) - uid = strcat(uid, substring(ftos(floor(10000 + random() * 10000)), 1, -1)); - } - cvar_set("_cl_userid", uid); - localcmd(strcat("\ncmd uid ", uid, "\n")); - } -#endif - get_mi_min_max_texcoords(1); // try the CLEVER way first minimapname = strcat("gfx/", mi_shortname, "_radar.tga"); shortmapname = mi_shortname; @@ -457,7 +440,9 @@ void ShotOrg_Draw() self.angles = view_angles; self.angles_x = -self.angles_x; if not(self.cnt) - R_AddEntity(self); + self.drawmask = MASK_NORMAL; + else + self.drawmask = 0; } void ShotOrg_Draw2D() { @@ -504,11 +489,12 @@ void DrawDebugModel() if(time - floor(time) > 0.5) { PolyDrawModel(self); + self.drawmask = 0; } else { self.renderflags = 0; - R_AddEntity(self); + self.drawmask = MASK_NORMAL; } } @@ -924,6 +910,9 @@ 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_HOOK: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_HOOK); break; + case ENT_CLIENT_LGBEAM: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_LGBEAM); break; + case ENT_CLIENT_GAUNTLET: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_GAUNTLET); break; default: error(strcat("unknown entity type in CSQC_Ent_Update: ", ftos(self.enttype), "\n")); break; @@ -1031,6 +1020,10 @@ void Ent_Init() electro_shotorigin[1] = decompressShotOrigin(ReadInt24_t()); electro_shotorigin[2] = decompressShotOrigin(ReadInt24_t()); electro_shotorigin[3] = decompressShotOrigin(ReadInt24_t()); + gauntlet_shotorigin[0] = decompressShotOrigin(ReadInt24_t()); + gauntlet_shotorigin[1] = decompressShotOrigin(ReadInt24_t()); + gauntlet_shotorigin[2] = decompressShotOrigin(ReadInt24_t()); + gauntlet_shotorigin[3] = decompressShotOrigin(ReadInt24_t()); if(forcefog) strunzone(forcefog); @@ -1043,6 +1036,9 @@ void Ent_Init() g_balance_grenadelauncher_secondary_bouncefactor = ReadCoord(); g_balance_grenadelauncher_secondary_bouncestop = ReadCoord(); + nex_scope = !ReadByte(); + campingrifle_scope = !ReadByte(); + if(!postinit) PostInit(); } @@ -1268,10 +1264,7 @@ void Net_WeaponComplain() { complain_weapon_type = ReadByte(); complain_weapon_time = time; -} - -void Net_CampingrifleScope() { - campingrifle_scope = TRUE; + weapontime = time; // ping the weapon panel } // CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer. @@ -1300,10 +1293,6 @@ float CSQC_Parse_TempEntity() Net_ReadRace(); bHandled = true; break; - case TE_CSQC_BEAM: - Net_GrapplingHook(); - bHandled = true; - break; case TE_CSQC_SPAWN: Net_ReadSpawn(); bHandled = true; @@ -1348,8 +1337,8 @@ float CSQC_Parse_TempEntity() Net_WeaponComplain(); bHandled = true; break; - case TE_CSQC_CAMPINGRIFLE_SCOPE: - Net_CampingrifleScope(); + case TE_CSQC_CR_MAXBULLETS: + cr_maxbullets = ReadByte(); bHandled = true; break; default: