r3271 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Jan 25 06:31:42 EST 2008


Author: div0
Date: 2008-01-25 06:31:42 -0500 (Fri, 25 Jan 2008)
New Revision: 3271

Modified:
   trunk/data/default.cfg
   trunk/data/effectinfo.txt
   trunk/data/keybinds.txt
   trunk/data/qcsrc/server/g_damage.qc
   trunk/data/qcsrc/server/g_triggers.qc
Log:
new entity misc_laser with particle effect misc_laser_beam


Modified: trunk/data/default.cfg
===================================================================
--- trunk/data/default.cfg	2008-01-25 09:35:17 UTC (rev 3270)
+++ trunk/data/default.cfg	2008-01-25 11:31:42 UTC (rev 3271)
@@ -861,3 +861,11 @@
 
 // useful vote aliases
 alias endmatch "timelimit -1"
+
+// useful keybind to maximize the chat area temporarily
+alias +con_chat_maximize "set _backup_con_chatpos $con_chatpos; set _backup_con_chat $con_chat; set _backup_con_notify $con_notify; set _backup_con_chattime $con_chattime; set _backup_cl_deathscoreboard $cl_deathscoreboard; con_chatpos -7; con_chat 100; con_notify 0; con_chattime 3600; cl_deathscoreboard 0"
+alias -con_chat_maximize "con_chatpos $_backup_con_chatpos; con_chat $_backup_con_chat; con_notify _backup_con_notify; con_chattime $_backup_con_chattime; cl_deathscoreboard $_backup_cl_deathscoreboard"
+
+// tab completion
+set con_completion_playdemo *.dem
+set con_completion_timedemo *.dem

Modified: trunk/data/effectinfo.txt
===================================================================
--- trunk/data/effectinfo.txt	2008-01-25 09:35:17 UTC (rev 3270)
+++ trunk/data/effectinfo.txt	2008-01-25 11:31:42 UTC (rev 3271)
@@ -1966,3 +1966,47 @@
 lightradius 160
 lightradiusfade 800
 lightcolor 1 0 0
+
+
+
+effect misc_laser_beam
+countabsolute 1
+type beam
+tex 60 60
+size 1 1
+alpha 256 256 64
+color 0xff0000 0xff0000
+sizeincrease 1
+
+effect misc_laser_beam_end
+count 1
+type spark
+color 0x8f4333 0xfff31b
+size 0.4 0.4
+alpha 128 256 768
+gravity 1
+bounce -1
+velocityjitter 64 64 64
+velocitymultiplier 100
+
+
+
+effect misc_laser_beam_fast
+countabsolute 1
+type beam
+tex 60 60
+size 1 1
+alpha 256 256 640
+color 0xff0000 0xff0000
+sizeincrease 0.1
+
+effect misc_laser_beam_fast_end
+count 1
+type spark
+color 0x8f4333 0xfff31b
+size 0.4 0.4
+alpha 128 256 768
+gravity 1
+bounce -1
+velocityjitter 64 64 64
+velocitymultiplier 100

