[nexuiz-commits] r8167 - in branches/nexuiz-2.0: . data data/qcsrc/server server/rcon2irc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Oct 22 05:03:36 EDT 2009


Author: div0
Date: 2009-10-22 05:03:33 -0400 (Thu, 22 Oct 2009)
New Revision: 8167

Added:
   branches/nexuiz-2.0/server/rcon2irc/bans.pl
Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/balanceNexrun.cfg
   branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
   branches/nexuiz-2.0/data/qcsrc/server/extensions.qh
   branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc
   branches/nexuiz-2.0/data/qcsrc/server/movelib.qc
   branches/nexuiz-2.0/server/rcon2irc/echo-rcon.pl
Log:
r8160 | div0 | 2009-10-20 11:33:31 -0400 (Tue, 20 Oct 2009) | 2 lines
merge extensions with dpmod
r8161 | div0 | 2009-10-20 11:34:32 -0400 (Tue, 20 Oct 2009) | 2 lines
add DP_PHYSICS preliminary API so maps can already contain ODE objects
r8162 | fruitiex | 2009-10-20 13:58:55 -0400 (Tue, 20 Oct 2009) | 2 lines
echo-rcon.pl now allows multiple instances of rcon2irc on the same server, bans.pl can echo connection attempts from banned clients (patch by merlijn)
r8163 | fruitiex | 2009-10-20 16:16:31 -0400 (Tue, 20 Oct 2009) | 2 lines
lots of testing =>  another few balancing changes
r8164 | div0 | 2009-10-21 12:27:12 -0400 (Wed, 21 Oct 2009) | 2 lines
fix warning
r8165 | div0 | 2009-10-21 12:28:27 -0400 (Wed, 21 Oct 2009) | 2 lines
preliminary declaration of jointtype, and make misc_follow behave as a joint if jointtype is set
r8166 | fruitiex | 2009-10-21 15:14:59 -0400 (Wed, 21 Oct 2009) | 2 lines
last big balance changes, it can be considered stable now


Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2009-10-21 19:14:59 UTC (rev 8166)
+++ branches/nexuiz-2.0/.patchsets	2009-10-22 09:03:33 UTC (rev 8167)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7945,7948-7948,7951-8156
+revisions_applied = 1-7945,7948-7948,7951-8166

Modified: branches/nexuiz-2.0/data/balanceNexrun.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceNexrun.cfg	2009-10-21 19:14:59 UTC (rev 8166)
+++ branches/nexuiz-2.0/data/balanceNexrun.cfg	2009-10-22 09:03:33 UTC (rev 8167)
@@ -86,8 +86,8 @@
 set g_pickup_shells_max 30
 set g_pickup_nails 30
 set g_pickup_nails_max 180
-set g_pickup_rockets 12
-set g_pickup_rockets_max 50
+set g_pickup_rockets 20
+set g_pickup_rockets_max 60
 set g_pickup_cells 50
 set g_pickup_cells_max 100
 set g_pickup_fuel 25
@@ -111,7 +111,7 @@
 set g_pickup_healthmega_max 200
 set g_pickup_respawntime_short 30
 set g_pickup_respawntime_medium 30
-set g_pickup_respawntime_long 35
+set g_pickup_respawntime_long 30
 set g_pickup_respawntime_powerup 90
 set g_pickup_respawntime_weapon 5
 set g_pickup_respawntime_ammo 30
@@ -242,18 +242,18 @@
 set g_balance_shotgun_primary_bullets 16
 set g_balance_shotgun_primary_damage 7
 set g_balance_shotgun_primary_force 20
-set g_balance_shotgun_primary_spread 0.2
+set g_balance_shotgun_primary_spread 0.18
 set g_balance_shotgun_primary_refire 1
 set g_balance_shotgun_primary_animtime 1
 set g_balance_shotgun_primary_ammo 2
 set g_balance_shotgun_primary_speed 12000
 set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
 set g_balance_shotgun_secondary_bullets 16
-set g_balance_shotgun_secondary_damage 5
+set g_balance_shotgun_secondary_damage 2
 set g_balance_shotgun_secondary_force 20
-set g_balance_shotgun_secondary_spread 0.4
-set g_balance_shotgun_secondary_refire 2
-set g_balance_shotgun_secondary_animtime 0.5
+set g_balance_shotgun_secondary_spread 0.25
+set g_balance_shotgun_secondary_refire 1.5
+set g_balance_shotgun_secondary_animtime 0.2
 set g_balance_shotgun_secondary_ammo 1
 set g_balance_shotgun_secondary_speed 12000
 set g_balance_shotgun_secondary_bulletconstant 75 // 3.8qu
