]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove guantlet entirely from code
authorSamual Lenks <samual@xonotic.org>
Mon, 23 Jul 2012 03:23:12 +0000 (23:23 -0400)
committerSamual Lenks <samual@xonotic.org>
Mon, 23 Jul 2012 03:23:12 +0000 (23:23 -0400)
qcsrc/client/Defs.qc
qcsrc/client/Main.qc
qcsrc/client/hook.qc
qcsrc/common/constants.qh
qcsrc/server/cl_client.qc
qcsrc/server/g_world.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_laser.qh

index 9bd8e8c8a35807e0bd5cab007646136a3159edbb..4d11afe1f905fbc81610723edf966c6070b428b5 100644 (file)
@@ -227,7 +227,6 @@ float tempdb;
 float ClientProgsDB;
 vector hook_shotorigin[4];
 vector electro_shotorigin[4];
-vector gauntlet_shotorigin[4];
 
 #ifdef BLURTEST
 float blurtest_time0, blurtest_time1, blurtest_radius, blurtest_power;
index 6181d789e4a71e2e12028df375c6285bebf0c8a3..4b8be072f6ed8f94b261bc826f6be79a2c0bf991 100644 (file)
@@ -762,7 +762,6 @@ void CSQC_Ent_Update(float bIsNewEntity)
                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;
                case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
                case ENT_CLIENT_AUXILIARYXHAIR: Net_AuXair2(bIsNewEntity); break;
                case ENT_CLIENT_TURRET: ent_turret(); break; 
@@ -873,10 +872,6 @@ 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);
index 641d50d634fee10abbb0abacbef4d30943df4eb0..3c71447a163831846ecb90290489b61dc5f9d9b2 100644 (file)
@@ -78,9 +78,6 @@ void Draw_GrapplingHook()
                case ENT_CLIENT_LGBEAM:
                        vs = electro_shotorigin[s];
                        break;
-               case ENT_CLIENT_GAUNTLET:
-                       vs = gauntlet_shotorigin[s];
-                       break;
        }
 
        if((self.owner.sv_entnum == player_localentnum - 1))
@@ -93,7 +90,6 @@ void Draw_GrapplingHook()
                                b = self.origin;
                                break;
                        case ENT_CLIENT_LGBEAM:
-                       case ENT_CLIENT_GAUNTLET:
                                if(self.HookRange)
                                        b = view_origin + view_forward * self.HookRange;
                                else
@@ -114,7 +110,6 @@ void Draw_GrapplingHook()
                                b = self.origin;
                                break;
                        case ENT_CLIENT_LGBEAM:
-                       case ENT_CLIENT_GAUNTLET:
                                a = self.origin;
                                b = self.velocity;
                                break;
@@ -161,12 +156,6 @@ void Draw_GrapplingHook()
                        tex = "particles/lgbeam";
                        rgb = '1 1 1';
                        break;
-               case ENT_CLIENT_GAUNTLET:
-                       intensity = 1;
-                       offset = Noise_White(self, frametime);
-                       tex = "particles/gauntletbeam";
-                       rgb = '1 1 1';
-                       break;
        }
 
        Draw_GrapplingHook_trace_callback_tex = tex;
@@ -194,7 +183,6 @@ void Draw_GrapplingHook()
                        }
                        break;
                case ENT_CLIENT_LGBEAM:
-               case ENT_CLIENT_GAUNTLET:
                        setorigin(self, a); // beam origin!
                        break;
        }
@@ -207,9 +195,6 @@ void Draw_GrapplingHook()
                case ENT_CLIENT_LGBEAM:
                        pointparticles(particleeffectnum("electro_lightning"), trace_endpos, normalize(atrans - trace_endpos), frametime * intensity);
                        break;
-               case ENT_CLIENT_GAUNTLET:
-                       pointparticles(particleeffectnum("gauntlet_lightning"), b, normalize(a - b), frametime * intensity);
-                       break;
        }
 }
 
@@ -237,7 +222,6 @@ void Ent_ReadHook(float bIsNew, float type)
                {
                        default:
                        case ENT_CLIENT_HOOK:
-                       case ENT_CLIENT_GAUNTLET:
                                self.HookRange = 0;
                                break;
                        case ENT_CLIENT_LGBEAM:
@@ -277,9 +261,6 @@ void Ent_ReadHook(float bIsNew, float type)
                        case ENT_CLIENT_LGBEAM:
                                sound (self, CH_SHOTS_SINGLE, "weapons/lgbeam_fly.wav", VOL_BASE, ATTN_NORM);
                                break;
-                       case ENT_CLIENT_GAUNTLET:
-                               sound (self, CH_SHOTS_SINGLE, "weapons/gauntletbeam_fly.wav", VOL_BASE, ATTN_NORM);
-                               break;
                }
        }
 
