This plugin is now deprecated.
Multistab is bugged and kills up to 4 people instead of the 2 that it's supposed to.
//Serverside multistab hotfix - caps multistab kills at 2 instead of 4
//Will protect those two lads who don't deserve to die, but causes minor desync whenever it actually matters.
//Zlib license, (c) 2012 Wareya @ GG2/Steam
//Untested, but if there's an issue, it's with the arguments to object_event_*.
object_event_clear(StabMask,ev_collision,Character);
object_event_add(StabMask,ev_collision,Character,"
if(other.id != ownerPlayer.object and other.team != team && other.hp > 0 && other.ubered == 0)
{
if(!collision_line(x,y-12,other.x,other.y,Obstacle,true,true)) and (!collision_line(x,y-12,other.x,other.y,TeamGate,true,true) and (!collision_line(x,y-12,other.x,other.y,BulletWall,true,true)))
{
other.hp -= hitDamage;
other.timeUnscathed = 0;
if (other.lastDamageDealer != ownerPlayer && other.lastDamageDealer != other.player)
{
other.secondToLastDamageDealer = other.lastDamageDealer;
other.alarm[4] = other.alarm[3]
}
other.alarm[3] = ASSIST_TIME;
other.lastDamageDealer = ownerPlayer;
if sign(other.image_xscale) == sign(image_xscale)
other.lastDamageSource = WEAPON_BACKSTAB;
else
other.lastDamageSource = WEAPON_KNIFE;
var blood;
if(global.gibLevel > 0)
{
repeat(70)
{
blood = instance_create(x,y,Blood);
blood.direction = direction-180;
}
}
//This is the relevant code. The old block here was a broken algorithm.
numKills += 1;
if numKills >= maxKills
instance_destroy();
}
else
alarm[0] = 1;
}
");
object_event_clear(StabMask,ev_collision,Sentry);
object_event_add(StabMask,ev_collision,Sentry,"
if(other.team != team)
{
if(!collision_line(x,y-12,other.x,other.y,Obstacle,true,true)) and (!collision_line(x,y-12,other.x,other.y,TeamGate,true,true) and (!collision_line(x,y-12,other.x,other.y,BulletWall,true,true)))
{
other.hp -= hitDamage;
other.lastDamageDealer = ownerPlayer;
other.lastDamageSource = weapon;
//This is the relevant code. The old block here was a broken algorithm.
numKills += 1;
if numKills >= maxKills
instance_destroy();
}
else
alarm[0] = 1;
}
");
Version: 2.4.3, 2.4.4, any newer versions until multistab is fixed
Conflicts: ANYTHING that rewrites stab collision with characters