@@ -274,23 +274,23 @@
 //   }}}
 //   {{{ mortar
 set g_balance_grenadelauncher_primary_damage 45
-set g_balance_grenadelauncher_primary_edgedamage 35
+set g_balance_grenadelauncher_primary_edgedamage 10
 set g_balance_grenadelauncher_primary_force 250
 set g_balance_grenadelauncher_primary_radius 140
 set g_balance_grenadelauncher_primary_speed 2000
 set g_balance_grenadelauncher_primary_speed_up 200
-set g_balance_grenadelauncher_primary_lifetime 30
+set g_balance_grenadelauncher_primary_lifetime 3
 set g_balance_grenadelauncher_primary_refire 0.8
-set g_balance_grenadelauncher_primary_animtime 0.8
+set g_balance_grenadelauncher_primary_animtime 0.7
 set g_balance_grenadelauncher_primary_ammo 2
-set g_balance_grenadelauncher_secondary_damage 40
-set g_balance_grenadelauncher_secondary_edgedamage 35
+set g_balance_grenadelauncher_secondary_damage 50
+set g_balance_grenadelauncher_secondary_edgedamage 10
 set g_balance_grenadelauncher_secondary_force 250
 set g_balance_grenadelauncher_secondary_radius 200
-set g_balance_grenadelauncher_secondary_speed 800
+set g_balance_grenadelauncher_secondary_speed 1000
 set g_balance_grenadelauncher_secondary_speed_up 0
-set g_balance_grenadelauncher_secondary_lifetime 1.6
-set g_balance_grenadelauncher_secondary_refire 0.7
+set g_balance_grenadelauncher_secondary_lifetime 2
+set g_balance_grenadelauncher_secondary_refire 0.8
 set g_balance_grenadelauncher_secondary_animtime 0.7
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 70
@@ -303,13 +303,13 @@
 set g_balance_electro_primary_radius 90
 set g_balance_electro_primary_comboradius 150
 set g_balance_electro_primary_speed 2000
-set g_balance_electro_primary_lifetime 0.5
-set g_balance_electro_primary_refire 1
-set g_balance_electro_primary_animtime 1
+set g_balance_electro_primary_lifetime 3
+set g_balance_electro_primary_refire 0.7
+set g_balance_electro_primary_animtime 0.7
 set g_balance_electro_primary_ammo 2
-set g_balance_electro_secondary_damage 30
+set g_balance_electro_secondary_damage 40
 set g_balance_electro_secondary_spread 0.20
-set g_balance_electro_secondary_edgedamage 0
+set g_balance_electro_secondary_edgedamage 10
 set g_balance_electro_secondary_force 100
 set g_balance_electro_secondary_radius 150
 set g_balance_electro_secondary_speed 900
@@ -321,7 +321,7 @@
 set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 5
 set g_balance_electro_secondary_damageforcescale 4
-set g_balance_electro_secondary_count 5
+set g_balance_electro_secondary_count 3
 set g_balance_electro_combo_damage 50
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 100
@@ -357,7 +357,7 @@
 set g_balance_crylink_secondary_speed 3000
 set g_balance_crylink_secondary_spread 0.02
 set g_balance_crylink_secondary_shots 3
-set g_balance_crylink_secondary_bounces 0
+set g_balance_crylink_secondary_bounces 1
 set g_balance_crylink_secondary_refire 0.1
 set g_balance_crylink_secondary_animtime 0.1
 set g_balance_crylink_secondary_ammo 1.5
@@ -369,10 +369,10 @@
 set g_balance_crylink_secondary_line_fadetime 2
 //   }}}
 //   {{{ nex
-set g_balance_nex_damage 90
+set g_balance_nex_damage 100
 set g_balance_nex_force 200
-set g_balance_nex_refire 1.5
-set g_balance_nex_animtime 1.5
+set g_balance_nex_refire 1.25
+set g_balance_nex_animtime 1
 set g_balance_nex_ammo 5
 set g_balance_nex_damagefalloff_mindist 1000
 set g_balance_nex_damagefalloff_maxdist 3000
@@ -385,16 +385,16 @@
 set g_balance_minstanex_ammo 10
 //   }}}
 //   {{{ hagar
