]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/nexball.qc
Merge remote branch 'origin/master' into samual/mutator_ctf
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / nexball.qc
index 61385f6b5e86bd233dee19d7ee7ca523c495fc4a..d3f4b55f4a49acf42693df6e04df24942a1b99f3 100644 (file)
@@ -28,6 +28,9 @@ float nb_teams;
 
 .float teamtime;
 
+.float nb_dropperid;
+.float nb_droptime;
+
 void nb_delayedinit();
 void nb_init() // Called early (worldspawn stage)
 {
@@ -79,7 +82,7 @@ void ball_restart (void)
 
 void nexball_setstatus (void)
 {
-       local entity oldself;
+       entity oldself;
        self.items &~= IT_KEY1;
        if (self.ballcarried)
        {
@@ -118,7 +121,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 +131,7 @@ void DropOwner (void)
 
 void GiveBall (entity plyr, entity ball)
 {
-       local entity ownr;
+       entity ownr;
 
        if ((ownr = ball.owner))
        {
@@ -155,7 +158,7 @@ void GiveBall (entity plyr, entity ball)
        ball.owner = ball.pusher = plyr; //"owner" is set to the player carrying, "pusher" to the last player who touched it
        ball.team = plyr.team;
        plyr.ballcarried = ball;
-       ball.dropperid = plyr.playerid;
+       ball.nb_dropperid = plyr.playerid;
 
        plyr.effects |= g_nexball_basketball_effects_default;
        ball.effects &~= g_nexball_basketball_effects_default;
@@ -188,7 +191,7 @@ void DropBall (entity ball, vector org, vector vel)
        ball.flags &~= FL_ONGROUND;
        ball.scale = ball_scale;
        ball.velocity = vel;
-       ball.ctf_droptime = time;
+       ball.nb_droptime = time;
        ball.touch = basketball_touch;
        ball.think = ResetBall;
        ball.nextthink = min(time + g_nexball_delay_idle, ball.teamtime);
@@ -302,7 +305,7 @@ void basketball_touch (void)
                football_touch();
                return;
        }
-       if (!self.cnt && other.classname == "player" && (other.playerid != self.dropperid || time > self.ctf_droptime + autocvar_g_nexball_delay_collect)) {
+       if (!self.cnt && other.classname == "player" && (other.playerid != self.nb_dropperid || time > self.nb_droptime + autocvar_g_nexball_delay_collect)) {
                if (other.health <= 0)
                        return;
                LogNB("caught", other);
@@ -407,14 +410,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,7 +595,7 @@ 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;
@@ -621,8 +624,8 @@ 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;
 
@@ -654,7 +657,7 @@ 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", CH_WEAPON_A, 0);
@@ -717,7 +720,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");