- manual update of some missed content.

This commit is contained in:
Christoph Oelckers 2020-05-22 18:28:03 +02:00
parent f60fa44efb
commit 6a0785bbd4
10 changed files with 429 additions and 366 deletions

View file

@ -2262,9 +2262,9 @@ const THINGINFO thingInfo[] = {
800,
(char)-128,
0,
48,
48,
64, 64, 112, 64, 0, 96, 96,
44,
44,
0, 1024, 512, 1024, 0, 64, 512,
},
};
@ -2359,7 +2359,7 @@ const EXPLOSION explodeInfo[] = {
},
};
int gDudeDrag = 0x2a00;
short gAffectedSectors[kMaxSectors];
short gAffectedXWalls[kMaxXWalls];
@ -5260,7 +5260,8 @@ void actExplodeSprite(spritetype *pSprite)
return;
sfxKill3DSound(pSprite, -1, -1);
evKill(pSprite->index, 3);
int nType;
int nType = kExplosionStandard;
switch (pSprite->type)
{
case kMissileFireballNapam:

View file

@ -365,14 +365,14 @@ static void ThrowThing(int nXIndex, bool impact) {
case kModernThingEnemyLifeLeech:
XSPRITE* pXThing = &xsprite[pThing->extra];
if (pLeech != NULL) pXThing->health = pXLeech->health;
else pXThing->health = 300 * gGameOptions.nDifficulty;
else pXThing->health = ((pThinkInfo->startHealth << 4) * gGameOptions.nDifficulty) >> 1;
sfxPlay3DSound(pSprite, 490, -1, 0);
if (gGameOptions.nDifficulty <= 2) pXThing->data3 = 32700;
else pXThing->data3 = Random(10);
pXThing->data3 = 512 / (gGameOptions.nDifficulty + 1);
pThing->cstat &= ~CSTAT_SPRITE_BLOCK;
pThing->pal = 6;
pThing->clipdist = 0;
pXThing->target = pTarget->index;
pXThing->Proximity = true;
pXThing->stateTimer = 1;
@ -438,17 +438,19 @@ static void thinkChase( spritetype* pSprite, XSPRITE* pXSprite ) {
if (pXTarget == NULL) { // target lost
if(spriteIsUnderwater(pSprite,false)) aiGenDudeNewState(pSprite, &genDudeSearchShortW);
else aiGenDudeNewState(pSprite, &genDudeSearchShortL);
pXSprite->target = -1;
return;
} else if (pXTarget->health <= 0) { // target is dead
PLAYER* pPlayer = NULL;
if ((!IsPlayerSprite(pTarget)) || ((pPlayer = getPlayerById(pTarget->type)) != NULL && pPlayer->fraggerId == pSprite->index)) {
playGenDudeSound(pSprite, kGenDudeSndTargetDead);
if (spriteIsUnderwater(pSprite, false)) aiGenDudeNewState(pSprite, &genDudeSearchShortW);
else aiGenDudeNewState(pSprite, &genDudeSearchShortL);
playGenDudeSound(pSprite, kGenDudeSndTargetDead);
if (spriteIsUnderwater(pSprite, false)) aiGenDudeNewState(pSprite, &genDudeSearchShortW);
else aiGenDudeNewState(pSprite, &genDudeSearchShortL);
}
else if (spriteIsUnderwater(pSprite, false)) aiGenDudeNewState(pSprite, &genDudeGotoW);
else aiGenDudeNewState(pSprite, &genDudeGotoL);
pXSprite->target = -1;
return;
}
@ -477,6 +479,7 @@ static void thinkChase( spritetype* pSprite, XSPRITE* pXSprite ) {
if (powerupCheck(pPlayer, kPwUpShadowCloak) > 0) {
if (spriteIsUnderwater(pSprite, false)) aiGenDudeNewState(pSprite, &genDudeSearchShortW);
else aiGenDudeNewState(pSprite, &genDudeSearchShortL);
pXSprite->target = -1;
return;
}
}
@ -1388,57 +1391,57 @@ void scaleDamage(XSPRITE* pXSprite) {
switch (surfType) {
case 1: // stone
curScale[kDmgFall] = 0;
curScale[kDmgBullet] -= 128;
curScale[kDmgBurn] -= 50;
curScale[kDmgExplode] -= 40;
curScale[kDmgBullet] -= 200;
curScale[kDmgBurn] -= 100;
curScale[kDmgExplode] -= 80;
curScale[kDmgChoke] += 30;
curScale[kDmgElectric] += 20;
break;
case 2: // metal
curScale[kDmgFall] = 16;
curScale[kDmgBullet] -= 64;
curScale[kDmgBurn] -= 45;
curScale[kDmgExplode] -= 35;
curScale[kDmgBullet] -= 128;
curScale[kDmgBurn] -= 90;
curScale[kDmgExplode] -= 55;
curScale[kDmgChoke] += 20;
curScale[kDmgElectric] += 30;
break;
case 3: // wood
curScale[kDmgBullet] -= 5;
curScale[kDmgBullet] -= 10;
curScale[kDmgBurn] += 50;
curScale[kDmgExplode] += 40;
curScale[kDmgChoke] += 10;
curScale[kDmgElectric] -= 30;
curScale[kDmgElectric] -= 60;
break;
case 5: // water
case 6: // dirt
case 7: // clay
case 13: // goo
curScale[kDmgFall] = 8;
curScale[kDmgBullet] -= 10;
curScale[kDmgBurn] -= 128;
curScale[kDmgExplode] -= 30;
curScale[kDmgBullet] -= 20;
curScale[kDmgBurn] -= 200;
curScale[kDmgExplode] -= 60;
curScale[kDmgChoke] = 0;
curScale[kDmgElectric] += 40;
break;
case 8: // snow
case 9: // ice
curScale[kDmgFall] = 8;
curScale[kDmgBullet] -= 10;
curScale[kDmgBurn] -= 60;
curScale[kDmgExplode] -= 40;
curScale[kDmgBullet] -= 20;
curScale[kDmgBurn] -= 100;
curScale[kDmgExplode] -= 50;
curScale[kDmgChoke] = 0;
curScale[kDmgElectric] += 40;
break;
case 10: // leaves
case 12: // plant
curScale[kDmgFall] = 0;
curScale[kDmgBullet] -= 5;
curScale[kDmgBullet] -= 10;
curScale[kDmgBurn] += 70;
curScale[kDmgExplode] += 50;
break;
case 11: // cloth
curScale[kDmgFall] = 8;
curScale[kDmgBullet] -= 5;
curScale[kDmgBullet] -= 10;
curScale[kDmgBurn] += 30;
curScale[kDmgExplode] += 20;
break;
@ -2116,7 +2119,7 @@ bool genDudePrepare(spritetype* pSprite, int propId) {
pExtra->nLifeLeech = -1;
if (pSprite->owner != kMaxSprites - 1) {
for (int nSprite = headspritestat[kStatThing]; nSprite >= 0; nSprite = nextspritestat[nSprite]) {
if (sprite[nSprite].owner == pSprite->index && pSprite->type == kModernThingEnemyLifeLeech) {
if (sprite[nSprite].owner == pSprite->index && sprite[nSprite].type == kModernThingEnemyLifeLeech) {
pExtra->nLifeLeech = nSprite;
break;
}

View file

@ -38,6 +38,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_BLD_NS
bool gModernMap = false;
unsigned short gStatCount[kMaxStatus + 1];
XSPRITE xsprite[kMaxXSprites];

File diff suppressed because it is too large Load diff

View file

@ -195,6 +195,7 @@ struct OBJECTS_TO_TRACK {
};
struct TRCONDITION {
signed int xindex: 16;
unsigned int length: 8;
OBJECTS_TO_TRACK obj[kMaxTracedObjects];
};
@ -289,7 +290,7 @@ void seqTxSendCmdAll(XSPRITE* pXSource, int nIndex, COMMAND_ID cmd, bool modernS
// ------------------------------------------------------------------------- //
void trPlayerCtrlLink(XSPRITE* pXSource, PLAYER* pPlayer, bool checkCondition);
void trPlayerCtrlSetRace(XSPRITE* pXSource, PLAYER* pPlayer);
void trPlayerCtrlStartScene(XSPRITE* pXSource, PLAYER* pPlayer);
void trPlayerCtrlStartScene(XSPRITE* pXSource, PLAYER* pPlayer, bool force);
void trPlayerCtrlStopScene(PLAYER* pPlayer);
void trPlayerCtrlSetMoveSpeed(XSPRITE* pXSource, PLAYER* pPlayer);
void trPlayerCtrlSetJumpHeight(XSPRITE* pXSource, PLAYER* pPlayer);

View file

@ -569,20 +569,6 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT event)
}
}
break;
/*if (pSprite->statnum != kStatRespawn) {
switch (event.cmd) {
case kCmdOn:
actExplodeSprite(pSprite);
break;
default:
sfxPlay3DSound(pSprite, 454, 0, 0);
evPost(nSprite, 3, 18, kCmdOff);
break;
}
}*/
break;
case kThingArmedProxBomb:
if (pSprite->statnum != kStatRespawn) {
switch (event.cmd) {
@ -2157,10 +2143,6 @@ void trInit(void)
if (pXSprite->waitTime > 0)
evPost(i, 3, (pXSprite->waitTime * 120) / 10, pXSprite->restState ? kCmdOn : kCmdOff);
break;
case kModernCondition:
if (pXSprite->busyTime <= 0 || pXSprite->locked) break;
evPost(i, 3, ClipLow(pXSprite->busyTime, 5), kCallbackCondition);
break;
#endif
case kGenTrigger:
case kGenDripWater:

View file

@ -2419,12 +2419,12 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
pTSprite->ang = (pTSprite->ang+((int)totalclock<<3))&2047;
}
if ((pTSprite->cstat&48) != 48 && usemodels && !(spriteext[nSprite].flags&SPREXT_NOTMD))
if ((pTSprite->cstat&48) != 48 && hw_models && !(spriteext[nSprite].flags&SPREXT_NOTMD))
{
int const nRootTile = pTSprite->picnum;
int nAnimTile = pTSprite->picnum + animateoffs_replace(pTSprite->picnum, 32768+pTSprite->owner);
if (usemodels && tile2model[Ptile2tile(nAnimTile, pTSprite->pal)].modelid >= 0 &&
if (tile2model[Ptile2tile(nAnimTile, pTSprite->pal)].modelid >= 0 &&
tile2model[Ptile2tile(nAnimTile, pTSprite->pal)].framenum >= 0)
{
pTSprite->yoffset += picanm[nAnimTile].yofs;

View file

@ -1,5 +1,6 @@
#pragma once
#include <memory>
#include "c_cvars.h"
#include "zstring.h"
#include "inputstate.h"

View file

@ -95,7 +95,7 @@ int32_t FileStream::Seek(int32_t offset, SeekDirection direction)
nStatus = file.Seek(offset, FileReader::SeekCur);
}
else if (kSeekEnd == direction) {
nStatus = klseek(file, offset, SEEK_END);
nStatus = file.Seek(offset, FileReader::SeekEnd);
}
return nStatus;

View file

@ -47,13 +47,9 @@
#ifndef playmve_h_
#define playmve_h_
#include "a.h"
#include "baselayer.h"
#include "build.h"
#include "cache1d.h"
#include "compat.h"
#include "fx_man.h"
#include "keyboard.h"
#include "pragmas.h"
bool playmve(const char* filename);