-set g_balance_hagar_primary_damage 15
-set g_balance_hagar_primary_edgedamage 10
-set g_balance_hagar_primary_force 65
+set g_balance_hagar_primary_damage 10
+set g_balance_hagar_primary_edgedamage 5
+set g_balance_hagar_primary_force 70
 set g_balance_hagar_primary_radius 90
 set g_balance_hagar_primary_spread 0
 set g_balance_hagar_primary_speed 2000
-set g_balance_hagar_primary_lifetime 30
+set g_balance_hagar_primary_lifetime 3
 set g_balance_hagar_primary_refire 0.1
-set g_balance_hagar_primary_ammo 0.5
-set g_balance_hagar_secondary_damage 15
+set g_balance_hagar_primary_ammo 1
+set g_balance_hagar_secondary_damage 10
 set g_balance_hagar_secondary_edgedamage 10
 set g_balance_hagar_secondary_force 60
 set g_balance_hagar_secondary_radius 70
@@ -403,18 +403,18 @@
 set g_balance_hagar_secondary_lifetime_min 0.1
 set g_balance_hagar_secondary_lifetime_rand 0.05
 set g_balance_hagar_secondary_refire 0.1
-set g_balance_hagar_secondary_ammo 0.5
+set g_balance_hagar_secondary_ammo 1
 //   }}}
 //   {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 70
-set g_balance_rocketlauncher_edgedamage 40
-set g_balance_rocketlauncher_force 375
+set g_balance_rocketlauncher_damage 90
+set g_balance_rocketlauncher_edgedamage 50
+set g_balance_rocketlauncher_force 400
 set g_balance_rocketlauncher_radius 120
 set g_balance_rocketlauncher_speed 1000
 set g_balance_rocketlauncher_speedaccel 0
 set g_balance_rocketlauncher_speedstart 1000
-set g_balance_rocketlauncher_lifetime 30
-set g_balance_rocketlauncher_refire 0.8
+set g_balance_rocketlauncher_lifetime 3
+set g_balance_rocketlauncher_refire 1
 set g_balance_rocketlauncher_animtime 0.8
 set g_balance_rocketlauncher_ammo 3
 set g_balance_rocketlauncher_health 40
@@ -450,7 +450,7 @@
 set g_balance_hook_secondary_radius 500 // LOTS
 set g_balance_hook_secondary_force -2000 // LOTS
 set g_balance_hook_secondary_ammo 50 // a whole pack
-set g_balance_hook_secondary_lifetime 30 // infinite
+set g_balance_hook_secondary_lifetime 10 // infinite
 set g_balance_hook_secondary_speed 0 // not much throwing
 set g_balance_hook_secondary_gravity 5 // fast falling
 set g_balance_hook_secondary_refire 3 // don't drop too many bombs...

Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc	2009-10-21 19:14:59 UTC (rev 8166)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc	2009-10-22 09:03:33 UTC (rev 8167)
@@ -2675,6 +2675,7 @@
 		case MOVETYPE_FLYMISSILE:
 		case MOVETYPE_BOUNCE:
 		case MOVETYPE_BOUNCEMISSILE:
+		case MOVETYPE_PHYSICS:
 			break;
 		default:
 			draggee.velocity = '0 0 0';

Modified: branches/nexuiz-2.0/data/qcsrc/server/extensions.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/extensions.qh	2009-10-21 19:14:59 UTC (rev 8166)
+++ branches/nexuiz-2.0/data/qcsrc/server/extensions.qh	2009-10-22 09:03:33 UTC (rev 8167)
@@ -244,6 +244,14 @@
 //description:
 //customizable glowing light effect on the entity, glow_color is a paletted (8bit) color in the range 0-255 (note: 0 and 254 are white), glow_size is 0 or higher (up to the engine what limit to cap it to, darkplaces imposes a 1020 limit), if glow_trail is true it will leave a trail of particles of the same color as the light.
 
+//DP_ENT_GLOWMOD
+//idea: LordHavoc
+//darkplaces implementation: LordHavoc
+//field definition:
+.vector glowmod;
+//description:
+//controls color of the entity's glow texture (fullbrights), '0 0 0', is forced to be '1 1 1' (otherwise everything would be black), used for tinting objects, see colormod (same color restrictions apply).
+
 //DP_ENT_LOWPRECISION
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
@@ -1014,6 +1022,12 @@
 //if 1 is returned by uri_get, the callback will be called in the future
 float(string url, float id) uri_get = #513;
 
