r5751 - in branches/nexuiz-2.0: . data data/maps data/qcsrc/server data/qcsrc/server/tturrets/system
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Feb 4 16:31:51 EST 2009
Author: div0
Date: 2009-02-04 16:31:51 -0500 (Wed, 04 Feb 2009)
New Revision: 5751
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/maps/racetrack.mapinfo
branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc
branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
branches/nexuiz-2.0/data/qcsrc/server/tturrets/system/system_damage.qc
branches/nexuiz-2.0/data/qcsrc/server/tturrets/system/system_main.qc
branches/nexuiz-2.0/data/weapons.cfg
branches/nexuiz-2.0/data/weaponsHavoc.cfg
Log:
r5746 | div0 | 2009-02-04 15:42:41 +0100 (Wed, 04 Feb 2009) | 2 lines
remove the shotgun from race
r5747 | div0 | 2009-02-04 15:43:22 +0100 (Wed, 04 Feb 2009) | 2 lines
don't need this in racetrack.mapinfo any more
r5748 | div0 | 2009-02-04 15:47:15 +0100 (Wed, 04 Feb 2009) | 2 lines
if possible, redirect off-hand hook to on-hand hook
r5749 | tzork | 2009-02-04 17:20:06 +0100 (Wed, 04 Feb 2009) | 1 line
make turret head's hittable (with separate .heath's for body and head)
r5750 | div0 | 2009-02-04 22:01:27 +0100 (Wed, 04 Feb 2009) | 2 lines
don't cull DamageInfo csqc entities (hope this has no big performance impact)
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-02-04 21:01:27 UTC (rev 5750)
+++ branches/nexuiz-2.0/.patchsets 2009-02-04 21:31:51 UTC (rev 5751)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-5744
+revisions_applied = 1-5750
Modified: branches/nexuiz-2.0/data/maps/racetrack.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/racetrack.mapinfo 2009-02-04 21:01:27 UTC (rev 5750)
+++ branches/nexuiz-2.0/data/maps/racetrack.mapinfo 2009-02-04 21:31:51 UTC (rev 5751)
@@ -5,5 +5,4 @@
_spawnpoints 0
has weapons
type race 5 20 15
-settemp_for_type race g_start_weapon_shotgun 0
cdtrack dn-refueled.xm
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc 2009-02-04 21:01:27 UTC (rev 5750)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc 2009-02-04 21:31:51 UTC (rev 5751)
@@ -35,7 +35,7 @@
e.oldorigin_x = compressShortVector(e.velocity);
- Net_LinkEntity(e, TRUE, 0.2, Damage_DamageInfo_SendEntity);
+ Net_LinkEntity(e, FALSE, 0.2, Damage_DamageInfo_SendEntity);
}
#define DAMAGE_CENTERPRINT_SPACER NEWLINES
Modified: branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc 2009-02-04 21:01:27 UTC (rev 5750)
+++ branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc 2009-02-04 21:31:51 UTC (rev 5751)
@@ -863,8 +863,23 @@
e = get_weaponinfo(i);
if(!(e.weapon))
continue;
- if(((e.spawnflags & WEPSPAWNFLAG_NORMAL) && g_lms) || cvar(strcat("g_start_weapon_", e.netname)))
+
+ t = cvar(strcat("g_start_weapon_", e.netname));
+
+ if(t < 0) // "default" weapon selection
{
+ if(g_lms)
+ t = (e.spawnflags & WEPSPAWNFLAG_NORMAL);
+ else if(g_race)
+ t = (i == WEP_LASER);
+ else
+ t = (i == WEP_LASER || i == WEP_SHOTGUN);
+ if(g_grappling_hook) // if possible, redirect off-hand hook to on-hand hook
+ t += (i == WEP_HOOK);
+ }
+
+ if(t)
+ {
start_weapons |= e.weapons;
weapon_action(e.weapon, WR_PRECACHE);
}
@@ -909,10 +924,10 @@
}
}
- if(g_grappling_hook) // offhand hook
+ if(start_weapons & WEPBIT_HOOK)
{
- start_weapons &~= WEPBIT_HOOK;
- warmup_start_weapons &~= WEPBIT_HOOK;
+ // can't have off-hand hook, if hook weapon is enabled
+ g_grappling_hook = 0;
}
if(g_weapon_stay == 2)
Modified: branches/nexuiz-2.0/data/qcsrc/server/tturrets/system/system_damage.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/tturrets/system/system_damage.qc 2009-02-04 21:01:27 UTC (rev 5750)
+++ branches/nexuiz-2.0/data/qcsrc/server/tturrets/system/system_damage.qc 2009-02-04 21:31:51 UTC (rev 5751)
@@ -258,6 +258,8 @@
self.tur_head.avelocity = self.avelocity;
self.tur_head.angles = self.idle_aim;
self.health = self.tur_health;
+ self.tur_head.health = self.tur_health;
+
self.enemy = world;
self.volly_counter = self.shot_volly;
self.ammo = self.ammo_max;
@@ -275,30 +277,34 @@
*/
void turret_stdproc_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce)
{
- entity baseent,oldself;
+ entity baseent;
- if (self.health <= 0) return;
+ // Damage func is shared on all parts as standard, we need to know what the master entity of this turret is.
- // Damage func is shared on all parts as standard, we need to know what the master entity of this turret is.
if (self.owner)
baseent = self.owner;
else
baseent = self;
- oldself = self;
- self = baseent;
+ //oldself = self;
+ //self = baseent;
+
+ if (self.health <= 0) return;
+
if (teamplay != 0)
if (self.team == attacker.team)
{
// This does not happen anymore. Re-enable if you fix that.
//if(attacker.flags & FL_CLIENT)
+ if(clienttype(attacker) == CLIENTTYPE_REAL)
+ sprint(attacker, "\{1}Turret tells you: I'm on your team!\n");
//if not(attacker.isbot)
- //sprint(attacker, "\{1}Turret tells you: I'm on your team!\n");
+
if(cvar("g_friendlyfire"))
{
- self = oldself;
+ //self = oldself;
return;
}
else
@@ -310,7 +316,7 @@
self.health = self.health - damage;
// thorw head slightly off aim when hit?
- if (oldself.classname == "turret_head")
+ if (self.classname == "turret_head")
if (self.damage_flags & TFL_DMG_HEADSHAKE)
self.tur_head.angles = self.tur_head.angles + randomvec() * damage;
@@ -319,11 +325,11 @@
// Start burning when we have 10% or less health left
if (self.health < (self.tur_health * 0.1))
- self.tur_head.effects = EF_FLAME;
+ self.effects = EF_FLAME;
- self = oldself;
+ // self = oldself;
- if (baseent.health <= 0)
+ if (self.health <= 0)
{
baseent.event_damage = SUB_Null;
baseent.tur_head.event_damage = SUB_Null;
@@ -335,6 +341,7 @@
+
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/tturrets/system/system_main.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/tturrets/system/system_main.qc 2009-02-04 21:01:27 UTC (rev 5750)
+++ branches/nexuiz-2.0/data/qcsrc/server/tturrets/system/system_main.qc 2009-02-04 21:31:51 UTC (rev 5751)
@@ -955,7 +955,7 @@
// Spawn extra bits
self.tur_head = spawn();
- self.tur_head.netname = self.tur_head.classname = "turret_head";
+ self.tur_head.netname = self.tur_head.classname = "turret_head";
self.tur_head.team = self.team;
// Defend mode?
@@ -970,7 +970,7 @@
}
// Claim ownership
- self.tur_head.owner = self;
+ self.tur_head.owner = self;
// Put pices in place
@@ -987,8 +987,10 @@
self.tur_head.angles = self.idle_aim;
if (!self.health) self.health = 150;
- self.tur_health = self.health;
+ self.tur_health = self.health;
+ self.tur_head.health = self.health;
+
//Solid bbox for preformance reasons
self.solid = SOLID_BBOX;
self.tur_head.solid = SOLID_BBOX;
@@ -1015,7 +1017,7 @@
self.turret_postthink = turret_stdproc_nothing;
//self.turret_damagefunc = turret_stdproc_damage;
- self.event_damage = turret_stdproc_damage;
+ //self.event_damage = turret_stdproc_damage;
self.tur_head.event_damage = turret_stdproc_damage;
//self.turret_diefunc = turret_stdproc_die;
Modified: branches/nexuiz-2.0/data/weapons.cfg
===================================================================
--- branches/nexuiz-2.0/data/weapons.cfg 2009-02-04 21:01:27 UTC (rev 5750)
+++ branches/nexuiz-2.0/data/weapons.cfg 2009-02-04 21:31:51 UTC (rev 5751)
@@ -5,22 +5,22 @@
set cvar_check_weapons 2a35f7139825257d468d22354209cf54
-set g_start_weapon_laser 1
-set g_start_weapon_shotgun 1
-set g_start_weapon_uzi 0
-set g_start_weapon_grenadelauncher 0
-set g_start_weapon_electro 0
-set g_start_weapon_crylink 0
-set g_start_weapon_nex 0
-set g_start_weapon_hagar 0
-set g_start_weapon_rocketlauncher 0
-set g_start_weapon_minstanex 0
-set g_start_weapon_porto 0
-set g_start_weapon_hook 0
-set g_start_weapon_hlac 0
-set g_start_weapon_seeker 0
-set g_start_weapon_campingrifle 0
-set g_start_ammo_shells 50
+set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_uzi -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_grenadelauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_electro -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_crylink -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_nex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_hagar -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_rocketlauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_ammo_shells 40
set g_start_ammo_nails 0
set g_start_ammo_rockets 0
set g_start_ammo_cells 0
Modified: branches/nexuiz-2.0/data/weaponsHavoc.cfg
===================================================================
--- branches/nexuiz-2.0/data/weaponsHavoc.cfg 2009-02-04 21:01:27 UTC (rev 5750)
+++ branches/nexuiz-2.0/data/weaponsHavoc.cfg 2009-02-04 21:31:51 UTC (rev 5751)
@@ -1,20 +1,20 @@
set cvar_check_weapons 2a35f7139825257d468d22354209cf54
-set g_start_weapon_laser 1
-set g_start_weapon_shotgun 1
-set g_start_weapon_uzi 0
-set g_start_weapon_grenadelauncher 0
-set g_start_weapon_electro 0
-set g_start_weapon_crylink 0
-set g_start_weapon_nex 0
-set g_start_weapon_hagar 0
-set g_start_weapon_rocketlauncher 0
-set g_start_weapon_minstanex 0
-set g_start_weapon_porto 0
-set g_start_weapon_hook 0
-set g_start_weapon_hlac 0
-set g_start_weapon_seeker 0
-set g_start_weapon_campingrifle 0
+set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_uzi -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_grenadelauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_electro -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_crylink -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_nex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_hagar -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_rocketlauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_ammo_shells 40
set g_start_ammo_nails 0
set g_start_ammo_rockets 0
More information about the nexuiz-commits
mailing list