Modified: trunk/data/keybinds.txt
===================================================================
--- trunk/data/keybinds.txt	2008-01-25 09:35:17 UTC (rev 3270)
+++ trunk/data/keybinds.txt	2008-01-25 11:31:42 UTC (rev 3271)
@@ -1,69 +1,70 @@
-""              "Moving"
-"+forward"		"forward"
-"+back"			"backpedal"
-"+moveleft"		"strafe left"
-"+moveright"	"strafe right"
-"+jump"			"jump / swim"
-"+crouch"		"crouch / sink"
-"+hook"			"grappling hook"
-""				""
-""				"Attacking"
-"+attack"		"primary fire"
-"+attack2"		"secondary fire"
-""				""
-""				"Weapon switching"
-"weapprev"		"previous"
-"weapnext"		"next"
-"weaplast"		"previously used"
-"impulse 1"		"laser"
-"impulse 2"		"shotgun"
-"impulse 3"		"machine gun"
-"impulse 4"		"mortar"
-"impulse 5"		"electro"
-"impulse 6"		"crylink"
-"impulse 7"		"nex"
-"impulse 8"		"hagar"
-"impulse 9"		"rocket launcher"
-""				""
-""				"View"
-"+zoom"			"zoom"
-"+showscores"	"show scores"
-"screenshot"	"screen shot"
-""				""
-""				"Communicate"
-"messagemode"	"public chat"
-"messagemode2"	"team chat"
-"vyes"			"vote YES"
-"vno"			"vote NO"
-"ready"			"ready"
-""				""
-""				"Client"
-"+show_info"	"server info"
-"toggleconsole"	"enter console"
-"disconnect"	"disconnect"
-"quit"			"quit"
-""				""
-""				"Teamplay"
-"messagemode2"	"team chat"
-"menu_showteamselect"	"switch team"
-"spec"			"enter spectator mode"
-"dropweapon"	"drop weapon"
-"+use"			"drop key"
-""				""
-""				"User defined"
-"+userbind 1"	"$userbind1"
-"+userbind 2"	"$userbind2"
-"+userbind 3"	"$userbind3"
-"+userbind 4"	"$userbind4"
-"+userbind 5"	"$userbind5"
-"+userbind 6"	"$userbind6"
-"+userbind 7"	"$userbind7"
-"+userbind 8"	"$userbind8"
-"+userbind 9"	"$userbind9"
-"+userbind 10"	"$userbind10"
-"+userbind 11"	"$userbind11"
-"+userbind 12"	"$userbind12"
-"+userbind 13"	"$userbind13"
-"+userbind 14"	"$userbind14"
-"+userbind 15"	"$userbind15"
-"+userbind 16"	"$userbind16"
+""                                      "Moving"
+"+forward"                              "forward"
+"+back"                                 "backpedal"
+"+moveleft"                             "strafe left"
+"+moveright"                            "strafe right"
+"+jump"                                 "jump / swim"
+"+crouch"                               "crouch / sink"
+"+hook"                                 "grappling hook"
+""                                      ""
+""                                      "Attacking"
+"+attack"                               "primary fire"
+"+attack2"                              "secondary fire"
+""                                      ""
+""                                      "Weapon switching"
+"weapprev"                              "previous"
+"weapnext"                              "next"
+"weaplast"                              "previously used"
+"impulse 1"                             "laser"
+"impulse 2"                             "shotgun"
+"impulse 3"                             "machine gun"
+"impulse 4"                             "mortar"
+"impulse 5"                             "electro"
+"impulse 6"                             "crylink"
+"impulse 7"                             "nex"
+"impulse 8"                             "hagar"
+"impulse 9"                             "rocket launcher"
+""                                      ""
+""                                      "View"
+"+zoom"                                 "zoom"
+"+showscores"                           "show scores"
+"screenshot"                            "screen shot"
+""                                      ""
+""                                      "Communicate"
+"messagemode"                           "public chat"
+"messagemode2"                          "team chat"
+"+con_chat_maximize"                    "show chat history"
+"vyes"                                  "vote YES"
+"vno"                                   "vote NO"
+"ready"                                 "ready"
+""                                      ""
+""                                      "Client"
+"+show_info"                            "server info"
+"toggleconsole"                         "enter console"
+"disconnect"                            "disconnect"
+"quit"                                  "quit"
+""                                      ""
+""                                      "Teamplay"
+"messagemode2"                          "team chat"
+"menu_showteamselect"                   "switch team"
+"spec"                                  "enter spectator mode"
+"dropweapon"                            "drop weapon"
+"+use"                                  "drop key"
+""                                      ""
+""                                      "User defined"
+"+userbind 1"                           ""
+"+userbind 2"                           ""
+"+userbind 3"                           ""
+"+userbind 4"                           ""
+"+userbind 5"                           ""
+"+userbind 6"                           ""
+"+userbind 7"                           ""
+"+userbind 8"                           ""
+"+userbind 9"                           ""
+"+userbind 10"                          ""
+"+userbind 11"                          ""
+"+userbind 12"                          ""
+"+userbind 13"                          ""
+"+userbind 14"                          ""
+"+userbind 15"                          ""
+"+userbind 16"                          ""

Modified: trunk/data/qcsrc/server/g_damage.qc
===================================================================
--- trunk/data/qcsrc/server/g_damage.qc	2008-01-25 09:35:17 UTC (rev 3270)
+++ trunk/data/qcsrc/server/g_damage.qc	2008-01-25 11:31:42 UTC (rev 3271)
@@ -522,6 +522,7 @@
 
 	// apply push
 	if (self.damageforcescale)
+	if (vlen(force))
 	{
 		self.velocity = self.velocity + self.damageforcescale * force;
 		self.flags = self.flags - (self.flags & FL_ONGROUND);

Modified: trunk/data/qcsrc/server/g_triggers.qc
===================================================================
--- trunk/data/qcsrc/server/g_triggers.qc	2008-01-25 09:35:17 UTC (rev 3270)
+++ trunk/data/qcsrc/server/g_triggers.qc	2008-01-25 11:31:42 UTC (rev 3271)
@@ -555,3 +555,68 @@
 };
 
 
+void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float deathtype);
+void() misc_laser_think =
+{
+	vector o;
+	if(!self.state)
+	{
+		self.enemy = find(world, targetname, self.target);
+		self.state = 1;
+	}
+	if(self.enemy)
+	{
+		o = self.enemy.origin;
+	}
+	else
+	{
+		makevectors(self.angles);
+		o = self.origin + v_forward * MAX_SHOT_DISTANCE;
+	}
+
+	if(self.dmg)
+	{
+		if(self.dmg < 0)
+			FireRailgunBullet(self.origin, o, 100000, 0, DEATH_HURTTRIGGER);
+		else
+			FireRailgunBullet(self.origin, o, self.dmg * frametime, 0, DEATH_HURTTRIGGER);
+	}
+	if(time > self.ltime)
+	{
+		trailparticles(self, self.cnt, self.origin, trace_endpos);
+		pointparticles(self.lip, trace_endpos, trace_plane_normal, 256 * frametime);
+		self.ltime = time + self.wait;
+	}
+	self.nextthink = time;
+}
+/*QUAKED misc_laser (.5 .5 .5) ?
+Any object touching the beam will be hurt
+Keys:
+"target"
+ target_position where the laser ends
+"mdl"
+ name of beam effect to use
+"dmg"
+ damage per second (-1 for a laser that kills immediately)
+"wait"
+ delay between sending the particle effect
+*/
+void() misc_laser =
+{
+	if(self.mdl)
+	{
+		self.cnt = particleeffectnum(self.mdl);
+		self.lip = particleeffectnum(strcat(self.mdl, "_end"));
+	}
+	else
+	{
+		self.cnt = particleeffectnum("misc_laser_beam");
+		self.lip = particleeffectnum("misc_laser_beam_end");
+	}
+	if(!self.wait)
+		self.wait = 1;
+	if(!self.message)
+		self.message = "saw the light";
+	self.think = misc_laser_think;
+	self.nextthink = time;
+}




More information about the nexuiz-commits mailing list