+//DP_SKELETONOBJECTS
+//idea: LordHavoc
+//darkplaces implementation: LordHavoc
+//description:
+//this extension indicates that FTE_CSQC_SKELETONOBJECTS functionality is available in server QC (as well as CSQC).
+
 //DP_SV_SPAWNFUNC_PREFIX
 //idea: div0
 //darkplaces implementation: div0
@@ -1717,7 +1731,7 @@
 void(float fhandle, string s, ...) fputs = #113; // writes a line of text to the end of the file
 float(string s) strlen = #114; // returns how many characters are in a string
 string(string s1, string s2, ...) strcat = #115; // concatenates two or more strings (for example "abc", "def" would return "abcdef") and returns as a tempstring
-string(string s, float start, float length) substring = #116; // returns a section of a string as a tempstring
+string(string s, float start, float length) substring = #116; // returns a section of a string as a tempstring - see FTE_STRINGS for enhanced version
 vector(string s) stov = #117; // returns vector value from a string
 string(string s, ...) strzone = #118; // makes a copy of a string into the string zone and returns it, this is often used to keep around a tempstring for longer periods of time (tempstrings are replaced often)
 void(string s) strunzone = #119; // removes a copy of a string from the string zone (you can not use that string again or it may crash!!!)
@@ -1732,7 +1746,191 @@
 //
 //NOTE: strzone functionality is partially superseded by
 //DP_QC_UNLIMITEDTEMPSTRINGS when longterm storage is not needed
+//NOTE: substring is upgraded by FTE_STRINGS extension with negative start/length handling identical to php 5.2.0
 
