Minor Bug Fixes

This commit is contained in:
Robert Fritzen 2015-07-21 15:28:05 -05:00
parent 26600ca02e
commit d746dd443e
2 changed files with 17 additions and 1 deletions

View file

@ -503,6 +503,9 @@ function ShadowOrb::onDestroyed(%this, %obj, %prevState) {
if (%obj.isRemoved) {
return;
}
if(isObject(%obj.waypoint)) {
%obj.waypoint.schedule(500, "delete");
}
if(isObject($TWM2::VardisonManager.OrbSFX)) {
$TWM2::VardisonManager.OrbSFX.schedule(500, "delete");
}
@ -1650,6 +1653,13 @@ function VardisonManager::summonOrb(%this, %boss) {
setTargetSensorGroup(%orb.target, 30);
setTargetName(%orb.target, addtaggedstring("\c7Shadow Rift"));
%orb.waypoint = new WayPoint() {
position = %orb.getPosition();
dataBlock = "WayPointMarker";
team = %boss.Team;
name = "Shadow Rift";
};
//SFX
$TWM2::VardisonManager.OrbSFX = new ParticleEmissionDummy(){
position = %orb.getPosition();
@ -1705,6 +1715,7 @@ function VardisonManager::orbDestroyed(%this) {
%boss = %this.Vardison;
%boss.rapierShield = false;
%boss.busy = false; //<-- let think() resume...
MessageAll('msgDeath', "\c2The Shadow Rift has been Shattered...");
}
function VardisonManager::cooldownOff(%this, %Boss, %type) {

View file

@ -182,7 +182,12 @@ function canAttackPlayer(%client) {
}
function ZgetFacingDirection(%zombie,%closestClient,%pos){
%clpos = %closestClient.getPosition();
if(isObject(%closestClient)) {
%clpos = %closestClient.getPosition();
}
else {
%clpos = RMPG();
}
%vector = vectorNormalize(vectorSub(%clpos, %pos));
%v1 = getword(%vector, 0);
%v2 = getword(%vector, 1);