mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- fixed last commit
This commit is contained in:
parent
f433c6ee11
commit
86082d4c10
5 changed files with 19 additions and 23 deletions
|
@ -919,7 +919,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
||||||
pXSprite->waitTime = bitReader.readUnsigned(12);
|
pXSprite->waitTime = bitReader.readUnsigned(12);
|
||||||
pXSprite->restState = bitReader.readUnsigned(1);
|
pXSprite->restState = bitReader.readUnsigned(1);
|
||||||
pXSprite->Interrutable = bitReader.readUnsigned(1);
|
pXSprite->Interrutable = bitReader.readUnsigned(1);
|
||||||
bitReader.readUnsigned(2);
|
pXSprite->unused1 = bitReader.readUnsigned(2);
|
||||||
pXSprite->respawnPending = bitReader.readUnsigned(2);
|
pXSprite->respawnPending = bitReader.readUnsigned(2);
|
||||||
pXSprite->unused2 = bitReader.readUnsigned(1);
|
pXSprite->unused2 = bitReader.readUnsigned(1);
|
||||||
pXSprite->lT = bitReader.readUnsigned(1);
|
pXSprite->lT = bitReader.readUnsigned(1);
|
||||||
|
|
|
@ -131,6 +131,7 @@ struct XSPRITE {
|
||||||
uint8_t lSkill; // Launch 12345
|
uint8_t lSkill; // Launch 12345
|
||||||
uint8_t lockMsg; // Lock msg
|
uint8_t lockMsg; // Lock msg
|
||||||
int8_t dodgeDir; // Dude dodge direction
|
int8_t dodgeDir; // Dude dodge direction
|
||||||
|
uint8_t unused1; // modern flags
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -567,6 +567,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, XSPRITE& w, XSPRIT
|
||||||
("lskill", w.lSkill, def->lSkill)
|
("lskill", w.lSkill, def->lSkill)
|
||||||
("lockmsg", w.lockMsg, def->lockMsg)
|
("lockmsg", w.lockMsg, def->lockMsg)
|
||||||
("dodgedir", w.dodgeDir, def->dodgeDir)
|
("dodgedir", w.dodgeDir, def->dodgeDir)
|
||||||
|
("modernflags", w.unused1, def->unused1)
|
||||||
.EndObject();
|
.EndObject();
|
||||||
}
|
}
|
||||||
return arc;
|
return arc;
|
||||||
|
|
|
@ -991,10 +991,10 @@ void nnExtProcessSuperSprites() {
|
||||||
if ((gSpriteHit[pPlayer->pSprite->extra].hit & 0xc000) == 0xc000 && (gSpriteHit[pPlayer->pSprite->extra].hit & 0x3fff) == idx) {
|
if ((gSpriteHit[pPlayer->pSprite->extra].hit & 0xc000) == 0xc000 && (gSpriteHit[pPlayer->pSprite->extra].hit & 0x3fff) == idx) {
|
||||||
|
|
||||||
int nSpeed = approxDist(xvel[pPlayer->pSprite->index], yvel[pPlayer->pSprite->index]);
|
int nSpeed = approxDist(xvel[pPlayer->pSprite->index], yvel[pPlayer->pSprite->index]);
|
||||||
nSpeed = ClipLow(nSpeed - mulscale(nSpeed, mass, 6), 0x9000 - (mass << 3));
|
nSpeed = ClipLow(nSpeed - MulScale(nSpeed, mass, 6), 0x9000 - (mass << 3));
|
||||||
|
|
||||||
xvel[idx] += mulscale30(nSpeed, Cos(pPlayer->pSprite->ang));
|
xvel[idx] += MulScale(nSpeed, Cos(pPlayer->pSprite->ang), 30);
|
||||||
yvel[idx] += mulscale30(nSpeed, Sin(pPlayer->pSprite->ang));
|
yvel[idx] += MulScale(nSpeed, Sin(pPlayer->pSprite->ang), 30);
|
||||||
|
|
||||||
gSpriteHit[pDebris->extra].hit = pPlayer->pSprite->index | 0xc000;
|
gSpriteHit[pDebris->extra].hit = pPlayer->pSprite->index | 0xc000;
|
||||||
|
|
||||||
|
@ -1208,10 +1208,10 @@ void debrisBubble(int nSprite) {
|
||||||
GetSpriteExtents(pSprite, &top, &bottom);
|
GetSpriteExtents(pSprite, &top, &bottom);
|
||||||
for (int i = 0; i < 1 + Random(5); i++) {
|
for (int i = 0; i < 1 + Random(5); i++) {
|
||||||
|
|
||||||
int nDist = (pSprite->xrepeat * (tilesiz[pSprite->picnum].x >> 1)) >> 2;
|
int nDist = (pSprite->xrepeat * (tileWidth(pSprite->picnum) >> 1)) >> 2;
|
||||||
int nAngle = Random(2048);
|
int nAngle = Random(2048);
|
||||||
int x = pSprite->x + mulscale30(nDist, Cos(nAngle));
|
int x = pSprite->x + MulScale(nDist, Cos(nAngle), 30);
|
||||||
int y = pSprite->y + mulscale30(nDist, Sin(nAngle));
|
int y = pSprite->y + MulScale(nDist, Sin(nAngle), 30);
|
||||||
int z = bottom - Random(bottom - top);
|
int z = bottom - Random(bottom - top);
|
||||||
spritetype* pFX = gFX.fxSpawn((FX_ID)(FX_23 + Random(3)), pSprite->sectnum, x, y, z, 0);
|
spritetype* pFX = gFX.fxSpawn((FX_ID)(FX_23 + Random(3)), pSprite->sectnum, x, y, z, 0);
|
||||||
if (pFX) {
|
if (pFX) {
|
||||||
|
@ -1312,7 +1312,7 @@ void debrisMove(int listIndex) {
|
||||||
|
|
||||||
if (gLowerLink[nSector] >= 0) cz += (cz < 0) ? 0x500 : -0x500;
|
if (gLowerLink[nSector] >= 0) cz += (cz < 0) ? 0x500 : -0x500;
|
||||||
if (top > cz && (!(pXDebris->physAttr & kPhysDebrisFloat) || fz <= bottom << 2))
|
if (top > cz && (!(pXDebris->physAttr & kPhysDebrisFloat) || fz <= bottom << 2))
|
||||||
zvel[nSprite] -= divscale8((bottom - ceilZ) >> 6, mass);
|
zvel[nSprite] -= DivScale((bottom - ceilZ) >> 6, mass, 8);
|
||||||
|
|
||||||
if (fz < bottom)
|
if (fz < bottom)
|
||||||
vc = 58254 + ((bottom - fz) * -80099) / div;
|
vc = 58254 + ((bottom - fz) * -80099) / div;
|
||||||
|
@ -1378,7 +1378,7 @@ void debrisMove(int listIndex) {
|
||||||
if ((pFX2 = gFX.fxSpawn(FX_14, pFX->sectnum, pFX->x, pFX->y, pFX->z, 0)) == NULL) continue;
|
if ((pFX2 = gFX.fxSpawn(FX_14, pFX->sectnum, pFX->x, pFX->y, pFX->z, 0)) == NULL) continue;
|
||||||
xvel[pFX2->index] = Random2(0x6aaaa);
|
xvel[pFX2->index] = Random2(0x6aaaa);
|
||||||
yvel[pFX2->index] = Random2(0x6aaaa);
|
yvel[pFX2->index] = Random2(0x6aaaa);
|
||||||
zvel[pFX2->index] = -Random(0xd5555);
|
zvel[pFX2->index] = -(int)Random(0xd5555);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kSurfWater:
|
case kSurfWater:
|
||||||
|
@ -1405,7 +1405,7 @@ void debrisMove(int listIndex) {
|
||||||
gSpriteHit[nXSprite].ceilhit = moveHit = ceilHit;
|
gSpriteHit[nXSprite].ceilhit = moveHit = ceilHit;
|
||||||
pSprite->z += ClipLow(ceilZ - top, 0);
|
pSprite->z += ClipLow(ceilZ - top, 0);
|
||||||
if (zvel[nSprite] <= 0 && (pXDebris->physAttr & kPhysFalling))
|
if (zvel[nSprite] <= 0 && (pXDebris->physAttr & kPhysFalling))
|
||||||
zvel[nSprite] = MulScale(-zvel[nSprite], 0x2000);
|
zvel[nSprite] = MulScale(-zvel[nSprite], 0x2000, 16);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -3443,6 +3443,7 @@ bool condCheckSprite(XSPRITE* pXCond, int cmpOp, bool PUSH) {
|
||||||
|
|
||||||
spritetype* pSpr = &sprite[objIndex];
|
spritetype* pSpr = &sprite[objIndex];
|
||||||
XSPRITE* pXSpr = (xspriRangeIsFine(pSpr->extra)) ? &xsprite[pSpr->extra] : NULL;
|
XSPRITE* pXSpr = (xspriRangeIsFine(pSpr->extra)) ? &xsprite[pSpr->extra] : NULL;
|
||||||
|
DBloodActor* spractor = &bloodActors[pXSpr->reference];
|
||||||
|
|
||||||
if (cond < (kCondRange >> 1)) {
|
if (cond < (kCondRange >> 1)) {
|
||||||
switch (cond) {
|
switch (cond) {
|
||||||
|
@ -3487,7 +3488,7 @@ bool condCheckSprite(XSPRITE* pXCond, int cmpOp, bool PUSH) {
|
||||||
if ((pPlayer = getPlayerById(pSpr->type)) != NULL)
|
if ((pPlayer = getPlayerById(pSpr->type)) != NULL)
|
||||||
var = HitScan(pSpr, pPlayer->zWeapon - pSpr->z, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, arg1, arg3 << 1);
|
var = HitScan(pSpr, pPlayer->zWeapon - pSpr->z, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, arg1, arg3 << 1);
|
||||||
else if (IsDudeSprite(pSpr))
|
else if (IsDudeSprite(pSpr))
|
||||||
var = HitScan(pSpr, pSpr->z, Cos(pSpr->ang) >> 16, Sin(pSpr->ang) >> 16, (!xspriRangeIsFine(pSpr->extra)) ? 0 : gDudeSlope[pSpr->extra], arg1, arg3 << 1);
|
var = HitScan(pSpr, pSpr->z, Cos(pSpr->ang) >> 16, Sin(pSpr->ang) >> 16, (!xspriRangeIsFine(pSpr->extra)) ? 0 : spractor->dudeSlope, arg1, arg3 << 1);
|
||||||
else if (var2 & CSTAT_SPRITE_ALIGNMENT_FLOOR) {
|
else if (var2 & CSTAT_SPRITE_ALIGNMENT_FLOOR) {
|
||||||
|
|
||||||
if (var3 == 0) {
|
if (var3 == 0) {
|
||||||
|
@ -4132,7 +4133,7 @@ void sectorContinueMotion(int nSector, EVENT event) {
|
||||||
|
|
||||||
if (!xsectRangeIsFine(sector[nSector].extra)) return;
|
if (!xsectRangeIsFine(sector[nSector].extra)) return;
|
||||||
else if (gBusyCount >= kMaxBusyCount) {
|
else if (gBusyCount >= kMaxBusyCount) {
|
||||||
consoleSysMsg("Failed to continue motion for sector #%d. Max (%d) busy objects count reached!", nSector, kMaxBusyCount);
|
Printf(PRINT_HIGH, "Failed to continue motion for sector #%d. Max (%d) busy objects count reached!", nSector, kMaxBusyCount);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,19 +49,12 @@ enum
|
||||||
kMaxTracedObjects = 32, // per one tracking condition
|
kMaxTracedObjects = 32, // per one tracking condition
|
||||||
|
|
||||||
// additional physics attributes for debris sprites
|
// additional physics attributes for debris sprites
|
||||||
kPhysDebrisFly = 0x0008, // *debris* affected by negative gravity (fly instead of falling, DO NOT mess with kHitagAutoAim)
|
kPhysDebrisFloat = 0x0008, // *debris* slowly goes up and down from it's position
|
||||||
kPhysDebrisSwim = 0x0016, // *debris* can swim underwater (instead of drowning)
|
kPhysDebrisFly = 0x0010, // *debris* affected by negative gravity (fly instead of falling)
|
||||||
|
kPhysDebrisSwim = 0x0020, // *debris* can swim underwater (instead of drowning)
|
||||||
|
kPhysDebrisTouch = 0x0040, // *debris* can be moved via touch
|
||||||
kPhysDebrisVector = 0x0400, // *debris* can be affected by vector weapons
|
kPhysDebrisVector = 0x0400, // *debris* can be affected by vector weapons
|
||||||
kPhysDebrisExplode = 0x0800, // *debris* can be affected by explosions
|
kPhysDebrisExplode = 0x0800, // *debris* can be affected by explosions
|
||||||
/*
|
|
||||||
// additional physics attributes for debris sprites
|
|
||||||
#define kPhysDebrisFloat 0x0008 // *debris* slowly goes up and down from it's position
|
|
||||||
#define kPhysDebrisFly 0x0010 // *debris* affected by negative gravity (fly instead of falling)
|
|
||||||
#define kPhysDebrisSwim 0x0020 // *debris* can swim underwater (instead of drowning)
|
|
||||||
#define kPhysDebrisTouch 0x0040 // *debris* can be moved via touch
|
|
||||||
//#define kPhysDebrisPush 0x0080 // *debris* can be moved via push
|
|
||||||
#define kPhysDebrisVector 0x0400 // *debris* can be affected by vector weapons
|
|
||||||
*/
|
|
||||||
|
|
||||||
// *modern types only hitag*
|
// *modern types only hitag*
|
||||||
kModernTypeFlag0 = 0x0000,
|
kModernTypeFlag0 = 0x0000,
|
||||||
|
|
Loading…
Reference in a new issue