+//FTE_CSQC_SKELETONOBJECTS
+//idea: Spike, LordHavoc
+//darkplaces implementation: LordHavoc
+//builtin definitions:
+float(float modlindex) skel_create = #263; // create a skeleton (be sure to assign this value into .skeletonindex for use), returns skeleton index (1 or higher) on success, returns 0 on failure  (for example if the modelindex is not skeletal), it is recommended that you create a new skeleton if you change modelindex.
+float(float skel, entity ent, float modlindex, float retainfrac, float firstbone, float lastbone) skel_build = #264; // blend in a percentage of standard animation, 0 replaces entirely, 1 does nothing, 0.5 blends half, etc, and this only alters the bones in the specified range for which out of bounds values like 0,100000 are safe (uses .frame, .frame2, .frame3, .frame4, .lerpfrac, .lerpfrac3, .lerpfrac4, .frame1time, .frame2time, .frame3time, .frame4time), returns skel on success, 0 on failure
+float(float skel) skel_get_numbones = #265; // returns how many bones exist in the created skeleton
+string(float skel, float bonenum) skel_get_bonename = #266; // returns name of bone (as a tempstring)
+float(float skel, float bonenum) skel_get_boneparent = #267; // returns parent num for supplied bonenum, -1 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
+float(float skel, string tagname) skel_find_bone = #268; // get number of bone with specified name, 0 on failure, tagindex (bonenum+1) on success, same as using gettagindex on the modelindex
+vector(float skel, float bonenum) skel_get_bonerel = #269; // get matrix of bone in skeleton relative to its parent - sets v_forward, v_right, v_up, returns origin (relative to parent bone)
+vector(float skel, float bonenum) skel_get_boneabs = #270; // get matrix of bone in skeleton in model space - sets v_forward, v_right, v_up, returns origin (relative to entity)
+void(float skel, float bonenum, vector org) skel_set_bone = #271; // set matrix of bone relative to its parent, reads v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
+void(float skel, float bonenum, vector org) skel_mul_bone = #272; // transform bone matrix (relative to its parent) by the supplied matrix in v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
+void(float skel, float startbone, float endbone, vector org) skel_mul_bones = #273; // transform bone matrices (relative to their parents) by the supplied matrix in v_forward, v_right, v_up, takes origin as parameter (relative to parent bones)
+void(float skeldst, float skelsrc, float startbone, float endbone) skel_copybones = #274; // copy bone matrices (relative to their parents) from one skeleton to another, useful for copying a skeleton to a corpse
+void(float skel) skel_delete = #275; // deletes skeleton at the beginning of the next frame (you can add the entity, delete the skeleton, renderscene, and it will still work)
+float(float modlindex, string framename) frameforname = #276; // finds number of a specified frame in the animation, returns -1 if no match found
+float(float modlindex, float framenum) frameduration = #277; // returns the intended play time (in seconds) of the specified framegroup, if it does not exist the result is 0, if it is a single frame it may be a small value around 0.1 or 0.
+//fields:
+.float skeletonindex; // active skeleton overriding standard animation on model
+.float frame; // primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
+.float frame2; // secondary framegroup animation (strength = lerpfrac)
+.float frame3; // tertiary framegroup animation (strength = lerpfrac3)
+.float frame4; // quaternary framegroup animation (strength = lerpfrac4)
+.float lerpfrac; // strength of framegroup blend
+.float lerpfrac3; // strength of framegroup blend
+.float lerpfrac4; // strength of framegroup blend
+.float frame1time; // start time of framegroup animation
+.float frame2time; // start time of framegroup animation
+.float frame3time; // start time of framegroup animation
+.float frame4time; // start time of framegroup animation
+//description:
+//this extension provides a way to do complex skeletal animation on an entity.
+//
+//see also DP_SKELETONOBJECTS (this extension implemented on server as well as client)
+//
+//notes:
+//each model contains its own skeleton, reusing a skeleton with incompatible models will yield garbage (or not render).
+//each model contains its own animation data, you can use animations from other model files (for example saving out all character animations as separate model files).
+//if an engine supports loading an animation-only file format such as .md5anim in FTEQW, it can be used to animate any model with a compatible skeleton.
+//proper use of this extension may require understanding matrix transforms (v_forward, v_right, v_up, origin), and you must keep in mind that v_right is negative for this purpose.
+//
+//features include:
+//multiple animations blended together.
+//animating a model with animations from another model with a compatible skeleton.
+//restricting animation blends to certain bones of a model - for example independent animation of legs, torso, head.
+//custom bone controllers - for example making eyes track a target location.
+//
+//
+//
+//example code follows...
+//
+//this helper function lets you identify (by parentage) what group a bone
+//belongs to - for example "torso", "leftarm", would return 1 ("torso") for
+//all children of the bone named "torso", unless they are children of
+//"leftarm" (which is a child of "torso") which would return 2 instead...
+float(float skel, float bonenum, string g1, string g2, string g3, string g4, string g5, string g6) example_skel_findbonegroup =
+{
+	local string bonename;
+	while (bonenum >= 0)
+	{
+		bonename = skel_get_bonename(skel, bonenum);
+		if (bonename == g1) return 1;
+		if (bonename == g2) return 2;
+		if (bonename == g3) return 3;
+		if (bonename == g4) return 4;
+		if (bonename == g5) return 5;
+		if (bonename == g6) return 6;
+		bonenum = skel_get_boneparent(skel, bonenum);
+	}
+	return 0;
+};
+// create a skeletonindex for our player using current modelindex
+void() example_skel_player_setup =
+{
+	self.skeletonindex = skel_create(self.modelindex);
+};
+// setup bones of skeleton based on an animation
+// note: animmodelindex can be a different model than self.modelindex
+void(float animmodelindex, float framegroup, float framegroupstarttime) example_skel_player_update_begin =
+{
+	// start with our standard animation
+	self.frame = framegroup;
+	self.frame2 = 0;
+	self.frame3 = 0;
+	self.frame4 = 0;
+	self.frame1time = framegroupstarttime;
+	self.frame2time = 0;
+	self.frame3time = 0;
+	self.frame4time = 0;
+	self.lerpfrac = 0;
+	self.lerpfrac3 = 0;
+	self.lerpfrac4 = 0;
+	skel_build(self.skeletonindex, self, animmodelindex, 0, 0, 100000);
+};
+// apply a different framegroup animation to bones with a specified parent
+void(float animmodelindex, float framegroup, float framegroupstarttime, float blendalpha, string groupbonename, string excludegroupname1, string excludegroupname2) example_skel_player_update_applyoverride =
+{
+	local float bonenum;
+	local float numbones;
+	self.frame = framegroup;
+	self.frame2 = 0;
+	self.frame3 = 0;
+	self.frame4 = 0;
+	self.frame1time = framegroupstarttime;
+	self.frame2time = 0;
+	self.frame3time = 0;
+	self.frame4time = 0;
+	self.lerpfrac = 0;
+	self.lerpfrac3 = 0;
+	self.lerpfrac4 = 0;
+	bonenum = 0;
+	numbones = skel_get_numbones(self.skeletonindex);
+	while (bonenum < numbones)
+	{
+		if (example_skel_findbonegroup(self.skeletonindex, bonenum, groupbonename, excludegroupname1, excludegroupname2, "", "", "") == 1)
+			skel_build(self.skeletonindex, self, animmodelindex, 1 - blendalpha, bonenum, bonenum + 1);
+		bonenum = bonenum + 1;
+	}
+};
+// make eyes point at a target location, be sure v_forward, v_right, v_up are set correctly before calling
+void(vector eyetarget, string bonename) example_skel_player_update_eyetarget =
+{
+	local float bonenum;
+	local vector ang;
+	local vector oldforward, oldright, oldup;
+	local vector relforward, relright, relup, relorg;
+	local vector boneforward, boneright, boneup, boneorg;
+	local vector parentforward, parentright, parentup, parentorg;
+	local vector u, v;
+	local vector modeleyetarget;
+	bonenum = skel_find_bone(self.skeletonindex, bonename) - 1;
+	if (bonenum < 0)
+		return;
+	oldforward = v_forward;
+	oldright = v_right;
+	oldup = v_up;
+	v = eyetarget - self.origin;
+	modeleyetarget_x =   v * v_forward;
+	modeleyetarget_y = 0-v * v_right;
+	modeleyetarget_z =   v * v_up;
+	// this is an eyeball, make it point at the target location
+	// first get all the data we can...
+	relorg = skel_get_bonerel(self.skeletonindex, bonenum);
+	relforward = v_forward;
+	relright = v_right;
+	relup = v_up;
+	boneorg = skel_get_boneabs(self.skeletonindex, bonenum);
+	boneforward = v_forward;
+	boneright = v_right;
+	boneup = v_up;
+	parentorg = skel_get_boneabs(self.skeletonindex, skel_get_boneparent(self.skeletonindex, bonenum));
+	parentforward = v_forward;
+	parentright = v_right;
+	parentup = v_up;
+	// get the vector from the eyeball to the target
+	u = modeleyetarget - boneorg;
+	// now transform it inversely by the parent matrix to produce new rel vectors
+	v_x = u * parentforward;
+	v_y = u * parentright;
+	v_z = u * parentup;
+	ang = vectoangles2(v, relup);
+	ang_x = 0 - ang_x;
+	makevectors(ang);
+	// set the relative bone matrix
+	skel_set_bone(self.skeletonindex, bonenum, relorg);
+	// restore caller's v_ vectors
+	v_forward = oldforward;
+	v_right = oldright;
+	v_up = oldup;
+};
+// delete skeleton when we're done with it
+// note: skeleton remains valid until next frame when it is really deleted
+void() example_skel_player_delete =
+{
+	skel_delete(self.skeletonindex);
+	self.skeletonindex = 0;
+};
+//
+// END OF EXAMPLES FOR FTE_CSQC_SKELETONOBJECTS
+//
+
 //KRIMZON_SV_PARSECLIENTCOMMAND
 //idea: KrimZon
 //darkplaces implementation: KrimZon, LordHavoc
