X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2FMain.qc;h=9fb86a6e23bb0eda1a12e2c9bdb5f33ae24f2705;hb=3d0056945167985679ec91db307c0284406640d1;hp=f2bb43442eeca9eee36868de65781536616557da;hpb=dfbd79fb9c8e4be1eaf9f4a417320b9488811f91;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index f2bb43442..9fb86a6e2 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -130,14 +130,13 @@ void CSQC_Init(void) GetTeam(COLOR_SPECTATOR, true); // add specs first - cvar_clientsettemp("_supports_weaponpriority", "1"); - RegisterWeapons(); WaypointSprite_Load(); // precaches Projectile_Precache(); + Hook_Precache(); GibSplash_Precache(); Casings_Precache(); DamageInfo_Precache(); @@ -185,6 +184,7 @@ void CSQC_Init(void) minimapname = strzone(minimapname); WarpZone_Init(); + hud_configure_prev = -1; } // CSQC_Shutdown : Called every time the CSQC code is shutdown (changing maps, quitting, etc) @@ -214,9 +214,9 @@ void CSQC_Shutdown(void) if not(isdemo()) { if not(calledhooks & HOOK_START) - localcmd("\n_cl_hook_gamestart nop;"); + localcmd("\n_cl_hook_gamestart nop\n"); if not(calledhooks & HOOK_END) - localcmd("\ncl_hook_gameend;"); + localcmd("\ncl_hook_gameend\n"); } } @@ -966,7 +966,7 @@ void Gamemode_Init() if not(isdemo()) { - localcmd("\n_cl_hook_gamestart ", GametypeNameFromType(gametype), ";"); + localcmd("\n_cl_hook_gamestart ", GametypeNameFromType(gametype), "\n"); calledhooks |= HOOK_START; } } @@ -1023,9 +1023,14 @@ void Ent_Init() nb_pb_period = ReadByte() / 32; //Accuracy of 1/32th - hook_shotorigin_x = ReadCoord(); - hook_shotorigin_y = ReadCoord(); - hook_shotorigin_z = ReadCoord(); + hook_shotorigin[0] = decompressShotOrigin(ReadInt24_t()); + hook_shotorigin[1] = decompressShotOrigin(ReadInt24_t()); + hook_shotorigin[2] = decompressShotOrigin(ReadInt24_t()); + hook_shotorigin[3] = decompressShotOrigin(ReadInt24_t()); + electro_shotorigin[0] = decompressShotOrigin(ReadInt24_t()); + electro_shotorigin[1] = decompressShotOrigin(ReadInt24_t()); + electro_shotorigin[2] = decompressShotOrigin(ReadInt24_t()); + electro_shotorigin[3] = decompressShotOrigin(ReadInt24_t()); if(forcefog) strunzone(forcefog); @@ -1225,13 +1230,13 @@ void Net_ReadPingPLReport() void Net_VoteDialog(float highlight) { if(highlight) { - vote_highlighted = ReadShort(); + vote_highlighted = ReadByte(); return; } - vote_yescount = ReadShort(); - vote_nocount = ReadShort(); - vote_needed = ReadShort(); + vote_yescount = ReadByte(); + vote_nocount = ReadByte(); + vote_needed = ReadByte(); vote_active = 1; } @@ -1253,6 +1258,18 @@ void Net_Notify() { } } +void Net_WeaponComplain() { + complain_weapon = ReadByte(); + + if(complain_weapon_name) + strunzone(complain_weapon_name); + complain_weapon_name = strzone(ReadString()); + + complain_weapon_type = ReadByte(); + + complain_weapon_time = time; +} + // CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer. // You must ALWAYS first acquire the temporary ID, which is sent as a byte. // Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event. @@ -1279,7 +1296,7 @@ float CSQC_Parse_TempEntity() Net_ReadRace(); bHandled = true; break; - case 13: // TE_BEAM + case TE_CSQC_BEAM: Net_GrapplingHook(); bHandled = true; break; @@ -1323,6 +1340,10 @@ float CSQC_Parse_TempEntity() Net_Notify(); bHandled = true; break; + case TE_CSQC_WEAPONCOMPLAIN: + Net_WeaponComplain(); + bHandled = true; + break; default: // No special logic for this temporary entity; return 0 so the engine can handle it bHandled = false;