@@ -289,7 +270,6 @@ void Ent_ReadHook(float bIsNew, float type)
 void Hook_Precache()
 {
        precache_sound("weapons/lgbeam_fly.wav");
-       precache_sound("weapons/gauntletbeam_fly.wav");
        precache_model("models/hook.md3");
 }
 
index 9799de041b407bcf63b6bfe68c662806e7061923..a4d54fb585d2e8b8fa1e5b2e270a53aeebb4ec82 100644 (file)
@@ -93,12 +93,11 @@ const float ENT_CLIENT_WARPZONE_CAMERA = 25;
 const float ENT_CLIENT_TRIGGER_MUSIC = 26;
 const float ENT_CLIENT_HOOK = 27;
 const float ENT_CLIENT_LGBEAM = 28;
-const float ENT_CLIENT_GAUNTLET = 29;
-const float ENT_CLIENT_ACCURACY = 30;
-const float ENT_CLIENT_SHOWNAMES = 31;
-const float ENT_CLIENT_WARPZONE_TELEPORTED = 32;
-const float ENT_CLIENT_MODEL = 33;
-const float ENT_CLIENT_ITEM = 34;
+const float ENT_CLIENT_ACCURACY = 29;
+const float ENT_CLIENT_SHOWNAMES = 30;
+const float ENT_CLIENT_WARPZONE_TELEPORTED = 31;
+const float ENT_CLIENT_MODEL = 32;
+const float ENT_CLIENT_ITEM = 33;
 
 const float ENT_CLIENT_TURRET = 40;
 const float ENT_CLIENT_AUXILIARYXHAIR = 50;
index 643ee116c6b4528863d15bb8b85e94c7c83d2a04..1612342b5b2488da6ff61c756bdccd8d53b25999 100644 (file)
@@ -944,10 +944,7 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[1]));
        WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[2]));
        WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[3]));
-       WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[0]));
-       WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[1]));
-       WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[2]));
-       WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[3]));
+
        if(sv_foginterval && world.fog != "")
                WriteString(MSG_ENTITY, world.fog);
        else
index 36fddb3398173175bd7473992fd7f75e3676a293..3035ec6c2ca6a3de87f2dd9e46186dcbb1c469cb 100644 (file)
@@ -642,7 +642,6 @@ void spawnfunc_worldspawn (void)
        readlevelcvars();
        GrappleHookInit();
        ElectroInit();
-       LaserInit();
 
        player_count = 0;
        bot_waypoints_for_items = autocvar_g_waypoints_for_items;
index 9e1db57c89dc4d5cd6c8325bf52604c5c63a384a..ae9c5346411c201d02b391c9de454c4ef923fb27 100644 (file)
@@ -248,123 +248,6 @@ void W_Laser_Attack (float issecondary)
        }
 }
 