@@ -1838,18 +2036,31 @@
 //FTE_STRINGS
 //idea: many
 //darkplaces implementation: KrimZon
+//builtin definitions:
+float(string str, string sub, float startpos) strstrofs = #221; // returns the offset into a string of the matching text, or -1 if not found, case sensitive
+float(string str, float ofs) str2chr = #222; // returns the character at the specified offset as an integer, or 0 if an invalid index, or byte value - 256 if the engine supports UTF8 and the byte is part of an extended character
+string(float c, ...) chr2str = #223; // returns a string representing the character given, if the engine supports UTF8 this may be a multi-byte sequence (length may be more than 1) for characters over 127.
+string(float ccase, float calpha, float cnum, string s, ...) strconv = #224; // reformat a string with special color characters in the font, DO NOT USE THIS ON UTF8 ENGINES (if you are lucky they will emit ^4 and such color codes instead), the parameter values are 0=same/1=lower/2=upper for ccase, 0=same/1=white/2=red/5=alternate/6=alternate-alternate for redalpha, 0=same/1=white/2=red/3=redspecial/4=whitespecial/5=alternate/6=alternate-alternate for rednum.
+string(float chars, string s, ...) strpad = #225; // pad string with spaces to a specified length, < 0 = left padding, > 0 = right padding
+string(string info, string key, string value, ...) infoadd = #226; // sets or adds a key/value pair to an infostring - note: forbidden characters are \ and "
+string(string info, string key) infoget = #227; // gets a key/value pair in an infostring, returns value or null if not found
+float(string s1, string s2, float len) strncmp = #228; // compare two strings up to the specified number of characters, if their length differs and is within the specified limit the result will be negative, otherwise it is the difference in value of their first non-matching character.
+float(string s1, string s2) strcasecmp = #229; // compare two strings with case-insensitive matching, characters a-z are considered equivalent to the matching A-Z character, no other differences, and this does not consider special characters equal even if they look similar
+float(string s1, string s2, float len) strncasecmp = #230; // same as strcasecmp but with a length limit, see strncmp
+//string(string s, float start, float length) substring = #116; // see note below
 //description:
 //various string manipulation functions
