- fixed some bad logic operations.

This commit is contained in:
Christoph Oelckers 2014-10-25 00:01:04 +02:00
parent e28234a8b8
commit e81c404b04
3 changed files with 7 additions and 6 deletions

View File

@ -500,9 +500,10 @@ UCVarValue FBaseCVar::FromString (const char *value, ECVarType type)
goodv = false; goodv = false;
break; break;
default: default:
if (value[i] < '0' && value[i] > '9' && if (value[i] < '0' ||
value[i] < 'A' && value[i] > 'F' && (value[i] > '9' && value[i] < 'A') ||
value[i] < 'a' && value[i] > 'f') (value[i] > 'F' && value[i] < 'a') ||
value[i] > 'f')
{ {
goodv = false; goodv = false;
} }

View File

@ -1672,7 +1672,7 @@ void P_PoisonDamage (player_t *player, AActor *source, int damage,
target->health -= damage; target->health -= damage;
if (target->health <= 0) if (target->health <= 0)
{ // Death { // Death
if (player->cheats & CF_BUDDHA) if (player->cheats & CF_BUDDHA && damage < TELEFRAG_DAMAGE)
{ // [SP] Save the player... { // [SP] Save the player...
player->health = target->health = 1; player->health = target->health = 1;
} }

View File

@ -198,7 +198,7 @@ void P_GetFloorCeilingZ(FCheckPosition &tmf, int flags)
if (ff_top > tmf.floorz) if (ff_top > tmf.floorz)
{ {
if (ff_top <= tmf.z || (!(flags && FFCF_3DRESTRICT) && (tmf.thing != NULL && ff_bottom < tmf.z && ff_top < tmf.z + tmf.thing->MaxStepHeight))) if (ff_top <= tmf.z || (!(flags & FFCF_3DRESTRICT) && (tmf.thing != NULL && ff_bottom < tmf.z && ff_top < tmf.z + tmf.thing->MaxStepHeight)))
{ {
tmf.dropoffz = tmf.floorz = ff_top; tmf.dropoffz = tmf.floorz = ff_top;
tmf.floorpic = *rover->top.texture; tmf.floorpic = *rover->top.texture;
@ -2157,7 +2157,7 @@ bool P_CheckMove(AActor *thing, fixed_t x, fixed_t y)
{ // too big a step up { // too big a step up
return false; return false;
} }
else if ((thing->flags & MF_MISSILE) && !(thing->flags6 && MF6_STEPMISSILE) && tm.floorz > newz) else if ((thing->flags & MF_MISSILE) && !(thing->flags6 & MF6_STEPMISSILE) && tm.floorz > newz)
{ // [RH] Don't let normal missiles climb steps { // [RH] Don't let normal missiles climb steps
return false; return false;
} }