// {{{ #12: Vaporizer
set g_balance_vaporizer_primary_ammo 10
set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_damage -1
set g_balance_vaporizer_primary_refire 1
set g_balance_vaporizer_reload_ammo 0
set g_balance_vaporizer_reload_time 0
set g_balance_arc_weaponstartoverride -1
set g_balance_arc_weaponthrowable 1
// }}}
+ // {{{ #21: Heavy Machine Gun
+ set g_balance_hmg_ammo 1
+ set g_balance_hmg_damage 10
+ set g_balance_hmg_force 5
+ set g_balance_hmg_refire 0.05
+ set g_balance_hmg_reload_ammo 120
+ set g_balance_hmg_reload_time 1
+ set g_balance_hmg_solidpenetration 32
+ set g_balance_hmg_spread_add 0.01
+ set g_balance_hmg_spread_max 0.05
+ set g_balance_hmg_spread_min 0.02
+ set g_balance_hmg_switchdelay_drop 0.2
+ set g_balance_hmg_switchdelay_raise 0.2
+ set g_balance_hmg_weaponreplace ""
+ set g_balance_hmg_weaponstart 0
+ set g_balance_hmg_weaponstartoverride 0
+ set g_balance_hmg_weaponthrowable 0
+ // }}}
+ // {{{ #22: Rocket Propelled Chainsaw
+ set g_balance_rpc_ammo 10
+ set g_balance_rpc_animtime 1
+ set g_balance_rpc_damage 150
+ set g_balance_rpc_damage2 500
+ set g_balance_rpc_damageforcescale 2
+ set g_balance_rpc_edgedamage 50
+ set g_balance_rpc_force 400
+ set g_balance_rpc_health 25
+ set g_balance_rpc_lifetime 30
+ set g_balance_rpc_radius 300
+ set g_balance_rpc_refire 1
+ set g_balance_rpc_reload_ammo 10
+ set g_balance_rpc_reload_time 1
+ set g_balance_rpc_speed 1250
+ set g_balance_rpc_speedaccel 5000
+ set g_balance_rpc_switchdelay_drop 0.2
+ set g_balance_rpc_switchdelay_raise 0.2
+ set g_balance_rpc_weaponreplace ""
+ set g_balance_rpc_weaponstart 0
+ set g_balance_rpc_weaponstartoverride 0
+ set g_balance_rpc_weaponthrowable 0
+ // }}}
// {{{ #13: Vaporizer
set g_balance_vaporizer_primary_ammo 10
set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_damage 150
set g_balance_vaporizer_primary_refire 1
set g_balance_vaporizer_reload_ammo 0
set g_balance_vaporizer_reload_time 0
set g_balance_shotgun_weaponstartoverride -1
set g_balance_shotgun_weaponthrowable 1
// }}}
+ // {{{ #21: Heavy Machine Gun
+ set g_balance_hmg_ammo 1
+ set g_balance_hmg_damage 10
+ set g_balance_hmg_force 5
+ set g_balance_hmg_refire 0.05
+ set g_balance_hmg_reload_ammo 120
+ set g_balance_hmg_reload_time 1
+ set g_balance_hmg_solidpenetration 32
+ set g_balance_hmg_spread_add 0.01
+ set g_balance_hmg_spread_max 0.05
+ set g_balance_hmg_spread_min 0.02
+ set g_balance_hmg_switchdelay_drop 0.2
+ set g_balance_hmg_switchdelay_raise 0.2
+ set g_balance_hmg_weaponreplace ""
+ set g_balance_hmg_weaponstart 0
+ set g_balance_hmg_weaponstartoverride 0
+ set g_balance_hmg_weaponthrowable 0
+ // }}}
+ // {{{ #22: Rocket Propelled Chainsaw
+ set g_balance_rpc_ammo 10
+ set g_balance_rpc_animtime 1
+ set g_balance_rpc_damage 150
+ set g_balance_rpc_damage2 500
+ set g_balance_rpc_damageforcescale 2
+ set g_balance_rpc_edgedamage 50
+ set g_balance_rpc_force 400
+ set g_balance_rpc_health 25
+ set g_balance_rpc_lifetime 30
+ set g_balance_rpc_radius 300
+ set g_balance_rpc_refire 1
+ set g_balance_rpc_reload_ammo 10
+ set g_balance_rpc_reload_time 1
+ set g_balance_rpc_speed 1250
+ set g_balance_rpc_speedaccel 5000
+ set g_balance_rpc_switchdelay_drop 0.2
+ set g_balance_rpc_switchdelay_raise 0.2
+ set g_balance_rpc_weaponreplace ""
+ set g_balance_rpc_weaponstart 0
+ set g_balance_rpc_weaponstartoverride 0
+ set g_balance_rpc_weaponthrowable 0
+ // }}}
// {{{ #12: Vaporizer
set g_balance_vaporizer_primary_ammo 10
set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_damage -1
set g_balance_vaporizer_primary_refire 1
set g_balance_vaporizer_reload_ammo 0
set g_balance_vaporizer_reload_time 0
set g_balance_arc_weaponstartoverride -1
set g_balance_arc_weaponthrowable 1
// }}}
+ // {{{ #21: Heavy Machine Gun
+ set g_balance_hmg_ammo 1
+ set g_balance_hmg_damage 10
+ set g_balance_hmg_force 5
+ set g_balance_hmg_refire 0.05
+ set g_balance_hmg_reload_ammo 120
+ set g_balance_hmg_reload_time 1
+ set g_balance_hmg_solidpenetration 32
+ set g_balance_hmg_spread_add 0.01
+ set g_balance_hmg_spread_max 0.05
+ set g_balance_hmg_spread_min 0.02
+ set g_balance_hmg_switchdelay_drop 0.2
+ set g_balance_hmg_switchdelay_raise 0.2
+ set g_balance_hmg_weaponreplace ""
+ set g_balance_hmg_weaponstart 0
+ set g_balance_hmg_weaponstartoverride 0
+ set g_balance_hmg_weaponthrowable 0
+ // }}}
+ // {{{ #22: Rocket Propelled Chainsaw
+ set g_balance_rpc_ammo 10
+ set g_balance_rpc_animtime 1
+ set g_balance_rpc_damage 150
+ set g_balance_rpc_damage2 500
+ set g_balance_rpc_damageforcescale 2
+ set g_balance_rpc_edgedamage 50
+ set g_balance_rpc_force 400
+ set g_balance_rpc_health 25
+ set g_balance_rpc_lifetime 30
+ set g_balance_rpc_radius 300
+ set g_balance_rpc_refire 1
+ set g_balance_rpc_reload_ammo 10
+ set g_balance_rpc_reload_time 1
+ set g_balance_rpc_speed 1250
+ set g_balance_rpc_speedaccel 5000
+ set g_balance_rpc_switchdelay_drop 0.2
+ set g_balance_rpc_switchdelay_raise 0.2
+ set g_balance_rpc_weaponreplace ""
+ set g_balance_rpc_weaponstart 0
+ set g_balance_rpc_weaponstartoverride 0
+ set g_balance_rpc_weaponthrowable 0
+ // }}}
// {{{ #12: Vaporizer
set g_balance_vaporizer_primary_ammo 10
set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_damage 150
set g_balance_vaporizer_primary_refire 1
set g_balance_vaporizer_reload_ammo 0
set g_balance_vaporizer_reload_time 0
set g_balance_arc_weaponstartoverride -1
set g_balance_arc_weaponthrowable 1
// }}}
+ // {{{ #21: Heavy Machine Gun
+ set g_balance_hmg_ammo 1
+ set g_balance_hmg_damage 10
+ set g_balance_hmg_force 5
+ set g_balance_hmg_refire 0.05
+ set g_balance_hmg_reload_ammo 120
+ set g_balance_hmg_reload_time 1
+ set g_balance_hmg_solidpenetration 32
+ set g_balance_hmg_spread_add 0.01
+ set g_balance_hmg_spread_max 0.05
+ set g_balance_hmg_spread_min 0.02
+ set g_balance_hmg_switchdelay_drop 0.2
+ set g_balance_hmg_switchdelay_raise 0.2
+ set g_balance_hmg_weaponreplace ""
+ set g_balance_hmg_weaponstart 0
+ set g_balance_hmg_weaponstartoverride 0
+ set g_balance_hmg_weaponthrowable 0
+ // }}}
+ // {{{ #22: Rocket Propelled Chainsaw
+ set g_balance_rpc_ammo 10
+ set g_balance_rpc_animtime 1
+ set g_balance_rpc_damage 150
+ set g_balance_rpc_damage2 500
+ set g_balance_rpc_damageforcescale 2
+ set g_balance_rpc_edgedamage 50
+ set g_balance_rpc_force 400
+ set g_balance_rpc_health 25
+ set g_balance_rpc_lifetime 30
+ set g_balance_rpc_radius 300
+ set g_balance_rpc_refire 1
+ set g_balance_rpc_reload_ammo 10
+ set g_balance_rpc_reload_time 1
+ set g_balance_rpc_speed 1250
+ set g_balance_rpc_speedaccel 5000
+ set g_balance_rpc_switchdelay_drop 0.2
+ set g_balance_rpc_switchdelay_raise 0.2
+ set g_balance_rpc_weaponreplace ""
+ set g_balance_rpc_weaponstart 0
+ set g_balance_rpc_weaponstartoverride 0
+ set g_balance_rpc_weaponthrowable 0
+ // }}}
// {{{ #12: Vaporizer
set g_balance_vaporizer_primary_ammo 10
set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_damage 150
set g_balance_vaporizer_primary_refire 1
set g_balance_vaporizer_reload_ammo 0
set g_balance_vaporizer_reload_time 0
set g_balance_arc_weaponstartoverride -1
set g_balance_arc_weaponthrowable 1
// }}}
+ // {{{ #21: Heavy Machine Gun
+ set g_balance_hmg_ammo 1
+ set g_balance_hmg_damage 10
+ set g_balance_hmg_force 5
+ set g_balance_hmg_refire 0.05
+ set g_balance_hmg_reload_ammo 120
+ set g_balance_hmg_reload_time 1
+ set g_balance_hmg_solidpenetration 32
+ set g_balance_hmg_spread_add 0.01
+ set g_balance_hmg_spread_max 0.05
+ set g_balance_hmg_spread_min 0.02
+ set g_balance_hmg_switchdelay_drop 0.2
+ set g_balance_hmg_switchdelay_raise 0.2
+ set g_balance_hmg_weaponreplace ""
+ set g_balance_hmg_weaponstart 0
+ set g_balance_hmg_weaponstartoverride 0
+ set g_balance_hmg_weaponthrowable 0
+ // }}}
+ // {{{ #22: Rocket Propelled Chainsaw
+ set g_balance_rpc_ammo 10
+ set g_balance_rpc_animtime 1
+ set g_balance_rpc_damage 150
+ set g_balance_rpc_damage2 500
+ set g_balance_rpc_damageforcescale 2
+ set g_balance_rpc_edgedamage 50
+ set g_balance_rpc_force 400
+ set g_balance_rpc_health 25
+ set g_balance_rpc_lifetime 30
+ set g_balance_rpc_radius 300
+ set g_balance_rpc_refire 1
+ set g_balance_rpc_reload_ammo 10
+ set g_balance_rpc_reload_time 1
+ set g_balance_rpc_speed 1250
+ set g_balance_rpc_speedaccel 5000
+ set g_balance_rpc_switchdelay_drop 0.2
+ set g_balance_rpc_switchdelay_raise 0.2
+ set g_balance_rpc_weaponreplace ""
+ set g_balance_rpc_weaponstart 0
+ set g_balance_rpc_weaponstartoverride 0
+ set g_balance_rpc_weaponthrowable 0
+ // }}}
self.nextthink = time;
self.think = CopyBody_Think;
// "bake" the current animation frame for clones (they don't get clientside animation)
+ animdecide_load_if_needed(self);
animdecide_setframes(self, FALSE, frame, frame1time, frame2, frame2time);
self = oldself;
void player_setupanimsformodel()
{
// load animation info
- animdecide_init(self);
+ animdecide_load_if_needed(self);
animdecide_setstate(self, 0, FALSE);
}
if (take > 100)
Violence_GibSplash_At(hitloc, force * -0.2, 3, 1, self, attacker);
- if (!(self.flags & FL_GODMODE))
- {
- self.armorvalue = self.armorvalue - save;
- self.health = self.health - take;
- // pause regeneration for 5 seconds
- self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_health_regen);
- }
+ self.armorvalue = self.armorvalue - save;
+ self.health = self.health - take;
+ // pause regeneration for 5 seconds
+ self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_health_regen);
+
self.dmg_save = self.dmg_save + save;//max(save - 10, 0);
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
self.dmg_inflictor = inflictor;
}
// print an obituary message
- Obituary (attacker, inflictor, self, deathtype);
+ if(self.classname != "body")
+ Obituary (attacker, inflictor, self, deathtype);
// increment frag counter for used weapon type
float w;
frag_attacker = attacker;
frag_inflictor = inflictor;
frag_target = self;
+ frag_damage = excess;
frag_deathtype = deathtype;
MUTATOR_CALLHOOK(PlayerDies);
+ excess = frag_damage;
WEP_ACTION(self.weapon, WR_PLAYERDEATH);
// player could have been miraculously resuscitated ;)
// e.g. players in freezetag get frozen, they don't really die
- if(self.health >= 1 || !IS_PLAYER(self))
+ if(self.health >= 1 || !(IS_PLAYER(self) || self.classname == "body"))
return;
// when we get here, player actually dies
self.event_damage = PlayerCorpseDamage;
// call the corpse damage function just in case it wants to gib
self.event_damage(inflictor, attacker, excess, deathtype, hitloc, force);
+
// set up to fade out later
SUB_SetFade (self, time + 6 + random (), 1);
+ // reset body think wrapper broken by SUB_SetFade
+ if(self.classname == "body" && self.think != CopyBody_Think) {
+ self.CopyBody_think = self.think;
+ self.CopyBody_nextthink = self.nextthink;
+ self.think = CopyBody_Think;
+ self.nextthink = time;
+ }
- if(autocvar_sv_gentle > 0 || autocvar_ekg) {
+ if(autocvar_sv_gentle > 0 || autocvar_ekg || self.classname == "body") {
// remove corpse
+ // clones don't run any animation code any more, so we must gib them when they die :(
PlayerCorpseDamage (inflictor, attacker, autocvar_sv_gibhealth+1.0, deathtype, hitloc, force);
}
if(frag_target != frag_attacker)
{
- if(frag_target.health > 0) { Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_INSTAGIB_SECONDARY); }
+ if(frag_target.health > 0) { Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE); }
frag_force = '0 0 0';
}
}
return FALSE;
}
+MUTATOR_HOOKFUNCTION(instagib_PlayerDies)
+{
+ if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
+ frag_damage = 1000; // always gib if it was a vaporizer death
+
+ return FALSE;
+}
+
MUTATOR_HOOKFUNCTION(instagib_ItemTouch)
{
if(self.ammo_cells)
MUTATOR_HOOK(FilterItem, instagib_FilterItem, CBC_ORDER_ANY);
MUTATOR_HOOK(CustomizeWaypoint, instagib_CustomizeWaypoint, CBC_ORDER_ANY);
MUTATOR_HOOK(Item_RespawnCountdown, instagib_ItemCountdown, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerDies, instagib_PlayerDies, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerDamage_SplitHealthArmor, instagib_SplitHealthArmor, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerPowerups, instagib_PlayerPowerups, CBC_ORDER_ANY);
MUTATOR_HOOK(ForbidThrowCurrentWeapon, instagib_ForbidThrowing, CBC_ORDER_ANY);