-float(string str, string sub, float startpos) strstrofs = #221;
-float(string str, float ofs) str2chr = #222;
-string(float c, ...) chr2str = #223;
-string(float ccase, float calpha, float cnum, string s, ...) strconv = #224;
-string(float chars, string s, ...) strpad = #225;
-string(string info, string key, string value, ...) infoadd = #226;
-string(string info, string key) infoget = #227;
-float(string s1, string s2, float len) strncmp = #228;
-float(string s1, string s2) strcasecmp = #229;
-float(string s1, string s2, float len) strncasecmp = #230;
+//note: substring also exists in FRIK_FILE but this extension adds negative start and length as valid cases (see note above), substring is consistent with the php 5.2.0 substr function (not 5.2.3 behavior)
+//substring returns a section of a string as a tempstring, if given negative
+// start the start is measured back from the end of the string, if given a
+// negative length the length is the offset back from the end of the string to
+// stop at, rather than being relative to start, if start is negative and
+// larger than length it is treated as 0.
+// examples of substring:
+// substring("blah", -3, 3) returns "lah"
+// substring("blah", 3, 3) returns "h"
+// substring("blah", -10, 3) returns "bla"
+// substring("blah", -10, -3) returns "b"
 
 //DP_CON_BESTWEAPON
 //idea: many
@@ -1936,3 +2147,16 @@
 //
 //Note: it is worth considering that network-related functions may be called during the pause (including customizeentityforclient for example), and it is also important to consider the continued use of the KRIMZON_SV_PARSECLIENTCOMMAND extension while paused (chatting players, etc), players may also join/leave during the pause.  In other words, the only things that are not called are think and other time-related functions.
 
+
+
+
+
+
+
+//DP_PHYSICS
+float SOLID_PHYSICS_BOX = 32;
+float SOLID_PHYSICS_SPHERE = 33;
+float SOLID_PHYSICS_CAPSULE = 34;
+float MOVETYPE_PHYSICS = 32;
+.float mass;
+.float jointtype; // TO BE DOCUMENTED

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc	2009-10-21 19:14:59 UTC (rev 8166)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc	2009-10-22 09:03:33 UTC (rev 8167)
@@ -1419,8 +1419,12 @@
 		return;
 	}
 
-	if(self.spawnflags & 1)
+	if(self.jointtype)
 	{
+		// already done :P entity must stay
+	}
+	else if(self.spawnflags & 1)
+	{
 		// attach
 		if(self.spawnflags & 2)
 		{
@@ -1430,6 +1434,8 @@
 		{
 			attach_sameorigin(dst, src, self.message);
 		}
+
+		remove(self);
 	}
 	else
 	{
@@ -1445,9 +1451,9 @@
 		{
 			follow_sameorigin(dst, src);
 		}
+
+		remove(self);
 	}
-
-	remove(self);
 }
 
 void spawnfunc_misc_follow()

Modified: branches/nexuiz-2.0/data/qcsrc/server/movelib.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/movelib.qc	2009-10-21 19:14:59 UTC (rev 8166)
+++ branches/nexuiz-2.0/data/qcsrc/server/movelib.qc	2009-10-22 09:03:33 UTC (rev 8167)
@@ -53,7 +53,7 @@
 }
 
 .float  movelib_lastupdate;
