mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-29 15:32:24 +00:00
- handle zr_florhit.
This commit is contained in:
parent
2b73adb5a5
commit
d39efeb1c2
27 changed files with 124 additions and 118 deletions
|
@ -427,7 +427,7 @@ void aiProcess() {
|
||||||
int i = actor->GetSpriteIndex();
|
int i = actor->GetSpriteIndex();
|
||||||
|
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
case TYPEWATER:
|
case TYPEWATER:
|
||||||
spr.z = zr_florz + (tileHeight(spr.picnum) << 5);
|
spr.z = zr_florz + (tileHeight(spr.picnum) << 5);
|
||||||
|
@ -457,7 +457,7 @@ Collision aimove(DWHActor* actor)
|
||||||
spr.z += WH2GRAVITYCONSTANT;
|
spr.z += WH2GRAVITYCONSTANT;
|
||||||
else
|
else
|
||||||
spr.z += GRAVITYCONSTANT;
|
spr.z += GRAVITYCONSTANT;
|
||||||
return moveStat.setSector(zr_florhit);
|
return zr_florHit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -541,7 +541,7 @@ void aisearch(PLAYER& plr, DWHActor* actor, boolean fly) {
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, fly);
|
processfluid(actor, zr_florHit, fly);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
@ -560,9 +560,9 @@ boolean checksector6(DWHActor* actor) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int checkfluid(int i, int zr_florhit) {
|
int checkfluid(int i, Collision& florHit) {
|
||||||
SPRITE& spr = sprite[i];
|
SPRITE& spr = sprite[i];
|
||||||
if (isValidSector(spr.sectnum) && (zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == WATER
|
if (isValidSector(spr.sectnum) && florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == WATER
|
||||||
/* || sector[spr.sectnum].floorpicnum == LAVA2 */ || sector[spr.sectnum].floorpicnum == LAVA
|
/* || sector[spr.sectnum].floorpicnum == LAVA2 */ || sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == SLIME || sector[spr.sectnum].floorpicnum == FLOORMIRROR
|
|| sector[spr.sectnum].floorpicnum == SLIME || sector[spr.sectnum].floorpicnum == FLOORMIRROR
|
||||||
/*
|
/*
|
||||||
|
@ -581,9 +581,9 @@ int checkfluid(int i, int zr_florhit) {
|
||||||
return TYPENONE;
|
return TYPENONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void processfluid(DWHActor* actor, int zr_florhit, boolean fly) {
|
void processfluid(DWHActor* actor, Collision& florHit, boolean fly) {
|
||||||
SPRITE& spr = actor->s();
|
SPRITE& spr = actor->s();
|
||||||
switch (checkfluid(actor->GetSpriteIndex(), zr_florhit)) {
|
switch (checkfluid(actor->GetSpriteIndex(), florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
if (!fly) {
|
if (!fly) {
|
||||||
spr.z += tileHeight(spr.picnum) << 5;
|
spr.z += tileHeight(spr.picnum) << 5;
|
||||||
|
|
|
@ -124,8 +124,8 @@ Collision aimove(DWHActor* actor);
|
||||||
Collision aifly(DWHActor* i);
|
Collision aifly(DWHActor* i);
|
||||||
void aisearch(PLAYER& plr, DWHActor* i, boolean fly);
|
void aisearch(PLAYER& plr, DWHActor* i, boolean fly);
|
||||||
boolean checksector6(DWHActor* i);
|
boolean checksector6(DWHActor* i);
|
||||||
int checkfluid(int i, int zr_florhit);
|
int checkfluid(int i, Collision& florhit);
|
||||||
void processfluid(DWHActor* i, int zr_florhit, boolean fly);
|
void processfluid(DWHActor* i, Collision& florHit, boolean fly);
|
||||||
void castspell(PLAYER& plr, DWHActor* i);
|
void castspell(PLAYER& plr, DWHActor* i);
|
||||||
void skullycastspell(PLAYER& plr, int i);
|
void skullycastspell(PLAYER& plr, int i);
|
||||||
void attack(PLAYER& plr, int i);
|
void attack(PLAYER& plr, int i);
|
||||||
|
|
|
@ -54,7 +54,7 @@ static void chasedemon(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
checksector6(actor);
|
checksector6(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, true);
|
processfluid(actor, zr_florHit, true);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR && spr.z + (8 << 8) >= sector[osectnum].floorz) {
|
if (sector[osectnum].lotag == KILLSECTOR && spr.z + (8 << 8) >= sector[osectnum].floorz) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -64,7 +64,7 @@ static void chasedemon(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
if (spr.z + (8 << 8) >= sector[osectnum].floorz) {
|
if (spr.z + (8 << 8) >= sector[osectnum].floorz) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -178,7 +178,7 @@ static void fleedemon(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, true);
|
processfluid(actor, zr_florHit, true);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void chasedevil(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -96,7 +96,7 @@ static void paindevil(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ static void fleedevil(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ static void attackdevil(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
case TYPEWATER:
|
case TYPEWATER:
|
||||||
spr.z += tileHeight(spr.picnum) << 5;
|
spr.z += tileHeight(spr.picnum) << 5;
|
||||||
|
|
|
@ -58,7 +58,7 @@ static void chasedragon(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -99,7 +99,7 @@ static void fleedragon(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ static void paindragon(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
spr.lotag -= TICSPERFRAME;
|
spr.lotag -= TICSPERFRAME;
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void chasefatwitch(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -110,7 +110,7 @@ static void painfatwitch(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ static void attackfatwitch(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
case TYPEWATER:
|
case TYPEWATER:
|
||||||
spr.z += tileHeight(spr.picnum) << 5;
|
spr.z += tileHeight(spr.picnum) << 5;
|
||||||
|
@ -202,7 +202,7 @@ static void fleefatwitch(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ static void chasefish(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -71,7 +71,7 @@ static void chasefish(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -91,7 +91,7 @@ static void attackfish(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
spr.z = sector[spr.sectnum].floorz;
|
spr.z = sector[spr.sectnum].floorz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -138,7 +138,7 @@ static void skirmishfish(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ static void chasefred(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -73,7 +73,7 @@ static void chasefred(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -100,7 +100,7 @@ static void skirmishfred(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ static void attackfred(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -254,7 +254,7 @@ static void fleefred(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ static void painfred(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
checkexplfred(plr, actor);
|
checkexplfred(plr, actor);
|
||||||
|
|
|
@ -69,7 +69,7 @@ static void chasegoblin(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -79,7 +79,7 @@ static void chasegoblin(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -123,7 +123,7 @@ static void paingoblin(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
checkexplgoblin(plr, actor);
|
checkexplgoblin(plr, actor);
|
||||||
|
@ -192,7 +192,7 @@ static void fleegoblin(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ static void attackgoblin(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -336,7 +336,7 @@ static void skirmishgoblin(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -433,7 +433,7 @@ static void goblinWar(PLAYER& plr, DWHActor* actor)
|
||||||
else spr.ang = getangle(ownerspr.x - spr.x, ownerspr.y - spr.y);
|
else spr.ang = getangle(ownerspr.x - spr.x, ownerspr.y - spr.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
if (checkdist(actor, ownerspr.x, ownerspr.y, ownerspr.z)) {
|
if (checkdist(actor, ownerspr.x, ownerspr.y, ownerspr.z)) {
|
||||||
|
@ -485,7 +485,7 @@ static void goblinWar(PLAYER& plr, DWHActor* actor)
|
||||||
spr.extra = 1;
|
spr.extra = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ static void goblinWar(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
if (aimove(actor).type != kHitNone)
|
if (aimove(actor).type != kHitNone)
|
||||||
spr.ang = (short)(krand() & 2047);
|
spr.ang = (short)(krand() & 2047);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ static void chasegonzo(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -179,7 +179,7 @@ static void chasegonzo(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -239,7 +239,7 @@ static void skirmishgonzo(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ static void paingonzo(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
checkexplgonzo(plr, actor);
|
checkexplgonzo(plr, actor);
|
||||||
|
@ -363,7 +363,7 @@ static void attackgonzo(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
case TYPEWATER:
|
case TYPEWATER:
|
||||||
spr.z += tileHeight(spr.picnum) << 5;
|
spr.z += tileHeight(spr.picnum) << 5;
|
||||||
|
@ -475,7 +475,7 @@ static void fleegonzo(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ static void chasegron(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -111,7 +111,7 @@ static void chasegron(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -168,7 +168,7 @@ static void skirmishgron(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ static void paingron(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
checkexplgron(plr, actor);
|
checkexplgron(plr, actor);
|
||||||
|
@ -292,7 +292,7 @@ static void attackgron(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -367,7 +367,7 @@ static void fleegron(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void chaseguardian(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, true);
|
processfluid(actor, zr_florHit, true);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -64,7 +64,7 @@ static void chaseguardian(PLAYER& plr, DWHActor* actor)
|
||||||
if (!isValidSector(spr.sectnum))
|
if (!isValidSector(spr.sectnum))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -188,7 +188,7 @@ static void fleeguardian(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, true);
|
processfluid(actor, zr_florHit, true);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ static void chaseimp(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -80,7 +80,7 @@ static void chaseimp(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -115,7 +115,7 @@ static void painimp(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ static void fleeimp(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ static void attackimp(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -299,7 +299,7 @@ static void skirmishimp(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ static void chasejudy(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -120,7 +120,7 @@ static void painjudy(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ static void attackjudy(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
case TYPEWATER:
|
case TYPEWATER:
|
||||||
spr.z += tileHeight(spr.picnum) << 5;
|
spr.z += tileHeight(spr.picnum) << 5;
|
||||||
|
@ -215,7 +215,7 @@ static void fleejudy(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void chasekatie(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -95,7 +95,7 @@ static void painkatie(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ static void attackkatie(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
case TYPEWATER:
|
case TYPEWATER:
|
||||||
spr.z += tileHeight(spr.picnum) << 5;
|
spr.z += tileHeight(spr.picnum) << 5;
|
||||||
|
@ -194,7 +194,7 @@ static void fleekatie(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ static void chasekobold(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -83,7 +83,7 @@ static void chasekobold(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -127,7 +127,7 @@ static void painkobold(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
checkexplkobold(plr, actor);
|
checkexplkobold(plr, actor);
|
||||||
|
@ -196,7 +196,7 @@ static void fleekobold(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ static void attackkobold(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit))
|
switch (checkfluid(i, zr_florHit))
|
||||||
{
|
{
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
case TYPEWATER:
|
case TYPEWATER:
|
||||||
|
@ -319,7 +319,7 @@ static void skirmishkobold(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ static void chaseminotaur(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -80,7 +80,7 @@ static void chaseminotaur(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -122,7 +122,7 @@ static void skirmishminotaur(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ static void painminotaur(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
checkexplminotaur(plr, actor);
|
checkexplminotaur(plr, actor);
|
||||||
|
@ -215,7 +215,7 @@ static void attackminotaur(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -298,7 +298,7 @@ static void fleeminotaur(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ static void chasenewguy(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -97,7 +97,7 @@ static void chasenewguy(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -155,7 +155,7 @@ static void skirmishnewguy(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ static void painnewguy(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ static void fleenewguy(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ static void attacknewguy(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
case TYPEWATER:
|
case TYPEWATER:
|
||||||
spr.z += tileHeight(spr.picnum) << 5;
|
spr.z += tileHeight(spr.picnum) << 5;
|
||||||
|
|
|
@ -71,16 +71,16 @@ static void fleerat(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
// switch (checkfluid(i, zr_florhit)) {
|
// switch (checkfluid(i, zr_florHit)) {
|
||||||
// case TYPELAVA:
|
// case TYPELAVA:
|
||||||
// case TYPEWATER:
|
// case TYPEWATER:
|
||||||
// spr.z += tileHeight(spr.picnum) << 5;
|
// spr.z += tileHeight(spr.picnum) << 5;
|
||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA2
|
|| sector[spr.sectnum].floorpicnum == LAVA2
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
|
|
@ -70,7 +70,7 @@ static void chaseskeleton(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -80,7 +80,7 @@ static void chaseskeleton(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -177,7 +177,7 @@ static void fleeskeleton(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ static void attackskeleton(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
case TYPEWATER:
|
case TYPEWATER:
|
||||||
spr.z += tileHeight(spr.picnum) << 5;
|
spr.z += tileHeight(spr.picnum) << 5;
|
||||||
|
@ -323,7 +323,7 @@ static void skirmishskeleton(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ static void chaseskully(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -107,7 +107,7 @@ static void painskully(PLAYER& plr, DWHActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
aimove(actor);
|
aimove(actor);
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ static void attackskully(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
case TYPEWATER:
|
case TYPEWATER:
|
||||||
spr.z += tileHeight(spr.picnum) << 5;
|
spr.z += tileHeight(spr.picnum) << 5;
|
||||||
|
@ -201,7 +201,7 @@ static void fleeskully(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ static void chasespider(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -80,7 +80,7 @@ static void chasespider(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA2 || sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA2 || sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -122,7 +122,7 @@ static void skirmishspider(PLAYER& plr, DWHActor* actor)
|
||||||
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
if ((spr.sectnum != osectnum) && (sector[spr.sectnum].lotag == 10))
|
||||||
warpsprite(actor);
|
warpsprite(actor);
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ static void attackspider(PLAYER& plr, DWHActor* actor)
|
||||||
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
getzrange(spr.x, spr.y, spr.z - 1, spr.sectnum, (spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
switch (checkfluid(i, zr_florhit)) {
|
switch (checkfluid(i, zr_florHit)) {
|
||||||
case TYPELAVA:
|
case TYPELAVA:
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -261,7 +261,7 @@ static void fleespider(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, false);
|
processfluid(actor, zr_florHit, false);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void chasewillow(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, true);
|
processfluid(actor, zr_florHit, true);
|
||||||
|
|
||||||
if (sector[osectnum].lotag == KILLSECTOR) {
|
if (sector[osectnum].lotag == KILLSECTOR) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
|
@ -61,7 +61,7 @@ static void chasewillow(PLAYER& plr, DWHActor* actor)
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
if (zr_florHit.type == kHitSector && (sector[spr.sectnum].floorpicnum == LAVA
|
||||||
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
|| sector[spr.sectnum].floorpicnum == LAVA1 || sector[spr.sectnum].floorpicnum == ANILAVA)) {
|
||||||
spr.hitag--;
|
spr.hitag--;
|
||||||
if (spr.hitag < 0)
|
if (spr.hitag < 0)
|
||||||
|
@ -206,7 +206,7 @@ static void fleewillow(PLAYER& plr, DWHActor* actor)
|
||||||
if (checksector6(actor))
|
if (checksector6(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processfluid(actor, zr_florhit, true);
|
processfluid(actor, zr_florHit, true);
|
||||||
|
|
||||||
SetActorPos(actor, &spr.pos);
|
SetActorPos(actor, &spr.pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,7 +197,7 @@ void GameInterface::GetInput(InputPacket* packet, ControlInfo* const hidInput)
|
||||||
|
|
||||||
void processinput(int num) {
|
void processinput(int num) {
|
||||||
|
|
||||||
int goalz, lohit = 0, loz = 0, tics, xvect, yvect;
|
int goalz, loz = 0, tics, xvect, yvect;
|
||||||
|
|
||||||
int oldposx, oldposy;
|
int oldposx, oldposy;
|
||||||
int dist;
|
int dist;
|
||||||
|
@ -246,13 +246,14 @@ void processinput(int num) {
|
||||||
getzrange(plr.x, plr.y, plr.z, plr.sector, 128, CLIPMASK0);
|
getzrange(plr.x, plr.y, plr.z, plr.sector, 128, CLIPMASK0);
|
||||||
|
|
||||||
loz = zr_florz;
|
loz = zr_florz;
|
||||||
lohit = zr_florhit;
|
auto lohit = zr_florHit;
|
||||||
|
|
||||||
sprite[plr.spritenum].cstat ^= 1;
|
sprite[plr.spritenum].cstat ^= 1;
|
||||||
|
|
||||||
if ((lohit & 0xc000) == 49152) {
|
if (lohit.type == kHitSprite) {
|
||||||
if ((sprite[lohit & 4095].z - plr.z) <= (getPlayerHeight() << 8))
|
auto& spr = lohit.actor->s();
|
||||||
onsprite = (short)(lohit & 4095);
|
if ((spr.z - plr.z) <= (getPlayerHeight() << 8))
|
||||||
|
onsprite = lohit.actor->GetSpriteIndex();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
onsprite = -1;
|
onsprite = -1;
|
||||||
|
|
|
@ -25,10 +25,14 @@ short floormirrorsector[64];
|
||||||
int floormirrorcnt;
|
int floormirrorcnt;
|
||||||
|
|
||||||
// We owe this to Java. Unfortunately WitchavenGDX was a bit sloppy with the use of its global variables so the wrapper is here to stay. :(
|
// We owe this to Java. Unfortunately WitchavenGDX was a bit sloppy with the use of its global variables so the wrapper is here to stay. :(
|
||||||
int zr_ceilz, zr_ceilhit, zr_florz, zr_florhit;
|
int zr_ceilz, zr_florz;
|
||||||
|
Collision zr_florHit;
|
||||||
void getzrange(int x, int y, int z, short sectnum, int walldist, int cliptype)
|
void getzrange(int x, int y, int z, short sectnum, int walldist, int cliptype)
|
||||||
{
|
{
|
||||||
::getzrange(x, y, z, sectnum, &zr_ceilz, &zr_ceilhit, &zr_florz, &zr_florhit, walldist, cliptype);
|
int zr_ceilhit; // The game does not use this.
|
||||||
|
int lflorhit;
|
||||||
|
::getzrange(x, y, z, sectnum, &zr_ceilz, &zr_ceilhit, &zr_florz, &lflorhit, walldist, cliptype);
|
||||||
|
zr_florHit.setFromEngine(lflorhit);
|
||||||
}
|
}
|
||||||
|
|
||||||
//This was done better. Strange.
|
//This was done better. Strange.
|
||||||
|
|
|
@ -163,7 +163,8 @@ extern uint8_t wallshadearray[MAXWALLS];
|
||||||
extern short floormirrorsector[64];
|
extern short floormirrorsector[64];
|
||||||
extern int floormirrorcnt;
|
extern int floormirrorcnt;
|
||||||
|
|
||||||
extern int zr_ceilz, zr_ceilhit, zr_florz, zr_florhit;
|
extern int zr_ceilz, zr_florz;
|
||||||
|
extern Collision zr_florHit;
|
||||||
void getzrange(int x, int y, int z, short sectnum, int walldist, int cliptype);
|
void getzrange(int x, int y, int z, short sectnum, int walldist, int cliptype);
|
||||||
|
|
||||||
struct Neartag {
|
struct Neartag {
|
||||||
|
|
|
@ -1349,7 +1349,7 @@ void newstatus(short sn, int seq) {
|
||||||
(spr.clipdist) << 2, CLIPMASK0);
|
(spr.clipdist) << 2, CLIPMASK0);
|
||||||
spr.z = zr_florz;
|
spr.z = zr_florz;
|
||||||
|
|
||||||
if ((zr_florhit & kHitTypeMask) == kHitSector) {
|
if (zr_florHit.type == kHitSector) {
|
||||||
if (spr.sectnum != MAXSECTORS && (sector[spr.sectnum].floorpicnum == WATER
|
if (spr.sectnum != MAXSECTORS && (sector[spr.sectnum].floorpicnum == WATER
|
||||||
|| sector[spr.sectnum].floorpicnum == SLIME)) {
|
|| sector[spr.sectnum].floorpicnum == SLIME)) {
|
||||||
if (spr.picnum == MINOTAURDEAD) {
|
if (spr.picnum == MINOTAURDEAD) {
|
||||||
|
|
Loading…
Reference in a new issue