X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fnexball.qc;h=a068a33a54e236017194c3ec5ac05e5caa0b9df1;hb=8efc934724446a2c4506435a2a421a51d40fc20d;hp=1cfbbe7b73e95ebb1553a113db42eb0a05cede25;hpb=2e44f19e0c92cf7fab9e7d21f15abda16118765b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/nexball.qc b/qcsrc/server/nexball.qc index 1cfbbe7b7..a068a33a5 100644 --- a/qcsrc/server/nexball.qc +++ b/qcsrc/server/nexball.qc @@ -79,7 +79,7 @@ void ball_restart (void) void nexball_setstatus (void) { - local entity oldself; + entity oldself; self.items &~= IT_KEY1; if (self.ballcarried) { @@ -118,7 +118,7 @@ void football_touch(); void DropOwner (void) { - local entity ownr; + entity ownr; ownr = self.owner; DropBall(self, ownr.origin, ownr.velocity); makevectors(ownr.v_angle_y * '0 1 0'); @@ -128,7 +128,7 @@ void DropOwner (void) void GiveBall (entity plyr, entity ball) { - local entity ownr; + entity ownr; if ((ownr = ball.owner)) { @@ -222,7 +222,7 @@ void InitBall (void) self.teamtime = 0; self.pusher = world; self.team = FALSE; - sound (self, CHAN_PROJECTILE, self.noise1, VOL_BASE, ATTN_NORM); + sound (self, CH_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM); WaypointSprite_Ping(self.waypointsprite_attachedforcarrier); LogNB("init", world); } @@ -262,7 +262,7 @@ void football_touch (void) if (other.solid == SOLID_BSP) { if (time > self.lastground + 0.1) { - sound (self, CHAN_PROJECTILE, self.noise, VOL_BASE, ATTN_NORM); + sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM); self.lastground = time; } if (vlen(self.velocity) && !self.cnt) @@ -308,7 +308,7 @@ void basketball_touch (void) LogNB("caught", other); GiveBall(other, self); } else if (other.solid == SOLID_BSP) { - sound (self, CHAN_PROJECTILE, self.noise, VOL_BASE, ATTN_NORM); + sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM); if (vlen(self.velocity) && !self.cnt) self.nextthink = min(time + g_nexball_delay_idle, self.teamtime); } @@ -366,7 +366,7 @@ void GoalTouch (void) pscore = 1; } - sound (ball, CHAN_AUTO, self.noise, VOL_BASE, ATTN_NONE); + sound (ball, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NONE); if(ball.team && pscore) { @@ -407,14 +407,14 @@ void spawnfunc_nexball_team (void) void nb_spawnteam (string teamname, float teamcolor) { dprint("^2spawned team ", teamname, "\n"); - local entity e; + entity e; e = spawn(); e.classname = "nexball_team"; e.netname = teamname; e.cnt = teamcolor; e.team = e.cnt + 1; nb_teams += 1; -}; +} void nb_spawnteams (void) { @@ -592,19 +592,19 @@ void spawnfunc_ball_bound (void) { spawnfunc_nexball_out(); } void W_Nexball_Touch (void) { - local entity ball, attacker; + entity ball, attacker; attacker = self.owner; PROJECTILE_TOUCH; if(attacker.team != other.team || g_nexball_basketball_teamsteal) - if((ball = other.ballcarried) && (attacker.classname == "player" || attacker.classname == "gib")) + if((ball = other.ballcarried) && (attacker.classname == "player")) { other.velocity = other.velocity + normalize(self.velocity) * other.damageforcescale * autocvar_g_balance_nexball_secondary_force; other.flags &~= FL_ONGROUND; if(!attacker.ballcarried) { LogNB("stole", attacker); - sound (other, CHAN_AUTO, ball.noise2, VOL_BASE, ATTN_NORM); + sound (other, CH_TRIGGER, ball.noise2, VOL_BASE, ATTN_NORM); if(attacker.team == other.team && time > attacker.teamkill_complain) { @@ -621,12 +621,12 @@ void W_Nexball_Touch (void) void W_Nexball_Attack (float t) { - local entity ball; - local float mul, mi, ma; + entity ball; + float mul, mi, ma; if (!(ball = self.ballcarried)) return; - W_SetupShot (self, FALSE, 4, "nexball/shoot1.wav", CHAN_WEAPON, 0); + W_SetupShot (self, FALSE, 4, "nexball/shoot1.wav", CH_WEAPON_A, 0); tracebox(w_shotorg, BALL_MINS, BALL_MAXS, w_shotorg, MOVE_WORLDONLY, world); if(trace_startsolid) { @@ -654,10 +654,10 @@ void W_Nexball_Attack (float t) void W_Nexball_Attack2 (void) { - local entity missile; + entity missile; if (!(balls & BALL_BASKET)) return; - W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav", CHAN_WEAPON, 0); + W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav", CH_WEAPON_A, 0); // pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = spawn (); @@ -717,7 +717,7 @@ float w_nexball_weapon(float req) { precache_model ("models/weapons/g_porto.md3"); precache_model ("models/weapons/v_porto.md3"); - precache_model ("models/weapons/h_porto.dpm"); + precache_model ("models/weapons/h_porto.iqm"); precache_model ("models/elaser.mdl"); precache_sound ("nexball/shoot1.wav"); precache_sound ("nexball/shoot2.wav");