-void movelib_move(vector force,float max_velocity,float drag,float mass,float breakforce)
+void movelib_move(vector force,float max_velocity,float drag,float theMass,float breakforce)
 {
     float deltatime;
     float acceleration;
@@ -67,8 +67,8 @@
 
     mspeed = vlen(self.velocity);
 
-    if (mass)
-        acceleration = vlen(force) / mass;
+    if (theMass)
+        acceleration = vlen(force) / theMass;
     else
         acceleration = vlen(force);
 
@@ -76,7 +76,7 @@
     {
         if (breakforce)
         {
-            breakvec = (normalize(self.velocity) * (breakforce / mass) * deltatime);
+            breakvec = (normalize(self.velocity) * (breakforce / theMass) * deltatime);
             self.velocity = self.velocity - breakvec;
         }
 
@@ -102,7 +102,7 @@
 }
 
 /*
-.float mass;
+.float theMass;
 .float side_friction;
 .float ground_friction;
 .float air_friction;
@@ -137,9 +137,9 @@
     old_speed    = vlen(self.velocity);
     old_dir      = normalize(self.velocity);
 
-    //ggravity      =  (sv_gravity / self.mass) * '0 0 100';
-    acceleration =  (force / self.mass) * dir;
-    //acceleration -= old_dir * (old_speed / self.mass);
+    //ggravity      =  (sv_gravity / self.theMass) * '0 0 100';
+    acceleration =  (force / self.theMass) * dir;
+    //acceleration -= old_dir * (old_speed / self.theMass);
     acceleration -= ggravity;
 
     if(self.waterlevel > 1)

Copied: branches/nexuiz-2.0/server/rcon2irc/bans.pl (from rev 8166, trunk/server/rcon2irc/bans.pl)
===================================================================
--- branches/nexuiz-2.0/server/rcon2irc/bans.pl	                        (rev 0)
+++ branches/nexuiz-2.0/server/rcon2irc/bans.pl	2009-10-22 09:03:33 UTC (rev 8167)
@@ -0,0 +1,32 @@
+# Nexuiz rcon2irc plugin by Merlijn Hofstra licensed under GPL - bans.pl
+# Place this file inside the same directory as rcon2irc.pl and add the full filename to the plugins.
+
+$store{plugin_bans}->{interval} = 300; #interval to displays bans
+
+sub out ($$@);
+sub schedule($$);
+
+schedule sub {
+	my ($timer) = @_;
+	if ($store{plugin_bans}->{attempts}) {
+		foreach (sort keys %{ $store{plugin_bans}->{attempts} }) {
+			out irc => 0, "PRIVMSG $config{irc_channel} :\00305* banned client\017 \00304$_\017 was refused to connect \00304" .
+				$store{plugin_bans}->{attempts}->{$_} . "\017 times";
+		}
+		$store{plugin_bans}->{attempts} = undef;
+	}
+	schedule $timer => $store{plugin_bans}->{interval};;
+} => 1;
+
+[ dp => q{(?:\^\d)?NOTE:(?:\^\d)? banned client (\d+\.\d+\.\d+\.\d+) just tried to enter} => sub {
+	my ($ip) = @_;
+	$store{plugin_bans}->{attempts}->{$ip} += 1;
+	return 0;
+} ],
+
+[ dp => q{(?:\^\d)?NOTE:(?:\^\d)? banned client (.*) has to go} => sub {
+	my ($name) = @_;
+	$name = color_dp2irc $name;
+	out irc => 0, "PRIVMSG $config{irc_channel} :\00305* banned client\017 $name\017 was removed from the server";
+	return 0;
+} ],

Modified: branches/nexuiz-2.0/server/rcon2irc/echo-rcon.pl
===================================================================
--- branches/nexuiz-2.0/server/rcon2irc/echo-rcon.pl	2009-10-21 19:14:59 UTC (rev 8166)
+++ branches/nexuiz-2.0/server/rcon2irc/echo-rcon.pl	2009-10-22 09:03:33 UTC (rev 8167)
@@ -5,8 +5,15 @@
 
 [ dp => q{server received rcon command from (.*):  (.*)} => sub {
 	my ($origin, $cmd) = @_;
-	return 0 if ($origin eq $config{dp_listen}); #do not relay rcon2irc commands
+	my @dests = split ' ', $store{plugin_echo-rcon}->{dest};
+	return 0 if grep { $_ eq $origin } @dests; #do not relay rcon2irc commands
 	my $origin = color_dp2irc $origin;
 	out irc => 0, "PRIVMSG $config{irc_channel} :\00302* admin\017 command recieved from $origin: \00304$cmd\017";
 	return 0;
 } ],
+
+[ dp => q{"log_dest_udp" is "([^"]*)" \["[^"]*"\]} => sub {
+	my ($dest) = @_;
+	$store{plugin_echo-rcon}->{dest} = $dest;
+	return 0;
+} ],



More information about the nexuiz-commits mailing list