mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-18 09:41:06 +00:00
- castspell
This commit is contained in:
parent
068f887892
commit
c74c868dce
10 changed files with 14 additions and 14 deletions
|
@ -598,8 +598,8 @@ void processfluid(DWHActor* actor, int zr_florhit, boolean fly) {
|
|||
}
|
||||
}
|
||||
|
||||
void castspell(PLAYER& plr, int i) {
|
||||
auto& spr = sprite[i];
|
||||
void castspell(PLAYER& plr, DWHActor* actor) {
|
||||
auto& spr = actor->s();
|
||||
int j = insertsprite(spr.sectnum, MISSILE);
|
||||
auto& spawned = sprite[j];
|
||||
|
||||
|
@ -630,7 +630,7 @@ void castspell(PLAYER& plr, int i) {
|
|||
else
|
||||
spawned.zvel = (short)(((plr.z + (48 << 8) - spawned.z) << 7) / discrim);
|
||||
|
||||
spawned.owner = (short)i;
|
||||
spawned.owner = (short)actor->GetSpriteIndex();
|
||||
spawned.clipdist = 16;
|
||||
spawned.lotag = 512;
|
||||
spawned.hitag = 0;
|
||||
|
|
|
@ -126,7 +126,7 @@ void aisearch(PLAYER& plr, DWHActor* i, boolean fly);
|
|||
boolean checksector6(DWHActor* i);
|
||||
int checkfluid(int i, int zr_florhit);
|
||||
void processfluid(DWHActor* i, int zr_florhit, boolean fly);
|
||||
void castspell(PLAYER& plr, int i);
|
||||
void castspell(PLAYER& plr, DWHActor* i);
|
||||
void skullycastspell(PLAYER& plr, int i);
|
||||
void attack(PLAYER& plr, int i);
|
||||
int checkmove(DWHActor* actor, int dax, int day);
|
||||
|
|
|
@ -198,7 +198,7 @@ static void castdemon(PLAYER& plr, DWHActor* actor)
|
|||
}
|
||||
|
||||
if (spr.lotag < 0) {
|
||||
castspell(plr, i);
|
||||
castspell(plr, actor);
|
||||
SetNewStatus(actor, CHASE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -264,7 +264,7 @@ static void castdevil(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.picnum == DEVILATTACK + 2) {
|
||||
spr.picnum = DEVIL;
|
||||
spritesound(S_FIREBALL, &sprite[i]);
|
||||
castspell(plr, i);
|
||||
castspell(plr, actor);
|
||||
SetNewStatus(actor, CHASE);
|
||||
}
|
||||
checksector6(actor);
|
||||
|
|
|
@ -390,7 +390,7 @@ static void castgron(PLAYER& plr, DWHActor* actor)
|
|||
else if (spr.picnum == GRONMUATTACK) {
|
||||
spr.extra--;
|
||||
spritesound(S_SPELL2, &sprite[i]);
|
||||
castspell(plr, i);
|
||||
castspell(plr, actor);
|
||||
SetNewStatus(actor, CHASE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -226,7 +226,7 @@ static void castguardian(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.picnum == GUARDIANATTACK + 6) {
|
||||
spr.picnum = GUARDIAN;
|
||||
spritesound(S_FIREBALL, &spr);
|
||||
castspell(plr, actor->GetSpriteIndex());
|
||||
castspell(plr, actor);
|
||||
SetNewStatus(actor, CHASE);
|
||||
}
|
||||
checksector6(actor);
|
||||
|
|
|
@ -235,7 +235,7 @@ static void castjudy(PLAYER& plr, DWHActor* actor)
|
|||
spr.picnum = JUDYATTACK1;
|
||||
spritesound(S_JUDY1 + krand() % 4, &sprite[i]);
|
||||
if (krand() % 100 > 70) {
|
||||
castspell(plr, i);
|
||||
castspell(plr, actor);
|
||||
}
|
||||
else {
|
||||
if (krand() % 100 > 40) {
|
||||
|
@ -278,7 +278,7 @@ static void castjudy(PLAYER& plr, DWHActor* actor)
|
|||
}
|
||||
break;
|
||||
case 4:
|
||||
castspell(plr, i);
|
||||
castspell(plr, actor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ static void castjudy(PLAYER& plr, DWHActor* actor)
|
|||
}
|
||||
break;
|
||||
case 4:
|
||||
castspell(plr, i);
|
||||
castspell(plr, actor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -252,7 +252,7 @@ static void castkatie(PLAYER& plr, DWHActor* actor)
|
|||
if (spr.picnum == KATIEAT + 16) {
|
||||
spr.picnum = KATIE;
|
||||
spritesound(S_FIREBALL, &spr);
|
||||
castspell(plr, i);
|
||||
castspell(plr, actor);
|
||||
SetNewStatus(actor, CHASE);
|
||||
spr.extra++;
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ static void willowDrain(PLAYER& plr, DWHActor* actor)
|
|||
spritesound(S_FIREBALL, &spr);
|
||||
int oldz = spr.z;
|
||||
spr.z += 6144;
|
||||
castspell(plr, i);
|
||||
castspell(plr, actor);
|
||||
spr.z = oldz;
|
||||
SetNewStatus(actor, CHASE);
|
||||
}
|
||||
|
|
|
@ -1257,7 +1257,7 @@ void animateobjs(PLAYER& plr) {
|
|||
spr.z - (tileHeight(spr.picnum) << 7), spr.sectnum)) {
|
||||
// JSA_NEW
|
||||
spritesound(S_FIREBALL, &spr);
|
||||
castspell(plr, i);
|
||||
castspell(plr, actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue