mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +00:00
- silenced warnings in Blood.
This commit is contained in:
parent
d097c8e635
commit
3e2cacfaf6
14 changed files with 51 additions and 52 deletions
|
@ -148,7 +148,7 @@ RORHACK:
|
|||
for (int i = 0; i < 16; i++)
|
||||
ror_status[i] = testgotpic(4080 + i);
|
||||
fixed_t deliriumPitchI = interpolatedvalue(IntToFixed(deliriumPitchO), IntToFixed(deliriumPitch), gInterpolate);
|
||||
DrawMirrors(cX, cY, cZ, cA.asq16(), cH.asq16() + deliriumPitchI, gInterpolate, gViewIndex);
|
||||
DrawMirrors(cX, cY, cZ, cA.asq16(), cH.asq16() + deliriumPitchI, int(gInterpolate), gViewIndex);
|
||||
int bakCstat = gView->pSprite->cstat;
|
||||
if (gViewPos == 0)
|
||||
{
|
||||
|
@ -160,7 +160,7 @@ RORHACK:
|
|||
}
|
||||
|
||||
renderDrawRoomsQ16(cX, cY, cZ, cA.asq16(), cH.asq16() + deliriumPitchI, nSectnum);
|
||||
viewProcessSprites(pm_tsprite, pm_spritesortcnt, cX, cY, cZ, cA.asbuild(), gInterpolate);
|
||||
viewProcessSprites(pm_tsprite, pm_spritesortcnt, cX, cY, cZ, cA.asbuild(), int(gInterpolate));
|
||||
bool do_ror_hack = false;
|
||||
for (int i = 0; i < 16; i++)
|
||||
if (ror_status[i] != testgotpic(4080 + i))
|
||||
|
@ -176,7 +176,7 @@ RORHACK:
|
|||
renderDrawMasks();
|
||||
pm_spritesortcnt = nSpriteSortCnt;
|
||||
setPortalFlags(0);
|
||||
processSpritesOnOtherSideOfPortal(cX, cY, gInterpolate);
|
||||
processSpritesOnOtherSideOfPortal(cX, cY, int(gInterpolate));
|
||||
renderDrawMasks();
|
||||
gView->pSprite->cstat = bakCstat;
|
||||
|
||||
|
|
|
@ -1003,7 +1003,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
|||
GENDUDEEXTRA* pExtra = genDudeExtra(pSprite);
|
||||
|
||||
if (nDmgType == DAMAGE_TYPE_1) {
|
||||
if (pXSprite->health > pDudeInfo->fleeHealth) break;
|
||||
if (pXSprite->health > (unsigned)pDudeInfo->fleeHealth) break;
|
||||
else if (pXSprite->txID <= 0 || getNextIncarnation(pXSprite) == NULL) {
|
||||
removeDudeStuff(pSprite);
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ static void beastThinkChase(DBloodActor* actor)
|
|||
else
|
||||
pXSector = NULL;
|
||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||
if (pXTarget->health > gPlayerTemplate[0].startHealth/2)
|
||||
if (pXTarget->health > (unsigned)gPlayerTemplate[0].startHealth/2)
|
||||
{
|
||||
switch (hit)
|
||||
{
|
||||
|
|
|
@ -138,7 +138,7 @@ void AddCmdDefine(char *text, int value)
|
|||
|
||||
static void SplitPath(const char *pzPath, char *pzDirectory, char *pzFile, char *pzType)
|
||||
{
|
||||
int const nLength = strlen(pzPath);
|
||||
int const nLength = (int)strlen(pzPath);
|
||||
const char *pDirectory = pzPath+nLength;
|
||||
const char *pDot = NULL;
|
||||
for (int i = nLength-1; i >= 0; i--)
|
||||
|
@ -217,7 +217,7 @@ int RFS::Open(int lumpnum)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int fileSize = hFile.GetLength();
|
||||
int fileSize = (int)hFile.GetLength();
|
||||
buffer.Resize(fileSize);
|
||||
_ptr = buffer.Data();
|
||||
if (_ptr == NULL) {
|
||||
|
@ -890,7 +890,7 @@ void ParseScript(int lumpnum)
|
|||
case kTagString:
|
||||
{
|
||||
memcpy(&buffer[nBytes], scriptBuffer, strlen(scriptBuffer) + 1);
|
||||
nBytes += strlen(scriptBuffer) + 1;
|
||||
nBytes += (int)strlen(scriptBuffer) + 1;
|
||||
break;
|
||||
}
|
||||
case kTagConstant:
|
||||
|
|
|
@ -712,7 +712,7 @@ void callbackCondition(int nSprite) {
|
|||
if (pXSprite->isTriggered) return;
|
||||
|
||||
TRCONDITION* pCond = &gCondition[pXSprite->sysData1];
|
||||
for (int i = 0; i < pCond->length; i++) {
|
||||
for (unsigned i = 0; i < pCond->length; i++) {
|
||||
EVENT evn; evn.index = pCond->obj[i].index; evn.type = pCond->obj[i].type;
|
||||
evn.cmd = pCond->obj[i].cmd; evn.funcID = kCallbackCondition;
|
||||
useCondition(&sprite[pXSprite->reference], pXSprite, evn);
|
||||
|
|
|
@ -200,18 +200,18 @@ static void SortRXBucket(int nCount)
|
|||
vbx++;
|
||||
}
|
||||
RXBUCKET* v2c = pArray + nCount;
|
||||
int vt = ClipHigh(vbx - first, first - pArray);
|
||||
int vt = int(min(vbx - first, first - pArray));
|
||||
for (int i = 0; i < vt; i++)
|
||||
{
|
||||
SortSwap(&vbx[i - vt], &pArray[i]);
|
||||
}
|
||||
vt = ClipHigh(last - v4, v2c - last - 1);
|
||||
vt = int(min(last - v4, v2c - last - 1));
|
||||
for (int i = 0; i < vt; i++)
|
||||
{
|
||||
SortSwap(&v2c[i - vt], &vbx[i]);
|
||||
}
|
||||
int vvsi = last - v4;
|
||||
int vvdi = vbx - first;
|
||||
int vvsi = int(last - v4);
|
||||
int vvdi = int(vbx - first);
|
||||
if (vvsi >= vvdi)
|
||||
{
|
||||
vc4[v14] = vvsi;
|
||||
|
|
|
@ -127,14 +127,14 @@ void hudDraw(PLAYER *gView, int nSectnum, double bobx, double boby, double zDelt
|
|||
}
|
||||
|
||||
#ifdef NOONE_EXTENSIONS
|
||||
if (gView->sceneQav < 0) WeaponDraw(gView, nShade, cX, cY, nPalette, smoothratio);
|
||||
else if (gView->pXSprite->health > 0) playerQavSceneDraw(gView, nShade, cX, cY, nPalette, smoothratio);
|
||||
if (gView->sceneQav < 0) WeaponDraw(gView, nShade, cX, cY, nPalette, int(smoothratio));
|
||||
else if (gView->pXSprite->health > 0) playerQavSceneDraw(gView, nShade, cX, cY, nPalette, int(smoothratio));
|
||||
else {
|
||||
gView->sceneQav = gView->weaponQav = -1;
|
||||
gView->weaponTimer = gView->curWeapon = 0;
|
||||
}
|
||||
#else
|
||||
WeaponDraw(gView, nShade, cX, cY, nPalette, smoothratio);
|
||||
WeaponDraw(gView, nShade, cX, cY, nPalette, int(smoothratio));
|
||||
#endif
|
||||
}
|
||||
if (gViewPos == 0 && gView->pXSprite->burnTime > 60)
|
||||
|
|
|
@ -171,7 +171,6 @@ void IniFile::Load()
|
|||
auto fp = fileSystem.OpenFileReader(fileName);
|
||||
if (fp.isOpen())
|
||||
{
|
||||
int nSize = fp.GetLength();
|
||||
auto pBuffer = fp.Read();
|
||||
LoadRes(pBuffer.Data());
|
||||
}
|
||||
|
|
|
@ -229,7 +229,7 @@ void nnExtResetGlobals() {
|
|||
if (gTrackingCondsCount > 0) {
|
||||
for (int i = 0; i < gTrackingCondsCount; i++) {
|
||||
TRCONDITION* pCond = &gCondition[i];
|
||||
for (int k = 0; k < pCond->length; k++) {
|
||||
for (unsigned k = 0; k < pCond->length; k++) {
|
||||
pCond->obj[k].index = pCond->obj[k].cmd = 0;
|
||||
pCond->obj[k].type = -1;
|
||||
}
|
||||
|
@ -716,7 +716,7 @@ spritetype* randomDropPickupObject(spritetype* pSource, short prevItem) {
|
|||
pSprite2 = actDropObject(pSource, selected);
|
||||
if (pSprite2 != NULL) {
|
||||
|
||||
pXSource->dropMsg = pSprite2->type; // store dropped item type in dropMsg
|
||||
pXSource->dropMsg = uint8_t(pSprite2->type); // store dropped item type in dropMsg
|
||||
pSprite2->x = pSource->x;
|
||||
pSprite2->y = pSource->y;
|
||||
pSprite2->z = pSource->z;
|
||||
|
@ -763,7 +763,7 @@ void nnExtProcessSuperSprites() {
|
|||
if (pCond->length > 0 && !pXCond->locked && !pXCond->isTriggered && ++pXCond->busy >= pXCond->busyTime) {
|
||||
|
||||
pXCond->busy = 0;
|
||||
for (int k = 0; k < pCond->length; k++) {
|
||||
for (unsigned k = 0; k < pCond->length; k++) {
|
||||
|
||||
EVENT evn;
|
||||
evn.index = pCond->obj[k].index; evn.cmd = pCond->obj[k].cmd;
|
||||
|
@ -1400,7 +1400,7 @@ void trPlayerCtrlLink(XSPRITE* pXSource, PLAYER* pPlayer, bool checkCondition) {
|
|||
continue;
|
||||
|
||||
// search for player control sprite and replace it with actual player sprite
|
||||
for (int k = 0; k < pCond->length; k++) {
|
||||
for (unsigned k = 0; k < pCond->length; k++) {
|
||||
if (pCond->obj[k].type != OBJ_SPRITE || pCond->obj[k].index != pXSource->reference) continue;
|
||||
pCond->obj[k].index = pPlayer->nSprite;
|
||||
pCond->obj[k].cmd = pPlayer->pXSprite->command;
|
||||
|
@ -1638,16 +1638,16 @@ void useObjResizer(XSPRITE* pXSource, short objType, int objIndex) {
|
|||
// for sectors
|
||||
case 6:
|
||||
if (valueIsBetween(pXSource->data1, -1, 32767))
|
||||
sector[objIndex].floorxpan_ = ClipRange(pXSource->data1, 0, 255);
|
||||
sector[objIndex].floorxpan_ = (float)ClipRange(pXSource->data1, 0, 255);
|
||||
|
||||
if (valueIsBetween(pXSource->data2, -1, 32767))
|
||||
sector[objIndex].floorypan_ = ClipRange(pXSource->data2, 0, 255);
|
||||
sector[objIndex].floorypan_ = (float)ClipRange(pXSource->data2, 0, 255);
|
||||
|
||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||
sector[objIndex].ceilingxpan_ = ClipRange(pXSource->data3, 0, 255);
|
||||
sector[objIndex].ceilingxpan_ = (float)ClipRange(pXSource->data3, 0, 255);
|
||||
|
||||
if (valueIsBetween(pXSource->data4, -1, 65535))
|
||||
sector[objIndex].ceilingypan_ = ClipRange(pXSource->data4, 0, 255);
|
||||
sector[objIndex].ceilingypan_ = (float)ClipRange(pXSource->data4, 0, 255);
|
||||
break;
|
||||
// for sprites
|
||||
case 3:
|
||||
|
@ -1698,10 +1698,10 @@ void useObjResizer(XSPRITE* pXSource, short objType, int objIndex) {
|
|||
wall[objIndex].yrepeat = ClipRange(pXSource->data2, 0, 255);
|
||||
|
||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||
wall[objIndex].xpan_ = ClipRange(pXSource->data3, 0, 255);
|
||||
wall[objIndex].xpan_ = (float)ClipRange(pXSource->data3, 0, 255);
|
||||
|
||||
if (valueIsBetween(pXSource->data4, -1, 65535))
|
||||
wall[objIndex].ypan_ = ClipRange(pXSource->data4, 0, 255);
|
||||
wall[objIndex].ypan_ = (float)ClipRange(pXSource->data4, 0, 255);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2314,7 +2314,7 @@ void useSpriteDamager(XSPRITE* pXSource, spritetype* pSprite) {
|
|||
}
|
||||
|
||||
if (dmgType >= kDmgFall) {
|
||||
if (dmg < pXSprite->health << 4) {
|
||||
if (dmg < (int)pXSprite->health << 4) {
|
||||
if (nnExtIsImmune(pSprite, dmgType, 0)) {
|
||||
Printf(PRINT_HIGH, "Dude type %d is immune to damage type %d!", pSprite->type, dmgType);
|
||||
return;
|
||||
|
@ -3201,7 +3201,7 @@ void condUpdateObjectIndex(int objType, int oldIndex, int newIndex) {
|
|||
for (int i = 0; i < gTrackingCondsCount; i++) {
|
||||
|
||||
TRCONDITION* pCond = &gCondition[i];
|
||||
for (int k = 0; k < pCond->length; k++) {
|
||||
for (unsigned k = 0; k < pCond->length; k++) {
|
||||
if (pCond->obj[k].type != objType || pCond->obj[k].index != oldIndex) continue;
|
||||
pCond->obj[k].index = newIndex;
|
||||
break;
|
||||
|
@ -3851,7 +3851,7 @@ bool modernTypeOperateSprite(int nSprite, spritetype* pSprite, XSPRITE* pXSprite
|
|||
else evPost(nSprite, 3, 0, kCmdOff);
|
||||
break;
|
||||
}
|
||||
pXSprite->dropMsg = pXSprite->data4;
|
||||
pXSprite->dropMsg = uint8_t(pXSprite->data4);
|
||||
return true;
|
||||
case kModernObjDataAccumulator:
|
||||
switch (event.cmd) {
|
||||
|
@ -4352,7 +4352,7 @@ void useSoundGen(spritetype* pSource, XSPRITE* pXSource) {
|
|||
|
||||
void useIncDecGen(XSPRITE* pXSource, short objType, int objIndex) {
|
||||
char buffer[5]; int data = -65535; short tmp = 0; int dataIndex = 0;
|
||||
sprintf(buffer, "%d", abs(pXSource->data1)); int len = strlen(buffer);
|
||||
sprintf(buffer, "%d", abs(pXSource->data1)); int len = int(strlen(buffer));
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
dataIndex = (buffer[i] - 52) + 4;
|
||||
|
@ -4449,7 +4449,7 @@ void useSectorLigthChanger(XSPRITE* pXSource, XSECTOR* pXSector) {
|
|||
|
||||
int oldAmplitude = pXSector->amplitude;
|
||||
if (valueIsBetween(pXSource->data2, -128, 128))
|
||||
pXSector->amplitude = pXSource->data2;
|
||||
pXSector->amplitude = uint8_t(pXSource->data2);
|
||||
|
||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||
pXSector->freq = ClipHigh(pXSource->data3, 255);
|
||||
|
@ -4521,7 +4521,7 @@ void useTargetChanger(XSPRITE* pXSource, spritetype* pSprite) {
|
|||
|
||||
// heal dude a bit in case of friendly fire
|
||||
int startHp = (pXSprite->sysData2 > 0) ? ClipRange(pXSprite->sysData2 << 4, 1, 65535) : pDudeInfo->startHealth << 4;
|
||||
if (pXSprite->health < startHp) actHealDude(pXSprite, receiveHp, startHp);
|
||||
if (pXSprite->health < (unsigned)startHp) actHealDude(pXSprite, receiveHp, startHp);
|
||||
} else if (xsprite[pBurnSource->extra].health <= 0) {
|
||||
pXSprite->burnTime = 0;
|
||||
}
|
||||
|
@ -4581,11 +4581,11 @@ void useTargetChanger(XSPRITE* pXSource, spritetype* pSprite) {
|
|||
|
||||
// heal dude
|
||||
int startHp = (pXSprite->sysData2 > 0) ? ClipRange(pXSprite->sysData2 << 4, 1, 65535) : pDudeInfo->startHealth << 4;
|
||||
if (pXSprite->health < startHp) actHealDude(pXSprite, receiveHp, startHp);
|
||||
if (pXSprite->health < (unsigned)startHp) actHealDude(pXSprite, receiveHp, startHp);
|
||||
|
||||
// heal mate
|
||||
startHp = (pXMate->sysData2 > 0) ? ClipRange(pXMate->sysData2 << 4, 1, 65535) : getDudeInfo(pMate->type)->startHealth << 4;
|
||||
if (pXMate->health < startHp) actHealDude(pXMate, receiveHp, startHp);
|
||||
if (pXMate->health < (unsigned)startHp) actHealDude(pXMate, receiveHp, startHp);
|
||||
|
||||
if (pXMate->target > -1 && sprite[pXMate->target].extra >= 0) {
|
||||
pTarget = &sprite[pXMate->target];
|
||||
|
@ -4742,10 +4742,10 @@ void usePictureChanger(XSPRITE* pXSource, int objType, int objIndex) {
|
|||
sector[objIndex].ceilingpicnum = pXSource->data2;
|
||||
|
||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||
sector[objIndex].floorpal = pXSource->data3;
|
||||
sector[objIndex].floorpal = uint8_t(pXSource->data3);
|
||||
|
||||
if (valueIsBetween(pXSource->data4, -1, 65535))
|
||||
sector[objIndex].ceilingpal = pXSource->data4;
|
||||
sector[objIndex].ceilingpal = uint8_t(pXSource->data4);
|
||||
break;
|
||||
case OBJ_SPRITE:
|
||||
if (valueIsBetween(pXSource->data1, -1, 32767))
|
||||
|
@ -4755,7 +4755,7 @@ void usePictureChanger(XSPRITE* pXSource, int objType, int objIndex) {
|
|||
else if (pXSource->data2 < -1) sprite[objIndex].shade = (pXSource->data2 < -127) ? -127 : pXSource->data2;
|
||||
|
||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||
sprite[objIndex].pal = pXSource->data3;
|
||||
sprite[objIndex].pal = uint8_t(pXSource->data3);
|
||||
break;
|
||||
case OBJ_WALL:
|
||||
if (valueIsBetween(pXSource->data1, -1, 32767))
|
||||
|
@ -4765,7 +4765,7 @@ void usePictureChanger(XSPRITE* pXSource, int objType, int objIndex) {
|
|||
wall[objIndex].overpicnum = pXSource->data2;
|
||||
|
||||
if (valueIsBetween(pXSource->data3, -1, 32767))
|
||||
wall[objIndex].pal = pXSource->data3;
|
||||
wall[objIndex].pal = uint8_t(pXSource->data3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -5163,7 +5163,7 @@ XSPRITE* evrListRedirectors(int objType, int objXIndex, XSPRITE* pXRedir, int* t
|
|||
bool incDecGoalValueIsReached(XSPRITE* pXSprite) {
|
||||
|
||||
if (pXSprite->data3 != pXSprite->sysData1) return false;
|
||||
char buffer[5]; sprintf(buffer, "%d", abs(pXSprite->data1)); int len = strlen(buffer); int rx = -1;
|
||||
char buffer[5]; sprintf(buffer, "%d", abs(pXSprite->data1)); int len = int(strlen(buffer)); int rx = -1;
|
||||
for (int i = bucketHead[pXSprite->txID]; i < bucketHead[pXSprite->txID + 1]; i++) {
|
||||
if (rxBucket[i].type == OBJ_SPRITE && evrIsRedirector(rxBucket[i].index)) continue;
|
||||
for (int a = 0; a < len; a++) {
|
||||
|
|
|
@ -281,8 +281,8 @@ void DoSectorPanning(void)
|
|||
int px = MulScale(speed << 2, Cos(angle), 30) / xBits;
|
||||
int yBits = tileHeight(nTile) >> int((pSector->floorstat & 8) != 0);
|
||||
int py = MulScale(speed << 2, Sin(angle), 30) / yBits;
|
||||
pSector->addfloorxpan(px * (1. / 256));
|
||||
pSector->addfloorypan(-py * (1. / 256));
|
||||
pSector->addfloorxpan(px * (1.f / 256));
|
||||
pSector->addfloorypan(-py * (1.f / 256));
|
||||
}
|
||||
if (pXSector->panCeiling) // Ceiling
|
||||
{
|
||||
|
@ -293,8 +293,8 @@ void DoSectorPanning(void)
|
|||
int px = MulScale(speed << 2, Cos(angle), 30) / xBits;
|
||||
int yBits = tileHeight(nTile) >> int((pSector->ceilingstat & 8) != 0);
|
||||
int py = MulScale(speed << 2, Sin(angle), 30) / yBits;
|
||||
pSector->addceilingxpan(px * (1. / 256));
|
||||
pSector->addceilingypan(-py * (1. / 256));
|
||||
pSector->addceilingxpan(px * (1.f / 256));
|
||||
pSector->addceilingypan(-py * (1.f / 256));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -317,8 +317,8 @@ void DoSectorPanning(void)
|
|||
int px = (psx << 2) / tileWidth(nTile);
|
||||
int py = (psy << 2) / tileHeight(nTile);
|
||||
|
||||
wall[nWall].addxpan(px * (1. / 256));
|
||||
wall[nWall].addypan(py * (1. / 256));
|
||||
wall[nWall].addxpan(px * (1.f / 256));
|
||||
wall[nWall].addypan(py * (1.f / 256));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ void GameInterface::UpdateSounds()
|
|||
|
||||
if (gMe->pSprite)
|
||||
{
|
||||
listener.angle = -gMe->pSprite->ang * BAngRadian; // Build uses a period of 2048.
|
||||
listener.angle = -gMe->pSprite->ang * float(BAngRadian); // Build uses a period of 2048.
|
||||
listener.velocity.Zero();
|
||||
listener.position = GetSoundPos(&gMe->pSprite->pos);
|
||||
listener.valid = true;
|
||||
|
|
|
@ -270,9 +270,9 @@ void LifeLeechOperate(spritetype *pSprite, XSPRITE *pXSprite, EVENT event)
|
|||
int nMissileType = kMissileLifeLeechAltNormal + (pXSprite->data3 ? 1 : 0);
|
||||
int t2;
|
||||
if (!pXSprite->data3)
|
||||
t2 = 120 / 10.0;
|
||||
t2 = 120 / 10;
|
||||
else
|
||||
t2 = (3*120) / 10.0;
|
||||
t2 = (3*120) / 10;
|
||||
spritetype *pMissile = actFireMissile(pSprite, 0, z1, dx, dy, dz, nMissileType);
|
||||
if (pMissile)
|
||||
{
|
||||
|
|
|
@ -742,7 +742,7 @@ void viewDrawScreen(bool sceneonly)
|
|||
}
|
||||
else
|
||||
{
|
||||
renderSetRollAngle(rotscrnang.asbuildf());
|
||||
renderSetRollAngle((float)rotscrnang.asbuildf());
|
||||
render3DViewPolymost(nSectnum, cX, cY, cZ, cA, cH);
|
||||
}
|
||||
bDeliriumOld = bDelirium && gDeliriumBlur;
|
||||
|
|
|
@ -194,7 +194,7 @@ static bool CheckAmmo(PLAYER *pPlayer, int ammotype, int count)
|
|||
return 1;
|
||||
if (pPlayer->curWeapon == 12 && pPlayer->weaponAmmo == 11 && pPlayer->weaponState == 11)
|
||||
return 1;
|
||||
if (pPlayer->curWeapon == 9 && pPlayer->pXSprite->health >= (count<<4))
|
||||
if (pPlayer->curWeapon == 9 && pPlayer->pXSprite->health >= unsigned(count<<4))
|
||||
return 1;
|
||||
return pPlayer->ammoCount[ammotype] >= count;
|
||||
}
|
||||
|
@ -1703,7 +1703,7 @@ void AltFireLifeLeech(int , PLAYER *pPlayer)
|
|||
if (gGameOptions.nGameType <= 1)
|
||||
{
|
||||
int nAmmo = pPlayer->ammoCount[8];
|
||||
if (nAmmo < 25 && pPlayer->pXSprite->health > ((25-nAmmo)<<4))
|
||||
if (nAmmo < 25 && pPlayer->pXSprite->health > unsigned((25-nAmmo)<<4))
|
||||
{
|
||||
actDamageSprite(pPlayer->nSprite, pPlayer->pSprite, DAMAGE_TYPE_5, ((25-nAmmo)<<4));
|
||||
nAmmo = 25;
|
||||
|
|
Loading…
Reference in a new issue