This commit is contained in:
Christoph Oelckers 2014-06-01 12:39:13 +02:00
commit 7fedaf9221
3 changed files with 19 additions and 3 deletions

View file

@ -74,8 +74,24 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)
*c = c2;
*d = d2;
#elif __PIC__
/* GCC or Clang WITH position-independent code generation */
__asm__ __volatile__ (
"xchgl %%ebx, %1\n"
"cpuid\n"
"xchgl %%ebx, %1\n"
: "=a" (*a) ,
"=r" (*b) ,
"=c" (*c) ,
"=d" (*d)
: "0" (function)) ;
#else
/* GCC or Clang WITHOUT position-independent code generation */
__asm__ __volatile__ (
"cpuid"
: "=a" (*a) ,

View file

@ -1143,7 +1143,7 @@ AWeapon *FWeaponSlots::PickNextWeapon(player_t *player)
return weap;
}
}
while ((slot != startslot || index != startindex) && slotschecked < NUM_WEAPON_SLOTS);
while ((slot != startslot || index != startindex) && slotschecked <= NUM_WEAPON_SLOTS);
}
return player->ReadyWeapon;
}
@ -1198,7 +1198,7 @@ AWeapon *FWeaponSlots::PickPrevWeapon (player_t *player)
return weap;
}
}
while ((slot != startslot || index != startindex) && slotschecked < NUM_WEAPON_SLOTS);
while ((slot != startslot || index != startindex) && slotschecked <= NUM_WEAPON_SLOTS);
}
return player->ReadyWeapon;
}

View file

@ -332,7 +332,7 @@ F481922F4881F74760F3C0437FD5EDD0 // map03
setactivation 455 16 // SPAC_Push
}
8B2AC8D4DB4A49A5DCCBB067E04434D6 // The Hell Factory Hub One, map04
65A1EB4C87386F290816660A52932FF1 // Master Levels, garrison.wad
{
rebuildnodes