work around strange gcc boolean bug

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4826 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2010-05-08 21:47:21 +00:00
parent 5ddec43659
commit ab6d7fef08
3 changed files with 6 additions and 19 deletions
+5 -6
View File
@@ -667,8 +667,7 @@ void weapon::renderhudmodel(int lastaction, int index)
if(!intermission) wm.calcmove(unitv, lastaction);
defformatstring(path)("weapons/%s", info.modelname);
bool emit = (wm.anim&ANIM_INDEX)==ANIM_GUN_SHOOT && (lastmillis - lastaction) < flashtime();
int rindex = (righthanded) ? index : (index ? 0 : 1);
rendermodel(path, wm.anim|ANIM_DYNALLOC|(rindex ? ANIM_MIRROR : 0)|(emit ? ANIM_PARTICLE : 0), 0, -1, wm.pos, player1->yaw+90, player1->pitch+wm.k_rot, 40.0f, wm.basetime, NULL, NULL, 1.28f);
rendermodel(path, wm.anim|ANIM_DYNALLOC|(righthanded==index ? ANIM_MIRROR : 0)|(emit ? ANIM_PARTICLE : 0), 0, -1, wm.pos, player1->yaw+90, player1->pitch+wm.k_rot, 40.0f, wm.basetime, NULL, NULL, 1.28f);
}
void weapon::updatetimers()
@@ -1125,7 +1124,7 @@ bool pistol::selectable() { return weapon::selectable() && !m_nopistol; }
// akimbo
akimbo::akimbo(playerent *owner) : gun(owner, GUN_AKIMBO), akimbomillis(0)
akimbo::akimbo(playerent *owner) : gun(owner, GUN_AKIMBO), akimboside(0), akimbomillis(0)
{
akimbolastaction[0] = akimbolastaction[1] = 0;
}
@@ -1134,8 +1133,8 @@ bool akimbo::attack(vec &targ)
{
if(gun::attack(targ))
{
akimbolastaction[akimboside?1:0] = lastmillis;
akimboside = !akimboside;
akimbolastaction[akimboside] = lastmillis;
akimboside = (akimboside+1)%2;
return true;
}
return false;
@@ -1159,7 +1158,7 @@ void akimbo::onselecting()
bool akimbo::selectable() { return weapon::selectable() && !m_nopistol && owner->akimbo; }
void akimbo::updatetimers() { weapon::updatetimers(); /*loopi(2) akimbolastaction[i] = lastmillis;*/ }
void akimbo::reset() { akimbolastaction[0] = akimbolastaction[1] = akimbomillis = 0; akimboside = false; }
void akimbo::reset() { akimbolastaction[0] = akimbolastaction[1] = akimbomillis = akimboside = 0; }
void akimbo::renderhudmodel()
{
+1 -1
View File
@@ -147,7 +147,7 @@ struct akimbo : gun
{
akimbo(playerent *owner);
bool akimboside;
int akimboside;
int akimbomillis;
int akimbolastaction[2];
-12
View File
@@ -518,18 +518,6 @@ bool load_world(char *mname) // still supports all map formats that have
char texuse[256];
loopi(256) texuse[i] = 0;
sqr *t = NULL;
int bbx[2],bby[2],bbz[2];
for(int cbba = 0; cbba < 3; cbba++)
{
for(int bx = 0; bx < 2; bx++) switch(cbba)
{
case 1: bbx[bx] = 0; break;
case 2: bby[bx] = 0; break;
case 3: bbz[bx] = 0; break;
default: break;
}
}
loopk(cubicsize)
{
sqr *s = &world[k];