]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add some new keepawayball_carrying images with now fully functioning HUD - some bug...
authorunknown <samual@xonotic.org>
Mon, 22 Nov 2010 00:25:20 +0000 (19:25 -0500)
committerunknown <samual@xonotic.org>
Mon, 22 Nov 2010 00:25:20 +0000 (19:25 -0500)
effectinfo.txt
gfx/hud/default/keepawayball_carrying.tga [new file with mode: 0644]
gfx/hud/luminos/keepawayball_carrying.tga [new file with mode: 0644]
qcsrc/client/hud.qc
qcsrc/server/mutators/gamemode_keepaway.qc

index 1947d3f0611f9704394cfe59bb0f6016e84a9f9c..c08f8c3bc1a69830fd3cf153b882a1d82e254a5e 100644 (file)
@@ -5110,3 +5110,18 @@ size 16 16
 alpha 256 256 1024
 velocityjitter 256 256 256
 
+//sparks for keepaway ball touch
+// used nowhere in code
+effect kaball_sparks
+count 35
+type spark
+tex 40 40
+color 0xa9cacf 0x0054ff
+size 1 3
+alpha 0 256 556
+gravity 1
+bounce 1.5
+originjitter 1 1 1
+velocityjitter 300 300 300
+velocitymultiplier 0.5
+airfriction 3
diff --git a/gfx/hud/default/keepawayball_carrying.tga b/gfx/hud/default/keepawayball_carrying.tga
new file mode 100644 (file)
index 0000000..7300a15
Binary files /dev/null and b/gfx/hud/default/keepawayball_carrying.tga differ
diff --git a/gfx/hud/luminos/keepawayball_carrying.tga b/gfx/hud/luminos/keepawayball_carrying.tga
new file mode 100644 (file)
index 0000000..7300a15
Binary files /dev/null and b/gfx/hud/luminos/keepawayball_carrying.tga differ
index 0917be59aae1eea73e6cb5ef1f6a32eac35cab62..3d69a78b375c129993406d568f1a123e7caec280 100644 (file)
@@ -4324,7 +4324,7 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
        mod_active = 1;
 
        if(stat_items & IT_KEY1)
-               drawpic_aspect_skin(pos, "nexball_carrying", eX * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos, "keepawayball_carrying", eX * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 }
 
 
index 242e80902c518bbcce11f7a28d44040c575f52b3..01175d1e9798d7d9cc808bd00890510c385456cc 100644 (file)
@@ -37,7 +37,9 @@ void ka_SpawnBall() // self = the ball
        self.classname = "keepawayball";
        self.damageforcescale = cvar("g_keepawayball_damageforcescale");
        self.takedamage = DAMAGE_YES;
-       self.effects = self.effects | EF_FULLBRIGHT;
+       //self.effects |= "sparks";
+       self.glow_color = cvar("g_keepawayball_trail_color");
+       self.glow_trail = TRUE;
        self.movetype = MOVETYPE_BOUNCE;
        self.touch = ka_TouchEvent;
        self.think = ka_RespawnBall;
@@ -52,6 +54,8 @@ void ka_SpawnBall() // self = the ball
 
 void ka_RespawnBall()
 {
+       vector oldballorigin = self.origin;
+
        if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 10, 1024, 256))
        {
                makevectors(self.angles);
@@ -62,6 +66,8 @@ void ka_RespawnBall()
                //self.touch = ka_TouchEvent;
                self.think = ka_RespawnBall;
                self.nextthink = time + cvar("g_keepawayball_respawntime");
+               pointparticles(particleeffectnum("electro_combo"), oldballorigin, '0 0 0', 1);
+               pointparticles(particleeffectnum("electro_combo"), self.origin, '0 0 0', 1);
        }
        else
        {
@@ -79,7 +85,11 @@ void ka_TouchEvent()
                self.nextthink = time;
                return;
        }
-       if(other.classname != "player" || other.health < 1) { return; }
+       if(other.classname != "player" || other.health < 1) 
+       { 
+               pointparticles(particleeffectnum("kaball_sparks"), self.origin, '0 0 0', 1);
+               return; 
+       }
        if(!self) { return; }
        if(self.wait > time) { return; }
 
@@ -91,11 +101,9 @@ void ka_TouchEvent()
        self.velocity = '0 0 0';
        self.movetype = MOVETYPE_NONE;
        self.touch = SUB_Null;
-       self.alpha = 0.01;
+       self.effects |= EF_NODRAW;
        self.think = SUB_Null;
        self.nextthink = 0;
-       self.glow_color = cvar("g_keepawayball_trail_color");
-       self.glow_trail = TRUE;
        self.takedamage = DAMAGE_NO;
 
        other.effects |= 8;
@@ -130,9 +138,9 @@ void ka_DropEvent(entity plyr)
        ball.nextthink = time + cvar("g_keepawayball_respawntime");
        ball.touch = ka_TouchEvent;
        ball.takedamage = DAMAGE_YES;
-       plyr.effects = EF_LOWPRECISION;
+       plyr.effects &~= 8;
        plyr.alpha = 1.0;
-       ball.alpha = 1.0;
+       ball.effects &~= EF_NODRAW; //ball.alpha = 1.0;
        setorigin(ball, plyr.origin + '0 0 10');
        ball.velocity = '0 0 200' + '0 100 0'*crandom() + '100 0 0'*crandom();
        ball.owner.ballcarried = world;