-.vector hook_start, hook_end;
-float gauntletbeam_send(entity to, float sf)
-{
-       WriteByte(MSG_ENTITY, ENT_CLIENT_GAUNTLET);
-       sf = sf & 0x7F;
-       if(sound_allowed(MSG_BROADCAST, self.realowner))
-               sf |= 0x80;
-       WriteByte(MSG_ENTITY, sf);
-       if(sf & 1)
-       {
-               WriteByte(MSG_ENTITY, num_for_edict(self.realowner));
-       }
-       if(sf & 2)
-       {
-               WriteCoord(MSG_ENTITY, self.hook_start_x);
-               WriteCoord(MSG_ENTITY, self.hook_start_y);
-               WriteCoord(MSG_ENTITY, self.hook_start_z);
-       }
-       if(sf & 4)
-       {
-               WriteCoord(MSG_ENTITY, self.hook_end_x);
-               WriteCoord(MSG_ENTITY, self.hook_end_y);
-               WriteCoord(MSG_ENTITY, self.hook_end_z);
-       }
-       return TRUE;
-}
-.entity gauntletbeam;
-.float prevgauntletfire;
-entity lgbeam_owner_ent;
-void gauntletbeam_think()
-{
-       float damage, myforce, myradius;
-       damage = autocvar_g_balance_laser_secondary_damage;
-       myforce = autocvar_g_balance_laser_secondary_force;
-       myradius = autocvar_g_balance_laser_secondary_radius;
-
-       self.realowner.prevgauntletfire = time;
-       if (self.realowner.weaponentity.state != WS_INUSE || self != self.realowner.gauntletbeam || self.realowner.deadflag != DEAD_NO || !self.realowner.BUTTON_ATCK2)
-       {
-               remove(self);
-               return;
-       }
-
-       self.nextthink = time;
-
-       makevectors(self.realowner.v_angle);
-
-       float dt;
-       dt = frametime;
-
-       W_SetupShot_Range(self.realowner, TRUE, 0, "", 0, damage * dt, myradius);
-       if(!lgbeam_owner_ent)
-       {
-               lgbeam_owner_ent = spawn();
-               lgbeam_owner_ent.classname = "lgbeam_owner_ent";
-       }
-       WarpZone_traceline_antilag(lgbeam_owner_ent, w_shotorg, w_shotend, MOVE_NORMAL, lgbeam_owner_ent, ANTILAG_LATENCY(self.owner));
-
-       // apply the damage
-       if(trace_ent)
-       {
-               vector force;
-               force = w_shotdir * myforce;
-               if(accuracy_isgooddamage(self.owner, trace_ent))
-                       accuracy_add(self.owner, WEP_LASER, 0, damage * dt);
-               Damage (trace_ent, self.owner, self.owner, damage * dt, WEP_LASER | HITTYPE_SECONDARY, trace_endpos, force * dt);
-       }
-
-       // draw effect
-       if(w_shotorg != self.hook_start)
-       {
-               self.SendFlags |= 2;
-               self.hook_start = w_shotorg;
-       }
-       if(w_shotend != self.hook_end)
-       {
-               self.SendFlags |= 4;
-               self.hook_end = w_shotend;
-       }
-}
-
-// experimental gauntlet
-void W_Laser_Attack2 ()
-{
-       // only play fire sound if 0.5 sec has passed since player let go the fire button
-       if(time - self.prevgauntletfire > 0.5)
-       {
-               sound (self, CH_WEAPON_A, "weapons/gauntlet_fire.wav", VOL_BASE, ATTN_NORM);
-       }
-
-       entity beam, oldself;
-
-       self.gauntletbeam = beam = spawn();
-       beam.solid = SOLID_NOT;
-       beam.think = gauntletbeam_think;
-       beam.owner = self;
-       beam.movetype = MOVETYPE_NONE;
-       beam.shot_spread = 0;
-       beam.bot_dodge = TRUE;
-       beam.bot_dodgerating = autocvar_g_balance_laser_primary_damage;
-       Net_LinkEntity(beam, FALSE, 0, gauntletbeam_send);
-
-       oldself = self;
-       self = beam;
-       self.think();
-       self = oldself;
-}
-
-void LaserInit()
-{
-       weapon_action(WEP_LASER, WR_PRECACHE);
-       gauntlet_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_LASER), FALSE, FALSE, 1);
-       gauntlet_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_LASER), FALSE, FALSE, 2);
-       gauntlet_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_LASER), FALSE, FALSE, 3);
-       gauntlet_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_LASER), FALSE, FALSE, 4);
-}
-
 void spawnfunc_weapon_laser (void)
 {
        weapon_defaultspawnfunc(WEP_LASER);
@@ -430,19 +313,6 @@ float w_laser(float req)
 
                                        break;
                                }
-
-                               case 2: // gauntlet secondary
-                               {
-                                       W_DecreaseAmmo(ammo_none, 1, TRUE);
-
-                                       if (weapon_prepareattack(0, 0))
-                                       {
-                                               W_Laser_Attack2();
-                                               weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_laser_secondary_animtime, w_ready);
-                                       }
-
-                                       break;
-                               }
                        }
                }
        }
@@ -452,7 +322,6 @@ float w_laser(float req)
                precache_model ("models/weapons/v_laser.md3");
                precache_model ("models/weapons/h_laser.iqm");
                precache_sound ("weapons/lasergun_fire.wav");
-               precache_sound ("weapons/gauntlet_fire.wav");
                //precache_sound ("weapons/reload.wav"); // until weapons have individual reload sounds, precache the reload sound somewhere else
        }
        else if (req == WR_SETUP)
@@ -495,7 +364,7 @@ float w_laser(float req)
        else if (req == WR_KILLMESSAGE)
        {
                if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s was cut in half by %s's gauntlet"); // unchecked: SPLASH
+                       w_deathtypestring = _("%s was cut in half by %s's gauntlet"); // unchecked: SPLASH // TODO 
                else
                        w_deathtypestring = _("%s was lasered to death by %s"); // unchecked: SPLASH
        }
index 0f2c137030e51e8279eccb2a232fc14acb70c94d..8719c1e852a39c68fce9b64ed45929cef0ad84f7 100644 (file)
@@ -1,2 +1 @@
-void LaserInit();
-vector gauntlet_shotorigin[4];
+// blank -- delete it?