X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_hook.qc;h=dd6d73effd8aae382ae92c4d40bf16807faa9b2b;hb=20668ea080d4edafd7d111f52162a7429cb5a57c;hp=88e1ced882da3542ae100acae2851010993a6694;hpb=4fc59bbd7e2d4f25ba21952ed50ae754295a7faa;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 88e1ced88..dd6d73eff 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -175,24 +175,24 @@ void GrapplingHookThink() if(self.state == 1) { - pullspeed = cvar("g_balance_grapplehook_speed_pull");//2000; + pullspeed = autocvar_g_balance_grapplehook_speed_pull;//2000; // speed the rope is pulled with - rubberforce = cvar("g_balance_grapplehook_force_rubber");//2000; + rubberforce = autocvar_g_balance_grapplehook_force_rubber;//2000; // force the rope will use if it is stretched - rubberforce_overstretch = cvar("g_balance_grapplehook_force_rubber_overstretch");//1000; + rubberforce_overstretch = autocvar_g_balance_grapplehook_force_rubber_overstretch;//1000; // force the rope will use if it is stretched - minlength = cvar("g_balance_grapplehook_length_min");//100; + minlength = autocvar_g_balance_grapplehook_length_min;//100; // minimal rope length // if the rope goes below this length, it isn't pulled any more - ropestretch = cvar("g_balance_grapplehook_stretch");//400; + ropestretch = autocvar_g_balance_grapplehook_stretch;//400; // if the rope is stretched by more than this amount, more rope is // given to you again - ropeairfriction = cvar("g_balance_grapplehook_airfriction");//0.2 + ropeairfriction = autocvar_g_balance_grapplehook_airfriction;//0.2 // while hanging on the rope, this friction component will help you a // bit to control the rope @@ -200,7 +200,7 @@ void GrapplingHookThink() dist = vlen(dir); dir = normalize(dir); - if(cvar("g_grappling_hook_tarzan")) + if(autocvar_g_grappling_hook_tarzan) { v = v0 = WarpZone_RefSys_TransformVelocity(self.owner, self, self.owner.velocity); @@ -233,7 +233,7 @@ void GrapplingHookThink() v = v + frametime * dir * spd * rubberforce; dv = ((v - v0) * dir) * dir; - if(cvar("g_grappling_hook_tarzan") >= 2) + if(autocvar_g_grappling_hook_tarzan >= 2) { if(self.aiment.movetype == MOVETYPE_WALK) { @@ -241,7 +241,7 @@ void GrapplingHookThink() self.aiment.velocity = self.aiment.velocity - dv * 0.5; self.aiment.flags &~= FL_ONGROUND; self.aiment.pusher = self.owner; - self.aiment.pushltime = time + cvar("g_maxpushtime"); + self.aiment.pushltime = time + autocvar_g_maxpushtime; } } @@ -315,7 +315,7 @@ void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, floa if(attacker != self.owner) { self.owner.pusher = attacker; - self.owner.pushltime = time + cvar("g_maxpushtime"); + self.owner.pushltime = time + autocvar_g_maxpushtime; } RemoveGrapplingHook(self.owner); } @@ -332,6 +332,9 @@ void FireGrapplingHook (void) if((arena_roundbased && time < warmup) || (time < game_starttime)) return; + if(self.freezetag_frozen) + return; + makevectors(self.v_angle); s = self.cvar_cl_gunalign; @@ -363,18 +366,18 @@ void FireGrapplingHook (void) missile.state = 0; // not latched onto anything - W_SetupProjectileVelocityEx(missile, v_forward, v_up, cvar("g_balance_grapplehook_speed_fly"), 0, 0, 0); + W_SetupProjectileVelocityEx(missile, v_forward, v_up, autocvar_g_balance_grapplehook_speed_fly, 0, 0, 0, FALSE); missile.angles = vectoangles (missile.velocity); //missile.glow_color = 250; // 244, 250 //missile.glow_size = 120; missile.touch = GrapplingHookTouch; missile.think = GrapplingHookThink; - missile.nextthink = time + 0.1; + missile.nextthink = time; missile.effects = /*EF_FULLBRIGHT | EF_ADDITIVE |*/ EF_LOWPRECISION; - missile.health = cvar("g_balance_grapplehook_health");//120 + missile.health = autocvar_g_balance_grapplehook_health;//120 missile.event_damage = GrapplingHook_Damage; missile.takedamage = DAMAGE_AIM; missile.damageforcescale = 0;