[nexuiz-commits] r7233 - in trunk/data/qcsrc/server: . tturrets/units
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Jul 17 22:47:28 EDT 2009
Author: mand1nga
Date: 2009-07-17 22:47:28 -0400 (Fri, 17 Jul 2009)
New Revision: 7233
Modified:
trunk/data/qcsrc/server/cl_client.qc
trunk/data/qcsrc/server/cl_impulse.qc
trunk/data/qcsrc/server/func_breakable.qc
trunk/data/qcsrc/server/g_damage.qc
trunk/data/qcsrc/server/tturrets/units/unit_ewheel.qc
trunk/data/qcsrc/server/tturrets/units/unit_flac.qc
trunk/data/qcsrc/server/tturrets/units/unit_hellion.qc
trunk/data/qcsrc/server/tturrets/units/unit_hk.qc
trunk/data/qcsrc/server/tturrets/units/unit_mlrs.qc
trunk/data/qcsrc/server/tturrets/units/unit_plasma.qc
trunk/data/qcsrc/server/tturrets/units/unit_walker.qc
trunk/data/qcsrc/server/w_crylink.qc
trunk/data/qcsrc/server/w_electro.qc
trunk/data/qcsrc/server/w_grenadelauncher.qc
trunk/data/qcsrc/server/w_hagar.qc
trunk/data/qcsrc/server/w_hlac.qc
trunk/data/qcsrc/server/w_hook.qc
trunk/data/qcsrc/server/w_laser.qc
trunk/data/qcsrc/server/w_rocketlauncher.qc
trunk/data/qcsrc/server/w_seeker.qc
trunk/data/qcsrc/server/w_tuba.qc
Log:
Fix accuracy stats (#400)
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/cl_client.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -28,13 +28,13 @@
sf |= 4; // zoomed
if(e.porto_v_angle_held)
sf |= 8; // angles held
-
+
WriteByte(MSG_ENTITY, ENT_CLIENT_CLIENTDATA);
WriteByte(MSG_ENTITY, sf);
if(sf & 2)
WriteByte(MSG_ENTITY, to.spectatee_status);
-
+
if(sf & 8)
{
WriteAngle(MSG_ENTITY, e.v_angle_x);
@@ -119,7 +119,7 @@
if(race_spawns)
if(spot.target == "")
return -1;
-
+
if(clienttype(self) == CLIENTTYPE_REAL)
{
if(spot.restriction == 1)
@@ -227,7 +227,7 @@
// too short distance
spawn_allgood = FALSE;
}
- else
+ else
{
// perfect
spawn_allbad = FALSE;
@@ -405,7 +405,7 @@
float Client_customizeentityforclient()
{
entity modelsource;
-
+
if(self.modelindex == 0)
return TRUE;
@@ -558,7 +558,7 @@
DropBall(self.ballcarried, self.origin + self.ballcarried.origin, self.velocity);
WaypointSprite_PlayerDead();
-
+
if(self.killcount != -666)
{
if(g_lms)
@@ -575,7 +575,7 @@
PlayerScore_Clear(self); // clear scores when needed
self.spectatortime = time;
-
+
self.classname = "observer";
self.iscreature = FALSE;
self.health = -666;
@@ -727,7 +727,7 @@
oldskin = self.skinindex;
self.skinindex = RestrictSkin(stof(self.playerskin));
}
-
+
if(chmdl || oldskin != self.skinindex)
self.species = player_getspecies(); // model or skin has changed
@@ -748,7 +748,7 @@
entity e;
e = spawn();
setorigin(e, org);
- RadiusDamage(e, world, g_touchexplode_damage, g_touchexplode_edgedamage, g_touchexplode_radius, world, g_touchexplode_force, DEATH_TOUCHEXPLODE, world);
+ RadiusDamage(e, world, g_touchexplode_damage, g_touchexplode_edgedamage, g_touchexplode_radius, world, g_touchexplode_force, DEATH_TOUCHEXPLODE, world, 0);
remove(e);
}
@@ -1125,7 +1125,7 @@
float killtime;
entity e;
killtime = cvar("g_balance_kill_delay");
-
+
if(g_race_qualifying)
killtime = 0;
@@ -1234,7 +1234,7 @@
// send prediction settings to the client
stuffcmd(e, "\nin_bindmap 0 0\n");
/*
- * we no longer need to stuff this. Remove this comment block if you feel
+ * we no longer need to stuff this. Remove this comment block if you feel
* 2.3 and higher (or was it 2.2.3?) don't need these any more
stuffcmd(e, strcat("cl_gravity ", ftos(cvar("sv_gravity")), "\n"));
stuffcmd(e, strcat("cl_movement_accelerate ", ftos(cvar("sv_accelerate")), "\n"));
@@ -1469,12 +1469,12 @@
if(self.entcs)
detach_entcs();
-
+
if(cvar("sv_eventlog"))
GameLogEcho(strcat(":part:", ftos(self.playerid)));
bprint ("^4",self.netname);
bprint ("^4 disconnected\n");
-
+
SoundEntity_Detach(self);
DropAllRunes(self);
@@ -1947,7 +1947,7 @@
self.pressedkeys &~= KEY_FORWARD;
self.pressedkeys &~= KEY_BACKWARD;
}
-
+
if (self.movement_y > 0)
{ // right key pressed
self.pressedkeys |= KEY_RIGHT;
@@ -1963,7 +1963,7 @@
self.pressedkeys &~= KEY_RIGHT;
self.pressedkeys &~= KEY_LEFT;
}
-
+
if (self.BUTTON_JUMP) // get if jump and crouch keys are pressed
self.pressedkeys |= KEY_JUMP;
else
@@ -2018,7 +2018,7 @@
if (self == self.enemy)
return 0;
-
+
if(self.enemy.classname != "player")
return 0;
@@ -2268,7 +2268,7 @@
if(blockSpectators && frametime)
// WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
checkSpectatorBlock();
-
+
zoomstate_set = 0;
if(self.netname_previous != self.netname)
@@ -2466,7 +2466,7 @@
}
}
}
-
+
if(self.health <= g_bloodloss && self.deadflag == DEAD_NO)
{
if(self.bloodloss_timer < time)
@@ -2700,7 +2700,7 @@
if(Drag_MayChangeAngles(draggee))
draggee.angles_y = draggee.angles_y * (1 - f) + (dragger.v_angle_y + dragger.draglocalangle) * f;
-
+
draggee.ltime = max(servertime + serverframetime, draggee.ltime); // fixes func_train breakage
te_lightning1(dragger, dragger.origin + dragger.view_ofs, curorigin);
@@ -2794,7 +2794,7 @@
detach_sameorigin(self.cursor_trace_ent);
Drag_Begin(self, self.cursor_trace_ent, self.cursor_trace_endpos);
}
-
+
if(Drag_IsDragging(self))
{
if(self.BUTTON_DRAG)
Modified: trunk/data/qcsrc/server/cl_impulse.qc
===================================================================
--- trunk/data/qcsrc/server/cl_impulse.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/cl_impulse.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -452,7 +452,7 @@
setorigin(e2, org);
pointparticles(particleeffectnum("rocket_explode"), org, '0 0 0', 1);
sound(e2, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
- RadiusDamage(e2, e, 1000, 0, 128, e, 500, DEATH_CHEAT, world);
+ RadiusDamage(e2, e, 1000, 0, 128, e, 500, DEATH_CHEAT, world, 0);
remove(e2);
}
print("404 Sportsmanship not found.\n");
Modified: trunk/data/qcsrc/server/func_breakable.qc
===================================================================
--- trunk/data/qcsrc/server/func_breakable.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/func_breakable.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -86,7 +86,7 @@
void func_breakable_look_destroyed()
{
local float floor_z;
-
+
if(self.mdl_dead == "")
self.model = "";
else {
@@ -97,7 +97,7 @@
self.origin_z = floor_z;
}
}
-
+
self.solid = SOLID_NOT;
}
@@ -157,7 +157,7 @@
sound (self, CHAN_AUTO, self.noise, VOL_BASE, ATTN_NORM);
if(self.dmg)
- RadiusDamage(self, activator, self.dmg, self.dmg_edge, self.dmg_radius, self, self.dmg_force, DEATH_HURTTRIGGER, world);
+ RadiusDamage(self, activator, self.dmg, self.dmg_edge, self.dmg_radius, self, self.dmg_force, DEATH_HURTTRIGGER, world, 0);
if(self.cnt)
pointparticles(self.cnt, self.absmin * 0.5 + self.absmax * 0.5, '0 0 0', self.count);
Modified: trunk/data/qcsrc/server/g_damage.qc
===================================================================
--- trunk/data/qcsrc/server/g_damage.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/g_damage.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -934,7 +934,8 @@
float RadiusDamage_EnemyDamageDone;
float RadiusDamage_EnemyMaxDamage;
float RadiusDamage_running;
-float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity ignore, float forceintensity, float deathtype, entity directhitentity)
+float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity ignore,
+ float forceintensity, float deathtype, entity directhitentity, float weaponid)
// Returns total damage applies to creatures
{
entity targ;
@@ -1068,15 +1069,16 @@
RadiusDamage_running = 0;
//Calculates stats for all RadiusDamage weapons
+ if(weaponid)
if(clienttype(attacker) == CLIENTTYPE_REAL)
{
float f;
f = min(RadiusDamage_EnemyMaxDamage, RadiusDamage_EnemyDamageDone);
- attacker.actual_damage[attacker.weapon] += f; // actual damage done
+ attacker.actual_damage[weaponid] += f; // actual damage done
//attacker.max_damage[attacker.weapon] += coredamage; // max damage, potential damage
// update the client and store into addstat() in g_world
- attacker.damage_hits = attacker.weapon + 64 * rint(attacker.actual_damage[attacker.weapon]);
- attacker.maxdamage_fired = attacker.weapon + 64 * rint(attacker.max_damage[attacker.weapon]);
+ attacker.damage_hits = weaponid + 64 * rint(attacker.actual_damage[weaponid]);
+ attacker.maxdamage_fired = weaponid + 64 * rint(attacker.max_damage[weaponid]);
}
return total_damage_to_creatures;
Modified: trunk/data/qcsrc/server/tturrets/units/unit_ewheel.qc
===================================================================
--- trunk/data/qcsrc/server/tturrets/units/unit_ewheel.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/tturrets/units/unit_ewheel.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -8,11 +8,11 @@
#ifdef TURRET_DEBUG
float d;
- d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+ d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world, 0);
self.owner.tur_dbg_dmg_t_h = self.owner.tur_dbg_dmg_t_h + d; //self.owner.shot_dmg;
self.owner.tur_dbg_dmg_t_f = self.owner.tur_dbg_dmg_t_f + self.owner.shot_dmg;
#else
- RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+ RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world, 0);
#endif
sound (self, CHAN_PROJECTILE, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM);
Modified: trunk/data/qcsrc/server/tturrets/units/unit_flac.qc
===================================================================
--- trunk/data/qcsrc/server/tturrets/units/unit_flac.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/tturrets/units/unit_flac.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -74,11 +74,11 @@
#ifdef TURRET_DEBUG
- ftmp = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+ ftmp = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world, 0);
self.owner.tur_dbg_dmg_t_h = self.owner.tur_dbg_dmg_t_h + ftmp; //self.owner.shot_dmg;
self.owner.tur_dbg_dmg_t_f = self.owner.tur_dbg_dmg_t_f + self.owner.shot_dmg;
#else
- RadiusDamage (self, self.owner, self.owner.shot_dmg, self.owner.shot_dmg * 0.5, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+ RadiusDamage (self, self.owner, self.owner.shot_dmg, self.owner.shot_dmg * 0.5, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world, 0);
#endif
remove (self);
Modified: trunk/data/qcsrc/server/tturrets/units/unit_hellion.qc
===================================================================
--- trunk/data/qcsrc/server/tturrets/units/unit_hellion.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/tturrets/units/unit_hellion.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -161,7 +161,7 @@
//w_deathtypestring = "could not dodge the twin missiles.";
self.event_damage = SUB_Null;
- d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+ d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world, 0);
#ifdef TURRET_DEBUG
self.owner.tur_dbg_dmg_t_h = self.owner.tur_dbg_dmg_t_h + d; //self.owner.shot_dmg;
Modified: trunk/data/qcsrc/server/tturrets/units/unit_hk.qc
===================================================================
--- trunk/data/qcsrc/server/tturrets/units/unit_hk.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/tturrets/units/unit_hk.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -376,7 +376,7 @@
WriteCoord (MSG_BROADCAST, org2_z);
self.event_damage = SUB_Null;
- d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+ d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world, 0);
#ifdef TURRET_DEBUG
self.owner.tur_dbg_dmg_t_h = self.owner.tur_dbg_dmg_t_h + d; //self.owner.shot_dmg;
Modified: trunk/data/qcsrc/server/tturrets/units/unit_mlrs.qc
===================================================================
--- trunk/data/qcsrc/server/tturrets/units/unit_mlrs.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/tturrets/units/unit_mlrs.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -81,11 +81,11 @@
#ifdef TURRET_DEBUG
float d;
- d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+ d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world, 0);
self.owner.tur_dbg_dmg_t_h = self.owner.tur_dbg_dmg_t_h + d; //self.owner.shot_dmg;
self.owner.tur_dbg_dmg_t_f = self.owner.tur_dbg_dmg_t_f + self.owner.shot_dmg;
#else
- RadiusDamage (self, self.owner, self.owner.shot_dmg, self.owner.shot_dmg * 0.5, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+ RadiusDamage (self, self.owner, self.owner.shot_dmg, self.owner.shot_dmg * 0.5, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world, 0);
#endif
// Target dead, Tell turret.
Modified: trunk/data/qcsrc/server/tturrets/units/unit_plasma.qc
===================================================================
--- trunk/data/qcsrc/server/tturrets/units/unit_plasma.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/tturrets/units/unit_plasma.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -104,11 +104,11 @@
#ifdef TURRET_DEBUG
float d;
- d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+ d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world, 0);
self.owner.tur_dbg_dmg_t_h = self.owner.tur_dbg_dmg_t_h + d; //self.owner.shot_dmg;
self.owner.tur_dbg_dmg_t_f = self.owner.tur_dbg_dmg_t_f + self.owner.shot_dmg;
#else
- RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world);
+ RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET, world, 0);
#endif
sound (self, CHAN_PROJECTILE, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM);
Modified: trunk/data/qcsrc/server/tturrets/units/unit_walker.qc
===================================================================
--- trunk/data/qcsrc/server/tturrets/units/unit_walker.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/tturrets/units/unit_walker.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -278,7 +278,7 @@
pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
//w_deathtypestring = "got blasted to oblivion";
- RadiusDamage (self, self.owner, cvar("g_turrets_unit_walker_std_rocket_dmg"), 0, cvar("g_turrets_unit_walker_std_rocket_radius"), world, cvar("g_turrets_unit_walker_std_rocket_force"), DEATH_TURRET, world);
+ RadiusDamage (self, self.owner, cvar("g_turrets_unit_walker_std_rocket_dmg"), 0, cvar("g_turrets_unit_walker_std_rocket_radius"), world, cvar("g_turrets_unit_walker_std_rocket_force"), DEATH_TURRET, world, 0);
remove (self);
}
Modified: trunk/data/qcsrc/server/w_crylink.qc
===================================================================
--- trunk/data/qcsrc/server/w_crylink.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/w_crylink.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -15,7 +15,7 @@
f = cvar("g_balance_crylink_primary_bouncedamagefactor");
if(self.alpha)
f *= self.alpha;
- RadiusDamage (self, self.realowner, cvar("g_balance_crylink_primary_damage") * f, cvar("g_balance_crylink_primary_edgedamage") * f, cvar("g_balance_crylink_primary_radius"), world, cvar("g_balance_crylink_primary_force") * f, self.projectiledeathtype, other);
+ RadiusDamage (self, self.realowner, cvar("g_balance_crylink_primary_damage") * f, cvar("g_balance_crylink_primary_edgedamage") * f, cvar("g_balance_crylink_primary_radius"), world, cvar("g_balance_crylink_primary_force") * f, self.projectiledeathtype, other, WEP_CRYLINK);
if (finalhit)
{
remove (self);
@@ -42,7 +42,7 @@
f = cvar("g_balance_crylink_secondary_bouncedamagefactor");
if(self.alpha)
f *= self.alpha;
- RadiusDamage (self, self.realowner, cvar("g_balance_crylink_secondary_damage") * f, cvar("g_balance_crylink_secondary_edgedamage") * f, cvar("g_balance_crylink_secondary_radius"), world, cvar("g_balance_crylink_secondary_force") * f, self.projectiledeathtype, other);
+ RadiusDamage (self, self.realowner, cvar("g_balance_crylink_secondary_damage") * f, cvar("g_balance_crylink_secondary_edgedamage") * f, cvar("g_balance_crylink_secondary_radius"), world, cvar("g_balance_crylink_secondary_force") * f, self.projectiledeathtype, other, WEP_CRYLINK);
if (finalhit)
{
remove (self);
Modified: trunk/data/qcsrc/server/w_electro.qc
===================================================================
--- trunk/data/qcsrc/server/w_electro.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/w_electro.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -11,11 +11,11 @@
self.event_damage = SUB_Null;
if (self.movetype == MOVETYPE_BOUNCE)
{
- RadiusDamage (self, self.owner, cvar("g_balance_electro_secondary_damage"), cvar("g_balance_electro_secondary_edgedamage"), cvar("g_balance_electro_secondary_radius"), world, cvar("g_balance_electro_secondary_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_electro_secondary_damage"), cvar("g_balance_electro_secondary_edgedamage"), cvar("g_balance_electro_secondary_radius"), world, cvar("g_balance_electro_secondary_force"), self.projectiledeathtype, other, WEP_ELECTRO);
}
else
{
- RadiusDamage (self, self.owner, cvar("g_balance_electro_primary_damage"), cvar("g_balance_electro_primary_edgedamage"), cvar("g_balance_electro_primary_radius"), world, cvar("g_balance_electro_primary_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_electro_primary_damage"), cvar("g_balance_electro_primary_edgedamage"), cvar("g_balance_electro_primary_radius"), world, cvar("g_balance_electro_primary_force"), self.projectiledeathtype, other, WEP_ELECTRO);
}
remove (self);
@@ -23,7 +23,7 @@
void W_Plasma_Explode_Combo (void) {
self.event_damage = SUB_Null;
- RadiusDamage (self, self.owner, cvar("g_balance_electro_combo_damage"), cvar("g_balance_electro_combo_edgedamage"), cvar("g_balance_electro_combo_radius"), world, cvar("g_balance_electro_combo_force"), WEP_ELECTRO | HITTYPE_BOUNCE, other); // use THIS type for a combo because primary can't bounce
+ RadiusDamage (self, self.owner, cvar("g_balance_electro_combo_damage"), cvar("g_balance_electro_combo_edgedamage"), cvar("g_balance_electro_combo_radius"), world, cvar("g_balance_electro_combo_force"), WEP_ELECTRO | HITTYPE_BOUNCE, other, WEP_ELECTRO); // use THIS type for a combo because primary can't bounce
remove (self);
}
Modified: trunk/data/qcsrc/server/w_grenadelauncher.qc
===================================================================
--- trunk/data/qcsrc/server/w_grenadelauncher.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/w_grenadelauncher.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -8,7 +8,7 @@
announce(self.owner, "announcer/male/airshot.wav");
self.event_damage = SUB_Null;
- RadiusDamage (self, self.owner, cvar("g_balance_grenadelauncher_primary_damage"), cvar("g_balance_grenadelauncher_primary_edgedamage"), cvar("g_balance_grenadelauncher_primary_radius"), world, cvar("g_balance_grenadelauncher_primary_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_grenadelauncher_primary_damage"), cvar("g_balance_grenadelauncher_primary_edgedamage"), cvar("g_balance_grenadelauncher_primary_radius"), world, cvar("g_balance_grenadelauncher_primary_force"), self.projectiledeathtype, other, WEP_GRENADE_LAUNCHER);
remove (self);
}
@@ -22,7 +22,7 @@
announce(self.owner, "announcer/male/airshot.wav");
self.event_damage = SUB_Null;
- RadiusDamage (self, self.owner, cvar("g_balance_grenadelauncher_secondary_damage"), cvar("g_balance_grenadelauncher_secondary_edgedamage"), cvar("g_balance_grenadelauncher_secondary_radius"), world, cvar("g_balance_grenadelauncher_secondary_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_grenadelauncher_secondary_damage"), cvar("g_balance_grenadelauncher_secondary_edgedamage"), cvar("g_balance_grenadelauncher_secondary_radius"), world, cvar("g_balance_grenadelauncher_secondary_force"), self.projectiledeathtype, other, WEP_GRENADE_LAUNCHER);
remove (self);
}
@@ -103,7 +103,7 @@
gren.angles = vectoangles (gren.velocity);
gren.flags = FL_PROJECTILE;
- CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE, TRUE);
+ CSQCProjectile(gren, TRUE, PROJECTILE_GRENADE, TRUE);
}
void W_Grenade_Attack2 (void)
Modified: trunk/data/qcsrc/server/w_hagar.qc
===================================================================
--- trunk/data/qcsrc/server/w_hagar.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/w_hagar.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -2,7 +2,7 @@
void W_Hagar_Explode (void)
{
self.event_damage = SUB_Null;
- RadiusDamage (self, self.realowner, cvar("g_balance_hagar_primary_damage"), cvar("g_balance_hagar_primary_edgedamage"), cvar("g_balance_hagar_primary_radius"), world, cvar("g_balance_hagar_primary_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.realowner, cvar("g_balance_hagar_primary_damage"), cvar("g_balance_hagar_primary_edgedamage"), cvar("g_balance_hagar_primary_radius"), world, cvar("g_balance_hagar_primary_force"), self.projectiledeathtype, other, WEP_HAGAR);
remove (self);
}
@@ -10,7 +10,7 @@
void W_Hagar_Explode2 (void)
{
self.event_damage = SUB_Null;
- RadiusDamage (self, self.realowner, cvar("g_balance_hagar_secondary_damage"), cvar("g_balance_hagar_secondary_edgedamage"), cvar("g_balance_hagar_secondary_radius"), world, cvar("g_balance_hagar_secondary_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.realowner, cvar("g_balance_hagar_secondary_damage"), cvar("g_balance_hagar_secondary_edgedamage"), cvar("g_balance_hagar_secondary_radius"), world, cvar("g_balance_hagar_secondary_force"), self.projectiledeathtype, other, WEP_HAGAR);
remove (self);
}
Modified: trunk/data/qcsrc/server/w_hlac.qc
===================================================================
--- trunk/data/qcsrc/server/w_hlac.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/w_hlac.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -5,7 +5,7 @@
self.event_damage = SUB_Null;
- RadiusDamage (self, self.owner, cvar("g_balance_hlac_primary_damage"), cvar("g_balance_hlac_primary_edgedamage"), cvar("g_balance_hlac_primary_radius"), world, cvar("g_balance_hlac_primary_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_hlac_primary_damage"), cvar("g_balance_hlac_primary_edgedamage"), cvar("g_balance_hlac_primary_radius"), world, cvar("g_balance_hlac_primary_force"), self.projectiledeathtype, other, WEP_HLAC);
remove (self);
}
@@ -16,7 +16,7 @@
self.event_damage = SUB_Null;
- RadiusDamage (self, self.owner, cvar("g_balance_hlac_secondary_damage"), cvar("g_balance_hlac_secondary_edgedamage"), cvar("g_balance_hlac_secondary_radius"), world, cvar("g_balance_hlac_secondary_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_hlac_secondary_damage"), cvar("g_balance_hlac_secondary_edgedamage"), cvar("g_balance_hlac_secondary_radius"), world, cvar("g_balance_hlac_secondary_force"), self.projectiledeathtype, other, WEP_HLAC);
remove (self);
}
Modified: trunk/data/qcsrc/server/w_hook.qc
===================================================================
--- trunk/data/qcsrc/server/w_hook.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/w_hook.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -19,7 +19,7 @@
f = self.dmg_last - dmg_remaining_next;
self.dmg_last = dmg_remaining_next;
- RadiusDamage (self, self.owner, self.dmg * f, self.dmg_edge * f, self.dmg_radius, self.owner, self.dmg_force * f, self.projectiledeathtype, world);
+ RadiusDamage (self, self.owner, self.dmg * f, self.dmg_edge * f, self.dmg_radius, self.owner, self.dmg_force * f, self.projectiledeathtype, world, WEP_HOOK);
self.projectiledeathtype |= HITTYPE_BOUNCE;
//RadiusDamage (self, world, self.dmg * f, self.dmg_edge * f, self.dmg_radius, world, self.dmg_force * f, self.projectiledeathtype, world);
@@ -105,7 +105,7 @@
float w_hook(float req)
{
float hooked_time_max, hooked_fuel;
-
+
if (req == WR_AIM)
{
// ... sorry ...
@@ -123,7 +123,7 @@
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_fuel = self.ammo_fuel - cvar("g_balance_hook_primary_fuel");
self.hook_state |= HOOK_FIRING;
- weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_hook_primary_animtime"), w_ready);
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_hook_primary_animtime"), w_ready);
}
}
@@ -148,13 +148,13 @@
if(self.hook && self.hook.state == 1)
{
- hooked_time_max = cvar("g_balance_hook_primary_hooked_time_max");
+ hooked_time_max = cvar("g_balance_hook_primary_hooked_time_max");
if (hooked_time_max > 0)
{
if ( time > self.hook_time_hooked + hooked_time_max )
self.hook_state |= HOOK_REMOVING;
}
-
+
hooked_fuel = cvar("g_balance_hook_primary_hooked_fuel");
if (hooked_fuel > 0)
{
@@ -180,7 +180,7 @@
}
else
{
- self.hook_time_hooked = time;
+ self.hook_time_hooked = time;
self.hook_time_fueldecrease = time + cvar("g_balance_hook_primary_hooked_time_free");
}
Modified: trunk/data/qcsrc/server/w_laser.qc
===================================================================
--- trunk/data/qcsrc/server/w_laser.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/w_laser.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -6,9 +6,9 @@
self.event_damage = SUB_Null;
if (self.dmg)
- RadiusDamage (self, self.owner, cvar("g_balance_laser_secondary_damage"), cvar("g_balance_laser_secondary_edgedamage"), cvar("g_balance_laser_secondary_radius"), world, cvar("g_balance_laser_secondary_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_laser_secondary_damage"), cvar("g_balance_laser_secondary_edgedamage"), cvar("g_balance_laser_secondary_radius"), world, cvar("g_balance_laser_secondary_force"), self.projectiledeathtype, other, WEP_LASER);
else
- RadiusDamage (self, self.owner, cvar("g_balance_laser_primary_damage"), cvar("g_balance_laser_primary_edgedamage"), cvar("g_balance_laser_primary_radius"), world, cvar("g_balance_laser_primary_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_laser_primary_damage"), cvar("g_balance_laser_primary_edgedamage"), cvar("g_balance_laser_primary_radius"), world, cvar("g_balance_laser_primary_force"), self.projectiledeathtype, other, WEP_LASER);
remove (self);
}
Modified: trunk/data/qcsrc/server/w_rocketlauncher.qc
===================================================================
--- trunk/data/qcsrc/server/w_rocketlauncher.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/w_rocketlauncher.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -15,7 +15,7 @@
W_Rocket_Unregister();
self.event_damage = SUB_Null;
- RadiusDamage (self, self.owner, cvar("g_balance_rocketlauncher_damage"), cvar("g_balance_rocketlauncher_edgedamage"), cvar("g_balance_rocketlauncher_radius"), world, cvar("g_balance_rocketlauncher_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_rocketlauncher_damage"), cvar("g_balance_rocketlauncher_edgedamage"), cvar("g_balance_rocketlauncher_radius"), world, cvar("g_balance_rocketlauncher_force"), self.projectiledeathtype, other, WEP_ROCKET_LAUNCHER);
if (self.owner.weapon == WEP_ROCKET_LAUNCHER)
{
Modified: trunk/data/qcsrc/server/w_seeker.qc
===================================================================
--- trunk/data/qcsrc/server/w_seeker.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/w_seeker.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -5,7 +5,7 @@
void Seeker_Missile_Explode ()
{
self.event_damage = SUB_Null;
- RadiusDamage (self, self.owner, cvar("g_balance_seeker_missile_damage"), cvar("g_balance_seeker_missile_edgedamage"), cvar("g_balance_seeker_missile_radius"), world, cvar("g_balance_seeker_missile_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_seeker_missile_damage"), cvar("g_balance_seeker_missile_edgedamage"), cvar("g_balance_seeker_missile_radius"), world, cvar("g_balance_seeker_missile_force"), self.projectiledeathtype, other, WEP_SEEKER);
remove (self);
}
@@ -354,7 +354,7 @@
{
self.event_damage = SUB_Null;
- RadiusDamage (self, self.owner, cvar("g_balance_seeker_flac_damage"), cvar("g_balance_seeker_flac_edgedamage"), cvar("g_balance_seeker_flac_radius"), world, cvar("g_balance_seeker_flac_force"), self.projectiledeathtype, other);
+ RadiusDamage (self, self.owner, cvar("g_balance_seeker_flac_damage"), cvar("g_balance_seeker_flac_edgedamage"), cvar("g_balance_seeker_flac_radius"), world, cvar("g_balance_seeker_flac_force"), self.projectiledeathtype, other, WEP_SEEKER);
remove (self);
}
Modified: trunk/data/qcsrc/server/w_tuba.qc
===================================================================
--- trunk/data/qcsrc/server/w_tuba.qc 2009-07-17 21:05:28 UTC (rev 7232)
+++ trunk/data/qcsrc/server/w_tuba.qc 2009-07-18 02:47:28 UTC (rev 7233)
@@ -37,7 +37,7 @@
note += 12;
if(hittype & HITTYPE_SECONDARY)
note += 7;
-
+
// we support two kinds of tubas, those tuned in Eb and those tuned in C
// kind of tuba currently is player slot number, or team number if in
// teamplay
@@ -52,7 +52,7 @@
if(pl.clientcolors & 1)
note += 3;
}
-
+
// total range of notes:
// 0
// *** ** ****
@@ -84,7 +84,7 @@
c = CHAN_WEAPON2;
}
sound(self, c, TUBA_NOTE(Tuba_GetNote(self, hittype)), bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1), cvar("g_balance_tuba_attenuation"));
- RadiusDamage(self, self, cvar("g_balance_tuba_damage"), cvar("g_balance_tuba_edgedamage"), cvar("g_balance_tuba_radius"), world, cvar("g_balance_tuba_force"), hittype | WEP_TUBA, world);
+ RadiusDamage(self, self, cvar("g_balance_tuba_damage"), cvar("g_balance_tuba_edgedamage"), cvar("g_balance_tuba_radius"), world, cvar("g_balance_tuba_force"), hittype | WEP_TUBA, world, WEP_TUBA);
o = gettaginfo(self.exteriorweaponentity, 0);
pointparticles(particleeffectnum("smoke_ring"), o + v_up * 45 + v_right * -6 + v_forward * 8, v_up * 100, 1);
More information about the nexuiz-commits
mailing list